diff --git a/definitions/3.0.0/multiFormatAsyncAPISchemaMessage.json b/definitions/3.0.0/multiFormatAsyncAPISchemaMessage.json new file mode 100644 index 00000000..56f137cb --- /dev/null +++ b/definitions/3.0.0/multiFormatAsyncAPISchemaMessage.json @@ -0,0 +1,48 @@ +{ + + "if": { + "description": "If schemaFormat has been defined check if it's one of the AsyncAPI Schema Object formats", + "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" + ] + } + } + }, + "then": { + "properties": { + "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/multiFormatAsyncAPISchemaMessage.json" +} \ No newline at end of file diff --git a/definitions/3.0.0/multiFormatAvroMessage.json b/definitions/3.0.0/multiFormatAvroMessage.json new file mode 100644 index 00000000..09620924 --- /dev/null +++ b/definitions/3.0.0/multiFormatAvroMessage.json @@ -0,0 +1,32 @@ +{ + "if": { + "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" + ] + } + } + }, + "then": { + "properties": { + "schema": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/common/avroSchema_v1.json" + } + ] + } + } + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/3.0.0/multiFormatAvroMessage.json" +} \ No newline at end of file diff --git a/definitions/3.0.0/multiFormatJsonSchemaMessage.json b/definitions/3.0.0/multiFormatJsonSchemaMessage.json new file mode 100644 index 00000000..d5bb45ca --- /dev/null +++ b/definitions/3.0.0/multiFormatJsonSchemaMessage.json @@ -0,0 +1,24 @@ +{ + "if": { + "required": [ + "schemaFormat" + ], + "properties": { + "schemaFormat": { + "enum": [ + "application/schema+json;version=draft-07", + "application/schema+yaml;version=draft-07" + ] + } + } + }, + "then": { + "properties": { + "schema": { + "$ref": "http://json-schema.org/draft-07/schema" + } + } + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/3.0.0/multiFormatJsonSchemaMessage.json" +} \ No newline at end of file diff --git a/definitions/3.0.0/multiFormatOpenAPIMessage.json b/definitions/3.0.0/multiFormatOpenAPIMessage.json new file mode 100644 index 00000000..b8229e08 --- /dev/null +++ b/definitions/3.0.0/multiFormatOpenAPIMessage.json @@ -0,0 +1,32 @@ +{ + "if": { + "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" + ] + } + } + }, + "then": { + "properties": { + "schema": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/common/openapiSchema_3_0.json" + } + ] + } + } + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/3.0.0/multiFormatOpenAPIMessage.json" +} \ No newline at end of file diff --git a/definitions/3.0.0/multiFormatSchema.json b/definitions/3.0.0/multiFormatSchema.json index 1cd17517..b29ee2f0 100644 --- a/definitions/3.0.0/multiFormatSchema.json +++ b/definitions/3.0.0/multiFormatSchema.json @@ -6,197 +6,72 @@ "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" } }, - "if": { - "not": { - "type": "object" - } - }, - "then": { - "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" - }, - "else": { - "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", + "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.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/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" - ] - } - ] - } - }, - "allOf": [ - { - "if": { - "not": { - "description": "If no schemaFormat has been defined, default to schema or reference", - "required": [ - "schemaFormat" - ] - } - }, - "then": { - "properties": { - "schema": { - "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" - } - } + "application/raml+yaml;version=1.0" + ] } - }, - { - "if": { - "description": "If schemaFormat has been defined check if it's one of the AsyncAPI Schema Object formats", - "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" - ] - } - } - }, - "then": { - "properties": { - "schema": { - "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" - } - } - } - }, - { - "if": { - "required": [ - "schemaFormat" - ], - "properties": { - "schemaFormat": { - "enum": [ - "application/schema+json;version=draft-07", - "application/schema+yaml;version=draft-07" - ] - } - } - }, - "then": { - "properties": { - "schema": { - "$ref": "http://json-schema.org/draft-07/schema" - } - } - } - }, - { - "if": { + ] + } + }, + "anyOf": [ + { + "if": { + "not": { + "description": "If no schemaFormat has been defined, default to schema or reference", "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" - ] - } - } - }, - "then": { - "properties": { - "schema": { - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" - }, - { - "$ref": "http://asyncapi.com/definitions/common/openapiSchema_3_0.json" - } - ] - } - } + ] } }, - { - "if": { - "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" - ] - } - } - }, - "then": { - "properties": { - "schema": { - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" - }, - { - "$ref": "http://asyncapi.com/definitions/common/avroSchema_v1.json" - } - ] - } + "then": { + "properties": { + "schema": { + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" } } } - ] - }, + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/multiFormatAsyncAPISchemaMessage.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/multiFormatOpenAPIMessage.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/multiFormatJsonSchemaMessage.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/multiFormatAvroMessage.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/package-lock.json b/package-lock.json index 69c488ee..307de056 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@asyncapi/specs", - "version": "6.7.1", + "version": "7.0.0-next-major.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@asyncapi/specs", - "version": "6.7.1", + "version": "7.0.0-next-major.1", "license": "Apache-2.0", "dependencies": { "@types/json-schema": "^7.0.11" diff --git a/package.json b/package.json index b1e226c6..1374b964 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@asyncapi/specs", - "version": "6.7.1", + "version": "7.0.0-next-major.1", "description": "AsyncAPI schema versions", "main": "index.js", "types": "index.d.ts", diff --git a/schemas/2.0.0-without-$id.json b/schemas/2.0.0-without-$id.json index 2a1bf42a..5910a2c2 100644 --- a/schemas/2.0.0-without-$id.json +++ b/schemas/2.0.0-without-$id.json @@ -1324,10 +1324,10 @@ "not": { "oneOf": [ { - "$ref": "#/definitions/openapiSchema_3_0" + "$ref": "#" }, { - "$ref": "#/definitions/openapiSchema_3_0/definitions/Reference" + "$ref": "#/definitions/Reference" } ] }, @@ -1336,10 +1336,10 @@ "items": { "oneOf": [ { - "$ref": "#/definitions/openapiSchema_3_0" + "$ref": "#" }, { - "$ref": "#/definitions/openapiSchema_3_0/definitions/Reference" + "$ref": "#/definitions/Reference" } ] } @@ -1349,10 +1349,10 @@ "items": { "oneOf": [ { - "$ref": "#/definitions/openapiSchema_3_0" + "$ref": "#" }, { - "$ref": "#/definitions/openapiSchema_3_0/definitions/Reference" + "$ref": "#/definitions/Reference" } ] } @@ -1362,10 +1362,10 @@ "items": { "oneOf": [ { - "$ref": "#/definitions/openapiSchema_3_0" + "$ref": "#" }, { - "$ref": "#/definitions/openapiSchema_3_0/definitions/Reference" + "$ref": "#/definitions/Reference" } ] } @@ -1373,10 +1373,10 @@ "items": { "oneOf": [ { - "$ref": "#/definitions/openapiSchema_3_0" + "$ref": "#" }, { - "$ref": "#/definitions/openapiSchema_3_0/definitions/Reference" + "$ref": "#/definitions/Reference" } ] }, @@ -1385,10 +1385,10 @@ "additionalProperties": { "oneOf": [ { - "$ref": "#/definitions/openapiSchema_3_0" + "$ref": "#" }, { - "$ref": "#/definitions/openapiSchema_3_0/definitions/Reference" + "$ref": "#/definitions/Reference" } ] } @@ -1396,10 +1396,10 @@ "additionalProperties": { "oneOf": [ { - "$ref": "#/definitions/openapiSchema_3_0" + "$ref": "#" }, { - "$ref": "#/definitions/openapiSchema_3_0/definitions/Reference" + "$ref": "#/definitions/Reference" }, { "type": "boolean" @@ -1419,7 +1419,7 @@ "default": false }, "discriminator": { - "$ref": "#/definitions/openapiSchema_3_0/definitions/Discriminator" + "$ref": "#/definitions/Discriminator" }, "readOnly": { "type": "boolean", @@ -1431,14 +1431,14 @@ }, "example": true, "externalDocs": { - "$ref": "#/definitions/openapiSchema_3_0/definitions/ExternalDocumentation" + "$ref": "#/definitions/ExternalDocumentation" }, "deprecated": { "type": "boolean", "default": false }, "xml": { - "$ref": "#/definitions/openapiSchema_3_0/definitions/XML" + "$ref": "#/definitions/XML" } }, "patternProperties": { @@ -1453,7 +1453,7 @@ "description": "Root Schema", "oneOf": [ { - "$ref": "#/definitions/avroSchema_v1/definitions/types" + "$ref": "#/definitions/types" } ] }, @@ -1462,31 +1462,31 @@ "description": "Allowed Avro types", "oneOf": [ { - "$ref": "#/definitions/avroSchema_v1/definitions/primitiveType" + "$ref": "#/definitions/primitiveType" }, { - "$ref": "#/definitions/avroSchema_v1/definitions/primitiveTypeWithMetadata" + "$ref": "#/definitions/primitiveTypeWithMetadata" }, { - "$ref": "#/definitions/avroSchema_v1/definitions/customTypeReference" + "$ref": "#/definitions/customTypeReference" }, { - "$ref": "#/definitions/avroSchema_v1/definitions/avroRecord" + "$ref": "#/definitions/avroRecord" }, { - "$ref": "#/definitions/avroSchema_v1/definitions/avroEnum" + "$ref": "#/definitions/avroEnum" }, { - "$ref": "#/definitions/avroSchema_v1/definitions/avroArray" + "$ref": "#/definitions/avroArray" }, { - "$ref": "#/definitions/avroSchema_v1/definitions/avroMap" + "$ref": "#/definitions/avroMap" }, { - "$ref": "#/definitions/avroSchema_v1/definitions/avroFixed" + "$ref": "#/definitions/avroFixed" }, { - "$ref": "#/definitions/avroSchema_v1/definitions/avroUnion" + "$ref": "#/definitions/avroUnion" } ] }, @@ -1511,7 +1511,7 @@ "type": "object", "properties": { "type": { - "$ref": "#/definitions/avroSchema_v1/definitions/primitiveType" + "$ref": "#/definitions/primitiveType" } }, "required": [ @@ -1522,7 +1522,7 @@ "title": "Custom Type", "description": "Reference to a ComplexType", "not": { - "$ref": "#/definitions/avroSchema_v1/definitions/primitiveType" + "$ref": "#/definitions/primitiveType" }, "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]*(\\.[A-Za-z_][A-Za-z0-9_]*)*$" @@ -1532,7 +1532,7 @@ "description": "A Union of types", "type": "array", "items": { - "$ref": "#/definitions/avroSchema_v1/definitions/avroSchema" + "$ref": "#/definitions/avroSchema" }, "minItems": 1 }, @@ -1542,10 +1542,10 @@ "type": "object", "properties": { "name": { - "$ref": "#/definitions/avroSchema_v1/definitions/name" + "$ref": "#/definitions/name" }, "type": { - "$ref": "#/definitions/avroSchema_v1/definitions/types" + "$ref": "#/definitions/types" }, "doc": { "type": "string" @@ -1561,7 +1561,7 @@ "aliases": { "type": "array", "items": { - "$ref": "#/definitions/avroSchema_v1/definitions/name" + "$ref": "#/definitions/name" } } }, @@ -1580,10 +1580,10 @@ "const": "record" }, "name": { - "$ref": "#/definitions/avroSchema_v1/definitions/name" + "$ref": "#/definitions/name" }, "namespace": { - "$ref": "#/definitions/avroSchema_v1/definitions/namespace" + "$ref": "#/definitions/namespace" }, "doc": { "type": "string" @@ -1591,13 +1591,13 @@ "aliases": { "type": "array", "items": { - "$ref": "#/definitions/avroSchema_v1/definitions/name" + "$ref": "#/definitions/name" } }, "fields": { "type": "array", "items": { - "$ref": "#/definitions/avroSchema_v1/definitions/avroField" + "$ref": "#/definitions/avroField" } } }, @@ -1617,10 +1617,10 @@ "const": "enum" }, "name": { - "$ref": "#/definitions/avroSchema_v1/definitions/name" + "$ref": "#/definitions/name" }, "namespace": { - "$ref": "#/definitions/avroSchema_v1/definitions/namespace" + "$ref": "#/definitions/namespace" }, "doc": { "type": "string" @@ -1628,13 +1628,13 @@ "aliases": { "type": "array", "items": { - "$ref": "#/definitions/avroSchema_v1/definitions/name" + "$ref": "#/definitions/name" } }, "symbols": { "type": "array", "items": { - "$ref": "#/definitions/avroSchema_v1/definitions/name" + "$ref": "#/definitions/name" } } }, @@ -1654,10 +1654,10 @@ "const": "array" }, "name": { - "$ref": "#/definitions/avroSchema_v1/definitions/name" + "$ref": "#/definitions/name" }, "namespace": { - "$ref": "#/definitions/avroSchema_v1/definitions/namespace" + "$ref": "#/definitions/namespace" }, "doc": { "type": "string" @@ -1665,11 +1665,11 @@ "aliases": { "type": "array", "items": { - "$ref": "#/definitions/avroSchema_v1/definitions/name" + "$ref": "#/definitions/name" } }, "items": { - "$ref": "#/definitions/avroSchema_v1/definitions/types" + "$ref": "#/definitions/types" } }, "required": [ @@ -1687,10 +1687,10 @@ "const": "map" }, "name": { - "$ref": "#/definitions/avroSchema_v1/definitions/name" + "$ref": "#/definitions/name" }, "namespace": { - "$ref": "#/definitions/avroSchema_v1/definitions/namespace" + "$ref": "#/definitions/namespace" }, "doc": { "type": "string" @@ -1698,11 +1698,11 @@ "aliases": { "type": "array", "items": { - "$ref": "#/definitions/avroSchema_v1/definitions/name" + "$ref": "#/definitions/name" } }, "values": { - "$ref": "#/definitions/avroSchema_v1/definitions/types" + "$ref": "#/definitions/types" } }, "required": [ @@ -1720,10 +1720,10 @@ "const": "fixed" }, "name": { - "$ref": "#/definitions/avroSchema_v1/definitions/name" + "$ref": "#/definitions/name" }, "namespace": { - "$ref": "#/definitions/avroSchema_v1/definitions/namespace" + "$ref": "#/definitions/namespace" }, "doc": { "type": "string" @@ -1731,7 +1731,7 @@ "aliases": { "type": "array", "items": { - "$ref": "#/definitions/avroSchema_v1/definitions/name" + "$ref": "#/definitions/name" } }, "size": { @@ -1756,7 +1756,7 @@ "description": "Json-Schema definition for Avro AVSC files.", "oneOf": [ { - "$ref": "#/definitions/avroSchema_v1/definitions/avroSchema" + "$ref": "#/definitions/avroSchema" } ], "title": "Avro Schema Definition" diff --git a/schemas/2.1.0-without-$id.json b/schemas/2.1.0-without-$id.json index f2db9a08..1ad8932e 100644 --- a/schemas/2.1.0-without-$id.json +++ b/schemas/2.1.0-without-$id.json @@ -1375,10 +1375,10 @@ "not": { "oneOf": [ { - "$ref": "#/definitions/openapiSchema_3_0" + "$ref": "#" }, { - "$ref": "#/definitions/openapiSchema_3_0/definitions/Reference" + "$ref": "#/definitions/Reference" } ] }, @@ -1387,10 +1387,10 @@ "items": { "oneOf": [ { - "$ref": "#/definitions/openapiSchema_3_0" + "$ref": "#" }, { - "$ref": "#/definitions/openapiSchema_3_0/definitions/Reference" + "$ref": "#/definitions/Reference" } ] } @@ -1400,10 +1400,10 @@ "items": { "oneOf": [ { - "$ref": "#/definitions/openapiSchema_3_0" + "$ref": "#" }, { - "$ref": "#/definitions/openapiSchema_3_0/definitions/Reference" + "$ref": "#/definitions/Reference" } ] } @@ -1413,10 +1413,10 @@ "items": { "oneOf": [ { - "$ref": "#/definitions/openapiSchema_3_0" + "$ref": "#" }, { - "$ref": "#/definitions/openapiSchema_3_0/definitions/Reference" + "$ref": "#/definitions/Reference" } ] } @@ -1424,10 +1424,10 @@ "items": { "oneOf": [ { - "$ref": "#/definitions/openapiSchema_3_0" + "$ref": "#" }, { - "$ref": "#/definitions/openapiSchema_3_0/definitions/Reference" + "$ref": "#/definitions/Reference" } ] }, @@ -1436,10 +1436,10 @@ "additionalProperties": { "oneOf": [ { - "$ref": "#/definitions/openapiSchema_3_0" + "$ref": "#" }, { - "$ref": "#/definitions/openapiSchema_3_0/definitions/Reference" + "$ref": "#/definitions/Reference" } ] } @@ -1447,10 +1447,10 @@ "additionalProperties": { "oneOf": [ { - "$ref": "#/definitions/openapiSchema_3_0" + "$ref": "#" }, { - "$ref": "#/definitions/openapiSchema_3_0/definitions/Reference" + "$ref": "#/definitions/Reference" }, { "type": "boolean" @@ -1470,7 +1470,7 @@ "default": false }, "discriminator": { - "$ref": "#/definitions/openapiSchema_3_0/definitions/Discriminator" + "$ref": "#/definitions/Discriminator" }, "readOnly": { "type": "boolean", @@ -1482,14 +1482,14 @@ }, "example": true, "externalDocs": { - "$ref": "#/definitions/openapiSchema_3_0/definitions/ExternalDocumentation" + "$ref": "#/definitions/ExternalDocumentation" }, "deprecated": { "type": "boolean", "default": false }, "xml": { - "$ref": "#/definitions/openapiSchema_3_0/definitions/XML" + "$ref": "#/definitions/XML" } }, "patternProperties": { @@ -1504,7 +1504,7 @@ "description": "Root Schema", "oneOf": [ { - "$ref": "#/definitions/avroSchema_v1/definitions/types" + "$ref": "#/definitions/types" } ] }, @@ -1513,31 +1513,31 @@ "description": "Allowed Avro types", "oneOf": [ { - "$ref": "#/definitions/avroSchema_v1/definitions/primitiveType" + "$ref": "#/definitions/primitiveType" }, { - "$ref": "#/definitions/avroSchema_v1/definitions/primitiveTypeWithMetadata" + "$ref": "#/definitions/primitiveTypeWithMetadata" }, { - "$ref": "#/definitions/avroSchema_v1/definitions/customTypeReference" + "$ref": "#/definitions/customTypeReference" }, { - "$ref": "#/definitions/avroSchema_v1/definitions/avroRecord" + "$ref": "#/definitions/avroRecord" }, { - "$ref": "#/definitions/avroSchema_v1/definitions/avroEnum" + "$ref": "#/definitions/avroEnum" }, { - "$ref": "#/definitions/avroSchema_v1/definitions/avroArray" + "$ref": "#/definitions/avroArray" }, { - "$ref": "#/definitions/avroSchema_v1/definitions/avroMap" + "$ref": "#/definitions/avroMap" }, { - "$ref": "#/definitions/avroSchema_v1/definitions/avroFixed" + "$ref": "#/definitions/avroFixed" }, { - "$ref": "#/definitions/avroSchema_v1/definitions/avroUnion" + "$ref": "#/definitions/avroUnion" } ] }, @@ -1562,7 +1562,7 @@ "type": "object", "properties": { "type": { - "$ref": "#/definitions/avroSchema_v1/definitions/primitiveType" + "$ref": "#/definitions/primitiveType" } }, "required": [ @@ -1573,7 +1573,7 @@ "title": "Custom Type", "description": "Reference to a ComplexType", "not": { - "$ref": "#/definitions/avroSchema_v1/definitions/primitiveType" + "$ref": "#/definitions/primitiveType" }, "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]*(\\.[A-Za-z_][A-Za-z0-9_]*)*$" @@ -1583,7 +1583,7 @@ "description": "A Union of types", "type": "array", "items": { - "$ref": "#/definitions/avroSchema_v1/definitions/avroSchema" + "$ref": "#/definitions/avroSchema" }, "minItems": 1 }, @@ -1593,10 +1593,10 @@ "type": "object", "properties": { "name": { - "$ref": "#/definitions/avroSchema_v1/definitions/name" + "$ref": "#/definitions/name" }, "type": { - "$ref": "#/definitions/avroSchema_v1/definitions/types" + "$ref": "#/definitions/types" }, "doc": { "type": "string" @@ -1612,7 +1612,7 @@ "aliases": { "type": "array", "items": { - "$ref": "#/definitions/avroSchema_v1/definitions/name" + "$ref": "#/definitions/name" } } }, @@ -1631,10 +1631,10 @@ "const": "record" }, "name": { - "$ref": "#/definitions/avroSchema_v1/definitions/name" + "$ref": "#/definitions/name" }, "namespace": { - "$ref": "#/definitions/avroSchema_v1/definitions/namespace" + "$ref": "#/definitions/namespace" }, "doc": { "type": "string" @@ -1642,13 +1642,13 @@ "aliases": { "type": "array", "items": { - "$ref": "#/definitions/avroSchema_v1/definitions/name" + "$ref": "#/definitions/name" } }, "fields": { "type": "array", "items": { - "$ref": "#/definitions/avroSchema_v1/definitions/avroField" + "$ref": "#/definitions/avroField" } } }, @@ -1668,10 +1668,10 @@ "const": "enum" }, "name": { - "$ref": "#/definitions/avroSchema_v1/definitions/name" + "$ref": "#/definitions/name" }, "namespace": { - "$ref": "#/definitions/avroSchema_v1/definitions/namespace" + "$ref": "#/definitions/namespace" }, "doc": { "type": "string" @@ -1679,13 +1679,13 @@ "aliases": { "type": "array", "items": { - "$ref": "#/definitions/avroSchema_v1/definitions/name" + "$ref": "#/definitions/name" } }, "symbols": { "type": "array", "items": { - "$ref": "#/definitions/avroSchema_v1/definitions/name" + "$ref": "#/definitions/name" } } }, @@ -1705,10 +1705,10 @@ "const": "array" }, "name": { - "$ref": "#/definitions/avroSchema_v1/definitions/name" + "$ref": "#/definitions/name" }, "namespace": { - "$ref": "#/definitions/avroSchema_v1/definitions/namespace" + "$ref": "#/definitions/namespace" }, "doc": { "type": "string" @@ -1716,11 +1716,11 @@ "aliases": { "type": "array", "items": { - "$ref": "#/definitions/avroSchema_v1/definitions/name" + "$ref": "#/definitions/name" } }, "items": { - "$ref": "#/definitions/avroSchema_v1/definitions/types" + "$ref": "#/definitions/types" } }, "required": [ @@ -1738,10 +1738,10 @@ "const": "map" }, "name": { - "$ref": "#/definitions/avroSchema_v1/definitions/name" + "$ref": "#/definitions/name" }, "namespace": { - "$ref": "#/definitions/avroSchema_v1/definitions/namespace" + "$ref": "#/definitions/namespace" }, "doc": { "type": "string" @@ -1749,11 +1749,11 @@ "aliases": { "type": "array", "items": { - "$ref": "#/definitions/avroSchema_v1/definitions/name" + "$ref": "#/definitions/name" } }, "values": { - "$ref": "#/definitions/avroSchema_v1/definitions/types" + "$ref": "#/definitions/types" } }, "required": [ @@ -1771,10 +1771,10 @@ "const": "fixed" }, "name": { - "$ref": "#/definitions/avroSchema_v1/definitions/name" + "$ref": "#/definitions/name" }, "namespace": { - "$ref": "#/definitions/avroSchema_v1/definitions/namespace" + "$ref": "#/definitions/namespace" }, "doc": { "type": "string" @@ -1782,7 +1782,7 @@ "aliases": { "type": "array", "items": { - "$ref": "#/definitions/avroSchema_v1/definitions/name" + "$ref": "#/definitions/name" } }, "size": { @@ -1807,7 +1807,7 @@ "description": "Json-Schema definition for Avro AVSC files.", "oneOf": [ { - "$ref": "#/definitions/avroSchema_v1/definitions/avroSchema" + "$ref": "#/definitions/avroSchema" } ], "title": "Avro Schema Definition" diff --git a/schemas/2.2.0-without-$id.json b/schemas/2.2.0-without-$id.json index d2306956..8431809b 100644 --- a/schemas/2.2.0-without-$id.json +++ b/schemas/2.2.0-without-$id.json @@ -1360,10 +1360,10 @@ "not": { "oneOf": [ { - "$ref": "#/definitions/openapiSchema_3_0" + "$ref": "#" }, { - "$ref": "#/definitions/openapiSchema_3_0/definitions/Reference" + "$ref": "#/definitions/Reference" } ] }, @@ -1372,10 +1372,10 @@ "items": { "oneOf": [ { - "$ref": "#/definitions/openapiSchema_3_0" + "$ref": "#" }, { - "$ref": "#/definitions/openapiSchema_3_0/definitions/Reference" + "$ref": "#/definitions/Reference" } ] } @@ -1385,10 +1385,10 @@ "items": { "oneOf": [ { - "$ref": "#/definitions/openapiSchema_3_0" + "$ref": "#" }, { - "$ref": "#/definitions/openapiSchema_3_0/definitions/Reference" + "$ref": "#/definitions/Reference" } ] } @@ -1398,10 +1398,10 @@ "items": { "oneOf": [ { - "$ref": "#/definitions/openapiSchema_3_0" + "$ref": "#" }, { - "$ref": "#/definitions/openapiSchema_3_0/definitions/Reference" + "$ref": "#/definitions/Reference" } ] } @@ -1409,10 +1409,10 @@ "items": { "oneOf": [ { - "$ref": "#/definitions/openapiSchema_3_0" + "$ref": "#" }, { - "$ref": "#/definitions/openapiSchema_3_0/definitions/Reference" + "$ref": "#/definitions/Reference" } ] }, @@ -1421,10 +1421,10 @@ "additionalProperties": { "oneOf": [ { - "$ref": "#/definitions/openapiSchema_3_0" + "$ref": "#" }, { - "$ref": "#/definitions/openapiSchema_3_0/definitions/Reference" + "$ref": "#/definitions/Reference" } ] } @@ -1432,10 +1432,10 @@ "additionalProperties": { "oneOf": [ { - "$ref": "#/definitions/openapiSchema_3_0" + "$ref": "#" }, { - "$ref": "#/definitions/openapiSchema_3_0/definitions/Reference" + "$ref": "#/definitions/Reference" }, { "type": "boolean" @@ -1455,7 +1455,7 @@ "default": false }, "discriminator": { - "$ref": "#/definitions/openapiSchema_3_0/definitions/Discriminator" + "$ref": "#/definitions/Discriminator" }, "readOnly": { "type": "boolean", @@ -1467,14 +1467,14 @@ }, "example": true, "externalDocs": { - "$ref": "#/definitions/openapiSchema_3_0/definitions/ExternalDocumentation" + "$ref": "#/definitions/ExternalDocumentation" }, "deprecated": { "type": "boolean", "default": false }, "xml": { - "$ref": "#/definitions/openapiSchema_3_0/definitions/XML" + "$ref": "#/definitions/XML" } }, "patternProperties": { @@ -1489,7 +1489,7 @@ "description": "Root Schema", "oneOf": [ { - "$ref": "#/definitions/avroSchema_v1/definitions/types" + "$ref": "#/definitions/types" } ] }, @@ -1498,31 +1498,31 @@ "description": "Allowed Avro types", "oneOf": [ { - "$ref": "#/definitions/avroSchema_v1/definitions/primitiveType" + "$ref": "#/definitions/primitiveType" }, { - "$ref": "#/definitions/avroSchema_v1/definitions/primitiveTypeWithMetadata" + "$ref": "#/definitions/primitiveTypeWithMetadata" }, { - "$ref": "#/definitions/avroSchema_v1/definitions/customTypeReference" + "$ref": "#/definitions/customTypeReference" }, { - "$ref": "#/definitions/avroSchema_v1/definitions/avroRecord" + "$ref": "#/definitions/avroRecord" }, { - "$ref": "#/definitions/avroSchema_v1/definitions/avroEnum" + "$ref": "#/definitions/avroEnum" }, { - "$ref": "#/definitions/avroSchema_v1/definitions/avroArray" + "$ref": "#/definitions/avroArray" }, { - "$ref": "#/definitions/avroSchema_v1/definitions/avroMap" + "$ref": "#/definitions/avroMap" }, { - "$ref": "#/definitions/avroSchema_v1/definitions/avroFixed" + "$ref": "#/definitions/avroFixed" }, { - "$ref": "#/definitions/avroSchema_v1/definitions/avroUnion" + "$ref": "#/definitions/avroUnion" } ] }, @@ -1547,7 +1547,7 @@ "type": "object", "properties": { "type": { - "$ref": "#/definitions/avroSchema_v1/definitions/primitiveType" + "$ref": "#/definitions/primitiveType" } }, "required": [ @@ -1558,7 +1558,7 @@ "title": "Custom Type", "description": "Reference to a ComplexType", "not": { - "$ref": "#/definitions/avroSchema_v1/definitions/primitiveType" + "$ref": "#/definitions/primitiveType" }, "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]*(\\.[A-Za-z_][A-Za-z0-9_]*)*$" @@ -1568,7 +1568,7 @@ "description": "A Union of types", "type": "array", "items": { - "$ref": "#/definitions/avroSchema_v1/definitions/avroSchema" + "$ref": "#/definitions/avroSchema" }, "minItems": 1 }, @@ -1578,10 +1578,10 @@ "type": "object", "properties": { "name": { - "$ref": "#/definitions/avroSchema_v1/definitions/name" + "$ref": "#/definitions/name" }, "type": { - "$ref": "#/definitions/avroSchema_v1/definitions/types" + "$ref": "#/definitions/types" }, "doc": { "type": "string" @@ -1597,7 +1597,7 @@ "aliases": { "type": "array", "items": { - "$ref": "#/definitions/avroSchema_v1/definitions/name" + "$ref": "#/definitions/name" } } }, @@ -1616,10 +1616,10 @@ "const": "record" }, "name": { - "$ref": "#/definitions/avroSchema_v1/definitions/name" + "$ref": "#/definitions/name" }, "namespace": { - "$ref": "#/definitions/avroSchema_v1/definitions/namespace" + "$ref": "#/definitions/namespace" }, "doc": { "type": "string" @@ -1627,13 +1627,13 @@ "aliases": { "type": "array", "items": { - "$ref": "#/definitions/avroSchema_v1/definitions/name" + "$ref": "#/definitions/name" } }, "fields": { "type": "array", "items": { - "$ref": "#/definitions/avroSchema_v1/definitions/avroField" + "$ref": "#/definitions/avroField" } } }, @@ -1653,10 +1653,10 @@ "const": "enum" }, "name": { - "$ref": "#/definitions/avroSchema_v1/definitions/name" + "$ref": "#/definitions/name" }, "namespace": { - "$ref": "#/definitions/avroSchema_v1/definitions/namespace" + "$ref": "#/definitions/namespace" }, "doc": { "type": "string" @@ -1664,13 +1664,13 @@ "aliases": { "type": "array", "items": { - "$ref": "#/definitions/avroSchema_v1/definitions/name" + "$ref": "#/definitions/name" } }, "symbols": { "type": "array", "items": { - "$ref": "#/definitions/avroSchema_v1/definitions/name" + "$ref": "#/definitions/name" } } }, @@ -1690,10 +1690,10 @@ "const": "array" }, "name": { - "$ref": "#/definitions/avroSchema_v1/definitions/name" + "$ref": "#/definitions/name" }, "namespace": { - "$ref": "#/definitions/avroSchema_v1/definitions/namespace" + "$ref": "#/definitions/namespace" }, "doc": { "type": "string" @@ -1701,11 +1701,11 @@ "aliases": { "type": "array", "items": { - "$ref": "#/definitions/avroSchema_v1/definitions/name" + "$ref": "#/definitions/name" } }, "items": { - "$ref": "#/definitions/avroSchema_v1/definitions/types" + "$ref": "#/definitions/types" } }, "required": [ @@ -1723,10 +1723,10 @@ "const": "map" }, "name": { - "$ref": "#/definitions/avroSchema_v1/definitions/name" + "$ref": "#/definitions/name" }, "namespace": { - "$ref": "#/definitions/avroSchema_v1/definitions/namespace" + "$ref": "#/definitions/namespace" }, "doc": { "type": "string" @@ -1734,11 +1734,11 @@ "aliases": { "type": "array", "items": { - "$ref": "#/definitions/avroSchema_v1/definitions/name" + "$ref": "#/definitions/name" } }, "values": { - "$ref": "#/definitions/avroSchema_v1/definitions/types" + "$ref": "#/definitions/types" } }, "required": [ @@ -1756,10 +1756,10 @@ "const": "fixed" }, "name": { - "$ref": "#/definitions/avroSchema_v1/definitions/name" + "$ref": "#/definitions/name" }, "namespace": { - "$ref": "#/definitions/avroSchema_v1/definitions/namespace" + "$ref": "#/definitions/namespace" }, "doc": { "type": "string" @@ -1767,7 +1767,7 @@ "aliases": { "type": "array", "items": { - "$ref": "#/definitions/avroSchema_v1/definitions/name" + "$ref": "#/definitions/name" } }, "size": { @@ -1792,7 +1792,7 @@ "description": "Json-Schema definition for Avro AVSC files.", "oneOf": [ { - "$ref": "#/definitions/avroSchema_v1/definitions/avroSchema" + "$ref": "#/definitions/avroSchema" } ], "title": "Avro Schema Definition" diff --git a/schemas/2.3.0-without-$id.json b/schemas/2.3.0-without-$id.json index e55f77bf..ed91459c 100644 --- a/schemas/2.3.0-without-$id.json +++ b/schemas/2.3.0-without-$id.json @@ -1375,10 +1375,10 @@ "not": { "oneOf": [ { - "$ref": "#/definitions/openapiSchema_3_0" + "$ref": "#" }, { - "$ref": "#/definitions/openapiSchema_3_0/definitions/Reference" + "$ref": "#/definitions/Reference" } ] }, @@ -1387,10 +1387,10 @@ "items": { "oneOf": [ { - "$ref": "#/definitions/openapiSchema_3_0" + "$ref": "#" }, { - "$ref": "#/definitions/openapiSchema_3_0/definitions/Reference" + "$ref": "#/definitions/Reference" } ] } @@ -1400,10 +1400,10 @@ "items": { "oneOf": [ { - "$ref": "#/definitions/openapiSchema_3_0" + "$ref": "#" }, { - "$ref": "#/definitions/openapiSchema_3_0/definitions/Reference" + "$ref": "#/definitions/Reference" } ] } @@ -1413,10 +1413,10 @@ "items": { "oneOf": [ { - "$ref": "#/definitions/openapiSchema_3_0" + "$ref": "#" }, { - "$ref": "#/definitions/openapiSchema_3_0/definitions/Reference" + "$ref": "#/definitions/Reference" } ] } @@ -1424,10 +1424,10 @@ "items": { "oneOf": [ { - "$ref": "#/definitions/openapiSchema_3_0" + "$ref": "#" }, { - "$ref": "#/definitions/openapiSchema_3_0/definitions/Reference" + "$ref": "#/definitions/Reference" } ] }, @@ -1436,10 +1436,10 @@ "additionalProperties": { "oneOf": [ { - "$ref": "#/definitions/openapiSchema_3_0" + "$ref": "#" }, { - "$ref": "#/definitions/openapiSchema_3_0/definitions/Reference" + "$ref": "#/definitions/Reference" } ] } @@ -1447,10 +1447,10 @@ "additionalProperties": { "oneOf": [ { - "$ref": "#/definitions/openapiSchema_3_0" + "$ref": "#" }, { - "$ref": "#/definitions/openapiSchema_3_0/definitions/Reference" + "$ref": "#/definitions/Reference" }, { "type": "boolean" @@ -1470,7 +1470,7 @@ "default": false }, "discriminator": { - "$ref": "#/definitions/openapiSchema_3_0/definitions/Discriminator" + "$ref": "#/definitions/Discriminator" }, "readOnly": { "type": "boolean", @@ -1482,14 +1482,14 @@ }, "example": true, "externalDocs": { - "$ref": "#/definitions/openapiSchema_3_0/definitions/ExternalDocumentation" + "$ref": "#/definitions/ExternalDocumentation" }, "deprecated": { "type": "boolean", "default": false }, "xml": { - "$ref": "#/definitions/openapiSchema_3_0/definitions/XML" + "$ref": "#/definitions/XML" } }, "patternProperties": { @@ -1504,7 +1504,7 @@ "description": "Root Schema", "oneOf": [ { - "$ref": "#/definitions/avroSchema_v1/definitions/types" + "$ref": "#/definitions/types" } ] }, @@ -1513,31 +1513,31 @@ "description": "Allowed Avro types", "oneOf": [ { - "$ref": "#/definitions/avroSchema_v1/definitions/primitiveType" + "$ref": "#/definitions/primitiveType" }, { - "$ref": "#/definitions/avroSchema_v1/definitions/primitiveTypeWithMetadata" + "$ref": "#/definitions/primitiveTypeWithMetadata" }, { - "$ref": "#/definitions/avroSchema_v1/definitions/customTypeReference" + "$ref": "#/definitions/customTypeReference" }, { - "$ref": "#/definitions/avroSchema_v1/definitions/avroRecord" + "$ref": "#/definitions/avroRecord" }, { - "$ref": "#/definitions/avroSchema_v1/definitions/avroEnum" + "$ref": "#/definitions/avroEnum" }, { - "$ref": "#/definitions/avroSchema_v1/definitions/avroArray" + "$ref": "#/definitions/avroArray" }, { - "$ref": "#/definitions/avroSchema_v1/definitions/avroMap" + "$ref": "#/definitions/avroMap" }, { - "$ref": "#/definitions/avroSchema_v1/definitions/avroFixed" + "$ref": "#/definitions/avroFixed" }, { - "$ref": "#/definitions/avroSchema_v1/definitions/avroUnion" + "$ref": "#/definitions/avroUnion" } ] }, @@ -1562,7 +1562,7 @@ "type": "object", "properties": { "type": { - "$ref": "#/definitions/avroSchema_v1/definitions/primitiveType" + "$ref": "#/definitions/primitiveType" } }, "required": [ @@ -1573,7 +1573,7 @@ "title": "Custom Type", "description": "Reference to a ComplexType", "not": { - "$ref": "#/definitions/avroSchema_v1/definitions/primitiveType" + "$ref": "#/definitions/primitiveType" }, "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]*(\\.[A-Za-z_][A-Za-z0-9_]*)*$" @@ -1583,7 +1583,7 @@ "description": "A Union of types", "type": "array", "items": { - "$ref": "#/definitions/avroSchema_v1/definitions/avroSchema" + "$ref": "#/definitions/avroSchema" }, "minItems": 1 }, @@ -1593,10 +1593,10 @@ "type": "object", "properties": { "name": { - "$ref": "#/definitions/avroSchema_v1/definitions/name" + "$ref": "#/definitions/name" }, "type": { - "$ref": "#/definitions/avroSchema_v1/definitions/types" + "$ref": "#/definitions/types" }, "doc": { "type": "string" @@ -1612,7 +1612,7 @@ "aliases": { "type": "array", "items": { - "$ref": "#/definitions/avroSchema_v1/definitions/name" + "$ref": "#/definitions/name" } } }, @@ -1631,10 +1631,10 @@ "const": "record" }, "name": { - "$ref": "#/definitions/avroSchema_v1/definitions/name" + "$ref": "#/definitions/name" }, "namespace": { - "$ref": "#/definitions/avroSchema_v1/definitions/namespace" + "$ref": "#/definitions/namespace" }, "doc": { "type": "string" @@ -1642,13 +1642,13 @@ "aliases": { "type": "array", "items": { - "$ref": "#/definitions/avroSchema_v1/definitions/name" + "$ref": "#/definitions/name" } }, "fields": { "type": "array", "items": { - "$ref": "#/definitions/avroSchema_v1/definitions/avroField" + "$ref": "#/definitions/avroField" } } }, @@ -1668,10 +1668,10 @@ "const": "enum" }, "name": { - "$ref": "#/definitions/avroSchema_v1/definitions/name" + "$ref": "#/definitions/name" }, "namespace": { - "$ref": "#/definitions/avroSchema_v1/definitions/namespace" + "$ref": "#/definitions/namespace" }, "doc": { "type": "string" @@ -1679,13 +1679,13 @@ "aliases": { "type": "array", "items": { - "$ref": "#/definitions/avroSchema_v1/definitions/name" + "$ref": "#/definitions/name" } }, "symbols": { "type": "array", "items": { - "$ref": "#/definitions/avroSchema_v1/definitions/name" + "$ref": "#/definitions/name" } } }, @@ -1705,10 +1705,10 @@ "const": "array" }, "name": { - "$ref": "#/definitions/avroSchema_v1/definitions/name" + "$ref": "#/definitions/name" }, "namespace": { - "$ref": "#/definitions/avroSchema_v1/definitions/namespace" + "$ref": "#/definitions/namespace" }, "doc": { "type": "string" @@ -1716,11 +1716,11 @@ "aliases": { "type": "array", "items": { - "$ref": "#/definitions/avroSchema_v1/definitions/name" + "$ref": "#/definitions/name" } }, "items": { - "$ref": "#/definitions/avroSchema_v1/definitions/types" + "$ref": "#/definitions/types" } }, "required": [ @@ -1738,10 +1738,10 @@ "const": "map" }, "name": { - "$ref": "#/definitions/avroSchema_v1/definitions/name" + "$ref": "#/definitions/name" }, "namespace": { - "$ref": "#/definitions/avroSchema_v1/definitions/namespace" + "$ref": "#/definitions/namespace" }, "doc": { "type": "string" @@ -1749,11 +1749,11 @@ "aliases": { "type": "array", "items": { - "$ref": "#/definitions/avroSchema_v1/definitions/name" + "$ref": "#/definitions/name" } }, "values": { - "$ref": "#/definitions/avroSchema_v1/definitions/types" + "$ref": "#/definitions/types" } }, "required": [ @@ -1771,10 +1771,10 @@ "const": "fixed" }, "name": { - "$ref": "#/definitions/avroSchema_v1/definitions/name" + "$ref": "#/definitions/name" }, "namespace": { - "$ref": "#/definitions/avroSchema_v1/definitions/namespace" + "$ref": "#/definitions/namespace" }, "doc": { "type": "string" @@ -1782,7 +1782,7 @@ "aliases": { "type": "array", "items": { - "$ref": "#/definitions/avroSchema_v1/definitions/name" + "$ref": "#/definitions/name" } }, "size": { @@ -1807,7 +1807,7 @@ "description": "Json-Schema definition for Avro AVSC files.", "oneOf": [ { - "$ref": "#/definitions/avroSchema_v1/definitions/avroSchema" + "$ref": "#/definitions/avroSchema" } ], "title": "Avro Schema Definition" diff --git a/schemas/2.4.0-without-$id.json b/schemas/2.4.0-without-$id.json index a1b83162..355e355b 100644 --- a/schemas/2.4.0-without-$id.json +++ b/schemas/2.4.0-without-$id.json @@ -1396,10 +1396,10 @@ "not": { "oneOf": [ { - "$ref": "#/definitions/openapiSchema_3_0" + "$ref": "#" }, { - "$ref": "#/definitions/openapiSchema_3_0/definitions/Reference" + "$ref": "#/definitions/Reference" } ] }, @@ -1408,10 +1408,10 @@ "items": { "oneOf": [ { - "$ref": "#/definitions/openapiSchema_3_0" + "$ref": "#" }, { - "$ref": "#/definitions/openapiSchema_3_0/definitions/Reference" + "$ref": "#/definitions/Reference" } ] } @@ -1421,10 +1421,10 @@ "items": { "oneOf": [ { - "$ref": "#/definitions/openapiSchema_3_0" + "$ref": "#" }, { - "$ref": "#/definitions/openapiSchema_3_0/definitions/Reference" + "$ref": "#/definitions/Reference" } ] } @@ -1434,10 +1434,10 @@ "items": { "oneOf": [ { - "$ref": "#/definitions/openapiSchema_3_0" + "$ref": "#" }, { - "$ref": "#/definitions/openapiSchema_3_0/definitions/Reference" + "$ref": "#/definitions/Reference" } ] } @@ -1445,10 +1445,10 @@ "items": { "oneOf": [ { - "$ref": "#/definitions/openapiSchema_3_0" + "$ref": "#" }, { - "$ref": "#/definitions/openapiSchema_3_0/definitions/Reference" + "$ref": "#/definitions/Reference" } ] }, @@ -1457,10 +1457,10 @@ "additionalProperties": { "oneOf": [ { - "$ref": "#/definitions/openapiSchema_3_0" + "$ref": "#" }, { - "$ref": "#/definitions/openapiSchema_3_0/definitions/Reference" + "$ref": "#/definitions/Reference" } ] } @@ -1468,10 +1468,10 @@ "additionalProperties": { "oneOf": [ { - "$ref": "#/definitions/openapiSchema_3_0" + "$ref": "#" }, { - "$ref": "#/definitions/openapiSchema_3_0/definitions/Reference" + "$ref": "#/definitions/Reference" }, { "type": "boolean" @@ -1491,7 +1491,7 @@ "default": false }, "discriminator": { - "$ref": "#/definitions/openapiSchema_3_0/definitions/Discriminator" + "$ref": "#/definitions/Discriminator" }, "readOnly": { "type": "boolean", @@ -1503,14 +1503,14 @@ }, "example": true, "externalDocs": { - "$ref": "#/definitions/openapiSchema_3_0/definitions/ExternalDocumentation" + "$ref": "#/definitions/ExternalDocumentation" }, "deprecated": { "type": "boolean", "default": false }, "xml": { - "$ref": "#/definitions/openapiSchema_3_0/definitions/XML" + "$ref": "#/definitions/XML" } }, "patternProperties": { @@ -1525,7 +1525,7 @@ "description": "Root Schema", "oneOf": [ { - "$ref": "#/definitions/avroSchema_v1/definitions/types" + "$ref": "#/definitions/types" } ] }, @@ -1534,31 +1534,31 @@ "description": "Allowed Avro types", "oneOf": [ { - "$ref": "#/definitions/avroSchema_v1/definitions/primitiveType" + "$ref": "#/definitions/primitiveType" }, { - "$ref": "#/definitions/avroSchema_v1/definitions/primitiveTypeWithMetadata" + "$ref": "#/definitions/primitiveTypeWithMetadata" }, { - "$ref": "#/definitions/avroSchema_v1/definitions/customTypeReference" + "$ref": "#/definitions/customTypeReference" }, { - "$ref": "#/definitions/avroSchema_v1/definitions/avroRecord" + "$ref": "#/definitions/avroRecord" }, { - "$ref": "#/definitions/avroSchema_v1/definitions/avroEnum" + "$ref": "#/definitions/avroEnum" }, { - "$ref": "#/definitions/avroSchema_v1/definitions/avroArray" + "$ref": "#/definitions/avroArray" }, { - "$ref": "#/definitions/avroSchema_v1/definitions/avroMap" + "$ref": "#/definitions/avroMap" }, { - "$ref": "#/definitions/avroSchema_v1/definitions/avroFixed" + "$ref": "#/definitions/avroFixed" }, { - "$ref": "#/definitions/avroSchema_v1/definitions/avroUnion" + "$ref": "#/definitions/avroUnion" } ] }, @@ -1583,7 +1583,7 @@ "type": "object", "properties": { "type": { - "$ref": "#/definitions/avroSchema_v1/definitions/primitiveType" + "$ref": "#/definitions/primitiveType" } }, "required": [ @@ -1594,7 +1594,7 @@ "title": "Custom Type", "description": "Reference to a ComplexType", "not": { - "$ref": "#/definitions/avroSchema_v1/definitions/primitiveType" + "$ref": "#/definitions/primitiveType" }, "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]*(\\.[A-Za-z_][A-Za-z0-9_]*)*$" @@ -1604,7 +1604,7 @@ "description": "A Union of types", "type": "array", "items": { - "$ref": "#/definitions/avroSchema_v1/definitions/avroSchema" + "$ref": "#/definitions/avroSchema" }, "minItems": 1 }, @@ -1614,10 +1614,10 @@ "type": "object", "properties": { "name": { - "$ref": "#/definitions/avroSchema_v1/definitions/name" + "$ref": "#/definitions/name" }, "type": { - "$ref": "#/definitions/avroSchema_v1/definitions/types" + "$ref": "#/definitions/types" }, "doc": { "type": "string" @@ -1633,7 +1633,7 @@ "aliases": { "type": "array", "items": { - "$ref": "#/definitions/avroSchema_v1/definitions/name" + "$ref": "#/definitions/name" } } }, @@ -1652,10 +1652,10 @@ "const": "record" }, "name": { - "$ref": "#/definitions/avroSchema_v1/definitions/name" + "$ref": "#/definitions/name" }, "namespace": { - "$ref": "#/definitions/avroSchema_v1/definitions/namespace" + "$ref": "#/definitions/namespace" }, "doc": { "type": "string" @@ -1663,13 +1663,13 @@ "aliases": { "type": "array", "items": { - "$ref": "#/definitions/avroSchema_v1/definitions/name" + "$ref": "#/definitions/name" } }, "fields": { "type": "array", "items": { - "$ref": "#/definitions/avroSchema_v1/definitions/avroField" + "$ref": "#/definitions/avroField" } } }, @@ -1689,10 +1689,10 @@ "const": "enum" }, "name": { - "$ref": "#/definitions/avroSchema_v1/definitions/name" + "$ref": "#/definitions/name" }, "namespace": { - "$ref": "#/definitions/avroSchema_v1/definitions/namespace" + "$ref": "#/definitions/namespace" }, "doc": { "type": "string" @@ -1700,13 +1700,13 @@ "aliases": { "type": "array", "items": { - "$ref": "#/definitions/avroSchema_v1/definitions/name" + "$ref": "#/definitions/name" } }, "symbols": { "type": "array", "items": { - "$ref": "#/definitions/avroSchema_v1/definitions/name" + "$ref": "#/definitions/name" } } }, @@ -1726,10 +1726,10 @@ "const": "array" }, "name": { - "$ref": "#/definitions/avroSchema_v1/definitions/name" + "$ref": "#/definitions/name" }, "namespace": { - "$ref": "#/definitions/avroSchema_v1/definitions/namespace" + "$ref": "#/definitions/namespace" }, "doc": { "type": "string" @@ -1737,11 +1737,11 @@ "aliases": { "type": "array", "items": { - "$ref": "#/definitions/avroSchema_v1/definitions/name" + "$ref": "#/definitions/name" } }, "items": { - "$ref": "#/definitions/avroSchema_v1/definitions/types" + "$ref": "#/definitions/types" } }, "required": [ @@ -1759,10 +1759,10 @@ "const": "map" }, "name": { - "$ref": "#/definitions/avroSchema_v1/definitions/name" + "$ref": "#/definitions/name" }, "namespace": { - "$ref": "#/definitions/avroSchema_v1/definitions/namespace" + "$ref": "#/definitions/namespace" }, "doc": { "type": "string" @@ -1770,11 +1770,11 @@ "aliases": { "type": "array", "items": { - "$ref": "#/definitions/avroSchema_v1/definitions/name" + "$ref": "#/definitions/name" } }, "values": { - "$ref": "#/definitions/avroSchema_v1/definitions/types" + "$ref": "#/definitions/types" } }, "required": [ @@ -1792,10 +1792,10 @@ "const": "fixed" }, "name": { - "$ref": "#/definitions/avroSchema_v1/definitions/name" + "$ref": "#/definitions/name" }, "namespace": { - "$ref": "#/definitions/avroSchema_v1/definitions/namespace" + "$ref": "#/definitions/namespace" }, "doc": { "type": "string" @@ -1803,7 +1803,7 @@ "aliases": { "type": "array", "items": { - "$ref": "#/definitions/avroSchema_v1/definitions/name" + "$ref": "#/definitions/name" } }, "size": { @@ -1828,7 +1828,7 @@ "description": "Json-Schema definition for Avro AVSC files.", "oneOf": [ { - "$ref": "#/definitions/avroSchema_v1/definitions/avroSchema" + "$ref": "#/definitions/avroSchema" } ], "title": "Avro Schema Definition" diff --git a/schemas/2.5.0-without-$id.json b/schemas/2.5.0-without-$id.json index bd49a22e..d01ca4c1 100644 --- a/schemas/2.5.0-without-$id.json +++ b/schemas/2.5.0-without-$id.json @@ -1410,10 +1410,10 @@ "not": { "oneOf": [ { - "$ref": "#/definitions/openapiSchema_3_0" + "$ref": "#" }, { - "$ref": "#/definitions/openapiSchema_3_0/definitions/Reference" + "$ref": "#/definitions/Reference" } ] }, @@ -1422,10 +1422,10 @@ "items": { "oneOf": [ { - "$ref": "#/definitions/openapiSchema_3_0" + "$ref": "#" }, { - "$ref": "#/definitions/openapiSchema_3_0/definitions/Reference" + "$ref": "#/definitions/Reference" } ] } @@ -1435,10 +1435,10 @@ "items": { "oneOf": [ { - "$ref": "#/definitions/openapiSchema_3_0" + "$ref": "#" }, { - "$ref": "#/definitions/openapiSchema_3_0/definitions/Reference" + "$ref": "#/definitions/Reference" } ] } @@ -1448,10 +1448,10 @@ "items": { "oneOf": [ { - "$ref": "#/definitions/openapiSchema_3_0" + "$ref": "#" }, { - "$ref": "#/definitions/openapiSchema_3_0/definitions/Reference" + "$ref": "#/definitions/Reference" } ] } @@ -1459,10 +1459,10 @@ "items": { "oneOf": [ { - "$ref": "#/definitions/openapiSchema_3_0" + "$ref": "#" }, { - "$ref": "#/definitions/openapiSchema_3_0/definitions/Reference" + "$ref": "#/definitions/Reference" } ] }, @@ -1471,10 +1471,10 @@ "additionalProperties": { "oneOf": [ { - "$ref": "#/definitions/openapiSchema_3_0" + "$ref": "#" }, { - "$ref": "#/definitions/openapiSchema_3_0/definitions/Reference" + "$ref": "#/definitions/Reference" } ] } @@ -1482,10 +1482,10 @@ "additionalProperties": { "oneOf": [ { - "$ref": "#/definitions/openapiSchema_3_0" + "$ref": "#" }, { - "$ref": "#/definitions/openapiSchema_3_0/definitions/Reference" + "$ref": "#/definitions/Reference" }, { "type": "boolean" @@ -1505,7 +1505,7 @@ "default": false }, "discriminator": { - "$ref": "#/definitions/openapiSchema_3_0/definitions/Discriminator" + "$ref": "#/definitions/Discriminator" }, "readOnly": { "type": "boolean", @@ -1517,14 +1517,14 @@ }, "example": true, "externalDocs": { - "$ref": "#/definitions/openapiSchema_3_0/definitions/ExternalDocumentation" + "$ref": "#/definitions/ExternalDocumentation" }, "deprecated": { "type": "boolean", "default": false }, "xml": { - "$ref": "#/definitions/openapiSchema_3_0/definitions/XML" + "$ref": "#/definitions/XML" } }, "patternProperties": { @@ -1539,7 +1539,7 @@ "description": "Root Schema", "oneOf": [ { - "$ref": "#/definitions/avroSchema_v1/definitions/types" + "$ref": "#/definitions/types" } ] }, @@ -1548,31 +1548,31 @@ "description": "Allowed Avro types", "oneOf": [ { - "$ref": "#/definitions/avroSchema_v1/definitions/primitiveType" + "$ref": "#/definitions/primitiveType" }, { - "$ref": "#/definitions/avroSchema_v1/definitions/primitiveTypeWithMetadata" + "$ref": "#/definitions/primitiveTypeWithMetadata" }, { - "$ref": "#/definitions/avroSchema_v1/definitions/customTypeReference" + "$ref": "#/definitions/customTypeReference" }, { - "$ref": "#/definitions/avroSchema_v1/definitions/avroRecord" + "$ref": "#/definitions/avroRecord" }, { - "$ref": "#/definitions/avroSchema_v1/definitions/avroEnum" + "$ref": "#/definitions/avroEnum" }, { - "$ref": "#/definitions/avroSchema_v1/definitions/avroArray" + "$ref": "#/definitions/avroArray" }, { - "$ref": "#/definitions/avroSchema_v1/definitions/avroMap" + "$ref": "#/definitions/avroMap" }, { - "$ref": "#/definitions/avroSchema_v1/definitions/avroFixed" + "$ref": "#/definitions/avroFixed" }, { - "$ref": "#/definitions/avroSchema_v1/definitions/avroUnion" + "$ref": "#/definitions/avroUnion" } ] }, @@ -1597,7 +1597,7 @@ "type": "object", "properties": { "type": { - "$ref": "#/definitions/avroSchema_v1/definitions/primitiveType" + "$ref": "#/definitions/primitiveType" } }, "required": [ @@ -1608,7 +1608,7 @@ "title": "Custom Type", "description": "Reference to a ComplexType", "not": { - "$ref": "#/definitions/avroSchema_v1/definitions/primitiveType" + "$ref": "#/definitions/primitiveType" }, "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]*(\\.[A-Za-z_][A-Za-z0-9_]*)*$" @@ -1618,7 +1618,7 @@ "description": "A Union of types", "type": "array", "items": { - "$ref": "#/definitions/avroSchema_v1/definitions/avroSchema" + "$ref": "#/definitions/avroSchema" }, "minItems": 1 }, @@ -1628,10 +1628,10 @@ "type": "object", "properties": { "name": { - "$ref": "#/definitions/avroSchema_v1/definitions/name" + "$ref": "#/definitions/name" }, "type": { - "$ref": "#/definitions/avroSchema_v1/definitions/types" + "$ref": "#/definitions/types" }, "doc": { "type": "string" @@ -1647,7 +1647,7 @@ "aliases": { "type": "array", "items": { - "$ref": "#/definitions/avroSchema_v1/definitions/name" + "$ref": "#/definitions/name" } } }, @@ -1666,10 +1666,10 @@ "const": "record" }, "name": { - "$ref": "#/definitions/avroSchema_v1/definitions/name" + "$ref": "#/definitions/name" }, "namespace": { - "$ref": "#/definitions/avroSchema_v1/definitions/namespace" + "$ref": "#/definitions/namespace" }, "doc": { "type": "string" @@ -1677,13 +1677,13 @@ "aliases": { "type": "array", "items": { - "$ref": "#/definitions/avroSchema_v1/definitions/name" + "$ref": "#/definitions/name" } }, "fields": { "type": "array", "items": { - "$ref": "#/definitions/avroSchema_v1/definitions/avroField" + "$ref": "#/definitions/avroField" } } }, @@ -1703,10 +1703,10 @@ "const": "enum" }, "name": { - "$ref": "#/definitions/avroSchema_v1/definitions/name" + "$ref": "#/definitions/name" }, "namespace": { - "$ref": "#/definitions/avroSchema_v1/definitions/namespace" + "$ref": "#/definitions/namespace" }, "doc": { "type": "string" @@ -1714,13 +1714,13 @@ "aliases": { "type": "array", "items": { - "$ref": "#/definitions/avroSchema_v1/definitions/name" + "$ref": "#/definitions/name" } }, "symbols": { "type": "array", "items": { - "$ref": "#/definitions/avroSchema_v1/definitions/name" + "$ref": "#/definitions/name" } } }, @@ -1740,10 +1740,10 @@ "const": "array" }, "name": { - "$ref": "#/definitions/avroSchema_v1/definitions/name" + "$ref": "#/definitions/name" }, "namespace": { - "$ref": "#/definitions/avroSchema_v1/definitions/namespace" + "$ref": "#/definitions/namespace" }, "doc": { "type": "string" @@ -1751,11 +1751,11 @@ "aliases": { "type": "array", "items": { - "$ref": "#/definitions/avroSchema_v1/definitions/name" + "$ref": "#/definitions/name" } }, "items": { - "$ref": "#/definitions/avroSchema_v1/definitions/types" + "$ref": "#/definitions/types" } }, "required": [ @@ -1773,10 +1773,10 @@ "const": "map" }, "name": { - "$ref": "#/definitions/avroSchema_v1/definitions/name" + "$ref": "#/definitions/name" }, "namespace": { - "$ref": "#/definitions/avroSchema_v1/definitions/namespace" + "$ref": "#/definitions/namespace" }, "doc": { "type": "string" @@ -1784,11 +1784,11 @@ "aliases": { "type": "array", "items": { - "$ref": "#/definitions/avroSchema_v1/definitions/name" + "$ref": "#/definitions/name" } }, "values": { - "$ref": "#/definitions/avroSchema_v1/definitions/types" + "$ref": "#/definitions/types" } }, "required": [ @@ -1806,10 +1806,10 @@ "const": "fixed" }, "name": { - "$ref": "#/definitions/avroSchema_v1/definitions/name" + "$ref": "#/definitions/name" }, "namespace": { - "$ref": "#/definitions/avroSchema_v1/definitions/namespace" + "$ref": "#/definitions/namespace" }, "doc": { "type": "string" @@ -1817,7 +1817,7 @@ "aliases": { "type": "array", "items": { - "$ref": "#/definitions/avroSchema_v1/definitions/name" + "$ref": "#/definitions/name" } }, "size": { @@ -1842,7 +1842,7 @@ "description": "Json-Schema definition for Avro AVSC files.", "oneOf": [ { - "$ref": "#/definitions/avroSchema_v1/definitions/avroSchema" + "$ref": "#/definitions/avroSchema" } ], "title": "Avro Schema Definition" diff --git a/schemas/2.6.0-without-$id.json b/schemas/2.6.0-without-$id.json index 6c79b5cc..00c5e4ce 100644 --- a/schemas/2.6.0-without-$id.json +++ b/schemas/2.6.0-without-$id.json @@ -1864,10 +1864,10 @@ "not": { "oneOf": [ { - "$ref": "#/definitions/openapiSchema_3_0" + "$ref": "#" }, { - "$ref": "#/definitions/openapiSchema_3_0/definitions/Reference" + "$ref": "#/definitions/Reference" } ] }, @@ -1876,10 +1876,10 @@ "items": { "oneOf": [ { - "$ref": "#/definitions/openapiSchema_3_0" + "$ref": "#" }, { - "$ref": "#/definitions/openapiSchema_3_0/definitions/Reference" + "$ref": "#/definitions/Reference" } ] } @@ -1889,10 +1889,10 @@ "items": { "oneOf": [ { - "$ref": "#/definitions/openapiSchema_3_0" + "$ref": "#" }, { - "$ref": "#/definitions/openapiSchema_3_0/definitions/Reference" + "$ref": "#/definitions/Reference" } ] } @@ -1902,10 +1902,10 @@ "items": { "oneOf": [ { - "$ref": "#/definitions/openapiSchema_3_0" + "$ref": "#" }, { - "$ref": "#/definitions/openapiSchema_3_0/definitions/Reference" + "$ref": "#/definitions/Reference" } ] } @@ -1913,10 +1913,10 @@ "items": { "oneOf": [ { - "$ref": "#/definitions/openapiSchema_3_0" + "$ref": "#" }, { - "$ref": "#/definitions/openapiSchema_3_0/definitions/Reference" + "$ref": "#/definitions/Reference" } ] }, @@ -1925,10 +1925,10 @@ "additionalProperties": { "oneOf": [ { - "$ref": "#/definitions/openapiSchema_3_0" + "$ref": "#" }, { - "$ref": "#/definitions/openapiSchema_3_0/definitions/Reference" + "$ref": "#/definitions/Reference" } ] } @@ -1936,10 +1936,10 @@ "additionalProperties": { "oneOf": [ { - "$ref": "#/definitions/openapiSchema_3_0" + "$ref": "#" }, { - "$ref": "#/definitions/openapiSchema_3_0/definitions/Reference" + "$ref": "#/definitions/Reference" }, { "type": "boolean" @@ -1959,7 +1959,7 @@ "default": false }, "discriminator": { - "$ref": "#/definitions/openapiSchema_3_0/definitions/Discriminator" + "$ref": "#/definitions/Discriminator" }, "readOnly": { "type": "boolean", @@ -1971,14 +1971,14 @@ }, "example": true, "externalDocs": { - "$ref": "#/definitions/openapiSchema_3_0/definitions/ExternalDocumentation" + "$ref": "#/definitions/ExternalDocumentation" }, "deprecated": { "type": "boolean", "default": false }, "xml": { - "$ref": "#/definitions/openapiSchema_3_0/definitions/XML" + "$ref": "#/definitions/XML" } }, "patternProperties": { @@ -1993,7 +1993,7 @@ "description": "Root Schema", "oneOf": [ { - "$ref": "#/definitions/avroSchema_v1/definitions/types" + "$ref": "#/definitions/types" } ] }, @@ -2002,31 +2002,31 @@ "description": "Allowed Avro types", "oneOf": [ { - "$ref": "#/definitions/avroSchema_v1/definitions/primitiveType" + "$ref": "#/definitions/primitiveType" }, { - "$ref": "#/definitions/avroSchema_v1/definitions/primitiveTypeWithMetadata" + "$ref": "#/definitions/primitiveTypeWithMetadata" }, { - "$ref": "#/definitions/avroSchema_v1/definitions/customTypeReference" + "$ref": "#/definitions/customTypeReference" }, { - "$ref": "#/definitions/avroSchema_v1/definitions/avroRecord" + "$ref": "#/definitions/avroRecord" }, { - "$ref": "#/definitions/avroSchema_v1/definitions/avroEnum" + "$ref": "#/definitions/avroEnum" }, { - "$ref": "#/definitions/avroSchema_v1/definitions/avroArray" + "$ref": "#/definitions/avroArray" }, { - "$ref": "#/definitions/avroSchema_v1/definitions/avroMap" + "$ref": "#/definitions/avroMap" }, { - "$ref": "#/definitions/avroSchema_v1/definitions/avroFixed" + "$ref": "#/definitions/avroFixed" }, { - "$ref": "#/definitions/avroSchema_v1/definitions/avroUnion" + "$ref": "#/definitions/avroUnion" } ] }, @@ -2051,7 +2051,7 @@ "type": "object", "properties": { "type": { - "$ref": "#/definitions/avroSchema_v1/definitions/primitiveType" + "$ref": "#/definitions/primitiveType" } }, "required": [ @@ -2062,7 +2062,7 @@ "title": "Custom Type", "description": "Reference to a ComplexType", "not": { - "$ref": "#/definitions/avroSchema_v1/definitions/primitiveType" + "$ref": "#/definitions/primitiveType" }, "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]*(\\.[A-Za-z_][A-Za-z0-9_]*)*$" @@ -2072,7 +2072,7 @@ "description": "A Union of types", "type": "array", "items": { - "$ref": "#/definitions/avroSchema_v1/definitions/avroSchema" + "$ref": "#/definitions/avroSchema" }, "minItems": 1 }, @@ -2082,10 +2082,10 @@ "type": "object", "properties": { "name": { - "$ref": "#/definitions/avroSchema_v1/definitions/name" + "$ref": "#/definitions/name" }, "type": { - "$ref": "#/definitions/avroSchema_v1/definitions/types" + "$ref": "#/definitions/types" }, "doc": { "type": "string" @@ -2101,7 +2101,7 @@ "aliases": { "type": "array", "items": { - "$ref": "#/definitions/avroSchema_v1/definitions/name" + "$ref": "#/definitions/name" } } }, @@ -2120,10 +2120,10 @@ "const": "record" }, "name": { - "$ref": "#/definitions/avroSchema_v1/definitions/name" + "$ref": "#/definitions/name" }, "namespace": { - "$ref": "#/definitions/avroSchema_v1/definitions/namespace" + "$ref": "#/definitions/namespace" }, "doc": { "type": "string" @@ -2131,13 +2131,13 @@ "aliases": { "type": "array", "items": { - "$ref": "#/definitions/avroSchema_v1/definitions/name" + "$ref": "#/definitions/name" } }, "fields": { "type": "array", "items": { - "$ref": "#/definitions/avroSchema_v1/definitions/avroField" + "$ref": "#/definitions/avroField" } } }, @@ -2157,10 +2157,10 @@ "const": "enum" }, "name": { - "$ref": "#/definitions/avroSchema_v1/definitions/name" + "$ref": "#/definitions/name" }, "namespace": { - "$ref": "#/definitions/avroSchema_v1/definitions/namespace" + "$ref": "#/definitions/namespace" }, "doc": { "type": "string" @@ -2168,13 +2168,13 @@ "aliases": { "type": "array", "items": { - "$ref": "#/definitions/avroSchema_v1/definitions/name" + "$ref": "#/definitions/name" } }, "symbols": { "type": "array", "items": { - "$ref": "#/definitions/avroSchema_v1/definitions/name" + "$ref": "#/definitions/name" } } }, @@ -2194,10 +2194,10 @@ "const": "array" }, "name": { - "$ref": "#/definitions/avroSchema_v1/definitions/name" + "$ref": "#/definitions/name" }, "namespace": { - "$ref": "#/definitions/avroSchema_v1/definitions/namespace" + "$ref": "#/definitions/namespace" }, "doc": { "type": "string" @@ -2205,11 +2205,11 @@ "aliases": { "type": "array", "items": { - "$ref": "#/definitions/avroSchema_v1/definitions/name" + "$ref": "#/definitions/name" } }, "items": { - "$ref": "#/definitions/avroSchema_v1/definitions/types" + "$ref": "#/definitions/types" } }, "required": [ @@ -2227,10 +2227,10 @@ "const": "map" }, "name": { - "$ref": "#/definitions/avroSchema_v1/definitions/name" + "$ref": "#/definitions/name" }, "namespace": { - "$ref": "#/definitions/avroSchema_v1/definitions/namespace" + "$ref": "#/definitions/namespace" }, "doc": { "type": "string" @@ -2238,11 +2238,11 @@ "aliases": { "type": "array", "items": { - "$ref": "#/definitions/avroSchema_v1/definitions/name" + "$ref": "#/definitions/name" } }, "values": { - "$ref": "#/definitions/avroSchema_v1/definitions/types" + "$ref": "#/definitions/types" } }, "required": [ @@ -2260,10 +2260,10 @@ "const": "fixed" }, "name": { - "$ref": "#/definitions/avroSchema_v1/definitions/name" + "$ref": "#/definitions/name" }, "namespace": { - "$ref": "#/definitions/avroSchema_v1/definitions/namespace" + "$ref": "#/definitions/namespace" }, "doc": { "type": "string" @@ -2271,7 +2271,7 @@ "aliases": { "type": "array", "items": { - "$ref": "#/definitions/avroSchema_v1/definitions/name" + "$ref": "#/definitions/name" } }, "size": { @@ -2296,7 +2296,7 @@ "description": "Json-Schema definition for Avro AVSC files.", "oneOf": [ { - "$ref": "#/definitions/avroSchema_v1/definitions/avroSchema" + "$ref": "#/definitions/avroSchema" } ], "title": "Avro Schema Definition" diff --git a/schemas/3.0.0-without-$id.json b/schemas/3.0.0-without-$id.json index 4ca677a4..7fce3081 100644 --- a/schemas/3.0.0-without-$id.json +++ b/schemas/3.0.0-without-$id.json @@ -2714,193 +2714,143 @@ "$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" + ] + } + ] + } + }, + "anyOf": [ + { + "if": { + "not": { + "description": "If no schemaFormat has been defined, default to schema or reference", + "required": [ + "schemaFormat" + ] + } + }, + "then": { + "properties": { + "schema": { + "$ref": "#/definitions/schema" + } + } + } + }, + { + "$ref": "#/definitions/multiFormatAsyncAPISchemaMessage" + }, + { + "$ref": "#/definitions/multiFormatOpenAPIMessage" + }, + { + "$ref": "#/definitions/multiFormatJsonSchemaMessage" + }, + { + "$ref": "#/definitions/multiFormatAvroMessage" + } + ] + }, + "multiFormatAsyncAPISchemaMessage": { "if": { - "not": { - "type": "object" + "description": "If schemaFormat has been defined check if it's one of the AsyncAPI Schema Object formats", + "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" + ] + } } }, "then": { - "$ref": "#/definitions/schema" - }, - "else": { + "properties": { + "schema": { + "$ref": "#/definitions/schema" + } + } + } + }, + "multiFormatOpenAPIMessage": { + "if": { + "required": [ + "schemaFormat" + ], "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" - }, + "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" + ] + } + } + }, + "then": { + "properties": { + "schema": { + "oneOf": [ { - "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" - ] + "$ref": "#/definitions/Reference" }, { - "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" - ] + "$ref": "#/definitions/openapiSchema_3_0" } ] } - }, - "allOf": [ - { - "if": { - "not": { - "description": "If no schemaFormat has been defined, default to schema or reference", - "required": [ - "schemaFormat" - ] - } - }, - "then": { - "properties": { - "schema": { - "$ref": "#/definitions/schema" - } - } - } - }, - { - "if": { - "description": "If schemaFormat has been defined check if it's one of the AsyncAPI Schema Object formats", - "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" - ] - } - } - }, - "then": { - "properties": { - "schema": { - "$ref": "#/definitions/schema" - } - } - } - }, - { - "if": { - "required": [ - "schemaFormat" - ], - "properties": { - "schemaFormat": { - "enum": [ - "application/schema+json;version=draft-07", - "application/schema+yaml;version=draft-07" - ] - } - } - }, - "then": { - "properties": { - "schema": { - "$ref": "#/definitions/json-schema-draft-07-schema" - } - } - } - }, - { - "if": { - "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" - ] - } - } - }, - "then": { - "properties": { - "schema": { - "oneOf": [ - { - "$ref": "#/definitions/Reference" - }, - { - "$ref": "#/definitions/openapiSchema_3_0" - } - ] - } - } - } - }, - { - "if": { - "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" - ] - } - } - }, - "then": { - "properties": { - "schema": { - "oneOf": [ - { - "$ref": "#/definitions/Reference" - }, - { - "$ref": "#/definitions/avroSchema_v1" - } - ] - } - } - } - } - ] + } } }, "openapiSchema_3_0": { @@ -3067,10 +3017,10 @@ "not": { "oneOf": [ { - "$ref": "#/definitions/openapiSchema_3_0" + "$ref": "#" }, { - "$ref": "#/definitions/openapiSchema_3_0/definitions/Reference" + "$ref": "#/definitions/Reference" } ] }, @@ -3079,10 +3029,10 @@ "items": { "oneOf": [ { - "$ref": "#/definitions/openapiSchema_3_0" + "$ref": "#" }, { - "$ref": "#/definitions/openapiSchema_3_0/definitions/Reference" + "$ref": "#/definitions/Reference" } ] } @@ -3092,10 +3042,10 @@ "items": { "oneOf": [ { - "$ref": "#/definitions/openapiSchema_3_0" + "$ref": "#" }, { - "$ref": "#/definitions/openapiSchema_3_0/definitions/Reference" + "$ref": "#/definitions/Reference" } ] } @@ -3105,10 +3055,10 @@ "items": { "oneOf": [ { - "$ref": "#/definitions/openapiSchema_3_0" + "$ref": "#" }, { - "$ref": "#/definitions/openapiSchema_3_0/definitions/Reference" + "$ref": "#/definitions/Reference" } ] } @@ -3116,10 +3066,10 @@ "items": { "oneOf": [ { - "$ref": "#/definitions/openapiSchema_3_0" + "$ref": "#" }, { - "$ref": "#/definitions/openapiSchema_3_0/definitions/Reference" + "$ref": "#/definitions/Reference" } ] }, @@ -3128,10 +3078,10 @@ "additionalProperties": { "oneOf": [ { - "$ref": "#/definitions/openapiSchema_3_0" + "$ref": "#" }, { - "$ref": "#/definitions/openapiSchema_3_0/definitions/Reference" + "$ref": "#/definitions/Reference" } ] } @@ -3139,10 +3089,10 @@ "additionalProperties": { "oneOf": [ { - "$ref": "#/definitions/openapiSchema_3_0" + "$ref": "#" }, { - "$ref": "#/definitions/openapiSchema_3_0/definitions/Reference" + "$ref": "#/definitions/Reference" }, { "type": "boolean" @@ -3162,7 +3112,7 @@ "default": false }, "discriminator": { - "$ref": "#/definitions/openapiSchema_3_0/definitions/Discriminator" + "$ref": "#/definitions/Discriminator" }, "readOnly": { "type": "boolean", @@ -3174,14 +3124,14 @@ }, "example": true, "externalDocs": { - "$ref": "#/definitions/openapiSchema_3_0/definitions/ExternalDocumentation" + "$ref": "#/definitions/ExternalDocumentation" }, "deprecated": { "type": "boolean", "default": false }, "xml": { - "$ref": "#/definitions/openapiSchema_3_0/definitions/XML" + "$ref": "#/definitions/XML" } }, "patternProperties": { @@ -3189,6 +3139,58 @@ }, "additionalProperties": false }, + "multiFormatJsonSchemaMessage": { + "if": { + "required": [ + "schemaFormat" + ], + "properties": { + "schemaFormat": { + "enum": [ + "application/schema+json;version=draft-07", + "application/schema+yaml;version=draft-07" + ] + } + } + }, + "then": { + "properties": { + "schema": { + "$ref": "#/definitions/json-schema-draft-07-schema" + } + } + } + }, + "multiFormatAvroMessage": { + "if": { + "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" + ] + } + } + }, + "then": { + "properties": { + "schema": { + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/avroSchema_v1" + } + ] + } + } + } + }, "avroSchema_v1": { "definitions": { "avroSchema": { @@ -3196,7 +3198,7 @@ "description": "Root Schema", "oneOf": [ { - "$ref": "#/definitions/avroSchema_v1/definitions/types" + "$ref": "#/definitions/types" } ] }, @@ -3205,31 +3207,31 @@ "description": "Allowed Avro types", "oneOf": [ { - "$ref": "#/definitions/avroSchema_v1/definitions/primitiveType" + "$ref": "#/definitions/primitiveType" }, { - "$ref": "#/definitions/avroSchema_v1/definitions/primitiveTypeWithMetadata" + "$ref": "#/definitions/primitiveTypeWithMetadata" }, { - "$ref": "#/definitions/avroSchema_v1/definitions/customTypeReference" + "$ref": "#/definitions/customTypeReference" }, { - "$ref": "#/definitions/avroSchema_v1/definitions/avroRecord" + "$ref": "#/definitions/avroRecord" }, { - "$ref": "#/definitions/avroSchema_v1/definitions/avroEnum" + "$ref": "#/definitions/avroEnum" }, { - "$ref": "#/definitions/avroSchema_v1/definitions/avroArray" + "$ref": "#/definitions/avroArray" }, { - "$ref": "#/definitions/avroSchema_v1/definitions/avroMap" + "$ref": "#/definitions/avroMap" }, { - "$ref": "#/definitions/avroSchema_v1/definitions/avroFixed" + "$ref": "#/definitions/avroFixed" }, { - "$ref": "#/definitions/avroSchema_v1/definitions/avroUnion" + "$ref": "#/definitions/avroUnion" } ] }, @@ -3254,7 +3256,7 @@ "type": "object", "properties": { "type": { - "$ref": "#/definitions/avroSchema_v1/definitions/primitiveType" + "$ref": "#/definitions/primitiveType" } }, "required": [ @@ -3265,7 +3267,7 @@ "title": "Custom Type", "description": "Reference to a ComplexType", "not": { - "$ref": "#/definitions/avroSchema_v1/definitions/primitiveType" + "$ref": "#/definitions/primitiveType" }, "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]*(\\.[A-Za-z_][A-Za-z0-9_]*)*$" @@ -3275,7 +3277,7 @@ "description": "A Union of types", "type": "array", "items": { - "$ref": "#/definitions/avroSchema_v1/definitions/avroSchema" + "$ref": "#/definitions/avroSchema" }, "minItems": 1 }, @@ -3285,10 +3287,10 @@ "type": "object", "properties": { "name": { - "$ref": "#/definitions/avroSchema_v1/definitions/name" + "$ref": "#/definitions/name" }, "type": { - "$ref": "#/definitions/avroSchema_v1/definitions/types" + "$ref": "#/definitions/types" }, "doc": { "type": "string" @@ -3304,7 +3306,7 @@ "aliases": { "type": "array", "items": { - "$ref": "#/definitions/avroSchema_v1/definitions/name" + "$ref": "#/definitions/name" } } }, @@ -3323,10 +3325,10 @@ "const": "record" }, "name": { - "$ref": "#/definitions/avroSchema_v1/definitions/name" + "$ref": "#/definitions/name" }, "namespace": { - "$ref": "#/definitions/avroSchema_v1/definitions/namespace" + "$ref": "#/definitions/namespace" }, "doc": { "type": "string" @@ -3334,13 +3336,13 @@ "aliases": { "type": "array", "items": { - "$ref": "#/definitions/avroSchema_v1/definitions/name" + "$ref": "#/definitions/name" } }, "fields": { "type": "array", "items": { - "$ref": "#/definitions/avroSchema_v1/definitions/avroField" + "$ref": "#/definitions/avroField" } } }, @@ -3360,10 +3362,10 @@ "const": "enum" }, "name": { - "$ref": "#/definitions/avroSchema_v1/definitions/name" + "$ref": "#/definitions/name" }, "namespace": { - "$ref": "#/definitions/avroSchema_v1/definitions/namespace" + "$ref": "#/definitions/namespace" }, "doc": { "type": "string" @@ -3371,13 +3373,13 @@ "aliases": { "type": "array", "items": { - "$ref": "#/definitions/avroSchema_v1/definitions/name" + "$ref": "#/definitions/name" } }, "symbols": { "type": "array", "items": { - "$ref": "#/definitions/avroSchema_v1/definitions/name" + "$ref": "#/definitions/name" } } }, @@ -3397,10 +3399,10 @@ "const": "array" }, "name": { - "$ref": "#/definitions/avroSchema_v1/definitions/name" + "$ref": "#/definitions/name" }, "namespace": { - "$ref": "#/definitions/avroSchema_v1/definitions/namespace" + "$ref": "#/definitions/namespace" }, "doc": { "type": "string" @@ -3408,11 +3410,11 @@ "aliases": { "type": "array", "items": { - "$ref": "#/definitions/avroSchema_v1/definitions/name" + "$ref": "#/definitions/name" } }, "items": { - "$ref": "#/definitions/avroSchema_v1/definitions/types" + "$ref": "#/definitions/types" } }, "required": [ @@ -3430,10 +3432,10 @@ "const": "map" }, "name": { - "$ref": "#/definitions/avroSchema_v1/definitions/name" + "$ref": "#/definitions/name" }, "namespace": { - "$ref": "#/definitions/avroSchema_v1/definitions/namespace" + "$ref": "#/definitions/namespace" }, "doc": { "type": "string" @@ -3441,11 +3443,11 @@ "aliases": { "type": "array", "items": { - "$ref": "#/definitions/avroSchema_v1/definitions/name" + "$ref": "#/definitions/name" } }, "values": { - "$ref": "#/definitions/avroSchema_v1/definitions/types" + "$ref": "#/definitions/types" } }, "required": [ @@ -3463,10 +3465,10 @@ "const": "fixed" }, "name": { - "$ref": "#/definitions/avroSchema_v1/definitions/name" + "$ref": "#/definitions/name" }, "namespace": { - "$ref": "#/definitions/avroSchema_v1/definitions/namespace" + "$ref": "#/definitions/namespace" }, "doc": { "type": "string" @@ -3474,7 +3476,7 @@ "aliases": { "type": "array", "items": { - "$ref": "#/definitions/avroSchema_v1/definitions/name" + "$ref": "#/definitions/name" } }, "size": { @@ -3499,7 +3501,7 @@ "description": "Json-Schema definition for Avro AVSC files.", "oneOf": [ { - "$ref": "#/definitions/avroSchema_v1/definitions/avroSchema" + "$ref": "#/definitions/avroSchema" } ], "title": "Avro Schema Definition" diff --git a/schemas/3.0.0.json b/schemas/3.0.0.json index c3bea3c8..faaf4fa2 100644 --- a/schemas/3.0.0.json +++ b/schemas/3.0.0.json @@ -2768,193 +2768,145 @@ "$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" + ] + } + ] + } + }, + "anyOf": [ + { + "if": { + "not": { + "description": "If no schemaFormat has been defined, default to schema or reference", + "required": [ + "schemaFormat" + ] + } + }, + "then": { + "properties": { + "schema": { + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" + } + } + } + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/multiFormatAsyncAPISchemaMessage.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/multiFormatOpenAPIMessage.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/multiFormatJsonSchemaMessage.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/multiFormatAvroMessage.json" + } + ] + }, + "http://asyncapi.com/definitions/3.0.0/multiFormatAsyncAPISchemaMessage.json": { + "$id": "http://asyncapi.com/definitions/3.0.0/multiFormatAsyncAPISchemaMessage.json", "if": { - "not": { - "type": "object" + "description": "If schemaFormat has been defined check if it's one of the AsyncAPI Schema Object formats", + "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" + ] + } } }, "then": { - "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" - }, - "else": { + "properties": { + "schema": { + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" + } + } + } + }, + "http://asyncapi.com/definitions/3.0.0/multiFormatOpenAPIMessage.json": { + "$id": "http://asyncapi.com/definitions/3.0.0/multiFormatOpenAPIMessage.json", + "if": { + "required": [ + "schemaFormat" + ], "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" - }, + "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" + ] + } + } + }, + "then": { + "properties": { + "schema": { + "oneOf": [ { - "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" - ] + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" }, { - "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" - ] + "$ref": "http://asyncapi.com/definitions/common/openapiSchema_3_0.json" } ] } - }, - "allOf": [ - { - "if": { - "not": { - "description": "If no schemaFormat has been defined, default to schema or reference", - "required": [ - "schemaFormat" - ] - } - }, - "then": { - "properties": { - "schema": { - "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" - } - } - } - }, - { - "if": { - "description": "If schemaFormat has been defined check if it's one of the AsyncAPI Schema Object formats", - "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" - ] - } - } - }, - "then": { - "properties": { - "schema": { - "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" - } - } - } - }, - { - "if": { - "required": [ - "schemaFormat" - ], - "properties": { - "schemaFormat": { - "enum": [ - "application/schema+json;version=draft-07", - "application/schema+yaml;version=draft-07" - ] - } - } - }, - "then": { - "properties": { - "schema": { - "$ref": "http://json-schema.org/draft-07/schema" - } - } - } - }, - { - "if": { - "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" - ] - } - } - }, - "then": { - "properties": { - "schema": { - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" - }, - { - "$ref": "http://asyncapi.com/definitions/common/openapiSchema_3_0.json" - } - ] - } - } - } - }, - { - "if": { - "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" - ] - } - } - }, - "then": { - "properties": { - "schema": { - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" - }, - { - "$ref": "http://asyncapi.com/definitions/common/avroSchema_v1.json" - } - ] - } - } - } - } - ] + } } }, "http://asyncapi.com/definitions/common/openapiSchema_3_0.json": { @@ -3244,6 +3196,60 @@ }, "additionalProperties": false }, + "http://asyncapi.com/definitions/3.0.0/multiFormatJsonSchemaMessage.json": { + "$id": "http://asyncapi.com/definitions/3.0.0/multiFormatJsonSchemaMessage.json", + "if": { + "required": [ + "schemaFormat" + ], + "properties": { + "schemaFormat": { + "enum": [ + "application/schema+json;version=draft-07", + "application/schema+yaml;version=draft-07" + ] + } + } + }, + "then": { + "properties": { + "schema": { + "$ref": "http://json-schema.org/draft-07/schema" + } + } + } + }, + "http://asyncapi.com/definitions/3.0.0/multiFormatAvroMessage.json": { + "$id": "http://asyncapi.com/definitions/3.0.0/multiFormatAvroMessage.json", + "if": { + "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" + ] + } + } + }, + "then": { + "properties": { + "schema": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/common/avroSchema_v1.json" + } + ] + } + } + } + }, "http://asyncapi.com/definitions/common/avroSchema_v1.json": { "$id": "http://asyncapi.com/definitions/common/avroSchema_v1.json", "definitions": { diff --git a/tools/bundler/index.js b/tools/bundler/index.js index 44bf731a..4076cd77 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); @@ -187,8 +187,6 @@ function modifyRefsAndDefinitions(bundledSchema) { } traverse(bundledSchema, replaceRef); - traverse(bundledSchema.definitions.avroSchema_v1, updateAvro); - traverse(bundledSchema.definitions.openapiSchema_3_0, updateOpenApi); traverse(bundledSchema.definitions['json-schema-draft-07-schema'], updateJsonSchema); return bundledSchema; @@ -247,41 +245,6 @@ function replaceRef(schema) { if (!schema.$ref.startsWith('#')) schema.$ref = `#/definitions/${getDefinitionName(schema.$ref)}`; } -/** - * this is a callback used when traversing through json schema - * to fix avro schema definitions to point to right direction - */ -function updateAvro(schema) { - //traversing should take place only in case of schemas with refs - if (schema.$ref === undefined) return; - - schema.$ref = schema.$ref.replace( - /* eslint-disable sonarjs/no-duplicate-string */ - '#/definitions/', - '#/definitions/avroSchema_v1/definitions/' - ); -} - -/** - * this is a callback used when traversing through json schema - * to fix open api schema definitions to point to right direction - */ -function updateOpenApi(schema) { - //traversing should take place only in case of schemas with refs - if (schema.$ref === undefined) return; - const openApiPropName = 'openapiSchema_3_0'; - - schema.$ref = schema.$ref.replace( - /* eslint-disable sonarjs/no-duplicate-string */ - '#/definitions/', - `#/definitions/${openApiPropName}/definitions/` - ); - - if (schema.$ref === '#') { - schema.$ref = `#/definitions/${openApiPropName}`; - } -} - /** * this is a callback used when traversing through json schema * to fix open api schema definitions to point to right direction