diff --git a/bindings/kafka/0.4.0/message.json b/bindings/kafka/0.4.0/message.json index 173a9bad..d7d4fc61 100644 --- a/bindings/kafka/0.4.0/message.json +++ b/bindings/kafka/0.4.0/message.json @@ -19,7 +19,7 @@ "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" }, { - "$ref": "http://asyncapi.com/definitions/3.0.0/avroSchema_v1.json" + "$ref": "http://asyncapi.com/definitions/common/avroSchema_v1.json" } ], "description": "The message key." diff --git a/common/openapiSchema_3_0.json b/common/openapiSchema_3_0.json deleted file mode 100644 index a4b11b8b..00000000 --- a/common/openapiSchema_3_0.json +++ /dev/null @@ -1,288 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "$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 -} \ No newline at end of file diff --git a/definitions/2.0.0/avroSchema_v1.json b/definitions/2.0.0/avroSchema_v1.json deleted file mode 100644 index 781e66e8..00000000 --- a/definitions/2.0.0/avroSchema_v1.json +++ /dev/null @@ -1,317 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "http://asyncapi.com/definitions/2.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/avroEnum" - }, - { - "$ref": "#/definitions/avroArray" - }, - { - "$ref": "#/definitions/avroMap" - }, - { - "$ref": "#/definitions/avroFixed" - }, - { - "$ref": "#/definitions/avroUnion" - } - ] - }, - "primitiveType": { - "title": "Primitive Type", - "description": "Basic type primitives.", - "type": "string", - "enum": [ - "null", - "boolean", - "int", - "long", - "float", - "double", - "bytes", - "string" - ] - }, - "primitiveTypeWithMetadata": { - "title": "Primitive Type With Metadata", - "description": "A primitive type with metadata attached.", - "type": "object", - "properties": { - "type": { - "$ref": "#/definitions/primitiveType" - } - }, - "required": [ - "type" - ] - }, - "customTypeReference": { - "title": "Custom Type", - "description": "Reference to a ComplexType", - "not": { - "$ref": "#/definitions/primitiveType" - }, - "type": "string", - "pattern": "^[A-Za-z_][A-Za-z0-9_]*(\\.[A-Za-z_][A-Za-z0-9_]*)*$" - }, - "avroUnion": { - "title": "Union", - "description": "A Union of types", - "type": "array", - "items": { - "$ref": "#/definitions/avroSchema" - }, - "minItems": 1 - }, - "avroField": { - "title": "Field", - "description": "A field within a Record", - "type": "object", - "properties": { - "name": { - "$ref": "#/definitions/name" - }, - "type": { - "$ref": "#/definitions/types" - }, - "doc": { - "type": "string" - }, - "default": true, - "order": { - "enum": [ - "ascending", - "descending", - "ignore" - ] - }, - "aliases": { - "type": "array", - "items": { - "$ref": "#/definitions/name" - } - } - }, - "required": [ - "name", - "type" - ] - }, - "avroRecord": { - "title": "Record", - "description": "A Record", - "type": "object", - "properties": { - "type": { - "type": "string", - "const": "record" - }, - "name": { - "$ref": "#/definitions/name" - }, - "namespace": { - "$ref": "#/definitions/namespace" - }, - "doc": { - "type": "string" - }, - "aliases": { - "type": "array", - "items": { - "$ref": "#/definitions/name" - } - }, - "fields": { - "type": "array", - "items": { - "$ref": "#/definitions/avroField" - } - } - }, - "required": [ - "type", - "name", - "fields" - ] - }, - "avroEnum": { - "title": "Enum", - "description": "An enumeration", - "type": "object", - "properties": { - "type": { - "type": "string", - "const": "enum" - }, - "name": { - "$ref": "#/definitions/name" - }, - "namespace": { - "$ref": "#/definitions/namespace" - }, - "doc": { - "type": "string" - }, - "aliases": { - "type": "array", - "items": { - "$ref": "#/definitions/name" - } - }, - "symbols": { - "type": "array", - "items": { - "$ref": "#/definitions/name" - } - } - }, - "required": [ - "type", - "name", - "symbols" - ] - }, - "avroArray": { - "title": "Array", - "description": "An array", - "type": "object", - "properties": { - "type": { - "type": "string", - "const": "array" - }, - "name": { - "$ref": "#/definitions/name" - }, - "namespace": { - "$ref": "#/definitions/namespace" - }, - "doc": { - "type": "string" - }, - "aliases": { - "type": "array", - "items": { - "$ref": "#/definitions/name" - } - }, - "items": { - "$ref": "#/definitions/types" - } - }, - "required": [ - "type", - "items" - ] - }, - "avroMap": { - "title": "Map", - "description": "A map of values", - "type": "object", - "properties": { - "type": { - "type": "string", - "const": "map" - }, - "name": { - "$ref": "#/definitions/name" - }, - "namespace": { - "$ref": "#/definitions/namespace" - }, - "doc": { - "type": "string" - }, - "aliases": { - "type": "array", - "items": { - "$ref": "#/definitions/name" - } - }, - "values": { - "$ref": "#/definitions/types" - } - }, - "required": [ - "type", - "values" - ] - }, - "avroFixed": { - "title": "Fixed", - "description": "A fixed sized array of bytes", - "type": "object", - "properties": { - "type": { - "type": "string", - "const": "fixed" - }, - "name": { - "$ref": "#/definitions/name" - }, - "namespace": { - "$ref": "#/definitions/namespace" - }, - "doc": { - "type": "string" - }, - "aliases": { - "type": "array", - "items": { - "$ref": "#/definitions/name" - } - }, - "size": { - "type": "number" - } - }, - "required": [ - "type", - "name", - "size" - ] - }, - "name": { - "type": "string", - "pattern": "^[A-Za-z_][A-Za-z0-9_]*$" - }, - "namespace": { - "type": "string", - "pattern": "^([A-Za-z_][A-Za-z0-9_]*(\\.[A-Za-z_][A-Za-z0-9_]*)*)*$" - } - }, - "description": "Json-Schema definition for Avro AVSC files.", - "oneOf": [ - { - "$ref": "#/definitions/avroSchema" - } - ], - "title": "Avro Schema Definition" -} \ No newline at end of file diff --git a/definitions/2.0.0/message.json b/definitions/2.0.0/message.json index 141dcd93..66b3a946 100644 --- a/definitions/2.0.0/message.json +++ b/definitions/2.0.0/message.json @@ -200,7 +200,7 @@ "then": { "properties": { "payload": { - "$ref": "http://asyncapi.com/definitions/2.0.0/openapiSchema_3_0.json" + "$ref": "http://asyncapi.com/definitions/common/openapiSchema_3_0.json" } } } @@ -223,7 +223,7 @@ "then": { "properties": { "payload": { - "$ref": "http://asyncapi.com/definitions/2.0.0/avroSchema_v1.json" + "$ref": "http://asyncapi.com/definitions/common/avroSchema_v1.json" } } } diff --git a/definitions/2.0.0/openapiSchema_3_0.json b/definitions/2.0.0/openapiSchema_3_0.json deleted file mode 100644 index baab1749..00000000 --- a/definitions/2.0.0/openapiSchema_3_0.json +++ /dev/null @@ -1,288 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "http://asyncapi.com/definitions/2.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 -} \ No newline at end of file diff --git a/definitions/2.1.0/avroSchema_v1.json b/definitions/2.1.0/avroSchema_v1.json deleted file mode 100644 index be559eff..00000000 --- a/definitions/2.1.0/avroSchema_v1.json +++ /dev/null @@ -1,317 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "http://asyncapi.com/definitions/2.1.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/avroEnum" - }, - { - "$ref": "#/definitions/avroArray" - }, - { - "$ref": "#/definitions/avroMap" - }, - { - "$ref": "#/definitions/avroFixed" - }, - { - "$ref": "#/definitions/avroUnion" - } - ] - }, - "primitiveType": { - "title": "Primitive Type", - "description": "Basic type primitives.", - "type": "string", - "enum": [ - "null", - "boolean", - "int", - "long", - "float", - "double", - "bytes", - "string" - ] - }, - "primitiveTypeWithMetadata": { - "title": "Primitive Type With Metadata", - "description": "A primitive type with metadata attached.", - "type": "object", - "properties": { - "type": { - "$ref": "#/definitions/primitiveType" - } - }, - "required": [ - "type" - ] - }, - "customTypeReference": { - "title": "Custom Type", - "description": "Reference to a ComplexType", - "not": { - "$ref": "#/definitions/primitiveType" - }, - "type": "string", - "pattern": "^[A-Za-z_][A-Za-z0-9_]*(\\.[A-Za-z_][A-Za-z0-9_]*)*$" - }, - "avroUnion": { - "title": "Union", - "description": "A Union of types", - "type": "array", - "items": { - "$ref": "#/definitions/avroSchema" - }, - "minItems": 1 - }, - "avroField": { - "title": "Field", - "description": "A field within a Record", - "type": "object", - "properties": { - "name": { - "$ref": "#/definitions/name" - }, - "type": { - "$ref": "#/definitions/types" - }, - "doc": { - "type": "string" - }, - "default": true, - "order": { - "enum": [ - "ascending", - "descending", - "ignore" - ] - }, - "aliases": { - "type": "array", - "items": { - "$ref": "#/definitions/name" - } - } - }, - "required": [ - "name", - "type" - ] - }, - "avroRecord": { - "title": "Record", - "description": "A Record", - "type": "object", - "properties": { - "type": { - "type": "string", - "const": "record" - }, - "name": { - "$ref": "#/definitions/name" - }, - "namespace": { - "$ref": "#/definitions/namespace" - }, - "doc": { - "type": "string" - }, - "aliases": { - "type": "array", - "items": { - "$ref": "#/definitions/name" - } - }, - "fields": { - "type": "array", - "items": { - "$ref": "#/definitions/avroField" - } - } - }, - "required": [ - "type", - "name", - "fields" - ] - }, - "avroEnum": { - "title": "Enum", - "description": "An enumeration", - "type": "object", - "properties": { - "type": { - "type": "string", - "const": "enum" - }, - "name": { - "$ref": "#/definitions/name" - }, - "namespace": { - "$ref": "#/definitions/namespace" - }, - "doc": { - "type": "string" - }, - "aliases": { - "type": "array", - "items": { - "$ref": "#/definitions/name" - } - }, - "symbols": { - "type": "array", - "items": { - "$ref": "#/definitions/name" - } - } - }, - "required": [ - "type", - "name", - "symbols" - ] - }, - "avroArray": { - "title": "Array", - "description": "An array", - "type": "object", - "properties": { - "type": { - "type": "string", - "const": "array" - }, - "name": { - "$ref": "#/definitions/name" - }, - "namespace": { - "$ref": "#/definitions/namespace" - }, - "doc": { - "type": "string" - }, - "aliases": { - "type": "array", - "items": { - "$ref": "#/definitions/name" - } - }, - "items": { - "$ref": "#/definitions/types" - } - }, - "required": [ - "type", - "items" - ] - }, - "avroMap": { - "title": "Map", - "description": "A map of values", - "type": "object", - "properties": { - "type": { - "type": "string", - "const": "map" - }, - "name": { - "$ref": "#/definitions/name" - }, - "namespace": { - "$ref": "#/definitions/namespace" - }, - "doc": { - "type": "string" - }, - "aliases": { - "type": "array", - "items": { - "$ref": "#/definitions/name" - } - }, - "values": { - "$ref": "#/definitions/types" - } - }, - "required": [ - "type", - "values" - ] - }, - "avroFixed": { - "title": "Fixed", - "description": "A fixed sized array of bytes", - "type": "object", - "properties": { - "type": { - "type": "string", - "const": "fixed" - }, - "name": { - "$ref": "#/definitions/name" - }, - "namespace": { - "$ref": "#/definitions/namespace" - }, - "doc": { - "type": "string" - }, - "aliases": { - "type": "array", - "items": { - "$ref": "#/definitions/name" - } - }, - "size": { - "type": "number" - } - }, - "required": [ - "type", - "name", - "size" - ] - }, - "name": { - "type": "string", - "pattern": "^[A-Za-z_][A-Za-z0-9_]*$" - }, - "namespace": { - "type": "string", - "pattern": "^([A-Za-z_][A-Za-z0-9_]*(\\.[A-Za-z_][A-Za-z0-9_]*)*)*$" - } - }, - "description": "Json-Schema definition for Avro AVSC files.", - "oneOf": [ - { - "$ref": "#/definitions/avroSchema" - } - ], - "title": "Avro Schema Definition" -} \ No newline at end of file diff --git a/definitions/2.1.0/message.json b/definitions/2.1.0/message.json index ef9f65da..59fd06ab 100644 --- a/definitions/2.1.0/message.json +++ b/definitions/2.1.0/message.json @@ -223,7 +223,7 @@ "then": { "properties": { "payload": { - "$ref": "http://asyncapi.com/definitions/2.1.0/openapiSchema_3_0.json" + "$ref": "http://asyncapi.com/definitions/common/openapiSchema_3_0.json" } } } @@ -246,7 +246,7 @@ "then": { "properties": { "payload": { - "$ref": "http://asyncapi.com/definitions/2.1.0/avroSchema_v1.json" + "$ref": "http://asyncapi.com/definitions/common/avroSchema_v1.json" } } } diff --git a/definitions/2.2.0/avroSchema_v1.json b/definitions/2.2.0/avroSchema_v1.json deleted file mode 100644 index f5ec8a12..00000000 --- a/definitions/2.2.0/avroSchema_v1.json +++ /dev/null @@ -1,317 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "http://asyncapi.com/definitions/2.2.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/avroEnum" - }, - { - "$ref": "#/definitions/avroArray" - }, - { - "$ref": "#/definitions/avroMap" - }, - { - "$ref": "#/definitions/avroFixed" - }, - { - "$ref": "#/definitions/avroUnion" - } - ] - }, - "primitiveType": { - "title": "Primitive Type", - "description": "Basic type primitives.", - "type": "string", - "enum": [ - "null", - "boolean", - "int", - "long", - "float", - "double", - "bytes", - "string" - ] - }, - "primitiveTypeWithMetadata": { - "title": "Primitive Type With Metadata", - "description": "A primitive type with metadata attached.", - "type": "object", - "properties": { - "type": { - "$ref": "#/definitions/primitiveType" - } - }, - "required": [ - "type" - ] - }, - "customTypeReference": { - "title": "Custom Type", - "description": "Reference to a ComplexType", - "not": { - "$ref": "#/definitions/primitiveType" - }, - "type": "string", - "pattern": "^[A-Za-z_][A-Za-z0-9_]*(\\.[A-Za-z_][A-Za-z0-9_]*)*$" - }, - "avroUnion": { - "title": "Union", - "description": "A Union of types", - "type": "array", - "items": { - "$ref": "#/definitions/avroSchema" - }, - "minItems": 1 - }, - "avroField": { - "title": "Field", - "description": "A field within a Record", - "type": "object", - "properties": { - "name": { - "$ref": "#/definitions/name" - }, - "type": { - "$ref": "#/definitions/types" - }, - "doc": { - "type": "string" - }, - "default": true, - "order": { - "enum": [ - "ascending", - "descending", - "ignore" - ] - }, - "aliases": { - "type": "array", - "items": { - "$ref": "#/definitions/name" - } - } - }, - "required": [ - "name", - "type" - ] - }, - "avroRecord": { - "title": "Record", - "description": "A Record", - "type": "object", - "properties": { - "type": { - "type": "string", - "const": "record" - }, - "name": { - "$ref": "#/definitions/name" - }, - "namespace": { - "$ref": "#/definitions/namespace" - }, - "doc": { - "type": "string" - }, - "aliases": { - "type": "array", - "items": { - "$ref": "#/definitions/name" - } - }, - "fields": { - "type": "array", - "items": { - "$ref": "#/definitions/avroField" - } - } - }, - "required": [ - "type", - "name", - "fields" - ] - }, - "avroEnum": { - "title": "Enum", - "description": "An enumeration", - "type": "object", - "properties": { - "type": { - "type": "string", - "const": "enum" - }, - "name": { - "$ref": "#/definitions/name" - }, - "namespace": { - "$ref": "#/definitions/namespace" - }, - "doc": { - "type": "string" - }, - "aliases": { - "type": "array", - "items": { - "$ref": "#/definitions/name" - } - }, - "symbols": { - "type": "array", - "items": { - "$ref": "#/definitions/name" - } - } - }, - "required": [ - "type", - "name", - "symbols" - ] - }, - "avroArray": { - "title": "Array", - "description": "An array", - "type": "object", - "properties": { - "type": { - "type": "string", - "const": "array" - }, - "name": { - "$ref": "#/definitions/name" - }, - "namespace": { - "$ref": "#/definitions/namespace" - }, - "doc": { - "type": "string" - }, - "aliases": { - "type": "array", - "items": { - "$ref": "#/definitions/name" - } - }, - "items": { - "$ref": "#/definitions/types" - } - }, - "required": [ - "type", - "items" - ] - }, - "avroMap": { - "title": "Map", - "description": "A map of values", - "type": "object", - "properties": { - "type": { - "type": "string", - "const": "map" - }, - "name": { - "$ref": "#/definitions/name" - }, - "namespace": { - "$ref": "#/definitions/namespace" - }, - "doc": { - "type": "string" - }, - "aliases": { - "type": "array", - "items": { - "$ref": "#/definitions/name" - } - }, - "values": { - "$ref": "#/definitions/types" - } - }, - "required": [ - "type", - "values" - ] - }, - "avroFixed": { - "title": "Fixed", - "description": "A fixed sized array of bytes", - "type": "object", - "properties": { - "type": { - "type": "string", - "const": "fixed" - }, - "name": { - "$ref": "#/definitions/name" - }, - "namespace": { - "$ref": "#/definitions/namespace" - }, - "doc": { - "type": "string" - }, - "aliases": { - "type": "array", - "items": { - "$ref": "#/definitions/name" - } - }, - "size": { - "type": "number" - } - }, - "required": [ - "type", - "name", - "size" - ] - }, - "name": { - "type": "string", - "pattern": "^[A-Za-z_][A-Za-z0-9_]*$" - }, - "namespace": { - "type": "string", - "pattern": "^([A-Za-z_][A-Za-z0-9_]*(\\.[A-Za-z_][A-Za-z0-9_]*)*)*$" - } - }, - "description": "Json-Schema definition for Avro AVSC files.", - "oneOf": [ - { - "$ref": "#/definitions/avroSchema" - } - ], - "title": "Avro Schema Definition" -} \ No newline at end of file diff --git a/definitions/2.2.0/message.json b/definitions/2.2.0/message.json index 472a75da..706dd5b0 100644 --- a/definitions/2.2.0/message.json +++ b/definitions/2.2.0/message.json @@ -226,7 +226,7 @@ "then": { "properties": { "payload": { - "$ref": "http://asyncapi.com/definitions/2.2.0/openapiSchema_3_0.json" + "$ref": "http://asyncapi.com/definitions/common/openapiSchema_3_0.json" } } } @@ -249,7 +249,7 @@ "then": { "properties": { "payload": { - "$ref": "http://asyncapi.com/definitions/2.2.0/avroSchema_v1.json" + "$ref": "http://asyncapi.com/definitions/common/avroSchema_v1.json" } } } diff --git a/definitions/2.2.0/openapiSchema_3_0.json b/definitions/2.2.0/openapiSchema_3_0.json deleted file mode 100644 index 99963d2e..00000000 --- a/definitions/2.2.0/openapiSchema_3_0.json +++ /dev/null @@ -1,288 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "http://asyncapi.com/definitions/2.2.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 -} \ No newline at end of file diff --git a/definitions/2.3.0/avroSchema_v1.json b/definitions/2.3.0/avroSchema_v1.json deleted file mode 100644 index 93a7615d..00000000 --- a/definitions/2.3.0/avroSchema_v1.json +++ /dev/null @@ -1,317 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "http://asyncapi.com/definitions/2.3.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/avroEnum" - }, - { - "$ref": "#/definitions/avroArray" - }, - { - "$ref": "#/definitions/avroMap" - }, - { - "$ref": "#/definitions/avroFixed" - }, - { - "$ref": "#/definitions/avroUnion" - } - ] - }, - "primitiveType": { - "title": "Primitive Type", - "description": "Basic type primitives.", - "type": "string", - "enum": [ - "null", - "boolean", - "int", - "long", - "float", - "double", - "bytes", - "string" - ] - }, - "primitiveTypeWithMetadata": { - "title": "Primitive Type With Metadata", - "description": "A primitive type with metadata attached.", - "type": "object", - "properties": { - "type": { - "$ref": "#/definitions/primitiveType" - } - }, - "required": [ - "type" - ] - }, - "customTypeReference": { - "title": "Custom Type", - "description": "Reference to a ComplexType", - "not": { - "$ref": "#/definitions/primitiveType" - }, - "type": "string", - "pattern": "^[A-Za-z_][A-Za-z0-9_]*(\\.[A-Za-z_][A-Za-z0-9_]*)*$" - }, - "avroUnion": { - "title": "Union", - "description": "A Union of types", - "type": "array", - "items": { - "$ref": "#/definitions/avroSchema" - }, - "minItems": 1 - }, - "avroField": { - "title": "Field", - "description": "A field within a Record", - "type": "object", - "properties": { - "name": { - "$ref": "#/definitions/name" - }, - "type": { - "$ref": "#/definitions/types" - }, - "doc": { - "type": "string" - }, - "default": true, - "order": { - "enum": [ - "ascending", - "descending", - "ignore" - ] - }, - "aliases": { - "type": "array", - "items": { - "$ref": "#/definitions/name" - } - } - }, - "required": [ - "name", - "type" - ] - }, - "avroRecord": { - "title": "Record", - "description": "A Record", - "type": "object", - "properties": { - "type": { - "type": "string", - "const": "record" - }, - "name": { - "$ref": "#/definitions/name" - }, - "namespace": { - "$ref": "#/definitions/namespace" - }, - "doc": { - "type": "string" - }, - "aliases": { - "type": "array", - "items": { - "$ref": "#/definitions/name" - } - }, - "fields": { - "type": "array", - "items": { - "$ref": "#/definitions/avroField" - } - } - }, - "required": [ - "type", - "name", - "fields" - ] - }, - "avroEnum": { - "title": "Enum", - "description": "An enumeration", - "type": "object", - "properties": { - "type": { - "type": "string", - "const": "enum" - }, - "name": { - "$ref": "#/definitions/name" - }, - "namespace": { - "$ref": "#/definitions/namespace" - }, - "doc": { - "type": "string" - }, - "aliases": { - "type": "array", - "items": { - "$ref": "#/definitions/name" - } - }, - "symbols": { - "type": "array", - "items": { - "$ref": "#/definitions/name" - } - } - }, - "required": [ - "type", - "name", - "symbols" - ] - }, - "avroArray": { - "title": "Array", - "description": "An array", - "type": "object", - "properties": { - "type": { - "type": "string", - "const": "array" - }, - "name": { - "$ref": "#/definitions/name" - }, - "namespace": { - "$ref": "#/definitions/namespace" - }, - "doc": { - "type": "string" - }, - "aliases": { - "type": "array", - "items": { - "$ref": "#/definitions/name" - } - }, - "items": { - "$ref": "#/definitions/types" - } - }, - "required": [ - "type", - "items" - ] - }, - "avroMap": { - "title": "Map", - "description": "A map of values", - "type": "object", - "properties": { - "type": { - "type": "string", - "const": "map" - }, - "name": { - "$ref": "#/definitions/name" - }, - "namespace": { - "$ref": "#/definitions/namespace" - }, - "doc": { - "type": "string" - }, - "aliases": { - "type": "array", - "items": { - "$ref": "#/definitions/name" - } - }, - "values": { - "$ref": "#/definitions/types" - } - }, - "required": [ - "type", - "values" - ] - }, - "avroFixed": { - "title": "Fixed", - "description": "A fixed sized array of bytes", - "type": "object", - "properties": { - "type": { - "type": "string", - "const": "fixed" - }, - "name": { - "$ref": "#/definitions/name" - }, - "namespace": { - "$ref": "#/definitions/namespace" - }, - "doc": { - "type": "string" - }, - "aliases": { - "type": "array", - "items": { - "$ref": "#/definitions/name" - } - }, - "size": { - "type": "number" - } - }, - "required": [ - "type", - "name", - "size" - ] - }, - "name": { - "type": "string", - "pattern": "^[A-Za-z_][A-Za-z0-9_]*$" - }, - "namespace": { - "type": "string", - "pattern": "^([A-Za-z_][A-Za-z0-9_]*(\\.[A-Za-z_][A-Za-z0-9_]*)*)*$" - } - }, - "description": "Json-Schema definition for Avro AVSC files.", - "oneOf": [ - { - "$ref": "#/definitions/avroSchema" - } - ], - "title": "Avro Schema Definition" -} \ No newline at end of file diff --git a/definitions/2.3.0/message.json b/definitions/2.3.0/message.json index 478a66f4..bc6f1a05 100644 --- a/definitions/2.3.0/message.json +++ b/definitions/2.3.0/message.json @@ -229,7 +229,7 @@ "then": { "properties": { "payload": { - "$ref": "http://asyncapi.com/definitions/2.3.0/openapiSchema_3_0.json" + "$ref": "http://asyncapi.com/definitions/common/openapiSchema_3_0.json" } } } @@ -252,7 +252,7 @@ "then": { "properties": { "payload": { - "$ref": "http://asyncapi.com/definitions/2.3.0/avroSchema_v1.json" + "$ref": "http://asyncapi.com/definitions/common/avroSchema_v1.json" } } } diff --git a/definitions/2.3.0/openapiSchema_3_0.json b/definitions/2.3.0/openapiSchema_3_0.json deleted file mode 100644 index 15de2abc..00000000 --- a/definitions/2.3.0/openapiSchema_3_0.json +++ /dev/null @@ -1,288 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "http://asyncapi.com/definitions/2.3.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 -} \ No newline at end of file diff --git a/definitions/2.4.0/avroSchema_v1.json b/definitions/2.4.0/avroSchema_v1.json deleted file mode 100644 index 19394659..00000000 --- a/definitions/2.4.0/avroSchema_v1.json +++ /dev/null @@ -1,317 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "http://asyncapi.com/definitions/2.4.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/avroEnum" - }, - { - "$ref": "#/definitions/avroArray" - }, - { - "$ref": "#/definitions/avroMap" - }, - { - "$ref": "#/definitions/avroFixed" - }, - { - "$ref": "#/definitions/avroUnion" - } - ] - }, - "primitiveType": { - "title": "Primitive Type", - "description": "Basic type primitives.", - "type": "string", - "enum": [ - "null", - "boolean", - "int", - "long", - "float", - "double", - "bytes", - "string" - ] - }, - "primitiveTypeWithMetadata": { - "title": "Primitive Type With Metadata", - "description": "A primitive type with metadata attached.", - "type": "object", - "properties": { - "type": { - "$ref": "#/definitions/primitiveType" - } - }, - "required": [ - "type" - ] - }, - "customTypeReference": { - "title": "Custom Type", - "description": "Reference to a ComplexType", - "not": { - "$ref": "#/definitions/primitiveType" - }, - "type": "string", - "pattern": "^[A-Za-z_][A-Za-z0-9_]*(\\.[A-Za-z_][A-Za-z0-9_]*)*$" - }, - "avroUnion": { - "title": "Union", - "description": "A Union of types", - "type": "array", - "items": { - "$ref": "#/definitions/avroSchema" - }, - "minItems": 1 - }, - "avroField": { - "title": "Field", - "description": "A field within a Record", - "type": "object", - "properties": { - "name": { - "$ref": "#/definitions/name" - }, - "type": { - "$ref": "#/definitions/types" - }, - "doc": { - "type": "string" - }, - "default": true, - "order": { - "enum": [ - "ascending", - "descending", - "ignore" - ] - }, - "aliases": { - "type": "array", - "items": { - "$ref": "#/definitions/name" - } - } - }, - "required": [ - "name", - "type" - ] - }, - "avroRecord": { - "title": "Record", - "description": "A Record", - "type": "object", - "properties": { - "type": { - "type": "string", - "const": "record" - }, - "name": { - "$ref": "#/definitions/name" - }, - "namespace": { - "$ref": "#/definitions/namespace" - }, - "doc": { - "type": "string" - }, - "aliases": { - "type": "array", - "items": { - "$ref": "#/definitions/name" - } - }, - "fields": { - "type": "array", - "items": { - "$ref": "#/definitions/avroField" - } - } - }, - "required": [ - "type", - "name", - "fields" - ] - }, - "avroEnum": { - "title": "Enum", - "description": "An enumeration", - "type": "object", - "properties": { - "type": { - "type": "string", - "const": "enum" - }, - "name": { - "$ref": "#/definitions/name" - }, - "namespace": { - "$ref": "#/definitions/namespace" - }, - "doc": { - "type": "string" - }, - "aliases": { - "type": "array", - "items": { - "$ref": "#/definitions/name" - } - }, - "symbols": { - "type": "array", - "items": { - "$ref": "#/definitions/name" - } - } - }, - "required": [ - "type", - "name", - "symbols" - ] - }, - "avroArray": { - "title": "Array", - "description": "An array", - "type": "object", - "properties": { - "type": { - "type": "string", - "const": "array" - }, - "name": { - "$ref": "#/definitions/name" - }, - "namespace": { - "$ref": "#/definitions/namespace" - }, - "doc": { - "type": "string" - }, - "aliases": { - "type": "array", - "items": { - "$ref": "#/definitions/name" - } - }, - "items": { - "$ref": "#/definitions/types" - } - }, - "required": [ - "type", - "items" - ] - }, - "avroMap": { - "title": "Map", - "description": "A map of values", - "type": "object", - "properties": { - "type": { - "type": "string", - "const": "map" - }, - "name": { - "$ref": "#/definitions/name" - }, - "namespace": { - "$ref": "#/definitions/namespace" - }, - "doc": { - "type": "string" - }, - "aliases": { - "type": "array", - "items": { - "$ref": "#/definitions/name" - } - }, - "values": { - "$ref": "#/definitions/types" - } - }, - "required": [ - "type", - "values" - ] - }, - "avroFixed": { - "title": "Fixed", - "description": "A fixed sized array of bytes", - "type": "object", - "properties": { - "type": { - "type": "string", - "const": "fixed" - }, - "name": { - "$ref": "#/definitions/name" - }, - "namespace": { - "$ref": "#/definitions/namespace" - }, - "doc": { - "type": "string" - }, - "aliases": { - "type": "array", - "items": { - "$ref": "#/definitions/name" - } - }, - "size": { - "type": "number" - } - }, - "required": [ - "type", - "name", - "size" - ] - }, - "name": { - "type": "string", - "pattern": "^[A-Za-z_][A-Za-z0-9_]*$" - }, - "namespace": { - "type": "string", - "pattern": "^([A-Za-z_][A-Za-z0-9_]*(\\.[A-Za-z_][A-Za-z0-9_]*)*)*$" - } - }, - "description": "Json-Schema definition for Avro AVSC files.", - "oneOf": [ - { - "$ref": "#/definitions/avroSchema" - } - ], - "title": "Avro Schema Definition" -} \ No newline at end of file diff --git a/definitions/2.4.0/message.json b/definitions/2.4.0/message.json index 458996dc..48c8a953 100644 --- a/definitions/2.4.0/message.json +++ b/definitions/2.4.0/message.json @@ -235,7 +235,7 @@ "then": { "properties": { "payload": { - "$ref": "http://asyncapi.com/definitions/2.4.0/openapiSchema_3_0.json" + "$ref": "http://asyncapi.com/definitions/common/openapiSchema_3_0.json" } } } @@ -258,7 +258,7 @@ "then": { "properties": { "payload": { - "$ref": "http://asyncapi.com/definitions/2.4.0/avroSchema_v1.json" + "$ref": "http://asyncapi.com/definitions/common/avroSchema_v1.json" } } } diff --git a/definitions/2.4.0/openapiSchema_3_0.json b/definitions/2.4.0/openapiSchema_3_0.json deleted file mode 100644 index ef4b91f4..00000000 --- a/definitions/2.4.0/openapiSchema_3_0.json +++ /dev/null @@ -1,288 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "http://asyncapi.com/definitions/2.4.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 -} \ No newline at end of file diff --git a/definitions/2.5.0/avroSchema_v1.json b/definitions/2.5.0/avroSchema_v1.json deleted file mode 100644 index 34386294..00000000 --- a/definitions/2.5.0/avroSchema_v1.json +++ /dev/null @@ -1,317 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "http://asyncapi.com/definitions/2.5.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/avroEnum" - }, - { - "$ref": "#/definitions/avroArray" - }, - { - "$ref": "#/definitions/avroMap" - }, - { - "$ref": "#/definitions/avroFixed" - }, - { - "$ref": "#/definitions/avroUnion" - } - ] - }, - "primitiveType": { - "title": "Primitive Type", - "description": "Basic type primitives.", - "type": "string", - "enum": [ - "null", - "boolean", - "int", - "long", - "float", - "double", - "bytes", - "string" - ] - }, - "primitiveTypeWithMetadata": { - "title": "Primitive Type With Metadata", - "description": "A primitive type with metadata attached.", - "type": "object", - "properties": { - "type": { - "$ref": "#/definitions/primitiveType" - } - }, - "required": [ - "type" - ] - }, - "customTypeReference": { - "title": "Custom Type", - "description": "Reference to a ComplexType", - "not": { - "$ref": "#/definitions/primitiveType" - }, - "type": "string", - "pattern": "^[A-Za-z_][A-Za-z0-9_]*(\\.[A-Za-z_][A-Za-z0-9_]*)*$" - }, - "avroUnion": { - "title": "Union", - "description": "A Union of types", - "type": "array", - "items": { - "$ref": "#/definitions/avroSchema" - }, - "minItems": 1 - }, - "avroField": { - "title": "Field", - "description": "A field within a Record", - "type": "object", - "properties": { - "name": { - "$ref": "#/definitions/name" - }, - "type": { - "$ref": "#/definitions/types" - }, - "doc": { - "type": "string" - }, - "default": true, - "order": { - "enum": [ - "ascending", - "descending", - "ignore" - ] - }, - "aliases": { - "type": "array", - "items": { - "$ref": "#/definitions/name" - } - } - }, - "required": [ - "name", - "type" - ] - }, - "avroRecord": { - "title": "Record", - "description": "A Record", - "type": "object", - "properties": { - "type": { - "type": "string", - "const": "record" - }, - "name": { - "$ref": "#/definitions/name" - }, - "namespace": { - "$ref": "#/definitions/namespace" - }, - "doc": { - "type": "string" - }, - "aliases": { - "type": "array", - "items": { - "$ref": "#/definitions/name" - } - }, - "fields": { - "type": "array", - "items": { - "$ref": "#/definitions/avroField" - } - } - }, - "required": [ - "type", - "name", - "fields" - ] - }, - "avroEnum": { - "title": "Enum", - "description": "An enumeration", - "type": "object", - "properties": { - "type": { - "type": "string", - "const": "enum" - }, - "name": { - "$ref": "#/definitions/name" - }, - "namespace": { - "$ref": "#/definitions/namespace" - }, - "doc": { - "type": "string" - }, - "aliases": { - "type": "array", - "items": { - "$ref": "#/definitions/name" - } - }, - "symbols": { - "type": "array", - "items": { - "$ref": "#/definitions/name" - } - } - }, - "required": [ - "type", - "name", - "symbols" - ] - }, - "avroArray": { - "title": "Array", - "description": "An array", - "type": "object", - "properties": { - "type": { - "type": "string", - "const": "array" - }, - "name": { - "$ref": "#/definitions/name" - }, - "namespace": { - "$ref": "#/definitions/namespace" - }, - "doc": { - "type": "string" - }, - "aliases": { - "type": "array", - "items": { - "$ref": "#/definitions/name" - } - }, - "items": { - "$ref": "#/definitions/types" - } - }, - "required": [ - "type", - "items" - ] - }, - "avroMap": { - "title": "Map", - "description": "A map of values", - "type": "object", - "properties": { - "type": { - "type": "string", - "const": "map" - }, - "name": { - "$ref": "#/definitions/name" - }, - "namespace": { - "$ref": "#/definitions/namespace" - }, - "doc": { - "type": "string" - }, - "aliases": { - "type": "array", - "items": { - "$ref": "#/definitions/name" - } - }, - "values": { - "$ref": "#/definitions/types" - } - }, - "required": [ - "type", - "values" - ] - }, - "avroFixed": { - "title": "Fixed", - "description": "A fixed sized array of bytes", - "type": "object", - "properties": { - "type": { - "type": "string", - "const": "fixed" - }, - "name": { - "$ref": "#/definitions/name" - }, - "namespace": { - "$ref": "#/definitions/namespace" - }, - "doc": { - "type": "string" - }, - "aliases": { - "type": "array", - "items": { - "$ref": "#/definitions/name" - } - }, - "size": { - "type": "number" - } - }, - "required": [ - "type", - "name", - "size" - ] - }, - "name": { - "type": "string", - "pattern": "^[A-Za-z_][A-Za-z0-9_]*$" - }, - "namespace": { - "type": "string", - "pattern": "^([A-Za-z_][A-Za-z0-9_]*(\\.[A-Za-z_][A-Za-z0-9_]*)*)*$" - } - }, - "description": "Json-Schema definition for Avro AVSC files.", - "oneOf": [ - { - "$ref": "#/definitions/avroSchema" - } - ], - "title": "Avro Schema Definition" -} \ No newline at end of file diff --git a/definitions/2.5.0/message.json b/definitions/2.5.0/message.json index c1133928..68d534f0 100644 --- a/definitions/2.5.0/message.json +++ b/definitions/2.5.0/message.json @@ -232,7 +232,7 @@ "then": { "properties": { "payload": { - "$ref": "http://asyncapi.com/definitions/2.5.0/openapiSchema_3_0.json" + "$ref": "http://asyncapi.com/definitions/common/openapiSchema_3_0.json" } } } @@ -255,7 +255,7 @@ "then": { "properties": { "payload": { - "$ref": "http://asyncapi.com/definitions/2.5.0/avroSchema_v1.json" + "$ref": "http://asyncapi.com/definitions/common/avroSchema_v1.json" } } } diff --git a/definitions/2.5.0/openapiSchema_3_0.json b/definitions/2.5.0/openapiSchema_3_0.json deleted file mode 100644 index 5ae95127..00000000 --- a/definitions/2.5.0/openapiSchema_3_0.json +++ /dev/null @@ -1,288 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "http://asyncapi.com/definitions/2.5.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 -} \ No newline at end of file diff --git a/definitions/2.6.0/avroSchema_v1.json b/definitions/2.6.0/avroSchema_v1.json deleted file mode 100644 index f215bdaa..00000000 --- a/definitions/2.6.0/avroSchema_v1.json +++ /dev/null @@ -1,317 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "http://asyncapi.com/definitions/2.6.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/avroEnum" - }, - { - "$ref": "#/definitions/avroArray" - }, - { - "$ref": "#/definitions/avroMap" - }, - { - "$ref": "#/definitions/avroFixed" - }, - { - "$ref": "#/definitions/avroUnion" - } - ] - }, - "primitiveType": { - "title": "Primitive Type", - "description": "Basic type primitives.", - "type": "string", - "enum": [ - "null", - "boolean", - "int", - "long", - "float", - "double", - "bytes", - "string" - ] - }, - "primitiveTypeWithMetadata": { - "title": "Primitive Type With Metadata", - "description": "A primitive type with metadata attached.", - "type": "object", - "properties": { - "type": { - "$ref": "#/definitions/primitiveType" - } - }, - "required": [ - "type" - ] - }, - "customTypeReference": { - "title": "Custom Type", - "description": "Reference to a ComplexType", - "not": { - "$ref": "#/definitions/primitiveType" - }, - "type": "string", - "pattern": "^[A-Za-z_][A-Za-z0-9_]*(\\.[A-Za-z_][A-Za-z0-9_]*)*$" - }, - "avroUnion": { - "title": "Union", - "description": "A Union of types", - "type": "array", - "items": { - "$ref": "#/definitions/avroSchema" - }, - "minItems": 1 - }, - "avroField": { - "title": "Field", - "description": "A field within a Record", - "type": "object", - "properties": { - "name": { - "$ref": "#/definitions/name" - }, - "type": { - "$ref": "#/definitions/types" - }, - "doc": { - "type": "string" - }, - "default": true, - "order": { - "enum": [ - "ascending", - "descending", - "ignore" - ] - }, - "aliases": { - "type": "array", - "items": { - "$ref": "#/definitions/name" - } - } - }, - "required": [ - "name", - "type" - ] - }, - "avroRecord": { - "title": "Record", - "description": "A Record", - "type": "object", - "properties": { - "type": { - "type": "string", - "const": "record" - }, - "name": { - "$ref": "#/definitions/name" - }, - "namespace": { - "$ref": "#/definitions/namespace" - }, - "doc": { - "type": "string" - }, - "aliases": { - "type": "array", - "items": { - "$ref": "#/definitions/name" - } - }, - "fields": { - "type": "array", - "items": { - "$ref": "#/definitions/avroField" - } - } - }, - "required": [ - "type", - "name", - "fields" - ] - }, - "avroEnum": { - "title": "Enum", - "description": "An enumeration", - "type": "object", - "properties": { - "type": { - "type": "string", - "const": "enum" - }, - "name": { - "$ref": "#/definitions/name" - }, - "namespace": { - "$ref": "#/definitions/namespace" - }, - "doc": { - "type": "string" - }, - "aliases": { - "type": "array", - "items": { - "$ref": "#/definitions/name" - } - }, - "symbols": { - "type": "array", - "items": { - "$ref": "#/definitions/name" - } - } - }, - "required": [ - "type", - "name", - "symbols" - ] - }, - "avroArray": { - "title": "Array", - "description": "An array", - "type": "object", - "properties": { - "type": { - "type": "string", - "const": "array" - }, - "name": { - "$ref": "#/definitions/name" - }, - "namespace": { - "$ref": "#/definitions/namespace" - }, - "doc": { - "type": "string" - }, - "aliases": { - "type": "array", - "items": { - "$ref": "#/definitions/name" - } - }, - "items": { - "$ref": "#/definitions/types" - } - }, - "required": [ - "type", - "items" - ] - }, - "avroMap": { - "title": "Map", - "description": "A map of values", - "type": "object", - "properties": { - "type": { - "type": "string", - "const": "map" - }, - "name": { - "$ref": "#/definitions/name" - }, - "namespace": { - "$ref": "#/definitions/namespace" - }, - "doc": { - "type": "string" - }, - "aliases": { - "type": "array", - "items": { - "$ref": "#/definitions/name" - } - }, - "values": { - "$ref": "#/definitions/types" - } - }, - "required": [ - "type", - "values" - ] - }, - "avroFixed": { - "title": "Fixed", - "description": "A fixed sized array of bytes", - "type": "object", - "properties": { - "type": { - "type": "string", - "const": "fixed" - }, - "name": { - "$ref": "#/definitions/name" - }, - "namespace": { - "$ref": "#/definitions/namespace" - }, - "doc": { - "type": "string" - }, - "aliases": { - "type": "array", - "items": { - "$ref": "#/definitions/name" - } - }, - "size": { - "type": "number" - } - }, - "required": [ - "type", - "name", - "size" - ] - }, - "name": { - "type": "string", - "pattern": "^[A-Za-z_][A-Za-z0-9_]*$" - }, - "namespace": { - "type": "string", - "pattern": "^([A-Za-z_][A-Za-z0-9_]*(\\.[A-Za-z_][A-Za-z0-9_]*)*)*$" - } - }, - "description": "Json-Schema definition for Avro AVSC files.", - "oneOf": [ - { - "$ref": "#/definitions/avroSchema" - } - ], - "title": "Avro Schema Definition" -} \ No newline at end of file diff --git a/definitions/2.6.0/message.json b/definitions/2.6.0/message.json index 8069c607..6b26f5f8 100644 --- a/definitions/2.6.0/message.json +++ b/definitions/2.6.0/message.json @@ -240,7 +240,7 @@ "then": { "properties": { "payload": { - "$ref": "http://asyncapi.com/definitions/2.6.0/openapiSchema_3_0.json" + "$ref": "http://asyncapi.com/definitions/common/openapiSchema_3_0.json" } } } @@ -263,7 +263,7 @@ "then": { "properties": { "payload": { - "$ref": "http://asyncapi.com/definitions/2.6.0/avroSchema_v1.json" + "$ref": "http://asyncapi.com/definitions/common/avroSchema_v1.json" } } } diff --git a/definitions/2.6.0/openapiSchema_3_0.json b/definitions/2.6.0/openapiSchema_3_0.json deleted file mode 100644 index ec5dbe72..00000000 --- a/definitions/2.6.0/openapiSchema_3_0.json +++ /dev/null @@ -1,288 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "http://asyncapi.com/definitions/2.6.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 -} \ No newline at end of file diff --git a/definitions/3.0.0/multiFormatAvroMessage.json b/definitions/3.0.0/multiFormatAvroMessage.json index abc613ea..09620924 100644 --- a/definitions/3.0.0/multiFormatAvroMessage.json +++ b/definitions/3.0.0/multiFormatAvroMessage.json @@ -21,7 +21,7 @@ "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" }, { - "$ref": "http://asyncapi.com/definitions/3.0.0/avroSchema_v1.json" + "$ref": "http://asyncapi.com/definitions/common/avroSchema_v1.json" } ] } diff --git a/definitions/3.0.0/multiFormatOpenAPIMessage.json b/definitions/3.0.0/multiFormatOpenAPIMessage.json index ba7800df..b8229e08 100644 --- a/definitions/3.0.0/multiFormatOpenAPIMessage.json +++ b/definitions/3.0.0/multiFormatOpenAPIMessage.json @@ -21,7 +21,7 @@ "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" }, { - "$ref": "http://asyncapi.com/definitions/3.0.0/openapiSchema_3_0.json" + "$ref": "http://asyncapi.com/definitions/common/openapiSchema_3_0.json" } ] } diff --git a/common/avroSchema_v1.json b/definitions/common/avroSchema_v1.json similarity index 98% rename from common/avroSchema_v1.json rename to definitions/common/avroSchema_v1.json index d3448f10..3ce0b345 100644 --- a/common/avroSchema_v1.json +++ b/definitions/common/avroSchema_v1.json @@ -1,6 +1,6 @@ { "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "http://asyncapi.com/definitions/3.0.0/avroSchema_v1.json", + "$id": "http://asyncapi.com/definitions/common/avroSchema_v1.json", "definitions": { "avroSchema": { "title": "Avro Schema", diff --git a/definitions/2.1.0/openapiSchema_3_0.json b/definitions/common/openapiSchema_3_0.json similarity index 98% rename from definitions/2.1.0/openapiSchema_3_0.json rename to definitions/common/openapiSchema_3_0.json index d50f113a..0dd2b603 100644 --- a/definitions/2.1.0/openapiSchema_3_0.json +++ b/definitions/common/openapiSchema_3_0.json @@ -1,6 +1,6 @@ { "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "http://asyncapi.com/definitions/2.1.0/openapiSchema_3_0.json", + "$id": "http://asyncapi.com/definitions/common/openapiSchema_3_0.json", "type": "object", "definitions": { "ExternalDocumentation": { diff --git a/schemas/2.0.0.json b/schemas/2.0.0.json index ddf9a1d7..128f075f 100644 --- a/schemas/2.0.0.json +++ b/schemas/2.0.0.json @@ -1046,7 +1046,7 @@ "then": { "properties": { "payload": { - "$ref": "http://asyncapi.com/definitions/2.0.0/openapiSchema_3_0.json" + "$ref": "http://asyncapi.com/definitions/common/openapiSchema_3_0.json" } } } @@ -1069,7 +1069,7 @@ "then": { "properties": { "payload": { - "$ref": "http://asyncapi.com/definitions/2.0.0/avroSchema_v1.json" + "$ref": "http://asyncapi.com/definitions/common/avroSchema_v1.json" } } } @@ -1185,8 +1185,8 @@ } } }, - "http://asyncapi.com/definitions/2.0.0/openapiSchema_3_0.json": { - "$id": "http://asyncapi.com/definitions/2.0.0/openapiSchema_3_0.json", + "http://asyncapi.com/definitions/common/openapiSchema_3_0.json": { + "$id": "http://asyncapi.com/definitions/common/openapiSchema_3_0.json", "type": "object", "definitions": { "ExternalDocumentation": { @@ -1472,8 +1472,8 @@ }, "additionalProperties": false }, - "http://asyncapi.com/definitions/2.0.0/avroSchema_v1.json": { - "$id": "http://asyncapi.com/definitions/2.0.0/avroSchema_v1.json", + "http://asyncapi.com/definitions/common/avroSchema_v1.json": { + "$id": "http://asyncapi.com/definitions/common/avroSchema_v1.json", "definitions": { "avroSchema": { "title": "Avro Schema", diff --git a/schemas/2.1.0.json b/schemas/2.1.0.json index 0b8fd84c..592bba3e 100644 --- a/schemas/2.1.0.json +++ b/schemas/2.1.0.json @@ -1070,7 +1070,7 @@ "then": { "properties": { "payload": { - "$ref": "http://asyncapi.com/definitions/2.1.0/openapiSchema_3_0.json" + "$ref": "http://asyncapi.com/definitions/common/openapiSchema_3_0.json" } } } @@ -1093,7 +1093,7 @@ "then": { "properties": { "payload": { - "$ref": "http://asyncapi.com/definitions/2.1.0/avroSchema_v1.json" + "$ref": "http://asyncapi.com/definitions/common/avroSchema_v1.json" } } } @@ -1236,8 +1236,8 @@ } } }, - "http://asyncapi.com/definitions/2.1.0/openapiSchema_3_0.json": { - "$id": "http://asyncapi.com/definitions/2.1.0/openapiSchema_3_0.json", + "http://asyncapi.com/definitions/common/openapiSchema_3_0.json": { + "$id": "http://asyncapi.com/definitions/common/openapiSchema_3_0.json", "type": "object", "definitions": { "ExternalDocumentation": { @@ -1523,8 +1523,8 @@ }, "additionalProperties": false }, - "http://asyncapi.com/definitions/2.1.0/avroSchema_v1.json": { - "$id": "http://asyncapi.com/definitions/2.1.0/avroSchema_v1.json", + "http://asyncapi.com/definitions/common/avroSchema_v1.json": { + "$id": "http://asyncapi.com/definitions/common/avroSchema_v1.json", "definitions": { "avroSchema": { "title": "Avro Schema", diff --git a/schemas/2.2.0.json b/schemas/2.2.0.json index 2371c167..124f4314 100644 --- a/schemas/2.2.0.json +++ b/schemas/2.2.0.json @@ -1082,7 +1082,7 @@ "then": { "properties": { "payload": { - "$ref": "http://asyncapi.com/definitions/2.2.0/openapiSchema_3_0.json" + "$ref": "http://asyncapi.com/definitions/common/openapiSchema_3_0.json" } } } @@ -1105,7 +1105,7 @@ "then": { "properties": { "payload": { - "$ref": "http://asyncapi.com/definitions/2.2.0/avroSchema_v1.json" + "$ref": "http://asyncapi.com/definitions/common/avroSchema_v1.json" } } } @@ -1221,8 +1221,8 @@ } } }, - "http://asyncapi.com/definitions/2.2.0/openapiSchema_3_0.json": { - "$id": "http://asyncapi.com/definitions/2.2.0/openapiSchema_3_0.json", + "http://asyncapi.com/definitions/common/openapiSchema_3_0.json": { + "$id": "http://asyncapi.com/definitions/common/openapiSchema_3_0.json", "type": "object", "definitions": { "ExternalDocumentation": { @@ -1508,8 +1508,8 @@ }, "additionalProperties": false }, - "http://asyncapi.com/definitions/2.2.0/avroSchema_v1.json": { - "$id": "http://asyncapi.com/definitions/2.2.0/avroSchema_v1.json", + "http://asyncapi.com/definitions/common/avroSchema_v1.json": { + "$id": "http://asyncapi.com/definitions/common/avroSchema_v1.json", "definitions": { "avroSchema": { "title": "Avro Schema", diff --git a/schemas/2.3.0.json b/schemas/2.3.0.json index 3fe29a9f..30e7a44d 100644 --- a/schemas/2.3.0.json +++ b/schemas/2.3.0.json @@ -1098,7 +1098,7 @@ "then": { "properties": { "payload": { - "$ref": "http://asyncapi.com/definitions/2.3.0/openapiSchema_3_0.json" + "$ref": "http://asyncapi.com/definitions/common/openapiSchema_3_0.json" } } } @@ -1121,7 +1121,7 @@ "then": { "properties": { "payload": { - "$ref": "http://asyncapi.com/definitions/2.3.0/avroSchema_v1.json" + "$ref": "http://asyncapi.com/definitions/common/avroSchema_v1.json" } } } @@ -1237,8 +1237,8 @@ } } }, - "http://asyncapi.com/definitions/2.3.0/openapiSchema_3_0.json": { - "$id": "http://asyncapi.com/definitions/2.3.0/openapiSchema_3_0.json", + "http://asyncapi.com/definitions/common/openapiSchema_3_0.json": { + "$id": "http://asyncapi.com/definitions/common/openapiSchema_3_0.json", "type": "object", "definitions": { "ExternalDocumentation": { @@ -1524,8 +1524,8 @@ }, "additionalProperties": false }, - "http://asyncapi.com/definitions/2.3.0/avroSchema_v1.json": { - "$id": "http://asyncapi.com/definitions/2.3.0/avroSchema_v1.json", + "http://asyncapi.com/definitions/common/avroSchema_v1.json": { + "$id": "http://asyncapi.com/definitions/common/avroSchema_v1.json", "definitions": { "avroSchema": { "title": "Avro Schema", diff --git a/schemas/2.4.0.json b/schemas/2.4.0.json index 04fd49f9..a9a05b4a 100644 --- a/schemas/2.4.0.json +++ b/schemas/2.4.0.json @@ -1116,7 +1116,7 @@ "then": { "properties": { "payload": { - "$ref": "http://asyncapi.com/definitions/2.4.0/openapiSchema_3_0.json" + "$ref": "http://asyncapi.com/definitions/common/openapiSchema_3_0.json" } } } @@ -1139,7 +1139,7 @@ "then": { "properties": { "payload": { - "$ref": "http://asyncapi.com/definitions/2.4.0/avroSchema_v1.json" + "$ref": "http://asyncapi.com/definitions/common/avroSchema_v1.json" } } } @@ -1258,8 +1258,8 @@ } } }, - "http://asyncapi.com/definitions/2.4.0/openapiSchema_3_0.json": { - "$id": "http://asyncapi.com/definitions/2.4.0/openapiSchema_3_0.json", + "http://asyncapi.com/definitions/common/openapiSchema_3_0.json": { + "$id": "http://asyncapi.com/definitions/common/openapiSchema_3_0.json", "type": "object", "definitions": { "ExternalDocumentation": { @@ -1545,8 +1545,8 @@ }, "additionalProperties": false }, - "http://asyncapi.com/definitions/2.4.0/avroSchema_v1.json": { - "$id": "http://asyncapi.com/definitions/2.4.0/avroSchema_v1.json", + "http://asyncapi.com/definitions/common/avroSchema_v1.json": { + "$id": "http://asyncapi.com/definitions/common/avroSchema_v1.json", "definitions": { "avroSchema": { "title": "Avro Schema", diff --git a/schemas/2.5.0.json b/schemas/2.5.0.json index 26d872e8..9465c825 100644 --- a/schemas/2.5.0.json +++ b/schemas/2.5.0.json @@ -1130,7 +1130,7 @@ "then": { "properties": { "payload": { - "$ref": "http://asyncapi.com/definitions/2.5.0/openapiSchema_3_0.json" + "$ref": "http://asyncapi.com/definitions/common/openapiSchema_3_0.json" } } } @@ -1153,7 +1153,7 @@ "then": { "properties": { "payload": { - "$ref": "http://asyncapi.com/definitions/2.5.0/avroSchema_v1.json" + "$ref": "http://asyncapi.com/definitions/common/avroSchema_v1.json" } } } @@ -1272,8 +1272,8 @@ } } }, - "http://asyncapi.com/definitions/2.5.0/openapiSchema_3_0.json": { - "$id": "http://asyncapi.com/definitions/2.5.0/openapiSchema_3_0.json", + "http://asyncapi.com/definitions/common/openapiSchema_3_0.json": { + "$id": "http://asyncapi.com/definitions/common/openapiSchema_3_0.json", "type": "object", "definitions": { "ExternalDocumentation": { @@ -1559,8 +1559,8 @@ }, "additionalProperties": false }, - "http://asyncapi.com/definitions/2.5.0/avroSchema_v1.json": { - "$id": "http://asyncapi.com/definitions/2.5.0/avroSchema_v1.json", + "http://asyncapi.com/definitions/common/avroSchema_v1.json": { + "$id": "http://asyncapi.com/definitions/common/avroSchema_v1.json", "definitions": { "avroSchema": { "title": "Avro Schema", diff --git a/schemas/2.6.0.json b/schemas/2.6.0.json index cf0eefe0..502c6348 100644 --- a/schemas/2.6.0.json +++ b/schemas/2.6.0.json @@ -1439,7 +1439,7 @@ "then": { "properties": { "payload": { - "$ref": "http://asyncapi.com/definitions/2.6.0/openapiSchema_3_0.json" + "$ref": "http://asyncapi.com/definitions/common/openapiSchema_3_0.json" } } } @@ -1462,7 +1462,7 @@ "then": { "properties": { "payload": { - "$ref": "http://asyncapi.com/definitions/2.6.0/avroSchema_v1.json" + "$ref": "http://asyncapi.com/definitions/common/avroSchema_v1.json" } } } @@ -1726,8 +1726,8 @@ } ] }, - "http://asyncapi.com/definitions/2.6.0/openapiSchema_3_0.json": { - "$id": "http://asyncapi.com/definitions/2.6.0/openapiSchema_3_0.json", + "http://asyncapi.com/definitions/common/openapiSchema_3_0.json": { + "$id": "http://asyncapi.com/definitions/common/openapiSchema_3_0.json", "type": "object", "definitions": { "ExternalDocumentation": { @@ -2013,8 +2013,8 @@ }, "additionalProperties": false }, - "http://asyncapi.com/definitions/2.6.0/avroSchema_v1.json": { - "$id": "http://asyncapi.com/definitions/2.6.0/avroSchema_v1.json", + "http://asyncapi.com/definitions/common/avroSchema_v1.json": { + "$id": "http://asyncapi.com/definitions/common/avroSchema_v1.json", "definitions": { "avroSchema": { "title": "Avro Schema", diff --git a/schemas/3.0.0.json b/schemas/3.0.0.json index 126569b3..faaf4fa2 100644 --- a/schemas/3.0.0.json +++ b/schemas/3.0.0.json @@ -2902,15 +2902,15 @@ "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" }, { - "$ref": "http://asyncapi.com/definitions/3.0.0/openapiSchema_3_0.json" + "$ref": "http://asyncapi.com/definitions/common/openapiSchema_3_0.json" } ] } } } }, - "http://asyncapi.com/definitions/3.0.0/openapiSchema_3_0.json": { - "$id": "http://asyncapi.com/definitions/3.0.0/openapiSchema_3_0.json", + "http://asyncapi.com/definitions/common/openapiSchema_3_0.json": { + "$id": "http://asyncapi.com/definitions/common/openapiSchema_3_0.json", "type": "object", "definitions": { "ExternalDocumentation": { @@ -3243,15 +3243,15 @@ "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" }, { - "$ref": "http://asyncapi.com/definitions/3.0.0/avroSchema_v1.json" + "$ref": "http://asyncapi.com/definitions/common/avroSchema_v1.json" } ] } } } }, - "http://asyncapi.com/definitions/3.0.0/avroSchema_v1.json": { - "$id": "http://asyncapi.com/definitions/3.0.0/avroSchema_v1.json", + "http://asyncapi.com/definitions/common/avroSchema_v1.json": { + "$id": "http://asyncapi.com/definitions/common/avroSchema_v1.json", "definitions": { "avroSchema": { "title": "Avro Schema", @@ -4298,7 +4298,7 @@ "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" }, { - "$ref": "http://asyncapi.com/definitions/3.0.0/avroSchema_v1.json" + "$ref": "http://asyncapi.com/definitions/common/avroSchema_v1.json" } ], "description": "The message key." diff --git a/scripts/add-new-version.js b/scripts/add-new-version.js index 942f7f49..c09e644e 100644 --- a/scripts/add-new-version.js +++ b/scripts/add-new-version.js @@ -95,7 +95,7 @@ async function addNewVersion(newVersion) { } //Use the newest version as baseline for the new one - const latestVersion = (await execute('ls -d ./definitions/* | sort -V -r | head -1 | xargs -n 1 basename')).trim(); + const latestVersion = (await execute('ls -d ./definitions/*.*.* | sort -V -r | head -1 | xargs -n 1 basename')).trim(); await execute(`cp -R ./definitions/${latestVersion} ${newVersionDir}`); const latestExampleVersion = (await execute('ls -d ./examples/* | sort -V -r | head -1 | xargs -n 1 basename')).trim(); diff --git a/tools/bundler/index.js b/tools/bundler/index.js index 44bf731a..e5403fc0 100644 --- a/tools/bundler/index.js +++ b/tools/bundler/index.js @@ -2,7 +2,7 @@ const path = require('path'); const fs = require('fs'); const traverse = require('json-schema-traverse'); const definitionsDirectory = path.resolve(__dirname, '../../definitions'); -const commonSchemasDirectory = path.resolve(__dirname, '../../common'); +const commonSchemasDirectory = path.resolve(__dirname, '../../definitions/common'); const bindingsDirectory = path.resolve(__dirname, '../../bindings'); const extensionsDirectory = path.resolve(__dirname, '../../extensions'); const outputDirectory = path.resolve(__dirname, '../../schemas'); @@ -25,7 +25,7 @@ const extensionsRegex = /http:\/\/asyncapi\.com\/(extensions\/[^/]+)\/([^/]+)\/( * When run, go through all versions that have split definitions and bundles them together. */ (async () => { - const versions = await fs.promises.readdir(definitionsDirectory); + const versions = (await fs.promises.readdir(definitionsDirectory)).filter((value) => !value.includes('common')); console.log(`Ensuring output directory is present ${outputDirectory}`); if (!fs.existsSync(outputDirectory)) { await fs.promises.mkdir(outputDirectory);