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..abc613ea --- /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/3.0.0/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..ba7800df --- /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/3.0.0/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