From 148d087ae735f49a8d7cf2edf55cea9b5dc56778 Mon Sep 17 00:00:00 2001 From: Sergio Moya <1083296+smoya@users.noreply.github.com> Date: Fri, 31 Mar 2023 14:01:54 +0200 Subject: [PATCH] feat!: allow defining message schemaFormat at message level --- definitions/3.0.0/messageObject.json | 141 +- definitions/3.0.0/messagePayloadObject.json | 147 ++ schemas/3.0.0.json | 2619 ++++++++++--------- tools/bundler/package-lock.json | 2 + 4 files changed, 1473 insertions(+), 1436 deletions(-) create mode 100644 definitions/3.0.0/messagePayloadObject.json diff --git a/definitions/3.0.0/messageObject.json b/definitions/3.0.0/messageObject.json index e62f0d66..da997ff7 100644 --- a/definitions/3.0.0/messageObject.json +++ b/definitions/3.0.0/messageObject.json @@ -7,9 +7,6 @@ } }, "properties": { - "schemaFormat": { - "type": "string" - }, "contentType": { "type": "string" }, @@ -30,7 +27,9 @@ "messageId": { "type": "string" }, - "payload": {}, + "payload": { + "$ref": "http://asyncapi.com/definitions/3.0.0/messagePayloadObject.json" + }, "correlationId": { "oneOf": [ { @@ -114,7 +113,9 @@ "headers": { "type": "object" }, - "payload": {} + "payload": { + "$ref": "http://asyncapi.com/definitions/3.0.0/messagePayloadObject.json" + } } } }, @@ -154,136 +155,6 @@ } } }, - "allOf": [ - { - "if": { - "not": { - "required": [ - "schemaFormat" - ] - } - }, - "then": { - "properties": { - "payload": { - "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" - } - } - } - }, - { - "if": { - "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": { - "payload": { - "$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": { - "payload": { - "$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": { - "payload": { - "$ref": "http://asyncapi.com/definitions/3.0.0/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": { - "payload": { - "$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/messageObject.json" } \ No newline at end of file diff --git a/definitions/3.0.0/messagePayloadObject.json b/definitions/3.0.0/messagePayloadObject.json new file mode 100644 index 00000000..a56d6b5d --- /dev/null +++ b/definitions/3.0.0/messagePayloadObject.json @@ -0,0 +1,147 @@ +{ + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "properties": { + "schemaFormat": { + "type": "string" + }, + "schema": {} + }, + "allOf": [ + { + "if": { + "not": { + "required": [ + "schemaFormat" + ] + } + }, + "then": { + "properties": { + "schema": { + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" + } + } + } + }, + { + "if": { + "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": { + "$ref": "http://asyncapi.com/definitions/3.0.0/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": { + "$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/messagePayloadObject.json" + } \ No newline at end of file diff --git a/schemas/3.0.0.json b/schemas/3.0.0.json index 1127809a..627756a4 100644 --- a/schemas/3.0.0.json +++ b/schemas/3.0.0.json @@ -2060,9 +2060,6 @@ } }, "properties": { - "schemaFormat": { - "type": "string" - }, "contentType": { "type": "string" }, @@ -2083,7 +2080,9 @@ "messageId": { "type": "string" }, - "payload": {}, + "payload": { + "$ref": "http://asyncapi.com/definitions/3.0.0/messagePayloadObject.json" + }, "correlationId": { "oneOf": [ { @@ -2167,7 +2166,9 @@ "headers": { "type": "object" }, - "payload": {} + "payload": { + "$ref": "http://asyncapi.com/definitions/3.0.0/messagePayloadObject.json" + } } } }, @@ -2206,6 +2207,22 @@ ] } } + } + }, + "http://asyncapi.com/definitions/3.0.0/messagePayloadObject.json": { + "$id": "http://asyncapi.com/definitions/3.0.0/messagePayloadObject.json", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "properties": { + "schemaFormat": { + "type": "string" + }, + "schema": {} }, "allOf": [ { @@ -2218,7 +2235,7 @@ }, "then": { "properties": { - "payload": { + "schema": { "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" } } @@ -2262,7 +2279,7 @@ }, "then": { "properties": { - "payload": { + "schema": { "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" } } @@ -2284,7 +2301,7 @@ }, "then": { "properties": { - "payload": { + "schema": { "$ref": "http://json-schema.org/draft-07/schema" } } @@ -2307,7 +2324,7 @@ }, "then": { "properties": { - "payload": { + "schema": { "$ref": "http://asyncapi.com/definitions/3.0.0/openapiSchema_3_0.json" } } @@ -2330,7 +2347,7 @@ }, "then": { "properties": { - "payload": { + "schema": { "$ref": "http://asyncapi.com/definitions/3.0.0/avroSchema_v1.json" } } @@ -2338,630 +2355,615 @@ } ] }, - "http://asyncapi.com/definitions/3.0.0/correlationId.json": { - "$id": "http://asyncapi.com/definitions/3.0.0/correlationId.json", - "type": "object", - "required": [ - "location" - ], - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" - } - }, - "properties": { - "description": { - "type": "string", - "description": "A optional description of the correlation ID. GitHub Flavored Markdown is allowed." - }, - "location": { - "type": "string", - "description": "A runtime expression that specifies the location of the correlation ID", - "pattern": "^\\$message\\.(header|payload)#(\\/(([^\\/~])|(~[01]))*)*" - } - } - }, - "http://asyncapi.com/definitions/3.0.0/messageBindingsObject.json": { - "$id": "http://asyncapi.com/definitions/3.0.0/messageBindingsObject.json", + "http://asyncapi.com/definitions/3.0.0/openapiSchema_3_0.json": { + "$id": "http://asyncapi.com/definitions/3.0.0/openapiSchema_3_0.json", "type": "object", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" - } - }, - "properties": { - "http": { + "definitions": { + "ExternalDocumentation": { + "type": "object", + "required": [ + "url" + ], "properties": { - "bindingVersion": { - "enum": [ - "0.1.0" - ] - } - }, - "allOf": [ - { - "description": "If no bindingVersion specified, use the latest binding", - "if": { - "not": { - "required": [ - "bindingVersion" - ] - } - }, - "then": { - "$ref": "http://asyncapi.com/bindings/http/0.1.0/message.json" - } + "description": { + "type": "string" }, - { - "if": { - "required": [ - "bindingVersion" - ], - "properties": { - "bindingVersion": { - "const": "0.1.0" - } - } - }, - "then": { - "$ref": "http://asyncapi.com/bindings/http/0.1.0/message.json" - } + "url": { + "type": "string", + "format": "uri-reference" } - ] + }, + "patternProperties": { + "^x-": {} + }, + "additionalProperties": false }, - "ws": {}, - "amqp": { + "Discriminator": { + "type": "object", + "required": [ + "propertyName" + ], "properties": { - "bindingVersion": { - "enum": [ - "0.2.0" - ] - } - }, - "allOf": [ - { - "description": "If no bindingVersion specified, use the latest binding", - "if": { - "not": { - "required": [ - "bindingVersion" - ] - } - }, - "then": { - "$ref": "http://asyncapi.com/bindings/amqp/0.2.0/message.json" - } + "propertyName": { + "type": "string" }, - { - "if": { - "required": [ - "bindingVersion" - ], - "properties": { - "bindingVersion": { - "const": "0.2.0" - } - } - }, - "then": { - "$ref": "http://asyncapi.com/bindings/amqp/0.2.0/message.json" + "mapping": { + "type": "object", + "additionalProperties": { + "type": "string" } } - ] + } }, - "amqp1": {}, - "mqtt": { - "properties": { - "bindingVersion": { - "enum": [ - "0.1.0" - ] - } - }, - "allOf": [ - { - "description": "If no bindingVersion specified, use the latest binding", - "if": { - "not": { - "required": [ - "bindingVersion" - ] - } - }, - "then": { - "$ref": "http://asyncapi.com/bindings/mqtt/0.1.0/message.json" - } - }, - { - "if": { - "required": [ - "bindingVersion" - ], - "properties": { - "bindingVersion": { - "const": "0.1.0" - } - } - }, - "then": { - "$ref": "http://asyncapi.com/bindings/mqtt/0.1.0/message.json" - } + "Reference": { + "type": "object", + "required": [ + "$ref" + ], + "patternProperties": { + "^\\$ref$": { + "type": "string", + "format": "uri-reference" } - ] + } }, - "mqtt5": {}, - "kafka": { + "XML": { + "type": "object", "properties": { - "bindingVersion": { - "enum": [ - "0.4.0", - "0.3.0", - "0.1.0" - ] - } - }, - "allOf": [ - { - "description": "If no bindingVersion specified, use the latest binding", - "if": { - "not": { - "required": [ - "bindingVersion" - ] - } - }, - "then": { - "$ref": "http://asyncapi.com/bindings/kafka/0.4.0/message.json" - } + "name": { + "type": "string" }, - { - "if": { - "required": [ - "bindingVersion" - ], - "properties": { - "bindingVersion": { - "const": "0.4.0" - } - } - }, - "then": { - "$ref": "http://asyncapi.com/bindings/kafka/0.4.0/message.json" - } + "namespace": { + "type": "string", + "format": "uri" }, - { - "if": { - "required": [ - "bindingVersion" - ], - "properties": { - "bindingVersion": { - "const": "0.3.0" - } - } - }, - "then": { - "$ref": "http://asyncapi.com/bindings/kafka/0.3.0/message.json" - } + "prefix": { + "type": "string" }, - { - "if": { - "required": [ - "bindingVersion" - ], - "properties": { - "bindingVersion": { - "const": "0.1.0" - } - } - }, - "then": { - "$ref": "http://asyncapi.com/bindings/kafka/0.1.0/message.json" - } + "attribute": { + "type": "boolean", + "default": false + }, + "wrapped": { + "type": "boolean", + "default": false } - ] + }, + "patternProperties": { + "^x-": {} + }, + "additionalProperties": false + } + }, + "properties": { + "title": { + "type": "string" }, - "anypointmq": { - "properties": { - "bindingVersion": { - "enum": [ - "0.0.1" - ] - } + "multipleOf": { + "type": "number", + "exclusiveMinimum": 0 + }, + "maximum": { + "type": "number" + }, + "exclusiveMaximum": { + "type": "boolean", + "default": false + }, + "minimum": { + "type": "number" + }, + "exclusiveMinimum": { + "type": "boolean", + "default": false + }, + "maxLength": { + "type": "integer", + "minimum": 0 + }, + "minLength": { + "type": "integer", + "minimum": 0, + "default": 0 + }, + "pattern": { + "type": "string", + "format": "regex" + }, + "maxItems": { + "type": "integer", + "minimum": 0 + }, + "minItems": { + "type": "integer", + "minimum": 0, + "default": 0 + }, + "uniqueItems": { + "type": "boolean", + "default": false + }, + "maxProperties": { + "type": "integer", + "minimum": 0 + }, + "minProperties": { + "type": "integer", + "minimum": 0, + "default": 0 + }, + "required": { + "type": "array", + "items": { + "type": "string" }, - "allOf": [ + "minItems": 1, + "uniqueItems": true + }, + "enum": { + "type": "array", + "items": true, + "minItems": 1, + "uniqueItems": false + }, + "type": { + "type": "string", + "enum": [ + "array", + "boolean", + "integer", + "number", + "object", + "string" + ] + }, + "not": { + "oneOf": [ { - "description": "If no bindingVersion specified, use the latest binding", - "if": { - "not": { - "required": [ - "bindingVersion" - ] - } - }, - "then": { - "$ref": "http://asyncapi.com/bindings/anypointmq/0.0.1/message.json" - } + "$ref": "#" }, { - "if": { - "required": [ - "bindingVersion" - ], - "properties": { - "bindingVersion": { - "const": "0.0.1" - } - } - }, - "then": { - "$ref": "http://asyncapi.com/bindings/anypointmq/0.0.1/message.json" - } + "$ref": "#/definitions/Reference" } ] }, - "nats": {}, - "jms": {}, - "sns": {}, - "sqs": {}, - "stomp": {}, - "redis": {}, - "ibmmq": { - "properties": { - "bindingVersion": { - "enum": [ - "0.1.0" - ] - } - }, - "allOf": [ - { - "description": "If no bindingVersion specified, use the latest binding", - "if": { - "not": { - "required": [ - "bindingVersion" - ] - } + "allOf": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#" }, - "then": { - "$ref": "http://asyncapi.com/bindings/ibmmq/0.1.0/message.json" + { + "$ref": "#/definitions/Reference" } - }, - { - "if": { - "required": [ - "bindingVersion" - ], - "properties": { - "bindingVersion": { - "const": "0.1.0" - } - } + ] + } + }, + "oneOf": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#" }, - "then": { - "$ref": "http://asyncapi.com/bindings/ibmmq/0.1.0/message.json" + { + "$ref": "#/definitions/Reference" } - } - ] + ] + } }, - "solace": {}, - "googlepubsub": { - "properties": { - "bindingVersion": { - "enum": [ - "0.1.0" - ] - } - }, - "allOf": [ - { - "description": "If no bindingVersion specified, use the latest binding", - "if": { - "not": { - "required": [ - "bindingVersion" - ] - } + "anyOf": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#" }, - "then": { - "$ref": "http://asyncapi.com/bindings/googlepubsub/0.1.0/message.json" + { + "$ref": "#/definitions/Reference" } + ] + } + }, + "items": { + "oneOf": [ + { + "$ref": "#" }, { - "if": { - "required": [ - "bindingVersion" - ], - "properties": { - "bindingVersion": { - "const": "0.1.0" - } - } - }, - "then": { - "$ref": "http://asyncapi.com/bindings/googlepubsub/0.1.0/message.json" - } + "$ref": "#/definitions/Reference" } ] - } - } - }, - "http://asyncapi.com/bindings/http/0.1.0/message.json": { - "$id": "http://asyncapi.com/bindings/http/0.1.0/message.json", - "title": "HTTP message bindings object", - "description": "This object contains information about the message representation in HTTP.", - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" - } - }, - "properties": { - "headers": { - "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json", - "description": "\tA Schema object containing the definitions for HTTP-specific headers. This schema MUST be of type 'object' and have a 'properties' key." }, - "bindingVersion": { - "type": "string", - "enum": [ - "0.1.0" - ], - "description": "The version of this binding. If omitted, \"latest\" MUST be assumed." - } - }, - "examples": [ - { - "headers": { - "type": "object", - "properties": { - "Content-Type": { - "type": "string", - "enum": [ - "application/json" - ] + "properties": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "$ref": "#" + }, + { + "$ref": "#/definitions/Reference" } + ] + } + }, + "additionalProperties": { + "oneOf": [ + { + "$ref": "#" + }, + { + "$ref": "#/definitions/Reference" + }, + { + "type": "boolean" } - }, - "bindingVersion": "0.1.0" - } - ] - }, - "http://asyncapi.com/bindings/amqp/0.2.0/message.json": { - "$id": "http://asyncapi.com/bindings/amqp/0.2.0/message.json", - "title": "AMQP message bindings object", - "description": "This object contains information about the message representation in AMQP.", - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" - } - }, - "properties": { - "contentEncoding": { - "type": "string", - "description": "A MIME encoding for the message content." + ], + "default": true }, - "messageType": { - "type": "string", - "description": "Application-specific message type." + "description": { + "type": "string" }, - "bindingVersion": { - "type": "string", - "enum": [ - "0.2.0" - ], - "description": "The version of this binding. If omitted, \"latest\" MUST be assumed." + "format": { + "type": "string" + }, + "default": true, + "nullable": { + "type": "boolean", + "default": false + }, + "discriminator": { + "$ref": "#/definitions/Discriminator" + }, + "readOnly": { + "type": "boolean", + "default": false + }, + "writeOnly": { + "type": "boolean", + "default": false + }, + "example": true, + "externalDocs": { + "$ref": "#/definitions/ExternalDocumentation" + }, + "deprecated": { + "type": "boolean", + "default": false + }, + "xml": { + "$ref": "#/definitions/XML" } }, - "examples": [ - { - "contentEncoding": "gzip", - "messageType": "user.signup", - "bindingVersion": "0.2.0" - } - ] - }, - "http://asyncapi.com/bindings/mqtt/0.1.0/message.json": { - "$id": "http://asyncapi.com/bindings/mqtt/0.1.0/message.json", - "title": "MQTT message bindings object", - "description": "This object contains information about the message representation in MQTT.", - "type": "object", - "additionalProperties": false, "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" - } - }, - "properties": { - "bindingVersion": { - "type": "string", - "enum": [ - "0.1.0" - ], - "description": "The version of this binding. If omitted, 'latest' MUST be assumed." - } + "^x-": true }, - "examples": [ - { - "bindingVersion": "0.1.0" - } - ] + "additionalProperties": false }, - "http://asyncapi.com/bindings/kafka/0.4.0/message.json": { - "$id": "http://asyncapi.com/bindings/kafka/0.4.0/message.json", - "title": "Message Schema", - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" - } - }, - "properties": { - "key": { - "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json", - "description": "The message key." + "http://asyncapi.com/definitions/3.0.0/avroSchema_v1.json": { + "$id": "http://asyncapi.com/definitions/3.0.0/avroSchema_v1.json", + "definitions": { + "avroSchema": { + "title": "Avro Schema", + "description": "Root Schema", + "oneOf": [ + { + "$ref": "#/definitions/types" + } + ] }, - "schemaIdLocation": { + "types": { + "title": "Avro Types", + "description": "Allowed Avro types", + "oneOf": [ + { + "$ref": "#/definitions/primitiveType" + }, + { + "$ref": "#/definitions/primitiveTypeWithMetadata" + }, + { + "$ref": "#/definitions/customTypeReference" + }, + { + "$ref": "#/definitions/avroRecord" + }, + { + "$ref": "#/definitions/avroEnum" + }, + { + "$ref": "#/definitions/avroArray" + }, + { + "$ref": "#/definitions/avroMap" + }, + { + "$ref": "#/definitions/avroFixed" + }, + { + "$ref": "#/definitions/avroUnion" + } + ] + }, + "primitiveType": { + "title": "Primitive Type", + "description": "Basic type primitives.", "type": "string", - "description": "If a Schema Registry is used when performing this operation, tells where the id of schema is stored.", "enum": [ - "header", - "payload" + "null", + "boolean", + "int", + "long", + "float", + "double", + "bytes", + "string" ] }, - "schemaIdPayloadEncoding": { - "type": "string", - "description": "Number of bytes or vendor specific values when schema id is encoded in payload." + "primitiveTypeWithMetadata": { + "title": "Primitive Type With Metadata", + "description": "A primitive type with metadata attached.", + "type": "object", + "properties": { + "type": { + "$ref": "#/definitions/primitiveType" + } + }, + "required": [ + "type" + ] }, - "schemaLookupStrategy": { + "customTypeReference": { + "title": "Custom Type", + "description": "Reference to a ComplexType", + "not": { + "$ref": "#/definitions/primitiveType" + }, "type": "string", - "description": "Freeform string for any naming strategy class to use. Clients should default to the vendor default if not supplied." + "pattern": "^[A-Za-z_][A-Za-z0-9_]*(\\.[A-Za-z_][A-Za-z0-9_]*)*$" }, - "bindingVersion": { - "type": "string", - "enum": [ - "0.4.0" - ], - "description": "The version of this binding. If omitted, 'latest' MUST be assumed." - } - }, - "examples": [ - { - "key": { - "type": "string", - "enum": [ - "myKey" - ] + "avroUnion": { + "title": "Union", + "description": "A Union of types", + "type": "array", + "items": { + "$ref": "#/definitions/avroSchema" }, - "schemaIdLocation": "payload", - "schemaIdPayloadEncoding": "apicurio-new", - "schemaLookupStrategy": "TopicIdStrategy", - "bindingVersion": "0.4.0" + "minItems": 1 }, - { - "key": { - "$ref": "path/to/user-create.avsc#/UserCreate" + "avroField": { + "title": "Field", + "description": "A field within a Record", + "type": "object", + "properties": { + "name": { + "$ref": "#/definitions/name" + }, + "type": { + "$ref": "#/definitions/types" + }, + "doc": { + "type": "string" + }, + "default": true, + "order": { + "enum": [ + "ascending", + "descending", + "ignore" + ] + }, + "aliases": { + "type": "array", + "items": { + "$ref": "#/definitions/name" + } + } }, - "schemaIdLocation": "payload", - "schemaIdPayloadEncoding": "4", - "bindingVersion": "0.4.0" - } - ] - }, - "http://asyncapi.com/bindings/kafka/0.3.0/message.json": { - "$id": "http://asyncapi.com/bindings/kafka/0.3.0/message.json", - "title": "Message Schema", - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" - } - }, - "properties": { - "key": { - "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json", - "description": "The message key." + "required": [ + "name", + "type" + ] }, - "schemaIdLocation": { - "type": "string", - "description": "If a Schema Registry is used when performing this operation, tells where the id of schema is stored.", - "enum": [ - "header", - "payload" + "avroRecord": { + "title": "Record", + "description": "A Record", + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "record" + }, + "name": { + "$ref": "#/definitions/name" + }, + "namespace": { + "$ref": "#/definitions/namespace" + }, + "doc": { + "type": "string" + }, + "aliases": { + "type": "array", + "items": { + "$ref": "#/definitions/name" + } + }, + "fields": { + "type": "array", + "items": { + "$ref": "#/definitions/avroField" + } + } + }, + "required": [ + "type", + "name", + "fields" ] }, - "schemaIdPayloadEncoding": { - "type": "string", - "description": "Number of bytes or vendor specific values when schema id is encoded in payload." + "avroEnum": { + "title": "Enum", + "description": "An enumeration", + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "enum" + }, + "name": { + "$ref": "#/definitions/name" + }, + "namespace": { + "$ref": "#/definitions/namespace" + }, + "doc": { + "type": "string" + }, + "aliases": { + "type": "array", + "items": { + "$ref": "#/definitions/name" + } + }, + "symbols": { + "type": "array", + "items": { + "$ref": "#/definitions/name" + } + } + }, + "required": [ + "type", + "name", + "symbols" + ] }, - "schemaLookupStrategy": { - "type": "string", - "description": "Freeform string for any naming strategy class to use. Clients should default to the vendor default if not supplied." + "avroArray": { + "title": "Array", + "description": "An array", + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "array" + }, + "name": { + "$ref": "#/definitions/name" + }, + "namespace": { + "$ref": "#/definitions/namespace" + }, + "doc": { + "type": "string" + }, + "aliases": { + "type": "array", + "items": { + "$ref": "#/definitions/name" + } + }, + "items": { + "$ref": "#/definitions/types" + } + }, + "required": [ + "type", + "items" + ] }, - "bindingVersion": { - "type": "string", - "enum": [ - "0.3.0" - ], - "description": "The version of this binding. If omitted, 'latest' MUST be assumed." - } - }, - "examples": [ - { - "key": { - "type": "string", - "enum": [ - "myKey" - ] + "avroMap": { + "title": "Map", + "description": "A map of values", + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "map" + }, + "name": { + "$ref": "#/definitions/name" + }, + "namespace": { + "$ref": "#/definitions/namespace" + }, + "doc": { + "type": "string" + }, + "aliases": { + "type": "array", + "items": { + "$ref": "#/definitions/name" + } + }, + "values": { + "$ref": "#/definitions/types" + } }, - "schemaIdLocation": "payload", - "schemaIdPayloadEncoding": "apicurio-new", - "schemaLookupStrategy": "TopicIdStrategy", - "bindingVersion": "0.3.0" + "required": [ + "type", + "values" + ] }, - { - "key": { - "$ref": "path/to/user-create.avsc#/UserCreate" + "avroFixed": { + "title": "Fixed", + "description": "A fixed sized array of bytes", + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "fixed" + }, + "name": { + "$ref": "#/definitions/name" + }, + "namespace": { + "$ref": "#/definitions/namespace" + }, + "doc": { + "type": "string" + }, + "aliases": { + "type": "array", + "items": { + "$ref": "#/definitions/name" + } + }, + "size": { + "type": "number" + } }, - "schemaIdLocation": "payload", - "schemaIdPayloadEncoding": "4", - "bindingVersion": "0.3.0" - } - ] - }, - "http://asyncapi.com/bindings/kafka/0.1.0/message.json": { - "$id": "http://asyncapi.com/bindings/kafka/0.1.0/message.json", - "title": "Kafka message bindings object", - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" - } - }, - "properties": { - "key": { - "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json", - "description": "The message key." + "required": [ + "type", + "name", + "size" + ] }, - "bindingVersion": { + "name": { "type": "string", - "enum": [ - "0.1.0" - ], - "description": "The version of this binding. If omitted, 'latest' MUST be assumed." + "pattern": "^[A-Za-z_][A-Za-z0-9_]*$" + }, + "namespace": { + "type": "string", + "pattern": "^([A-Za-z_][A-Za-z0-9_]*(\\.[A-Za-z_][A-Za-z0-9_]*)*)*$" } }, - "examples": [ - { - "key": { - "type": "string", - "enum": [ - "myKey" - ] - }, - "bindingVersion": "0.1.0" - }, + "description": "Json-Schema definition for Avro AVSC files.", + "oneOf": [ { - "key": { - "$ref": "path/to/user-create.avsc#/UserCreate" - }, - "bindingVersion": "0.2.0" + "$ref": "#/definitions/avroSchema" } - ] + ], + "title": "Avro Schema Definition" }, - "http://asyncapi.com/bindings/anypointmq/0.0.1/message.json": { - "$id": "http://asyncapi.com/bindings/anypointmq/0.0.1/message.json", - "title": "Anypoint MQ message bindings object", - "description": "This object contains configuration for describing an Anypoint MQ message as an AsyncAPI message. This objects only contains configuration that can not be provided in the AsyncAPI standard message object.", + "http://asyncapi.com/definitions/3.0.0/correlationId.json": { + "$id": "http://asyncapi.com/definitions/3.0.0/correlationId.json", "type": "object", + "required": [ + "location" + ], "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { @@ -2969,36 +2971,19 @@ } }, "properties": { - "headers": { - "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json", - "description": "A Schema object containing the definitions for Anypoint MQ-specific headers (protocol headers). This schema MUST be of type 'object' and have a 'properties' key. Examples of Anypoint MQ protocol headers are 'messageId' and 'messageGroupId'." + "description": { + "type": "string", + "description": "A optional description of the correlation ID. GitHub Flavored Markdown is allowed." }, - "bindingVersion": { + "location": { "type": "string", - "enum": [ - "0.0.1" - ], - "description": "The version of this binding. If omitted, 'latest' MUST be assumed." - } - }, - "examples": [ - { - "headers": { - "type": "object", - "properties": { - "messageId": { - "type": "string" - } - } - }, - "bindingVersion": "0.0.1" + "description": "A runtime expression that specifies the location of the correlation ID", + "pattern": "^\\$message\\.(header|payload)#(\\/(([^\\/~])|(~[01]))*)*" } - ] + } }, - "http://asyncapi.com/bindings/ibmmq/0.1.0/message.json": { - "$id": "http://asyncapi.com/bindings/ibmmq/0.1.0/message.json", - "title": "IBM MQ message bindings object", - "description": "This object contains information about the message representation in IBM MQ.", + "http://asyncapi.com/definitions/3.0.0/messageBindingsObject.json": { + "$id": "http://asyncapi.com/definitions/3.0.0/messageBindingsObject.json", "type": "object", "additionalProperties": false, "patternProperties": { @@ -3007,840 +2992,872 @@ } }, "properties": { - "type": { - "type": "string", - "enum": [ - "string", - "jms", - "binary" - ], - "default": "string", - "description": "The type of the message." - }, - "headers": { - "type": "string", - "description": "Defines the IBM MQ message headers to include with this message. More than one header can be specified as a comma separated list. Supporting information on IBM MQ message formats can be found on this [page](https://www.ibm.com/docs/en/ibm-mq/9.2?topic=mqmd-format-mqchar8) in the IBM MQ Knowledge Center." - }, - "description": { - "type": "string", - "description": "Provides additional information for application developers: describes the message type or format." - }, - "expiry": { - "type": "integer", - "minimum": 0, - "default": 0, - "description": "The recommended setting the client should use for the TTL (Time-To-Live) of the message. This is a period of time expressed in milliseconds and set by the application that puts the message. 'expiry' values are API dependant e.g., MQI and JMS use different units of time and default values for 'unlimited'. General information on IBM MQ message expiry can be found on this [page](https://www.ibm.com/docs/en/ibm-mq/9.2?topic=mqmd-expiry-mqlong) in the IBM MQ Knowledge Center." - }, - "bindingVersion": { - "type": "string", - "enum": [ - "0.1.0" - ], - "description": "The version of this binding." - } - }, - "oneOf": [ - { + "http": { "properties": { - "type": { - "const": "binary" + "bindingVersion": { + "enum": [ + "0.1.0" + ] } - } + }, + "allOf": [ + { + "description": "If no bindingVersion specified, use the latest binding", + "if": { + "not": { + "required": [ + "bindingVersion" + ] + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/http/0.1.0/message.json" + } + }, + { + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.1.0" + } + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/http/0.1.0/message.json" + } + } + ] }, - { + "ws": {}, + "amqp": { "properties": { - "type": { - "const": "jms" + "bindingVersion": { + "enum": [ + "0.2.0" + ] } }, - "not": { - "required": [ - "headers" - ] - } + "allOf": [ + { + "description": "If no bindingVersion specified, use the latest binding", + "if": { + "not": { + "required": [ + "bindingVersion" + ] + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/amqp/0.2.0/message.json" + } + }, + { + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.2.0" + } + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/amqp/0.2.0/message.json" + } + } + ] }, - { + "amqp1": {}, + "mqtt": { "properties": { - "type": { - "const": "string" + "bindingVersion": { + "enum": [ + "0.1.0" + ] } }, - "not": { - "required": [ - "headers" - ] - } - } - ], - "examples": [ - { - "type": "string", - "bindingVersion": "0.1.0" - }, - { - "type": "jms", - "description": "JMS stream message", - "bindingVersion": "0.1.0" - } - ] - }, - "http://asyncapi.com/bindings/googlepubsub/0.1.0/message.json": { - "$id": "http://asyncapi.com/bindings/googlepubsub/0.1.0/message.json", - "title": "Cloud Pub/Sub Channel Schema", - "description": "This object contains information about the message representation for Google Cloud Pub/Sub.", - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" - } - }, - "properties": { - "bindingVersion": { - "type": "string", - "enum": [ - "0.1.0" - ], - "description": "The version of this binding." - }, - "attributes": { - "type": "object" - }, - "orderingKey": { - "type": "string" - }, - "schema": { - "type": "object", - "additionalItems": false, - "properties": { - "name": { - "type": "string" + "allOf": [ + { + "description": "If no bindingVersion specified, use the latest binding", + "if": { + "not": { + "required": [ + "bindingVersion" + ] + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/mqtt/0.1.0/message.json" + } }, - "type": { - "type": "string" + { + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.1.0" + } + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/mqtt/0.1.0/message.json" + } } - }, - "required": [ - "name", - "type" ] - } - }, - "examples": [ - { - "schema": { - "name": "projects/your-project-id/schemas/your-avro-schema-id", - "type": "avro" - } - }, - { - "schema": { - "name": "projects/your-project-id/schemas/your-protobuf-schema-id", - "type": "protobuf" - } - } - ] - }, - "http://asyncapi.com/definitions/3.0.0/messageTrait.json": { - "$id": "http://asyncapi.com/definitions/3.0.0/messageTrait.json", - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" - } - }, - "properties": { - "schemaFormat": { - "type": "string" - }, - "contentType": { - "type": "string" }, - "headers": { + "mqtt5": {}, + "kafka": { + "properties": { + "bindingVersion": { + "enum": [ + "0.4.0", + "0.3.0", + "0.1.0" + ] + } + }, "allOf": [ { - "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" + "description": "If no bindingVersion specified, use the latest binding", + "if": { + "not": { + "required": [ + "bindingVersion" + ] + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/kafka/0.4.0/message.json" + } }, { - "properties": { - "type": { - "const": "object" + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.4.0" + } } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/kafka/0.4.0/message.json" + } + }, + { + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.3.0" + } + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/kafka/0.3.0/message.json" + } + }, + { + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.1.0" + } + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/kafka/0.1.0/message.json" } } ] }, - "messageId": { - "type": "string" - }, - "correlationId": { - "oneOf": [ + "anypointmq": { + "properties": { + "bindingVersion": { + "enum": [ + "0.0.1" + ] + } + }, + "allOf": [ { - "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + "description": "If no bindingVersion specified, use the latest binding", + "if": { + "not": { + "required": [ + "bindingVersion" + ] + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/anypointmq/0.0.1/message.json" + } }, { - "$ref": "http://asyncapi.com/definitions/3.0.0/correlationId.json" + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.0.1" + } + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/anypointmq/0.0.1/message.json" + } } ] }, - "tags": { - "type": "array", - "items": { - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + "nats": {}, + "jms": {}, + "sns": {}, + "sqs": {}, + "stomp": {}, + "redis": {}, + "ibmmq": { + "properties": { + "bindingVersion": { + "enum": [ + "0.1.0" + ] + } + }, + "allOf": [ + { + "description": "If no bindingVersion specified, use the latest binding", + "if": { + "not": { + "required": [ + "bindingVersion" + ] + } }, - { - "$ref": "http://asyncapi.com/definitions/3.0.0/tag.json" + "then": { + "$ref": "http://asyncapi.com/bindings/ibmmq/0.1.0/message.json" } - ] - }, - "uniqueItems": true - }, - "summary": { - "type": "string", - "description": "A brief summary of the message." - }, - "name": { - "type": "string", - "description": "Name of the message." - }, - "title": { - "type": "string", - "description": "A human-friendly title for the message." - }, - "description": { - "type": "string", - "description": "A longer description of the message. CommonMark is allowed." + }, + { + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.1.0" + } + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/ibmmq/0.1.0/message.json" + } + } + ] }, - "externalDocs": { - "oneOf": [ + "solace": {}, + "googlepubsub": { + "properties": { + "bindingVersion": { + "enum": [ + "0.1.0" + ] + } + }, + "allOf": [ { - "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + "description": "If no bindingVersion specified, use the latest binding", + "if": { + "not": { + "required": [ + "bindingVersion" + ] + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/googlepubsub/0.1.0/message.json" + } }, { - "$ref": "http://asyncapi.com/definitions/3.0.0/externalDocs.json" + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.1.0" + } + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/googlepubsub/0.1.0/message.json" + } } ] - }, - "deprecated": { - "type": "boolean", - "default": false - }, - "examples": { - "type": "array", - "items": { - "type": "object" - } - }, - "bindings": { - "$ref": "http://asyncapi.com/definitions/3.0.0/messageBindingsObject.json" } } }, - "http://asyncapi.com/definitions/3.0.0/openapiSchema_3_0.json": { - "$id": "http://asyncapi.com/definitions/3.0.0/openapiSchema_3_0.json", + "http://asyncapi.com/bindings/http/0.1.0/message.json": { + "$id": "http://asyncapi.com/bindings/http/0.1.0/message.json", + "title": "HTTP message bindings object", + "description": "This object contains information about the message representation in HTTP.", "type": "object", - "definitions": { - "ExternalDocumentation": { - "type": "object", - "required": [ - "url" - ], - "properties": { - "description": { - "type": "string" - }, - "url": { - "type": "string", - "format": "uri-reference" - } - }, - "patternProperties": { - "^x-": {} - }, - "additionalProperties": false + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "properties": { + "headers": { + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json", + "description": "\tA Schema object containing the definitions for HTTP-specific headers. This schema MUST be of type 'object' and have a 'properties' key." }, - "Discriminator": { - "type": "object", - "required": [ - "propertyName" + "bindingVersion": { + "type": "string", + "enum": [ + "0.1.0" ], - "properties": { - "propertyName": { - "type": "string" - }, - "mapping": { - "type": "object", - "additionalProperties": { - "type": "string" + "description": "The version of this binding. If omitted, \"latest\" MUST be assumed." + } + }, + "examples": [ + { + "headers": { + "type": "object", + "properties": { + "Content-Type": { + "type": "string", + "enum": [ + "application/json" + ] } } - } - }, - "Reference": { - "type": "object", - "required": [ - "$ref" - ], - "patternProperties": { - "^\\$ref$": { - "type": "string", - "format": "uri-reference" - } - } - }, - "XML": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "namespace": { - "type": "string", - "format": "uri" - }, - "prefix": { - "type": "string" - }, - "attribute": { - "type": "boolean", - "default": false - }, - "wrapped": { - "type": "boolean", - "default": false - } }, - "patternProperties": { - "^x-": {} - }, - "additionalProperties": false + "bindingVersion": "0.1.0" + } + ] + }, + "http://asyncapi.com/bindings/amqp/0.2.0/message.json": { + "$id": "http://asyncapi.com/bindings/amqp/0.2.0/message.json", + "title": "AMQP message bindings object", + "description": "This object contains information about the message representation in AMQP.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" } }, "properties": { - "title": { - "type": "string" - }, - "multipleOf": { - "type": "number", - "exclusiveMinimum": 0 - }, - "maximum": { - "type": "number" - }, - "exclusiveMaximum": { - "type": "boolean", - "default": false - }, - "minimum": { - "type": "number" - }, - "exclusiveMinimum": { - "type": "boolean", - "default": false - }, - "maxLength": { - "type": "integer", - "minimum": 0 - }, - "minLength": { - "type": "integer", - "minimum": 0, - "default": 0 - }, - "pattern": { + "contentEncoding": { "type": "string", - "format": "regex" - }, - "maxItems": { - "type": "integer", - "minimum": 0 - }, - "minItems": { - "type": "integer", - "minimum": 0, - "default": 0 - }, - "uniqueItems": { - "type": "boolean", - "default": false - }, - "maxProperties": { - "type": "integer", - "minimum": 0 - }, - "minProperties": { - "type": "integer", - "minimum": 0, - "default": 0 + "description": "A MIME encoding for the message content." }, - "required": { - "type": "array", - "items": { - "type": "string" - }, - "minItems": 1, - "uniqueItems": true + "messageType": { + "type": "string", + "description": "Application-specific message type." }, - "enum": { - "type": "array", - "items": true, - "minItems": 1, - "uniqueItems": false + "bindingVersion": { + "type": "string", + "enum": [ + "0.2.0" + ], + "description": "The version of this binding. If omitted, \"latest\" MUST be assumed." + } + }, + "examples": [ + { + "contentEncoding": "gzip", + "messageType": "user.signup", + "bindingVersion": "0.2.0" + } + ] + }, + "http://asyncapi.com/bindings/mqtt/0.1.0/message.json": { + "$id": "http://asyncapi.com/bindings/mqtt/0.1.0/message.json", + "title": "MQTT message bindings object", + "description": "This object contains information about the message representation in MQTT.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "properties": { + "bindingVersion": { + "type": "string", + "enum": [ + "0.1.0" + ], + "description": "The version of this binding. If omitted, 'latest' MUST be assumed." + } + }, + "examples": [ + { + "bindingVersion": "0.1.0" + } + ] + }, + "http://asyncapi.com/bindings/kafka/0.4.0/message.json": { + "$id": "http://asyncapi.com/bindings/kafka/0.4.0/message.json", + "title": "Message Schema", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "properties": { + "key": { + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json", + "description": "The message key." }, - "type": { + "schemaIdLocation": { "type": "string", + "description": "If a Schema Registry is used when performing this operation, tells where the id of schema is stored.", "enum": [ - "array", - "boolean", - "integer", - "number", - "object", - "string" + "header", + "payload" ] }, - "not": { - "oneOf": [ - { - "$ref": "#" - }, - { - "$ref": "#/definitions/Reference" - } - ] + "schemaIdPayloadEncoding": { + "type": "string", + "description": "Number of bytes or vendor specific values when schema id is encoded in payload." }, - "allOf": { - "type": "array", - "items": { - "oneOf": [ - { - "$ref": "#" - }, - { - "$ref": "#/definitions/Reference" - } - ] - } + "schemaLookupStrategy": { + "type": "string", + "description": "Freeform string for any naming strategy class to use. Clients should default to the vendor default if not supplied." }, - "oneOf": { - "type": "array", - "items": { - "oneOf": [ - { - "$ref": "#" - }, - { - "$ref": "#/definitions/Reference" - } + "bindingVersion": { + "type": "string", + "enum": [ + "0.4.0" + ], + "description": "The version of this binding. If omitted, 'latest' MUST be assumed." + } + }, + "examples": [ + { + "key": { + "type": "string", + "enum": [ + "myKey" ] - } + }, + "schemaIdLocation": "payload", + "schemaIdPayloadEncoding": "apicurio-new", + "schemaLookupStrategy": "TopicIdStrategy", + "bindingVersion": "0.4.0" }, - "anyOf": { - "type": "array", - "items": { - "oneOf": [ - { - "$ref": "#" - }, - { - "$ref": "#/definitions/Reference" - } - ] - } + { + "key": { + "$ref": "path/to/user-create.avsc#/UserCreate" + }, + "schemaIdLocation": "payload", + "schemaIdPayloadEncoding": "4", + "bindingVersion": "0.4.0" + } + ] + }, + "http://asyncapi.com/bindings/kafka/0.3.0/message.json": { + "$id": "http://asyncapi.com/bindings/kafka/0.3.0/message.json", + "title": "Message Schema", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "properties": { + "key": { + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json", + "description": "The message key." }, - "items": { - "oneOf": [ - { - "$ref": "#" - }, - { - "$ref": "#/definitions/Reference" - } + "schemaIdLocation": { + "type": "string", + "description": "If a Schema Registry is used when performing this operation, tells where the id of schema is stored.", + "enum": [ + "header", + "payload" ] }, - "properties": { - "type": "object", - "additionalProperties": { - "oneOf": [ - { - "$ref": "#" - }, - { - "$ref": "#/definitions/Reference" - } - ] - } - }, - "additionalProperties": { - "oneOf": [ - { - "$ref": "#" - }, - { - "$ref": "#/definitions/Reference" - }, - { - "type": "boolean" - } - ], - "default": true - }, - "description": { - "type": "string" - }, - "format": { - "type": "string" - }, - "default": true, - "nullable": { - "type": "boolean", - "default": false + "schemaIdPayloadEncoding": { + "type": "string", + "description": "Number of bytes or vendor specific values when schema id is encoded in payload." }, - "discriminator": { - "$ref": "#/definitions/Discriminator" + "schemaLookupStrategy": { + "type": "string", + "description": "Freeform string for any naming strategy class to use. Clients should default to the vendor default if not supplied." }, - "readOnly": { - "type": "boolean", - "default": false + "bindingVersion": { + "type": "string", + "enum": [ + "0.3.0" + ], + "description": "The version of this binding. If omitted, 'latest' MUST be assumed." + } + }, + "examples": [ + { + "key": { + "type": "string", + "enum": [ + "myKey" + ] + }, + "schemaIdLocation": "payload", + "schemaIdPayloadEncoding": "apicurio-new", + "schemaLookupStrategy": "TopicIdStrategy", + "bindingVersion": "0.3.0" }, - "writeOnly": { - "type": "boolean", - "default": false + { + "key": { + "$ref": "path/to/user-create.avsc#/UserCreate" + }, + "schemaIdLocation": "payload", + "schemaIdPayloadEncoding": "4", + "bindingVersion": "0.3.0" + } + ] + }, + "http://asyncapi.com/bindings/kafka/0.1.0/message.json": { + "$id": "http://asyncapi.com/bindings/kafka/0.1.0/message.json", + "title": "Kafka message bindings object", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "properties": { + "key": { + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json", + "description": "The message key." }, - "example": true, - "externalDocs": { - "$ref": "#/definitions/ExternalDocumentation" + "bindingVersion": { + "type": "string", + "enum": [ + "0.1.0" + ], + "description": "The version of this binding. If omitted, 'latest' MUST be assumed." + } + }, + "examples": [ + { + "key": { + "type": "string", + "enum": [ + "myKey" + ] + }, + "bindingVersion": "0.1.0" }, - "deprecated": { - "type": "boolean", - "default": false + { + "key": { + "$ref": "path/to/user-create.avsc#/UserCreate" + }, + "bindingVersion": "0.2.0" + } + ] + }, + "http://asyncapi.com/bindings/anypointmq/0.0.1/message.json": { + "$id": "http://asyncapi.com/bindings/anypointmq/0.0.1/message.json", + "title": "Anypoint MQ message bindings object", + "description": "This object contains configuration for describing an Anypoint MQ message as an AsyncAPI message. This objects only contains configuration that can not be provided in the AsyncAPI standard message object.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "properties": { + "headers": { + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json", + "description": "A Schema object containing the definitions for Anypoint MQ-specific headers (protocol headers). This schema MUST be of type 'object' and have a 'properties' key. Examples of Anypoint MQ protocol headers are 'messageId' and 'messageGroupId'." }, - "xml": { - "$ref": "#/definitions/XML" + "bindingVersion": { + "type": "string", + "enum": [ + "0.0.1" + ], + "description": "The version of this binding. If omitted, 'latest' MUST be assumed." } }, + "examples": [ + { + "headers": { + "type": "object", + "properties": { + "messageId": { + "type": "string" + } + } + }, + "bindingVersion": "0.0.1" + } + ] + }, + "http://asyncapi.com/bindings/ibmmq/0.1.0/message.json": { + "$id": "http://asyncapi.com/bindings/ibmmq/0.1.0/message.json", + "title": "IBM MQ message bindings object", + "description": "This object contains information about the message representation in IBM MQ.", + "type": "object", + "additionalProperties": false, "patternProperties": { - "^x-": true + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } }, - "additionalProperties": false - }, - "http://asyncapi.com/definitions/3.0.0/avroSchema_v1.json": { - "$id": "http://asyncapi.com/definitions/3.0.0/avroSchema_v1.json", - "definitions": { - "avroSchema": { - "title": "Avro Schema", - "description": "Root Schema", - "oneOf": [ - { - "$ref": "#/definitions/types" - } - ] + "properties": { + "type": { + "type": "string", + "enum": [ + "string", + "jms", + "binary" + ], + "default": "string", + "description": "The type of the message." }, - "types": { - "title": "Avro Types", - "description": "Allowed Avro types", - "oneOf": [ - { - "$ref": "#/definitions/primitiveType" - }, - { - "$ref": "#/definitions/primitiveTypeWithMetadata" - }, - { - "$ref": "#/definitions/customTypeReference" - }, - { - "$ref": "#/definitions/avroRecord" - }, - { - "$ref": "#/definitions/avroEnum" - }, - { - "$ref": "#/definitions/avroArray" - }, - { - "$ref": "#/definitions/avroMap" - }, - { - "$ref": "#/definitions/avroFixed" - }, - { - "$ref": "#/definitions/avroUnion" - } - ] + "headers": { + "type": "string", + "description": "Defines the IBM MQ message headers to include with this message. More than one header can be specified as a comma separated list. Supporting information on IBM MQ message formats can be found on this [page](https://www.ibm.com/docs/en/ibm-mq/9.2?topic=mqmd-format-mqchar8) in the IBM MQ Knowledge Center." }, - "primitiveType": { - "title": "Primitive Type", - "description": "Basic type primitives.", + "description": { + "type": "string", + "description": "Provides additional information for application developers: describes the message type or format." + }, + "expiry": { + "type": "integer", + "minimum": 0, + "default": 0, + "description": "The recommended setting the client should use for the TTL (Time-To-Live) of the message. This is a period of time expressed in milliseconds and set by the application that puts the message. 'expiry' values are API dependant e.g., MQI and JMS use different units of time and default values for 'unlimited'. General information on IBM MQ message expiry can be found on this [page](https://www.ibm.com/docs/en/ibm-mq/9.2?topic=mqmd-expiry-mqlong) in the IBM MQ Knowledge Center." + }, + "bindingVersion": { "type": "string", "enum": [ - "null", - "boolean", - "int", - "long", - "float", - "double", - "bytes", - "string" - ] + "0.1.0" + ], + "description": "The version of this binding." + } + }, + "oneOf": [ + { + "properties": { + "type": { + "const": "binary" + } + } }, - "primitiveTypeWithMetadata": { - "title": "Primitive Type With Metadata", - "description": "A primitive type with metadata attached.", - "type": "object", + { "properties": { "type": { - "$ref": "#/definitions/primitiveType" + "const": "jms" } }, - "required": [ - "type" - ] - }, - "customTypeReference": { - "title": "Custom Type", - "description": "Reference to a ComplexType", "not": { - "$ref": "#/definitions/primitiveType" - }, - "type": "string", - "pattern": "^[A-Za-z_][A-Za-z0-9_]*(\\.[A-Za-z_][A-Za-z0-9_]*)*$" - }, - "avroUnion": { - "title": "Union", - "description": "A Union of types", - "type": "array", - "items": { - "$ref": "#/definitions/avroSchema" - }, - "minItems": 1 + "required": [ + "headers" + ] + } }, - "avroField": { - "title": "Field", - "description": "A field within a Record", - "type": "object", + { "properties": { - "name": { - "$ref": "#/definitions/name" - }, "type": { - "$ref": "#/definitions/types" - }, - "doc": { - "type": "string" - }, - "default": true, - "order": { - "enum": [ - "ascending", - "descending", - "ignore" - ] - }, - "aliases": { - "type": "array", - "items": { - "$ref": "#/definitions/name" - } + "const": "string" } }, - "required": [ - "name", - "type" - ] + "not": { + "required": [ + "headers" + ] + } + } + ], + "examples": [ + { + "type": "string", + "bindingVersion": "0.1.0" }, - "avroRecord": { - "title": "Record", - "description": "A Record", + { + "type": "jms", + "description": "JMS stream message", + "bindingVersion": "0.1.0" + } + ] + }, + "http://asyncapi.com/bindings/googlepubsub/0.1.0/message.json": { + "$id": "http://asyncapi.com/bindings/googlepubsub/0.1.0/message.json", + "title": "Cloud Pub/Sub Channel Schema", + "description": "This object contains information about the message representation for Google Cloud Pub/Sub.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "properties": { + "bindingVersion": { + "type": "string", + "enum": [ + "0.1.0" + ], + "description": "The version of this binding." + }, + "attributes": { + "type": "object" + }, + "orderingKey": { + "type": "string" + }, + "schema": { "type": "object", + "additionalItems": false, "properties": { - "type": { - "type": "string", - "const": "record" - }, "name": { - "$ref": "#/definitions/name" - }, - "namespace": { - "$ref": "#/definitions/namespace" - }, - "doc": { "type": "string" }, - "aliases": { - "type": "array", - "items": { - "$ref": "#/definitions/name" - } - }, - "fields": { - "type": "array", - "items": { - "$ref": "#/definitions/avroField" - } - } - }, - "required": [ - "type", - "name", - "fields" - ] - }, - "avroEnum": { - "title": "Enum", - "description": "An enumeration", - "type": "object", - "properties": { "type": { - "type": "string", - "const": "enum" - }, - "name": { - "$ref": "#/definitions/name" - }, - "namespace": { - "$ref": "#/definitions/namespace" - }, - "doc": { "type": "string" - }, - "aliases": { - "type": "array", - "items": { - "$ref": "#/definitions/name" - } - }, - "symbols": { - "type": "array", - "items": { - "$ref": "#/definitions/name" - } } }, "required": [ - "type", "name", - "symbols" + "type" ] + } + }, + "examples": [ + { + "schema": { + "name": "projects/your-project-id/schemas/your-avro-schema-id", + "type": "avro" + } }, - "avroArray": { - "title": "Array", - "description": "An array", - "type": "object", - "properties": { - "type": { - "type": "string", - "const": "array" - }, - "name": { - "$ref": "#/definitions/name" - }, - "namespace": { - "$ref": "#/definitions/namespace" - }, - "doc": { - "type": "string" + { + "schema": { + "name": "projects/your-project-id/schemas/your-protobuf-schema-id", + "type": "protobuf" + } + } + ] + }, + "http://asyncapi.com/definitions/3.0.0/messageTrait.json": { + "$id": "http://asyncapi.com/definitions/3.0.0/messageTrait.json", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "properties": { + "schemaFormat": { + "type": "string" + }, + "contentType": { + "type": "string" + }, + "headers": { + "allOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" }, - "aliases": { - "type": "array", - "items": { - "$ref": "#/definitions/name" + { + "properties": { + "type": { + "const": "object" + } } - }, - "items": { - "$ref": "#/definitions/types" } - }, - "required": [ - "type", - "items" ] }, - "avroMap": { - "title": "Map", - "description": "A map of values", - "type": "object", - "properties": { - "type": { - "type": "string", - "const": "map" - }, - "name": { - "$ref": "#/definitions/name" - }, - "namespace": { - "$ref": "#/definitions/namespace" - }, - "doc": { - "type": "string" - }, - "aliases": { - "type": "array", - "items": { - "$ref": "#/definitions/name" - } + "messageId": { + "type": "string" + }, + "correlationId": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" }, - "values": { - "$ref": "#/definitions/types" + { + "$ref": "http://asyncapi.com/definitions/3.0.0/correlationId.json" } - }, - "required": [ - "type", - "values" ] }, - "avroFixed": { - "title": "Fixed", - "description": "A fixed sized array of bytes", - "type": "object", - "properties": { - "type": { - "type": "string", - "const": "fixed" - }, - "name": { - "$ref": "#/definitions/name" - }, - "namespace": { - "$ref": "#/definitions/namespace" - }, - "doc": { - "type": "string" - }, - "aliases": { - "type": "array", - "items": { - "$ref": "#/definitions/name" + "tags": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/tag.json" } - }, - "size": { - "type": "number" - } + ] }, - "required": [ - "type", - "name", - "size" - ] + "uniqueItems": true + }, + "summary": { + "type": "string", + "description": "A brief summary of the message." }, "name": { "type": "string", - "pattern": "^[A-Za-z_][A-Za-z0-9_]*$" + "description": "Name of the message." }, - "namespace": { + "title": { "type": "string", - "pattern": "^([A-Za-z_][A-Za-z0-9_]*(\\.[A-Za-z_][A-Za-z0-9_]*)*)*$" - } - }, - "description": "Json-Schema definition for Avro AVSC files.", - "oneOf": [ - { - "$ref": "#/definitions/avroSchema" + "description": "A human-friendly title for the message." + }, + "description": { + "type": "string", + "description": "A longer description of the message. CommonMark is allowed." + }, + "externalDocs": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/externalDocs.json" + } + ] + }, + "deprecated": { + "type": "boolean", + "default": false + }, + "examples": { + "type": "array", + "items": { + "type": "object" + } + }, + "bindings": { + "$ref": "http://asyncapi.com/definitions/3.0.0/messageBindingsObject.json" } - ], - "title": "Avro Schema Definition" + } }, "http://asyncapi.com/definitions/3.0.0/parameters.json": { "$id": "http://asyncapi.com/definitions/3.0.0/parameters.json", diff --git a/tools/bundler/package-lock.json b/tools/bundler/package-lock.json index e9a3a017..d1d83672 100644 --- a/tools/bundler/package-lock.json +++ b/tools/bundler/package-lock.json @@ -41,6 +41,7 @@ "version": "0.1.3", "resolved": "https://registry.npmjs.org/@hyperjump/json-schema-bundle/-/json-schema-bundle-0.1.3.tgz", "integrity": "sha512-UjmmtyIgaMXRXKmkJDQhvGAQFSfaPYBRue4tk3qeISrD468vziCWI2Km0RgfeXVxgy5xgqEPyi9DLXUqD4KWDQ==", + "deprecated": "This package was rolled into @hyperjump/json-schema as of v1.2.0", "dependencies": { "@hyperjump/json-schema": "^0.18.3", "uuid": "^8.3.2" @@ -54,6 +55,7 @@ "version": "0.23.4", "resolved": "https://registry.npmjs.org/@hyperjump/json-schema-core/-/json-schema-core-0.23.4.tgz", "integrity": "sha512-rHORA3qPk2JKOJOgwgXzGkMnad0neoPiHK8tPrITNxCcVM+AwPkTK+ABogNhbFG4lipWVF4gB3XHJ2qxfQuSAw==", + "deprecated": "This package was rolled into @hyperjump/json-schema as of v1.0.0", "dependencies": { "@hyperjump/json-pointer": "^0.9.1", "@hyperjump/pact": "^0.2.0",