| { |
| "$schema": "http://json-schema.org/draft-04/schema#", |
| "description": "See https://fuchsia.dev/fuchsia-src/development/languages/fidl/reference/json-ir.md", |
| "type": "object", |
| "required": [ |
| "version", |
| "name", |
| "bits_declarations", |
| "const_declarations", |
| "enum_declarations", |
| "experimental_resource_declarations", |
| "interface_declarations", |
| "service_declarations", |
| "struct_declarations", |
| "table_declarations", |
| "union_declarations", |
| "type_alias_declarations", |
| "declaration_order", |
| "declarations", |
| "library_dependencies" |
| ], |
| "properties": { |
| "version": { |
| "description": "Version of the JSON IR schema", |
| "$ref": "#/definitions/version" |
| }, |
| "name": { |
| "description": "Name of the library", |
| "$ref": "#/definitions/library-identifier" |
| }, |
| "maybe_attributes": { |
| "description": "Optional list of attributes of the library", |
| "$ref": "#/definitions/attributes-list" |
| }, |
| "bits_declarations": { |
| "description": "List of bits declarations", |
| "type": "array", |
| "items": { |
| "$ref": "#/definitions/bits" |
| } |
| }, |
| "const_declarations": { |
| "description": "List of constants", |
| "type": "array", |
| "items": { |
| "$ref": "#/definitions/const" |
| } |
| }, |
| "enum_declarations": { |
| "description": "List of enumerations", |
| "type": "array", |
| "items": { |
| "$ref": "#/definitions/enum" |
| } |
| }, |
| "experimental_resource_declarations": { |
| "description": "List of resources", |
| "type": "array", |
| "items": { |
| "$ref": "#/definitions/resource" |
| } |
| }, |
| "interface_declarations": { |
| "description": "List of interfaces", |
| "type": "array", |
| "items": { |
| "$ref": "#/definitions/interface" |
| } |
| }, |
| "service_declarations": { |
| "description": "List of services", |
| "type": "array", |
| "items": { |
| "$ref": "#/definitions/service" |
| } |
| }, |
| "struct_declarations": { |
| "description": "List of structures", |
| "type": "array", |
| "items": { |
| "$ref": "#/definitions/struct" |
| } |
| }, |
| "table_declarations": { |
| "description": "List of tables", |
| "type": "array", |
| "items": { |
| "$ref": "#/definitions/table" |
| } |
| }, |
| "union_declarations": { |
| "description": "List of unions", |
| "type": "array", |
| "items": { |
| "$ref": "#/definitions/union" |
| } |
| }, |
| "type_alias_declarations": { |
| "description": "List of type aliases", |
| "type": "array", |
| "items": { |
| "$ref": "#/definitions/type_alias" |
| } |
| }, |
| "declaration_order": { |
| "description": "List of declarations in declaration order", |
| "type": "array", |
| "items": { |
| "$ref": "#/definitions/compound-identifier" |
| } |
| }, |
| "declarations": { |
| "description": "List of declarations and their types", |
| "$ref": "#/definitions/declarations-map" |
| }, |
| "library_dependencies": { |
| "description": "List of dependencies on other libraries", |
| "type": "array", |
| "items": { |
| "$ref": "#/definitions/library" |
| } |
| } |
| }, |
| "definitions": { |
| "bits": { |
| "description": "Definition of a bits declaration", |
| "type": "object", |
| "required": [ |
| "name", |
| "type", |
| "mask", |
| "members", |
| "strict" |
| ], |
| "properties": { |
| "maybe_attributes": { |
| "description": "Optional list of attributes of the bits declaration", |
| "$ref": "#/definitions/attributes-list" |
| }, |
| "name": { |
| "description": "Fully qualified name of the bits", |
| "$ref": "#/definitions/compound-identifier" |
| }, |
| "location": { |
| "description": "Source location of the declaration", |
| "$ref": "#/definitions/location" |
| }, |
| "type": { |
| "description": "Type of the bits", |
| "$ref": "#/definitions/type" |
| }, |
| "mask": { |
| "description": "Mask of all members", |
| "type": "string" |
| }, |
| "members": { |
| "description": "List of bits members", |
| "type": "array", |
| "items": { |
| "$ref": "#/definitions/bits-member" |
| } |
| }, |
| "strict": { |
| "description": "Strictness of the bits", |
| "type": "boolean" |
| } |
| } |
| }, |
| "bits-member": { |
| "description": "Definition of an bits member", |
| "type": "object", |
| "required": [ |
| "name", |
| "value" |
| ], |
| "properties": { |
| "name": { |
| "description": "Name of the bits member", |
| "$ref": "#/definitions/identifier" |
| }, |
| "location": { |
| "description": "Source location of the declaration", |
| "$ref": "#/definitions/location" |
| }, |
| "maybe_attributes": { |
| "description": "Optional list of attributes of the bits member", |
| "$ref": "#/definitions/attributes-list" |
| }, |
| "value": { |
| "description": "Value of the bits member", |
| "$ref": "#/definitions/constant" |
| } |
| } |
| }, |
| "const": { |
| "description": "Definition of a constant declaration", |
| "type": "object", |
| "required": [ |
| "name", |
| "type", |
| "value" |
| ], |
| "properties": { |
| "maybe_attributes": { |
| "description": "Optional list of attributes of the constant declaration", |
| "$ref": "#/definitions/attributes-list" |
| }, |
| "name": { |
| "description": "Fully qualified name of the constant", |
| "$ref": "#/definitions/compound-identifier" |
| }, |
| "location": { |
| "description": "Source location of the declaration", |
| "$ref": "#/definitions/location" |
| }, |
| "type": { |
| "description": "Type of the constant", |
| "$ref": "#/definitions/type" |
| }, |
| "value": { |
| "description": "Value of the constant", |
| "$ref": "#/definitions/constant" |
| } |
| } |
| }, |
| "enum": { |
| "description": "Definition of an enum declaration", |
| "type": "object", |
| "required": [ |
| "name", |
| "type", |
| "members", |
| "strict" |
| ], |
| "properties": { |
| "maybe_attributes": { |
| "description": "Optional list of attributes of the enum declaration", |
| "$ref": "#/definitions/attributes-list" |
| }, |
| "name": { |
| "description": "Fully qualified name of the enum", |
| "$ref": "#/definitions/compound-identifier" |
| }, |
| "location": { |
| "description": "Source location of the declaration", |
| "$ref": "#/definitions/location" |
| }, |
| "type": { |
| "description": "Type of the enum", |
| "$ref": "#/definitions/integer-type" |
| }, |
| "members": { |
| "description": "List of enum members", |
| "type": "array", |
| "items": { |
| "$ref": "#/definitions/enum-member" |
| } |
| }, |
| "strict": { |
| "description": "Strictness of the enum", |
| "type": "boolean" |
| }, |
| "maybe_unknown_value": { |
| "description": "Unknown member value (present for flexible enums only)", |
| "type": "integer" |
| } |
| } |
| }, |
| "enum-member": { |
| "description": "Definition of an enum member", |
| "type": "object", |
| "required": [ |
| "name", |
| "value" |
| ], |
| "properties": { |
| "name": { |
| "description": "Name of the enum member", |
| "$ref": "#/definitions/identifier" |
| }, |
| "location": { |
| "description": "Source location of the declaration", |
| "$ref": "#/definitions/location" |
| }, |
| "maybe_attributes": { |
| "description": "Optional list of attributes of the enum member", |
| "$ref": "#/definitions/attributes-list" |
| }, |
| "value": { |
| "description": "Value of the enum member", |
| "$ref": "#/definitions/constant" |
| } |
| } |
| }, |
| "fieldshape": { |
| "description": "Definition of a field shape", |
| "type": "object", |
| "required": [ |
| "offset", |
| "padding" |
| ], |
| "properties": { |
| "offset": { |
| "description": "Offset in bytes at which a member starts", |
| "$ref": "#/definitions/count" |
| }, |
| "padding": { |
| "description": "Padding in bytes which follows a member", |
| "$ref": "#/definitions/count" |
| } |
| } |
| }, |
| "interface": { |
| "description": "Definition of an interface declaration", |
| "type": "object", |
| "required": [ |
| "name", |
| "methods" |
| ], |
| "properties": { |
| "maybe_attributes": { |
| "description": "Optional list of attributes of the interface declaration", |
| "$ref": "#/definitions/attributes-list" |
| }, |
| "name": { |
| "description": "Name of the interface", |
| "$ref": "#/definitions/compound-identifier" |
| }, |
| "location": { |
| "description": "Source location of the declaration", |
| "$ref": "#/definitions/location" |
| }, |
| "methods": { |
| "description": "List of methods and events", |
| "type": "array", |
| "items": { |
| "$ref": "#/definitions/interface-method" |
| } |
| } |
| } |
| }, |
| "interface-method": { |
| "description": "Definition of a method or event", |
| "type": "object", |
| "required": [ |
| "ordinal", |
| "name", |
| "has_request", |
| "has_response", |
| "is_composed" |
| ], |
| "properties": { |
| "maybe_attributes": { |
| "description": "Optional list of attributes of the method or event", |
| "$ref": "#/definitions/attributes-list" |
| }, |
| "ordinal": { |
| "description": "Ordinal number of the interface method", |
| "$ref": "#/definitions/ordinal" |
| }, |
| "name": { |
| "description": "Name of the interface method", |
| "$ref": "#/definitions/identifier" |
| }, |
| "location": { |
| "description": "Source location of the declaration", |
| "$ref": "#/definitions/location" |
| }, |
| "has_request": { |
| "description": "Flag indicating that interface method has a request component", |
| "type": "boolean" |
| }, |
| "maybe_request": { |
| "description": "Optional list of interface method request parameters", |
| "type": "array", |
| "items": { |
| "$ref": "#/definitions/interface-method-parameter" |
| } |
| }, |
| "maybe_request_type_shape_v1": { |
| "description": "Type shape of this declaration", |
| "$ref": "#/definitions/typeshape" |
| }, |
| "has_response": { |
| "description": "Flag indicating that interface method has a response component", |
| "type": "boolean" |
| }, |
| "maybe_response": { |
| "description": "Optional list of interface method response parameters", |
| "type": "array", |
| "items": { |
| "$ref": "#/definitions/interface-method-parameter" |
| } |
| }, |
| "maybe_response_type_shape_v1": { |
| "description": "Type shape of this declaration", |
| "$ref": "#/definitions/typeshape" |
| }, |
| "is_composed": { |
| "description": "Flag indicating whether method was composed into this protocol", |
| "type": "boolean" |
| } |
| } |
| }, |
| "interface-method-parameter": { |
| "description": "Definition of parameter or return of a method or event", |
| "type": "object", |
| "required": [ |
| "type", |
| "name", |
| "field_shape_v1" |
| ], |
| "properties": { |
| "maybe_attributes": { |
| "description": "Optional list of attributes of the method or event parameter", |
| "$ref": "#/definitions/attributes-list" |
| }, |
| "type": { |
| "description": "Type of the parameter or return", |
| "$ref": "#/definitions/type" |
| }, |
| "name": { |
| "description": "Name of the parameter or return", |
| "$ref": "#/definitions/identifier" |
| }, |
| "location": { |
| "description": "Source location of the declaration", |
| "$ref": "#/definitions/location" |
| }, |
| "field_shape_v1": { |
| "description": "Field shape", |
| "$ref": "#/definitions/fieldshape" |
| } |
| } |
| }, |
| "resource": { |
| "description": "Definition of a resource declaration", |
| "type": "object", |
| "required": [ |
| "name", |
| "location", |
| "type" |
| ], |
| "properties": { |
| "maybe_attributes": { |
| "description": "Optional list of attributes of the resource declaration", |
| "$ref": "#/definitions/attributes-list" |
| }, |
| "name": { |
| "description": "Fully qualified name of the resource", |
| "$ref": "#/definitions/compound-identifier" |
| }, |
| "location": { |
| "description": "Source location of the declaration", |
| "$ref": "#/definitions/location" |
| }, |
| "type": { |
| "description": "Type of the resource", |
| "$ref": "#/definitions/type" |
| }, |
| "properties": { |
| "description": "List of properties", |
| "type": "array", |
| "items": { |
| "$ref": "#/definitions/resource-property" |
| } |
| } |
| } |
| }, |
| "resource-property": { |
| "description": "Definition of a resource property", |
| "type": "object", |
| "required": [ |
| "type", |
| "name" |
| ], |
| "properties": { |
| "type": { |
| "description": "Type of the resource property", |
| "$ref": "#/definitions/type" |
| }, |
| "name": { |
| "description": "Name of the property", |
| "$ref": "#/definitions/identifier" |
| } |
| } |
| }, |
| "service": { |
| "description": "Definition of a service declaration", |
| "type": "object", |
| "required": [ |
| "name", |
| "location", |
| "members" |
| ], |
| "properties": { |
| "name": { |
| "description": "Name of service", |
| "$ref": "#/definitions/compound-identifier" |
| }, |
| "location": { |
| "description": "Source location of the declaration", |
| "$ref": "#/definitions/location" |
| }, |
| "members": { |
| "description": "List of service members", |
| "type": "array", |
| "items": { |
| "$ref": "#/definitions/service-member" |
| } |
| }, |
| "maybe_attributes": { |
| "description": "Optional list of attributes of the service declaration", |
| "$ref": "#/definitions/attributes-list" |
| } |
| } |
| }, |
| "service-member": { |
| "description": "Definition of a service member", |
| "type": "object", |
| "required": [ |
| "type", |
| "name", |
| "location" |
| ], |
| "properties": { |
| "type": { |
| "description": "Type of the service member", |
| "$ref": "#/definitions/type" |
| }, |
| "name": { |
| "description": "Name of the service member", |
| "$ref": "#/definitions/identifier" |
| }, |
| "location": { |
| "description": "Source location of the declaration", |
| "$ref": "#/definitions/location" |
| }, |
| "maybe_attributes": { |
| "description": "Optional list of service member attributes", |
| "$ref": "#/definitions/attributes-list" |
| } |
| } |
| }, |
| "struct": { |
| "description": "Definition of a struct declaration", |
| "type": "object", |
| "required": [ |
| "name", |
| "members", |
| "resource", |
| "type_shape_v1" |
| ], |
| "properties": { |
| "max_handles": { |
| "description": "Maximum number of handles present in the struct", |
| "$ref": "#/definitions/count" |
| }, |
| "maybe_attributes": { |
| "description": "Optional list of attributes of the struct declaration", |
| "$ref": "#/definitions/attributes-list" |
| }, |
| "name": { |
| "description": "Name of struct", |
| "$ref": "#/definitions/compound-identifier" |
| }, |
| "location": { |
| "description": "Source location of the declaration", |
| "$ref": "#/definitions/location" |
| }, |
| "anonymous": { |
| "description": "Flag indicating that struct is anonymous", |
| "type": "boolean" |
| }, |
| "members": { |
| "description": "List of struct members", |
| "type": "array", |
| "items": { |
| "$ref": "#/definitions/struct-member" |
| } |
| }, |
| "resource": { |
| "description": "True if the struct is a resource type (declared to contain handles)", |
| "type": "boolean" |
| }, |
| "type_shape_v1": { |
| "description": "Type shape of this declaration", |
| "$ref": "#/definitions/typeshape" |
| } |
| } |
| }, |
| "struct-member": { |
| "description": "Definition of a struct member", |
| "type": "object", |
| "required": [ |
| "type", |
| "name", |
| "field_shape_v1" |
| ], |
| "properties": { |
| "type": { |
| "description": "Type of the struct member", |
| "$ref": "#/definitions/type" |
| }, |
| "name": { |
| "description": "Name of struct member", |
| "$ref": "#/definitions/identifier" |
| }, |
| "location": { |
| "description": "Source location of the declaration", |
| "$ref": "#/definitions/location" |
| }, |
| "field_shape_v1": { |
| "description": "Field shape", |
| "$ref": "#/definitions/fieldshape" |
| }, |
| "maybe_attributes": { |
| "description": "Optional list of struct member attributes", |
| "$ref": "#/definitions/attributes-list" |
| }, |
| "maybe_default_value": { |
| "description": "Optional default value for struct member", |
| "$ref": "#/definitions/constant" |
| } |
| } |
| }, |
| "table": { |
| "description": "Definition of a table", |
| "type": "object", |
| "required": [ |
| "name", |
| "members", |
| "type_shape_v1", |
| "strict", |
| "resource" |
| ], |
| "properties": { |
| "max_handles": { |
| "description": "Maximum number of handles present in the table", |
| "$ref": "#/definitions/count" |
| }, |
| "maybe_attributes": { |
| "description": "Optional list of table attributes", |
| "$ref": "#/definitions/attributes-list" |
| }, |
| "name": { |
| "description": "Name of table", |
| "$ref": "#/definitions/compound-identifier" |
| }, |
| "location": { |
| "description": "Source location of the declaration", |
| "$ref": "#/definitions/location" |
| }, |
| "members": { |
| "description": "List of table members", |
| "type": "array", |
| "items": { |
| "$ref": "#/definitions/table-member" |
| } |
| }, |
| "strict": { |
| "description": "Strictness of table", |
| "type": "boolean" |
| }, |
| "resource": { |
| "description": "True if the table is a resource type (may contain handles)", |
| "type": "boolean" |
| }, |
| "type_shape_v1": { |
| "description": "Type shape of this declaration", |
| "$ref": "#/definitions/typeshape" |
| } |
| } |
| }, |
| "table-member": { |
| "description": "Definition of a table member", |
| "type": "object", |
| "required": [ |
| "ordinal", |
| "reserved" |
| ], |
| "properties": { |
| "reserved": { |
| "description": "Flag indicating that field is reserved", |
| "type": "boolean" |
| }, |
| "type": { |
| "description": "Type of table member", |
| "$ref": "#/definitions/type" |
| }, |
| "name": { |
| "description": "Name of table member", |
| "$ref": "#/definitions/identifier" |
| }, |
| "location": { |
| "description": "Source location of the declaration", |
| "$ref": "#/definitions/location" |
| }, |
| "ordinal": { |
| "description": "Ordinal value of table member", |
| "$ref": "#/definitions/ordinal" |
| }, |
| "size": { |
| "description": "Size of table member", |
| "$ref": "#/definitions/count" |
| }, |
| "max_out_of_line": { |
| "description": "Maximum size of the out-of-line payload", |
| "$ref": "#/definitions/count" |
| }, |
| "alignment": { |
| "description": "Alignment of table member", |
| "$ref": "#/definitions/count" |
| }, |
| "offset": { |
| "description": "Offset of table member", |
| "$ref": "#/definitions/count" |
| }, |
| "maybe_default_value": { |
| "description": "Optional default value for table member", |
| "$ref": "#/definitions/constant" |
| } |
| } |
| }, |
| "typeshape": { |
| "description": "Definition of a type shape", |
| "type": "object", |
| "required": [ |
| "inline_size", |
| "alignment", |
| "depth", |
| "max_handles", |
| "max_out_of_line", |
| "has_padding", |
| "has_flexible_envelope" |
| ], |
| "properties": { |
| "inline_size": { |
| "description": "Size of bytes in the inline portion of this declaration", |
| "$ref": "#/definitions/count" |
| }, |
| "alignment": { |
| "description": "Alignment of this declaration", |
| "$ref": "#/definitions/count" |
| }, |
| "depth": { |
| "description": "Maximum depth of this declaration", |
| "$ref": "#/definitions/count" |
| }, |
| "max_handles": { |
| "description": "Maximum number of handles this declaration can hold", |
| "$ref": "#/definitions/count" |
| }, |
| "max_out_of_line": { |
| "description": "Maximum number of bytes in the out-of-line portion of this declaration", |
| "$ref": "#/definitions/count" |
| }, |
| "has_padding": { |
| "description": "Flag indicating if there could be padding bytes in this declaration", |
| "type": "boolean" |
| }, |
| "has_flexible_envelope": { |
| "description": "Flag indicating if this declaration contains flexible envelopes (in unions or tables)", |
| "type": "boolean" |
| } |
| } |
| }, |
| "union": { |
| "description": "Definition of an extensible union", |
| "type": "object", |
| "required": [ |
| "name", |
| "members", |
| "type_shape_v1", |
| "strict", |
| "resource" |
| ], |
| "properties": { |
| "max_handles": { |
| "description": "Maximum number of handles present in the extensible union", |
| "$ref": "#/definitions/count" |
| }, |
| "maybe_attributes": { |
| "description": "Optional list of extensible union attributes", |
| "$ref": "#/definitions/attributes-list" |
| }, |
| "name": { |
| "description": "Name of extensible union", |
| "$ref": "#/definitions/compound-identifier" |
| }, |
| "location": { |
| "description": "Source location of the declaration", |
| "$ref": "#/definitions/location" |
| }, |
| "members": { |
| "description": "List of extensible union members", |
| "type": "array", |
| "items": { |
| "$ref": "#/definitions/union-member" |
| } |
| }, |
| "strict": { |
| "description": "Strictness of extensible union", |
| "type": "boolean" |
| }, |
| "resource": { |
| "description": "True if the union is a resource type (may contain handles)", |
| "type": "boolean" |
| }, |
| "type_shape_v1": { |
| "description": "Type shape of this declaration", |
| "$ref": "#/definitions/typeshape" |
| } |
| } |
| }, |
| "union-member": { |
| "description": "Definition of an extensible union member", |
| "type": "object", |
| "required": [ |
| "ordinal", |
| "reserved" |
| ], |
| "properties": { |
| "ordinal": { |
| "description": "Ordinal value of extensible union member", |
| "$ref": "#/definitions/ordinal" |
| }, |
| "reserved": { |
| "description": "Flag indicating that the member is reserved", |
| "type": "boolean" |
| }, |
| "name": { |
| "description": "Name of extensible union member", |
| "$ref": "#/definitions/identifier" |
| }, |
| "type": { |
| "description": "Type of extensible union member", |
| "$ref": "#/definitions/type" |
| }, |
| "location": { |
| "description": "Source location of the declaration", |
| "$ref": "#/definitions/location" |
| }, |
| "max_out_of_line": { |
| "description": "Maximum size of the out-of-line payload", |
| "$ref": "#/definitions/count" |
| }, |
| "offset": { |
| "description": "Offset of extensible union member", |
| "$ref": "#/definitions/count" |
| }, |
| "maybe_attributes": { |
| "description": "Optional list of extensible union member attributes", |
| "$ref": "#/definitions/attributes-list" |
| } |
| } |
| }, |
| "type_alias": { |
| "description": "Definition of a type alias", |
| "type": "object", |
| "required": [ |
| "name", |
| "location", |
| "partial_type_ctor" |
| ], |
| "properties": { |
| "name": { |
| "description": "Name of a type alias, i.e. the alias", |
| "$ref": "#/definitions/compound-identifier" |
| }, |
| "location": { |
| "description": "Source location of the declaration", |
| "$ref": "#/definitions/location" |
| }, |
| "partial_type_ctor": { |
| "description": "Type constructor being aliased, possibly partial", |
| "$ref": "#/definitions/type-constructor" |
| } |
| } |
| }, |
| "type-constructor": { |
| "description": "Definition of a type constructor", |
| "type": "object", |
| "required": [ |
| "name", |
| "args", |
| "nullable" |
| ], |
| "properties": { |
| "name": { |
| "description": "Name of the type constructor", |
| "type": "string" |
| }, |
| "args": { |
| "description": "List of arguments", |
| "type": "array", |
| "items": { |
| "$ref": "#/definitions/type-constructor" |
| } |
| }, |
| "nullable": { |
| "description": "Flag indicating nullability", |
| "type": "boolean" |
| }, |
| "maybe_size": { |
| "description": "Optional number of maximum elements", |
| "$ref": "#/definitions/constant" |
| }, |
| "maybe_handle_subtype": { |
| "description": "Optional handle subtype", |
| "$ref": "#/definitions/handle-subtype" |
| } |
| } |
| }, |
| "declarations-map": { |
| "description": "Definition of declarations of a library", |
| "type": "object", |
| "patternProperties": { |
| ".*": { |
| "type": "string", |
| "enum": [ |
| "bits", |
| "const", |
| "enum", |
| "interface", |
| "service", |
| "experimental_resource", |
| "struct", |
| "table", |
| "union", |
| "type_alias" |
| ] |
| } |
| } |
| }, |
| "external-declarations-map": { |
| "description": "Definition of declarations of an external library", |
| "type": "object", |
| "patternProperties": { |
| ".*": { |
| "oneOf": [ |
| { |
| "type": "object", |
| "required": [ |
| "kind", |
| "resource" |
| ], |
| "properties": { |
| "kind": { |
| "type": "string", |
| "enum": [ |
| "struct", |
| "table", |
| "union" |
| ] |
| }, |
| "resource": { |
| "type": "boolean" |
| } |
| } |
| }, |
| { |
| "type": "object", |
| "required": [ |
| "kind" |
| ], |
| "properties": { |
| "kind": { |
| "type": "string", |
| "enum": [ |
| "bits", |
| "const", |
| "enum", |
| "interface", |
| "service", |
| "experimental_resource", |
| "type_alias" |
| ] |
| } |
| } |
| } |
| ] |
| } |
| } |
| }, |
| "library": { |
| "description": "Definition of library", |
| "type": "object", |
| "required": [ |
| "name", |
| "declarations" |
| ], |
| "properties": { |
| "name": { |
| "description": "Name of library", |
| "$ref": "#/definitions/library-identifier" |
| }, |
| "declarations": { |
| "description": "Declarations of library", |
| "$ref": "#/definitions/external-declarations-map" |
| } |
| } |
| }, |
| "type": { |
| "description": "Definition of type", |
| "oneOf": [ |
| { |
| "description": "Selection of array type", |
| "$ref": "#/definitions/array-type" |
| }, |
| { |
| "description": "Selection of vector type", |
| "$ref": "#/definitions/vector-type" |
| }, |
| { |
| "description": "Selection of string type", |
| "$ref": "#/definitions/string-type" |
| }, |
| { |
| "description": "Selection of handle type", |
| "$ref": "#/definitions/handle-type" |
| }, |
| { |
| "description": "Selection of request type", |
| "$ref": "#/definitions/request-type" |
| }, |
| { |
| "description": "Selection of primitive type", |
| "$ref": "#/definitions/primitive-type" |
| }, |
| { |
| "description": "Selection of identifier type", |
| "$ref": "#/definitions/identifier-type" |
| } |
| ] |
| }, |
| "array-type": { |
| "description": "Definition of array type", |
| "type": "object", |
| "required": [ |
| "kind", |
| "element_type", |
| "element_count" |
| ], |
| "properties": { |
| "kind": { |
| "description": "Selection of base type as array type", |
| "type": "string", |
| "enum": [ |
| "array" |
| ] |
| }, |
| "element_type": { |
| "description": "Element type of array type", |
| "$ref": "#/definitions/type" |
| }, |
| "element_count": { |
| "description": "Number of elements in array type", |
| "$ref": "#/definitions/count" |
| } |
| } |
| }, |
| "vector-type": { |
| "description": "Definition of vector type", |
| "type": "object", |
| "required": [ |
| "kind", |
| "element_type", |
| "nullable" |
| ], |
| "properties": { |
| "kind": { |
| "description": "Selection of base type as vector type", |
| "type": "string", |
| "enum": [ |
| "vector" |
| ] |
| }, |
| "element_type": { |
| "description": "Element type of vector type", |
| "$ref": "#/definitions/type" |
| }, |
| "maybe_element_count": { |
| "description": "Optional number of maximum elements in vector type", |
| "$ref": "#/definitions/count" |
| }, |
| "nullable": { |
| "description": "Flag indicating nullability of vector type", |
| "type": "boolean" |
| } |
| } |
| }, |
| "string-type": { |
| "description": "Definition of string type", |
| "type": "object", |
| "required": [ |
| "kind", |
| "nullable" |
| ], |
| "properties": { |
| "kind": { |
| "description": "Selection of base type as string type", |
| "type": "string", |
| "enum": [ |
| "string" |
| ] |
| }, |
| "maybe_element_count": { |
| "description": "Optional size of string, in bytes", |
| "$ref": "#/definitions/count" |
| }, |
| "nullable": { |
| "description": "Flag indicating nullability of string type", |
| "type": "boolean" |
| } |
| } |
| }, |
| "handle-type": { |
| "description": "Definition of a handle type", |
| "type": "object", |
| "required": [ |
| "kind", |
| "subtype", |
| "rights", |
| "nullable" |
| ], |
| "properties": { |
| "kind": { |
| "description": "Selection of base type as handle type", |
| "type": "string", |
| "enum": [ |
| "handle" |
| ] |
| }, |
| "subtype": { |
| "description": "Sub-type of handle type", |
| "$ref": "#/definitions/handle-subtype" |
| }, |
| "rights": { |
| "description": "Rights that must be present on a handle", |
| "type": "integer" |
| }, |
| "nullable": { |
| "description": "Flag indicating nullability of handle type", |
| "type": "boolean" |
| } |
| } |
| }, |
| "request-type": { |
| "description": "Definition of a request type", |
| "type": "object", |
| "required": [ |
| "kind", |
| "subtype", |
| "nullable" |
| ], |
| "properties": { |
| "kind": { |
| "description": "Selection of base type as request type", |
| "type": "string", |
| "enum": [ |
| "request" |
| ] |
| }, |
| "subtype": { |
| "description": "Interface name of request type", |
| "$ref": "#/definitions/compound-identifier" |
| }, |
| "nullable": { |
| "description": "Flag indicating nullability of request type", |
| "type": "boolean" |
| } |
| } |
| }, |
| "attributes-list": { |
| "description": "Definition of an attribute list", |
| "type": "array", |
| "items": { |
| "description": "List of attributes", |
| "$ref": "#/definitions/attribute" |
| } |
| }, |
| "attribute": { |
| "description": "Definition of an attribute list element", |
| "type": "object", |
| "required": [ |
| "name", |
| "value" |
| ], |
| "properties": { |
| "name": { |
| "description": "Attribute name", |
| "type": "string" |
| }, |
| "value": { |
| "description": "Attribute value", |
| "type": "string" |
| } |
| } |
| }, |
| "primitive-type": { |
| "description": "Definition of primitive type", |
| "type": "object", |
| "required": [ |
| "kind", |
| "subtype" |
| ], |
| "properties": { |
| "kind": { |
| "description": "Selection of base type as primitive type", |
| "type": "string", |
| "enum": [ |
| "primitive" |
| ] |
| }, |
| "subtype": { |
| "description": "Sub-type of the primitive type", |
| "$ref": "#/definitions/primitive-subtype" |
| } |
| } |
| }, |
| "identifier-type": { |
| "description": "Definition of an identifier type", |
| "type": "object", |
| "required": [ |
| "kind", |
| "identifier", |
| "nullable" |
| ], |
| "properties": { |
| "kind": { |
| "description": "Selection of base type as identifier type", |
| "type": "string", |
| "enum": [ |
| "identifier" |
| ] |
| }, |
| "identifier": { |
| "description": "Identifier type name", |
| "$ref": "#/definitions/compound-identifier" |
| }, |
| "nullable": { |
| "description": "Flag indicating nullability of identifier type", |
| "type": "boolean" |
| } |
| } |
| }, |
| "constant": { |
| "description": "Definition of a constant value", |
| "oneOf": [ |
| { |
| "description": "Selection of a constant value (using an identifier)", |
| "$ref": "#/definitions/identifier-constant" |
| }, |
| { |
| "description": "Selection of a constant value (using a literal)", |
| "$ref": "#/definitions/literal-constant" |
| }, |
| { |
| "description": "Selection of a constant value (using a binary operator)", |
| "$ref": "#/definitions/binary-operator-constant" |
| } |
| ] |
| }, |
| "identifier-constant": { |
| "description": "Definition of a constant value (using an identifier)", |
| "type": "object", |
| "required": [ |
| "kind", |
| "identifier", |
| "value", |
| "expression" |
| ], |
| "properties": { |
| "kind": { |
| "description": "Selection of constant value using an identifier", |
| "type": "string", |
| "enum": [ |
| "identifier" |
| ] |
| }, |
| "identifier": { |
| "description": "Identifier used as constant value", |
| "$ref": "#/definitions/compound-identifier" |
| }, |
| "value": { |
| "description": "Evaluated value of the constant", |
| "type": "string" |
| }, |
| "expression": { |
| "description": "Expression used in source code to define the constant", |
| "type": "string" |
| } |
| } |
| }, |
| "binary-operator-constant": { |
| "description": "Definition of a constant value (using a binary operator)", |
| "type": "object", |
| "required": [ |
| "kind", |
| "value", |
| "expression" |
| ], |
| "properties": { |
| "kind": { |
| "description": "Selection of constant value using a literal", |
| "type": "string", |
| "enum": [ |
| "binary_operator" |
| ] |
| }, |
| "value": { |
| "description": "Evaluated value of the constant", |
| "type": "string" |
| }, |
| "expression": { |
| "description": "Expression used in source code to define the constant", |
| "type": "string" |
| } |
| } |
| }, |
| "literal-constant": { |
| "description": "Definition of a constant value (using a literal)", |
| "type": "object", |
| "required": [ |
| "kind", |
| "literal", |
| "value", |
| "expression" |
| ], |
| "properties": { |
| "kind": { |
| "description": "Selection of constant value using a literal", |
| "type": "string", |
| "enum": [ |
| "literal" |
| ] |
| }, |
| "literal": { |
| "description": "Literal used as constant value", |
| "$ref": "#/definitions/literal-value" |
| }, |
| "value": { |
| "description": "Evaluated value of the constant", |
| "type": "string" |
| }, |
| "expression": { |
| "description": "Expression used in source code to define the constant", |
| "type": "string" |
| } |
| } |
| }, |
| "literal-value": { |
| "description": "Definition of a literal constant value", |
| "type": "object", |
| "required": [ |
| "kind", |
| "value", |
| "expression" |
| ], |
| "properties": { |
| "kind": { |
| "description": "Selection of string literal type", |
| "type": "string", |
| "enum": [ |
| "string", |
| "numeric", |
| "true", |
| "false" |
| ] |
| }, |
| "value": { |
| "description": "Resolved constant value", |
| "type": "string" |
| }, |
| "expression": { |
| "description": "Original in source constant value, may be a const expression.", |
| "type": "string" |
| } |
| } |
| }, |
| "location": { |
| "type": "object", |
| "required": [ |
| "filename", |
| "line", |
| "column", |
| "length" |
| ], |
| "properties": { |
| "filename": { |
| "type": "string" |
| }, |
| "line": { |
| "type": "integer", |
| "minimum": 1, |
| "maximum": 4294967295 |
| }, |
| "column": { |
| "type": "integer", |
| "minimum": 1, |
| "maximum": 4294967295 |
| }, |
| "length": { |
| "type": "integer", |
| "minimum": 0, |
| "maximum": 4294967295 |
| } |
| } |
| }, |
| "handle-subtype": { |
| "description": "Definition of handle sub-type", |
| "type": "string", |
| "enum": [ |
| "handle", |
| "bti", |
| "channel", |
| "clock", |
| "debuglog", |
| "event", |
| "eventpair", |
| "exception", |
| "fifo", |
| "guest", |
| "interrupt", |
| "iommu", |
| "job", |
| "pager", |
| "pcidevice", |
| "pmt", |
| "port", |
| "process", |
| "profile", |
| "resource", |
| "socket", |
| "stream", |
| "suspendtoken", |
| "thread", |
| "timer", |
| "vcpu", |
| "vmar", |
| "vmo" |
| ] |
| }, |
| "primitive-subtype": { |
| "description": "Definition of primitive sub-type", |
| "oneOf": [ |
| { |
| "description": "Selection of non-integer primitive sub-type", |
| "type": "string", |
| "enum": [ |
| "bool", |
| "float32", |
| "float64" |
| ] |
| }, |
| { |
| "description": "Selection of integer primitive sub-type", |
| "$ref": "#/definitions/integer-type" |
| } |
| ] |
| }, |
| "integer-type": { |
| "description": "Definition of integer primitive sub-type", |
| "type": "string", |
| "enum": [ |
| "int8", |
| "int16", |
| "int32", |
| "int64", |
| "uint8", |
| "uint16", |
| "uint32", |
| "uint64" |
| ] |
| }, |
| "ordinal": { |
| "description": "Definition of ordinal", |
| "type": "integer", |
| "minimum": 1, |
| "maximum": 9223372036854775807 |
| }, |
| "count": { |
| "description": "Definition of count", |
| "type": "integer", |
| "minimum": 0, |
| "maximum": 4294967295 |
| }, |
| "compound-identifier": { |
| "description": "Definition of compound identifier", |
| "type": "string", |
| "pattern": "([_A-Za-z][_A-Za-z0-9]*-)*[_A-Za-z][_A-Za-z0-9]*/[_A-Za-z][_A-Za-z0-9]*" |
| }, |
| "identifier": { |
| "description": "Definition of identifier", |
| "type": "string", |
| "pattern": "^[A-Za-z]([_A-Za-z0-9]*[A-Za-z0-9])?$" |
| }, |
| "library-identifier": { |
| "description": "Definition of library identifier", |
| "type": "string", |
| "pattern": "^[a-z][a-z0-9]*(\\.[a-z][a-z0-9]*)*$" |
| }, |
| "version": { |
| "description": "Definition of version regex", |
| "type": "string", |
| "pattern": "^[0-9]+\\.[0-9]+\\.[0-9]+$" |
| } |
| }, |
| "additionalProperties": false |
| } |