From dddb3d37958210c753eb98873830be01f6bbc78b Mon Sep 17 00:00:00 2001 From: Pavel Bodiachevskii Date: Fri, 22 Mar 2024 14:50:05 +0400 Subject: [PATCH] fix: AsyncAPI v3 shows warning in Studio and IntelliJ plugin when referencing a json schema New multiFormatSchema validation rules https://github.com/asyncapi/spec-json-schemas/issues/494 https://github.com/asyncapi/jasyncapi-idea-plugin/issues/49 --- definitions/3.0.0/anySchema.json | 138 +++- definitions/3.0.0/multiFormatSchema.json | 194 ----- schemas/3.0.0-without-$id.json | 940 +++++++++++----------- schemas/3.0.0.json | 945 +++++++++++------------ 4 files changed, 999 insertions(+), 1218 deletions(-) delete mode 100644 definitions/3.0.0/multiFormatSchema.json diff --git a/definitions/3.0.0/anySchema.json b/definitions/3.0.0/anySchema.json index 4a0bf239..0a7d387d 100644 --- a/definitions/3.0.0/anySchema.json +++ b/definitions/3.0.0/anySchema.json @@ -1,16 +1,132 @@ { - "if": { - "required": [ - "schema" - ] - }, - "then": { - "$ref": "http://asyncapi.com/definitions/3.0.0/multiFormatSchema.json" - }, - "else": { - "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" - }, "description": "An object representing either a schema or a multiFormatSchema based on the existence of the 'schema' property. If the property 'schema' is present, use the multi-format schema. Use the default AsyncAPI Schema otherwise.", + "type": "object", + "anyOf": [ + { + "type": "object", + "description": "AsyncAPI Schema", + "not": { + "required": ["schemaFormat", "schema"] + }, + "additionalProperties": false, + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" + }, + { + "type": "object", + "description": "Multi format schema: Avro Schema", + "required": ["schemaFormat", "schema"], + "not": {"required": ["$ref"]}, + "additionalProperties": false, + "properties": { + "schemaFormat": { + "type": "string", + "enum": [ + "application/vnd.apache.avro;version=1.9.0", + "application/vnd.apache.avro+json;version=1.9.0", + "application/vnd.apache.avro+yaml;version=1.9.0" + ] + }, + "schema": { + "if": { + "not": {"$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json"} + }, + "then": { + "$ref": "http://asyncapi.com/definitions/3.0.0/avroSchema_v1.json" + }, + "else": { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + } + } + } + }, + { + "type": "object", + "description": "Multi format schema: OpenAPI Schema", + "required": ["schemaFormat", "schema"], + "not": {"required": ["$ref"]}, + "additionalProperties": false, + "properties": { + "schemaFormat": { + "type": "string", + "enum": [ + "application/vnd.oai.openapi;version=3.0.0", + "application/vnd.oai.openapi+json;version=3.0.0", + "application/vnd.oai.openapi+yaml;version=3.0.0" + ] + }, + "schema": { + "anyOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/openapiSchema_3_0.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + } + ] + } + } + }, + { + "type": "object", + "description": "Multi format schema: Json Schema", + "required": ["schemaFormat", "schema"], + "not": {"required": ["$ref"]}, + "additionalProperties": false, + "properties": { + "schemaFormat": { + "type": "string", + "enum": [ + "application/schema+json;version=draft-07", + "application/schema+yaml;version=draft-07" + ] + }, + "schema": { + "$ref": "http://json-schema.org/draft-07/schema" + } + } + }, + { + "type": "object", + "description": "Multi format schema: AsyncAPI Schema", + "required": ["schemaFormat", "schema"], + "not": {"required": ["$ref"]}, + "additionalProperties": false, + "properties": { + "schemaFormat": { + "type": "string", + "enum": [ + "application/vnd.aai.asyncapi;version=2.0.0", + "application/vnd.aai.asyncapi+json;version=2.0.0", + "application/vnd.aai.asyncapi+yaml;version=2.0.0", + "application/vnd.aai.asyncapi;version=2.1.0", + "application/vnd.aai.asyncapi+json;version=2.1.0", + "application/vnd.aai.asyncapi+yaml;version=2.1.0", + "application/vnd.aai.asyncapi;version=2.2.0", + "application/vnd.aai.asyncapi+json;version=2.2.0", + "application/vnd.aai.asyncapi+yaml;version=2.2.0", + "application/vnd.aai.asyncapi;version=2.3.0", + "application/vnd.aai.asyncapi+json;version=2.3.0", + "application/vnd.aai.asyncapi+yaml;version=2.3.0", + "application/vnd.aai.asyncapi;version=2.4.0", + "application/vnd.aai.asyncapi+json;version=2.4.0", + "application/vnd.aai.asyncapi+yaml;version=2.4.0", + "application/vnd.aai.asyncapi;version=2.5.0", + "application/vnd.aai.asyncapi+json;version=2.5.0", + "application/vnd.aai.asyncapi+yaml;version=2.5.0", + "application/vnd.aai.asyncapi;version=2.6.0", + "application/vnd.aai.asyncapi+json;version=2.6.0", + "application/vnd.aai.asyncapi+yaml;version=2.6.0", + "application/vnd.aai.asyncapi;version=3.0.0", + "application/vnd.aai.asyncapi+json;version=3.0.0", + "application/vnd.aai.asyncapi+yaml;version=3.0.0" + ] + }, + "schema": { + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" + } + } + } + ], "$schema": "http://json-schema.org/draft-07/schema#", "$id": "http://asyncapi.com/definitions/3.0.0/anySchema.json" } diff --git a/definitions/3.0.0/multiFormatSchema.json b/definitions/3.0.0/multiFormatSchema.json deleted file mode 100644 index 0a5a8051..00000000 --- a/definitions/3.0.0/multiFormatSchema.json +++ /dev/null @@ -1,194 +0,0 @@ -{ - "description": "The Multi Format Schema Object represents a schema definition. It differs from the Schema Object in that it supports multiple schema formats or languages (e.g., JSON Schema, Avro, etc.).", - "if": { - "not": { - "type": "object" - } - }, - "then": { - "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" - }, - "else": { - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" - } - }, - "properties": { - "schemaFormat": { - "description": "A string containing the name of the schema format that is used to define the information. If schemaFormat is missing, it MUST default to application/vnd.aai.asyncapi+json;version={{asyncapi}} where {{asyncapi}} matches the AsyncAPI Version String. In such a case, this would make the Multi Format Schema Object equivalent to the Schema Object. When using Reference Object within the schema, the schemaFormat of the resource being referenced MUST match the schemaFormat of the schema that contains the initial reference. For example, if you reference Avro schema, then schemaFormat of referencing resource and the resource being reference MUST match.", - "anyOf": [ - { - "type": "string" - }, - { - "description": "All the schema formats tooling MUST support", - "enum": [ - "application/schema+json;version=draft-07", - "application/schema+yaml;version=draft-07", - - "application/vnd.aai.asyncapi;version=3.0.0", - "application/vnd.aai.asyncapi+json;version=3.0.0", - "application/vnd.aai.asyncapi+yaml;version=3.0.0" - ] - }, - { - "description": "All the schema formats tools are RECOMMENDED to support", - "enum": [ - "application/vnd.oai.openapi;version=3.0.0", - "application/vnd.oai.openapi+json;version=3.0.0", - "application/vnd.oai.openapi+yaml;version=3.0.0", - - "application/vnd.apache.avro;version=1.9.0", - "application/vnd.apache.avro+json;version=1.9.0", - "application/vnd.apache.avro+yaml;version=1.9.0", - - "application/raml+yaml;version=1.0" - ] - } - ] - }, - "schema": { - "description": "Definition of the message payload. It can be of any type but defaults to Schema Object. It MUST match the schema format defined in schemaFormat, including the encoding type. E.g., Avro should be inlined as either a YAML or JSON object instead of as a string to be parsed as YAML or JSON. Non-JSON-based schemas (e.g., Protobuf or XSD) MUST be inlined as a string." - } - }, - "oneOf": [ - { - "type": "object", - "not": { - "required": ["schemaFormat"] - }, - "required": ["$ref"], - "properties": { - "schema": { - "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" - } - } - }, - { - "type": "object", - "required": ["schemaFormat"], - "properties": { - "schemaFormat": { - "enum": [ - "application/vnd.aai.asyncapi;version=2.0.0", - "application/vnd.aai.asyncapi+json;version=2.0.0", - "application/vnd.aai.asyncapi+yaml;version=2.0.0", - "application/vnd.aai.asyncapi;version=2.1.0", - "application/vnd.aai.asyncapi+json;version=2.1.0", - "application/vnd.aai.asyncapi+yaml;version=2.1.0", - "application/vnd.aai.asyncapi;version=2.2.0", - "application/vnd.aai.asyncapi+json;version=2.2.0", - "application/vnd.aai.asyncapi+yaml;version=2.2.0", - "application/vnd.aai.asyncapi;version=2.3.0", - "application/vnd.aai.asyncapi+json;version=2.3.0", - "application/vnd.aai.asyncapi+yaml;version=2.3.0", - "application/vnd.aai.asyncapi;version=2.4.0", - "application/vnd.aai.asyncapi+json;version=2.4.0", - "application/vnd.aai.asyncapi+yaml;version=2.4.0", - "application/vnd.aai.asyncapi;version=2.5.0", - "application/vnd.aai.asyncapi+json;version=2.5.0", - "application/vnd.aai.asyncapi+yaml;version=2.5.0", - "application/vnd.aai.asyncapi;version=2.6.0", - "application/vnd.aai.asyncapi+json;version=2.6.0", - "application/vnd.aai.asyncapi+yaml;version=2.6.0", - "application/vnd.aai.asyncapi;version=3.0.0", - "application/vnd.aai.asyncapi+json;version=3.0.0", - "application/vnd.aai.asyncapi+yaml;version=3.0.0" - ] - }, - "schema": { - "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" - } - } - }, - { - "type": "object", - "required": ["schemaFormat"], - "properties": { - "schemaFormat": { - "enum": [ - "application/schema+json;version=draft-07", - "application/schema+yaml;version=draft-07" - ] - }, - "schema": { - "$ref": "http://json-schema.org/draft-07/schema" - } - } - }, - { - "type": "object", - "required": ["schemaFormat"], - "properties": { - "schemaFormat": { - "enum": [ - "application/vnd.oai.openapi;version=3.0.0", - "application/vnd.oai.openapi+json;version=3.0.0", - "application/vnd.oai.openapi+yaml;version=3.0.0" - ] - }, - "schema": { - "not": {"required": ["$ref"]}, - "$ref": "http://asyncapi.com/definitions/3.0.0/openapiSchema_3_0.json" - } - } - }, - { - "type": "object", - "required": ["schemaFormat", "schema"], - "properties": { - "schemaFormat": { - "enum": [ - "application/vnd.oai.openapi;version=3.0.0", - "application/vnd.oai.openapi+json;version=3.0.0", - "application/vnd.oai.openapi+yaml;version=3.0.0" - ] - }, - "schema": { - "required": ["$ref"], - "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" - } - } - }, - { - "type": "object", - "required": ["schemaFormat"], - "properties": { - "schemaFormat": { - "enum": [ - "application/vnd.apache.avro;version=1.9.0", - "application/vnd.apache.avro+json;version=1.9.0", - "application/vnd.apache.avro+yaml;version=1.9.0" - ] - }, - "schema": { - "not": {"required": ["$ref"]}, - "$ref": "http://asyncapi.com/definitions/3.0.0/avroSchema_v1.json" - } - } - }, - { - "type": "object", - "required": ["schemaFormat", "schema"], - "properties": { - "schemaFormat": { - "enum": [ - "application/vnd.apache.avro;version=1.9.0", - "application/vnd.apache.avro+json;version=1.9.0", - "application/vnd.apache.avro+yaml;version=1.9.0" - ] - }, - "schema": { - "required": ["$ref"], - "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" - } - } - } - ] - }, - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "http://asyncapi.com/definitions/3.0.0/multiFormatSchema.json" -} \ No newline at end of file diff --git a/schemas/3.0.0-without-$id.json b/schemas/3.0.0-without-$id.json index 5769341d..e9934f15 100644 --- a/schemas/3.0.0-without-$id.json +++ b/schemas/3.0.0-without-$id.json @@ -2686,550 +2686,194 @@ ] }, "anySchema": { - "if": { - "required": [ - "schema" - ] - }, - "then": { - "$ref": "#/definitions/multiFormatSchema" - }, - "else": { - "$ref": "#/definitions/schema" - }, - "description": "An object representing either a schema or a multiFormatSchema based on the existence of the 'schema' property. If the property 'schema' is present, use the multi-format schema. Use the default AsyncAPI Schema otherwise." - }, - "multiFormatSchema": { - "description": "The Multi Format Schema Object represents a schema definition. It differs from the Schema Object in that it supports multiple schema formats or languages (e.g., JSON Schema, Avro, etc.).", - "if": { - "not": { - "type": "object" - } - }, - "then": { - "$ref": "#/definitions/schema" - }, - "else": { - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "properties": { - "schemaFormat": { - "description": "A string containing the name of the schema format that is used to define the information. If schemaFormat is missing, it MUST default to application/vnd.aai.asyncapi+json;version={{asyncapi}} where {{asyncapi}} matches the AsyncAPI Version String. In such a case, this would make the Multi Format Schema Object equivalent to the Schema Object. When using Reference Object within the schema, the schemaFormat of the resource being referenced MUST match the schemaFormat of the schema that contains the initial reference. For example, if you reference Avro schema, then schemaFormat of referencing resource and the resource being reference MUST match.", - "anyOf": [ - { - "type": "string" - }, - { - "description": "All the schema formats tooling MUST support", - "enum": [ - "application/schema+json;version=draft-07", - "application/schema+yaml;version=draft-07", - "application/vnd.aai.asyncapi;version=3.0.0", - "application/vnd.aai.asyncapi+json;version=3.0.0", - "application/vnd.aai.asyncapi+yaml;version=3.0.0" - ] - }, - { - "description": "All the schema formats tools are RECOMMENDED to support", - "enum": [ - "application/vnd.oai.openapi;version=3.0.0", - "application/vnd.oai.openapi+json;version=3.0.0", - "application/vnd.oai.openapi+yaml;version=3.0.0", - "application/vnd.apache.avro;version=1.9.0", - "application/vnd.apache.avro+json;version=1.9.0", - "application/vnd.apache.avro+yaml;version=1.9.0", - "application/raml+yaml;version=1.0" - ] - } + "description": "An object representing either a schema or a multiFormatSchema based on the existence of the 'schema' property. If the property 'schema' is present, use the multi-format schema. Use the default AsyncAPI Schema otherwise.", + "type": "object", + "anyOf": [ + { + "type": "object", + "description": "AsyncAPI Schema", + "not": { + "required": [ + "schemaFormat", + "schema" ] }, - "schema": { - "description": "Definition of the message payload. It can be of any type but defaults to Schema Object. It MUST match the schema format defined in schemaFormat, including the encoding type. E.g., Avro should be inlined as either a YAML or JSON object instead of as a string to be parsed as YAML or JSON. Non-JSON-based schemas (e.g., Protobuf or XSD) MUST be inlined as a string." - } + "additionalProperties": false, + "$ref": "#/definitions/schema" }, - "oneOf": [ - { - "type": "object", - "not": { - "required": [ - "schemaFormat" - ] - }, + { + "type": "object", + "description": "Multi format schema: Avro Schema", + "required": [ + "schemaFormat", + "schema" + ], + "not": { "required": [ "$ref" - ], - "properties": { - "schema": { - "$ref": "#/definitions/Reference" - } - } - }, - { - "type": "object", - "required": [ - "schemaFormat" - ], - "properties": { - "schemaFormat": { - "enum": [ - "application/vnd.aai.asyncapi;version=2.0.0", - "application/vnd.aai.asyncapi+json;version=2.0.0", - "application/vnd.aai.asyncapi+yaml;version=2.0.0", - "application/vnd.aai.asyncapi;version=2.1.0", - "application/vnd.aai.asyncapi+json;version=2.1.0", - "application/vnd.aai.asyncapi+yaml;version=2.1.0", - "application/vnd.aai.asyncapi;version=2.2.0", - "application/vnd.aai.asyncapi+json;version=2.2.0", - "application/vnd.aai.asyncapi+yaml;version=2.2.0", - "application/vnd.aai.asyncapi;version=2.3.0", - "application/vnd.aai.asyncapi+json;version=2.3.0", - "application/vnd.aai.asyncapi+yaml;version=2.3.0", - "application/vnd.aai.asyncapi;version=2.4.0", - "application/vnd.aai.asyncapi+json;version=2.4.0", - "application/vnd.aai.asyncapi+yaml;version=2.4.0", - "application/vnd.aai.asyncapi;version=2.5.0", - "application/vnd.aai.asyncapi+json;version=2.5.0", - "application/vnd.aai.asyncapi+yaml;version=2.5.0", - "application/vnd.aai.asyncapi;version=2.6.0", - "application/vnd.aai.asyncapi+json;version=2.6.0", - "application/vnd.aai.asyncapi+yaml;version=2.6.0", - "application/vnd.aai.asyncapi;version=3.0.0", - "application/vnd.aai.asyncapi+json;version=3.0.0", - "application/vnd.aai.asyncapi+yaml;version=3.0.0" - ] - }, - "schema": { - "$ref": "#/definitions/schema" - } - } - }, - { - "type": "object", - "required": [ - "schemaFormat" - ], - "properties": { - "schemaFormat": { - "enum": [ - "application/schema+json;version=draft-07", - "application/schema+yaml;version=draft-07" - ] - }, - "schema": { - "$ref": "#/definitions/json-schema-draft-07-schema" - } - } + ] }, - { - "type": "object", - "required": [ - "schemaFormat" - ], - "properties": { - "schemaFormat": { - "enum": [ - "application/vnd.oai.openapi;version=3.0.0", - "application/vnd.oai.openapi+json;version=3.0.0", - "application/vnd.oai.openapi+yaml;version=3.0.0" - ] - }, - "schema": { + "additionalProperties": false, + "properties": { + "schemaFormat": { + "type": "string", + "enum": [ + "application/vnd.apache.avro;version=1.9.0", + "application/vnd.apache.avro+json;version=1.9.0", + "application/vnd.apache.avro+yaml;version=1.9.0" + ] + }, + "schema": { + "if": { "not": { - "required": [ - "$ref" - ] - }, - "$ref": "#/definitions/openapiSchema_3_0" - } - } - }, - { - "type": "object", - "required": [ - "schemaFormat", - "schema" - ], - "properties": { - "schemaFormat": { - "enum": [ - "application/vnd.oai.openapi;version=3.0.0", - "application/vnd.oai.openapi+json;version=3.0.0", - "application/vnd.oai.openapi+yaml;version=3.0.0" - ] - }, - "schema": { - "required": [ - "$ref" - ], - "$ref": "#/definitions/Reference" - } - } - }, - { - "type": "object", - "required": [ - "schemaFormat" - ], - "properties": { - "schemaFormat": { - "enum": [ - "application/vnd.apache.avro;version=1.9.0", - "application/vnd.apache.avro+json;version=1.9.0", - "application/vnd.apache.avro+yaml;version=1.9.0" - ] + "$ref": "#/definitions/Reference" + } }, - "schema": { - "not": { - "required": [ - "$ref" - ] - }, + "then": { "$ref": "#/definitions/avroSchema_v1" - } - } - }, - { - "type": "object", - "required": [ - "schemaFormat", - "schema" - ], - "properties": { - "schemaFormat": { - "enum": [ - "application/vnd.apache.avro;version=1.9.0", - "application/vnd.apache.avro+json;version=1.9.0", - "application/vnd.apache.avro+yaml;version=1.9.0" - ] }, - "schema": { - "required": [ - "$ref" - ], + "else": { "$ref": "#/definitions/Reference" } } } - ] - } - }, - "openapiSchema_3_0": { - "type": "object", - "definitions": { - "ExternalDocumentation": { + }, + { "type": "object", + "description": "Multi format schema: OpenAPI Schema", "required": [ - "url" + "schemaFormat", + "schema" ], + "not": { + "required": [ + "$ref" + ] + }, + "additionalProperties": false, "properties": { - "description": { - "type": "string" - }, - "url": { + "schemaFormat": { "type": "string", - "format": "uri-reference" + "enum": [ + "application/vnd.oai.openapi;version=3.0.0", + "application/vnd.oai.openapi+json;version=3.0.0", + "application/vnd.oai.openapi+yaml;version=3.0.0" + ] + }, + "schema": { + "anyOf": [ + { + "$ref": "#/definitions/openapiSchema_3_0" + }, + { + "$ref": "#/definitions/Reference" + } + ] } - }, - "patternProperties": { - "^x-": {} - }, - "additionalProperties": false + } }, - "Discriminator": { + { "type": "object", + "description": "Multi format schema: Json Schema", "required": [ - "propertyName" + "schemaFormat", + "schema" ], + "not": { + "required": [ + "$ref" + ] + }, + "additionalProperties": false, "properties": { - "propertyName": { - "type": "string" + "schemaFormat": { + "type": "string", + "enum": [ + "application/schema+json;version=draft-07", + "application/schema+yaml;version=draft-07" + ] }, - "mapping": { - "type": "object", - "additionalProperties": { - "type": "string" - } + "schema": { + "$ref": "#/definitions/json-schema-draft-07-schema" } } }, - "Reference": { + { "type": "object", + "description": "Multi format schema: AsyncAPI Schema", "required": [ - "$ref" + "schemaFormat", + "schema" ], - "patternProperties": { - "^\\$ref$": { + "not": { + "required": [ + "$ref" + ] + }, + "additionalProperties": false, + "properties": { + "schemaFormat": { "type": "string", - "format": "uri-reference" + "enum": [ + "application/vnd.aai.asyncapi;version=2.0.0", + "application/vnd.aai.asyncapi+json;version=2.0.0", + "application/vnd.aai.asyncapi+yaml;version=2.0.0", + "application/vnd.aai.asyncapi;version=2.1.0", + "application/vnd.aai.asyncapi+json;version=2.1.0", + "application/vnd.aai.asyncapi+yaml;version=2.1.0", + "application/vnd.aai.asyncapi;version=2.2.0", + "application/vnd.aai.asyncapi+json;version=2.2.0", + "application/vnd.aai.asyncapi+yaml;version=2.2.0", + "application/vnd.aai.asyncapi;version=2.3.0", + "application/vnd.aai.asyncapi+json;version=2.3.0", + "application/vnd.aai.asyncapi+yaml;version=2.3.0", + "application/vnd.aai.asyncapi;version=2.4.0", + "application/vnd.aai.asyncapi+json;version=2.4.0", + "application/vnd.aai.asyncapi+yaml;version=2.4.0", + "application/vnd.aai.asyncapi;version=2.5.0", + "application/vnd.aai.asyncapi+json;version=2.5.0", + "application/vnd.aai.asyncapi+yaml;version=2.5.0", + "application/vnd.aai.asyncapi;version=2.6.0", + "application/vnd.aai.asyncapi+json;version=2.6.0", + "application/vnd.aai.asyncapi+yaml;version=2.6.0", + "application/vnd.aai.asyncapi;version=3.0.0", + "application/vnd.aai.asyncapi+json;version=3.0.0", + "application/vnd.aai.asyncapi+yaml;version=3.0.0" + ] + }, + "schema": { + "$ref": "#/definitions/schema" } } + } + ] + }, + "avroSchema_v1": { + "definitions": { + "avroSchema": { + "title": "Avro Schema", + "description": "Root Schema", + "oneOf": [ + { + "$ref": "#/definitions/avroSchema_v1/definitions/types" + } + ] }, - "XML": { - "type": "object", - "properties": { - "name": { - "type": "string" + "types": { + "title": "Avro Types", + "description": "Allowed Avro types", + "oneOf": [ + { + "$ref": "#/definitions/avroSchema_v1/definitions/primitiveType" }, - "namespace": { - "type": "string", - "format": "uri" + { + "$ref": "#/definitions/avroSchema_v1/definitions/primitiveTypeWithMetadata" }, - "prefix": { - "type": "string" + { + "$ref": "#/definitions/avroSchema_v1/definitions/customTypeReference" }, - "attribute": { - "type": "boolean", - "default": false - }, - "wrapped": { - "type": "boolean", - "default": false - } - }, - "patternProperties": { - "^x-": {} - }, - "additionalProperties": false - } - }, - "properties": { - "title": { - "type": "string" - }, - "multipleOf": { - "type": "number", - "exclusiveMinimum": 0 - }, - "maximum": { - "type": "number" - }, - "exclusiveMaximum": { - "type": "boolean", - "default": false - }, - "minimum": { - "type": "number" - }, - "exclusiveMinimum": { - "type": "boolean", - "default": false - }, - "maxLength": { - "type": "integer", - "minimum": 0 - }, - "minLength": { - "type": "integer", - "minimum": 0, - "default": 0 - }, - "pattern": { - "type": "string", - "format": "regex" - }, - "maxItems": { - "type": "integer", - "minimum": 0 - }, - "minItems": { - "type": "integer", - "minimum": 0, - "default": 0 - }, - "uniqueItems": { - "type": "boolean", - "default": false - }, - "maxProperties": { - "type": "integer", - "minimum": 0 - }, - "minProperties": { - "type": "integer", - "minimum": 0, - "default": 0 - }, - "required": { - "type": "array", - "items": { - "type": "string" - }, - "minItems": 1, - "uniqueItems": true - }, - "enum": { - "type": "array", - "items": true, - "minItems": 1, - "uniqueItems": false - }, - "type": { - "type": "string", - "enum": [ - "array", - "boolean", - "integer", - "number", - "object", - "string" - ] - }, - "not": { - "oneOf": [ - { - "$ref": "#/definitions/openapiSchema_3_0" - }, - { - "$ref": "#/definitions/openapiSchema_3_0/definitions/Reference" - } - ] - }, - "allOf": { - "type": "array", - "items": { - "oneOf": [ - { - "$ref": "#/definitions/openapiSchema_3_0" - }, - { - "$ref": "#/definitions/openapiSchema_3_0/definitions/Reference" - } - ] - } - }, - "oneOf": { - "type": "array", - "items": { - "oneOf": [ - { - "$ref": "#/definitions/openapiSchema_3_0" - }, - { - "$ref": "#/definitions/openapiSchema_3_0/definitions/Reference" - } - ] - } - }, - "anyOf": { - "type": "array", - "items": { - "oneOf": [ - { - "$ref": "#/definitions/openapiSchema_3_0" - }, - { - "$ref": "#/definitions/openapiSchema_3_0/definitions/Reference" - } - ] - } - }, - "items": { - "oneOf": [ - { - "$ref": "#/definitions/openapiSchema_3_0" - }, - { - "$ref": "#/definitions/openapiSchema_3_0/definitions/Reference" - } - ] - }, - "properties": { - "type": "object", - "additionalProperties": { - "oneOf": [ - { - "$ref": "#/definitions/openapiSchema_3_0" - }, - { - "$ref": "#/definitions/openapiSchema_3_0/definitions/Reference" - } - ] - } - }, - "additionalProperties": { - "oneOf": [ - { - "$ref": "#/definitions/openapiSchema_3_0" - }, - { - "$ref": "#/definitions/openapiSchema_3_0/definitions/Reference" - }, - { - "type": "boolean" - } - ], - "default": true - }, - "description": { - "type": "string" - }, - "format": { - "type": "string" - }, - "default": true, - "nullable": { - "type": "boolean", - "default": false - }, - "discriminator": { - "$ref": "#/definitions/openapiSchema_3_0/definitions/Discriminator" - }, - "readOnly": { - "type": "boolean", - "default": false - }, - "writeOnly": { - "type": "boolean", - "default": false - }, - "example": true, - "externalDocs": { - "$ref": "#/definitions/openapiSchema_3_0/definitions/ExternalDocumentation" - }, - "deprecated": { - "type": "boolean", - "default": false - }, - "xml": { - "$ref": "#/definitions/openapiSchema_3_0/definitions/XML" - } - }, - "patternProperties": { - "^x-": true - }, - "additionalProperties": false - }, - "avroSchema_v1": { - "definitions": { - "avroSchema": { - "title": "Avro Schema", - "description": "Root Schema", - "oneOf": [ - { - "$ref": "#/definitions/avroSchema_v1/definitions/types" - } - ] - }, - "types": { - "title": "Avro Types", - "description": "Allowed Avro types", - "oneOf": [ - { - "$ref": "#/definitions/avroSchema_v1/definitions/primitiveType" - }, - { - "$ref": "#/definitions/avroSchema_v1/definitions/primitiveTypeWithMetadata" - }, - { - "$ref": "#/definitions/avroSchema_v1/definitions/customTypeReference" - }, - { - "$ref": "#/definitions/avroSchema_v1/definitions/avroRecord" + { + "$ref": "#/definitions/avroSchema_v1/definitions/avroRecord" }, { "$ref": "#/definitions/avroSchema_v1/definitions/avroEnum" @@ -3519,6 +3163,292 @@ ], "title": "Avro Schema Definition" }, + "openapiSchema_3_0": { + "type": "object", + "definitions": { + "ExternalDocumentation": { + "type": "object", + "required": [ + "url" + ], + "properties": { + "description": { + "type": "string" + }, + "url": { + "type": "string", + "format": "uri-reference" + } + }, + "patternProperties": { + "^x-": {} + }, + "additionalProperties": false + }, + "Discriminator": { + "type": "object", + "required": [ + "propertyName" + ], + "properties": { + "propertyName": { + "type": "string" + }, + "mapping": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + }, + "Reference": { + "type": "object", + "required": [ + "$ref" + ], + "patternProperties": { + "^\\$ref$": { + "type": "string", + "format": "uri-reference" + } + } + }, + "XML": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "namespace": { + "type": "string", + "format": "uri" + }, + "prefix": { + "type": "string" + }, + "attribute": { + "type": "boolean", + "default": false + }, + "wrapped": { + "type": "boolean", + "default": false + } + }, + "patternProperties": { + "^x-": {} + }, + "additionalProperties": false + } + }, + "properties": { + "title": { + "type": "string" + }, + "multipleOf": { + "type": "number", + "exclusiveMinimum": 0 + }, + "maximum": { + "type": "number" + }, + "exclusiveMaximum": { + "type": "boolean", + "default": false + }, + "minimum": { + "type": "number" + }, + "exclusiveMinimum": { + "type": "boolean", + "default": false + }, + "maxLength": { + "type": "integer", + "minimum": 0 + }, + "minLength": { + "type": "integer", + "minimum": 0, + "default": 0 + }, + "pattern": { + "type": "string", + "format": "regex" + }, + "maxItems": { + "type": "integer", + "minimum": 0 + }, + "minItems": { + "type": "integer", + "minimum": 0, + "default": 0 + }, + "uniqueItems": { + "type": "boolean", + "default": false + }, + "maxProperties": { + "type": "integer", + "minimum": 0 + }, + "minProperties": { + "type": "integer", + "minimum": 0, + "default": 0 + }, + "required": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 1, + "uniqueItems": true + }, + "enum": { + "type": "array", + "items": true, + "minItems": 1, + "uniqueItems": false + }, + "type": { + "type": "string", + "enum": [ + "array", + "boolean", + "integer", + "number", + "object", + "string" + ] + }, + "not": { + "oneOf": [ + { + "$ref": "#/definitions/openapiSchema_3_0" + }, + { + "$ref": "#/definitions/openapiSchema_3_0/definitions/Reference" + } + ] + }, + "allOf": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/definitions/openapiSchema_3_0" + }, + { + "$ref": "#/definitions/openapiSchema_3_0/definitions/Reference" + } + ] + } + }, + "oneOf": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/definitions/openapiSchema_3_0" + }, + { + "$ref": "#/definitions/openapiSchema_3_0/definitions/Reference" + } + ] + } + }, + "anyOf": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/definitions/openapiSchema_3_0" + }, + { + "$ref": "#/definitions/openapiSchema_3_0/definitions/Reference" + } + ] + } + }, + "items": { + "oneOf": [ + { + "$ref": "#/definitions/openapiSchema_3_0" + }, + { + "$ref": "#/definitions/openapiSchema_3_0/definitions/Reference" + } + ] + }, + "properties": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "$ref": "#/definitions/openapiSchema_3_0" + }, + { + "$ref": "#/definitions/openapiSchema_3_0/definitions/Reference" + } + ] + } + }, + "additionalProperties": { + "oneOf": [ + { + "$ref": "#/definitions/openapiSchema_3_0" + }, + { + "$ref": "#/definitions/openapiSchema_3_0/definitions/Reference" + }, + { + "type": "boolean" + } + ], + "default": true + }, + "description": { + "type": "string" + }, + "format": { + "type": "string" + }, + "default": true, + "nullable": { + "type": "boolean", + "default": false + }, + "discriminator": { + "$ref": "#/definitions/openapiSchema_3_0/definitions/Discriminator" + }, + "readOnly": { + "type": "boolean", + "default": false + }, + "writeOnly": { + "type": "boolean", + "default": false + }, + "example": true, + "externalDocs": { + "$ref": "#/definitions/openapiSchema_3_0/definitions/ExternalDocumentation" + }, + "deprecated": { + "type": "boolean", + "default": false + }, + "xml": { + "$ref": "#/definitions/openapiSchema_3_0/definitions/XML" + } + }, + "patternProperties": { + "^x-": true + }, + "additionalProperties": false + }, "correlationId": { "type": "object", "description": "An object that specifies an identifier at design time that can used for message tracing and correlation.", diff --git a/schemas/3.0.0.json b/schemas/3.0.0.json index 915cc614..7a0de46b 100644 --- a/schemas/3.0.0.json +++ b/schemas/3.0.0.json @@ -2736,553 +2736,195 @@ }, "http://asyncapi.com/definitions/3.0.0/anySchema.json": { "$id": "http://asyncapi.com/definitions/3.0.0/anySchema.json", - "if": { - "required": [ - "schema" - ] - }, - "then": { - "$ref": "http://asyncapi.com/definitions/3.0.0/multiFormatSchema.json" - }, - "else": { - "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" - }, - "description": "An object representing either a schema or a multiFormatSchema based on the existence of the 'schema' property. If the property 'schema' is present, use the multi-format schema. Use the default AsyncAPI Schema otherwise." - }, - "http://asyncapi.com/definitions/3.0.0/multiFormatSchema.json": { - "$id": "http://asyncapi.com/definitions/3.0.0/multiFormatSchema.json", - "description": "The Multi Format Schema Object represents a schema definition. It differs from the Schema Object in that it supports multiple schema formats or languages (e.g., JSON Schema, Avro, etc.).", - "if": { - "not": { - "type": "object" - } - }, - "then": { - "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" - }, - "else": { - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" - } - }, - "properties": { - "schemaFormat": { - "description": "A string containing the name of the schema format that is used to define the information. If schemaFormat is missing, it MUST default to application/vnd.aai.asyncapi+json;version={{asyncapi}} where {{asyncapi}} matches the AsyncAPI Version String. In such a case, this would make the Multi Format Schema Object equivalent to the Schema Object. When using Reference Object within the schema, the schemaFormat of the resource being referenced MUST match the schemaFormat of the schema that contains the initial reference. For example, if you reference Avro schema, then schemaFormat of referencing resource and the resource being reference MUST match.", - "anyOf": [ - { - "type": "string" - }, - { - "description": "All the schema formats tooling MUST support", - "enum": [ - "application/schema+json;version=draft-07", - "application/schema+yaml;version=draft-07", - "application/vnd.aai.asyncapi;version=3.0.0", - "application/vnd.aai.asyncapi+json;version=3.0.0", - "application/vnd.aai.asyncapi+yaml;version=3.0.0" - ] - }, - { - "description": "All the schema formats tools are RECOMMENDED to support", - "enum": [ - "application/vnd.oai.openapi;version=3.0.0", - "application/vnd.oai.openapi+json;version=3.0.0", - "application/vnd.oai.openapi+yaml;version=3.0.0", - "application/vnd.apache.avro;version=1.9.0", - "application/vnd.apache.avro+json;version=1.9.0", - "application/vnd.apache.avro+yaml;version=1.9.0", - "application/raml+yaml;version=1.0" - ] - } + "description": "An object representing either a schema or a multiFormatSchema based on the existence of the 'schema' property. If the property 'schema' is present, use the multi-format schema. Use the default AsyncAPI Schema otherwise.", + "type": "object", + "anyOf": [ + { + "type": "object", + "description": "AsyncAPI Schema", + "not": { + "required": [ + "schemaFormat", + "schema" ] }, - "schema": { - "description": "Definition of the message payload. It can be of any type but defaults to Schema Object. It MUST match the schema format defined in schemaFormat, including the encoding type. E.g., Avro should be inlined as either a YAML or JSON object instead of as a string to be parsed as YAML or JSON. Non-JSON-based schemas (e.g., Protobuf or XSD) MUST be inlined as a string." - } + "additionalProperties": false, + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" }, - "oneOf": [ - { - "type": "object", - "not": { - "required": [ - "schemaFormat" - ] - }, + { + "type": "object", + "description": "Multi format schema: Avro Schema", + "required": [ + "schemaFormat", + "schema" + ], + "not": { "required": [ "$ref" - ], - "properties": { - "schema": { - "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" - } - } - }, - { - "type": "object", - "required": [ - "schemaFormat" - ], - "properties": { - "schemaFormat": { - "enum": [ - "application/vnd.aai.asyncapi;version=2.0.0", - "application/vnd.aai.asyncapi+json;version=2.0.0", - "application/vnd.aai.asyncapi+yaml;version=2.0.0", - "application/vnd.aai.asyncapi;version=2.1.0", - "application/vnd.aai.asyncapi+json;version=2.1.0", - "application/vnd.aai.asyncapi+yaml;version=2.1.0", - "application/vnd.aai.asyncapi;version=2.2.0", - "application/vnd.aai.asyncapi+json;version=2.2.0", - "application/vnd.aai.asyncapi+yaml;version=2.2.0", - "application/vnd.aai.asyncapi;version=2.3.0", - "application/vnd.aai.asyncapi+json;version=2.3.0", - "application/vnd.aai.asyncapi+yaml;version=2.3.0", - "application/vnd.aai.asyncapi;version=2.4.0", - "application/vnd.aai.asyncapi+json;version=2.4.0", - "application/vnd.aai.asyncapi+yaml;version=2.4.0", - "application/vnd.aai.asyncapi;version=2.5.0", - "application/vnd.aai.asyncapi+json;version=2.5.0", - "application/vnd.aai.asyncapi+yaml;version=2.5.0", - "application/vnd.aai.asyncapi;version=2.6.0", - "application/vnd.aai.asyncapi+json;version=2.6.0", - "application/vnd.aai.asyncapi+yaml;version=2.6.0", - "application/vnd.aai.asyncapi;version=3.0.0", - "application/vnd.aai.asyncapi+json;version=3.0.0", - "application/vnd.aai.asyncapi+yaml;version=3.0.0" - ] - }, - "schema": { - "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" - } - } - }, - { - "type": "object", - "required": [ - "schemaFormat" - ], - "properties": { - "schemaFormat": { - "enum": [ - "application/schema+json;version=draft-07", - "application/schema+yaml;version=draft-07" - ] - }, - "schema": { - "$ref": "http://json-schema.org/draft-07/schema" - } - } + ] }, - { - "type": "object", - "required": [ - "schemaFormat" - ], - "properties": { - "schemaFormat": { - "enum": [ - "application/vnd.oai.openapi;version=3.0.0", - "application/vnd.oai.openapi+json;version=3.0.0", - "application/vnd.oai.openapi+yaml;version=3.0.0" - ] - }, - "schema": { + "additionalProperties": false, + "properties": { + "schemaFormat": { + "type": "string", + "enum": [ + "application/vnd.apache.avro;version=1.9.0", + "application/vnd.apache.avro+json;version=1.9.0", + "application/vnd.apache.avro+yaml;version=1.9.0" + ] + }, + "schema": { + "if": { "not": { - "required": [ - "$ref" - ] - }, - "$ref": "http://asyncapi.com/definitions/3.0.0/openapiSchema_3_0.json" - } - } - }, - { - "type": "object", - "required": [ - "schemaFormat", - "schema" - ], - "properties": { - "schemaFormat": { - "enum": [ - "application/vnd.oai.openapi;version=3.0.0", - "application/vnd.oai.openapi+json;version=3.0.0", - "application/vnd.oai.openapi+yaml;version=3.0.0" - ] - }, - "schema": { - "required": [ - "$ref" - ], - "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" - } - } - }, - { - "type": "object", - "required": [ - "schemaFormat" - ], - "properties": { - "schemaFormat": { - "enum": [ - "application/vnd.apache.avro;version=1.9.0", - "application/vnd.apache.avro+json;version=1.9.0", - "application/vnd.apache.avro+yaml;version=1.9.0" - ] + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + } }, - "schema": { - "not": { - "required": [ - "$ref" - ] - }, + "then": { "$ref": "http://asyncapi.com/definitions/3.0.0/avroSchema_v1.json" - } - } - }, - { - "type": "object", - "required": [ - "schemaFormat", - "schema" - ], - "properties": { - "schemaFormat": { - "enum": [ - "application/vnd.apache.avro;version=1.9.0", - "application/vnd.apache.avro+json;version=1.9.0", - "application/vnd.apache.avro+yaml;version=1.9.0" - ] }, - "schema": { - "required": [ - "$ref" - ], + "else": { "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" } } } - ] - } - }, - "http://asyncapi.com/definitions/3.0.0/openapiSchema_3_0.json": { - "$id": "http://asyncapi.com/definitions/3.0.0/openapiSchema_3_0.json", - "type": "object", - "definitions": { - "ExternalDocumentation": { + }, + { "type": "object", + "description": "Multi format schema: OpenAPI Schema", "required": [ - "url" + "schemaFormat", + "schema" ], + "not": { + "required": [ + "$ref" + ] + }, + "additionalProperties": false, "properties": { - "description": { - "type": "string" - }, - "url": { + "schemaFormat": { "type": "string", - "format": "uri-reference" + "enum": [ + "application/vnd.oai.openapi;version=3.0.0", + "application/vnd.oai.openapi+json;version=3.0.0", + "application/vnd.oai.openapi+yaml;version=3.0.0" + ] + }, + "schema": { + "anyOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/openapiSchema_3_0.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + } + ] } - }, - "patternProperties": { - "^x-": {} - }, - "additionalProperties": false + } }, - "Discriminator": { + { "type": "object", + "description": "Multi format schema: Json Schema", "required": [ - "propertyName" + "schemaFormat", + "schema" ], + "not": { + "required": [ + "$ref" + ] + }, + "additionalProperties": false, "properties": { - "propertyName": { - "type": "string" + "schemaFormat": { + "type": "string", + "enum": [ + "application/schema+json;version=draft-07", + "application/schema+yaml;version=draft-07" + ] }, - "mapping": { - "type": "object", - "additionalProperties": { - "type": "string" - } + "schema": { + "$ref": "http://json-schema.org/draft-07/schema" } } }, - "Reference": { + { "type": "object", + "description": "Multi format schema: AsyncAPI Schema", "required": [ - "$ref" + "schemaFormat", + "schema" ], - "patternProperties": { - "^\\$ref$": { + "not": { + "required": [ + "$ref" + ] + }, + "additionalProperties": false, + "properties": { + "schemaFormat": { "type": "string", - "format": "uri-reference" + "enum": [ + "application/vnd.aai.asyncapi;version=2.0.0", + "application/vnd.aai.asyncapi+json;version=2.0.0", + "application/vnd.aai.asyncapi+yaml;version=2.0.0", + "application/vnd.aai.asyncapi;version=2.1.0", + "application/vnd.aai.asyncapi+json;version=2.1.0", + "application/vnd.aai.asyncapi+yaml;version=2.1.0", + "application/vnd.aai.asyncapi;version=2.2.0", + "application/vnd.aai.asyncapi+json;version=2.2.0", + "application/vnd.aai.asyncapi+yaml;version=2.2.0", + "application/vnd.aai.asyncapi;version=2.3.0", + "application/vnd.aai.asyncapi+json;version=2.3.0", + "application/vnd.aai.asyncapi+yaml;version=2.3.0", + "application/vnd.aai.asyncapi;version=2.4.0", + "application/vnd.aai.asyncapi+json;version=2.4.0", + "application/vnd.aai.asyncapi+yaml;version=2.4.0", + "application/vnd.aai.asyncapi;version=2.5.0", + "application/vnd.aai.asyncapi+json;version=2.5.0", + "application/vnd.aai.asyncapi+yaml;version=2.5.0", + "application/vnd.aai.asyncapi;version=2.6.0", + "application/vnd.aai.asyncapi+json;version=2.6.0", + "application/vnd.aai.asyncapi+yaml;version=2.6.0", + "application/vnd.aai.asyncapi;version=3.0.0", + "application/vnd.aai.asyncapi+json;version=3.0.0", + "application/vnd.aai.asyncapi+yaml;version=3.0.0" + ] + }, + "schema": { + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" } } + } + ] + }, + "http://asyncapi.com/definitions/3.0.0/avroSchema_v1.json": { + "$id": "http://asyncapi.com/definitions/3.0.0/avroSchema_v1.json", + "definitions": { + "avroSchema": { + "title": "Avro Schema", + "description": "Root Schema", + "oneOf": [ + { + "$ref": "#/definitions/types" + } + ] }, - "XML": { - "type": "object", - "properties": { - "name": { - "type": "string" + "types": { + "title": "Avro Types", + "description": "Allowed Avro types", + "oneOf": [ + { + "$ref": "#/definitions/primitiveType" }, - "namespace": { - "type": "string", - "format": "uri" + { + "$ref": "#/definitions/primitiveTypeWithMetadata" }, - "prefix": { - "type": "string" + { + "$ref": "#/definitions/customTypeReference" }, - "attribute": { - "type": "boolean", - "default": false - }, - "wrapped": { - "type": "boolean", - "default": false - } - }, - "patternProperties": { - "^x-": {} - }, - "additionalProperties": false - } - }, - "properties": { - "title": { - "type": "string" - }, - "multipleOf": { - "type": "number", - "exclusiveMinimum": 0 - }, - "maximum": { - "type": "number" - }, - "exclusiveMaximum": { - "type": "boolean", - "default": false - }, - "minimum": { - "type": "number" - }, - "exclusiveMinimum": { - "type": "boolean", - "default": false - }, - "maxLength": { - "type": "integer", - "minimum": 0 - }, - "minLength": { - "type": "integer", - "minimum": 0, - "default": 0 - }, - "pattern": { - "type": "string", - "format": "regex" - }, - "maxItems": { - "type": "integer", - "minimum": 0 - }, - "minItems": { - "type": "integer", - "minimum": 0, - "default": 0 - }, - "uniqueItems": { - "type": "boolean", - "default": false - }, - "maxProperties": { - "type": "integer", - "minimum": 0 - }, - "minProperties": { - "type": "integer", - "minimum": 0, - "default": 0 - }, - "required": { - "type": "array", - "items": { - "type": "string" - }, - "minItems": 1, - "uniqueItems": true - }, - "enum": { - "type": "array", - "items": true, - "minItems": 1, - "uniqueItems": false - }, - "type": { - "type": "string", - "enum": [ - "array", - "boolean", - "integer", - "number", - "object", - "string" - ] - }, - "not": { - "oneOf": [ - { - "$ref": "#" - }, - { - "$ref": "#/definitions/Reference" - } - ] - }, - "allOf": { - "type": "array", - "items": { - "oneOf": [ - { - "$ref": "#" - }, - { - "$ref": "#/definitions/Reference" - } - ] - } - }, - "oneOf": { - "type": "array", - "items": { - "oneOf": [ - { - "$ref": "#" - }, - { - "$ref": "#/definitions/Reference" - } - ] - } - }, - "anyOf": { - "type": "array", - "items": { - "oneOf": [ - { - "$ref": "#" - }, - { - "$ref": "#/definitions/Reference" - } - ] - } - }, - "items": { - "oneOf": [ - { - "$ref": "#" - }, - { - "$ref": "#/definitions/Reference" - } - ] - }, - "properties": { - "type": "object", - "additionalProperties": { - "oneOf": [ - { - "$ref": "#" - }, - { - "$ref": "#/definitions/Reference" - } - ] - } - }, - "additionalProperties": { - "oneOf": [ - { - "$ref": "#" - }, - { - "$ref": "#/definitions/Reference" - }, - { - "type": "boolean" - } - ], - "default": true - }, - "description": { - "type": "string" - }, - "format": { - "type": "string" - }, - "default": true, - "nullable": { - "type": "boolean", - "default": false - }, - "discriminator": { - "$ref": "#/definitions/Discriminator" - }, - "readOnly": { - "type": "boolean", - "default": false - }, - "writeOnly": { - "type": "boolean", - "default": false - }, - "example": true, - "externalDocs": { - "$ref": "#/definitions/ExternalDocumentation" - }, - "deprecated": { - "type": "boolean", - "default": false - }, - "xml": { - "$ref": "#/definitions/XML" - } - }, - "patternProperties": { - "^x-": true - }, - "additionalProperties": false - }, - "http://asyncapi.com/definitions/3.0.0/avroSchema_v1.json": { - "$id": "http://asyncapi.com/definitions/3.0.0/avroSchema_v1.json", - "definitions": { - "avroSchema": { - "title": "Avro Schema", - "description": "Root Schema", - "oneOf": [ - { - "$ref": "#/definitions/types" - } - ] - }, - "types": { - "title": "Avro Types", - "description": "Allowed Avro types", - "oneOf": [ - { - "$ref": "#/definitions/primitiveType" - }, - { - "$ref": "#/definitions/primitiveTypeWithMetadata" - }, - { - "$ref": "#/definitions/customTypeReference" - }, - { - "$ref": "#/definitions/avroRecord" + { + "$ref": "#/definitions/avroRecord" }, { "$ref": "#/definitions/avroEnum" @@ -3572,6 +3214,293 @@ ], "title": "Avro Schema Definition" }, + "http://asyncapi.com/definitions/3.0.0/openapiSchema_3_0.json": { + "$id": "http://asyncapi.com/definitions/3.0.0/openapiSchema_3_0.json", + "type": "object", + "definitions": { + "ExternalDocumentation": { + "type": "object", + "required": [ + "url" + ], + "properties": { + "description": { + "type": "string" + }, + "url": { + "type": "string", + "format": "uri-reference" + } + }, + "patternProperties": { + "^x-": {} + }, + "additionalProperties": false + }, + "Discriminator": { + "type": "object", + "required": [ + "propertyName" + ], + "properties": { + "propertyName": { + "type": "string" + }, + "mapping": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + }, + "Reference": { + "type": "object", + "required": [ + "$ref" + ], + "patternProperties": { + "^\\$ref$": { + "type": "string", + "format": "uri-reference" + } + } + }, + "XML": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "namespace": { + "type": "string", + "format": "uri" + }, + "prefix": { + "type": "string" + }, + "attribute": { + "type": "boolean", + "default": false + }, + "wrapped": { + "type": "boolean", + "default": false + } + }, + "patternProperties": { + "^x-": {} + }, + "additionalProperties": false + } + }, + "properties": { + "title": { + "type": "string" + }, + "multipleOf": { + "type": "number", + "exclusiveMinimum": 0 + }, + "maximum": { + "type": "number" + }, + "exclusiveMaximum": { + "type": "boolean", + "default": false + }, + "minimum": { + "type": "number" + }, + "exclusiveMinimum": { + "type": "boolean", + "default": false + }, + "maxLength": { + "type": "integer", + "minimum": 0 + }, + "minLength": { + "type": "integer", + "minimum": 0, + "default": 0 + }, + "pattern": { + "type": "string", + "format": "regex" + }, + "maxItems": { + "type": "integer", + "minimum": 0 + }, + "minItems": { + "type": "integer", + "minimum": 0, + "default": 0 + }, + "uniqueItems": { + "type": "boolean", + "default": false + }, + "maxProperties": { + "type": "integer", + "minimum": 0 + }, + "minProperties": { + "type": "integer", + "minimum": 0, + "default": 0 + }, + "required": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 1, + "uniqueItems": true + }, + "enum": { + "type": "array", + "items": true, + "minItems": 1, + "uniqueItems": false + }, + "type": { + "type": "string", + "enum": [ + "array", + "boolean", + "integer", + "number", + "object", + "string" + ] + }, + "not": { + "oneOf": [ + { + "$ref": "#" + }, + { + "$ref": "#/definitions/Reference" + } + ] + }, + "allOf": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#" + }, + { + "$ref": "#/definitions/Reference" + } + ] + } + }, + "oneOf": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#" + }, + { + "$ref": "#/definitions/Reference" + } + ] + } + }, + "anyOf": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#" + }, + { + "$ref": "#/definitions/Reference" + } + ] + } + }, + "items": { + "oneOf": [ + { + "$ref": "#" + }, + { + "$ref": "#/definitions/Reference" + } + ] + }, + "properties": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "$ref": "#" + }, + { + "$ref": "#/definitions/Reference" + } + ] + } + }, + "additionalProperties": { + "oneOf": [ + { + "$ref": "#" + }, + { + "$ref": "#/definitions/Reference" + }, + { + "type": "boolean" + } + ], + "default": true + }, + "description": { + "type": "string" + }, + "format": { + "type": "string" + }, + "default": true, + "nullable": { + "type": "boolean", + "default": false + }, + "discriminator": { + "$ref": "#/definitions/Discriminator" + }, + "readOnly": { + "type": "boolean", + "default": false + }, + "writeOnly": { + "type": "boolean", + "default": false + }, + "example": true, + "externalDocs": { + "$ref": "#/definitions/ExternalDocumentation" + }, + "deprecated": { + "type": "boolean", + "default": false + }, + "xml": { + "$ref": "#/definitions/XML" + } + }, + "patternProperties": { + "^x-": true + }, + "additionalProperties": false + }, "http://asyncapi.com/definitions/3.0.0/correlationId.json": { "$id": "http://asyncapi.com/definitions/3.0.0/correlationId.json", "type": "object",