From 02f27f8e0ecabf328c14505a2ed5133e4b428981 Mon Sep 17 00:00:00 2001 From: Jonas Lagoni Date: Mon, 13 May 2024 11:32:22 +0200 Subject: [PATCH 1/2] upgrade bundler --- definitions/3.0.0/multiFormatSchema.json | 341 +- package.json | 4 +- schemas/1.0.0-without-$id.json | 812 +- schemas/1.0.0.json | 836 +- schemas/1.1.0-without-$id.json | 824 +- schemas/1.1.0.json | 880 +- schemas/1.2.0-without-$id.json | 890 +- schemas/1.2.0.json | 906 ++- schemas/2.0.0-rc1-without-$id.json | 1088 +-- schemas/2.0.0-rc1.json | 1338 +-- schemas/2.0.0-rc2-without-$id.json | 950 +-- schemas/2.0.0-rc2.json | 1184 +-- schemas/2.0.0-without-$id.json | 1922 ++--- schemas/2.0.0.json | 2080 ++--- schemas/2.1.0-without-$id.json | 1678 ++-- schemas/2.1.0.json | 1836 ++--- schemas/2.2.0-without-$id.json | 1806 ++--- schemas/2.2.0.json | 2234 ++--- schemas/2.3.0-without-$id.json | 1682 ++-- schemas/2.3.0.json | 1996 ++--- schemas/2.4.0-without-$id.json | 1694 ++-- schemas/2.4.0.json | 2028 ++--- schemas/2.5.0-without-$id.json | 1852 ++--- schemas/2.5.0.json | 1988 ++--- schemas/2.6.0-without-$id.json | 2673 +++--- schemas/2.6.0.json | 2991 ++++--- schemas/3.0.0-without-$id.json | 9437 +++++++--------------- schemas/3.0.0.json | 8684 ++++++++++---------- test/schemas.js | 1 + tools/bundler/.eslintrc.json | 6 + tools/bundler/index.js | 82 +- tools/bundler/package-lock.json | 306 +- tools/bundler/package.json | 4 +- 33 files changed, 26619 insertions(+), 30414 deletions(-) create mode 100644 tools/bundler/.eslintrc.json diff --git a/definitions/3.0.0/multiFormatSchema.json b/definitions/3.0.0/multiFormatSchema.json index 077cdcf6..2d73bf1c 100644 --- a/definitions/3.0.0/multiFormatSchema.json +++ b/definitions/3.0.0/multiFormatSchema.json @@ -6,197 +6,204 @@ "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" } }, - "if": { - "not": { - "type": "object" + "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" + ] + } + ] } }, - "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", + "allOf": [ + { + "$ref": "#/definitions/default_message" + }, + { + "$ref": "#/definitions/asyncapi_schema_message" + }, + { + "$ref": "#/definitions/json_schema_draft_7_message" + }, + { + "$ref": "#/definitions/openapi_message" + }, + { + "$ref": "#/definitions/avro_message" + } + ], + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/3.0.0/multiFormatSchema.json", + "definitions": { + "default_message": { + "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" + } + } + } + }, + "asyncapi_schema_message": { + "if": { + "description": "If schemaFormat has been defined check if it's one of the AsyncAPI Schema Object formats", + "required": [ + "schemaFormat" + ], + "properties": { + "schemaFormat": { "enum": [ - "application/schema+json;version=draft-07", - "application/schema+yaml;version=draft-07", - + "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" ] - }, - { - "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" - ] } - ] + } + }, + "then": { + "properties": { + "schema": { + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" + } + } } }, - "allOf": [ - { - "if": { - "not": { - "description": "If no schemaFormat has been defined, default to schema or reference", - "required": [ - "schemaFormat" + "json_schema_draft_7_message": { + "if": { + "required": [ + "schemaFormat" + ], + "properties": { + "schemaFormat": { + "enum": [ + "application/schema+json;version=draft-07", + "application/schema+yaml;version=draft-07" ] } - }, - "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" - } + "then": { + "properties": { + "schema": { + "$ref": "http://json-schema.org/draft-07/schema" } } - }, - { - "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" - } + } + }, + "openapi_message": { + "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" + ] } } }, - { - "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" + } + ] } - }, - "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" - } - ] - } + } + } + }, + "avro_message": { + "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" + ] } } }, - { - "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" - } - ] - } + "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/multiFormatSchema.json" + } + } } \ No newline at end of file diff --git a/package.json b/package.json index e1add524..f69a0258 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "main": "index.js", "types": "index.d.ts", "scripts": { - "test": "npm run build && nyc mocha && npm run validate:schemas", + "test": "nyc mocha", "build": "npm run bundle", "generate:assets": "npm run build", "prepublishOnly": "npm run build", @@ -39,7 +39,7 @@ }, "homepage": "https://github.com/asyncapi/spec-json-schemas#readme", "devDependencies": { - "ajv": "^8.12.0", + "ajv": "^8.13.0", "ajv-draft-04": "^1.0.0", "eslint": "^8.56.0", "eslint-plugin-sonarjs": "^0.23.0", diff --git a/schemas/1.0.0-without-$id.json b/schemas/1.0.0-without-$id.json index 3c891ccf..b31d040b 100644 --- a/schemas/1.0.0-without-$id.json +++ b/schemas/1.0.0-without-$id.json @@ -1,6 +1,5 @@ { - "id": "http://asyncapi.com/definitions/1.0.0/asyncapi.json", - "$schema": "http://json-schema.org/draft-04/schema", + "$schema": "http://json-schema.org/draft-04/schema#", "title": "AsyncAPI 1.0 schema.", "type": "object", "required": [ @@ -63,53 +62,13 @@ }, "definitions": { "vendorExtension": { - "id": "http://asyncapi.com/definitions/1.0.0/vendorExtension.json", + "id": "vendorExtension.json", "description": "Any property starting with x- is valid.", "additionalProperties": true, "additionalItems": true }, - "info": { - "id": "http://asyncapi.com/definitions/1.0.0/info.json", - "type": "object", - "description": "General information about the API.", - "required": [ - "version", - "title" - ], - "additionalProperties": false, - "patternProperties": { - "^x-": { - "$ref": "#/definitions/vendorExtension" - } - }, - "properties": { - "title": { - "type": "string", - "description": "A unique and precise title of the API." - }, - "version": { - "type": "string", - "description": "A semantic version number of the API." - }, - "description": { - "type": "string", - "description": "A longer description of the API. Should be different from the title. CommonMark is allowed." - }, - "termsOfService": { - "type": "string", - "description": "A URL to the Terms of Service for the API. MUST be in the format of a URL.", - "format": "uri" - }, - "contact": { - "$ref": "#/definitions/contact" - }, - "license": { - "$ref": "#/definitions/license" - } - } - }, "contact": { - "id": "http://asyncapi.com/definitions/1.0.0/contact.json", + "id": "contact.json", "type": "object", "description": "Contact information for the owners of the API.", "additionalProperties": false, @@ -136,7 +95,7 @@ } }, "license": { - "id": "http://asyncapi.com/definitions/1.0.0/license.json", + "id": "license.json", "type": "object", "required": [ "name" @@ -159,13 +118,13 @@ } } }, - "server": { - "id": "http://asyncapi.com/definitions/1.0.0/server.json", + "info": { + "id": "info.json", "type": "object", - "description": "An object representing a Server.", + "description": "General information about the API.", "required": [ - "url", - "scheme" + "version", + "title" ], "additionalProperties": false, "patternProperties": { @@ -174,46 +133,33 @@ } }, "properties": { - "url": { - "type": "string" + "title": { + "type": "string", + "description": "A unique and precise title of the API." + }, + "version": { + "type": "string", + "description": "A semantic version number of the API." }, "description": { - "type": "string" + "type": "string", + "description": "A longer description of the API. Should be different from the title. CommonMark is allowed." }, - "scheme": { + "termsOfService": { "type": "string", - "description": "The transfer protocol.", - "enum": [ - "kafka", - "kafka-secure", - "amqp", - "amqps", - "mqtt", - "mqtts", - "secure-mqtt", - "ws", - "wss", - "stomp", - "stomps" - ] + "description": "A URL to the Terms of Service for the API. MUST be in the format of a URL.", + "format": "uri" }, - "schemeVersion": { - "type": "string" + "contact": { + "$ref": "#/definitions/contact" }, - "variables": { - "$ref": "#/definitions/serverVariables" + "license": { + "$ref": "#/definitions/license" } } }, - "serverVariables": { - "id": "http://asyncapi.com/definitions/1.0.0/serverVariables.json", - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/serverVariable" - } - }, "serverVariable": { - "id": "http://asyncapi.com/definitions/1.0.0/serverVariable.json", + "id": "serverVariable.json", "type": "object", "description": "An object representing a Server Variable for server URL template substitution.", "minProperties": 1, @@ -239,49 +185,21 @@ } } }, - "topics": { - "id": "http://asyncapi.com/definitions/1.0.0/topics.json", - "type": "object", - "description": "Relative paths to the individual topics. They must be relative to the 'baseTopic'.", - "patternProperties": { - "^x-": { - "$ref": "#/definitions/vendorExtension" - }, - "^[^.]": { - "$ref": "#/definitions/topicItem" - } - }, - "additionalProperties": false - }, - "topicItem": { - "id": "http://asyncapi.com/definitions/1.0.0/topicItem.json", + "serverVariables": { + "id": "serverVariables.json", "type": "object", - "additionalProperties": false, - "patternProperties": { - "^x-": { - "$ref": "#/definitions/vendorExtension" - } - }, - "minProperties": 1, - "properties": { - "$ref": { - "type": "string" - }, - "publish": { - "$ref": "#/definitions/message" - }, - "subscribe": { - "$ref": "#/definitions/message" - }, - "deprecated": { - "type": "boolean", - "default": false - } + "additionalProperties": { + "$ref": "#/definitions/serverVariable" } }, - "message": { - "id": "http://asyncapi.com/definitions/1.0.0/message.json", + "server": { + "id": "server.json", "type": "object", + "description": "An object representing a Server.", + "required": [ + "url", + "scheme" + ], "additionalProperties": false, "patternProperties": { "^x-": { @@ -289,169 +207,36 @@ } }, "properties": { - "$ref": { + "url": { "type": "string" }, - "headers": { - "$ref": "#/definitions/schema" - }, - "payload": { - "$ref": "#/definitions/schema" - }, - "tags": { - "type": "array", - "items": { - "$ref": "#/definitions/tag" - }, - "uniqueItems": true - }, - "summary": { - "type": "string", - "description": "A brief summary of the message." - }, "description": { - "type": "string", - "description": "A longer description of the message. CommonMark is allowed." - }, - "externalDocs": { - "$ref": "#/definitions/externalDocs" - }, - "deprecated": { - "type": "boolean", - "default": false - }, - "example": {} - } - }, - "schema": { - "id": "http://asyncapi.com/definitions/1.0.0/schema.json", - "type": "object", - "description": "A deterministic version of a JSON Schema object.", - "patternProperties": { - "^x-": { - "$ref": "#/definitions/vendorExtension" - } - }, - "properties": { - "$ref": { "type": "string" }, - "format": { - "type": "string" - }, - "title": { - "$ref": "#/definitions/json-schema-draft-07-schema" - }, - "description": { - "$ref": "#/definitions/json-schema-draft-07-schema" - }, - "default": { - "$ref": "#/definitions/json-schema-draft-07-schema" - }, - "multipleOf": { - "$ref": "#/definitions/json-schema-draft-07-schema" - }, - "maximum": { - "$ref": "#/definitions/json-schema-draft-07-schema" - }, - "exclusiveMaximum": { - "$ref": "#/definitions/json-schema-draft-07-schema" - }, - "minimum": { - "$ref": "#/definitions/json-schema-draft-07-schema" - }, - "exclusiveMinimum": { - "$ref": "#/definitions/json-schema-draft-07-schema" - }, - "maxLength": { - "$ref": "#/definitions/json-schema-draft-07-schema" - }, - "minLength": { - "$ref": "#/definitions/json-schema-draft-07-schema" - }, - "pattern": { - "$ref": "#/definitions/json-schema-draft-07-schema" - }, - "maxItems": { - "$ref": "#/definitions/json-schema-draft-07-schema" - }, - "minItems": { - "$ref": "#/definitions/json-schema-draft-07-schema" - }, - "uniqueItems": { - "$ref": "#/definitions/json-schema-draft-07-schema" - }, - "maxProperties": { - "$ref": "#/definitions/json-schema-draft-07-schema" - }, - "minProperties": { - "$ref": "#/definitions/json-schema-draft-07-schema" - }, - "required": { - "$ref": "#/definitions/json-schema-draft-07-schema" - }, - "enum": { - "$ref": "#/definitions/json-schema-draft-07-schema" - }, - "additionalProperties": { - "anyOf": [ - { - "$ref": "#/definitions/schema" - }, - { - "type": "boolean" - } - ], - "default": {} - }, - "type": { - "$ref": "#/definitions/json-schema-draft-07-schema" - }, - "items": { - "anyOf": [ - { - "$ref": "#/definitions/schema" - }, - { - "type": "array", - "minItems": 1, - "items": { - "$ref": "#/definitions/schema" - } - } - ], - "default": {} - }, - "allOf": { - "type": "array", - "minItems": 1, - "items": { - "$ref": "#/definitions/schema" - } - }, - "properties": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/schema" - }, - "default": {} + "scheme": { + "type": "string", + "description": "The transfer protocol.", + "enum": [ + "kafka", + "kafka-secure", + "amqp", + "amqps", + "mqtt", + "mqtts", + "secure-mqtt", + "ws", + "wss", + "stomp", + "stomps" + ] }, - "discriminator": { + "schemeVersion": { "type": "string" }, - "readOnly": { - "type": "boolean", - "default": false - }, - "xml": { - "$ref": "#/definitions/xml" - }, - "externalDocs": { - "$ref": "#/definitions/externalDocs" - }, - "example": {} - }, - "additionalProperties": false + "variables": { + "$ref": "#/definitions/serverVariables" + } + } }, "json-schema-draft-07-schema": { "id": "http://json-schema.org/draft-04/schema", @@ -648,71 +433,225 @@ } ] }, - "format": { + "format": { + "type": "string" + }, + "allOf": { + "$ref": "#/definitions/json-schema-draft-07-schema/definitions/schemaArray" + }, + "anyOf": { + "$ref": "#/definitions/json-schema-draft-07-schema/definitions/schemaArray" + }, + "oneOf": { + "$ref": "#/definitions/json-schema-draft-07-schema/definitions/schemaArray" + }, + "not": { + "$ref": "#/definitions/json-schema-draft-07-schema" + } + }, + "dependencies": { + "exclusiveMaximum": [ + "maximum" + ], + "exclusiveMinimum": [ + "minimum" + ] + }, + "default": {} + }, + "xml": { + "id": "xml.json", + "type": "object", + "additionalProperties": false, + "properties": { + "name": { + "type": "string" + }, + "namespace": { + "type": "string" + }, + "prefix": { + "type": "string" + }, + "attribute": { + "type": "boolean", + "default": false + }, + "wrapped": { + "type": "boolean", + "default": false + } + } + }, + "externalDocs": { + "id": "externalDocs.json", + "type": "object", + "additionalProperties": false, + "description": "information about external documentation", + "required": [ + "url" + ], + "properties": { + "description": { + "type": "string" + }, + "url": { + "type": "string", + "format": "uri" + } + }, + "patternProperties": { + "^x-": { + "$ref": "#/definitions/vendorExtension" + } + } + }, + "schema": { + "id": "schema.json", + "type": "object", + "description": "A deterministic version of a JSON Schema object.", + "patternProperties": { + "^x-": { + "$ref": "#/definitions/vendorExtension" + } + }, + "properties": { + "$ref": { + "type": "string" + }, + "format": { + "type": "string" + }, + "title": { + "$ref": "#/definitions/json-schema-draft-07-schema" + }, + "description": { + "$ref": "#/definitions/json-schema-draft-07-schema" + }, + "default": { + "$ref": "#/definitions/json-schema-draft-07-schema" + }, + "multipleOf": { + "$ref": "#/definitions/json-schema-draft-07-schema" + }, + "maximum": { + "$ref": "#/definitions/json-schema-draft-07-schema" + }, + "exclusiveMaximum": { + "$ref": "#/definitions/json-schema-draft-07-schema" + }, + "minimum": { + "$ref": "#/definitions/json-schema-draft-07-schema" + }, + "exclusiveMinimum": { + "$ref": "#/definitions/json-schema-draft-07-schema" + }, + "maxLength": { + "$ref": "#/definitions/json-schema-draft-07-schema" + }, + "minLength": { + "$ref": "#/definitions/json-schema-draft-07-schema" + }, + "pattern": { + "$ref": "#/definitions/json-schema-draft-07-schema" + }, + "maxItems": { + "$ref": "#/definitions/json-schema-draft-07-schema" + }, + "minItems": { + "$ref": "#/definitions/json-schema-draft-07-schema" + }, + "uniqueItems": { + "$ref": "#/definitions/json-schema-draft-07-schema" + }, + "maxProperties": { + "$ref": "#/definitions/json-schema-draft-07-schema" + }, + "minProperties": { + "$ref": "#/definitions/json-schema-draft-07-schema" + }, + "required": { + "$ref": "#/definitions/json-schema-draft-07-schema" + }, + "enum": { + "$ref": "#/definitions/json-schema-draft-07-schema" + }, + "additionalProperties": { + "anyOf": [ + { + "$ref": "#/definitions/schema" + }, + { + "type": "boolean" + } + ], + "default": {} + }, + "type": { + "$ref": "#/definitions/json-schema-draft-07-schema" + }, + "items": { + "anyOf": [ + { + "$ref": "#/definitions/schema" + }, + { + "type": "array", + "minItems": 1, + "items": { + "$ref": "#/definitions/schema" + } + } + ], + "default": {} + }, + "allOf": { + "type": "array", + "minItems": 1, + "items": { + "$ref": "#/definitions/schema" + } + }, + "properties": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/schema" + }, + "default": {} + }, + "discriminator": { "type": "string" }, - "allOf": { - "$ref": "#/definitions/json-schema-draft-07-schema/definitions/schemaArray" + "readOnly": { + "type": "boolean", + "default": false }, - "anyOf": { - "$ref": "#/definitions/json-schema-draft-07-schema/definitions/schemaArray" + "xml": { + "$ref": "#/definitions/xml" }, - "oneOf": { - "$ref": "#/definitions/json-schema-draft-07-schema/definitions/schemaArray" + "externalDocs": { + "$ref": "#/definitions/externalDocs" }, - "not": { - "$ref": "#/definitions/json-schema-draft-07-schema" - } - }, - "dependencies": { - "exclusiveMaximum": [ - "maximum" - ], - "exclusiveMinimum": [ - "minimum" - ] + "example": {} }, - "default": {} + "additionalProperties": false }, - "xml": { - "id": "http://asyncapi.com/definitions/1.0.0/xml.json", + "tag": { + "id": "tag.json", "type": "object", "additionalProperties": false, + "required": [ + "name" + ], "properties": { "name": { "type": "string" }, - "namespace": { - "type": "string" - }, - "prefix": { - "type": "string" - }, - "attribute": { - "type": "boolean", - "default": false - }, - "wrapped": { - "type": "boolean", - "default": false - } - } - }, - "externalDocs": { - "id": "http://asyncapi.com/definitions/1.0.0/externalDocs.json", - "type": "object", - "additionalProperties": false, - "description": "information about external documentation", - "required": [ - "url" - ], - "properties": { "description": { "type": "string" }, - "url": { - "type": "string", - "format": "uri" + "externalDocs": { + "$ref": "#/definitions/externalDocs" } }, "patternProperties": { @@ -721,61 +660,92 @@ } } }, - "tag": { - "id": "http://asyncapi.com/definitions/1.0.0/tag.json", + "message": { + "id": "message.json", "type": "object", "additionalProperties": false, - "required": [ - "name" - ], + "patternProperties": { + "^x-": { + "$ref": "#/definitions/vendorExtension" + } + }, "properties": { - "name": { + "$ref": { "type": "string" }, + "headers": { + "$ref": "#/definitions/schema" + }, + "payload": { + "$ref": "#/definitions/schema" + }, + "tags": { + "type": "array", + "items": { + "$ref": "#/definitions/tag" + }, + "uniqueItems": true + }, + "summary": { + "type": "string", + "description": "A brief summary of the message." + }, "description": { - "type": "string" + "type": "string", + "description": "A longer description of the message. CommonMark is allowed." }, "externalDocs": { "$ref": "#/definitions/externalDocs" - } - }, - "patternProperties": { - "^x-": { - "$ref": "#/definitions/vendorExtension" - } + }, + "deprecated": { + "type": "boolean", + "default": false + }, + "example": {} } }, - "components": { - "id": "http://asyncapi.com/definitions/1.0.0/components.json", + "topicItem": { + "id": "topicItem.json", "type": "object", - "description": "An object to hold a set of reusable objects for different aspects of the AsyncAPI Specification.", "additionalProperties": false, + "patternProperties": { + "^x-": { + "$ref": "#/definitions/vendorExtension" + } + }, + "minProperties": 1, "properties": { - "schemas": { - "$ref": "#/definitions/schemas" + "$ref": { + "type": "string" }, - "messages": { - "$ref": "#/definitions/messages" + "publish": { + "$ref": "#/definitions/message" }, - "securitySchemes": { - "type": "object", - "patternProperties": { - "^[a-zA-Z0-9\\.\\-_]+$": { - "oneOf": [ - { - "$ref": "#/definitions/Reference" - }, - { - "$ref": "#/definitions/SecurityScheme" - } - ] - } - } + "subscribe": { + "$ref": "#/definitions/message" + }, + "deprecated": { + "type": "boolean", + "default": false } } }, + "topics": { + "id": "topics.json", + "type": "object", + "description": "Relative paths to the individual topics. They must be relative to the 'baseTopic'.", + "patternProperties": { + "^x-": { + "$ref": "#/definitions/vendorExtension" + }, + "^[^.]": { + "$ref": "#/definitions/topicItem" + } + }, + "additionalProperties": false + }, "schemas": { - "id": "http://asyncapi.com/definitions/1.0.0/schemas.json", + "id": "schemas.json", "type": "object", "additionalProperties": { "$ref": "#/definitions/schema" @@ -783,7 +753,7 @@ "description": "JSON objects describing schemas the API uses." }, "messages": { - "id": "http://asyncapi.com/definitions/1.0.0/messages.json", + "id": "messages.json", "type": "object", "additionalProperties": { "$ref": "#/definitions/message" @@ -791,7 +761,7 @@ "description": "JSON objects describing the messages being consumed and produced by the API." }, "Reference": { - "id": "http://asyncapi.com/definitions/1.0.0/Reference.json", + "id": "Reference.json", "type": "object", "required": [ "$ref" @@ -803,31 +773,8 @@ } } }, - "SecurityScheme": { - "id": "http://asyncapi.com/definitions/1.0.0/SecurityScheme.json", - "oneOf": [ - { - "$ref": "#/definitions/userPassword" - }, - { - "$ref": "#/definitions/apiKey" - }, - { - "$ref": "#/definitions/X509" - }, - { - "$ref": "#/definitions/symmetricEncryption" - }, - { - "$ref": "#/definitions/asymmetricEncryption" - }, - { - "$ref": "#/definitions/HTTPSecurityScheme" - } - ] - }, "userPassword": { - "id": "http://asyncapi.com/definitions/1.0.0/userPassword.json", + "id": "userPassword.json", "type": "object", "required": [ "type" @@ -849,7 +796,7 @@ "additionalProperties": false }, "apiKey": { - "id": "http://asyncapi.com/definitions/1.0.0/apiKey.json", + "id": "apiKey.json", "type": "object", "required": [ "type", @@ -879,7 +826,7 @@ "additionalProperties": false }, "X509": { - "id": "http://asyncapi.com/definitions/1.0.0/X509.json", + "id": "X509.json", "type": "object", "required": [ "type" @@ -901,7 +848,7 @@ "additionalProperties": false }, "symmetricEncryption": { - "id": "http://asyncapi.com/definitions/1.0.0/symmetricEncryption.json", + "id": "symmetricEncryption.json", "type": "object", "required": [ "type" @@ -923,7 +870,7 @@ "additionalProperties": false }, "asymmetricEncryption": { - "id": "http://asyncapi.com/definitions/1.0.0/asymmetricEncryption.json", + "id": "asymmetricEncryption.json", "type": "object", "required": [ "type" @@ -944,22 +891,8 @@ }, "additionalProperties": false }, - "HTTPSecurityScheme": { - "id": "http://asyncapi.com/definitions/1.0.0/HTTPSecurityScheme.json", - "oneOf": [ - { - "$ref": "#/definitions/NonBearerHTTPSecurityScheme" - }, - { - "$ref": "#/definitions/BearerHTTPSecurityScheme" - }, - { - "$ref": "#/definitions/APIKeyHTTPSecurityScheme" - } - ] - }, "NonBearerHTTPSecurityScheme": { - "id": "http://asyncapi.com/definitions/1.0.0/NonBearerHTTPSecurityScheme.json", + "id": "NonBearerHTTPSecurityScheme.json", "not": { "type": "object", "properties": { @@ -996,7 +929,7 @@ "additionalProperties": false }, "BearerHTTPSecurityScheme": { - "id": "http://asyncapi.com/definitions/1.0.0/BearerHTTPSecurityScheme.json", + "id": "BearerHTTPSecurityScheme.json", "type": "object", "required": [ "type", @@ -1028,7 +961,7 @@ "additionalProperties": false }, "APIKeyHTTPSecurityScheme": { - "id": "http://asyncapi.com/definitions/1.0.0/APIKeyHTTPSecurityScheme.json", + "id": "APIKeyHTTPSecurityScheme.json", "type": "object", "required": [ "type", @@ -1062,8 +995,74 @@ }, "additionalProperties": false }, + "HTTPSecurityScheme": { + "id": "HTTPSecurityScheme.json", + "oneOf": [ + { + "$ref": "#/definitions/NonBearerHTTPSecurityScheme" + }, + { + "$ref": "#/definitions/BearerHTTPSecurityScheme" + }, + { + "$ref": "#/definitions/APIKeyHTTPSecurityScheme" + } + ] + }, + "SecurityScheme": { + "id": "SecurityScheme.json", + "oneOf": [ + { + "$ref": "#/definitions/userPassword" + }, + { + "$ref": "#/definitions/apiKey" + }, + { + "$ref": "#/definitions/X509" + }, + { + "$ref": "#/definitions/symmetricEncryption" + }, + { + "$ref": "#/definitions/asymmetricEncryption" + }, + { + "$ref": "#/definitions/HTTPSecurityScheme" + } + ] + }, + "components": { + "id": "components.json", + "type": "object", + "description": "An object to hold a set of reusable objects for different aspects of the AsyncAPI Specification.", + "additionalProperties": false, + "properties": { + "schemas": { + "$ref": "#/definitions/schemas" + }, + "messages": { + "$ref": "#/definitions/messages" + }, + "securitySchemes": { + "type": "object", + "patternProperties": { + "^[a-zA-Z0-9\\.\\-_]+$": { + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/SecurityScheme" + } + ] + } + } + } + } + }, "SecurityRequirement": { - "id": "http://asyncapi.com/definitions/1.0.0/SecurityRequirement.json", + "id": "SecurityRequirement.json", "type": "object", "additionalProperties": { "type": "array", @@ -1073,5 +1072,6 @@ } } }, + "id": "http://asyncapi.com/definitions/1.0.0/asyncapi.json", "description": "!!Auto generated!! \n Do not manually edit. " } \ No newline at end of file diff --git a/schemas/1.0.0.json b/schemas/1.0.0.json index 7d9be09b..5e29e064 100644 --- a/schemas/1.0.0.json +++ b/schemas/1.0.0.json @@ -1,6 +1,5 @@ { - "id": "http://asyncapi.com/definitions/1.0.0/asyncapi.json", - "$schema": "http://json-schema.org/draft-04/schema", + "$schema": "http://json-schema.org/draft-04/schema#", "title": "AsyncAPI 1.0 schema.", "type": "object", "required": [ @@ -62,54 +61,14 @@ } }, "definitions": { - "http://asyncapi.com/definitions/1.0.0/vendorExtension.json": { - "id": "http://asyncapi.com/definitions/1.0.0/vendorExtension.json", + "vendorExtension.json": { + "id": "vendorExtension.json", "description": "Any property starting with x- is valid.", "additionalProperties": true, "additionalItems": true }, - "http://asyncapi.com/definitions/1.0.0/info.json": { - "id": "http://asyncapi.com/definitions/1.0.0/info.json", - "type": "object", - "description": "General information about the API.", - "required": [ - "version", - "title" - ], - "additionalProperties": false, - "patternProperties": { - "^x-": { - "$ref": "http://asyncapi.com/definitions/1.0.0/vendorExtension.json" - } - }, - "properties": { - "title": { - "type": "string", - "description": "A unique and precise title of the API." - }, - "version": { - "type": "string", - "description": "A semantic version number of the API." - }, - "description": { - "type": "string", - "description": "A longer description of the API. Should be different from the title. CommonMark is allowed." - }, - "termsOfService": { - "type": "string", - "description": "A URL to the Terms of Service for the API. MUST be in the format of a URL.", - "format": "uri" - }, - "contact": { - "$ref": "http://asyncapi.com/definitions/1.0.0/contact.json" - }, - "license": { - "$ref": "http://asyncapi.com/definitions/1.0.0/license.json" - } - } - }, - "http://asyncapi.com/definitions/1.0.0/contact.json": { - "id": "http://asyncapi.com/definitions/1.0.0/contact.json", + "contact.json": { + "id": "contact.json", "type": "object", "description": "Contact information for the owners of the API.", "additionalProperties": false, @@ -135,8 +94,8 @@ } } }, - "http://asyncapi.com/definitions/1.0.0/license.json": { - "id": "http://asyncapi.com/definitions/1.0.0/license.json", + "license.json": { + "id": "license.json", "type": "object", "required": [ "name" @@ -159,13 +118,13 @@ } } }, - "http://asyncapi.com/definitions/1.0.0/server.json": { - "id": "http://asyncapi.com/definitions/1.0.0/server.json", + "info.json": { + "id": "info.json", "type": "object", - "description": "An object representing a Server.", + "description": "General information about the API.", "required": [ - "url", - "scheme" + "version", + "title" ], "additionalProperties": false, "patternProperties": { @@ -174,46 +133,33 @@ } }, "properties": { - "url": { - "type": "string" + "title": { + "type": "string", + "description": "A unique and precise title of the API." + }, + "version": { + "type": "string", + "description": "A semantic version number of the API." }, "description": { - "type": "string" + "type": "string", + "description": "A longer description of the API. Should be different from the title. CommonMark is allowed." }, - "scheme": { + "termsOfService": { "type": "string", - "description": "The transfer protocol.", - "enum": [ - "kafka", - "kafka-secure", - "amqp", - "amqps", - "mqtt", - "mqtts", - "secure-mqtt", - "ws", - "wss", - "stomp", - "stomps" - ] + "description": "A URL to the Terms of Service for the API. MUST be in the format of a URL.", + "format": "uri" }, - "schemeVersion": { - "type": "string" + "contact": { + "$ref": "http://asyncapi.com/definitions/1.0.0/contact.json" }, - "variables": { - "$ref": "http://asyncapi.com/definitions/1.0.0/serverVariables.json" + "license": { + "$ref": "http://asyncapi.com/definitions/1.0.0/license.json" } } }, - "http://asyncapi.com/definitions/1.0.0/serverVariables.json": { - "id": "http://asyncapi.com/definitions/1.0.0/serverVariables.json", - "type": "object", - "additionalProperties": { - "$ref": "http://asyncapi.com/definitions/1.0.0/serverVariable.json" - } - }, - "http://asyncapi.com/definitions/1.0.0/serverVariable.json": { - "id": "http://asyncapi.com/definitions/1.0.0/serverVariable.json", + "serverVariable.json": { + "id": "serverVariable.json", "type": "object", "description": "An object representing a Server Variable for server URL template substitution.", "minProperties": 1, @@ -239,49 +185,21 @@ } } }, - "http://asyncapi.com/definitions/1.0.0/topics.json": { - "id": "http://asyncapi.com/definitions/1.0.0/topics.json", + "serverVariables.json": { + "id": "serverVariables.json", "type": "object", - "description": "Relative paths to the individual topics. They must be relative to the 'baseTopic'.", - "patternProperties": { - "^x-": { - "$ref": "http://asyncapi.com/definitions/1.0.0/vendorExtension.json" - }, - "^[^.]": { - "$ref": "http://asyncapi.com/definitions/1.0.0/topicItem.json" - } - }, - "additionalProperties": false - }, - "http://asyncapi.com/definitions/1.0.0/topicItem.json": { - "id": "http://asyncapi.com/definitions/1.0.0/topicItem.json", - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^x-": { - "$ref": "http://asyncapi.com/definitions/1.0.0/vendorExtension.json" - } - }, - "minProperties": 1, - "properties": { - "$ref": { - "type": "string" - }, - "publish": { - "$ref": "http://asyncapi.com/definitions/1.0.0/message.json" - }, - "subscribe": { - "$ref": "http://asyncapi.com/definitions/1.0.0/message.json" - }, - "deprecated": { - "type": "boolean", - "default": false - } + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/1.0.0/serverVariable.json" } }, - "http://asyncapi.com/definitions/1.0.0/message.json": { - "id": "http://asyncapi.com/definitions/1.0.0/message.json", + "server.json": { + "id": "server.json", "type": "object", + "description": "An object representing a Server.", + "required": [ + "url", + "scheme" + ], "additionalProperties": false, "patternProperties": { "^x-": { @@ -289,169 +207,36 @@ } }, "properties": { - "$ref": { + "url": { "type": "string" }, - "headers": { - "$ref": "http://asyncapi.com/definitions/1.0.0/schema.json" - }, - "payload": { - "$ref": "http://asyncapi.com/definitions/1.0.0/schema.json" - }, - "tags": { - "type": "array", - "items": { - "$ref": "http://asyncapi.com/definitions/1.0.0/tag.json" - }, - "uniqueItems": true - }, - "summary": { - "type": "string", - "description": "A brief summary of the message." - }, "description": { - "type": "string", - "description": "A longer description of the message. CommonMark is allowed." - }, - "externalDocs": { - "$ref": "http://asyncapi.com/definitions/1.0.0/externalDocs.json" - }, - "deprecated": { - "type": "boolean", - "default": false - }, - "example": {} - } - }, - "http://asyncapi.com/definitions/1.0.0/schema.json": { - "id": "http://asyncapi.com/definitions/1.0.0/schema.json", - "type": "object", - "description": "A deterministic version of a JSON Schema object.", - "patternProperties": { - "^x-": { - "$ref": "http://asyncapi.com/definitions/1.0.0/vendorExtension.json" - } - }, - "properties": { - "$ref": { "type": "string" }, - "format": { - "type": "string" - }, - "title": { - "$ref": "http://json-schema.org/draft-04/schema#/properties/title" - }, - "description": { - "$ref": "http://json-schema.org/draft-04/schema#/properties/description" - }, - "default": { - "$ref": "http://json-schema.org/draft-04/schema#/properties/default" - }, - "multipleOf": { - "$ref": "http://json-schema.org/draft-04/schema#/properties/multipleOf" - }, - "maximum": { - "$ref": "http://json-schema.org/draft-04/schema#/properties/maximum" - }, - "exclusiveMaximum": { - "$ref": "http://json-schema.org/draft-04/schema#/properties/exclusiveMaximum" - }, - "minimum": { - "$ref": "http://json-schema.org/draft-04/schema#/properties/minimum" - }, - "exclusiveMinimum": { - "$ref": "http://json-schema.org/draft-04/schema#/properties/exclusiveMinimum" - }, - "maxLength": { - "$ref": "http://json-schema.org/draft-04/schema#/definitions/positiveInteger" - }, - "minLength": { - "$ref": "http://json-schema.org/draft-04/schema#/definitions/positiveIntegerDefault0" - }, - "pattern": { - "$ref": "http://json-schema.org/draft-04/schema#/properties/pattern" - }, - "maxItems": { - "$ref": "http://json-schema.org/draft-04/schema#/definitions/positiveInteger" - }, - "minItems": { - "$ref": "http://json-schema.org/draft-04/schema#/definitions/positiveIntegerDefault0" - }, - "uniqueItems": { - "$ref": "http://json-schema.org/draft-04/schema#/properties/uniqueItems" - }, - "maxProperties": { - "$ref": "http://json-schema.org/draft-04/schema#/definitions/positiveInteger" - }, - "minProperties": { - "$ref": "http://json-schema.org/draft-04/schema#/definitions/positiveIntegerDefault0" - }, - "required": { - "$ref": "http://json-schema.org/draft-04/schema#/definitions/stringArray" - }, - "enum": { - "$ref": "http://json-schema.org/draft-04/schema#/properties/enum" - }, - "additionalProperties": { - "anyOf": [ - { - "$ref": "http://asyncapi.com/definitions/1.0.0/schema.json" - }, - { - "type": "boolean" - } - ], - "default": {} - }, - "type": { - "$ref": "http://json-schema.org/draft-04/schema#/properties/type" - }, - "items": { - "anyOf": [ - { - "$ref": "http://asyncapi.com/definitions/1.0.0/schema.json" - }, - { - "type": "array", - "minItems": 1, - "items": { - "$ref": "http://asyncapi.com/definitions/1.0.0/schema.json" - } - } - ], - "default": {} - }, - "allOf": { - "type": "array", - "minItems": 1, - "items": { - "$ref": "http://asyncapi.com/definitions/1.0.0/schema.json" - } - }, - "properties": { - "type": "object", - "additionalProperties": { - "$ref": "http://asyncapi.com/definitions/1.0.0/schema.json" - }, - "default": {} + "scheme": { + "type": "string", + "description": "The transfer protocol.", + "enum": [ + "kafka", + "kafka-secure", + "amqp", + "amqps", + "mqtt", + "mqtts", + "secure-mqtt", + "ws", + "wss", + "stomp", + "stomps" + ] }, - "discriminator": { + "schemeVersion": { "type": "string" }, - "readOnly": { - "type": "boolean", - "default": false - }, - "xml": { - "$ref": "http://asyncapi.com/definitions/1.0.0/xml.json" - }, - "externalDocs": { - "$ref": "http://asyncapi.com/definitions/1.0.0/externalDocs.json" - }, - "example": {} - }, - "additionalProperties": false + "variables": { + "$ref": "http://asyncapi.com/definitions/1.0.0/serverVariables.json" + } + } }, "http://json-schema.org/draft-04/schema": { "id": "http://json-schema.org/draft-04/schema", @@ -652,67 +437,221 @@ "type": "string" }, "allOf": { - "$ref": "#/definitions/schemaArray" - }, - "anyOf": { - "$ref": "#/definitions/schemaArray" - }, - "oneOf": { - "$ref": "#/definitions/schemaArray" - }, - "not": { - "$ref": "#" - } - }, - "dependencies": { - "exclusiveMaximum": [ - "maximum" - ], - "exclusiveMinimum": [ - "minimum" - ] - }, - "default": {} - }, - "http://asyncapi.com/definitions/1.0.0/xml.json": { - "id": "http://asyncapi.com/definitions/1.0.0/xml.json", - "type": "object", - "additionalProperties": false, - "properties": { - "name": { - "type": "string" + "$ref": "#/definitions/schemaArray" + }, + "anyOf": { + "$ref": "#/definitions/schemaArray" + }, + "oneOf": { + "$ref": "#/definitions/schemaArray" + }, + "not": { + "$ref": "#" + } + }, + "dependencies": { + "exclusiveMaximum": [ + "maximum" + ], + "exclusiveMinimum": [ + "minimum" + ] + }, + "default": {} + }, + "xml.json": { + "id": "xml.json", + "type": "object", + "additionalProperties": false, + "properties": { + "name": { + "type": "string" + }, + "namespace": { + "type": "string" + }, + "prefix": { + "type": "string" + }, + "attribute": { + "type": "boolean", + "default": false + }, + "wrapped": { + "type": "boolean", + "default": false + } + } + }, + "externalDocs.json": { + "id": "externalDocs.json", + "type": "object", + "additionalProperties": false, + "description": "information about external documentation", + "required": [ + "url" + ], + "properties": { + "description": { + "type": "string" + }, + "url": { + "type": "string", + "format": "uri" + } + }, + "patternProperties": { + "^x-": { + "$ref": "http://asyncapi.com/definitions/1.0.0/vendorExtension.json" + } + } + }, + "schema.json": { + "id": "schema.json", + "type": "object", + "description": "A deterministic version of a JSON Schema object.", + "patternProperties": { + "^x-": { + "$ref": "http://asyncapi.com/definitions/1.0.0/vendorExtension.json" + } + }, + "properties": { + "$ref": { + "type": "string" + }, + "format": { + "type": "string" + }, + "title": { + "$ref": "http://json-schema.org/draft-04/schema#/properties/title" + }, + "description": { + "$ref": "http://json-schema.org/draft-04/schema#/properties/description" + }, + "default": { + "$ref": "http://json-schema.org/draft-04/schema#/properties/default" + }, + "multipleOf": { + "$ref": "http://json-schema.org/draft-04/schema#/properties/multipleOf" + }, + "maximum": { + "$ref": "http://json-schema.org/draft-04/schema#/properties/maximum" + }, + "exclusiveMaximum": { + "$ref": "http://json-schema.org/draft-04/schema#/properties/exclusiveMaximum" + }, + "minimum": { + "$ref": "http://json-schema.org/draft-04/schema#/properties/minimum" + }, + "exclusiveMinimum": { + "$ref": "http://json-schema.org/draft-04/schema#/properties/exclusiveMinimum" + }, + "maxLength": { + "$ref": "http://json-schema.org/draft-04/schema#/definitions/positiveInteger" + }, + "minLength": { + "$ref": "http://json-schema.org/draft-04/schema#/definitions/positiveIntegerDefault0" + }, + "pattern": { + "$ref": "http://json-schema.org/draft-04/schema#/properties/pattern" + }, + "maxItems": { + "$ref": "http://json-schema.org/draft-04/schema#/definitions/positiveInteger" + }, + "minItems": { + "$ref": "http://json-schema.org/draft-04/schema#/definitions/positiveIntegerDefault0" + }, + "uniqueItems": { + "$ref": "http://json-schema.org/draft-04/schema#/properties/uniqueItems" + }, + "maxProperties": { + "$ref": "http://json-schema.org/draft-04/schema#/definitions/positiveInteger" + }, + "minProperties": { + "$ref": "http://json-schema.org/draft-04/schema#/definitions/positiveIntegerDefault0" + }, + "required": { + "$ref": "http://json-schema.org/draft-04/schema#/definitions/stringArray" + }, + "enum": { + "$ref": "http://json-schema.org/draft-04/schema#/properties/enum" + }, + "additionalProperties": { + "anyOf": [ + { + "$ref": "http://asyncapi.com/definitions/1.0.0/schema.json" + }, + { + "type": "boolean" + } + ], + "default": {} + }, + "type": { + "$ref": "http://json-schema.org/draft-04/schema#/properties/type" + }, + "items": { + "anyOf": [ + { + "$ref": "http://asyncapi.com/definitions/1.0.0/schema.json" + }, + { + "type": "array", + "minItems": 1, + "items": { + "$ref": "http://asyncapi.com/definitions/1.0.0/schema.json" + } + } + ], + "default": {} + }, + "allOf": { + "type": "array", + "minItems": 1, + "items": { + "$ref": "http://asyncapi.com/definitions/1.0.0/schema.json" + } }, - "namespace": { - "type": "string" + "properties": { + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/1.0.0/schema.json" + }, + "default": {} }, - "prefix": { + "discriminator": { "type": "string" }, - "attribute": { + "readOnly": { "type": "boolean", "default": false }, - "wrapped": { - "type": "boolean", - "default": false - } - } + "xml": { + "$ref": "http://asyncapi.com/definitions/1.0.0/xml.json" + }, + "externalDocs": { + "$ref": "http://asyncapi.com/definitions/1.0.0/externalDocs.json" + }, + "example": {} + }, + "additionalProperties": false }, - "http://asyncapi.com/definitions/1.0.0/externalDocs.json": { - "id": "http://asyncapi.com/definitions/1.0.0/externalDocs.json", + "tag.json": { + "id": "tag.json", "type": "object", "additionalProperties": false, - "description": "information about external documentation", "required": [ - "url" + "name" ], "properties": { + "name": { + "type": "string" + }, "description": { "type": "string" }, - "url": { - "type": "string", - "format": "uri" + "externalDocs": { + "$ref": "http://asyncapi.com/definitions/1.0.0/externalDocs.json" } }, "patternProperties": { @@ -721,77 +660,108 @@ } } }, - "http://asyncapi.com/definitions/1.0.0/tag.json": { - "id": "http://asyncapi.com/definitions/1.0.0/tag.json", + "message.json": { + "id": "message.json", "type": "object", "additionalProperties": false, - "required": [ - "name" - ], + "patternProperties": { + "^x-": { + "$ref": "http://asyncapi.com/definitions/1.0.0/vendorExtension.json" + } + }, "properties": { - "name": { + "$ref": { "type": "string" }, + "headers": { + "$ref": "http://asyncapi.com/definitions/1.0.0/schema.json" + }, + "payload": { + "$ref": "http://asyncapi.com/definitions/1.0.0/schema.json" + }, + "tags": { + "type": "array", + "items": { + "$ref": "http://asyncapi.com/definitions/1.0.0/tag.json" + }, + "uniqueItems": true + }, + "summary": { + "type": "string", + "description": "A brief summary of the message." + }, "description": { - "type": "string" + "type": "string", + "description": "A longer description of the message. CommonMark is allowed." }, "externalDocs": { "$ref": "http://asyncapi.com/definitions/1.0.0/externalDocs.json" - } - }, - "patternProperties": { - "^x-": { - "$ref": "http://asyncapi.com/definitions/1.0.0/vendorExtension.json" - } + }, + "deprecated": { + "type": "boolean", + "default": false + }, + "example": {} } }, - "http://asyncapi.com/definitions/1.0.0/components.json": { - "id": "http://asyncapi.com/definitions/1.0.0/components.json", + "topicItem.json": { + "id": "topicItem.json", "type": "object", - "description": "An object to hold a set of reusable objects for different aspects of the AsyncAPI Specification.", "additionalProperties": false, + "patternProperties": { + "^x-": { + "$ref": "http://asyncapi.com/definitions/1.0.0/vendorExtension.json" + } + }, + "minProperties": 1, "properties": { - "schemas": { - "$ref": "http://asyncapi.com/definitions/1.0.0/schemas.json" + "$ref": { + "type": "string" }, - "messages": { - "$ref": "http://asyncapi.com/definitions/1.0.0/messages.json" + "publish": { + "$ref": "http://asyncapi.com/definitions/1.0.0/message.json" }, - "securitySchemes": { - "type": "object", - "patternProperties": { - "^[a-zA-Z0-9\\.\\-_]+$": { - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/1.0.0/Reference.json" - }, - { - "$ref": "http://asyncapi.com/definitions/1.0.0/SecurityScheme.json" - } - ] - } - } + "subscribe": { + "$ref": "http://asyncapi.com/definitions/1.0.0/message.json" + }, + "deprecated": { + "type": "boolean", + "default": false } } }, - "http://asyncapi.com/definitions/1.0.0/schemas.json": { - "id": "http://asyncapi.com/definitions/1.0.0/schemas.json", + "topics.json": { + "id": "topics.json", + "type": "object", + "description": "Relative paths to the individual topics. They must be relative to the 'baseTopic'.", + "patternProperties": { + "^x-": { + "$ref": "http://asyncapi.com/definitions/1.0.0/vendorExtension.json" + }, + "^[^.]": { + "$ref": "http://asyncapi.com/definitions/1.0.0/topicItem.json" + } + }, + "additionalProperties": false + }, + "schemas.json": { + "id": "schemas.json", "type": "object", "additionalProperties": { "$ref": "http://asyncapi.com/definitions/1.0.0/schema.json" }, "description": "JSON objects describing schemas the API uses." }, - "http://asyncapi.com/definitions/1.0.0/messages.json": { - "id": "http://asyncapi.com/definitions/1.0.0/messages.json", + "messages.json": { + "id": "messages.json", "type": "object", "additionalProperties": { "$ref": "http://asyncapi.com/definitions/1.0.0/message.json" }, "description": "JSON objects describing the messages being consumed and produced by the API." }, - "http://asyncapi.com/definitions/1.0.0/Reference.json": { - "id": "http://asyncapi.com/definitions/1.0.0/Reference.json", + "Reference.json": { + "id": "Reference.json", "type": "object", "required": [ "$ref" @@ -803,31 +773,8 @@ } } }, - "http://asyncapi.com/definitions/1.0.0/SecurityScheme.json": { - "id": "http://asyncapi.com/definitions/1.0.0/SecurityScheme.json", - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/1.0.0/userPassword.json" - }, - { - "$ref": "http://asyncapi.com/definitions/1.0.0/apiKey.json" - }, - { - "$ref": "http://asyncapi.com/definitions/1.0.0/X509.json" - }, - { - "$ref": "http://asyncapi.com/definitions/1.0.0/symmetricEncryption.json" - }, - { - "$ref": "http://asyncapi.com/definitions/1.0.0/asymmetricEncryption.json" - }, - { - "$ref": "http://asyncapi.com/definitions/1.0.0/HTTPSecurityScheme.json" - } - ] - }, - "http://asyncapi.com/definitions/1.0.0/userPassword.json": { - "id": "http://asyncapi.com/definitions/1.0.0/userPassword.json", + "userPassword.json": { + "id": "userPassword.json", "type": "object", "required": [ "type" @@ -848,8 +795,8 @@ }, "additionalProperties": false }, - "http://asyncapi.com/definitions/1.0.0/apiKey.json": { - "id": "http://asyncapi.com/definitions/1.0.0/apiKey.json", + "apiKey.json": { + "id": "apiKey.json", "type": "object", "required": [ "type", @@ -878,8 +825,8 @@ }, "additionalProperties": false }, - "http://asyncapi.com/definitions/1.0.0/X509.json": { - "id": "http://asyncapi.com/definitions/1.0.0/X509.json", + "X509.json": { + "id": "X509.json", "type": "object", "required": [ "type" @@ -900,8 +847,8 @@ }, "additionalProperties": false }, - "http://asyncapi.com/definitions/1.0.0/symmetricEncryption.json": { - "id": "http://asyncapi.com/definitions/1.0.0/symmetricEncryption.json", + "symmetricEncryption.json": { + "id": "symmetricEncryption.json", "type": "object", "required": [ "type" @@ -922,8 +869,8 @@ }, "additionalProperties": false }, - "http://asyncapi.com/definitions/1.0.0/asymmetricEncryption.json": { - "id": "http://asyncapi.com/definitions/1.0.0/asymmetricEncryption.json", + "asymmetricEncryption.json": { + "id": "asymmetricEncryption.json", "type": "object", "required": [ "type" @@ -944,22 +891,8 @@ }, "additionalProperties": false }, - "http://asyncapi.com/definitions/1.0.0/HTTPSecurityScheme.json": { - "id": "http://asyncapi.com/definitions/1.0.0/HTTPSecurityScheme.json", - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/1.0.0/NonBearerHTTPSecurityScheme.json" - }, - { - "$ref": "http://asyncapi.com/definitions/1.0.0/BearerHTTPSecurityScheme.json" - }, - { - "$ref": "http://asyncapi.com/definitions/1.0.0/APIKeyHTTPSecurityScheme.json" - } - ] - }, - "http://asyncapi.com/definitions/1.0.0/NonBearerHTTPSecurityScheme.json": { - "id": "http://asyncapi.com/definitions/1.0.0/NonBearerHTTPSecurityScheme.json", + "NonBearerHTTPSecurityScheme.json": { + "id": "NonBearerHTTPSecurityScheme.json", "not": { "type": "object", "properties": { @@ -995,8 +928,8 @@ }, "additionalProperties": false }, - "http://asyncapi.com/definitions/1.0.0/BearerHTTPSecurityScheme.json": { - "id": "http://asyncapi.com/definitions/1.0.0/BearerHTTPSecurityScheme.json", + "BearerHTTPSecurityScheme.json": { + "id": "BearerHTTPSecurityScheme.json", "type": "object", "required": [ "type", @@ -1027,8 +960,8 @@ }, "additionalProperties": false }, - "http://asyncapi.com/definitions/1.0.0/APIKeyHTTPSecurityScheme.json": { - "id": "http://asyncapi.com/definitions/1.0.0/APIKeyHTTPSecurityScheme.json", + "APIKeyHTTPSecurityScheme.json": { + "id": "APIKeyHTTPSecurityScheme.json", "type": "object", "required": [ "type", @@ -1062,8 +995,74 @@ }, "additionalProperties": false }, - "http://asyncapi.com/definitions/1.0.0/SecurityRequirement.json": { - "id": "http://asyncapi.com/definitions/1.0.0/SecurityRequirement.json", + "HTTPSecurityScheme.json": { + "id": "HTTPSecurityScheme.json", + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/1.0.0/NonBearerHTTPSecurityScheme.json" + }, + { + "$ref": "http://asyncapi.com/definitions/1.0.0/BearerHTTPSecurityScheme.json" + }, + { + "$ref": "http://asyncapi.com/definitions/1.0.0/APIKeyHTTPSecurityScheme.json" + } + ] + }, + "SecurityScheme.json": { + "id": "SecurityScheme.json", + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/1.0.0/userPassword.json" + }, + { + "$ref": "http://asyncapi.com/definitions/1.0.0/apiKey.json" + }, + { + "$ref": "http://asyncapi.com/definitions/1.0.0/X509.json" + }, + { + "$ref": "http://asyncapi.com/definitions/1.0.0/symmetricEncryption.json" + }, + { + "$ref": "http://asyncapi.com/definitions/1.0.0/asymmetricEncryption.json" + }, + { + "$ref": "http://asyncapi.com/definitions/1.0.0/HTTPSecurityScheme.json" + } + ] + }, + "components.json": { + "id": "components.json", + "type": "object", + "description": "An object to hold a set of reusable objects for different aspects of the AsyncAPI Specification.", + "additionalProperties": false, + "properties": { + "schemas": { + "$ref": "http://asyncapi.com/definitions/1.0.0/schemas.json" + }, + "messages": { + "$ref": "http://asyncapi.com/definitions/1.0.0/messages.json" + }, + "securitySchemes": { + "type": "object", + "patternProperties": { + "^[a-zA-Z0-9\\.\\-_]+$": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/1.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/1.0.0/SecurityScheme.json" + } + ] + } + } + } + } + }, + "SecurityRequirement.json": { + "id": "SecurityRequirement.json", "type": "object", "additionalProperties": { "type": "array", @@ -1073,5 +1072,6 @@ } } }, + "id": "http://asyncapi.com/definitions/1.0.0/asyncapi.json", "description": "!!Auto generated!! \n Do not manually edit. " } \ No newline at end of file diff --git a/schemas/1.1.0-without-$id.json b/schemas/1.1.0-without-$id.json index 2ffa97f8..a83ae1af 100644 --- a/schemas/1.1.0-without-$id.json +++ b/schemas/1.1.0-without-$id.json @@ -1,6 +1,5 @@ { - "id": "http://asyncapi.com/definitions/1.1.0/asyncapi.json", - "$schema": "http://json-schema.org/draft-04/schema", + "$schema": "http://json-schema.org/draft-04/schema#", "title": "AsyncAPI 1.1.0 schema.", "type": "object", "required": [ @@ -64,53 +63,13 @@ }, "definitions": { "vendorExtension": { - "id": "http://asyncapi.com/definitions/1.1.0/vendorExtension.json", + "id": "vendorExtension.json", "description": "Any property starting with x- is valid.", "additionalProperties": true, "additionalItems": true }, - "info": { - "id": "http://asyncapi.com/definitions/1.1.0/info.json", - "type": "object", - "description": "General information about the API.", - "required": [ - "version", - "title" - ], - "additionalProperties": false, - "patternProperties": { - "^x-": { - "$ref": "#/definitions/vendorExtension" - } - }, - "properties": { - "title": { - "type": "string", - "description": "A unique and precise title of the API." - }, - "version": { - "type": "string", - "description": "A semantic version number of the API." - }, - "description": { - "type": "string", - "description": "A longer description of the API. Should be different from the title. CommonMark is allowed." - }, - "termsOfService": { - "type": "string", - "description": "A URL to the Terms of Service for the API. MUST be in the format of a URL.", - "format": "uri" - }, - "contact": { - "$ref": "#/definitions/contact" - }, - "license": { - "$ref": "#/definitions/license" - } - } - }, "contact": { - "id": "http://asyncapi.com/definitions/1.1.0/contact.json", + "id": "contact.json", "type": "object", "description": "Contact information for the owners of the API.", "additionalProperties": false, @@ -137,7 +96,7 @@ } }, "license": { - "id": "http://asyncapi.com/definitions/1.1.0/license.json", + "id": "license.json", "type": "object", "required": [ "name" @@ -160,13 +119,13 @@ } } }, - "server": { - "id": "http://asyncapi.com/definitions/1.1.0/server.json", + "info": { + "id": "info.json", "type": "object", - "description": "An object representing a Server.", + "description": "General information about the API.", "required": [ - "url", - "scheme" + "version", + "title" ], "additionalProperties": false, "patternProperties": { @@ -175,47 +134,33 @@ } }, "properties": { - "url": { - "type": "string" + "title": { + "type": "string", + "description": "A unique and precise title of the API." + }, + "version": { + "type": "string", + "description": "A semantic version number of the API." }, "description": { - "type": "string" + "type": "string", + "description": "A longer description of the API. Should be different from the title. CommonMark is allowed." }, - "scheme": { + "termsOfService": { "type": "string", - "description": "The transfer protocol.", - "enum": [ - "kafka", - "kafka-secure", - "amqp", - "amqps", - "mqtt", - "mqtts", - "secure-mqtt", - "ws", - "wss", - "stomp", - "stomps", - "jms" - ] + "description": "A URL to the Terms of Service for the API. MUST be in the format of a URL.", + "format": "uri" }, - "schemeVersion": { - "type": "string" + "contact": { + "$ref": "#/definitions/contact" }, - "variables": { - "$ref": "#/definitions/serverVariables" + "license": { + "$ref": "#/definitions/license" } } }, - "serverVariables": { - "id": "http://asyncapi.com/definitions/1.1.0/serverVariables.json", - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/serverVariable" - } - }, "serverVariable": { - "id": "http://asyncapi.com/definitions/1.1.0/serverVariable.json", + "id": "serverVariable.json", "type": "object", "description": "An object representing a Server Variable for server URL template substitution.", "minProperties": 1, @@ -241,222 +186,59 @@ } } }, - "topics": { - "id": "http://asyncapi.com/definitions/1.1.0/topics.json", + "serverVariables": { + "id": "serverVariables.json", "type": "object", - "description": "Relative paths to the individual topics. They must be relative to the 'baseTopic'.", - "patternProperties": { - "^x-": { - "$ref": "#/definitions/vendorExtension" - }, - "^[^.]": { - "$ref": "#/definitions/topicItem" - } - }, - "additionalProperties": false + "additionalProperties": { + "$ref": "#/definitions/serverVariable" + } }, - "topicItem": { - "id": "http://asyncapi.com/definitions/1.1.0/topicItem.json", + "server": { + "id": "server.json", "type": "object", + "description": "An object representing a Server.", + "required": [ + "url", + "scheme" + ], "additionalProperties": false, "patternProperties": { "^x-": { "$ref": "#/definitions/vendorExtension" } }, - "minProperties": 1, "properties": { - "$ref": { + "url": { "type": "string" }, - "parameters": { - "type": "array", - "uniqueItems": true, - "minItems": 1, - "items": { - "$ref": "#/definitions/parameter" - } - }, - "publish": { - "$ref": "#/definitions/operation" - }, - "subscribe": { - "$ref": "#/definitions/operation" - }, - "deprecated": { - "type": "boolean", - "default": false - } - } - }, - "parameter": { - "id": "http://asyncapi.com/definitions/1.1.0/parameter.json", - "additionalProperties": false, - "patternProperties": { - "^x-": { - "$ref": "#/definitions/vendorExtension" - } - }, - "properties": { "description": { - "type": "string", - "description": "A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed." - }, - "name": { - "type": "string", - "description": "The name of the parameter." - }, - "schema": { - "$ref": "#/definitions/schema" - } - } - }, - "schema": { - "id": "http://asyncapi.com/definitions/1.1.0/schema.json", - "type": "object", - "description": "A deterministic version of a JSON Schema object.", - "patternProperties": { - "^x-": { - "$ref": "#/definitions/vendorExtension" - } - }, - "properties": { - "$ref": { - "type": "string" - }, - "format": { "type": "string" }, - "title": { - "$ref": "#/definitions/json-schema-draft-07-schema" - }, - "description": { - "$ref": "#/definitions/json-schema-draft-07-schema" - }, - "default": { - "$ref": "#/definitions/json-schema-draft-07-schema" - }, - "multipleOf": { - "$ref": "#/definitions/json-schema-draft-07-schema" - }, - "maximum": { - "$ref": "#/definitions/json-schema-draft-07-schema" - }, - "exclusiveMaximum": { - "$ref": "#/definitions/json-schema-draft-07-schema" - }, - "minimum": { - "$ref": "#/definitions/json-schema-draft-07-schema" - }, - "exclusiveMinimum": { - "$ref": "#/definitions/json-schema-draft-07-schema" - }, - "maxLength": { - "$ref": "#/definitions/json-schema-draft-07-schema" - }, - "minLength": { - "$ref": "#/definitions/json-schema-draft-07-schema" - }, - "pattern": { - "$ref": "#/definitions/json-schema-draft-07-schema" - }, - "maxItems": { - "$ref": "#/definitions/json-schema-draft-07-schema" - }, - "minItems": { - "$ref": "#/definitions/json-schema-draft-07-schema" - }, - "uniqueItems": { - "$ref": "#/definitions/json-schema-draft-07-schema" - }, - "maxProperties": { - "$ref": "#/definitions/json-schema-draft-07-schema" - }, - "minProperties": { - "$ref": "#/definitions/json-schema-draft-07-schema" - }, - "required": { - "$ref": "#/definitions/json-schema-draft-07-schema" - }, - "enum": { - "$ref": "#/definitions/json-schema-draft-07-schema" - }, - "additionalProperties": { - "anyOf": [ - { - "$ref": "#/definitions/schema" - }, - { - "type": "boolean" - } - ], - "default": {} - }, - "type": { - "$ref": "#/definitions/json-schema-draft-07-schema" - }, - "items": { - "anyOf": [ - { - "$ref": "#/definitions/schema" - }, - { - "type": "array", - "minItems": 1, - "items": { - "$ref": "#/definitions/schema" - } - } - ], - "default": {} - }, - "allOf": { - "type": "array", - "minItems": 1, - "items": { - "$ref": "#/definitions/schema" - } - }, - "oneOf": { - "type": "array", - "minItems": 2, - "items": { - "$ref": "#/definitions/schema" - } - }, - "anyOf": { - "type": "array", - "minItems": 2, - "items": { - "$ref": "#/definitions/schema" - } - }, - "not": { - "$ref": "#/definitions/schema" - }, - "properties": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/schema" - }, - "default": {} + "scheme": { + "type": "string", + "description": "The transfer protocol.", + "enum": [ + "kafka", + "kafka-secure", + "amqp", + "amqps", + "mqtt", + "mqtts", + "secure-mqtt", + "ws", + "wss", + "stomp", + "stomps", + "jms" + ] }, - "discriminator": { + "schemeVersion": { "type": "string" }, - "readOnly": { - "type": "boolean", - "default": false - }, - "xml": { - "$ref": "#/definitions/xml" - }, - "externalDocs": { - "$ref": "#/definitions/externalDocs" - }, - "example": {} - }, - "additionalProperties": false + "variables": { + "$ref": "#/definitions/serverVariables" + } + } }, "json-schema-draft-07-schema": { "id": "http://json-schema.org/draft-04/schema", @@ -680,7 +462,7 @@ "default": {} }, "xml": { - "id": "http://asyncapi.com/definitions/1.1.0/xml.json", + "id": "xml.json", "type": "object", "additionalProperties": false, "properties": { @@ -693,31 +475,224 @@ "prefix": { "type": "string" }, - "attribute": { - "type": "boolean", - "default": false + "attribute": { + "type": "boolean", + "default": false + }, + "wrapped": { + "type": "boolean", + "default": false + } + } + }, + "externalDocs": { + "id": "externalDocs.json", + "type": "object", + "additionalProperties": false, + "description": "information about external documentation", + "required": [ + "url" + ], + "properties": { + "description": { + "type": "string" + }, + "url": { + "type": "string", + "format": "uri" + } + }, + "patternProperties": { + "^x-": { + "$ref": "#/definitions/vendorExtension" + } + } + }, + "schema": { + "id": "schema.json", + "type": "object", + "description": "A deterministic version of a JSON Schema object.", + "patternProperties": { + "^x-": { + "$ref": "#/definitions/vendorExtension" + } + }, + "properties": { + "$ref": { + "type": "string" + }, + "format": { + "type": "string" + }, + "title": { + "$ref": "#/definitions/json-schema-draft-07-schema" + }, + "description": { + "$ref": "#/definitions/json-schema-draft-07-schema" + }, + "default": { + "$ref": "#/definitions/json-schema-draft-07-schema" + }, + "multipleOf": { + "$ref": "#/definitions/json-schema-draft-07-schema" + }, + "maximum": { + "$ref": "#/definitions/json-schema-draft-07-schema" + }, + "exclusiveMaximum": { + "$ref": "#/definitions/json-schema-draft-07-schema" + }, + "minimum": { + "$ref": "#/definitions/json-schema-draft-07-schema" + }, + "exclusiveMinimum": { + "$ref": "#/definitions/json-schema-draft-07-schema" + }, + "maxLength": { + "$ref": "#/definitions/json-schema-draft-07-schema" + }, + "minLength": { + "$ref": "#/definitions/json-schema-draft-07-schema" + }, + "pattern": { + "$ref": "#/definitions/json-schema-draft-07-schema" + }, + "maxItems": { + "$ref": "#/definitions/json-schema-draft-07-schema" + }, + "minItems": { + "$ref": "#/definitions/json-schema-draft-07-schema" + }, + "uniqueItems": { + "$ref": "#/definitions/json-schema-draft-07-schema" + }, + "maxProperties": { + "$ref": "#/definitions/json-schema-draft-07-schema" + }, + "minProperties": { + "$ref": "#/definitions/json-schema-draft-07-schema" + }, + "required": { + "$ref": "#/definitions/json-schema-draft-07-schema" + }, + "enum": { + "$ref": "#/definitions/json-schema-draft-07-schema" + }, + "additionalProperties": { + "anyOf": [ + { + "$ref": "#/definitions/schema" + }, + { + "type": "boolean" + } + ], + "default": {} + }, + "type": { + "$ref": "#/definitions/json-schema-draft-07-schema" + }, + "items": { + "anyOf": [ + { + "$ref": "#/definitions/schema" + }, + { + "type": "array", + "minItems": 1, + "items": { + "$ref": "#/definitions/schema" + } + } + ], + "default": {} + }, + "allOf": { + "type": "array", + "minItems": 1, + "items": { + "$ref": "#/definitions/schema" + } + }, + "oneOf": { + "type": "array", + "minItems": 2, + "items": { + "$ref": "#/definitions/schema" + } + }, + "anyOf": { + "type": "array", + "minItems": 2, + "items": { + "$ref": "#/definitions/schema" + } + }, + "not": { + "$ref": "#/definitions/schema" + }, + "properties": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/schema" + }, + "default": {} + }, + "discriminator": { + "type": "string" + }, + "readOnly": { + "type": "boolean", + "default": false + }, + "xml": { + "$ref": "#/definitions/xml" + }, + "externalDocs": { + "$ref": "#/definitions/externalDocs" + }, + "example": {} + }, + "additionalProperties": false + }, + "parameter": { + "id": "parameter.json", + "additionalProperties": false, + "patternProperties": { + "^x-": { + "$ref": "#/definitions/vendorExtension" + } + }, + "properties": { + "description": { + "type": "string", + "description": "A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed." + }, + "name": { + "type": "string", + "description": "The name of the parameter." }, - "wrapped": { - "type": "boolean", - "default": false + "schema": { + "$ref": "#/definitions/schema" } } }, - "externalDocs": { - "id": "http://asyncapi.com/definitions/1.1.0/externalDocs.json", + "tag": { + "id": "tag.json", "type": "object", "additionalProperties": false, - "description": "information about external documentation", "required": [ - "url" + "name" ], "properties": { + "name": { + "type": "string" + }, "description": { "type": "string" }, - "url": { - "type": "string", - "format": "uri" + "externalDocs": { + "$ref": "#/definitions/externalDocs" } }, "patternProperties": { @@ -726,37 +701,8 @@ } } }, - "operation": { - "id": "http://asyncapi.com/definitions/1.1.0/operation.json", - "oneOf": [ - { - "$ref": "#/definitions/message" - }, - { - "type": "object", - "required": [ - "oneOf" - ], - "additionalProperties": false, - "patternProperties": { - "^x-": { - "$ref": "#/definitions/vendorExtension" - } - }, - "properties": { - "oneOf": { - "type": "array", - "minItems": 2, - "items": { - "$ref": "#/definitions/message" - } - } - } - } - ] - }, "message": { - "id": "http://asyncapi.com/definitions/1.1.0/message.json", + "id": "message.json", "type": "object", "additionalProperties": false, "patternProperties": { @@ -799,61 +745,85 @@ "example": {} } }, - "tag": { - "id": "http://asyncapi.com/definitions/1.1.0/tag.json", + "operation": { + "id": "operation.json", + "oneOf": [ + { + "$ref": "#/definitions/message" + }, + { + "type": "object", + "required": [ + "oneOf" + ], + "additionalProperties": false, + "patternProperties": { + "^x-": { + "$ref": "#/definitions/vendorExtension" + } + }, + "properties": { + "oneOf": { + "type": "array", + "minItems": 2, + "items": { + "$ref": "#/definitions/message" + } + } + } + } + ] + }, + "topicItem": { + "id": "topicItem.json", "type": "object", "additionalProperties": false, - "required": [ - "name" - ], + "patternProperties": { + "^x-": { + "$ref": "#/definitions/vendorExtension" + } + }, + "minProperties": 1, "properties": { - "name": { + "$ref": { "type": "string" }, - "description": { - "type": "string" + "parameters": { + "type": "array", + "uniqueItems": true, + "minItems": 1, + "items": { + "$ref": "#/definitions/parameter" + } }, - "externalDocs": { - "$ref": "#/definitions/externalDocs" - } - }, - "patternProperties": { - "^x-": { - "$ref": "#/definitions/vendorExtension" + "publish": { + "$ref": "#/definitions/operation" + }, + "subscribe": { + "$ref": "#/definitions/operation" + }, + "deprecated": { + "type": "boolean", + "default": false } } }, - "components": { - "id": "http://asyncapi.com/definitions/1.1.0/components.json", + "topics": { + "id": "topics.json", "type": "object", - "description": "An object to hold a set of reusable objects for different aspects of the AsyncAPI Specification.", - "additionalProperties": false, - "properties": { - "schemas": { - "$ref": "#/definitions/schemas" - }, - "messages": { - "$ref": "#/definitions/messages" + "description": "Relative paths to the individual topics. They must be relative to the 'baseTopic'.", + "patternProperties": { + "^x-": { + "$ref": "#/definitions/vendorExtension" }, - "securitySchemes": { - "type": "object", - "patternProperties": { - "^[a-zA-Z0-9\\.\\-_]+$": { - "oneOf": [ - { - "$ref": "#/definitions/Reference" - }, - { - "$ref": "#/definitions/SecurityScheme" - } - ] - } - } + "^[^.]": { + "$ref": "#/definitions/topicItem" } - } + }, + "additionalProperties": false }, "schemas": { - "id": "http://asyncapi.com/definitions/1.1.0/schemas.json", + "id": "schemas.json", "type": "object", "additionalProperties": { "$ref": "#/definitions/schema" @@ -861,7 +831,7 @@ "description": "JSON objects describing schemas the API uses." }, "messages": { - "id": "http://asyncapi.com/definitions/1.1.0/messages.json", + "id": "messages.json", "type": "object", "additionalProperties": { "$ref": "#/definitions/message" @@ -869,7 +839,7 @@ "description": "JSON objects describing the messages being consumed and produced by the API." }, "Reference": { - "id": "http://asyncapi.com/definitions/1.1.0/Reference.json", + "id": "Reference.json", "type": "object", "required": [ "$ref" @@ -881,31 +851,8 @@ } } }, - "SecurityScheme": { - "id": "http://asyncapi.com/definitions/1.1.0/SecurityScheme.json", - "oneOf": [ - { - "$ref": "#/definitions/userPassword" - }, - { - "$ref": "#/definitions/apiKey" - }, - { - "$ref": "#/definitions/X509" - }, - { - "$ref": "#/definitions/symmetricEncryption" - }, - { - "$ref": "#/definitions/asymmetricEncryption" - }, - { - "$ref": "#/definitions/HTTPSecurityScheme" - } - ] - }, "userPassword": { - "id": "http://asyncapi.com/definitions/1.1.0/userPassword.json", + "id": "userPassword.json", "type": "object", "required": [ "type" @@ -927,7 +874,7 @@ "additionalProperties": false }, "apiKey": { - "id": "http://asyncapi.com/definitions/1.1.0/apiKey.json", + "id": "apiKey.json", "type": "object", "required": [ "type", @@ -957,7 +904,7 @@ "additionalProperties": false }, "X509": { - "id": "http://asyncapi.com/definitions/1.1.0/X509.json", + "id": "X509.json", "type": "object", "required": [ "type" @@ -979,7 +926,7 @@ "additionalProperties": false }, "symmetricEncryption": { - "id": "http://asyncapi.com/definitions/1.1.0/symmetricEncryption.json", + "id": "symmetricEncryption.json", "type": "object", "required": [ "type" @@ -1001,7 +948,7 @@ "additionalProperties": false }, "asymmetricEncryption": { - "id": "http://asyncapi.com/definitions/1.1.0/asymmetricEncryption.json", + "id": "asymmetricEncryption.json", "type": "object", "required": [ "type" @@ -1022,22 +969,8 @@ }, "additionalProperties": false }, - "HTTPSecurityScheme": { - "id": "http://asyncapi.com/definitions/1.1.0/HTTPSecurityScheme.json", - "oneOf": [ - { - "$ref": "#/definitions/NonBearerHTTPSecurityScheme" - }, - { - "$ref": "#/definitions/BearerHTTPSecurityScheme" - }, - { - "$ref": "#/definitions/APIKeyHTTPSecurityScheme" - } - ] - }, "NonBearerHTTPSecurityScheme": { - "id": "http://asyncapi.com/definitions/1.1.0/NonBearerHTTPSecurityScheme.json", + "id": "NonBearerHTTPSecurityScheme.json", "not": { "type": "object", "properties": { @@ -1074,7 +1007,7 @@ "additionalProperties": false }, "BearerHTTPSecurityScheme": { - "id": "http://asyncapi.com/definitions/1.1.0/BearerHTTPSecurityScheme.json", + "id": "BearerHTTPSecurityScheme.json", "type": "object", "required": [ "type", @@ -1106,7 +1039,7 @@ "additionalProperties": false }, "APIKeyHTTPSecurityScheme": { - "id": "http://asyncapi.com/definitions/1.1.0/APIKeyHTTPSecurityScheme.json", + "id": "APIKeyHTTPSecurityScheme.json", "type": "object", "required": [ "type", @@ -1140,8 +1073,74 @@ }, "additionalProperties": false }, + "HTTPSecurityScheme": { + "id": "HTTPSecurityScheme.json", + "oneOf": [ + { + "$ref": "#/definitions/NonBearerHTTPSecurityScheme" + }, + { + "$ref": "#/definitions/BearerHTTPSecurityScheme" + }, + { + "$ref": "#/definitions/APIKeyHTTPSecurityScheme" + } + ] + }, + "SecurityScheme": { + "id": "SecurityScheme.json", + "oneOf": [ + { + "$ref": "#/definitions/userPassword" + }, + { + "$ref": "#/definitions/apiKey" + }, + { + "$ref": "#/definitions/X509" + }, + { + "$ref": "#/definitions/symmetricEncryption" + }, + { + "$ref": "#/definitions/asymmetricEncryption" + }, + { + "$ref": "#/definitions/HTTPSecurityScheme" + } + ] + }, + "components": { + "id": "components.json", + "type": "object", + "description": "An object to hold a set of reusable objects for different aspects of the AsyncAPI Specification.", + "additionalProperties": false, + "properties": { + "schemas": { + "$ref": "#/definitions/schemas" + }, + "messages": { + "$ref": "#/definitions/messages" + }, + "securitySchemes": { + "type": "object", + "patternProperties": { + "^[a-zA-Z0-9\\.\\-_]+$": { + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/SecurityScheme" + } + ] + } + } + } + } + }, "SecurityRequirement": { - "id": "http://asyncapi.com/definitions/1.1.0/SecurityRequirement.json", + "id": "SecurityRequirement.json", "type": "object", "additionalProperties": { "type": "array", @@ -1151,5 +1150,6 @@ } } }, + "id": "http://asyncapi.com/definitions/1.1.0/asyncapi.json", "description": "!!Auto generated!! \n Do not manually edit. " } \ No newline at end of file diff --git a/schemas/1.1.0.json b/schemas/1.1.0.json index 7af355df..96abb5bc 100644 --- a/schemas/1.1.0.json +++ b/schemas/1.1.0.json @@ -1,6 +1,5 @@ { - "id": "http://asyncapi.com/definitions/1.1.0/asyncapi.json", - "$schema": "http://json-schema.org/draft-04/schema", + "$schema": "http://json-schema.org/draft-04/schema#", "title": "AsyncAPI 1.1.0 schema.", "type": "object", "required": [ @@ -63,54 +62,14 @@ } }, "definitions": { - "http://asyncapi.com/definitions/1.1.0/vendorExtension.json": { - "id": "http://asyncapi.com/definitions/1.1.0/vendorExtension.json", + "vendorExtension.json": { + "id": "vendorExtension.json", "description": "Any property starting with x- is valid.", "additionalProperties": true, "additionalItems": true }, - "http://asyncapi.com/definitions/1.1.0/info.json": { - "id": "http://asyncapi.com/definitions/1.1.0/info.json", - "type": "object", - "description": "General information about the API.", - "required": [ - "version", - "title" - ], - "additionalProperties": false, - "patternProperties": { - "^x-": { - "$ref": "http://asyncapi.com/definitions/1.1.0/vendorExtension.json" - } - }, - "properties": { - "title": { - "type": "string", - "description": "A unique and precise title of the API." - }, - "version": { - "type": "string", - "description": "A semantic version number of the API." - }, - "description": { - "type": "string", - "description": "A longer description of the API. Should be different from the title. CommonMark is allowed." - }, - "termsOfService": { - "type": "string", - "description": "A URL to the Terms of Service for the API. MUST be in the format of a URL.", - "format": "uri" - }, - "contact": { - "$ref": "http://asyncapi.com/definitions/1.1.0/contact.json" - }, - "license": { - "$ref": "http://asyncapi.com/definitions/1.1.0/license.json" - } - } - }, - "http://asyncapi.com/definitions/1.1.0/contact.json": { - "id": "http://asyncapi.com/definitions/1.1.0/contact.json", + "contact.json": { + "id": "contact.json", "type": "object", "description": "Contact information for the owners of the API.", "additionalProperties": false, @@ -136,8 +95,8 @@ } } }, - "http://asyncapi.com/definitions/1.1.0/license.json": { - "id": "http://asyncapi.com/definitions/1.1.0/license.json", + "license.json": { + "id": "license.json", "type": "object", "required": [ "name" @@ -160,13 +119,13 @@ } } }, - "http://asyncapi.com/definitions/1.1.0/server.json": { - "id": "http://asyncapi.com/definitions/1.1.0/server.json", + "info.json": { + "id": "info.json", "type": "object", - "description": "An object representing a Server.", + "description": "General information about the API.", "required": [ - "url", - "scheme" + "version", + "title" ], "additionalProperties": false, "patternProperties": { @@ -175,47 +134,33 @@ } }, "properties": { - "url": { - "type": "string" + "title": { + "type": "string", + "description": "A unique and precise title of the API." + }, + "version": { + "type": "string", + "description": "A semantic version number of the API." }, "description": { - "type": "string" + "type": "string", + "description": "A longer description of the API. Should be different from the title. CommonMark is allowed." }, - "scheme": { + "termsOfService": { "type": "string", - "description": "The transfer protocol.", - "enum": [ - "kafka", - "kafka-secure", - "amqp", - "amqps", - "mqtt", - "mqtts", - "secure-mqtt", - "ws", - "wss", - "stomp", - "stomps", - "jms" - ] + "description": "A URL to the Terms of Service for the API. MUST be in the format of a URL.", + "format": "uri" }, - "schemeVersion": { - "type": "string" + "contact": { + "$ref": "http://asyncapi.com/definitions/1.1.0/contact.json" }, - "variables": { - "$ref": "http://asyncapi.com/definitions/1.1.0/serverVariables.json" + "license": { + "$ref": "http://asyncapi.com/definitions/1.1.0/license.json" } } }, - "http://asyncapi.com/definitions/1.1.0/serverVariables.json": { - "id": "http://asyncapi.com/definitions/1.1.0/serverVariables.json", - "type": "object", - "additionalProperties": { - "$ref": "http://asyncapi.com/definitions/1.1.0/serverVariable.json" - } - }, - "http://asyncapi.com/definitions/1.1.0/serverVariable.json": { - "id": "http://asyncapi.com/definitions/1.1.0/serverVariable.json", + "serverVariable.json": { + "id": "serverVariable.json", "type": "object", "description": "An object representing a Server Variable for server URL template substitution.", "minProperties": 1, @@ -241,222 +186,59 @@ } } }, - "http://asyncapi.com/definitions/1.1.0/topics.json": { - "id": "http://asyncapi.com/definitions/1.1.0/topics.json", + "serverVariables.json": { + "id": "serverVariables.json", "type": "object", - "description": "Relative paths to the individual topics. They must be relative to the 'baseTopic'.", - "patternProperties": { - "^x-": { - "$ref": "http://asyncapi.com/definitions/1.1.0/vendorExtension.json" - }, - "^[^.]": { - "$ref": "http://asyncapi.com/definitions/1.1.0/topicItem.json" - } - }, - "additionalProperties": false + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/1.1.0/serverVariable.json" + } }, - "http://asyncapi.com/definitions/1.1.0/topicItem.json": { - "id": "http://asyncapi.com/definitions/1.1.0/topicItem.json", + "server.json": { + "id": "server.json", "type": "object", + "description": "An object representing a Server.", + "required": [ + "url", + "scheme" + ], "additionalProperties": false, "patternProperties": { "^x-": { "$ref": "http://asyncapi.com/definitions/1.1.0/vendorExtension.json" } }, - "minProperties": 1, "properties": { - "$ref": { + "url": { "type": "string" }, - "parameters": { - "type": "array", - "uniqueItems": true, - "minItems": 1, - "items": { - "$ref": "http://asyncapi.com/definitions/1.1.0/parameter.json" - } - }, - "publish": { - "$ref": "http://asyncapi.com/definitions/1.1.0/operation.json" - }, - "subscribe": { - "$ref": "http://asyncapi.com/definitions/1.1.0/operation.json" - }, - "deprecated": { - "type": "boolean", - "default": false - } - } - }, - "http://asyncapi.com/definitions/1.1.0/parameter.json": { - "id": "http://asyncapi.com/definitions/1.1.0/parameter.json", - "additionalProperties": false, - "patternProperties": { - "^x-": { - "$ref": "http://asyncapi.com/definitions/1.1.0/vendorExtension.json" - } - }, - "properties": { "description": { - "type": "string", - "description": "A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed." - }, - "name": { - "type": "string", - "description": "The name of the parameter." - }, - "schema": { - "$ref": "http://asyncapi.com/definitions/1.1.0/schema.json" - } - } - }, - "http://asyncapi.com/definitions/1.1.0/schema.json": { - "id": "http://asyncapi.com/definitions/1.1.0/schema.json", - "type": "object", - "description": "A deterministic version of a JSON Schema object.", - "patternProperties": { - "^x-": { - "$ref": "http://asyncapi.com/definitions/1.1.0/vendorExtension.json" - } - }, - "properties": { - "$ref": { - "type": "string" - }, - "format": { "type": "string" }, - "title": { - "$ref": "http://json-schema.org/draft-04/schema#/properties/title" - }, - "description": { - "$ref": "http://json-schema.org/draft-04/schema#/properties/description" - }, - "default": { - "$ref": "http://json-schema.org/draft-04/schema#/properties/default" - }, - "multipleOf": { - "$ref": "http://json-schema.org/draft-04/schema#/properties/multipleOf" - }, - "maximum": { - "$ref": "http://json-schema.org/draft-04/schema#/properties/maximum" - }, - "exclusiveMaximum": { - "$ref": "http://json-schema.org/draft-04/schema#/properties/exclusiveMaximum" - }, - "minimum": { - "$ref": "http://json-schema.org/draft-04/schema#/properties/minimum" - }, - "exclusiveMinimum": { - "$ref": "http://json-schema.org/draft-04/schema#/properties/exclusiveMinimum" - }, - "maxLength": { - "$ref": "http://json-schema.org/draft-04/schema#/definitions/positiveInteger" - }, - "minLength": { - "$ref": "http://json-schema.org/draft-04/schema#/definitions/positiveIntegerDefault0" - }, - "pattern": { - "$ref": "http://json-schema.org/draft-04/schema#/properties/pattern" - }, - "maxItems": { - "$ref": "http://json-schema.org/draft-04/schema#/definitions/positiveInteger" - }, - "minItems": { - "$ref": "http://json-schema.org/draft-04/schema#/definitions/positiveIntegerDefault0" - }, - "uniqueItems": { - "$ref": "http://json-schema.org/draft-04/schema#/properties/uniqueItems" - }, - "maxProperties": { - "$ref": "http://json-schema.org/draft-04/schema#/definitions/positiveInteger" - }, - "minProperties": { - "$ref": "http://json-schema.org/draft-04/schema#/definitions/positiveIntegerDefault0" - }, - "required": { - "$ref": "http://json-schema.org/draft-04/schema#/definitions/stringArray" - }, - "enum": { - "$ref": "http://json-schema.org/draft-04/schema#/properties/enum" - }, - "additionalProperties": { - "anyOf": [ - { - "$ref": "http://asyncapi.com/definitions/1.1.0/schema.json" - }, - { - "type": "boolean" - } - ], - "default": {} - }, - "type": { - "$ref": "http://json-schema.org/draft-04/schema#/properties/type" - }, - "items": { - "anyOf": [ - { - "$ref": "http://asyncapi.com/definitions/1.1.0/schema.json" - }, - { - "type": "array", - "minItems": 1, - "items": { - "$ref": "http://asyncapi.com/definitions/1.1.0/schema.json" - } - } - ], - "default": {} - }, - "allOf": { - "type": "array", - "minItems": 1, - "items": { - "$ref": "http://asyncapi.com/definitions/1.1.0/schema.json" - } - }, - "oneOf": { - "type": "array", - "minItems": 2, - "items": { - "$ref": "http://asyncapi.com/definitions/1.1.0/schema.json" - } - }, - "anyOf": { - "type": "array", - "minItems": 2, - "items": { - "$ref": "http://asyncapi.com/definitions/1.1.0/schema.json" - } - }, - "not": { - "$ref": "http://asyncapi.com/definitions/1.1.0/schema.json" - }, - "properties": { - "type": "object", - "additionalProperties": { - "$ref": "http://asyncapi.com/definitions/1.1.0/schema.json" - }, - "default": {} + "scheme": { + "type": "string", + "description": "The transfer protocol.", + "enum": [ + "kafka", + "kafka-secure", + "amqp", + "amqps", + "mqtt", + "mqtts", + "secure-mqtt", + "ws", + "wss", + "stomp", + "stomps", + "jms" + ] }, - "discriminator": { + "schemeVersion": { "type": "string" }, - "readOnly": { - "type": "boolean", - "default": false - }, - "xml": { - "$ref": "http://asyncapi.com/definitions/1.1.0/xml.json" - }, - "externalDocs": { - "$ref": "http://asyncapi.com/definitions/1.1.0/externalDocs.json" - }, - "example": {} - }, - "additionalProperties": false + "variables": { + "$ref": "http://asyncapi.com/definitions/1.1.0/serverVariables.json" + } + } }, "http://json-schema.org/draft-04/schema": { "id": "http://json-schema.org/draft-04/schema", @@ -677,47 +459,240 @@ "minimum" ] }, - "default": {} + "default": {} + }, + "xml.json": { + "id": "xml.json", + "type": "object", + "additionalProperties": false, + "properties": { + "name": { + "type": "string" + }, + "namespace": { + "type": "string" + }, + "prefix": { + "type": "string" + }, + "attribute": { + "type": "boolean", + "default": false + }, + "wrapped": { + "type": "boolean", + "default": false + } + } + }, + "externalDocs.json": { + "id": "externalDocs.json", + "type": "object", + "additionalProperties": false, + "description": "information about external documentation", + "required": [ + "url" + ], + "properties": { + "description": { + "type": "string" + }, + "url": { + "type": "string", + "format": "uri" + } + }, + "patternProperties": { + "^x-": { + "$ref": "http://asyncapi.com/definitions/1.1.0/vendorExtension.json" + } + } + }, + "schema.json": { + "id": "schema.json", + "type": "object", + "description": "A deterministic version of a JSON Schema object.", + "patternProperties": { + "^x-": { + "$ref": "http://asyncapi.com/definitions/1.1.0/vendorExtension.json" + } + }, + "properties": { + "$ref": { + "type": "string" + }, + "format": { + "type": "string" + }, + "title": { + "$ref": "http://json-schema.org/draft-04/schema#/properties/title" + }, + "description": { + "$ref": "http://json-schema.org/draft-04/schema#/properties/description" + }, + "default": { + "$ref": "http://json-schema.org/draft-04/schema#/properties/default" + }, + "multipleOf": { + "$ref": "http://json-schema.org/draft-04/schema#/properties/multipleOf" + }, + "maximum": { + "$ref": "http://json-schema.org/draft-04/schema#/properties/maximum" + }, + "exclusiveMaximum": { + "$ref": "http://json-schema.org/draft-04/schema#/properties/exclusiveMaximum" + }, + "minimum": { + "$ref": "http://json-schema.org/draft-04/schema#/properties/minimum" + }, + "exclusiveMinimum": { + "$ref": "http://json-schema.org/draft-04/schema#/properties/exclusiveMinimum" + }, + "maxLength": { + "$ref": "http://json-schema.org/draft-04/schema#/definitions/positiveInteger" + }, + "minLength": { + "$ref": "http://json-schema.org/draft-04/schema#/definitions/positiveIntegerDefault0" + }, + "pattern": { + "$ref": "http://json-schema.org/draft-04/schema#/properties/pattern" + }, + "maxItems": { + "$ref": "http://json-schema.org/draft-04/schema#/definitions/positiveInteger" + }, + "minItems": { + "$ref": "http://json-schema.org/draft-04/schema#/definitions/positiveIntegerDefault0" + }, + "uniqueItems": { + "$ref": "http://json-schema.org/draft-04/schema#/properties/uniqueItems" + }, + "maxProperties": { + "$ref": "http://json-schema.org/draft-04/schema#/definitions/positiveInteger" + }, + "minProperties": { + "$ref": "http://json-schema.org/draft-04/schema#/definitions/positiveIntegerDefault0" + }, + "required": { + "$ref": "http://json-schema.org/draft-04/schema#/definitions/stringArray" + }, + "enum": { + "$ref": "http://json-schema.org/draft-04/schema#/properties/enum" + }, + "additionalProperties": { + "anyOf": [ + { + "$ref": "http://asyncapi.com/definitions/1.1.0/schema.json" + }, + { + "type": "boolean" + } + ], + "default": {} + }, + "type": { + "$ref": "http://json-schema.org/draft-04/schema#/properties/type" + }, + "items": { + "anyOf": [ + { + "$ref": "http://asyncapi.com/definitions/1.1.0/schema.json" + }, + { + "type": "array", + "minItems": 1, + "items": { + "$ref": "http://asyncapi.com/definitions/1.1.0/schema.json" + } + } + ], + "default": {} + }, + "allOf": { + "type": "array", + "minItems": 1, + "items": { + "$ref": "http://asyncapi.com/definitions/1.1.0/schema.json" + } + }, + "oneOf": { + "type": "array", + "minItems": 2, + "items": { + "$ref": "http://asyncapi.com/definitions/1.1.0/schema.json" + } + }, + "anyOf": { + "type": "array", + "minItems": 2, + "items": { + "$ref": "http://asyncapi.com/definitions/1.1.0/schema.json" + } + }, + "not": { + "$ref": "http://asyncapi.com/definitions/1.1.0/schema.json" + }, + "properties": { + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/1.1.0/schema.json" + }, + "default": {} + }, + "discriminator": { + "type": "string" + }, + "readOnly": { + "type": "boolean", + "default": false + }, + "xml": { + "$ref": "http://asyncapi.com/definitions/1.1.0/xml.json" + }, + "externalDocs": { + "$ref": "http://asyncapi.com/definitions/1.1.0/externalDocs.json" + }, + "example": {} + }, + "additionalProperties": false }, - "http://asyncapi.com/definitions/1.1.0/xml.json": { - "id": "http://asyncapi.com/definitions/1.1.0/xml.json", - "type": "object", + "parameter.json": { + "id": "parameter.json", "additionalProperties": false, + "patternProperties": { + "^x-": { + "$ref": "http://asyncapi.com/definitions/1.1.0/vendorExtension.json" + } + }, "properties": { - "name": { - "type": "string" - }, - "namespace": { - "type": "string" - }, - "prefix": { - "type": "string" + "description": { + "type": "string", + "description": "A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed." }, - "attribute": { - "type": "boolean", - "default": false + "name": { + "type": "string", + "description": "The name of the parameter." }, - "wrapped": { - "type": "boolean", - "default": false + "schema": { + "$ref": "http://asyncapi.com/definitions/1.1.0/schema.json" } } }, - "http://asyncapi.com/definitions/1.1.0/externalDocs.json": { - "id": "http://asyncapi.com/definitions/1.1.0/externalDocs.json", + "tag.json": { + "id": "tag.json", "type": "object", "additionalProperties": false, - "description": "information about external documentation", "required": [ - "url" + "name" ], "properties": { + "name": { + "type": "string" + }, "description": { "type": "string" }, - "url": { - "type": "string", - "format": "uri" + "externalDocs": { + "$ref": "http://asyncapi.com/definitions/1.1.0/externalDocs.json" } }, "patternProperties": { @@ -726,37 +701,8 @@ } } }, - "http://asyncapi.com/definitions/1.1.0/operation.json": { - "id": "http://asyncapi.com/definitions/1.1.0/operation.json", - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/1.1.0/message.json" - }, - { - "type": "object", - "required": [ - "oneOf" - ], - "additionalProperties": false, - "patternProperties": { - "^x-": { - "$ref": "http://asyncapi.com/definitions/1.1.0/vendorExtension.json" - } - }, - "properties": { - "oneOf": { - "type": "array", - "minItems": 2, - "items": { - "$ref": "http://asyncapi.com/definitions/1.1.0/message.json" - } - } - } - } - ] - }, - "http://asyncapi.com/definitions/1.1.0/message.json": { - "id": "http://asyncapi.com/definitions/1.1.0/message.json", + "message.json": { + "id": "message.json", "type": "object", "additionalProperties": false, "patternProperties": { @@ -799,77 +745,101 @@ "example": {} } }, - "http://asyncapi.com/definitions/1.1.0/tag.json": { - "id": "http://asyncapi.com/definitions/1.1.0/tag.json", + "operation.json": { + "id": "operation.json", + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/1.1.0/message.json" + }, + { + "type": "object", + "required": [ + "oneOf" + ], + "additionalProperties": false, + "patternProperties": { + "^x-": { + "$ref": "http://asyncapi.com/definitions/1.1.0/vendorExtension.json" + } + }, + "properties": { + "oneOf": { + "type": "array", + "minItems": 2, + "items": { + "$ref": "http://asyncapi.com/definitions/1.1.0/message.json" + } + } + } + } + ] + }, + "topicItem.json": { + "id": "topicItem.json", "type": "object", "additionalProperties": false, - "required": [ - "name" - ], + "patternProperties": { + "^x-": { + "$ref": "http://asyncapi.com/definitions/1.1.0/vendorExtension.json" + } + }, + "minProperties": 1, "properties": { - "name": { + "$ref": { "type": "string" }, - "description": { - "type": "string" + "parameters": { + "type": "array", + "uniqueItems": true, + "minItems": 1, + "items": { + "$ref": "http://asyncapi.com/definitions/1.1.0/parameter.json" + } }, - "externalDocs": { - "$ref": "http://asyncapi.com/definitions/1.1.0/externalDocs.json" - } - }, - "patternProperties": { - "^x-": { - "$ref": "http://asyncapi.com/definitions/1.1.0/vendorExtension.json" + "publish": { + "$ref": "http://asyncapi.com/definitions/1.1.0/operation.json" + }, + "subscribe": { + "$ref": "http://asyncapi.com/definitions/1.1.0/operation.json" + }, + "deprecated": { + "type": "boolean", + "default": false } } }, - "http://asyncapi.com/definitions/1.1.0/components.json": { - "id": "http://asyncapi.com/definitions/1.1.0/components.json", + "topics.json": { + "id": "topics.json", "type": "object", - "description": "An object to hold a set of reusable objects for different aspects of the AsyncAPI Specification.", - "additionalProperties": false, - "properties": { - "schemas": { - "$ref": "http://asyncapi.com/definitions/1.1.0/schemas.json" - }, - "messages": { - "$ref": "http://asyncapi.com/definitions/1.1.0/messages.json" + "description": "Relative paths to the individual topics. They must be relative to the 'baseTopic'.", + "patternProperties": { + "^x-": { + "$ref": "http://asyncapi.com/definitions/1.1.0/vendorExtension.json" }, - "securitySchemes": { - "type": "object", - "patternProperties": { - "^[a-zA-Z0-9\\.\\-_]+$": { - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/1.1.0/Reference.json" - }, - { - "$ref": "http://asyncapi.com/definitions/1.1.0/SecurityScheme.json" - } - ] - } - } + "^[^.]": { + "$ref": "http://asyncapi.com/definitions/1.1.0/topicItem.json" } - } + }, + "additionalProperties": false }, - "http://asyncapi.com/definitions/1.1.0/schemas.json": { - "id": "http://asyncapi.com/definitions/1.1.0/schemas.json", + "schemas.json": { + "id": "schemas.json", "type": "object", "additionalProperties": { "$ref": "http://asyncapi.com/definitions/1.1.0/schema.json" }, "description": "JSON objects describing schemas the API uses." }, - "http://asyncapi.com/definitions/1.1.0/messages.json": { - "id": "http://asyncapi.com/definitions/1.1.0/messages.json", + "messages.json": { + "id": "messages.json", "type": "object", "additionalProperties": { "$ref": "http://asyncapi.com/definitions/1.1.0/message.json" }, "description": "JSON objects describing the messages being consumed and produced by the API." }, - "http://asyncapi.com/definitions/1.1.0/Reference.json": { - "id": "http://asyncapi.com/definitions/1.1.0/Reference.json", + "Reference.json": { + "id": "Reference.json", "type": "object", "required": [ "$ref" @@ -881,31 +851,8 @@ } } }, - "http://asyncapi.com/definitions/1.1.0/SecurityScheme.json": { - "id": "http://asyncapi.com/definitions/1.1.0/SecurityScheme.json", - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/1.1.0/userPassword.json" - }, - { - "$ref": "http://asyncapi.com/definitions/1.1.0/apiKey.json" - }, - { - "$ref": "http://asyncapi.com/definitions/1.1.0/X509.json" - }, - { - "$ref": "http://asyncapi.com/definitions/1.1.0/symmetricEncryption.json" - }, - { - "$ref": "http://asyncapi.com/definitions/1.1.0/asymmetricEncryption.json" - }, - { - "$ref": "http://asyncapi.com/definitions/1.1.0/HTTPSecurityScheme.json" - } - ] - }, - "http://asyncapi.com/definitions/1.1.0/userPassword.json": { - "id": "http://asyncapi.com/definitions/1.1.0/userPassword.json", + "userPassword.json": { + "id": "userPassword.json", "type": "object", "required": [ "type" @@ -926,8 +873,8 @@ }, "additionalProperties": false }, - "http://asyncapi.com/definitions/1.1.0/apiKey.json": { - "id": "http://asyncapi.com/definitions/1.1.0/apiKey.json", + "apiKey.json": { + "id": "apiKey.json", "type": "object", "required": [ "type", @@ -956,8 +903,8 @@ }, "additionalProperties": false }, - "http://asyncapi.com/definitions/1.1.0/X509.json": { - "id": "http://asyncapi.com/definitions/1.1.0/X509.json", + "X509.json": { + "id": "X509.json", "type": "object", "required": [ "type" @@ -978,8 +925,8 @@ }, "additionalProperties": false }, - "http://asyncapi.com/definitions/1.1.0/symmetricEncryption.json": { - "id": "http://asyncapi.com/definitions/1.1.0/symmetricEncryption.json", + "symmetricEncryption.json": { + "id": "symmetricEncryption.json", "type": "object", "required": [ "type" @@ -1000,8 +947,8 @@ }, "additionalProperties": false }, - "http://asyncapi.com/definitions/1.1.0/asymmetricEncryption.json": { - "id": "http://asyncapi.com/definitions/1.1.0/asymmetricEncryption.json", + "asymmetricEncryption.json": { + "id": "asymmetricEncryption.json", "type": "object", "required": [ "type" @@ -1022,22 +969,8 @@ }, "additionalProperties": false }, - "http://asyncapi.com/definitions/1.1.0/HTTPSecurityScheme.json": { - "id": "http://asyncapi.com/definitions/1.1.0/HTTPSecurityScheme.json", - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/1.1.0/NonBearerHTTPSecurityScheme.json" - }, - { - "$ref": "http://asyncapi.com/definitions/1.1.0/BearerHTTPSecurityScheme.json" - }, - { - "$ref": "http://asyncapi.com/definitions/1.1.0/APIKeyHTTPSecurityScheme.json" - } - ] - }, - "http://asyncapi.com/definitions/1.1.0/NonBearerHTTPSecurityScheme.json": { - "id": "http://asyncapi.com/definitions/1.1.0/NonBearerHTTPSecurityScheme.json", + "NonBearerHTTPSecurityScheme.json": { + "id": "NonBearerHTTPSecurityScheme.json", "not": { "type": "object", "properties": { @@ -1073,8 +1006,8 @@ }, "additionalProperties": false }, - "http://asyncapi.com/definitions/1.1.0/BearerHTTPSecurityScheme.json": { - "id": "http://asyncapi.com/definitions/1.1.0/BearerHTTPSecurityScheme.json", + "BearerHTTPSecurityScheme.json": { + "id": "BearerHTTPSecurityScheme.json", "type": "object", "required": [ "type", @@ -1105,8 +1038,8 @@ }, "additionalProperties": false }, - "http://asyncapi.com/definitions/1.1.0/APIKeyHTTPSecurityScheme.json": { - "id": "http://asyncapi.com/definitions/1.1.0/APIKeyHTTPSecurityScheme.json", + "APIKeyHTTPSecurityScheme.json": { + "id": "APIKeyHTTPSecurityScheme.json", "type": "object", "required": [ "type", @@ -1140,8 +1073,74 @@ }, "additionalProperties": false }, - "http://asyncapi.com/definitions/1.1.0/SecurityRequirement.json": { - "id": "http://asyncapi.com/definitions/1.1.0/SecurityRequirement.json", + "HTTPSecurityScheme.json": { + "id": "HTTPSecurityScheme.json", + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/1.1.0/NonBearerHTTPSecurityScheme.json" + }, + { + "$ref": "http://asyncapi.com/definitions/1.1.0/BearerHTTPSecurityScheme.json" + }, + { + "$ref": "http://asyncapi.com/definitions/1.1.0/APIKeyHTTPSecurityScheme.json" + } + ] + }, + "SecurityScheme.json": { + "id": "SecurityScheme.json", + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/1.1.0/userPassword.json" + }, + { + "$ref": "http://asyncapi.com/definitions/1.1.0/apiKey.json" + }, + { + "$ref": "http://asyncapi.com/definitions/1.1.0/X509.json" + }, + { + "$ref": "http://asyncapi.com/definitions/1.1.0/symmetricEncryption.json" + }, + { + "$ref": "http://asyncapi.com/definitions/1.1.0/asymmetricEncryption.json" + }, + { + "$ref": "http://asyncapi.com/definitions/1.1.0/HTTPSecurityScheme.json" + } + ] + }, + "components.json": { + "id": "components.json", + "type": "object", + "description": "An object to hold a set of reusable objects for different aspects of the AsyncAPI Specification.", + "additionalProperties": false, + "properties": { + "schemas": { + "$ref": "http://asyncapi.com/definitions/1.1.0/schemas.json" + }, + "messages": { + "$ref": "http://asyncapi.com/definitions/1.1.0/messages.json" + }, + "securitySchemes": { + "type": "object", + "patternProperties": { + "^[a-zA-Z0-9\\.\\-_]+$": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/1.1.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/1.1.0/SecurityScheme.json" + } + ] + } + } + } + } + }, + "SecurityRequirement.json": { + "id": "SecurityRequirement.json", "type": "object", "additionalProperties": { "type": "array", @@ -1151,5 +1150,6 @@ } } }, + "id": "http://asyncapi.com/definitions/1.1.0/asyncapi.json", "description": "!!Auto generated!! \n Do not manually edit. " } \ No newline at end of file diff --git a/schemas/1.2.0-without-$id.json b/schemas/1.2.0-without-$id.json index 23a67d26..c7af42d4 100644 --- a/schemas/1.2.0-without-$id.json +++ b/schemas/1.2.0-without-$id.json @@ -1,6 +1,5 @@ { - "id": "http://asyncapi.com/definitions/1.2.0/asyncapi.json", - "$schema": "http://json-schema.org/draft-04/schema", + "$schema": "http://json-schema.org/draft-04/schema#", "title": "AsyncAPI 1.2.0 schema.", "type": "object", "required": [ @@ -60,12 +59,10 @@ "$ref": "#/definitions/topics" }, "stream": { - "$ref": "#/definitions/stream", - "description": "The list of messages a consumer can read or write from/to a streaming API." + "$ref": "#/definitions/stream" }, "events": { - "$ref": "#/definitions/events", - "description": "The list of messages an events API sends and/or receives." + "$ref": "#/definitions/events" }, "components": { "$ref": "#/definitions/components" @@ -89,53 +86,13 @@ }, "definitions": { "vendorExtension": { - "id": "http://asyncapi.com/definitions/1.2.0/vendorExtension.json", + "id": "vendorExtension.json", "description": "Any property starting with x- is valid.", "additionalProperties": true, "additionalItems": true }, - "info": { - "id": "http://asyncapi.com/definitions/1.2.0/info.json", - "type": "object", - "description": "General information about the API.", - "required": [ - "version", - "title" - ], - "additionalProperties": false, - "patternProperties": { - "^x-": { - "$ref": "#/definitions/vendorExtension" - } - }, - "properties": { - "title": { - "type": "string", - "description": "A unique and precise title of the API." - }, - "version": { - "type": "string", - "description": "A semantic version number of the API." - }, - "description": { - "type": "string", - "description": "A longer description of the API. Should be different from the title. CommonMark is allowed." - }, - "termsOfService": { - "type": "string", - "description": "A URL to the Terms of Service for the API. MUST be in the format of a URL.", - "format": "uri" - }, - "contact": { - "$ref": "#/definitions/contact" - }, - "license": { - "$ref": "#/definitions/license" - } - } - }, "contact": { - "id": "http://asyncapi.com/definitions/1.2.0/contact.json", + "id": "contact.json", "type": "object", "description": "Contact information for the owners of the API.", "additionalProperties": false, @@ -162,7 +119,7 @@ } }, "license": { - "id": "http://asyncapi.com/definitions/1.2.0/license.json", + "id": "license.json", "type": "object", "required": [ "name" @@ -185,13 +142,13 @@ } } }, - "server": { - "id": "http://asyncapi.com/definitions/1.2.0/server.json", + "info": { + "id": "info.json", "type": "object", - "description": "An object representing a Server.", + "description": "General information about the API.", "required": [ - "url", - "scheme" + "version", + "title" ], "additionalProperties": false, "patternProperties": { @@ -200,49 +157,33 @@ } }, "properties": { - "url": { - "type": "string" + "title": { + "type": "string", + "description": "A unique and precise title of the API." + }, + "version": { + "type": "string", + "description": "A semantic version number of the API." }, "description": { - "type": "string" + "type": "string", + "description": "A longer description of the API. Should be different from the title. CommonMark is allowed." }, - "scheme": { + "termsOfService": { "type": "string", - "description": "The transfer protocol.", - "enum": [ - "kafka", - "kafka-secure", - "amqp", - "amqps", - "mqtt", - "mqtts", - "secure-mqtt", - "ws", - "wss", - "stomp", - "stomps", - "jms", - "http", - "https" - ] + "description": "A URL to the Terms of Service for the API. MUST be in the format of a URL.", + "format": "uri" }, - "schemeVersion": { - "type": "string" + "contact": { + "$ref": "#/definitions/contact" }, - "variables": { - "$ref": "#/definitions/serverVariables" + "license": { + "$ref": "#/definitions/license" } } }, - "serverVariables": { - "id": "http://asyncapi.com/definitions/1.2.0/serverVariables.json", - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/serverVariable" - } - }, "serverVariable": { - "id": "http://asyncapi.com/definitions/1.2.0/serverVariable.json", + "id": "serverVariable.json", "type": "object", "description": "An object representing a Server Variable for server URL template substitution.", "minProperties": 1, @@ -260,233 +201,69 @@ }, "uniqueItems": true }, - "default": { - "type": "string" - }, - "description": { - "type": "string" - } - } - }, - "topics": { - "id": "http://asyncapi.com/definitions/1.2.0/topics.json", - "type": "object", - "description": "Relative paths to the individual topics. They must be relative to the 'baseTopic'.", - "patternProperties": { - "^x-": { - "$ref": "#/definitions/vendorExtension" - }, - "^[^.]": { - "$ref": "#/definitions/topicItem" - } - }, - "additionalProperties": false - }, - "topicItem": { - "id": "http://asyncapi.com/definitions/1.2.0/topicItem.json", - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^x-": { - "$ref": "#/definitions/vendorExtension" - } - }, - "minProperties": 1, - "properties": { - "$ref": { - "type": "string" - }, - "parameters": { - "type": "array", - "uniqueItems": true, - "minItems": 1, - "items": { - "$ref": "#/definitions/parameter" - } - }, - "publish": { - "$ref": "#/definitions/operation" - }, - "subscribe": { - "$ref": "#/definitions/operation" - }, - "deprecated": { - "type": "boolean", - "default": false - } - } - }, - "parameter": { - "id": "http://asyncapi.com/definitions/1.2.0/parameter.json", - "additionalProperties": false, - "patternProperties": { - "^x-": { - "$ref": "#/definitions/vendorExtension" - } - }, - "properties": { - "description": { - "type": "string", - "description": "A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed." - }, - "name": { - "type": "string", - "description": "The name of the parameter." - }, - "schema": { - "$ref": "#/definitions/schema" - }, - "$ref": { - "type": "string" - } - } - }, - "schema": { - "id": "http://asyncapi.com/definitions/1.2.0/schema.json", - "type": "object", - "description": "A deterministic version of a JSON Schema object.", - "patternProperties": { - "^x-": { - "$ref": "#/definitions/vendorExtension" - } - }, - "properties": { - "$ref": { - "type": "string" - }, - "format": { - "type": "string" - }, - "title": { - "$ref": "#/definitions/json-schema-draft-07-schema" - }, - "description": { - "$ref": "#/definitions/json-schema-draft-07-schema" - }, - "default": { - "$ref": "#/definitions/json-schema-draft-07-schema" - }, - "multipleOf": { - "$ref": "#/definitions/json-schema-draft-07-schema" - }, - "maximum": { - "$ref": "#/definitions/json-schema-draft-07-schema" - }, - "exclusiveMaximum": { - "$ref": "#/definitions/json-schema-draft-07-schema" - }, - "minimum": { - "$ref": "#/definitions/json-schema-draft-07-schema" - }, - "exclusiveMinimum": { - "$ref": "#/definitions/json-schema-draft-07-schema" - }, - "maxLength": { - "$ref": "#/definitions/json-schema-draft-07-schema" - }, - "minLength": { - "$ref": "#/definitions/json-schema-draft-07-schema" - }, - "pattern": { - "$ref": "#/definitions/json-schema-draft-07-schema" - }, - "maxItems": { - "$ref": "#/definitions/json-schema-draft-07-schema" - }, - "minItems": { - "$ref": "#/definitions/json-schema-draft-07-schema" - }, - "uniqueItems": { - "$ref": "#/definitions/json-schema-draft-07-schema" - }, - "maxProperties": { - "$ref": "#/definitions/json-schema-draft-07-schema" - }, - "minProperties": { - "$ref": "#/definitions/json-schema-draft-07-schema" - }, - "required": { - "$ref": "#/definitions/json-schema-draft-07-schema" - }, - "enum": { - "$ref": "#/definitions/json-schema-draft-07-schema" - }, - "additionalProperties": { - "anyOf": [ - { - "$ref": "#/definitions/schema" - }, - { - "type": "boolean" - } - ], - "default": {} - }, - "type": { - "$ref": "#/definitions/json-schema-draft-07-schema" - }, - "items": { - "anyOf": [ - { - "$ref": "#/definitions/schema" - }, - { - "type": "array", - "minItems": 1, - "items": { - "$ref": "#/definitions/schema" - } - } - ], - "default": {} - }, - "allOf": { - "type": "array", - "minItems": 1, - "items": { - "$ref": "#/definitions/schema" - } - }, - "oneOf": { - "type": "array", - "minItems": 2, - "items": { - "$ref": "#/definitions/schema" - } - }, - "anyOf": { - "type": "array", - "minItems": 2, - "items": { - "$ref": "#/definitions/schema" - } - }, - "not": { - "$ref": "#/definitions/schema" - }, - "properties": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/schema" - }, - "default": {} - }, - "discriminator": { + "default": { "type": "string" }, - "readOnly": { - "type": "boolean", - "default": false + "description": { + "type": "string" + } + } + }, + "serverVariables": { + "id": "serverVariables.json", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/serverVariable" + } + }, + "server": { + "id": "server.json", + "type": "object", + "description": "An object representing a Server.", + "required": [ + "url", + "scheme" + ], + "additionalProperties": false, + "patternProperties": { + "^x-": { + "$ref": "#/definitions/vendorExtension" + } + }, + "properties": { + "url": { + "type": "string" }, - "xml": { - "$ref": "#/definitions/xml" + "description": { + "type": "string" }, - "externalDocs": { - "$ref": "#/definitions/externalDocs" + "scheme": { + "type": "string", + "description": "The transfer protocol.", + "enum": [ + "kafka", + "kafka-secure", + "amqp", + "amqps", + "mqtt", + "mqtts", + "secure-mqtt", + "ws", + "wss", + "stomp", + "stomps", + "jms", + "http", + "https" + ] }, - "example": {} - }, - "additionalProperties": false + "schemeVersion": { + "type": "string" + }, + "variables": { + "$ref": "#/definitions/serverVariables" + } + } }, "json-schema-draft-07-schema": { "id": "http://json-schema.org/draft-04/schema", @@ -710,7 +487,7 @@ "default": {} }, "xml": { - "id": "http://asyncapi.com/definitions/1.2.0/xml.json", + "id": "xml.json", "type": "object", "additionalProperties": false, "properties": { @@ -727,27 +504,223 @@ "type": "boolean", "default": false }, - "wrapped": { - "type": "boolean", - "default": false + "wrapped": { + "type": "boolean", + "default": false + } + } + }, + "externalDocs": { + "id": "externalDocs.json", + "type": "object", + "additionalProperties": false, + "description": "information about external documentation", + "required": [ + "url" + ], + "properties": { + "description": { + "type": "string" + }, + "url": { + "type": "string", + "format": "uri" + } + }, + "patternProperties": { + "^x-": { + "$ref": "#/definitions/vendorExtension" + } + } + }, + "schema": { + "id": "schema.json", + "type": "object", + "description": "A deterministic version of a JSON Schema object.", + "patternProperties": { + "^x-": { + "$ref": "#/definitions/vendorExtension" + } + }, + "properties": { + "$ref": { + "type": "string" + }, + "format": { + "type": "string" + }, + "title": { + "$ref": "#/definitions/json-schema-draft-07-schema" + }, + "description": { + "$ref": "#/definitions/json-schema-draft-07-schema" + }, + "default": { + "$ref": "#/definitions/json-schema-draft-07-schema" + }, + "multipleOf": { + "$ref": "#/definitions/json-schema-draft-07-schema" + }, + "maximum": { + "$ref": "#/definitions/json-schema-draft-07-schema" + }, + "exclusiveMaximum": { + "$ref": "#/definitions/json-schema-draft-07-schema" + }, + "minimum": { + "$ref": "#/definitions/json-schema-draft-07-schema" + }, + "exclusiveMinimum": { + "$ref": "#/definitions/json-schema-draft-07-schema" + }, + "maxLength": { + "$ref": "#/definitions/json-schema-draft-07-schema" + }, + "minLength": { + "$ref": "#/definitions/json-schema-draft-07-schema" + }, + "pattern": { + "$ref": "#/definitions/json-schema-draft-07-schema" + }, + "maxItems": { + "$ref": "#/definitions/json-schema-draft-07-schema" + }, + "minItems": { + "$ref": "#/definitions/json-schema-draft-07-schema" + }, + "uniqueItems": { + "$ref": "#/definitions/json-schema-draft-07-schema" + }, + "maxProperties": { + "$ref": "#/definitions/json-schema-draft-07-schema" + }, + "minProperties": { + "$ref": "#/definitions/json-schema-draft-07-schema" + }, + "required": { + "$ref": "#/definitions/json-schema-draft-07-schema" + }, + "enum": { + "$ref": "#/definitions/json-schema-draft-07-schema" + }, + "additionalProperties": { + "anyOf": [ + { + "$ref": "#/definitions/schema" + }, + { + "type": "boolean" + } + ], + "default": {} + }, + "type": { + "$ref": "#/definitions/json-schema-draft-07-schema" + }, + "items": { + "anyOf": [ + { + "$ref": "#/definitions/schema" + }, + { + "type": "array", + "minItems": 1, + "items": { + "$ref": "#/definitions/schema" + } + } + ], + "default": {} + }, + "allOf": { + "type": "array", + "minItems": 1, + "items": { + "$ref": "#/definitions/schema" + } + }, + "oneOf": { + "type": "array", + "minItems": 2, + "items": { + "$ref": "#/definitions/schema" + } + }, + "anyOf": { + "type": "array", + "minItems": 2, + "items": { + "$ref": "#/definitions/schema" + } + }, + "not": { + "$ref": "#/definitions/schema" + }, + "properties": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/schema" + }, + "default": {} + }, + "discriminator": { + "type": "string" + }, + "readOnly": { + "type": "boolean", + "default": false + }, + "xml": { + "$ref": "#/definitions/xml" + }, + "externalDocs": { + "$ref": "#/definitions/externalDocs" + }, + "example": {} + }, + "additionalProperties": false + }, + "parameter": { + "id": "parameter.json", + "additionalProperties": false, + "patternProperties": { + "^x-": { + "$ref": "#/definitions/vendorExtension" + } + }, + "properties": { + "description": { + "type": "string", + "description": "A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed." + }, + "name": { + "type": "string", + "description": "The name of the parameter." + }, + "schema": { + "$ref": "#/definitions/schema" + }, + "$ref": { + "type": "string" } } }, - "externalDocs": { - "id": "http://asyncapi.com/definitions/1.2.0/externalDocs.json", + "tag": { + "id": "tag.json", "type": "object", "additionalProperties": false, - "description": "information about external documentation", "required": [ - "url" + "name" ], "properties": { + "name": { + "type": "string" + }, "description": { "type": "string" }, - "url": { - "type": "string", - "format": "uri" + "externalDocs": { + "$ref": "#/definitions/externalDocs" } }, "patternProperties": { @@ -756,37 +729,8 @@ } } }, - "operation": { - "id": "http://asyncapi.com/definitions/1.2.0/operation.json", - "oneOf": [ - { - "$ref": "#/definitions/message" - }, - { - "type": "object", - "required": [ - "oneOf" - ], - "additionalProperties": false, - "patternProperties": { - "^x-": { - "$ref": "#/definitions/vendorExtension" - } - }, - "properties": { - "oneOf": { - "type": "array", - "minItems": 2, - "items": { - "$ref": "#/definitions/message" - } - } - } - } - ] - }, "message": { - "id": "http://asyncapi.com/definitions/1.2.0/message.json", + "id": "message.json", "type": "object", "additionalProperties": false, "patternProperties": { @@ -829,32 +773,85 @@ "example": {} } }, - "tag": { - "id": "http://asyncapi.com/definitions/1.2.0/tag.json", + "operation": { + "id": "operation.json", + "oneOf": [ + { + "$ref": "#/definitions/message" + }, + { + "type": "object", + "required": [ + "oneOf" + ], + "additionalProperties": false, + "patternProperties": { + "^x-": { + "$ref": "#/definitions/vendorExtension" + } + }, + "properties": { + "oneOf": { + "type": "array", + "minItems": 2, + "items": { + "$ref": "#/definitions/message" + } + } + } + } + ] + }, + "topicItem": { + "id": "topicItem.json", "type": "object", "additionalProperties": false, - "required": [ - "name" - ], + "patternProperties": { + "^x-": { + "$ref": "#/definitions/vendorExtension" + } + }, + "minProperties": 1, "properties": { - "name": { + "$ref": { "type": "string" }, - "description": { - "type": "string" + "parameters": { + "type": "array", + "uniqueItems": true, + "minItems": 1, + "items": { + "$ref": "#/definitions/parameter" + } }, - "externalDocs": { - "$ref": "#/definitions/externalDocs" + "publish": { + "$ref": "#/definitions/operation" + }, + "subscribe": { + "$ref": "#/definitions/operation" + }, + "deprecated": { + "type": "boolean", + "default": false } - }, + } + }, + "topics": { + "id": "topics.json", + "type": "object", + "description": "Relative paths to the individual topics. They must be relative to the 'baseTopic'.", "patternProperties": { "^x-": { "$ref": "#/definitions/vendorExtension" + }, + "^[^.]": { + "$ref": "#/definitions/topicItem" } - } + }, + "additionalProperties": false }, "stream": { - "id": "http://asyncapi.com/definitions/1.2.0/stream.json", + "id": "stream.json", "title": "Stream Object", "type": "object", "additionalProperties": false, @@ -935,7 +932,7 @@ } }, "events": { - "id": "http://asyncapi.com/definitions/1.2.0/events.json", + "id": "events.json", "title": "Events Object", "type": "object", "additionalProperties": false, @@ -978,40 +975,8 @@ } } }, - "components": { - "id": "http://asyncapi.com/definitions/1.2.0/components.json", - "type": "object", - "description": "An object to hold a set of reusable objects for different aspects of the AsyncAPI Specification.", - "additionalProperties": false, - "properties": { - "schemas": { - "$ref": "#/definitions/schemas" - }, - "messages": { - "$ref": "#/definitions/messages" - }, - "securitySchemes": { - "type": "object", - "patternProperties": { - "^[a-zA-Z0-9\\.\\-_]+$": { - "oneOf": [ - { - "$ref": "#/definitions/Reference" - }, - { - "$ref": "#/definitions/SecurityScheme" - } - ] - } - } - }, - "parameters": { - "$ref": "#/definitions/parameters" - } - } - }, "schemas": { - "id": "http://asyncapi.com/definitions/1.2.0/schemas.json", + "id": "schemas.json", "type": "object", "additionalProperties": { "$ref": "#/definitions/schema" @@ -1019,7 +984,7 @@ "description": "JSON objects describing schemas the API uses." }, "messages": { - "id": "http://asyncapi.com/definitions/1.2.0/messages.json", + "id": "messages.json", "type": "object", "additionalProperties": { "$ref": "#/definitions/message" @@ -1027,7 +992,7 @@ "description": "JSON objects describing the messages being consumed and produced by the API." }, "Reference": { - "id": "http://asyncapi.com/definitions/1.2.0/Reference.json", + "id": "Reference.json", "type": "object", "required": [ "$ref" @@ -1039,31 +1004,8 @@ } } }, - "SecurityScheme": { - "id": "http://asyncapi.com/definitions/1.2.0/SecurityScheme.json", - "oneOf": [ - { - "$ref": "#/definitions/userPassword" - }, - { - "$ref": "#/definitions/apiKey" - }, - { - "$ref": "#/definitions/X509" - }, - { - "$ref": "#/definitions/symmetricEncryption" - }, - { - "$ref": "#/definitions/asymmetricEncryption" - }, - { - "$ref": "#/definitions/HTTPSecurityScheme" - } - ] - }, "userPassword": { - "id": "http://asyncapi.com/definitions/1.2.0/userPassword.json", + "id": "userPassword.json", "type": "object", "required": [ "type" @@ -1085,7 +1027,7 @@ "additionalProperties": false }, "apiKey": { - "id": "http://asyncapi.com/definitions/1.2.0/apiKey.json", + "id": "apiKey.json", "type": "object", "required": [ "type", @@ -1115,7 +1057,7 @@ "additionalProperties": false }, "X509": { - "id": "http://asyncapi.com/definitions/1.2.0/X509.json", + "id": "X509.json", "type": "object", "required": [ "type" @@ -1137,7 +1079,7 @@ "additionalProperties": false }, "symmetricEncryption": { - "id": "http://asyncapi.com/definitions/1.2.0/symmetricEncryption.json", + "id": "symmetricEncryption.json", "type": "object", "required": [ "type" @@ -1159,7 +1101,7 @@ "additionalProperties": false }, "asymmetricEncryption": { - "id": "http://asyncapi.com/definitions/1.2.0/asymmetricEncryption.json", + "id": "asymmetricEncryption.json", "type": "object", "required": [ "type" @@ -1180,22 +1122,8 @@ }, "additionalProperties": false }, - "HTTPSecurityScheme": { - "id": "http://asyncapi.com/definitions/1.2.0/HTTPSecurityScheme.json", - "oneOf": [ - { - "$ref": "#/definitions/NonBearerHTTPSecurityScheme" - }, - { - "$ref": "#/definitions/BearerHTTPSecurityScheme" - }, - { - "$ref": "#/definitions/APIKeyHTTPSecurityScheme" - } - ] - }, "NonBearerHTTPSecurityScheme": { - "id": "http://asyncapi.com/definitions/1.2.0/NonBearerHTTPSecurityScheme.json", + "id": "NonBearerHTTPSecurityScheme.json", "not": { "type": "object", "properties": { @@ -1232,7 +1160,7 @@ "additionalProperties": false }, "BearerHTTPSecurityScheme": { - "id": "http://asyncapi.com/definitions/1.2.0/BearerHTTPSecurityScheme.json", + "id": "BearerHTTPSecurityScheme.json", "type": "object", "required": [ "type", @@ -1264,7 +1192,7 @@ "additionalProperties": false }, "APIKeyHTTPSecurityScheme": { - "id": "http://asyncapi.com/definitions/1.2.0/APIKeyHTTPSecurityScheme.json", + "id": "APIKeyHTTPSecurityScheme.json", "type": "object", "required": [ "type", @@ -1298,16 +1226,85 @@ }, "additionalProperties": false }, + "HTTPSecurityScheme": { + "id": "HTTPSecurityScheme.json", + "oneOf": [ + { + "$ref": "#/definitions/NonBearerHTTPSecurityScheme" + }, + { + "$ref": "#/definitions/BearerHTTPSecurityScheme" + }, + { + "$ref": "#/definitions/APIKeyHTTPSecurityScheme" + } + ] + }, + "SecurityScheme": { + "id": "SecurityScheme.json", + "oneOf": [ + { + "$ref": "#/definitions/userPassword" + }, + { + "$ref": "#/definitions/apiKey" + }, + { + "$ref": "#/definitions/X509" + }, + { + "$ref": "#/definitions/symmetricEncryption" + }, + { + "$ref": "#/definitions/asymmetricEncryption" + }, + { + "$ref": "#/definitions/HTTPSecurityScheme" + } + ] + }, "parameters": { - "id": "http://asyncapi.com/definitions/1.2.0/parameters.json", + "id": "parameters.json", "type": "object", "additionalProperties": { "$ref": "#/definitions/parameter" }, "description": "JSON objects describing re-usable topic parameters." }, + "components": { + "id": "components.json", + "type": "object", + "description": "An object to hold a set of reusable objects for different aspects of the AsyncAPI Specification.", + "additionalProperties": false, + "properties": { + "schemas": { + "$ref": "#/definitions/schemas" + }, + "messages": { + "$ref": "#/definitions/messages" + }, + "securitySchemes": { + "type": "object", + "patternProperties": { + "^[a-zA-Z0-9\\.\\-_]+$": { + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/SecurityScheme" + } + ] + } + } + }, + "parameters": { + "$ref": "#/definitions/parameters" + } + } + }, "SecurityRequirement": { - "id": "http://asyncapi.com/definitions/1.2.0/SecurityRequirement.json", + "id": "SecurityRequirement.json", "type": "object", "additionalProperties": { "type": "array", @@ -1317,5 +1314,6 @@ } } }, + "id": "http://asyncapi.com/definitions/1.2.0/asyncapi.json", "description": "!!Auto generated!! \n Do not manually edit. " } \ No newline at end of file diff --git a/schemas/1.2.0.json b/schemas/1.2.0.json index d523b305..b22b0ab1 100644 --- a/schemas/1.2.0.json +++ b/schemas/1.2.0.json @@ -1,6 +1,5 @@ { - "id": "http://asyncapi.com/definitions/1.2.0/asyncapi.json", - "$schema": "http://json-schema.org/draft-04/schema", + "$schema": "http://json-schema.org/draft-04/schema#", "title": "AsyncAPI 1.2.0 schema.", "type": "object", "required": [ @@ -60,12 +59,10 @@ "$ref": "http://asyncapi.com/definitions/1.2.0/topics.json" }, "stream": { - "$ref": "http://asyncapi.com/definitions/1.2.0/stream.json", - "description": "The list of messages a consumer can read or write from/to a streaming API." + "$ref": "http://asyncapi.com/definitions/1.2.0/stream.json" }, "events": { - "$ref": "http://asyncapi.com/definitions/1.2.0/events.json", - "description": "The list of messages an events API sends and/or receives." + "$ref": "http://asyncapi.com/definitions/1.2.0/events.json" }, "components": { "$ref": "http://asyncapi.com/definitions/1.2.0/components.json" @@ -88,54 +85,14 @@ } }, "definitions": { - "http://asyncapi.com/definitions/1.2.0/vendorExtension.json": { - "id": "http://asyncapi.com/definitions/1.2.0/vendorExtension.json", + "vendorExtension.json": { + "id": "vendorExtension.json", "description": "Any property starting with x- is valid.", "additionalProperties": true, "additionalItems": true }, - "http://asyncapi.com/definitions/1.2.0/info.json": { - "id": "http://asyncapi.com/definitions/1.2.0/info.json", - "type": "object", - "description": "General information about the API.", - "required": [ - "version", - "title" - ], - "additionalProperties": false, - "patternProperties": { - "^x-": { - "$ref": "http://asyncapi.com/definitions/1.2.0/vendorExtension.json" - } - }, - "properties": { - "title": { - "type": "string", - "description": "A unique and precise title of the API." - }, - "version": { - "type": "string", - "description": "A semantic version number of the API." - }, - "description": { - "type": "string", - "description": "A longer description of the API. Should be different from the title. CommonMark is allowed." - }, - "termsOfService": { - "type": "string", - "description": "A URL to the Terms of Service for the API. MUST be in the format of a URL.", - "format": "uri" - }, - "contact": { - "$ref": "http://asyncapi.com/definitions/1.2.0/contact.json" - }, - "license": { - "$ref": "http://asyncapi.com/definitions/1.2.0/license.json" - } - } - }, - "http://asyncapi.com/definitions/1.2.0/contact.json": { - "id": "http://asyncapi.com/definitions/1.2.0/contact.json", + "contact.json": { + "id": "contact.json", "type": "object", "description": "Contact information for the owners of the API.", "additionalProperties": false, @@ -161,8 +118,8 @@ } } }, - "http://asyncapi.com/definitions/1.2.0/license.json": { - "id": "http://asyncapi.com/definitions/1.2.0/license.json", + "license.json": { + "id": "license.json", "type": "object", "required": [ "name" @@ -185,13 +142,13 @@ } } }, - "http://asyncapi.com/definitions/1.2.0/server.json": { - "id": "http://asyncapi.com/definitions/1.2.0/server.json", + "info.json": { + "id": "info.json", "type": "object", - "description": "An object representing a Server.", + "description": "General information about the API.", "required": [ - "url", - "scheme" + "version", + "title" ], "additionalProperties": false, "patternProperties": { @@ -200,49 +157,33 @@ } }, "properties": { - "url": { - "type": "string" + "title": { + "type": "string", + "description": "A unique and precise title of the API." + }, + "version": { + "type": "string", + "description": "A semantic version number of the API." }, "description": { - "type": "string" + "type": "string", + "description": "A longer description of the API. Should be different from the title. CommonMark is allowed." }, - "scheme": { + "termsOfService": { "type": "string", - "description": "The transfer protocol.", - "enum": [ - "kafka", - "kafka-secure", - "amqp", - "amqps", - "mqtt", - "mqtts", - "secure-mqtt", - "ws", - "wss", - "stomp", - "stomps", - "jms", - "http", - "https" - ] + "description": "A URL to the Terms of Service for the API. MUST be in the format of a URL.", + "format": "uri" }, - "schemeVersion": { - "type": "string" + "contact": { + "$ref": "http://asyncapi.com/definitions/1.2.0/contact.json" }, - "variables": { - "$ref": "http://asyncapi.com/definitions/1.2.0/serverVariables.json" + "license": { + "$ref": "http://asyncapi.com/definitions/1.2.0/license.json" } } }, - "http://asyncapi.com/definitions/1.2.0/serverVariables.json": { - "id": "http://asyncapi.com/definitions/1.2.0/serverVariables.json", - "type": "object", - "additionalProperties": { - "$ref": "http://asyncapi.com/definitions/1.2.0/serverVariable.json" - } - }, - "http://asyncapi.com/definitions/1.2.0/serverVariable.json": { - "id": "http://asyncapi.com/definitions/1.2.0/serverVariable.json", + "serverVariable.json": { + "id": "serverVariable.json", "type": "object", "description": "An object representing a Server Variable for server URL template substitution.", "minProperties": 1, @@ -268,226 +209,62 @@ } } }, - "http://asyncapi.com/definitions/1.2.0/topics.json": { - "id": "http://asyncapi.com/definitions/1.2.0/topics.json", + "serverVariables.json": { + "id": "serverVariables.json", "type": "object", - "description": "Relative paths to the individual topics. They must be relative to the 'baseTopic'.", - "patternProperties": { - "^x-": { - "$ref": "http://asyncapi.com/definitions/1.2.0/vendorExtension.json" - }, - "^[^.]": { - "$ref": "http://asyncapi.com/definitions/1.2.0/topicItem.json" - } - }, - "additionalProperties": false + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/1.2.0/serverVariable.json" + } }, - "http://asyncapi.com/definitions/1.2.0/topicItem.json": { - "id": "http://asyncapi.com/definitions/1.2.0/topicItem.json", + "server.json": { + "id": "server.json", "type": "object", + "description": "An object representing a Server.", + "required": [ + "url", + "scheme" + ], "additionalProperties": false, "patternProperties": { "^x-": { "$ref": "http://asyncapi.com/definitions/1.2.0/vendorExtension.json" } }, - "minProperties": 1, "properties": { - "$ref": { + "url": { "type": "string" }, - "parameters": { - "type": "array", - "uniqueItems": true, - "minItems": 1, - "items": { - "$ref": "http://asyncapi.com/definitions/1.2.0/parameter.json" - } - }, - "publish": { - "$ref": "http://asyncapi.com/definitions/1.2.0/operation.json" - }, - "subscribe": { - "$ref": "http://asyncapi.com/definitions/1.2.0/operation.json" - }, - "deprecated": { - "type": "boolean", - "default": false - } - } - }, - "http://asyncapi.com/definitions/1.2.0/parameter.json": { - "id": "http://asyncapi.com/definitions/1.2.0/parameter.json", - "additionalProperties": false, - "patternProperties": { - "^x-": { - "$ref": "http://asyncapi.com/definitions/1.2.0/vendorExtension.json" - } - }, - "properties": { "description": { - "type": "string", - "description": "A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed." + "type": "string" }, - "name": { + "scheme": { "type": "string", - "description": "The name of the parameter." - }, - "schema": { - "$ref": "http://asyncapi.com/definitions/1.2.0/schema.json" + "description": "The transfer protocol.", + "enum": [ + "kafka", + "kafka-secure", + "amqp", + "amqps", + "mqtt", + "mqtts", + "secure-mqtt", + "ws", + "wss", + "stomp", + "stomps", + "jms", + "http", + "https" + ] }, - "$ref": { + "schemeVersion": { "type": "string" + }, + "variables": { + "$ref": "http://asyncapi.com/definitions/1.2.0/serverVariables.json" } } }, - "http://asyncapi.com/definitions/1.2.0/schema.json": { - "id": "http://asyncapi.com/definitions/1.2.0/schema.json", - "type": "object", - "description": "A deterministic version of a JSON Schema object.", - "patternProperties": { - "^x-": { - "$ref": "http://asyncapi.com/definitions/1.2.0/vendorExtension.json" - } - }, - "properties": { - "$ref": { - "type": "string" - }, - "format": { - "type": "string" - }, - "title": { - "$ref": "http://json-schema.org/draft-04/schema#/properties/title" - }, - "description": { - "$ref": "http://json-schema.org/draft-04/schema#/properties/description" - }, - "default": { - "$ref": "http://json-schema.org/draft-04/schema#/properties/default" - }, - "multipleOf": { - "$ref": "http://json-schema.org/draft-04/schema#/properties/multipleOf" - }, - "maximum": { - "$ref": "http://json-schema.org/draft-04/schema#/properties/maximum" - }, - "exclusiveMaximum": { - "$ref": "http://json-schema.org/draft-04/schema#/properties/exclusiveMaximum" - }, - "minimum": { - "$ref": "http://json-schema.org/draft-04/schema#/properties/minimum" - }, - "exclusiveMinimum": { - "$ref": "http://json-schema.org/draft-04/schema#/properties/exclusiveMinimum" - }, - "maxLength": { - "$ref": "http://json-schema.org/draft-04/schema#/definitions/positiveInteger" - }, - "minLength": { - "$ref": "http://json-schema.org/draft-04/schema#/definitions/positiveIntegerDefault0" - }, - "pattern": { - "$ref": "http://json-schema.org/draft-04/schema#/properties/pattern" - }, - "maxItems": { - "$ref": "http://json-schema.org/draft-04/schema#/definitions/positiveInteger" - }, - "minItems": { - "$ref": "http://json-schema.org/draft-04/schema#/definitions/positiveIntegerDefault0" - }, - "uniqueItems": { - "$ref": "http://json-schema.org/draft-04/schema#/properties/uniqueItems" - }, - "maxProperties": { - "$ref": "http://json-schema.org/draft-04/schema#/definitions/positiveInteger" - }, - "minProperties": { - "$ref": "http://json-schema.org/draft-04/schema#/definitions/positiveIntegerDefault0" - }, - "required": { - "$ref": "http://json-schema.org/draft-04/schema#/definitions/stringArray" - }, - "enum": { - "$ref": "http://json-schema.org/draft-04/schema#/properties/enum" - }, - "additionalProperties": { - "anyOf": [ - { - "$ref": "http://asyncapi.com/definitions/1.2.0/schema.json" - }, - { - "type": "boolean" - } - ], - "default": {} - }, - "type": { - "$ref": "http://json-schema.org/draft-04/schema#/properties/type" - }, - "items": { - "anyOf": [ - { - "$ref": "http://asyncapi.com/definitions/1.2.0/schema.json" - }, - { - "type": "array", - "minItems": 1, - "items": { - "$ref": "http://asyncapi.com/definitions/1.2.0/schema.json" - } - } - ], - "default": {} - }, - "allOf": { - "type": "array", - "minItems": 1, - "items": { - "$ref": "http://asyncapi.com/definitions/1.2.0/schema.json" - } - }, - "oneOf": { - "type": "array", - "minItems": 2, - "items": { - "$ref": "http://asyncapi.com/definitions/1.2.0/schema.json" - } - }, - "anyOf": { - "type": "array", - "minItems": 2, - "items": { - "$ref": "http://asyncapi.com/definitions/1.2.0/schema.json" - } - }, - "not": { - "$ref": "http://asyncapi.com/definitions/1.2.0/schema.json" - }, - "properties": { - "type": "object", - "additionalProperties": { - "$ref": "http://asyncapi.com/definitions/1.2.0/schema.json" - }, - "default": {} - }, - "discriminator": { - "type": "string" - }, - "readOnly": { - "type": "boolean", - "default": false - }, - "xml": { - "$ref": "http://asyncapi.com/definitions/1.2.0/xml.json" - }, - "externalDocs": { - "$ref": "http://asyncapi.com/definitions/1.2.0/externalDocs.json" - }, - "example": {} - }, - "additionalProperties": false - }, "http://json-schema.org/draft-04/schema": { "id": "http://json-schema.org/draft-04/schema", "description": "Core schema meta-schema", @@ -709,45 +486,241 @@ }, "default": {} }, - "http://asyncapi.com/definitions/1.2.0/xml.json": { - "id": "http://asyncapi.com/definitions/1.2.0/xml.json", + "xml.json": { + "id": "xml.json", "type": "object", "additionalProperties": false, "properties": { "name": { - "type": "string" + "type": "string" + }, + "namespace": { + "type": "string" + }, + "prefix": { + "type": "string" + }, + "attribute": { + "type": "boolean", + "default": false + }, + "wrapped": { + "type": "boolean", + "default": false + } + } + }, + "externalDocs.json": { + "id": "externalDocs.json", + "type": "object", + "additionalProperties": false, + "description": "information about external documentation", + "required": [ + "url" + ], + "properties": { + "description": { + "type": "string" + }, + "url": { + "type": "string", + "format": "uri" + } + }, + "patternProperties": { + "^x-": { + "$ref": "http://asyncapi.com/definitions/1.2.0/vendorExtension.json" + } + } + }, + "schema.json": { + "id": "schema.json", + "type": "object", + "description": "A deterministic version of a JSON Schema object.", + "patternProperties": { + "^x-": { + "$ref": "http://asyncapi.com/definitions/1.2.0/vendorExtension.json" + } + }, + "properties": { + "$ref": { + "type": "string" + }, + "format": { + "type": "string" + }, + "title": { + "$ref": "http://json-schema.org/draft-04/schema#/properties/title" + }, + "description": { + "$ref": "http://json-schema.org/draft-04/schema#/properties/description" + }, + "default": { + "$ref": "http://json-schema.org/draft-04/schema#/properties/default" + }, + "multipleOf": { + "$ref": "http://json-schema.org/draft-04/schema#/properties/multipleOf" + }, + "maximum": { + "$ref": "http://json-schema.org/draft-04/schema#/properties/maximum" + }, + "exclusiveMaximum": { + "$ref": "http://json-schema.org/draft-04/schema#/properties/exclusiveMaximum" + }, + "minimum": { + "$ref": "http://json-schema.org/draft-04/schema#/properties/minimum" + }, + "exclusiveMinimum": { + "$ref": "http://json-schema.org/draft-04/schema#/properties/exclusiveMinimum" + }, + "maxLength": { + "$ref": "http://json-schema.org/draft-04/schema#/definitions/positiveInteger" + }, + "minLength": { + "$ref": "http://json-schema.org/draft-04/schema#/definitions/positiveIntegerDefault0" + }, + "pattern": { + "$ref": "http://json-schema.org/draft-04/schema#/properties/pattern" + }, + "maxItems": { + "$ref": "http://json-schema.org/draft-04/schema#/definitions/positiveInteger" + }, + "minItems": { + "$ref": "http://json-schema.org/draft-04/schema#/definitions/positiveIntegerDefault0" + }, + "uniqueItems": { + "$ref": "http://json-schema.org/draft-04/schema#/properties/uniqueItems" + }, + "maxProperties": { + "$ref": "http://json-schema.org/draft-04/schema#/definitions/positiveInteger" + }, + "minProperties": { + "$ref": "http://json-schema.org/draft-04/schema#/definitions/positiveIntegerDefault0" + }, + "required": { + "$ref": "http://json-schema.org/draft-04/schema#/definitions/stringArray" + }, + "enum": { + "$ref": "http://json-schema.org/draft-04/schema#/properties/enum" + }, + "additionalProperties": { + "anyOf": [ + { + "$ref": "http://asyncapi.com/definitions/1.2.0/schema.json" + }, + { + "type": "boolean" + } + ], + "default": {} + }, + "type": { + "$ref": "http://json-schema.org/draft-04/schema#/properties/type" + }, + "items": { + "anyOf": [ + { + "$ref": "http://asyncapi.com/definitions/1.2.0/schema.json" + }, + { + "type": "array", + "minItems": 1, + "items": { + "$ref": "http://asyncapi.com/definitions/1.2.0/schema.json" + } + } + ], + "default": {} + }, + "allOf": { + "type": "array", + "minItems": 1, + "items": { + "$ref": "http://asyncapi.com/definitions/1.2.0/schema.json" + } + }, + "oneOf": { + "type": "array", + "minItems": 2, + "items": { + "$ref": "http://asyncapi.com/definitions/1.2.0/schema.json" + } + }, + "anyOf": { + "type": "array", + "minItems": 2, + "items": { + "$ref": "http://asyncapi.com/definitions/1.2.0/schema.json" + } + }, + "not": { + "$ref": "http://asyncapi.com/definitions/1.2.0/schema.json" + }, + "properties": { + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/1.2.0/schema.json" + }, + "default": {} + }, + "discriminator": { + "type": "string" + }, + "readOnly": { + "type": "boolean", + "default": false + }, + "xml": { + "$ref": "http://asyncapi.com/definitions/1.2.0/xml.json" + }, + "externalDocs": { + "$ref": "http://asyncapi.com/definitions/1.2.0/externalDocs.json" + }, + "example": {} + }, + "additionalProperties": false + }, + "parameter.json": { + "id": "parameter.json", + "additionalProperties": false, + "patternProperties": { + "^x-": { + "$ref": "http://asyncapi.com/definitions/1.2.0/vendorExtension.json" + } + }, + "properties": { + "description": { + "type": "string", + "description": "A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed." + }, + "name": { + "type": "string", + "description": "The name of the parameter." }, - "namespace": { - "type": "string" + "schema": { + "$ref": "http://asyncapi.com/definitions/1.2.0/schema.json" }, - "prefix": { + "$ref": { "type": "string" - }, - "attribute": { - "type": "boolean", - "default": false - }, - "wrapped": { - "type": "boolean", - "default": false } } }, - "http://asyncapi.com/definitions/1.2.0/externalDocs.json": { - "id": "http://asyncapi.com/definitions/1.2.0/externalDocs.json", + "tag.json": { + "id": "tag.json", "type": "object", "additionalProperties": false, - "description": "information about external documentation", "required": [ - "url" + "name" ], "properties": { + "name": { + "type": "string" + }, "description": { "type": "string" }, - "url": { - "type": "string", - "format": "uri" + "externalDocs": { + "$ref": "http://asyncapi.com/definitions/1.2.0/externalDocs.json" } }, "patternProperties": { @@ -756,37 +729,8 @@ } } }, - "http://asyncapi.com/definitions/1.2.0/operation.json": { - "id": "http://asyncapi.com/definitions/1.2.0/operation.json", - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/1.2.0/message.json" - }, - { - "type": "object", - "required": [ - "oneOf" - ], - "additionalProperties": false, - "patternProperties": { - "^x-": { - "$ref": "http://asyncapi.com/definitions/1.2.0/vendorExtension.json" - } - }, - "properties": { - "oneOf": { - "type": "array", - "minItems": 2, - "items": { - "$ref": "http://asyncapi.com/definitions/1.2.0/message.json" - } - } - } - } - ] - }, - "http://asyncapi.com/definitions/1.2.0/message.json": { - "id": "http://asyncapi.com/definitions/1.2.0/message.json", + "message.json": { + "id": "message.json", "type": "object", "additionalProperties": false, "patternProperties": { @@ -829,32 +773,85 @@ "example": {} } }, - "http://asyncapi.com/definitions/1.2.0/tag.json": { - "id": "http://asyncapi.com/definitions/1.2.0/tag.json", + "operation.json": { + "id": "operation.json", + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/1.2.0/message.json" + }, + { + "type": "object", + "required": [ + "oneOf" + ], + "additionalProperties": false, + "patternProperties": { + "^x-": { + "$ref": "http://asyncapi.com/definitions/1.2.0/vendorExtension.json" + } + }, + "properties": { + "oneOf": { + "type": "array", + "minItems": 2, + "items": { + "$ref": "http://asyncapi.com/definitions/1.2.0/message.json" + } + } + } + } + ] + }, + "topicItem.json": { + "id": "topicItem.json", "type": "object", "additionalProperties": false, - "required": [ - "name" - ], + "patternProperties": { + "^x-": { + "$ref": "http://asyncapi.com/definitions/1.2.0/vendorExtension.json" + } + }, + "minProperties": 1, "properties": { - "name": { + "$ref": { "type": "string" }, - "description": { - "type": "string" + "parameters": { + "type": "array", + "uniqueItems": true, + "minItems": 1, + "items": { + "$ref": "http://asyncapi.com/definitions/1.2.0/parameter.json" + } }, - "externalDocs": { - "$ref": "http://asyncapi.com/definitions/1.2.0/externalDocs.json" + "publish": { + "$ref": "http://asyncapi.com/definitions/1.2.0/operation.json" + }, + "subscribe": { + "$ref": "http://asyncapi.com/definitions/1.2.0/operation.json" + }, + "deprecated": { + "type": "boolean", + "default": false } - }, + } + }, + "topics.json": { + "id": "topics.json", + "type": "object", + "description": "Relative paths to the individual topics. They must be relative to the 'baseTopic'.", "patternProperties": { "^x-": { "$ref": "http://asyncapi.com/definitions/1.2.0/vendorExtension.json" + }, + "^[^.]": { + "$ref": "http://asyncapi.com/definitions/1.2.0/topicItem.json" } - } + }, + "additionalProperties": false }, - "http://asyncapi.com/definitions/1.2.0/stream.json": { - "id": "http://asyncapi.com/definitions/1.2.0/stream.json", + "stream.json": { + "id": "stream.json", "title": "Stream Object", "type": "object", "additionalProperties": false, @@ -934,8 +931,8 @@ } } }, - "http://asyncapi.com/definitions/1.2.0/events.json": { - "id": "http://asyncapi.com/definitions/1.2.0/events.json", + "events.json": { + "id": "events.json", "title": "Events Object", "type": "object", "additionalProperties": false, @@ -978,56 +975,24 @@ } } }, - "http://asyncapi.com/definitions/1.2.0/components.json": { - "id": "http://asyncapi.com/definitions/1.2.0/components.json", - "type": "object", - "description": "An object to hold a set of reusable objects for different aspects of the AsyncAPI Specification.", - "additionalProperties": false, - "properties": { - "schemas": { - "$ref": "http://asyncapi.com/definitions/1.2.0/schemas.json" - }, - "messages": { - "$ref": "http://asyncapi.com/definitions/1.2.0/messages.json" - }, - "securitySchemes": { - "type": "object", - "patternProperties": { - "^[a-zA-Z0-9\\.\\-_]+$": { - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/1.2.0/Reference.json" - }, - { - "$ref": "http://asyncapi.com/definitions/1.2.0/SecurityScheme.json" - } - ] - } - } - }, - "parameters": { - "$ref": "http://asyncapi.com/definitions/1.2.0/parameters.json" - } - } - }, - "http://asyncapi.com/definitions/1.2.0/schemas.json": { - "id": "http://asyncapi.com/definitions/1.2.0/schemas.json", + "schemas.json": { + "id": "schemas.json", "type": "object", "additionalProperties": { "$ref": "http://asyncapi.com/definitions/1.2.0/schema.json" }, "description": "JSON objects describing schemas the API uses." }, - "http://asyncapi.com/definitions/1.2.0/messages.json": { - "id": "http://asyncapi.com/definitions/1.2.0/messages.json", + "messages.json": { + "id": "messages.json", "type": "object", "additionalProperties": { "$ref": "http://asyncapi.com/definitions/1.2.0/message.json" }, "description": "JSON objects describing the messages being consumed and produced by the API." }, - "http://asyncapi.com/definitions/1.2.0/Reference.json": { - "id": "http://asyncapi.com/definitions/1.2.0/Reference.json", + "Reference.json": { + "id": "Reference.json", "type": "object", "required": [ "$ref" @@ -1039,31 +1004,8 @@ } } }, - "http://asyncapi.com/definitions/1.2.0/SecurityScheme.json": { - "id": "http://asyncapi.com/definitions/1.2.0/SecurityScheme.json", - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/1.2.0/userPassword.json" - }, - { - "$ref": "http://asyncapi.com/definitions/1.2.0/apiKey.json" - }, - { - "$ref": "http://asyncapi.com/definitions/1.2.0/X509.json" - }, - { - "$ref": "http://asyncapi.com/definitions/1.2.0/symmetricEncryption.json" - }, - { - "$ref": "http://asyncapi.com/definitions/1.2.0/asymmetricEncryption.json" - }, - { - "$ref": "http://asyncapi.com/definitions/1.2.0/HTTPSecurityScheme.json" - } - ] - }, - "http://asyncapi.com/definitions/1.2.0/userPassword.json": { - "id": "http://asyncapi.com/definitions/1.2.0/userPassword.json", + "userPassword.json": { + "id": "userPassword.json", "type": "object", "required": [ "type" @@ -1084,8 +1026,8 @@ }, "additionalProperties": false }, - "http://asyncapi.com/definitions/1.2.0/apiKey.json": { - "id": "http://asyncapi.com/definitions/1.2.0/apiKey.json", + "apiKey.json": { + "id": "apiKey.json", "type": "object", "required": [ "type", @@ -1114,8 +1056,8 @@ }, "additionalProperties": false }, - "http://asyncapi.com/definitions/1.2.0/X509.json": { - "id": "http://asyncapi.com/definitions/1.2.0/X509.json", + "X509.json": { + "id": "X509.json", "type": "object", "required": [ "type" @@ -1136,8 +1078,8 @@ }, "additionalProperties": false }, - "http://asyncapi.com/definitions/1.2.0/symmetricEncryption.json": { - "id": "http://asyncapi.com/definitions/1.2.0/symmetricEncryption.json", + "symmetricEncryption.json": { + "id": "symmetricEncryption.json", "type": "object", "required": [ "type" @@ -1158,8 +1100,8 @@ }, "additionalProperties": false }, - "http://asyncapi.com/definitions/1.2.0/asymmetricEncryption.json": { - "id": "http://asyncapi.com/definitions/1.2.0/asymmetricEncryption.json", + "asymmetricEncryption.json": { + "id": "asymmetricEncryption.json", "type": "object", "required": [ "type" @@ -1180,22 +1122,8 @@ }, "additionalProperties": false }, - "http://asyncapi.com/definitions/1.2.0/HTTPSecurityScheme.json": { - "id": "http://asyncapi.com/definitions/1.2.0/HTTPSecurityScheme.json", - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/1.2.0/NonBearerHTTPSecurityScheme.json" - }, - { - "$ref": "http://asyncapi.com/definitions/1.2.0/BearerHTTPSecurityScheme.json" - }, - { - "$ref": "http://asyncapi.com/definitions/1.2.0/APIKeyHTTPSecurityScheme.json" - } - ] - }, - "http://asyncapi.com/definitions/1.2.0/NonBearerHTTPSecurityScheme.json": { - "id": "http://asyncapi.com/definitions/1.2.0/NonBearerHTTPSecurityScheme.json", + "NonBearerHTTPSecurityScheme.json": { + "id": "NonBearerHTTPSecurityScheme.json", "not": { "type": "object", "properties": { @@ -1231,8 +1159,8 @@ }, "additionalProperties": false }, - "http://asyncapi.com/definitions/1.2.0/BearerHTTPSecurityScheme.json": { - "id": "http://asyncapi.com/definitions/1.2.0/BearerHTTPSecurityScheme.json", + "BearerHTTPSecurityScheme.json": { + "id": "BearerHTTPSecurityScheme.json", "type": "object", "required": [ "type", @@ -1263,8 +1191,8 @@ }, "additionalProperties": false }, - "http://asyncapi.com/definitions/1.2.0/APIKeyHTTPSecurityScheme.json": { - "id": "http://asyncapi.com/definitions/1.2.0/APIKeyHTTPSecurityScheme.json", + "APIKeyHTTPSecurityScheme.json": { + "id": "APIKeyHTTPSecurityScheme.json", "type": "object", "required": [ "type", @@ -1298,16 +1226,85 @@ }, "additionalProperties": false }, - "http://asyncapi.com/definitions/1.2.0/parameters.json": { - "id": "http://asyncapi.com/definitions/1.2.0/parameters.json", + "HTTPSecurityScheme.json": { + "id": "HTTPSecurityScheme.json", + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/1.2.0/NonBearerHTTPSecurityScheme.json" + }, + { + "$ref": "http://asyncapi.com/definitions/1.2.0/BearerHTTPSecurityScheme.json" + }, + { + "$ref": "http://asyncapi.com/definitions/1.2.0/APIKeyHTTPSecurityScheme.json" + } + ] + }, + "SecurityScheme.json": { + "id": "SecurityScheme.json", + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/1.2.0/userPassword.json" + }, + { + "$ref": "http://asyncapi.com/definitions/1.2.0/apiKey.json" + }, + { + "$ref": "http://asyncapi.com/definitions/1.2.0/X509.json" + }, + { + "$ref": "http://asyncapi.com/definitions/1.2.0/symmetricEncryption.json" + }, + { + "$ref": "http://asyncapi.com/definitions/1.2.0/asymmetricEncryption.json" + }, + { + "$ref": "http://asyncapi.com/definitions/1.2.0/HTTPSecurityScheme.json" + } + ] + }, + "parameters.json": { + "id": "parameters.json", "type": "object", "additionalProperties": { "$ref": "http://asyncapi.com/definitions/1.2.0/parameter.json" }, "description": "JSON objects describing re-usable topic parameters." }, - "http://asyncapi.com/definitions/1.2.0/SecurityRequirement.json": { - "id": "http://asyncapi.com/definitions/1.2.0/SecurityRequirement.json", + "components.json": { + "id": "components.json", + "type": "object", + "description": "An object to hold a set of reusable objects for different aspects of the AsyncAPI Specification.", + "additionalProperties": false, + "properties": { + "schemas": { + "$ref": "http://asyncapi.com/definitions/1.2.0/schemas.json" + }, + "messages": { + "$ref": "http://asyncapi.com/definitions/1.2.0/messages.json" + }, + "securitySchemes": { + "type": "object", + "patternProperties": { + "^[a-zA-Z0-9\\.\\-_]+$": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/1.2.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/1.2.0/SecurityScheme.json" + } + ] + } + } + }, + "parameters": { + "$ref": "http://asyncapi.com/definitions/1.2.0/parameters.json" + } + } + }, + "SecurityRequirement.json": { + "id": "SecurityRequirement.json", "type": "object", "additionalProperties": { "type": "array", @@ -1317,5 +1314,6 @@ } } }, + "id": "http://asyncapi.com/definitions/1.2.0/asyncapi.json", "description": "!!Auto generated!! \n Do not manually edit. " } \ No newline at end of file diff --git a/schemas/2.0.0-rc1-without-$id.json b/schemas/2.0.0-rc1-without-$id.json index 8a2e342d..a059b1e6 100644 --- a/schemas/2.0.0-rc1-without-$id.json +++ b/schemas/2.0.0-rc1-without-$id.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema", + "$schema": "http://json-schema.org/draft-07/schema#", "title": "AsyncAPI 2.0.0-rc1 schema.", "type": "object", "required": [ @@ -63,45 +63,6 @@ "additionalProperties": true, "additionalItems": true }, - "info": { - "type": "object", - "description": "General information about the API.", - "required": [ - "version", - "title" - ], - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "properties": { - "title": { - "type": "string", - "description": "A unique and precise title of the API." - }, - "version": { - "type": "string", - "description": "A semantic version number of the API." - }, - "description": { - "type": "string", - "description": "A longer description of the API. Should be different from the title. CommonMark is allowed." - }, - "termsOfService": { - "type": "string", - "description": "A URL to the Terms of Service for the API. MUST be in the format of a URL.", - "format": "uri" - }, - "contact": { - "$ref": "#/definitions/contact" - }, - "license": { - "$ref": "#/definitions/license" - } - } - }, "contact": { "type": "object", "description": "Contact information for the owners of the API.", @@ -151,12 +112,12 @@ } } }, - "server": { + "info": { "type": "object", - "description": "An object representing a Server.", + "description": "General information about the API.", "required": [ - "url", - "protocol" + "version", + "title" ], "additionalProperties": false, "patternProperties": { @@ -165,40 +126,31 @@ } }, "properties": { - "url": { - "type": "string" - }, - "description": { - "type": "string" - }, - "protocol": { + "title": { "type": "string", - "description": "The transfer protocol." + "description": "A unique and precise title of the API." }, - "protocolVersion": { - "type": "string" + "version": { + "type": "string", + "description": "A semantic version number of the API." }, - "variables": { - "$ref": "#/definitions/serverVariables" + "description": { + "type": "string", + "description": "A longer description of the API. Should be different from the title. CommonMark is allowed." }, - "baseChannel": { + "termsOfService": { "type": "string", - "x-format": "uri-path" + "description": "A URL to the Terms of Service for the API. MUST be in the format of a URL.", + "format": "uri" }, - "security": { - "type": "array", - "items": { - "$ref": "#/definitions/SecurityRequirement" - } + "contact": { + "$ref": "#/definitions/contact" + }, + "license": { + "$ref": "#/definitions/license" } } }, - "serverVariables": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/serverVariable" - } - }, "serverVariable": { "type": "object", "description": "An object representing a Server Variable for server URL template substitution.", @@ -231,6 +183,12 @@ } } }, + "serverVariables": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/serverVariable" + } + }, "SecurityRequirement": { "type": "object", "additionalProperties": { @@ -241,261 +199,66 @@ "uniqueItems": true } }, - "channels": { - "type": "object", - "propertyNames": { - "type": "string", - "format": "uri-template", - "minLength": 1 - }, - "additionalProperties": { - "$ref": "#/definitions/channelItem" - } - }, - "channelItem": { - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "minProperties": 1, - "properties": { - "$ref": { - "$ref": "#/definitions/ReferenceObject" - }, - "parameters": { - "$ref": "#/definitions/parameters" - }, - "publish": { - "$ref": "#/definitions/operation" - }, - "subscribe": { - "$ref": "#/definitions/operation" - }, - "deprecated": { - "type": "boolean", - "default": false - }, - "protocolInfo": { - "type": "object", - "additionalProperties": { - "type": "object" - } - } - } - }, - "ReferenceObject": { - "type": "string", - "format": "uri" - }, - "parameters": { - "type": "object", - "additionalProperties": { - "oneOf": [ - { - "$ref": "#/definitions/Reference" - }, - { - "$ref": "#/definitions/parameter" - } - ] - }, - "description": "JSON objects describing re-usable channel parameters." - }, - "Reference": { + "server": { "type": "object", + "description": "An object representing a Server.", "required": [ - "$ref" - ], - "properties": { - "$ref": { - "$ref": "#/definitions/ReferenceObject" - } - } - }, - "parameter": { - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "properties": { - "description": { - "type": "string", - "description": "A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed." - }, - "name": { - "type": "string", - "description": "The name of the parameter." - }, - "schema": { - "$ref": "#/definitions/schema" - }, - "$ref": { - "$ref": "#/definitions/ReferenceObject" - } - } - }, - "schema": { - "type": "object", - "description": "A deterministic version of a JSON Schema object.", - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "properties": { - "$ref": { - "$ref": "#/definitions/ReferenceObject" - }, - "format": { - "type": "string" - }, - "title": { - "$ref": "#/definitions/json-schema-draft-07-schema" - }, - "description": { - "$ref": "#/definitions/json-schema-draft-07-schema" - }, - "default": { - "$ref": "#/definitions/json-schema-draft-07-schema" - }, - "multipleOf": { - "$ref": "#/definitions/json-schema-draft-07-schema" - }, - "maximum": { - "$ref": "#/definitions/json-schema-draft-07-schema" - }, - "exclusiveMaximum": { - "$ref": "#/definitions/json-schema-draft-07-schema" - }, - "minimum": { - "$ref": "#/definitions/json-schema-draft-07-schema" - }, - "exclusiveMinimum": { - "$ref": "#/definitions/json-schema-draft-07-schema" - }, - "maxLength": { - "$ref": "#/definitions/json-schema-draft-07-schema" - }, - "minLength": { - "$ref": "#/definitions/json-schema-draft-07-schema" - }, - "pattern": { - "$ref": "#/definitions/json-schema-draft-07-schema" - }, - "maxItems": { - "$ref": "#/definitions/json-schema-draft-07-schema" - }, - "minItems": { - "$ref": "#/definitions/json-schema-draft-07-schema" - }, - "uniqueItems": { - "$ref": "#/definitions/json-schema-draft-07-schema" - }, - "maxProperties": { - "$ref": "#/definitions/json-schema-draft-07-schema" - }, - "minProperties": { - "$ref": "#/definitions/json-schema-draft-07-schema" - }, - "required": { - "$ref": "#/definitions/json-schema-draft-07-schema" - }, - "enum": { - "$ref": "#/definitions/json-schema-draft-07-schema" - }, - "deprecated": { - "type": "boolean", - "default": false - }, - "additionalProperties": { - "anyOf": [ - { - "$ref": "#/definitions/schema" - }, - { - "type": "boolean" - } - ], - "default": {} - }, - "type": { - "$ref": "#/definitions/json-schema-draft-07-schema" - }, - "items": { - "anyOf": [ - { - "$ref": "#/definitions/schema" - }, - { - "type": "array", - "minItems": 1, - "items": { - "$ref": "#/definitions/schema" - } - } - ], - "default": {} - }, - "allOf": { - "type": "array", - "minItems": 1, - "items": { - "$ref": "#/definitions/schema" - } - }, - "oneOf": { - "type": "array", - "minItems": 2, - "items": { - "$ref": "#/definitions/schema" - } - }, - "anyOf": { - "type": "array", - "minItems": 2, - "items": { - "$ref": "#/definitions/schema" - } + "url", + "protocol" + ], + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, + "properties": { + "url": { + "type": "string" }, - "not": { - "$ref": "#/definitions/schema" + "description": { + "type": "string" }, - "properties": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/schema" - }, - "default": {} + "protocol": { + "type": "string", + "description": "The transfer protocol." }, - "discriminator": { + "protocolVersion": { "type": "string" }, - "readOnly": { - "type": "boolean", - "default": false - }, - "xml": { - "$ref": "#/definitions/xml" + "variables": { + "$ref": "#/definitions/serverVariables" }, - "externalDocs": { - "$ref": "#/definitions/externalDocs" + "baseChannel": { + "type": "string", + "x-format": "uri-path" }, - "example": {}, - "examples": { + "security": { "type": "array", - "items": {} + "items": { + "$ref": "#/definitions/SecurityRequirement" + } } - }, - "additionalProperties": false + } + }, + "ReferenceObject": { + "type": "string", + "format": "uri" + }, + "Reference": { + "type": "object", + "required": [ + "$ref" + ], + "properties": { + "$ref": { + "$ref": "#/definitions/ReferenceObject" + } + } }, "json-schema-draft-07-schema": { + "$schema": "http://json-schema.org/draft-04/schema#", "id": "http://json-schema.org/draft-04/schema", - "$schema": "http://json-schema.org/draft-04/schema", "description": "Core schema meta-schema", "definitions": { "schemaArray": { @@ -760,80 +523,218 @@ } } }, - "operation": { + "schema": { "type": "object", - "additionalProperties": false, + "description": "A deterministic version of a JSON Schema object.", "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { "$ref": "#/definitions/specificationExtension" } }, "properties": { - "traits": { + "$ref": { + "$ref": "#/definitions/ReferenceObject" + }, + "format": { + "type": "string" + }, + "title": { + "$ref": "#/definitions/json-schema-draft-07-schema" + }, + "description": { + "$ref": "#/definitions/json-schema-draft-07-schema" + }, + "default": { + "$ref": "#/definitions/json-schema-draft-07-schema" + }, + "multipleOf": { + "$ref": "#/definitions/json-schema-draft-07-schema" + }, + "maximum": { + "$ref": "#/definitions/json-schema-draft-07-schema" + }, + "exclusiveMaximum": { + "$ref": "#/definitions/json-schema-draft-07-schema" + }, + "minimum": { + "$ref": "#/definitions/json-schema-draft-07-schema" + }, + "exclusiveMinimum": { + "$ref": "#/definitions/json-schema-draft-07-schema" + }, + "maxLength": { + "$ref": "#/definitions/json-schema-draft-07-schema" + }, + "minLength": { + "$ref": "#/definitions/json-schema-draft-07-schema" + }, + "pattern": { + "$ref": "#/definitions/json-schema-draft-07-schema" + }, + "maxItems": { + "$ref": "#/definitions/json-schema-draft-07-schema" + }, + "minItems": { + "$ref": "#/definitions/json-schema-draft-07-schema" + }, + "uniqueItems": { + "$ref": "#/definitions/json-schema-draft-07-schema" + }, + "maxProperties": { + "$ref": "#/definitions/json-schema-draft-07-schema" + }, + "minProperties": { + "$ref": "#/definitions/json-schema-draft-07-schema" + }, + "required": { + "$ref": "#/definitions/json-schema-draft-07-schema" + }, + "enum": { + "$ref": "#/definitions/json-schema-draft-07-schema" + }, + "deprecated": { + "type": "boolean", + "default": false + }, + "additionalProperties": { + "anyOf": [ + { + "$ref": "#/definitions/schema" + }, + { + "type": "boolean" + } + ], + "default": {} + }, + "type": { + "$ref": "#/definitions/json-schema-draft-07-schema" + }, + "items": { + "anyOf": [ + { + "$ref": "#/definitions/schema" + }, + { + "type": "array", + "minItems": 1, + "items": { + "$ref": "#/definitions/schema" + } + } + ], + "default": {} + }, + "allOf": { "type": "array", + "minItems": 1, "items": { - "oneOf": [ - { - "$ref": "#/definitions/Reference" - }, - { - "$ref": "#/definitions/operationTrait" - } - ] + "$ref": "#/definitions/schema" } }, - "summary": { + "oneOf": { + "type": "array", + "minItems": 2, + "items": { + "$ref": "#/definitions/schema" + } + }, + "anyOf": { + "type": "array", + "minItems": 2, + "items": { + "$ref": "#/definitions/schema" + } + }, + "not": { + "$ref": "#/definitions/schema" + }, + "properties": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/schema" + }, + "default": {} + }, + "discriminator": { + "type": "string" + }, + "readOnly": { + "type": "boolean", + "default": false + }, + "xml": { + "$ref": "#/definitions/xml" + }, + "externalDocs": { + "$ref": "#/definitions/externalDocs" + }, + "example": {}, + "examples": { + "type": "array", + "items": {} + } + }, + "additionalProperties": false + }, + "parameter": { + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, + "properties": { + "description": { + "type": "string", + "description": "A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed." + }, + "name": { + "type": "string", + "description": "The name of the parameter." + }, + "schema": { + "$ref": "#/definitions/schema" + }, + "$ref": { + "$ref": "#/definitions/ReferenceObject" + } + } + }, + "parameters": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/parameter" + } + ] + }, + "description": "JSON objects describing re-usable channel parameters." + }, + "tag": { + "type": "object", + "additionalProperties": false, + "required": [ + "name" + ], + "properties": { + "name": { "type": "string" }, "description": { "type": "string" }, - "tags": { - "type": "array", - "items": { - "$ref": "#/definitions/tag" - }, - "uniqueItems": true - }, "externalDocs": { "$ref": "#/definitions/externalDocs" - }, - "operationId": { - "type": "string" - }, - "protocolInfo": { - "type": "object", - "additionalProperties": { - "type": "object" - } - }, - "message": { - "oneOf": [ - { - "$ref": "#/definitions/message" - }, - { - "type": "object", - "required": [ - "oneOf" - ], - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "properties": { - "oneOf": { - "type": "array", - "minItems": 2, - "items": { - "$ref": "#/definitions/message" - } - } - } - } - ] + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" } } }, @@ -873,30 +774,30 @@ } } }, - "tag": { + "correlationId": { "type": "object", - "additionalProperties": false, "required": [ - "name" + "location" ], - "properties": { - "name": { - "type": "string" - }, - "description": { - "type": "string" - }, - "externalDocs": { - "$ref": "#/definitions/externalDocs" - } - }, + "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { "$ref": "#/definitions/specificationExtension" } + }, + "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)#(/\\w+)+" + } } }, - "message": { + "messageTrait": { "type": "object", "additionalProperties": false, "patternProperties": { @@ -924,7 +825,6 @@ ] } }, - "payload": {}, "correlationId": { "oneOf": [ { @@ -976,46 +876,10 @@ "additionalProperties": { "type": "object" } - }, - "traits": { - "type": "array", - "items": { - "oneOf": [ - { - "$ref": "#/definitions/Reference" - }, - { - "$ref": "#/definitions/messageTrait" - } - ] - } - } - } - }, - "correlationId": { - "type": "object", - "required": [ - "location" - ], - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "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)#(/\\w+)+" } } }, - "messageTrait": { + "message": { "type": "object", "additionalProperties": false, "patternProperties": { @@ -1043,6 +907,7 @@ ] } }, + "payload": {}, "correlationId": { "oneOf": [ { @@ -1083,12 +948,136 @@ "type": "boolean", "default": false }, - "examples": { - "type": "array", - "items": { - "type": "object" - } - }, + "examples": { + "type": "array", + "items": { + "type": "object" + } + }, + "protocolInfo": { + "type": "object", + "additionalProperties": { + "type": "object" + } + }, + "traits": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/messageTrait" + } + ] + } + } + } + }, + "operation": { + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, + "properties": { + "traits": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/operationTrait" + } + ] + } + }, + "summary": { + "type": "string" + }, + "description": { + "type": "string" + }, + "tags": { + "type": "array", + "items": { + "$ref": "#/definitions/tag" + }, + "uniqueItems": true + }, + "externalDocs": { + "$ref": "#/definitions/externalDocs" + }, + "operationId": { + "type": "string" + }, + "protocolInfo": { + "type": "object", + "additionalProperties": { + "type": "object" + } + }, + "message": { + "oneOf": [ + { + "$ref": "#/definitions/message" + }, + { + "type": "object", + "required": [ + "oneOf" + ], + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, + "properties": { + "oneOf": { + "type": "array", + "minItems": 2, + "items": { + "$ref": "#/definitions/message" + } + } + } + } + ] + } + } + }, + "channelItem": { + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, + "minProperties": 1, + "properties": { + "$ref": { + "$ref": "#/definitions/ReferenceObject" + }, + "parameters": { + "$ref": "#/definitions/parameters" + }, + "publish": { + "$ref": "#/definitions/operation" + }, + "subscribe": { + "$ref": "#/definitions/operation" + }, + "deprecated": { + "type": "boolean", + "default": false + }, "protocolInfo": { "type": "object", "additionalProperties": { @@ -1097,53 +1086,15 @@ } } }, - "components": { + "channels": { "type": "object", - "description": "An object to hold a set of reusable objects for different aspects of the AsyncAPI Specification.", - "additionalProperties": false, - "properties": { - "schemas": { - "$ref": "#/definitions/schemas" - }, - "messages": { - "$ref": "#/definitions/messages" - }, - "securitySchemes": { - "type": "object", - "patternProperties": { - "^[\\w\\d\\.\\-_]+$": { - "oneOf": [ - { - "$ref": "#/definitions/Reference" - }, - { - "$ref": "#/definitions/SecurityScheme" - } - ] - } - } - }, - "parameters": { - "$ref": "#/definitions/parameters" - }, - "correlationIds": { - "type": "object", - "patternProperties": { - "^[\\w\\d\\.\\-_]+$": { - "oneOf": [ - { - "$ref": "#/definitions/Reference" - }, - { - "$ref": "#/definitions/correlationId" - } - ] - } - } - }, - "traits": { - "$ref": "#/definitions/traits" - } + "propertyNames": { + "type": "string", + "format": "uri-template", + "minLength": 1 + }, + "additionalProperties": { + "$ref": "#/definitions/channelItem" } }, "schemas": { @@ -1160,34 +1111,6 @@ }, "description": "JSON objects describing the messages being consumed and produced by the API." }, - "SecurityScheme": { - "oneOf": [ - { - "$ref": "#/definitions/userPassword" - }, - { - "$ref": "#/definitions/apiKey" - }, - { - "$ref": "#/definitions/X509" - }, - { - "$ref": "#/definitions/symmetricEncryption" - }, - { - "$ref": "#/definitions/asymmetricEncryption" - }, - { - "$ref": "#/definitions/HTTPSecurityScheme" - }, - { - "$ref": "#/definitions/oauth2Flows" - }, - { - "$ref": "#/definitions/openIdConnect" - } - ] - }, "userPassword": { "type": "object", "required": [ @@ -1311,19 +1234,6 @@ }, "additionalProperties": false }, - "HTTPSecurityScheme": { - "oneOf": [ - { - "$ref": "#/definitions/NonBearerHTTPSecurityScheme" - }, - { - "$ref": "#/definitions/BearerHTTPSecurityScheme" - }, - { - "$ref": "#/definitions/APIKeyHTTPSecurityScheme" - } - ] - }, "NonBearerHTTPSecurityScheme": { "not": { "type": "object", @@ -1431,6 +1341,51 @@ }, "additionalProperties": false }, + "HTTPSecurityScheme": { + "oneOf": [ + { + "$ref": "#/definitions/NonBearerHTTPSecurityScheme" + }, + { + "$ref": "#/definitions/BearerHTTPSecurityScheme" + }, + { + "$ref": "#/definitions/APIKeyHTTPSecurityScheme" + } + ] + }, + "oauth2Scopes": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "oauth2Flow": { + "type": "object", + "properties": { + "authorizationUrl": { + "type": "string", + "format": "uri" + }, + "tokenUrl": { + "type": "string", + "format": "uri" + }, + "refreshUrl": { + "type": "string", + "format": "uri" + }, + "scopes": { + "$ref": "#/definitions/oauth2Scopes" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, + "additionalProperties": false + }, "oauth2Flows": { "type": "object", "required": [ @@ -1535,38 +1490,6 @@ } } }, - "oauth2Flow": { - "type": "object", - "properties": { - "authorizationUrl": { - "type": "string", - "format": "uri" - }, - "tokenUrl": { - "type": "string", - "format": "uri" - }, - "refreshUrl": { - "type": "string", - "format": "uri" - }, - "scopes": { - "$ref": "#/definitions/oauth2Scopes" - } - }, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "additionalProperties": false - }, - "oauth2Scopes": { - "type": "object", - "additionalProperties": { - "type": "string" - } - }, "openIdConnect": { "type": "object", "required": [ @@ -1595,6 +1518,34 @@ }, "additionalProperties": false }, + "SecurityScheme": { + "oneOf": [ + { + "$ref": "#/definitions/userPassword" + }, + { + "$ref": "#/definitions/apiKey" + }, + { + "$ref": "#/definitions/X509" + }, + { + "$ref": "#/definitions/symmetricEncryption" + }, + { + "$ref": "#/definitions/asymmetricEncryption" + }, + { + "$ref": "#/definitions/HTTPSecurityScheme" + }, + { + "$ref": "#/definitions/oauth2Flows" + }, + { + "$ref": "#/definitions/openIdConnect" + } + ] + }, "traits": { "type": "object", "additionalProperties": { @@ -1607,6 +1558,55 @@ } ] } + }, + "components": { + "type": "object", + "description": "An object to hold a set of reusable objects for different aspects of the AsyncAPI Specification.", + "additionalProperties": false, + "properties": { + "schemas": { + "$ref": "#/definitions/schemas" + }, + "messages": { + "$ref": "#/definitions/messages" + }, + "securitySchemes": { + "type": "object", + "patternProperties": { + "^[\\w\\d\\.\\-_]+$": { + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/SecurityScheme" + } + ] + } + } + }, + "parameters": { + "$ref": "#/definitions/parameters" + }, + "correlationIds": { + "type": "object", + "patternProperties": { + "^[\\w\\d\\.\\-_]+$": { + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/correlationId" + } + ] + } + } + }, + "traits": { + "$ref": "#/definitions/traits" + } + } } }, "description": "!!Auto generated!! \n Do not manually edit. " diff --git a/schemas/2.0.0-rc1.json b/schemas/2.0.0-rc1.json index 77553efc..355b5733 100644 --- a/schemas/2.0.0-rc1.json +++ b/schemas/2.0.0-rc1.json @@ -1,6 +1,5 @@ { - "$id": "http://asyncapi.com/definitions/2.0.0-rc1/asyncapi.json", - "$schema": "http://json-schema.org/draft-07/schema", + "$schema": "http://json-schema.org/draft-07/schema#", "title": "AsyncAPI 2.0.0-rc1 schema.", "type": "object", "required": [ @@ -59,54 +58,14 @@ } }, "definitions": { - "http://asyncapi.com/definitions/2.0.0-rc1/specificationExtension.json": { - "$id": "http://asyncapi.com/definitions/2.0.0-rc1/specificationExtension.json", + "specificationExtension.json": { + "$id": "specificationExtension.json", "description": "Any property starting with x- is valid.", "additionalProperties": true, "additionalItems": true }, - "http://asyncapi.com/definitions/2.0.0-rc1/info.json": { - "$id": "http://asyncapi.com/definitions/2.0.0-rc1/info.json", - "type": "object", - "description": "General information about the API.", - "required": [ - "version", - "title" - ], - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/specificationExtension.json" - } - }, - "properties": { - "title": { - "type": "string", - "description": "A unique and precise title of the API." - }, - "version": { - "type": "string", - "description": "A semantic version number of the API." - }, - "description": { - "type": "string", - "description": "A longer description of the API. Should be different from the title. CommonMark is allowed." - }, - "termsOfService": { - "type": "string", - "description": "A URL to the Terms of Service for the API. MUST be in the format of a URL.", - "format": "uri" - }, - "contact": { - "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/contact.json" - }, - "license": { - "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/license.json" - } - } - }, - "http://asyncapi.com/definitions/2.0.0-rc1/contact.json": { - "$id": "http://asyncapi.com/definitions/2.0.0-rc1/contact.json", + "contact.json": { + "$id": "contact.json", "type": "object", "description": "Contact information for the owners of the API.", "additionalProperties": false, @@ -132,8 +91,8 @@ } } }, - "http://asyncapi.com/definitions/2.0.0-rc1/license.json": { - "$id": "http://asyncapi.com/definitions/2.0.0-rc1/license.json", + "license.json": { + "$id": "license.json", "type": "object", "required": [ "name" @@ -156,13 +115,13 @@ } } }, - "http://asyncapi.com/definitions/2.0.0-rc1/server.json": { - "$id": "http://asyncapi.com/definitions/2.0.0-rc1/server.json", + "info.json": { + "$id": "info.json", "type": "object", - "description": "An object representing a Server.", + "description": "General information about the API.", "required": [ - "url", - "protocol" + "version", + "title" ], "additionalProperties": false, "patternProperties": { @@ -171,43 +130,33 @@ } }, "properties": { - "url": { - "type": "string" - }, - "description": { - "type": "string" - }, - "protocol": { + "title": { "type": "string", - "description": "The transfer protocol." + "description": "A unique and precise title of the API." }, - "protocolVersion": { - "type": "string" + "version": { + "type": "string", + "description": "A semantic version number of the API." }, - "variables": { - "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/serverVariables.json" + "description": { + "type": "string", + "description": "A longer description of the API. Should be different from the title. CommonMark is allowed." }, - "baseChannel": { + "termsOfService": { "type": "string", - "x-format": "uri-path" + "description": "A URL to the Terms of Service for the API. MUST be in the format of a URL.", + "format": "uri" }, - "security": { - "type": "array", - "items": { - "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/SecurityRequirement.json" - } + "contact": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/contact.json" + }, + "license": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/license.json" } } }, - "http://asyncapi.com/definitions/2.0.0-rc1/serverVariables.json": { - "$id": "http://asyncapi.com/definitions/2.0.0-rc1/serverVariables.json", - "type": "object", - "additionalProperties": { - "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/serverVariable.json" - } - }, - "http://asyncapi.com/definitions/2.0.0-rc1/serverVariable.json": { - "$id": "http://asyncapi.com/definitions/2.0.0-rc1/serverVariable.json", + "serverVariable.json": { + "$id": "serverVariable.json", "type": "object", "description": "An object representing a Server Variable for server URL template substitution.", "minProperties": 1, @@ -239,8 +188,15 @@ } } }, - "http://asyncapi.com/definitions/2.0.0-rc1/SecurityRequirement.json": { - "$id": "http://asyncapi.com/definitions/2.0.0-rc1/SecurityRequirement.json", + "serverVariables.json": { + "$id": "serverVariables.json", + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/serverVariable.json" + } + }, + "SecurityRequirement.json": { + "$id": "SecurityRequirement.json", "type": "object", "additionalProperties": { "type": "array", @@ -250,75 +206,56 @@ "uniqueItems": true } }, - "http://asyncapi.com/definitions/2.0.0-rc1/channels.json": { - "$id": "http://asyncapi.com/definitions/2.0.0-rc1/channels.json", - "type": "object", - "propertyNames": { - "type": "string", - "format": "uri-template", - "minLength": 1 - }, - "additionalProperties": { - "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/channelItem.json" - } - }, - "http://asyncapi.com/definitions/2.0.0-rc1/channelItem.json": { - "$id": "http://asyncapi.com/definitions/2.0.0-rc1/channelItem.json", + "server.json": { + "$id": "server.json", "type": "object", + "description": "An object representing a Server.", + "required": [ + "url", + "protocol" + ], "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/specificationExtension.json" } }, - "minProperties": 1, "properties": { - "$ref": { - "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/ReferenceObject.json" + "url": { + "type": "string" }, - "parameters": { - "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/parameters.json" + "description": { + "type": "string" }, - "publish": { - "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/operation.json" + "protocol": { + "type": "string", + "description": "The transfer protocol." }, - "subscribe": { - "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/operation.json" + "protocolVersion": { + "type": "string" }, - "deprecated": { - "type": "boolean", - "default": false + "variables": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/serverVariables.json" }, - "protocolInfo": { - "type": "object", - "additionalProperties": { - "type": "object" + "baseChannel": { + "type": "string", + "x-format": "uri-path" + }, + "security": { + "type": "array", + "items": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/SecurityRequirement.json" } } } }, - "http://asyncapi.com/definitions/2.0.0-rc1/ReferenceObject.json": { - "$id": "http://asyncapi.com/definitions/2.0.0-rc1/ReferenceObject.json", + "ReferenceObject.json": { + "$id": "ReferenceObject.json", "type": "string", "format": "uri" }, - "http://asyncapi.com/definitions/2.0.0-rc1/parameters.json": { - "$id": "http://asyncapi.com/definitions/2.0.0-rc1/parameters.json", - "type": "object", - "additionalProperties": { - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/Reference.json" - }, - { - "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/parameter.json" - } - ] - }, - "description": "JSON objects describing re-usable channel parameters." - }, - "http://asyncapi.com/definitions/2.0.0-rc1/Reference.json": { - "$id": "http://asyncapi.com/definitions/2.0.0-rc1/Reference.json", + "Reference.json": { + "$id": "Reference.json", "type": "object", "required": [ "$ref" @@ -329,275 +266,95 @@ } } }, - "http://asyncapi.com/definitions/2.0.0-rc1/parameter.json": { - "$id": "http://asyncapi.com/definitions/2.0.0-rc1/parameter.json", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/specificationExtension.json" - } - }, - "properties": { - "description": { - "type": "string", - "description": "A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed." + "http://json-schema.org/draft-04/schema": { + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "http://json-schema.org/draft-04/schema", + "description": "Core schema meta-schema", + "definitions": { + "schemaArray": { + "type": "array", + "minItems": 1, + "items": { + "$ref": "#" + } }, - "name": { - "type": "string", - "description": "The name of the parameter." + "positiveInteger": { + "type": "integer", + "minimum": 0 }, - "schema": { - "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/schema.json" + "positiveIntegerDefault0": { + "allOf": [ + { + "$ref": "#/definitions/positiveInteger" + }, + { + "default": 0 + } + ] }, - "$ref": { - "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/ReferenceObject.json" - } - } - }, - "http://asyncapi.com/definitions/2.0.0-rc1/schema.json": { - "$id": "http://asyncapi.com/definitions/2.0.0-rc1/schema.json", - "type": "object", - "description": "A deterministic version of a JSON Schema object.", - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/specificationExtension.json" + "simpleTypes": { + "enum": [ + "array", + "boolean", + "integer", + "null", + "number", + "object", + "string" + ] + }, + "stringArray": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 1, + "uniqueItems": true } }, + "type": "object", "properties": { - "$ref": { - "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/ReferenceObject.json" + "id": { + "type": "string" }, - "format": { + "$schema": { "type": "string" }, "title": { - "$ref": "http://json-schema.org/draft-04/schema#/properties/title" + "type": "string" }, "description": { - "$ref": "http://json-schema.org/draft-04/schema#/properties/description" - }, - "default": { - "$ref": "http://json-schema.org/draft-04/schema#/properties/default" + "type": "string" }, + "default": {}, "multipleOf": { - "$ref": "http://json-schema.org/draft-04/schema#/properties/multipleOf" + "type": "number", + "minimum": 0, + "exclusiveMinimum": true }, "maximum": { - "$ref": "http://json-schema.org/draft-04/schema#/properties/maximum" + "type": "number" }, "exclusiveMaximum": { - "$ref": "http://json-schema.org/draft-04/schema#/properties/exclusiveMaximum" + "type": "boolean", + "default": false }, "minimum": { - "$ref": "http://json-schema.org/draft-04/schema#/properties/minimum" + "type": "number" }, "exclusiveMinimum": { - "$ref": "http://json-schema.org/draft-04/schema#/properties/exclusiveMinimum" + "type": "boolean", + "default": false }, "maxLength": { - "$ref": "http://json-schema.org/draft-04/schema#/definitions/positiveInteger" + "$ref": "#/definitions/positiveInteger" }, "minLength": { - "$ref": "http://json-schema.org/draft-04/schema#/definitions/positiveIntegerDefault0" + "$ref": "#/definitions/positiveIntegerDefault0" }, "pattern": { - "$ref": "http://json-schema.org/draft-04/schema#/properties/pattern" - }, - "maxItems": { - "$ref": "http://json-schema.org/draft-04/schema#/definitions/positiveInteger" - }, - "minItems": { - "$ref": "http://json-schema.org/draft-04/schema#/definitions/positiveIntegerDefault0" - }, - "uniqueItems": { - "$ref": "http://json-schema.org/draft-04/schema#/properties/uniqueItems" - }, - "maxProperties": { - "$ref": "http://json-schema.org/draft-04/schema#/definitions/positiveInteger" - }, - "minProperties": { - "$ref": "http://json-schema.org/draft-04/schema#/definitions/positiveIntegerDefault0" - }, - "required": { - "$ref": "http://json-schema.org/draft-04/schema#/definitions/stringArray" - }, - "enum": { - "$ref": "http://json-schema.org/draft-04/schema#/properties/enum" - }, - "deprecated": { - "type": "boolean", - "default": false - }, - "additionalProperties": { - "anyOf": [ - { - "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/schema.json" - }, - { - "type": "boolean" - } - ], - "default": {} - }, - "type": { - "$ref": "http://json-schema.org/draft-04/schema#/properties/type" - }, - "items": { - "anyOf": [ - { - "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/schema.json" - }, - { - "type": "array", - "minItems": 1, - "items": { - "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/schema.json" - } - } - ], - "default": {} - }, - "allOf": { - "type": "array", - "minItems": 1, - "items": { - "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/schema.json" - } - }, - "oneOf": { - "type": "array", - "minItems": 2, - "items": { - "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/schema.json" - } - }, - "anyOf": { - "type": "array", - "minItems": 2, - "items": { - "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/schema.json" - } - }, - "not": { - "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/schema.json" - }, - "properties": { - "type": "object", - "additionalProperties": { - "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/schema.json" - }, - "default": {} - }, - "discriminator": { - "type": "string" - }, - "readOnly": { - "type": "boolean", - "default": false - }, - "xml": { - "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/xml.json" - }, - "externalDocs": { - "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/externalDocs.json" - }, - "example": {}, - "examples": { - "type": "array", - "items": {} - } - }, - "additionalProperties": false - }, - "http://json-schema.org/draft-04/schema": { - "id": "http://json-schema.org/draft-04/schema", - "$schema": "http://json-schema.org/draft-04/schema", - "description": "Core schema meta-schema", - "definitions": { - "schemaArray": { - "type": "array", - "minItems": 1, - "items": { - "$ref": "#" - } - }, - "positiveInteger": { - "type": "integer", - "minimum": 0 - }, - "positiveIntegerDefault0": { - "allOf": [ - { - "$ref": "#/definitions/positiveInteger" - }, - { - "default": 0 - } - ] - }, - "simpleTypes": { - "enum": [ - "array", - "boolean", - "integer", - "null", - "number", - "object", - "string" - ] - }, - "stringArray": { - "type": "array", - "items": { - "type": "string" - }, - "minItems": 1, - "uniqueItems": true - } - }, - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "$schema": { - "type": "string" - }, - "title": { - "type": "string" - }, - "description": { - "type": "string" - }, - "default": {}, - "multipleOf": { - "type": "number", - "minimum": 0, - "exclusiveMinimum": true - }, - "maximum": { - "type": "number" - }, - "exclusiveMaximum": { - "type": "boolean", - "default": false - }, - "minimum": { - "type": "number" - }, - "exclusiveMinimum": { - "type": "boolean", - "default": false - }, - "maxLength": { - "$ref": "#/definitions/positiveInteger" - }, - "minLength": { - "$ref": "#/definitions/positiveIntegerDefault0" - }, - "pattern": { - "type": "string", - "format": "regex" + "type": "string", + "format": "regex" }, "additionalItems": { "anyOf": [ @@ -731,8 +488,8 @@ }, "default": {} }, - "http://asyncapi.com/definitions/2.0.0-rc1/xml.json": { - "$id": "http://asyncapi.com/definitions/2.0.0-rc1/xml.json", + "xml.json": { + "$id": "xml.json", "type": "object", "additionalProperties": false, "properties": { @@ -755,8 +512,8 @@ } } }, - "http://asyncapi.com/definitions/2.0.0-rc1/externalDocs.json": { - "$id": "http://asyncapi.com/definitions/2.0.0-rc1/externalDocs.json", + "externalDocs.json": { + "$id": "externalDocs.json", "type": "object", "additionalProperties": false, "description": "information about external documentation", @@ -767,9 +524,228 @@ "description": { "type": "string" }, - "url": { - "type": "string", - "format": "uri" + "url": { + "type": "string", + "format": "uri" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/specificationExtension.json" + } + } + }, + "schema.json": { + "$id": "schema.json", + "type": "object", + "description": "A deterministic version of a JSON Schema object.", + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/specificationExtension.json" + } + }, + "properties": { + "$ref": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/ReferenceObject.json" + }, + "format": { + "type": "string" + }, + "title": { + "$ref": "http://json-schema.org/draft-04/schema#/properties/title" + }, + "description": { + "$ref": "http://json-schema.org/draft-04/schema#/properties/description" + }, + "default": { + "$ref": "http://json-schema.org/draft-04/schema#/properties/default" + }, + "multipleOf": { + "$ref": "http://json-schema.org/draft-04/schema#/properties/multipleOf" + }, + "maximum": { + "$ref": "http://json-schema.org/draft-04/schema#/properties/maximum" + }, + "exclusiveMaximum": { + "$ref": "http://json-schema.org/draft-04/schema#/properties/exclusiveMaximum" + }, + "minimum": { + "$ref": "http://json-schema.org/draft-04/schema#/properties/minimum" + }, + "exclusiveMinimum": { + "$ref": "http://json-schema.org/draft-04/schema#/properties/exclusiveMinimum" + }, + "maxLength": { + "$ref": "http://json-schema.org/draft-04/schema#/definitions/positiveInteger" + }, + "minLength": { + "$ref": "http://json-schema.org/draft-04/schema#/definitions/positiveIntegerDefault0" + }, + "pattern": { + "$ref": "http://json-schema.org/draft-04/schema#/properties/pattern" + }, + "maxItems": { + "$ref": "http://json-schema.org/draft-04/schema#/definitions/positiveInteger" + }, + "minItems": { + "$ref": "http://json-schema.org/draft-04/schema#/definitions/positiveIntegerDefault0" + }, + "uniqueItems": { + "$ref": "http://json-schema.org/draft-04/schema#/properties/uniqueItems" + }, + "maxProperties": { + "$ref": "http://json-schema.org/draft-04/schema#/definitions/positiveInteger" + }, + "minProperties": { + "$ref": "http://json-schema.org/draft-04/schema#/definitions/positiveIntegerDefault0" + }, + "required": { + "$ref": "http://json-schema.org/draft-04/schema#/definitions/stringArray" + }, + "enum": { + "$ref": "http://json-schema.org/draft-04/schema#/properties/enum" + }, + "deprecated": { + "type": "boolean", + "default": false + }, + "additionalProperties": { + "anyOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/schema.json" + }, + { + "type": "boolean" + } + ], + "default": {} + }, + "type": { + "$ref": "http://json-schema.org/draft-04/schema#/properties/type" + }, + "items": { + "anyOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/schema.json" + }, + { + "type": "array", + "minItems": 1, + "items": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/schema.json" + } + } + ], + "default": {} + }, + "allOf": { + "type": "array", + "minItems": 1, + "items": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/schema.json" + } + }, + "oneOf": { + "type": "array", + "minItems": 2, + "items": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/schema.json" + } + }, + "anyOf": { + "type": "array", + "minItems": 2, + "items": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/schema.json" + } + }, + "not": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/schema.json" + }, + "properties": { + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/schema.json" + }, + "default": {} + }, + "discriminator": { + "type": "string" + }, + "readOnly": { + "type": "boolean", + "default": false + }, + "xml": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/xml.json" + }, + "externalDocs": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/externalDocs.json" + }, + "example": {}, + "examples": { + "type": "array", + "items": {} + } + }, + "additionalProperties": false + }, + "parameter.json": { + "$id": "parameter.json", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/specificationExtension.json" + } + }, + "properties": { + "description": { + "type": "string", + "description": "A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed." + }, + "name": { + "type": "string", + "description": "The name of the parameter." + }, + "schema": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/schema.json" + }, + "$ref": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/ReferenceObject.json" + } + } + }, + "parameters.json": { + "$id": "parameters.json", + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/parameter.json" + } + ] + }, + "description": "JSON objects describing re-usable channel parameters." + }, + "tag.json": { + "$id": "tag.json", + "type": "object", + "additionalProperties": false, + "required": [ + "name" + ], + "properties": { + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "externalDocs": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/externalDocs.json" } }, "patternProperties": { @@ -778,8 +754,8 @@ } } }, - "http://asyncapi.com/definitions/2.0.0-rc1/operation.json": { - "$id": "http://asyncapi.com/definitions/2.0.0-rc1/operation.json", + "operationTrait.json": { + "$id": "operationTrait.json", "type": "object", "additionalProperties": false, "patternProperties": { @@ -788,19 +764,6 @@ } }, "properties": { - "traits": { - "type": "array", - "items": { - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/Reference.json" - }, - { - "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/operationTrait.json" - } - ] - } - }, "summary": { "type": "string" }, @@ -825,39 +788,35 @@ "additionalProperties": { "type": "object" } + } + } + }, + "correlationId.json": { + "$id": "correlationId.json", + "type": "object", + "required": [ + "location" + ], + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/specificationExtension.json" + } + }, + "properties": { + "description": { + "type": "string", + "description": "A optional description of the correlation ID. GitHub Flavored Markdown is allowed." }, - "message": { - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/message.json" - }, - { - "type": "object", - "required": [ - "oneOf" - ], - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/specificationExtension.json" - } - }, - "properties": { - "oneOf": { - "type": "array", - "minItems": 2, - "items": { - "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/message.json" - } - } - } - } - ] + "location": { + "type": "string", + "description": "A runtime expression that specifies the location of the correlation ID", + "pattern": "^\\$message\\.(header|payload)#(/\\w+)+" } } }, - "http://asyncapi.com/definitions/2.0.0-rc1/operationTrait.json": { - "$id": "http://asyncapi.com/definitions/2.0.0-rc1/operationTrait.json", + "messageTrait.json": { + "$id": "messageTrait.json", "type": "object", "additionalProperties": false, "patternProperties": { @@ -866,12 +825,35 @@ } }, "properties": { - "summary": { + "schemaFormat": { "type": "string" }, - "description": { + "contentType": { "type": "string" }, + "headers": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/schema.json" + } + ] + } + }, + "correlationId": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/correlationId.json" + } + ] + }, "tags": { "type": "array", "items": { @@ -879,11 +861,34 @@ }, "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." + }, "externalDocs": { "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/externalDocs.json" }, - "operationId": { - "type": "string" + "deprecated": { + "type": "boolean", + "default": false + }, + "examples": { + "type": "array", + "items": { + "type": "object" + } }, "protocolInfo": { "type": "object", @@ -893,32 +898,8 @@ } } }, - "http://asyncapi.com/definitions/2.0.0-rc1/tag.json": { - "$id": "http://asyncapi.com/definitions/2.0.0-rc1/tag.json", - "type": "object", - "additionalProperties": false, - "required": [ - "name" - ], - "properties": { - "name": { - "type": "string" - }, - "description": { - "type": "string" - }, - "externalDocs": { - "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/externalDocs.json" - } - }, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/specificationExtension.json" - } - } - }, - "http://asyncapi.com/definitions/2.0.0-rc1/message.json": { - "$id": "http://asyncapi.com/definitions/2.0.0-rc1/message.json", + "message.json": { + "$id": "message.json", "type": "object", "additionalProperties": false, "patternProperties": { @@ -1014,32 +995,8 @@ } } }, - "http://asyncapi.com/definitions/2.0.0-rc1/correlationId.json": { - "$id": "http://asyncapi.com/definitions/2.0.0-rc1/correlationId.json", - "type": "object", - "required": [ - "location" - ], - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/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)#(/\\w+)+" - } - } - }, - "http://asyncapi.com/definitions/2.0.0-rc1/messageTrait.json": { - "$id": "http://asyncapi.com/definitions/2.0.0-rc1/messageTrait.json", + "operation.json": { + "$id": "operation.json", "type": "object", "additionalProperties": false, "patternProperties": { @@ -1048,34 +1005,24 @@ } }, "properties": { - "schemaFormat": { - "type": "string" - }, - "contentType": { - "type": "string" - }, - "headers": { - "type": "object", - "additionalProperties": { + "traits": { + "type": "array", + "items": { "oneOf": [ { "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/Reference.json" }, { - "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/schema.json" + "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/operationTrait.json" } ] } }, - "correlationId": { - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/Reference.json" - }, - { - "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/correlationId.json" - } - ] + "summary": { + "type": "string" + }, + "description": { + "type": "string" }, "tags": { "type": "array", @@ -1084,35 +1031,75 @@ }, "uniqueItems": true }, - "summary": { - "type": "string", - "description": "A brief summary of the message." + "externalDocs": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/externalDocs.json" }, - "name": { - "type": "string", - "description": "Name of the message." + "operationId": { + "type": "string" }, - "title": { - "type": "string", - "description": "A human-friendly title for the message." + "protocolInfo": { + "type": "object", + "additionalProperties": { + "type": "object" + } + }, + "message": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/message.json" + }, + { + "type": "object", + "required": [ + "oneOf" + ], + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/specificationExtension.json" + } + }, + "properties": { + "oneOf": { + "type": "array", + "minItems": 2, + "items": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/message.json" + } + } + } + } + ] + } + } + }, + "channelItem.json": { + "$id": "channelItem.json", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/specificationExtension.json" + } + }, + "minProperties": 1, + "properties": { + "$ref": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/ReferenceObject.json" + }, + "parameters": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/parameters.json" }, - "description": { - "type": "string", - "description": "A longer description of the message. CommonMark is allowed." + "publish": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/operation.json" }, - "externalDocs": { - "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/externalDocs.json" + "subscribe": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/operation.json" }, "deprecated": { "type": "boolean", "default": false }, - "examples": { - "type": "array", - "items": { - "type": "object" - } - }, "protocolInfo": { "type": "object", "additionalProperties": { @@ -1121,103 +1108,36 @@ } } }, - "http://asyncapi.com/definitions/2.0.0-rc1/components.json": { - "$id": "http://asyncapi.com/definitions/2.0.0-rc1/components.json", + "channels.json": { + "$id": "channels.json", "type": "object", - "description": "An object to hold a set of reusable objects for different aspects of the AsyncAPI Specification.", - "additionalProperties": false, - "properties": { - "schemas": { - "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/schemas.json" - }, - "messages": { - "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/messages.json" - }, - "securitySchemes": { - "type": "object", - "patternProperties": { - "^[\\w\\d\\.\\-_]+$": { - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/Reference.json" - }, - { - "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/SecurityScheme.json" - } - ] - } - } - }, - "parameters": { - "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/parameters.json" - }, - "correlationIds": { - "type": "object", - "patternProperties": { - "^[\\w\\d\\.\\-_]+$": { - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/Reference.json" - }, - { - "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/correlationId.json" - } - ] - } - } - }, - "traits": { - "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/traits.json" - } + "propertyNames": { + "type": "string", + "format": "uri-template", + "minLength": 1 + }, + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/channelItem.json" } }, - "http://asyncapi.com/definitions/2.0.0-rc1/schemas.json": { - "$id": "http://asyncapi.com/definitions/2.0.0-rc1/schemas.json", + "schemas.json": { + "$id": "schemas.json", "type": "object", "additionalProperties": { "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/schema.json" }, "description": "JSON objects describing schemas the API uses." }, - "http://asyncapi.com/definitions/2.0.0-rc1/messages.json": { - "$id": "http://asyncapi.com/definitions/2.0.0-rc1/messages.json", + "messages.json": { + "$id": "messages.json", "type": "object", "additionalProperties": { "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/message.json" }, "description": "JSON objects describing the messages being consumed and produced by the API." }, - "http://asyncapi.com/definitions/2.0.0-rc1/SecurityScheme.json": { - "$id": "http://asyncapi.com/definitions/2.0.0-rc1/SecurityScheme.json", - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/userPassword.json" - }, - { - "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/apiKey.json" - }, - { - "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/X509.json" - }, - { - "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/symmetricEncryption.json" - }, - { - "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/asymmetricEncryption.json" - }, - { - "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/HTTPSecurityScheme.json" - }, - { - "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/oauth2Flows.json" - }, - { - "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/openIdConnect.json" - } - ] - }, - "http://asyncapi.com/definitions/2.0.0-rc1/userPassword.json": { - "$id": "http://asyncapi.com/definitions/2.0.0-rc1/userPassword.json", + "userPassword.json": { + "$id": "userPassword.json", "type": "object", "required": [ "type" @@ -1240,8 +1160,8 @@ }, "additionalProperties": false }, - "http://asyncapi.com/definitions/2.0.0-rc1/apiKey.json": { - "$id": "http://asyncapi.com/definitions/2.0.0-rc1/apiKey.json", + "apiKey.json": { + "$id": "apiKey.json", "type": "object", "required": [ "type", @@ -1272,8 +1192,8 @@ }, "additionalProperties": false }, - "http://asyncapi.com/definitions/2.0.0-rc1/X509.json": { - "$id": "http://asyncapi.com/definitions/2.0.0-rc1/X509.json", + "X509.json": { + "$id": "X509.json", "type": "object", "required": [ "type" @@ -1296,8 +1216,8 @@ }, "additionalProperties": false }, - "http://asyncapi.com/definitions/2.0.0-rc1/symmetricEncryption.json": { - "$id": "http://asyncapi.com/definitions/2.0.0-rc1/symmetricEncryption.json", + "symmetricEncryption.json": { + "$id": "symmetricEncryption.json", "type": "object", "required": [ "type" @@ -1320,8 +1240,8 @@ }, "additionalProperties": false }, - "http://asyncapi.com/definitions/2.0.0-rc1/asymmetricEncryption.json": { - "$id": "http://asyncapi.com/definitions/2.0.0-rc1/asymmetricEncryption.json", + "asymmetricEncryption.json": { + "$id": "asymmetricEncryption.json", "type": "object", "required": [ "type" @@ -1344,22 +1264,8 @@ }, "additionalProperties": false }, - "http://asyncapi.com/definitions/2.0.0-rc1/HTTPSecurityScheme.json": { - "$id": "http://asyncapi.com/definitions/2.0.0-rc1/HTTPSecurityScheme.json", - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/NonBearerHTTPSecurityScheme.json" - }, - { - "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/BearerHTTPSecurityScheme.json" - }, - { - "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/APIKeyHTTPSecurityScheme.json" - } - ] - }, - "http://asyncapi.com/definitions/2.0.0-rc1/NonBearerHTTPSecurityScheme.json": { - "$id": "http://asyncapi.com/definitions/2.0.0-rc1/NonBearerHTTPSecurityScheme.json", + "NonBearerHTTPSecurityScheme.json": { + "$id": "NonBearerHTTPSecurityScheme.json", "not": { "type": "object", "properties": { @@ -1397,8 +1303,8 @@ }, "additionalProperties": false }, - "http://asyncapi.com/definitions/2.0.0-rc1/BearerHTTPSecurityScheme.json": { - "$id": "http://asyncapi.com/definitions/2.0.0-rc1/BearerHTTPSecurityScheme.json", + "BearerHTTPSecurityScheme.json": { + "$id": "BearerHTTPSecurityScheme.json", "type": "object", "required": [ "type", @@ -1431,8 +1337,8 @@ }, "additionalProperties": false }, - "http://asyncapi.com/definitions/2.0.0-rc1/APIKeyHTTPSecurityScheme.json": { - "$id": "http://asyncapi.com/definitions/2.0.0-rc1/APIKeyHTTPSecurityScheme.json", + "APIKeyHTTPSecurityScheme.json": { + "$id": "APIKeyHTTPSecurityScheme.json", "type": "object", "required": [ "type", @@ -1468,8 +1374,56 @@ }, "additionalProperties": false }, - "http://asyncapi.com/definitions/2.0.0-rc1/oauth2Flows.json": { - "$id": "http://asyncapi.com/definitions/2.0.0-rc1/oauth2Flows.json", + "HTTPSecurityScheme.json": { + "$id": "HTTPSecurityScheme.json", + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/NonBearerHTTPSecurityScheme.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/BearerHTTPSecurityScheme.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/APIKeyHTTPSecurityScheme.json" + } + ] + }, + "oauth2Scopes.json": { + "$id": "oauth2Scopes.json", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "oauth2Flow.json": { + "$id": "oauth2Flow.json", + "type": "object", + "properties": { + "authorizationUrl": { + "type": "string", + "format": "uri" + }, + "tokenUrl": { + "type": "string", + "format": "uri" + }, + "refreshUrl": { + "type": "string", + "format": "uri" + }, + "scopes": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/oauth2Scopes.json" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/specificationExtension.json" + } + }, + "additionalProperties": false + }, + "oauth2Flows.json": { + "$id": "oauth2Flows.json", "type": "object", "required": [ "type", @@ -1573,42 +1527,8 @@ } } }, - "http://asyncapi.com/definitions/2.0.0-rc1/oauth2Flow.json": { - "$id": "http://asyncapi.com/definitions/2.0.0-rc1/oauth2Flow.json", - "type": "object", - "properties": { - "authorizationUrl": { - "type": "string", - "format": "uri" - }, - "tokenUrl": { - "type": "string", - "format": "uri" - }, - "refreshUrl": { - "type": "string", - "format": "uri" - }, - "scopes": { - "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/oauth2Scopes.json" - } - }, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/specificationExtension.json" - } - }, - "additionalProperties": false - }, - "http://asyncapi.com/definitions/2.0.0-rc1/oauth2Scopes.json": { - "$id": "http://asyncapi.com/definitions/2.0.0-rc1/oauth2Scopes.json", - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "http://asyncapi.com/definitions/2.0.0-rc1/openIdConnect.json": { - "$id": "http://asyncapi.com/definitions/2.0.0-rc1/openIdConnect.json", + "openIdConnect.json": { + "$id": "openIdConnect.json", "type": "object", "required": [ "type", @@ -1636,8 +1556,37 @@ }, "additionalProperties": false }, - "http://asyncapi.com/definitions/2.0.0-rc1/traits.json": { - "$id": "http://asyncapi.com/definitions/2.0.0-rc1/traits.json", + "SecurityScheme.json": { + "$id": "SecurityScheme.json", + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/userPassword.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/apiKey.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/X509.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/symmetricEncryption.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/asymmetricEncryption.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/HTTPSecurityScheme.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/oauth2Flows.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/openIdConnect.json" + } + ] + }, + "traits.json": { + "$id": "traits.json", "type": "object", "additionalProperties": { "anyOf": [ @@ -1649,7 +1598,58 @@ } ] } + }, + "components.json": { + "$id": "components.json", + "type": "object", + "description": "An object to hold a set of reusable objects for different aspects of the AsyncAPI Specification.", + "additionalProperties": false, + "properties": { + "schemas": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/schemas.json" + }, + "messages": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/messages.json" + }, + "securitySchemes": { + "type": "object", + "patternProperties": { + "^[\\w\\d\\.\\-_]+$": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/SecurityScheme.json" + } + ] + } + } + }, + "parameters": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/parameters.json" + }, + "correlationIds": { + "type": "object", + "patternProperties": { + "^[\\w\\d\\.\\-_]+$": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/correlationId.json" + } + ] + } + } + }, + "traits": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/traits.json" + } + } } }, + "$id": "http://asyncapi.com/definitions/2.0.0-rc1/asyncapi.json", "description": "!!Auto generated!! \n Do not manually edit. " } \ No newline at end of file diff --git a/schemas/2.0.0-rc2-without-$id.json b/schemas/2.0.0-rc2-without-$id.json index 97be4c9b..0dbf8c8a 100644 --- a/schemas/2.0.0-rc2-without-$id.json +++ b/schemas/2.0.0-rc2-without-$id.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema", + "$schema": "http://json-schema.org/draft-07/schema#", "title": "AsyncAPI 2.0.0-rc2 schema.", "type": "object", "required": [ @@ -61,45 +61,6 @@ "additionalProperties": true, "additionalItems": true }, - "info": { - "type": "object", - "description": "General information about the API.", - "required": [ - "version", - "title" - ], - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "properties": { - "title": { - "type": "string", - "description": "A unique and precise title of the API." - }, - "version": { - "type": "string", - "description": "A semantic version number of the API." - }, - "description": { - "type": "string", - "description": "A longer description of the API. Should be different from the title. CommonMark is allowed." - }, - "termsOfService": { - "type": "string", - "description": "A URL to the Terms of Service for the API. MUST be in the format of a URL.", - "format": "uri" - }, - "contact": { - "$ref": "#/definitions/contact" - }, - "license": { - "$ref": "#/definitions/license" - } - } - }, "contact": { "type": "object", "description": "Contact information for the owners of the API.", @@ -149,12 +110,12 @@ } } }, - "server": { + "info": { "type": "object", - "description": "An object representing a Server.", + "description": "General information about the API.", "required": [ - "url", - "protocol" + "version", + "title" ], "additionalProperties": false, "patternProperties": { @@ -163,39 +124,31 @@ } }, "properties": { - "url": { - "type": "string" - }, - "description": { - "type": "string" + "title": { + "type": "string", + "description": "A unique and precise title of the API." }, - "protocol": { + "version": { "type": "string", - "description": "The transfer protocol." + "description": "A semantic version number of the API." }, - "protocolVersion": { - "type": "string" + "description": { + "type": "string", + "description": "A longer description of the API. Should be different from the title. CommonMark is allowed." }, - "variables": { - "$ref": "#/definitions/serverVariables" + "termsOfService": { + "type": "string", + "description": "A URL to the Terms of Service for the API. MUST be in the format of a URL.", + "format": "uri" }, - "security": { - "type": "array", - "items": { - "$ref": "#/definitions/SecurityRequirement" - } + "contact": { + "$ref": "#/definitions/contact" }, - "bindings": { - "$ref": "#/definitions/bindingsObject" + "license": { + "$ref": "#/definitions/license" } } }, - "serverVariables": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/serverVariable" - } - }, "serverVariable": { "type": "object", "description": "An object representing a Server Variable for server URL template substitution.", @@ -228,6 +181,12 @@ } } }, + "serverVariables": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/serverVariable" + } + }, "SecurityRequirement": { "type": "object", "additionalProperties": { @@ -257,46 +216,41 @@ "redis": {} } }, - "channels": { - "type": "object", - "propertyNames": { - "type": "string", - "format": "uri-template", - "minLength": 1 - }, - "additionalProperties": { - "$ref": "#/definitions/channelItem" - } - }, - "channelItem": { + "server": { "type": "object", + "description": "An object representing a Server.", + "required": [ + "url", + "protocol" + ], "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { "$ref": "#/definitions/specificationExtension" } }, - "minProperties": 1, "properties": { - "$ref": { - "$ref": "#/definitions/ReferenceObject" - }, - "parameters": { - "$ref": "#/definitions/parameters" + "url": { + "type": "string" }, "description": { + "type": "string" + }, + "protocol": { "type": "string", - "description": "A description of the channel." + "description": "The transfer protocol." }, - "publish": { - "$ref": "#/definitions/operation" + "protocolVersion": { + "type": "string" }, - "subscribe": { - "$ref": "#/definitions/operation" + "variables": { + "$ref": "#/definitions/serverVariables" }, - "deprecated": { - "type": "boolean", - "default": false + "security": { + "type": "array", + "items": { + "$ref": "#/definitions/SecurityRequirement" + } }, "bindings": { "$ref": "#/definitions/bindingsObject" @@ -307,20 +261,6 @@ "type": "string", "format": "uri-reference" }, - "parameters": { - "type": "object", - "additionalProperties": { - "oneOf": [ - { - "$ref": "#/definitions/Reference" - }, - { - "$ref": "#/definitions/parameter" - } - ] - }, - "description": "JSON objects describing re-usable channel parameters." - }, "Reference": { "type": "object", "required": [ @@ -332,120 +272,6 @@ } } }, - "parameter": { - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "properties": { - "description": { - "type": "string", - "description": "A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed." - }, - "schema": { - "$ref": "#/definitions/schema" - }, - "location": { - "type": "string", - "description": "A runtime expression that specifies the location of the parameter value", - "pattern": "^\\$message\\.(header|payload)#(\\/(([^\\/~])|(~[01]))*)*" - }, - "$ref": { - "$ref": "#/definitions/ReferenceObject" - } - } - }, - "schema": { - "allOf": [ - { - "$ref": "#/definitions/json-schema-draft-07-schema" - }, - { - "type": "object", - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "properties": { - "additionalProperties": { - "$ref": "#/definitions/schema" - }, - "items": { - "anyOf": [ - { - "$ref": "#/definitions/schema" - }, - { - "type": "array", - "minItems": 1, - "items": { - "$ref": "#/definitions/schema" - } - } - ], - "default": {} - }, - "allOf": { - "type": "array", - "minItems": 1, - "items": { - "$ref": "#/definitions/schema" - } - }, - "oneOf": { - "type": "array", - "minItems": 2, - "items": { - "$ref": "#/definitions/schema" - } - }, - "anyOf": { - "type": "array", - "minItems": 2, - "items": { - "$ref": "#/definitions/schema" - } - }, - "not": { - "$ref": "#/definitions/schema" - }, - "properties": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/schema" - }, - "default": {} - }, - "patternProperties": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/schema" - }, - "default": {} - }, - "propertyNames": { - "$ref": "#/definitions/schema" - }, - "contains": { - "$ref": "#/definitions/schema" - }, - "discriminator": { - "type": "string" - }, - "externalDocs": { - "$ref": "#/definitions/externalDocs" - }, - "deprecated": { - "type": "boolean", - "default": false - } - } - } - ] - }, "json-schema-draft-07-schema": { "title": "Core schema meta-schema", "definitions": { @@ -711,8 +537,96 @@ } } }, - "operation": { - "type": "object", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/json-schema-draft-07-schema" + }, + { + "type": "object", + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, + "properties": { + "additionalProperties": { + "$ref": "#/definitions/schema" + }, + "items": { + "anyOf": [ + { + "$ref": "#/definitions/schema" + }, + { + "type": "array", + "minItems": 1, + "items": { + "$ref": "#/definitions/schema" + } + } + ], + "default": {} + }, + "allOf": { + "type": "array", + "minItems": 1, + "items": { + "$ref": "#/definitions/schema" + } + }, + "oneOf": { + "type": "array", + "minItems": 2, + "items": { + "$ref": "#/definitions/schema" + } + }, + "anyOf": { + "type": "array", + "minItems": 2, + "items": { + "$ref": "#/definitions/schema" + } + }, + "not": { + "$ref": "#/definitions/schema" + }, + "properties": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/schema" + }, + "default": {} + }, + "patternProperties": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/schema" + }, + "default": {} + }, + "propertyNames": { + "$ref": "#/definitions/schema" + }, + "contains": { + "$ref": "#/definitions/schema" + }, + "discriminator": { + "type": "string" + }, + "externalDocs": { + "$ref": "#/definitions/externalDocs" + }, + "deprecated": { + "type": "boolean", + "default": false + } + } + } + ] + }, + "parameter": { "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { @@ -720,19 +634,69 @@ } }, "properties": { - "traits": { - "type": "array", - "items": { - "oneOf": [ - { - "$ref": "#/definitions/Reference" - }, - { - "$ref": "#/definitions/operationTrait" - } - ] + "description": { + "type": "string", + "description": "A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed." + }, + "schema": { + "$ref": "#/definitions/schema" + }, + "location": { + "type": "string", + "description": "A runtime expression that specifies the location of the parameter value", + "pattern": "^\\$message\\.(header|payload)#(\\/(([^\\/~])|(~[01]))*)*" + }, + "$ref": { + "$ref": "#/definitions/ReferenceObject" + } + } + }, + "parameters": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/parameter" } + ] + }, + "description": "JSON objects describing re-usable channel parameters." + }, + "tag": { + "type": "object", + "additionalProperties": false, + "required": [ + "name" + ], + "properties": { + "name": { + "type": "string" + }, + "description": { + "type": "string" }, + "externalDocs": { + "$ref": "#/definitions/externalDocs" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } + } + }, + "operationTrait": { + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, + "properties": { "summary": { "type": "string" }, @@ -754,13 +718,33 @@ }, "bindings": { "$ref": "#/definitions/bindingsObject" + } + } + }, + "correlationId": { + "type": "object", + "required": [ + "location" + ], + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, + "properties": { + "description": { + "type": "string", + "description": "A optional description of the correlation ID. GitHub Flavored Markdown is allowed." }, - "message": { - "$ref": "#/definitions/message" + "location": { + "type": "string", + "description": "A runtime expression that specifies the location of the correlation ID", + "pattern": "^\\$message\\.(header|payload)#(\\/(([^\\/~])|(~[01]))*)*" } } }, - "operationTrait": { + "messageTrait": { "type": "object", "additionalProperties": false, "patternProperties": { @@ -769,12 +753,32 @@ } }, "properties": { - "summary": { + "schemaFormat": { "type": "string" }, - "description": { + "contentType": { "type": "string" }, + "headers": { + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/schema" + } + ] + }, + "correlationId": { + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/correlationId" + } + ] + }, "tags": { "type": "array", "items": { @@ -782,37 +786,37 @@ }, "uniqueItems": true }, - "externalDocs": { - "$ref": "#/definitions/externalDocs" - }, - "operationId": { - "type": "string" + "summary": { + "type": "string", + "description": "A brief summary of the message." }, - "bindings": { - "$ref": "#/definitions/bindingsObject" - } - } - }, - "tag": { - "type": "object", - "additionalProperties": false, - "required": [ - "name" - ], - "properties": { "name": { - "type": "string" + "type": "string", + "description": "Name of the message." + }, + "title": { + "type": "string", + "description": "A human-friendly title for the message." }, "description": { - "type": "string" + "type": "string", + "description": "A longer description of the message. CommonMark is allowed." }, "externalDocs": { "$ref": "#/definitions/externalDocs" - } - }, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" + }, + "deprecated": { + "type": "boolean", + "default": false + }, + "examples": { + "type": "array", + "items": { + "type": "object" + } + }, + "bindings": { + "$ref": "#/definitions/bindingsObject" } } }, @@ -925,11 +929,8 @@ } ] }, - "correlationId": { + "operation": { "type": "object", - "required": [ - "location" - ], "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { @@ -937,52 +938,25 @@ } }, "properties": { - "description": { - "type": "string", - "description": "A optional description of the correlation ID. GitHub Flavored Markdown is allowed." + "traits": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/operationTrait" + } + ] + } }, - "location": { - "type": "string", - "description": "A runtime expression that specifies the location of the correlation ID", - "pattern": "^\\$message\\.(header|payload)#(\\/(([^\\/~])|(~[01]))*)*" - } - } - }, - "messageTrait": { - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "properties": { - "schemaFormat": { + "summary": { "type": "string" }, - "contentType": { + "description": { "type": "string" }, - "headers": { - "oneOf": [ - { - "$ref": "#/definitions/Reference" - }, - { - "$ref": "#/definitions/schema" - } - ] - }, - "correlationId": { - "oneOf": [ - { - "$ref": "#/definitions/Reference" - }, - { - "$ref": "#/definitions/correlationId" - } - ] - }, "tags": { "type": "array", "items": { @@ -990,122 +964,66 @@ }, "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." - }, "externalDocs": { "$ref": "#/definitions/externalDocs" }, - "deprecated": { - "type": "boolean", - "default": false - }, - "examples": { - "type": "array", - "items": { - "type": "object" - } + "operationId": { + "type": "string" }, "bindings": { "$ref": "#/definitions/bindingsObject" + }, + "message": { + "$ref": "#/definitions/message" } } }, - "components": { + "channelItem": { "type": "object", - "description": "An object to hold a set of reusable objects for different aspects of the AsyncAPI Specification.", "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, + "minProperties": 1, "properties": { - "schemas": { - "$ref": "#/definitions/schemas" - }, - "messages": { - "$ref": "#/definitions/messages" - }, - "securitySchemes": { - "type": "object", - "patternProperties": { - "^[\\w\\d\\.\\-_]+$": { - "oneOf": [ - { - "$ref": "#/definitions/Reference" - }, - { - "$ref": "#/definitions/SecurityScheme" - } - ] - } - } + "$ref": { + "$ref": "#/definitions/ReferenceObject" }, "parameters": { "$ref": "#/definitions/parameters" }, - "correlationIds": { - "type": "object", - "patternProperties": { - "^[\\w\\d\\.\\-_]+$": { - "oneOf": [ - { - "$ref": "#/definitions/Reference" - }, - { - "$ref": "#/definitions/correlationId" - } - ] - } - } - }, - "operationTraits": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/operationTrait" - } - }, - "messageTraits": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/messageTrait" - } + "description": { + "type": "string", + "description": "A description of the channel." }, - "serverBindings": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/bindingsObject" - } + "publish": { + "$ref": "#/definitions/operation" }, - "channelBindings": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/bindingsObject" - } + "subscribe": { + "$ref": "#/definitions/operation" }, - "operationBindings": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/bindingsObject" - } + "deprecated": { + "type": "boolean", + "default": false }, - "messageBindings": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/bindingsObject" - } + "bindings": { + "$ref": "#/definitions/bindingsObject" } } }, + "channels": { + "type": "object", + "propertyNames": { + "type": "string", + "format": "uri-template", + "minLength": 1 + }, + "additionalProperties": { + "$ref": "#/definitions/channelItem" + } + }, "schemas": { "type": "object", "additionalProperties": { @@ -1120,34 +1038,6 @@ }, "description": "JSON objects describing the messages being consumed and produced by the API." }, - "SecurityScheme": { - "oneOf": [ - { - "$ref": "#/definitions/userPassword" - }, - { - "$ref": "#/definitions/apiKey" - }, - { - "$ref": "#/definitions/X509" - }, - { - "$ref": "#/definitions/symmetricEncryption" - }, - { - "$ref": "#/definitions/asymmetricEncryption" - }, - { - "$ref": "#/definitions/HTTPSecurityScheme" - }, - { - "$ref": "#/definitions/oauth2Flows" - }, - { - "$ref": "#/definitions/openIdConnect" - } - ] - }, "userPassword": { "type": "object", "required": [ @@ -1271,19 +1161,6 @@ }, "additionalProperties": false }, - "HTTPSecurityScheme": { - "oneOf": [ - { - "$ref": "#/definitions/NonBearerHTTPSecurityScheme" - }, - { - "$ref": "#/definitions/BearerHTTPSecurityScheme" - }, - { - "$ref": "#/definitions/APIKeyHTTPSecurityScheme" - } - ] - }, "NonBearerHTTPSecurityScheme": { "not": { "type": "object", @@ -1391,6 +1268,51 @@ }, "additionalProperties": false }, + "HTTPSecurityScheme": { + "oneOf": [ + { + "$ref": "#/definitions/NonBearerHTTPSecurityScheme" + }, + { + "$ref": "#/definitions/BearerHTTPSecurityScheme" + }, + { + "$ref": "#/definitions/APIKeyHTTPSecurityScheme" + } + ] + }, + "oauth2Scopes": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "oauth2Flow": { + "type": "object", + "properties": { + "authorizationUrl": { + "type": "string", + "format": "uri" + }, + "tokenUrl": { + "type": "string", + "format": "uri" + }, + "refreshUrl": { + "type": "string", + "format": "uri" + }, + "scopes": { + "$ref": "#/definitions/oauth2Scopes" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, + "additionalProperties": false + }, "oauth2Flows": { "type": "object", "required": [ @@ -1495,38 +1417,6 @@ } } }, - "oauth2Flow": { - "type": "object", - "properties": { - "authorizationUrl": { - "type": "string", - "format": "uri" - }, - "tokenUrl": { - "type": "string", - "format": "uri" - }, - "refreshUrl": { - "type": "string", - "format": "uri" - }, - "scopes": { - "$ref": "#/definitions/oauth2Scopes" - } - }, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "additionalProperties": false - }, - "oauth2Scopes": { - "type": "object", - "additionalProperties": { - "type": "string" - } - }, "openIdConnect": { "type": "object", "required": [ @@ -1554,6 +1444,116 @@ } }, "additionalProperties": false + }, + "SecurityScheme": { + "oneOf": [ + { + "$ref": "#/definitions/userPassword" + }, + { + "$ref": "#/definitions/apiKey" + }, + { + "$ref": "#/definitions/X509" + }, + { + "$ref": "#/definitions/symmetricEncryption" + }, + { + "$ref": "#/definitions/asymmetricEncryption" + }, + { + "$ref": "#/definitions/HTTPSecurityScheme" + }, + { + "$ref": "#/definitions/oauth2Flows" + }, + { + "$ref": "#/definitions/openIdConnect" + } + ] + }, + "components": { + "type": "object", + "description": "An object to hold a set of reusable objects for different aspects of the AsyncAPI Specification.", + "additionalProperties": false, + "properties": { + "schemas": { + "$ref": "#/definitions/schemas" + }, + "messages": { + "$ref": "#/definitions/messages" + }, + "securitySchemes": { + "type": "object", + "patternProperties": { + "^[\\w\\d\\.\\-_]+$": { + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/SecurityScheme" + } + ] + } + } + }, + "parameters": { + "$ref": "#/definitions/parameters" + }, + "correlationIds": { + "type": "object", + "patternProperties": { + "^[\\w\\d\\.\\-_]+$": { + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/correlationId" + } + ] + } + } + }, + "operationTraits": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/operationTrait" + } + }, + "messageTraits": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/messageTrait" + } + }, + "serverBindings": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/bindingsObject" + } + }, + "channelBindings": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/bindingsObject" + } + }, + "operationBindings": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/bindingsObject" + } + }, + "messageBindings": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/bindingsObject" + } + } + } } }, "description": "!!Auto generated!! \n Do not manually edit. " diff --git a/schemas/2.0.0-rc2.json b/schemas/2.0.0-rc2.json index 38c0c5e9..d4c6e05b 100644 --- a/schemas/2.0.0-rc2.json +++ b/schemas/2.0.0-rc2.json @@ -1,6 +1,5 @@ { - "$id": "http://asyncapi.com/definitions/2.0.0-rc2/asyncapi.json", - "$schema": "http://json-schema.org/draft-07/schema", + "$schema": "http://json-schema.org/draft-07/schema#", "title": "AsyncAPI 2.0.0-rc2 schema.", "type": "object", "required": [ @@ -57,54 +56,14 @@ } }, "definitions": { - "http://asyncapi.com/definitions/2.0.0-rc2/specificationExtension.json": { - "$id": "http://asyncapi.com/definitions/2.0.0-rc2/specificationExtension.json", + "specificationExtension.json": { + "$id": "specificationExtension.json", "description": "Any property starting with x- is valid.", "additionalProperties": true, "additionalItems": true }, - "http://asyncapi.com/definitions/2.0.0-rc2/info.json": { - "$id": "http://asyncapi.com/definitions/2.0.0-rc2/info.json", - "type": "object", - "description": "General information about the API.", - "required": [ - "version", - "title" - ], - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/specificationExtension.json" - } - }, - "properties": { - "title": { - "type": "string", - "description": "A unique and precise title of the API." - }, - "version": { - "type": "string", - "description": "A semantic version number of the API." - }, - "description": { - "type": "string", - "description": "A longer description of the API. Should be different from the title. CommonMark is allowed." - }, - "termsOfService": { - "type": "string", - "description": "A URL to the Terms of Service for the API. MUST be in the format of a URL.", - "format": "uri" - }, - "contact": { - "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/contact.json" - }, - "license": { - "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/license.json" - } - } - }, - "http://asyncapi.com/definitions/2.0.0-rc2/contact.json": { - "$id": "http://asyncapi.com/definitions/2.0.0-rc2/contact.json", + "contact.json": { + "$id": "contact.json", "type": "object", "description": "Contact information for the owners of the API.", "additionalProperties": false, @@ -130,8 +89,8 @@ } } }, - "http://asyncapi.com/definitions/2.0.0-rc2/license.json": { - "$id": "http://asyncapi.com/definitions/2.0.0-rc2/license.json", + "license.json": { + "$id": "license.json", "type": "object", "required": [ "name" @@ -154,13 +113,13 @@ } } }, - "http://asyncapi.com/definitions/2.0.0-rc2/server.json": { - "$id": "http://asyncapi.com/definitions/2.0.0-rc2/server.json", + "info.json": { + "$id": "info.json", "type": "object", - "description": "An object representing a Server.", + "description": "General information about the API.", "required": [ - "url", - "protocol" + "version", + "title" ], "additionalProperties": false, "patternProperties": { @@ -169,42 +128,33 @@ } }, "properties": { - "url": { - "type": "string" - }, - "description": { - "type": "string" + "title": { + "type": "string", + "description": "A unique and precise title of the API." }, - "protocol": { + "version": { "type": "string", - "description": "The transfer protocol." + "description": "A semantic version number of the API." }, - "protocolVersion": { - "type": "string" + "description": { + "type": "string", + "description": "A longer description of the API. Should be different from the title. CommonMark is allowed." }, - "variables": { - "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/serverVariables.json" + "termsOfService": { + "type": "string", + "description": "A URL to the Terms of Service for the API. MUST be in the format of a URL.", + "format": "uri" }, - "security": { - "type": "array", - "items": { - "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/SecurityRequirement.json" - } + "contact": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/contact.json" }, - "bindings": { - "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/bindingsObject.json" + "license": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/license.json" } } }, - "http://asyncapi.com/definitions/2.0.0-rc2/serverVariables.json": { - "$id": "http://asyncapi.com/definitions/2.0.0-rc2/serverVariables.json", - "type": "object", - "additionalProperties": { - "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/serverVariable.json" - } - }, - "http://asyncapi.com/definitions/2.0.0-rc2/serverVariable.json": { - "$id": "http://asyncapi.com/definitions/2.0.0-rc2/serverVariable.json", + "serverVariable.json": { + "$id": "serverVariable.json", "type": "object", "description": "An object representing a Server Variable for server URL template substitution.", "minProperties": 1, @@ -236,8 +186,15 @@ } } }, - "http://asyncapi.com/definitions/2.0.0-rc2/SecurityRequirement.json": { - "$id": "http://asyncapi.com/definitions/2.0.0-rc2/SecurityRequirement.json", + "serverVariables.json": { + "$id": "serverVariables.json", + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/serverVariable.json" + } + }, + "SecurityRequirement.json": { + "$id": "SecurityRequirement.json", "type": "object", "additionalProperties": { "type": "array", @@ -247,8 +204,8 @@ "uniqueItems": true } }, - "http://asyncapi.com/definitions/2.0.0-rc2/bindingsObject.json": { - "$id": "http://asyncapi.com/definitions/2.0.0-rc2/bindingsObject.json", + "bindingsObject.json": { + "$id": "bindingsObject.json", "type": "object", "additionalProperties": true, "properties": { @@ -267,76 +224,55 @@ "redis": {} } }, - "http://asyncapi.com/definitions/2.0.0-rc2/channels.json": { - "$id": "http://asyncapi.com/definitions/2.0.0-rc2/channels.json", - "type": "object", - "propertyNames": { - "type": "string", - "format": "uri-template", - "minLength": 1 - }, - "additionalProperties": { - "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/channelItem.json" - } - }, - "http://asyncapi.com/definitions/2.0.0-rc2/channelItem.json": { - "$id": "http://asyncapi.com/definitions/2.0.0-rc2/channelItem.json", + "server.json": { + "$id": "server.json", "type": "object", + "description": "An object representing a Server.", + "required": [ + "url", + "protocol" + ], "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/specificationExtension.json" } }, - "minProperties": 1, "properties": { - "$ref": { - "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/ReferenceObject.json" - }, - "parameters": { - "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/parameters.json" + "url": { + "type": "string" }, "description": { + "type": "string" + }, + "protocol": { "type": "string", - "description": "A description of the channel." + "description": "The transfer protocol." }, - "publish": { - "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/operation.json" + "protocolVersion": { + "type": "string" }, - "subscribe": { - "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/operation.json" + "variables": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/serverVariables.json" }, - "deprecated": { - "type": "boolean", - "default": false + "security": { + "type": "array", + "items": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/SecurityRequirement.json" + } }, "bindings": { "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/bindingsObject.json" } } }, - "http://asyncapi.com/definitions/2.0.0-rc2/ReferenceObject.json": { - "$id": "http://asyncapi.com/definitions/2.0.0-rc2/ReferenceObject.json", + "ReferenceObject.json": { + "$id": "ReferenceObject.json", "type": "string", "format": "uri-reference" }, - "http://asyncapi.com/definitions/2.0.0-rc2/parameters.json": { - "$id": "http://asyncapi.com/definitions/2.0.0-rc2/parameters.json", - "type": "object", - "additionalProperties": { - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/Reference.json" - }, - { - "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/parameter.json" - } - ] - }, - "description": "JSON objects describing re-usable channel parameters." - }, - "http://asyncapi.com/definitions/2.0.0-rc2/Reference.json": { - "$id": "http://asyncapi.com/definitions/2.0.0-rc2/Reference.json", + "Reference.json": { + "$id": "Reference.json", "type": "object", "required": [ "$ref" @@ -347,183 +283,67 @@ } } }, - "http://asyncapi.com/definitions/2.0.0-rc2/parameter.json": { - "$id": "http://asyncapi.com/definitions/2.0.0-rc2/parameter.json", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/specificationExtension.json" + "http://json-schema.org/draft-07/schema": { + "$id": "http://json-schema.org/draft-07/schema", + "title": "Core schema meta-schema", + "definitions": { + "schemaArray": { + "type": "array", + "minItems": 1, + "items": { + "$ref": "#" + } + }, + "nonNegativeInteger": { + "type": "integer", + "minimum": 0 + }, + "nonNegativeIntegerDefault0": { + "allOf": [ + { + "$ref": "#/definitions/nonNegativeInteger" + }, + { + "default": 0 + } + ] + }, + "simpleTypes": { + "enum": [ + "array", + "boolean", + "integer", + "null", + "number", + "object", + "string" + ] + }, + "stringArray": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true, + "default": [] } }, + "type": [ + "object", + "boolean" + ], "properties": { - "description": { + "$id": { "type": "string", - "description": "A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed." - }, - "schema": { - "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/schema.json" + "format": "uri-reference" }, - "location": { + "$schema": { "type": "string", - "description": "A runtime expression that specifies the location of the parameter value", - "pattern": "^\\$message\\.(header|payload)#(\\/(([^\\/~])|(~[01]))*)*" + "format": "uri" }, "$ref": { - "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/ReferenceObject.json" - } - } - }, - "http://asyncapi.com/definitions/2.0.0-rc2/schema.json": { - "$id": "http://asyncapi.com/definitions/2.0.0-rc2/schema.json", - "allOf": [ - { - "$ref": "http://json-schema.org/draft-07/schema#" - }, - { - "type": "object", - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/specificationExtension.json" - } - }, - "properties": { - "additionalProperties": { - "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/schema.json" - }, - "items": { - "anyOf": [ - { - "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/schema.json" - }, - { - "type": "array", - "minItems": 1, - "items": { - "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/schema.json" - } - } - ], - "default": {} - }, - "allOf": { - "type": "array", - "minItems": 1, - "items": { - "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/schema.json" - } - }, - "oneOf": { - "type": "array", - "minItems": 2, - "items": { - "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/schema.json" - } - }, - "anyOf": { - "type": "array", - "minItems": 2, - "items": { - "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/schema.json" - } - }, - "not": { - "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/schema.json" - }, - "properties": { - "type": "object", - "additionalProperties": { - "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/schema.json" - }, - "default": {} - }, - "patternProperties": { - "type": "object", - "additionalProperties": { - "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/schema.json" - }, - "default": {} - }, - "propertyNames": { - "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/schema.json" - }, - "contains": { - "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/schema.json" - }, - "discriminator": { - "type": "string" - }, - "externalDocs": { - "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/externalDocs.json" - }, - "deprecated": { - "type": "boolean", - "default": false - } - } - } - ] - }, - "http://json-schema.org/draft-07/schema": { - "$id": "http://json-schema.org/draft-07/schema", - "title": "Core schema meta-schema", - "definitions": { - "schemaArray": { - "type": "array", - "minItems": 1, - "items": { - "$ref": "#" - } - }, - "nonNegativeInteger": { - "type": "integer", - "minimum": 0 - }, - "nonNegativeIntegerDefault0": { - "allOf": [ - { - "$ref": "#/definitions/nonNegativeInteger" - }, - { - "default": 0 - } - ] - }, - "simpleTypes": { - "enum": [ - "array", - "boolean", - "integer", - "null", - "number", - "object", - "string" - ] - }, - "stringArray": { - "type": "array", - "items": { - "type": "string" - }, - "uniqueItems": true, - "default": [] - } - }, - "type": [ - "object", - "boolean" - ], - "properties": { - "$id": { - "type": "string", - "format": "uri-reference" - }, - "$schema": { - "type": "string", - "format": "uri" - }, - "$ref": { - "type": "string", - "format": "uri-reference" + "type": "string", + "format": "uri-reference" }, "$comment": { "type": "string" @@ -707,8 +527,8 @@ }, "default": true }, - "http://asyncapi.com/definitions/2.0.0-rc2/externalDocs.json": { - "$id": "http://asyncapi.com/definitions/2.0.0-rc2/externalDocs.json", + "externalDocs.json": { + "$id": "externalDocs.json", "type": "object", "additionalProperties": false, "description": "information about external documentation", @@ -730,9 +550,98 @@ } } }, - "http://asyncapi.com/definitions/2.0.0-rc2/operation.json": { - "$id": "http://asyncapi.com/definitions/2.0.0-rc2/operation.json", - "type": "object", + "schema.json": { + "$id": "schema.json", + "allOf": [ + { + "$ref": "http://json-schema.org/draft-07/schema#" + }, + { + "type": "object", + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/specificationExtension.json" + } + }, + "properties": { + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/schema.json" + }, + "items": { + "anyOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/schema.json" + }, + { + "type": "array", + "minItems": 1, + "items": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/schema.json" + } + } + ], + "default": {} + }, + "allOf": { + "type": "array", + "minItems": 1, + "items": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/schema.json" + } + }, + "oneOf": { + "type": "array", + "minItems": 2, + "items": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/schema.json" + } + }, + "anyOf": { + "type": "array", + "minItems": 2, + "items": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/schema.json" + } + }, + "not": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/schema.json" + }, + "properties": { + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/schema.json" + }, + "default": {} + }, + "patternProperties": { + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/schema.json" + }, + "default": {} + }, + "propertyNames": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/schema.json" + }, + "contains": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/schema.json" + }, + "discriminator": { + "type": "string" + }, + "externalDocs": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/externalDocs.json" + }, + "deprecated": { + "type": "boolean", + "default": false + } + } + } + ] + }, + "parameter.json": { + "$id": "parameter.json", "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { @@ -740,48 +649,64 @@ } }, "properties": { - "traits": { - "type": "array", - "items": { - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/Reference.json" - }, - { - "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/operationTrait.json" - } - ] - } + "description": { + "type": "string", + "description": "A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed." }, - "summary": { + "schema": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/schema.json" + }, + "location": { + "type": "string", + "description": "A runtime expression that specifies the location of the parameter value", + "pattern": "^\\$message\\.(header|payload)#(\\/(([^\\/~])|(~[01]))*)*" + }, + "$ref": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/ReferenceObject.json" + } + } + }, + "parameters.json": { + "$id": "parameters.json", + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/parameter.json" + } + ] + }, + "description": "JSON objects describing re-usable channel parameters." + }, + "tag.json": { + "$id": "tag.json", + "type": "object", + "additionalProperties": false, + "required": [ + "name" + ], + "properties": { + "name": { "type": "string" }, "description": { "type": "string" }, - "tags": { - "type": "array", - "items": { - "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/tag.json" - }, - "uniqueItems": true - }, "externalDocs": { "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/externalDocs.json" - }, - "operationId": { - "type": "string" - }, - "bindings": { - "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/bindingsObject.json" - }, - "message": { - "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/message.json" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/specificationExtension.json" } } }, - "http://asyncapi.com/definitions/2.0.0-rc2/operationTrait.json": { - "$id": "http://asyncapi.com/definitions/2.0.0-rc2/operationTrait.json", + "operationTrait.json": { + "$id": "operationTrait.json", "type": "object", "additionalProperties": false, "patternProperties": { @@ -814,32 +739,109 @@ } } }, - "http://asyncapi.com/definitions/2.0.0-rc2/tag.json": { - "$id": "http://asyncapi.com/definitions/2.0.0-rc2/tag.json", + "correlationId.json": { + "$id": "correlationId.json", "type": "object", - "additionalProperties": false, "required": [ - "name" + "location" ], + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/specificationExtension.json" + } + }, "properties": { - "name": { - "type": "string" - }, "description": { - "type": "string" + "type": "string", + "description": "A optional description of the correlation ID. GitHub Flavored Markdown is allowed." }, - "externalDocs": { - "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/externalDocs.json" + "location": { + "type": "string", + "description": "A runtime expression that specifies the location of the correlation ID", + "pattern": "^\\$message\\.(header|payload)#(\\/(([^\\/~])|(~[01]))*)*" } - }, + } + }, + "messageTrait.json": { + "$id": "messageTrait.json", + "type": "object", + "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/specificationExtension.json" } + }, + "properties": { + "schemaFormat": { + "type": "string" + }, + "contentType": { + "type": "string" + }, + "headers": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/schema.json" + } + ] + }, + "correlationId": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/correlationId.json" + } + ] + }, + "tags": { + "type": "array", + "items": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/tag.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." + }, + "externalDocs": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/externalDocs.json" + }, + "deprecated": { + "type": "boolean", + "default": false + }, + "examples": { + "type": "array", + "items": { + "type": "object" + } + }, + "bindings": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/bindingsObject.json" + } } }, - "http://asyncapi.com/definitions/2.0.0-rc2/message.json": { - "$id": "http://asyncapi.com/definitions/2.0.0-rc2/message.json", + "message.json": { + "$id": "message.json", "oneOf": [ { "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/Reference.json" @@ -948,12 +950,9 @@ } ] }, - "http://asyncapi.com/definitions/2.0.0-rc2/correlationId.json": { - "$id": "http://asyncapi.com/definitions/2.0.0-rc2/correlationId.json", + "operation.json": { + "$id": "operation.json", "type": "object", - "required": [ - "location" - ], "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { @@ -961,53 +960,25 @@ } }, "properties": { - "description": { - "type": "string", - "description": "A optional description of the correlation ID. GitHub Flavored Markdown is allowed." + "traits": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/operationTrait.json" + } + ] + } }, - "location": { - "type": "string", - "description": "A runtime expression that specifies the location of the correlation ID", - "pattern": "^\\$message\\.(header|payload)#(\\/(([^\\/~])|(~[01]))*)*" - } - } - }, - "http://asyncapi.com/definitions/2.0.0-rc2/messageTrait.json": { - "$id": "http://asyncapi.com/definitions/2.0.0-rc2/messageTrait.json", - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/specificationExtension.json" - } - }, - "properties": { - "schemaFormat": { + "summary": { "type": "string" }, - "contentType": { + "description": { "type": "string" }, - "headers": { - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/Reference.json" - }, - { - "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/schema.json" - } - ] - }, - "correlationId": { - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/Reference.json" - }, - { - "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/correlationId.json" - } - ] - }, "tags": { "type": "array", "items": { @@ -1015,170 +986,86 @@ }, "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." - }, "externalDocs": { "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/externalDocs.json" }, - "deprecated": { - "type": "boolean", - "default": false - }, - "examples": { - "type": "array", - "items": { - "type": "object" - } + "operationId": { + "type": "string" }, "bindings": { "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/bindingsObject.json" + }, + "message": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/message.json" } } }, - "http://asyncapi.com/definitions/2.0.0-rc2/components.json": { - "$id": "http://asyncapi.com/definitions/2.0.0-rc2/components.json", + "channelItem.json": { + "$id": "channelItem.json", "type": "object", - "description": "An object to hold a set of reusable objects for different aspects of the AsyncAPI Specification.", "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/specificationExtension.json" + } + }, + "minProperties": 1, "properties": { - "schemas": { - "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/schemas.json" - }, - "messages": { - "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/messages.json" - }, - "securitySchemes": { - "type": "object", - "patternProperties": { - "^[\\w\\d\\.\\-_]+$": { - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/Reference.json" - }, - { - "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/SecurityScheme.json" - } - ] - } - } + "$ref": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/ReferenceObject.json" }, "parameters": { "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/parameters.json" }, - "correlationIds": { - "type": "object", - "patternProperties": { - "^[\\w\\d\\.\\-_]+$": { - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/Reference.json" - }, - { - "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/correlationId.json" - } - ] - } - } - }, - "operationTraits": { - "type": "object", - "additionalProperties": { - "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/operationTrait.json" - } - }, - "messageTraits": { - "type": "object", - "additionalProperties": { - "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/messageTrait.json" - } - }, - "serverBindings": { - "type": "object", - "additionalProperties": { - "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/bindingsObject.json" - } + "description": { + "type": "string", + "description": "A description of the channel." }, - "channelBindings": { - "type": "object", - "additionalProperties": { - "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/bindingsObject.json" - } + "publish": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/operation.json" }, - "operationBindings": { - "type": "object", - "additionalProperties": { - "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/bindingsObject.json" - } + "subscribe": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/operation.json" }, - "messageBindings": { - "type": "object", - "additionalProperties": { - "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/bindingsObject.json" - } + "deprecated": { + "type": "boolean", + "default": false + }, + "bindings": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/bindingsObject.json" } } }, - "http://asyncapi.com/definitions/2.0.0-rc2/schemas.json": { - "$id": "http://asyncapi.com/definitions/2.0.0-rc2/schemas.json", + "channels.json": { + "$id": "channels.json", + "type": "object", + "propertyNames": { + "type": "string", + "format": "uri-template", + "minLength": 1 + }, + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/channelItem.json" + } + }, + "schemas.json": { + "$id": "schemas.json", "type": "object", "additionalProperties": { "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/schema.json" }, "description": "JSON objects describing schemas the API uses." }, - "http://asyncapi.com/definitions/2.0.0-rc2/messages.json": { - "$id": "http://asyncapi.com/definitions/2.0.0-rc2/messages.json", + "messages.json": { + "$id": "messages.json", "type": "object", "additionalProperties": { "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/message.json" }, "description": "JSON objects describing the messages being consumed and produced by the API." }, - "http://asyncapi.com/definitions/2.0.0-rc2/SecurityScheme.json": { - "$id": "http://asyncapi.com/definitions/2.0.0-rc2/SecurityScheme.json", - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/userPassword.json" - }, - { - "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/apiKey.json" - }, - { - "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/X509.json" - }, - { - "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/symmetricEncryption.json" - }, - { - "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/asymmetricEncryption.json" - }, - { - "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/HTTPSecurityScheme.json" - }, - { - "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/oauth2Flows.json" - }, - { - "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/openIdConnect.json" - } - ] - }, - "http://asyncapi.com/definitions/2.0.0-rc2/userPassword.json": { - "$id": "http://asyncapi.com/definitions/2.0.0-rc2/userPassword.json", + "userPassword.json": { + "$id": "userPassword.json", "type": "object", "required": [ "type" @@ -1201,8 +1088,8 @@ }, "additionalProperties": false }, - "http://asyncapi.com/definitions/2.0.0-rc2/apiKey.json": { - "$id": "http://asyncapi.com/definitions/2.0.0-rc2/apiKey.json", + "apiKey.json": { + "$id": "apiKey.json", "type": "object", "required": [ "type", @@ -1233,8 +1120,8 @@ }, "additionalProperties": false }, - "http://asyncapi.com/definitions/2.0.0-rc2/X509.json": { - "$id": "http://asyncapi.com/definitions/2.0.0-rc2/X509.json", + "X509.json": { + "$id": "X509.json", "type": "object", "required": [ "type" @@ -1257,8 +1144,8 @@ }, "additionalProperties": false }, - "http://asyncapi.com/definitions/2.0.0-rc2/symmetricEncryption.json": { - "$id": "http://asyncapi.com/definitions/2.0.0-rc2/symmetricEncryption.json", + "symmetricEncryption.json": { + "$id": "symmetricEncryption.json", "type": "object", "required": [ "type" @@ -1281,8 +1168,8 @@ }, "additionalProperties": false }, - "http://asyncapi.com/definitions/2.0.0-rc2/asymmetricEncryption.json": { - "$id": "http://asyncapi.com/definitions/2.0.0-rc2/asymmetricEncryption.json", + "asymmetricEncryption.json": { + "$id": "asymmetricEncryption.json", "type": "object", "required": [ "type" @@ -1305,22 +1192,8 @@ }, "additionalProperties": false }, - "http://asyncapi.com/definitions/2.0.0-rc2/HTTPSecurityScheme.json": { - "$id": "http://asyncapi.com/definitions/2.0.0-rc2/HTTPSecurityScheme.json", - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/NonBearerHTTPSecurityScheme.json" - }, - { - "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/BearerHTTPSecurityScheme.json" - }, - { - "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/APIKeyHTTPSecurityScheme.json" - } - ] - }, - "http://asyncapi.com/definitions/2.0.0-rc2/NonBearerHTTPSecurityScheme.json": { - "$id": "http://asyncapi.com/definitions/2.0.0-rc2/NonBearerHTTPSecurityScheme.json", + "NonBearerHTTPSecurityScheme.json": { + "$id": "NonBearerHTTPSecurityScheme.json", "not": { "type": "object", "properties": { @@ -1358,8 +1231,8 @@ }, "additionalProperties": false }, - "http://asyncapi.com/definitions/2.0.0-rc2/BearerHTTPSecurityScheme.json": { - "$id": "http://asyncapi.com/definitions/2.0.0-rc2/BearerHTTPSecurityScheme.json", + "BearerHTTPSecurityScheme.json": { + "$id": "BearerHTTPSecurityScheme.json", "type": "object", "required": [ "type", @@ -1392,8 +1265,8 @@ }, "additionalProperties": false }, - "http://asyncapi.com/definitions/2.0.0-rc2/APIKeyHTTPSecurityScheme.json": { - "$id": "http://asyncapi.com/definitions/2.0.0-rc2/APIKeyHTTPSecurityScheme.json", + "APIKeyHTTPSecurityScheme.json": { + "$id": "APIKeyHTTPSecurityScheme.json", "type": "object", "required": [ "type", @@ -1429,8 +1302,56 @@ }, "additionalProperties": false }, - "http://asyncapi.com/definitions/2.0.0-rc2/oauth2Flows.json": { - "$id": "http://asyncapi.com/definitions/2.0.0-rc2/oauth2Flows.json", + "HTTPSecurityScheme.json": { + "$id": "HTTPSecurityScheme.json", + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/NonBearerHTTPSecurityScheme.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/BearerHTTPSecurityScheme.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/APIKeyHTTPSecurityScheme.json" + } + ] + }, + "oauth2Scopes.json": { + "$id": "oauth2Scopes.json", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "oauth2Flow.json": { + "$id": "oauth2Flow.json", + "type": "object", + "properties": { + "authorizationUrl": { + "type": "string", + "format": "uri" + }, + "tokenUrl": { + "type": "string", + "format": "uri" + }, + "refreshUrl": { + "type": "string", + "format": "uri" + }, + "scopes": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/oauth2Scopes.json" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/specificationExtension.json" + } + }, + "additionalProperties": false + }, + "oauth2Flows.json": { + "$id": "oauth2Flows.json", "type": "object", "required": [ "type", @@ -1534,42 +1455,8 @@ } } }, - "http://asyncapi.com/definitions/2.0.0-rc2/oauth2Flow.json": { - "$id": "http://asyncapi.com/definitions/2.0.0-rc2/oauth2Flow.json", - "type": "object", - "properties": { - "authorizationUrl": { - "type": "string", - "format": "uri" - }, - "tokenUrl": { - "type": "string", - "format": "uri" - }, - "refreshUrl": { - "type": "string", - "format": "uri" - }, - "scopes": { - "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/oauth2Scopes.json" - } - }, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/specificationExtension.json" - } - }, - "additionalProperties": false - }, - "http://asyncapi.com/definitions/2.0.0-rc2/oauth2Scopes.json": { - "$id": "http://asyncapi.com/definitions/2.0.0-rc2/oauth2Scopes.json", - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "http://asyncapi.com/definitions/2.0.0-rc2/openIdConnect.json": { - "$id": "http://asyncapi.com/definitions/2.0.0-rc2/openIdConnect.json", + "openIdConnect.json": { + "$id": "openIdConnect.json", "type": "object", "required": [ "type", @@ -1596,7 +1483,120 @@ } }, "additionalProperties": false + }, + "SecurityScheme.json": { + "$id": "SecurityScheme.json", + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/userPassword.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/apiKey.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/X509.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/symmetricEncryption.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/asymmetricEncryption.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/HTTPSecurityScheme.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/oauth2Flows.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/openIdConnect.json" + } + ] + }, + "components.json": { + "$id": "components.json", + "type": "object", + "description": "An object to hold a set of reusable objects for different aspects of the AsyncAPI Specification.", + "additionalProperties": false, + "properties": { + "schemas": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/schemas.json" + }, + "messages": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/messages.json" + }, + "securitySchemes": { + "type": "object", + "patternProperties": { + "^[\\w\\d\\.\\-_]+$": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/SecurityScheme.json" + } + ] + } + } + }, + "parameters": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/parameters.json" + }, + "correlationIds": { + "type": "object", + "patternProperties": { + "^[\\w\\d\\.\\-_]+$": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/correlationId.json" + } + ] + } + } + }, + "operationTraits": { + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/operationTrait.json" + } + }, + "messageTraits": { + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/messageTrait.json" + } + }, + "serverBindings": { + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/bindingsObject.json" + } + }, + "channelBindings": { + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/bindingsObject.json" + } + }, + "operationBindings": { + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/bindingsObject.json" + } + }, + "messageBindings": { + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/bindingsObject.json" + } + } + } } }, + "$id": "http://asyncapi.com/definitions/2.0.0-rc2/asyncapi.json", "description": "!!Auto generated!! \n Do not manually edit. " } \ No newline at end of file diff --git a/schemas/2.0.0-without-$id.json b/schemas/2.0.0-without-$id.json index 2a1bf42a..2a86c584 100644 --- a/schemas/2.0.0-without-$id.json +++ b/schemas/2.0.0-without-$id.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema", + "$schema": "http://json-schema.org/draft-07/schema#", "title": "AsyncAPI 2.0.0 schema.", "type": "object", "required": [ @@ -61,45 +61,6 @@ "additionalProperties": true, "additionalItems": true }, - "info": { - "type": "object", - "description": "General information about the API.", - "required": [ - "version", - "title" - ], - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "properties": { - "title": { - "type": "string", - "description": "A unique and precise title of the API." - }, - "version": { - "type": "string", - "description": "A semantic version number of the API." - }, - "description": { - "type": "string", - "description": "A longer description of the API. Should be different from the title. CommonMark is allowed." - }, - "termsOfService": { - "type": "string", - "description": "A URL to the Terms of Service for the API. MUST be in the format of a URL.", - "format": "uri" - }, - "contact": { - "$ref": "#/definitions/contact" - }, - "license": { - "$ref": "#/definitions/license" - } - } - }, "contact": { "type": "object", "description": "Contact information for the owners of the API.", @@ -149,12 +110,12 @@ } } }, - "server": { + "info": { "type": "object", - "description": "An object representing a Server.", + "description": "General information about the API.", "required": [ - "url", - "protocol" + "version", + "title" ], "additionalProperties": false, "patternProperties": { @@ -163,39 +124,31 @@ } }, "properties": { - "url": { - "type": "string" - }, - "description": { - "type": "string" + "title": { + "type": "string", + "description": "A unique and precise title of the API." }, - "protocol": { + "version": { "type": "string", - "description": "The transfer protocol." + "description": "A semantic version number of the API." }, - "protocolVersion": { - "type": "string" + "description": { + "type": "string", + "description": "A longer description of the API. Should be different from the title. CommonMark is allowed." }, - "variables": { - "$ref": "#/definitions/serverVariables" + "termsOfService": { + "type": "string", + "description": "A URL to the Terms of Service for the API. MUST be in the format of a URL.", + "format": "uri" }, - "security": { - "type": "array", - "items": { - "$ref": "#/definitions/SecurityRequirement" - } + "contact": { + "$ref": "#/definitions/contact" }, - "bindings": { - "$ref": "#/definitions/bindingsObject" + "license": { + "$ref": "#/definitions/license" } } }, - "serverVariables": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/serverVariable" - } - }, "serverVariable": { "type": "object", "description": "An object representing a Server Variable for server URL template substitution.", @@ -227,6 +180,12 @@ } } }, + "serverVariables": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/serverVariable" + } + }, "SecurityRequirement": { "type": "object", "additionalProperties": { @@ -256,19 +215,13 @@ "redis": {} } }, - "channels": { - "type": "object", - "propertyNames": { - "type": "string", - "format": "uri-template", - "minLength": 1 - }, - "additionalProperties": { - "$ref": "#/definitions/channelItem" - } - }, - "channelItem": { + "server": { "type": "object", + "description": "An object representing a Server.", + "required": [ + "url", + "protocol" + ], "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { @@ -276,25 +229,27 @@ } }, "properties": { - "$ref": { - "$ref": "#/definitions/ReferenceObject" - }, - "parameters": { - "$ref": "#/definitions/parameters" + "url": { + "type": "string" }, "description": { + "type": "string" + }, + "protocol": { "type": "string", - "description": "A description of the channel." + "description": "The transfer protocol." }, - "publish": { - "$ref": "#/definitions/operation" + "protocolVersion": { + "type": "string" }, - "subscribe": { - "$ref": "#/definitions/operation" + "variables": { + "$ref": "#/definitions/serverVariables" }, - "deprecated": { - "type": "boolean", - "default": false + "security": { + "type": "array", + "items": { + "$ref": "#/definitions/SecurityRequirement" + } }, "bindings": { "$ref": "#/definitions/bindingsObject" @@ -305,20 +260,6 @@ "type": "string", "format": "uri-reference" }, - "parameters": { - "type": "object", - "additionalProperties": { - "oneOf": [ - { - "$ref": "#/definitions/Reference" - }, - { - "$ref": "#/definitions/parameter" - } - ] - }, - "description": "JSON objects describing re-usable channel parameters." - }, "Reference": { "type": "object", "required": [ @@ -330,187 +271,66 @@ } } }, - "parameter": { - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" + "json-schema-draft-07-schema": { + "title": "Core schema meta-schema", + "definitions": { + "schemaArray": { + "type": "array", + "minItems": 1, + "items": { + "$ref": "#/definitions/json-schema-draft-07-schema" + } + }, + "nonNegativeInteger": { + "type": "integer", + "minimum": 0 + }, + "nonNegativeIntegerDefault0": { + "allOf": [ + { + "$ref": "#/definitions/json-schema-draft-07-schema/definitions/nonNegativeInteger" + }, + { + "default": 0 + } + ] + }, + "simpleTypes": { + "enum": [ + "array", + "boolean", + "integer", + "null", + "number", + "object", + "string" + ] + }, + "stringArray": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true, + "default": [] } }, + "type": [ + "object", + "boolean" + ], "properties": { - "description": { + "$id": { "type": "string", - "description": "A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed." - }, - "schema": { - "$ref": "#/definitions/schema" + "format": "uri-reference" }, - "location": { + "$schema": { "type": "string", - "description": "A runtime expression that specifies the location of the parameter value", - "pattern": "^\\$message\\.(header|payload)#(\\/(([^\\/~])|(~[01]))*)*" + "format": "uri" }, "$ref": { - "$ref": "#/definitions/ReferenceObject" - } - } - }, - "schema": { - "allOf": [ - { - "$ref": "#/definitions/json-schema-draft-07-schema" - }, - { - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "properties": { - "additionalProperties": { - "anyOf": [ - { - "$ref": "#/definitions/schema" - }, - { - "type": "boolean" - } - ], - "default": {} - }, - "items": { - "anyOf": [ - { - "$ref": "#/definitions/schema" - }, - { - "type": "array", - "minItems": 1, - "items": { - "$ref": "#/definitions/schema" - } - } - ], - "default": {} - }, - "allOf": { - "type": "array", - "minItems": 1, - "items": { - "$ref": "#/definitions/schema" - } - }, - "oneOf": { - "type": "array", - "minItems": 1, - "items": { - "$ref": "#/definitions/schema" - } - }, - "anyOf": { - "type": "array", - "minItems": 1, - "items": { - "$ref": "#/definitions/schema" - } - }, - "not": { - "$ref": "#/definitions/schema" - }, - "properties": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/schema" - }, - "default": {} - }, - "patternProperties": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/schema" - }, - "default": {} - }, - "propertyNames": { - "$ref": "#/definitions/schema" - }, - "contains": { - "$ref": "#/definitions/schema" - }, - "discriminator": { - "type": "string" - }, - "externalDocs": { - "$ref": "#/definitions/externalDocs" - }, - "deprecated": { - "type": "boolean", - "default": false - } - } - } - ] - }, - "json-schema-draft-07-schema": { - "title": "Core schema meta-schema", - "definitions": { - "schemaArray": { - "type": "array", - "minItems": 1, - "items": { - "$ref": "#/definitions/json-schema-draft-07-schema" - } - }, - "nonNegativeInteger": { - "type": "integer", - "minimum": 0 - }, - "nonNegativeIntegerDefault0": { - "allOf": [ - { - "$ref": "#/definitions/json-schema-draft-07-schema/definitions/nonNegativeInteger" - }, - { - "default": 0 - } - ] - }, - "simpleTypes": { - "enum": [ - "array", - "boolean", - "integer", - "null", - "number", - "object", - "string" - ] - }, - "stringArray": { - "type": "array", - "items": { - "type": "string" - }, - "uniqueItems": true, - "default": [] - } - }, - "type": [ - "object", - "boolean" - ], - "properties": { - "$id": { - "type": "string", - "format": "uri-reference" - }, - "$schema": { - "type": "string", - "format": "uri" - }, - "$ref": { - "type": "string", - "format": "uri-reference" + "type": "string", + "format": "uri-reference" }, "$comment": { "type": "string" @@ -716,8 +536,103 @@ } } }, - "operation": { - "type": "object", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/json-schema-draft-07-schema" + }, + { + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, + "properties": { + "additionalProperties": { + "anyOf": [ + { + "$ref": "#/definitions/schema" + }, + { + "type": "boolean" + } + ], + "default": {} + }, + "items": { + "anyOf": [ + { + "$ref": "#/definitions/schema" + }, + { + "type": "array", + "minItems": 1, + "items": { + "$ref": "#/definitions/schema" + } + } + ], + "default": {} + }, + "allOf": { + "type": "array", + "minItems": 1, + "items": { + "$ref": "#/definitions/schema" + } + }, + "oneOf": { + "type": "array", + "minItems": 1, + "items": { + "$ref": "#/definitions/schema" + } + }, + "anyOf": { + "type": "array", + "minItems": 1, + "items": { + "$ref": "#/definitions/schema" + } + }, + "not": { + "$ref": "#/definitions/schema" + }, + "properties": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/schema" + }, + "default": {} + }, + "patternProperties": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/schema" + }, + "default": {} + }, + "propertyNames": { + "$ref": "#/definitions/schema" + }, + "contains": { + "$ref": "#/definitions/schema" + }, + "discriminator": { + "type": "string" + }, + "externalDocs": { + "$ref": "#/definitions/externalDocs" + }, + "deprecated": { + "type": "boolean", + "default": false + } + } + } + ] + }, + "parameter": { "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { @@ -725,43 +640,57 @@ } }, "properties": { - "traits": { - "type": "array", - "items": { - "oneOf": [ - { - "$ref": "#/definitions/Reference" - }, - { - "$ref": "#/definitions/operationTrait" - } - ] - } - }, - "summary": { - "type": "string" - }, "description": { - "type": "string" + "type": "string", + "description": "A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed." }, - "tags": { - "type": "array", - "items": { - "$ref": "#/definitions/tag" - }, - "uniqueItems": true + "schema": { + "$ref": "#/definitions/schema" }, - "externalDocs": { - "$ref": "#/definitions/externalDocs" + "location": { + "type": "string", + "description": "A runtime expression that specifies the location of the parameter value", + "pattern": "^\\$message\\.(header|payload)#(\\/(([^\\/~])|(~[01]))*)*" }, - "operationId": { - "type": "string" + "$ref": { + "$ref": "#/definitions/ReferenceObject" + } + } + }, + "parameters": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/parameter" + } + ] + }, + "description": "JSON objects describing re-usable channel parameters." + }, + "tag": { + "type": "object", + "additionalProperties": false, + "required": [ + "name" + ], + "properties": { + "name": { + "type": "string" }, - "bindings": { - "$ref": "#/definitions/bindingsObject" + "description": { + "type": "string" }, - "message": { - "$ref": "#/definitions/message" + "externalDocs": { + "$ref": "#/definitions/externalDocs" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" } } }, @@ -798,400 +727,141 @@ } } }, - "tag": { + "correlationId": { "type": "object", - "additionalProperties": false, "required": [ - "name" + "location" ], + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, "properties": { - "name": { - "type": "string" - }, "description": { - "type": "string" + "type": "string", + "description": "A optional description of the correlation ID. GitHub Flavored Markdown is allowed." }, - "externalDocs": { - "$ref": "#/definitions/externalDocs" + "location": { + "type": "string", + "description": "A runtime expression that specifies the location of the correlation ID", + "pattern": "^\\$message\\.(header|payload)#(\\/(([^\\/~])|(~[01]))*)*" } - }, + } + }, + "messageTrait": { + "type": "object", + "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { "$ref": "#/definitions/specificationExtension" } - } - }, - "message": { - "oneOf": [ - { - "$ref": "#/definitions/Reference" + }, + "properties": { + "schemaFormat": { + "type": "string" }, - { - "oneOf": [ + "contentType": { + "type": "string" + }, + "headers": { + "allOf": [ + { + "$ref": "#/definitions/schema" + }, { - "type": "object", - "required": [ - "oneOf" - ], - "additionalProperties": false, "properties": { - "oneOf": { - "type": "array", - "items": { - "$ref": "#/definitions/message" - } + "type": { + "const": "object" } } + } + ] + }, + "correlationId": { + "oneOf": [ + { + "$ref": "#/definitions/Reference" }, { - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "properties": { - "schemaFormat": { - "type": "string" - }, - "contentType": { - "type": "string" - }, - "headers": { - "allOf": [ - { - "$ref": "#/definitions/schema" - }, - { - "properties": { - "type": { - "const": "object" - } - } - } - ] - }, - "payload": {}, - "correlationId": { - "oneOf": [ - { - "$ref": "#/definitions/Reference" - }, - { - "$ref": "#/definitions/correlationId" - } - ] - }, - "tags": { - "type": "array", - "items": { - "$ref": "#/definitions/tag" - }, - "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." - }, - "externalDocs": { - "$ref": "#/definitions/externalDocs" - }, - "deprecated": { - "type": "boolean", - "default": false - }, - "examples": { - "type": "array", - "items": { - "type": "object", - "additionalProperties": false, - "properties": { - "headers": { - "type": "object" - }, - "payload": {} - } - } - }, - "bindings": { - "$ref": "#/definitions/bindingsObject" - }, - "traits": { - "type": "array", - "items": { - "oneOf": [ - { - "$ref": "#/definitions/Reference" - }, - { - "$ref": "#/definitions/messageTrait" - } - ] - } - } - }, - "allOf": [ - { - "if": { - "not": { - "required": [ - "schemaFormat" - ] - } - }, - "then": { - "properties": { - "payload": { - "$ref": "#/definitions/schema" - } - } - } - }, - { - "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" - ] - } - } - }, - "then": { - "properties": { - "payload": { - "$ref": "#/definitions/schema" - } - } - } - }, - { - "if": { - "required": [ - "schemaFormat" - ], - "properties": { - "schemaFormat": { - "enum": [ - "application/schema+json;version=draft-07", - "application/schema+yaml;version=draft-07" - ] - } - } - }, - "then": { - "properties": { - "payload": { - "$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": { - "payload": { - "$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": { - "payload": { - "$ref": "#/definitions/avroSchema_v1" - } - } - } - } - ] - } - ] - } - ] - }, - "correlationId": { - "type": "object", - "required": [ - "location" - ], - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "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]))*)*" - } - } - }, - "messageTrait": { - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "properties": { - "schemaFormat": { - "type": "string" - }, - "contentType": { - "type": "string" - }, - "headers": { - "allOf": [ - { - "$ref": "#/definitions/schema" - }, - { - "properties": { - "type": { - "const": "object" - } - } - } - ] - }, - "correlationId": { - "oneOf": [ - { - "$ref": "#/definitions/Reference" - }, - { - "$ref": "#/definitions/correlationId" - } - ] - }, - "tags": { - "type": "array", - "items": { - "$ref": "#/definitions/tag" - }, - "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." - }, - "externalDocs": { - "$ref": "#/definitions/externalDocs" - }, - "deprecated": { - "type": "boolean", - "default": false - }, - "examples": { - "type": "array", - "items": { - "type": "object" - } - }, - "bindings": { - "$ref": "#/definitions/bindingsObject" - } - } - }, - "openapiSchema_3_0": { - "type": "object", - "definitions": { - "ExternalDocumentation": { - "type": "object", - "required": [ - "url" - ], - "properties": { - "description": { - "type": "string" - }, - "url": { - "type": "string", - "format": "uri-reference" - } - }, - "patternProperties": { - "^x-": {} - }, - "additionalProperties": false - }, - "Discriminator": { - "type": "object", - "required": [ - "propertyName" - ], - "properties": { - "propertyName": { - "type": "string" - }, - "mapping": { + "$ref": "#/definitions/correlationId" + } + ] + }, + "tags": { + "type": "array", + "items": { + "$ref": "#/definitions/tag" + }, + "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." + }, + "externalDocs": { + "$ref": "#/definitions/externalDocs" + }, + "deprecated": { + "type": "boolean", + "default": false + }, + "examples": { + "type": "array", + "items": { + "type": "object" + } + }, + "bindings": { + "$ref": "#/definitions/bindingsObject" + } + } + }, + "openapiSchema_3_0": { + "type": "object", + "definitions": { + "ExternalDocumentation": { + "type": "object", + "required": [ + "url" + ], + "properties": { + "description": { + "type": "string" + }, + "url": { + "type": "string", + "format": "uri-reference" + } + }, + "patternProperties": { + "^x-": {} + }, + "additionalProperties": false + }, + "Discriminator": { + "type": "object", + "required": [ + "propertyName" + ], + "properties": { + "propertyName": { + "type": "string" + }, + "mapping": { "type": "object", "additionalProperties": { "type": "string" @@ -1594,27 +1264,130 @@ "$ref": "#/definitions/avroSchema_v1/definitions/name" } }, - "fields": { - "type": "array", - "items": { - "$ref": "#/definitions/avroSchema_v1/definitions/avroField" - } + "fields": { + "type": "array", + "items": { + "$ref": "#/definitions/avroSchema_v1/definitions/avroField" + } + } + }, + "required": [ + "type", + "name", + "fields" + ] + }, + "avroEnum": { + "title": "Enum", + "description": "An enumeration", + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "enum" + }, + "name": { + "$ref": "#/definitions/avroSchema_v1/definitions/name" + }, + "namespace": { + "$ref": "#/definitions/avroSchema_v1/definitions/namespace" + }, + "doc": { + "type": "string" + }, + "aliases": { + "type": "array", + "items": { + "$ref": "#/definitions/avroSchema_v1/definitions/name" + } + }, + "symbols": { + "type": "array", + "items": { + "$ref": "#/definitions/avroSchema_v1/definitions/name" + } + } + }, + "required": [ + "type", + "name", + "symbols" + ] + }, + "avroArray": { + "title": "Array", + "description": "An array", + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "array" + }, + "name": { + "$ref": "#/definitions/avroSchema_v1/definitions/name" + }, + "namespace": { + "$ref": "#/definitions/avroSchema_v1/definitions/namespace" + }, + "doc": { + "type": "string" + }, + "aliases": { + "type": "array", + "items": { + "$ref": "#/definitions/avroSchema_v1/definitions/name" + } + }, + "items": { + "$ref": "#/definitions/avroSchema_v1/definitions/types" + } + }, + "required": [ + "type", + "items" + ] + }, + "avroMap": { + "title": "Map", + "description": "A map of values", + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "map" + }, + "name": { + "$ref": "#/definitions/avroSchema_v1/definitions/name" + }, + "namespace": { + "$ref": "#/definitions/avroSchema_v1/definitions/namespace" + }, + "doc": { + "type": "string" + }, + "aliases": { + "type": "array", + "items": { + "$ref": "#/definitions/avroSchema_v1/definitions/name" + } + }, + "values": { + "$ref": "#/definitions/avroSchema_v1/definitions/types" } }, "required": [ "type", - "name", - "fields" + "values" ] }, - "avroEnum": { - "title": "Enum", - "description": "An enumeration", + "avroFixed": { + "title": "Fixed", + "description": "A fixed sized array of bytes", "type": "object", "properties": { "type": { "type": "string", - "const": "enum" + "const": "fixed" }, "name": { "$ref": "#/definitions/avroSchema_v1/definitions/name" @@ -1631,139 +1404,320 @@ "$ref": "#/definitions/avroSchema_v1/definitions/name" } }, - "symbols": { - "type": "array", - "items": { - "$ref": "#/definitions/avroSchema_v1/definitions/name" + "size": { + "type": "number" + } + }, + "required": [ + "type", + "name", + "size" + ] + }, + "name": { + "type": "string", + "pattern": "^[A-Za-z_][A-Za-z0-9_]*$" + }, + "namespace": { + "type": "string", + "pattern": "^([A-Za-z_][A-Za-z0-9_]*(\\.[A-Za-z_][A-Za-z0-9_]*)*)*$" + } + }, + "description": "Json-Schema definition for Avro AVSC files.", + "oneOf": [ + { + "$ref": "#/definitions/avroSchema_v1/definitions/avroSchema" + } + ], + "title": "Avro Schema Definition" + }, + "message": { + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "oneOf": [ + { + "type": "object", + "required": [ + "oneOf" + ], + "additionalProperties": false, + "properties": { + "oneOf": { + "type": "array", + "items": { + "$ref": "#/definitions/message" + } + } } + }, + { + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, + "properties": { + "schemaFormat": { + "type": "string" + }, + "contentType": { + "type": "string" + }, + "headers": { + "allOf": [ + { + "$ref": "#/definitions/schema" + }, + { + "properties": { + "type": { + "const": "object" + } + } + } + ] + }, + "payload": {}, + "correlationId": { + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/correlationId" + } + ] + }, + "tags": { + "type": "array", + "items": { + "$ref": "#/definitions/tag" + }, + "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." + }, + "externalDocs": { + "$ref": "#/definitions/externalDocs" + }, + "deprecated": { + "type": "boolean", + "default": false + }, + "examples": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "properties": { + "headers": { + "type": "object" + }, + "payload": {} + } + } + }, + "bindings": { + "$ref": "#/definitions/bindingsObject" + }, + "traits": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/messageTrait" + } + ] + } + } + }, + "allOf": [ + { + "if": { + "not": { + "required": [ + "schemaFormat" + ] + } + }, + "then": { + "properties": { + "payload": { + "$ref": "#/definitions/schema" + } + } + } + }, + { + "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" + ] + } + } + }, + "then": { + "properties": { + "payload": { + "$ref": "#/definitions/schema" + } + } + } + }, + { + "if": { + "required": [ + "schemaFormat" + ], + "properties": { + "schemaFormat": { + "enum": [ + "application/schema+json;version=draft-07", + "application/schema+yaml;version=draft-07" + ] + } + } + }, + "then": { + "properties": { + "payload": { + "$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": { + "payload": { + "$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": { + "payload": { + "$ref": "#/definitions/avroSchema_v1" + } + } + } + } + ] } - }, - "required": [ - "type", - "name", - "symbols" ] - }, - "avroArray": { - "title": "Array", - "description": "An array", - "type": "object", - "properties": { - "type": { - "type": "string", - "const": "array" - }, - "name": { - "$ref": "#/definitions/avroSchema_v1/definitions/name" - }, - "namespace": { - "$ref": "#/definitions/avroSchema_v1/definitions/namespace" - }, - "doc": { - "type": "string" - }, - "aliases": { - "type": "array", - "items": { - "$ref": "#/definitions/avroSchema_v1/definitions/name" + } + ] + }, + "operation": { + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, + "properties": { + "traits": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/operationTrait" } - }, - "items": { - "$ref": "#/definitions/avroSchema_v1/definitions/types" - } - }, - "required": [ - "type", - "items" - ] + ] + } }, - "avroMap": { - "title": "Map", - "description": "A map of values", - "type": "object", - "properties": { - "type": { - "type": "string", - "const": "map" - }, - "name": { - "$ref": "#/definitions/avroSchema_v1/definitions/name" - }, - "namespace": { - "$ref": "#/definitions/avroSchema_v1/definitions/namespace" - }, - "doc": { - "type": "string" - }, - "aliases": { - "type": "array", - "items": { - "$ref": "#/definitions/avroSchema_v1/definitions/name" - } - }, - "values": { - "$ref": "#/definitions/avroSchema_v1/definitions/types" - } - }, - "required": [ - "type", - "values" - ] + "summary": { + "type": "string" }, - "avroFixed": { - "title": "Fixed", - "description": "A fixed sized array of bytes", - "type": "object", - "properties": { - "type": { - "type": "string", - "const": "fixed" - }, - "name": { - "$ref": "#/definitions/avroSchema_v1/definitions/name" - }, - "namespace": { - "$ref": "#/definitions/avroSchema_v1/definitions/namespace" - }, - "doc": { - "type": "string" - }, - "aliases": { - "type": "array", - "items": { - "$ref": "#/definitions/avroSchema_v1/definitions/name" - } - }, - "size": { - "type": "number" - } + "description": { + "type": "string" + }, + "tags": { + "type": "array", + "items": { + "$ref": "#/definitions/tag" }, - "required": [ - "type", - "name", - "size" - ] + "uniqueItems": true }, - "name": { - "type": "string", - "pattern": "^[A-Za-z_][A-Za-z0-9_]*$" + "externalDocs": { + "$ref": "#/definitions/externalDocs" }, - "namespace": { - "type": "string", - "pattern": "^([A-Za-z_][A-Za-z0-9_]*(\\.[A-Za-z_][A-Za-z0-9_]*)*)*$" - } - }, - "description": "Json-Schema definition for Avro AVSC files.", - "oneOf": [ - { - "$ref": "#/definitions/avroSchema_v1/definitions/avroSchema" + "operationId": { + "type": "string" + }, + "bindings": { + "$ref": "#/definitions/bindingsObject" + }, + "message": { + "$ref": "#/definitions/message" } - ], - "title": "Avro Schema Definition" + } }, - "components": { + "channelItem": { "type": "object", - "description": "An object to hold a set of reusable objects for different aspects of the AsyncAPI Specification.", "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { @@ -1771,83 +1725,42 @@ } }, "properties": { - "schemas": { - "$ref": "#/definitions/schemas" - }, - "messages": { - "$ref": "#/definitions/messages" - }, - "securitySchemes": { - "type": "object", - "patternProperties": { - "^[\\w\\d\\.\\-_]+$": { - "oneOf": [ - { - "$ref": "#/definitions/Reference" - }, - { - "$ref": "#/definitions/SecurityScheme" - } - ] - } - } + "$ref": { + "$ref": "#/definitions/ReferenceObject" }, "parameters": { "$ref": "#/definitions/parameters" }, - "correlationIds": { - "type": "object", - "patternProperties": { - "^[\\w\\d\\.\\-_]+$": { - "oneOf": [ - { - "$ref": "#/definitions/Reference" - }, - { - "$ref": "#/definitions/correlationId" - } - ] - } - } - }, - "operationTraits": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/operationTrait" - } - }, - "messageTraits": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/messageTrait" - } - }, - "serverBindings": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/bindingsObject" - } + "description": { + "type": "string", + "description": "A description of the channel." }, - "channelBindings": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/bindingsObject" - } + "publish": { + "$ref": "#/definitions/operation" }, - "operationBindings": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/bindingsObject" - } + "subscribe": { + "$ref": "#/definitions/operation" }, - "messageBindings": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/bindingsObject" - } + "deprecated": { + "type": "boolean", + "default": false + }, + "bindings": { + "$ref": "#/definitions/bindingsObject" } } }, + "channels": { + "type": "object", + "propertyNames": { + "type": "string", + "format": "uri-template", + "minLength": 1 + }, + "additionalProperties": { + "$ref": "#/definitions/channelItem" + } + }, "schemas": { "type": "object", "additionalProperties": { @@ -1862,34 +1775,6 @@ }, "description": "JSON objects describing the messages being consumed and produced by the API." }, - "SecurityScheme": { - "oneOf": [ - { - "$ref": "#/definitions/userPassword" - }, - { - "$ref": "#/definitions/apiKey" - }, - { - "$ref": "#/definitions/X509" - }, - { - "$ref": "#/definitions/symmetricEncryption" - }, - { - "$ref": "#/definitions/asymmetricEncryption" - }, - { - "$ref": "#/definitions/HTTPSecurityScheme" - }, - { - "$ref": "#/definitions/oauth2Flows" - }, - { - "$ref": "#/definitions/openIdConnect" - } - ] - }, "userPassword": { "type": "object", "required": [ @@ -2013,19 +1898,6 @@ }, "additionalProperties": false }, - "HTTPSecurityScheme": { - "oneOf": [ - { - "$ref": "#/definitions/NonBearerHTTPSecurityScheme" - }, - { - "$ref": "#/definitions/BearerHTTPSecurityScheme" - }, - { - "$ref": "#/definitions/APIKeyHTTPSecurityScheme" - } - ] - }, "NonBearerHTTPSecurityScheme": { "not": { "type": "object", @@ -2133,6 +2005,51 @@ }, "additionalProperties": false }, + "HTTPSecurityScheme": { + "oneOf": [ + { + "$ref": "#/definitions/NonBearerHTTPSecurityScheme" + }, + { + "$ref": "#/definitions/BearerHTTPSecurityScheme" + }, + { + "$ref": "#/definitions/APIKeyHTTPSecurityScheme" + } + ] + }, + "oauth2Scopes": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "oauth2Flow": { + "type": "object", + "properties": { + "authorizationUrl": { + "type": "string", + "format": "uri" + }, + "tokenUrl": { + "type": "string", + "format": "uri" + }, + "refreshUrl": { + "type": "string", + "format": "uri" + }, + "scopes": { + "$ref": "#/definitions/oauth2Scopes" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, + "additionalProperties": false + }, "oauth2Flows": { "type": "object", "required": [ @@ -2236,38 +2153,6 @@ } } }, - "oauth2Flow": { - "type": "object", - "properties": { - "authorizationUrl": { - "type": "string", - "format": "uri" - }, - "tokenUrl": { - "type": "string", - "format": "uri" - }, - "refreshUrl": { - "type": "string", - "format": "uri" - }, - "scopes": { - "$ref": "#/definitions/oauth2Scopes" - } - }, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "additionalProperties": false - }, - "oauth2Scopes": { - "type": "object", - "additionalProperties": { - "type": "string" - } - }, "openIdConnect": { "type": "object", "required": [ @@ -2295,6 +2180,121 @@ } }, "additionalProperties": false + }, + "SecurityScheme": { + "oneOf": [ + { + "$ref": "#/definitions/userPassword" + }, + { + "$ref": "#/definitions/apiKey" + }, + { + "$ref": "#/definitions/X509" + }, + { + "$ref": "#/definitions/symmetricEncryption" + }, + { + "$ref": "#/definitions/asymmetricEncryption" + }, + { + "$ref": "#/definitions/HTTPSecurityScheme" + }, + { + "$ref": "#/definitions/oauth2Flows" + }, + { + "$ref": "#/definitions/openIdConnect" + } + ] + }, + "components": { + "type": "object", + "description": "An object to hold a set of reusable objects for different aspects of the AsyncAPI Specification.", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, + "properties": { + "schemas": { + "$ref": "#/definitions/schemas" + }, + "messages": { + "$ref": "#/definitions/messages" + }, + "securitySchemes": { + "type": "object", + "patternProperties": { + "^[\\w\\d\\.\\-_]+$": { + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/SecurityScheme" + } + ] + } + } + }, + "parameters": { + "$ref": "#/definitions/parameters" + }, + "correlationIds": { + "type": "object", + "patternProperties": { + "^[\\w\\d\\.\\-_]+$": { + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/correlationId" + } + ] + } + } + }, + "operationTraits": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/operationTrait" + } + }, + "messageTraits": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/messageTrait" + } + }, + "serverBindings": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/bindingsObject" + } + }, + "channelBindings": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/bindingsObject" + } + }, + "operationBindings": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/bindingsObject" + } + }, + "messageBindings": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/bindingsObject" + } + } + } } }, "description": "!!Auto generated!! \n Do not manually edit. " diff --git a/schemas/2.0.0.json b/schemas/2.0.0.json index ddf9a1d7..dee2aff3 100644 --- a/schemas/2.0.0.json +++ b/schemas/2.0.0.json @@ -1,6 +1,5 @@ { - "$id": "http://asyncapi.com/definitions/2.0.0/asyncapi.json", - "$schema": "http://json-schema.org/draft-07/schema", + "$schema": "http://json-schema.org/draft-07/schema#", "title": "AsyncAPI 2.0.0 schema.", "type": "object", "required": [ @@ -57,54 +56,14 @@ } }, "definitions": { - "http://asyncapi.com/definitions/2.0.0/specificationExtension.json": { - "$id": "http://asyncapi.com/definitions/2.0.0/specificationExtension.json", + "specificationExtension.json": { + "$id": "specificationExtension.json", "description": "Any property starting with x- is valid.", "additionalProperties": true, "additionalItems": true }, - "http://asyncapi.com/definitions/2.0.0/info.json": { - "$id": "http://asyncapi.com/definitions/2.0.0/info.json", - "type": "object", - "description": "General information about the API.", - "required": [ - "version", - "title" - ], - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "http://asyncapi.com/definitions/2.0.0/specificationExtension.json" - } - }, - "properties": { - "title": { - "type": "string", - "description": "A unique and precise title of the API." - }, - "version": { - "type": "string", - "description": "A semantic version number of the API." - }, - "description": { - "type": "string", - "description": "A longer description of the API. Should be different from the title. CommonMark is allowed." - }, - "termsOfService": { - "type": "string", - "description": "A URL to the Terms of Service for the API. MUST be in the format of a URL.", - "format": "uri" - }, - "contact": { - "$ref": "http://asyncapi.com/definitions/2.0.0/contact.json" - }, - "license": { - "$ref": "http://asyncapi.com/definitions/2.0.0/license.json" - } - } - }, - "http://asyncapi.com/definitions/2.0.0/contact.json": { - "$id": "http://asyncapi.com/definitions/2.0.0/contact.json", + "contact.json": { + "$id": "contact.json", "type": "object", "description": "Contact information for the owners of the API.", "additionalProperties": false, @@ -130,8 +89,8 @@ } } }, - "http://asyncapi.com/definitions/2.0.0/license.json": { - "$id": "http://asyncapi.com/definitions/2.0.0/license.json", + "license.json": { + "$id": "license.json", "type": "object", "required": [ "name" @@ -154,13 +113,13 @@ } } }, - "http://asyncapi.com/definitions/2.0.0/server.json": { - "$id": "http://asyncapi.com/definitions/2.0.0/server.json", + "info.json": { + "$id": "info.json", "type": "object", - "description": "An object representing a Server.", + "description": "General information about the API.", "required": [ - "url", - "protocol" + "version", + "title" ], "additionalProperties": false, "patternProperties": { @@ -169,42 +128,33 @@ } }, "properties": { - "url": { - "type": "string" - }, - "description": { - "type": "string" + "title": { + "type": "string", + "description": "A unique and precise title of the API." }, - "protocol": { + "version": { "type": "string", - "description": "The transfer protocol." + "description": "A semantic version number of the API." }, - "protocolVersion": { - "type": "string" + "description": { + "type": "string", + "description": "A longer description of the API. Should be different from the title. CommonMark is allowed." }, - "variables": { - "$ref": "http://asyncapi.com/definitions/2.0.0/serverVariables.json" + "termsOfService": { + "type": "string", + "description": "A URL to the Terms of Service for the API. MUST be in the format of a URL.", + "format": "uri" }, - "security": { - "type": "array", - "items": { - "$ref": "http://asyncapi.com/definitions/2.0.0/SecurityRequirement.json" - } + "contact": { + "$ref": "http://asyncapi.com/definitions/2.0.0/contact.json" }, - "bindings": { - "$ref": "http://asyncapi.com/definitions/2.0.0/bindingsObject.json" + "license": { + "$ref": "http://asyncapi.com/definitions/2.0.0/license.json" } } }, - "http://asyncapi.com/definitions/2.0.0/serverVariables.json": { - "$id": "http://asyncapi.com/definitions/2.0.0/serverVariables.json", - "type": "object", - "additionalProperties": { - "$ref": "http://asyncapi.com/definitions/2.0.0/serverVariable.json" - } - }, - "http://asyncapi.com/definitions/2.0.0/serverVariable.json": { - "$id": "http://asyncapi.com/definitions/2.0.0/serverVariable.json", + "serverVariable.json": { + "$id": "serverVariable.json", "type": "object", "description": "An object representing a Server Variable for server URL template substitution.", "additionalProperties": false, @@ -235,8 +185,15 @@ } } }, - "http://asyncapi.com/definitions/2.0.0/SecurityRequirement.json": { - "$id": "http://asyncapi.com/definitions/2.0.0/SecurityRequirement.json", + "serverVariables.json": { + "$id": "serverVariables.json", + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/2.0.0/serverVariable.json" + } + }, + "SecurityRequirement.json": { + "$id": "SecurityRequirement.json", "type": "object", "additionalProperties": { "type": "array", @@ -246,8 +203,8 @@ "uniqueItems": true } }, - "http://asyncapi.com/definitions/2.0.0/bindingsObject.json": { - "$id": "http://asyncapi.com/definitions/2.0.0/bindingsObject.json", + "bindingsObject.json": { + "$id": "bindingsObject.json", "type": "object", "additionalProperties": true, "properties": { @@ -266,21 +223,14 @@ "redis": {} } }, - "http://asyncapi.com/definitions/2.0.0/channels.json": { - "$id": "http://asyncapi.com/definitions/2.0.0/channels.json", - "type": "object", - "propertyNames": { - "type": "string", - "format": "uri-template", - "minLength": 1 - }, - "additionalProperties": { - "$ref": "http://asyncapi.com/definitions/2.0.0/channelItem.json" - } - }, - "http://asyncapi.com/definitions/2.0.0/channelItem.json": { - "$id": "http://asyncapi.com/definitions/2.0.0/channelItem.json", + "server.json": { + "$id": "server.json", "type": "object", + "description": "An object representing a Server.", + "required": [ + "url", + "protocol" + ], "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { @@ -288,53 +238,40 @@ } }, "properties": { - "$ref": { - "$ref": "http://asyncapi.com/definitions/2.0.0/ReferenceObject.json" - }, - "parameters": { - "$ref": "http://asyncapi.com/definitions/2.0.0/parameters.json" + "url": { + "type": "string" }, "description": { + "type": "string" + }, + "protocol": { "type": "string", - "description": "A description of the channel." + "description": "The transfer protocol." }, - "publish": { - "$ref": "http://asyncapi.com/definitions/2.0.0/operation.json" + "protocolVersion": { + "type": "string" }, - "subscribe": { - "$ref": "http://asyncapi.com/definitions/2.0.0/operation.json" + "variables": { + "$ref": "http://asyncapi.com/definitions/2.0.0/serverVariables.json" }, - "deprecated": { - "type": "boolean", - "default": false + "security": { + "type": "array", + "items": { + "$ref": "http://asyncapi.com/definitions/2.0.0/SecurityRequirement.json" + } }, "bindings": { "$ref": "http://asyncapi.com/definitions/2.0.0/bindingsObject.json" } } }, - "http://asyncapi.com/definitions/2.0.0/ReferenceObject.json": { - "$id": "http://asyncapi.com/definitions/2.0.0/ReferenceObject.json", + "ReferenceObject.json": { + "$id": "ReferenceObject.json", "type": "string", "format": "uri-reference" }, - "http://asyncapi.com/definitions/2.0.0/parameters.json": { - "$id": "http://asyncapi.com/definitions/2.0.0/parameters.json", - "type": "object", - "additionalProperties": { - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/2.0.0/Reference.json" - }, - { - "$ref": "http://asyncapi.com/definitions/2.0.0/parameter.json" - } - ] - }, - "description": "JSON objects describing re-usable channel parameters." - }, - "http://asyncapi.com/definitions/2.0.0/Reference.json": { - "$id": "http://asyncapi.com/definitions/2.0.0/Reference.json", + "Reference.json": { + "$id": "Reference.json", "type": "object", "required": [ "$ref" @@ -345,190 +282,67 @@ } } }, - "http://asyncapi.com/definitions/2.0.0/parameter.json": { - "$id": "http://asyncapi.com/definitions/2.0.0/parameter.json", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "http://asyncapi.com/definitions/2.0.0/specificationExtension.json" + "http://json-schema.org/draft-07/schema": { + "$id": "http://json-schema.org/draft-07/schema", + "title": "Core schema meta-schema", + "definitions": { + "schemaArray": { + "type": "array", + "minItems": 1, + "items": { + "$ref": "#" + } + }, + "nonNegativeInteger": { + "type": "integer", + "minimum": 0 + }, + "nonNegativeIntegerDefault0": { + "allOf": [ + { + "$ref": "#/definitions/nonNegativeInteger" + }, + { + "default": 0 + } + ] + }, + "simpleTypes": { + "enum": [ + "array", + "boolean", + "integer", + "null", + "number", + "object", + "string" + ] + }, + "stringArray": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true, + "default": [] } }, + "type": [ + "object", + "boolean" + ], "properties": { - "description": { + "$id": { "type": "string", - "description": "A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed." - }, - "schema": { - "$ref": "http://asyncapi.com/definitions/2.0.0/schema.json" + "format": "uri-reference" }, - "location": { + "$schema": { "type": "string", - "description": "A runtime expression that specifies the location of the parameter value", - "pattern": "^\\$message\\.(header|payload)#(\\/(([^\\/~])|(~[01]))*)*" + "format": "uri" }, "$ref": { - "$ref": "http://asyncapi.com/definitions/2.0.0/ReferenceObject.json" - } - } - }, - "http://asyncapi.com/definitions/2.0.0/schema.json": { - "$id": "http://asyncapi.com/definitions/2.0.0/schema.json", - "allOf": [ - { - "$ref": "http://json-schema.org/draft-07/schema#" - }, - { - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "http://asyncapi.com/definitions/2.0.0/specificationExtension.json" - } - }, - "properties": { - "additionalProperties": { - "anyOf": [ - { - "$ref": "http://asyncapi.com/definitions/2.0.0/schema.json" - }, - { - "type": "boolean" - } - ], - "default": {} - }, - "items": { - "anyOf": [ - { - "$ref": "http://asyncapi.com/definitions/2.0.0/schema.json" - }, - { - "type": "array", - "minItems": 1, - "items": { - "$ref": "http://asyncapi.com/definitions/2.0.0/schema.json" - } - } - ], - "default": {} - }, - "allOf": { - "type": "array", - "minItems": 1, - "items": { - "$ref": "http://asyncapi.com/definitions/2.0.0/schema.json" - } - }, - "oneOf": { - "type": "array", - "minItems": 1, - "items": { - "$ref": "http://asyncapi.com/definitions/2.0.0/schema.json" - } - }, - "anyOf": { - "type": "array", - "minItems": 1, - "items": { - "$ref": "http://asyncapi.com/definitions/2.0.0/schema.json" - } - }, - "not": { - "$ref": "http://asyncapi.com/definitions/2.0.0/schema.json" - }, - "properties": { - "type": "object", - "additionalProperties": { - "$ref": "http://asyncapi.com/definitions/2.0.0/schema.json" - }, - "default": {} - }, - "patternProperties": { - "type": "object", - "additionalProperties": { - "$ref": "http://asyncapi.com/definitions/2.0.0/schema.json" - }, - "default": {} - }, - "propertyNames": { - "$ref": "http://asyncapi.com/definitions/2.0.0/schema.json" - }, - "contains": { - "$ref": "http://asyncapi.com/definitions/2.0.0/schema.json" - }, - "discriminator": { - "type": "string" - }, - "externalDocs": { - "$ref": "http://asyncapi.com/definitions/2.0.0/externalDocs.json" - }, - "deprecated": { - "type": "boolean", - "default": false - } - } - } - ] - }, - "http://json-schema.org/draft-07/schema": { - "$id": "http://json-schema.org/draft-07/schema", - "title": "Core schema meta-schema", - "definitions": { - "schemaArray": { - "type": "array", - "minItems": 1, - "items": { - "$ref": "#" - } - }, - "nonNegativeInteger": { - "type": "integer", - "minimum": 0 - }, - "nonNegativeIntegerDefault0": { - "allOf": [ - { - "$ref": "#/definitions/nonNegativeInteger" - }, - { - "default": 0 - } - ] - }, - "simpleTypes": { - "enum": [ - "array", - "boolean", - "integer", - "null", - "number", - "object", - "string" - ] - }, - "stringArray": { - "type": "array", - "items": { - "type": "string" - }, - "uniqueItems": true, - "default": [] - } - }, - "type": [ - "object", - "boolean" - ], - "properties": { - "$id": { - "type": "string", - "format": "uri-reference" - }, - "$schema": { - "type": "string", - "format": "uri" - }, - "$ref": { - "type": "string", - "format": "uri-reference" + "type": "string", + "format": "uri-reference" }, "$comment": { "type": "string" @@ -712,8 +526,8 @@ }, "default": true }, - "http://asyncapi.com/definitions/2.0.0/externalDocs.json": { - "$id": "http://asyncapi.com/definitions/2.0.0/externalDocs.json", + "externalDocs.json": { + "$id": "externalDocs.json", "type": "object", "additionalProperties": false, "description": "information about external documentation", @@ -735,9 +549,105 @@ } } }, - "http://asyncapi.com/definitions/2.0.0/operation.json": { - "$id": "http://asyncapi.com/definitions/2.0.0/operation.json", - "type": "object", + "schema.json": { + "$id": "schema.json", + "allOf": [ + { + "$ref": "http://json-schema.org/draft-07/schema#" + }, + { + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.0.0/specificationExtension.json" + } + }, + "properties": { + "additionalProperties": { + "anyOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.0.0/schema.json" + }, + { + "type": "boolean" + } + ], + "default": {} + }, + "items": { + "anyOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.0.0/schema.json" + }, + { + "type": "array", + "minItems": 1, + "items": { + "$ref": "http://asyncapi.com/definitions/2.0.0/schema.json" + } + } + ], + "default": {} + }, + "allOf": { + "type": "array", + "minItems": 1, + "items": { + "$ref": "http://asyncapi.com/definitions/2.0.0/schema.json" + } + }, + "oneOf": { + "type": "array", + "minItems": 1, + "items": { + "$ref": "http://asyncapi.com/definitions/2.0.0/schema.json" + } + }, + "anyOf": { + "type": "array", + "minItems": 1, + "items": { + "$ref": "http://asyncapi.com/definitions/2.0.0/schema.json" + } + }, + "not": { + "$ref": "http://asyncapi.com/definitions/2.0.0/schema.json" + }, + "properties": { + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/2.0.0/schema.json" + }, + "default": {} + }, + "patternProperties": { + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/2.0.0/schema.json" + }, + "default": {} + }, + "propertyNames": { + "$ref": "http://asyncapi.com/definitions/2.0.0/schema.json" + }, + "contains": { + "$ref": "http://asyncapi.com/definitions/2.0.0/schema.json" + }, + "discriminator": { + "type": "string" + }, + "externalDocs": { + "$ref": "http://asyncapi.com/definitions/2.0.0/externalDocs.json" + }, + "deprecated": { + "type": "boolean", + "default": false + } + } + } + ] + }, + "parameter.json": { + "$id": "parameter.json", "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { @@ -745,52 +655,68 @@ } }, "properties": { - "traits": { - "type": "array", - "items": { - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/2.0.0/Reference.json" - }, - { - "$ref": "http://asyncapi.com/definitions/2.0.0/operationTrait.json" - } - ] - } - }, - "summary": { - "type": "string" - }, "description": { - "type": "string" - }, - "tags": { - "type": "array", - "items": { - "$ref": "http://asyncapi.com/definitions/2.0.0/tag.json" - }, - "uniqueItems": true - }, - "externalDocs": { - "$ref": "http://asyncapi.com/definitions/2.0.0/externalDocs.json" + "type": "string", + "description": "A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed." }, - "operationId": { - "type": "string" + "schema": { + "$ref": "http://asyncapi.com/definitions/2.0.0/schema.json" }, - "bindings": { - "$ref": "http://asyncapi.com/definitions/2.0.0/bindingsObject.json" + "location": { + "type": "string", + "description": "A runtime expression that specifies the location of the parameter value", + "pattern": "^\\$message\\.(header|payload)#(\\/(([^\\/~])|(~[01]))*)*" }, - "message": { - "$ref": "http://asyncapi.com/definitions/2.0.0/message.json" + "$ref": { + "$ref": "http://asyncapi.com/definitions/2.0.0/ReferenceObject.json" } } }, - "http://asyncapi.com/definitions/2.0.0/operationTrait.json": { - "$id": "http://asyncapi.com/definitions/2.0.0/operationTrait.json", + "parameters.json": { + "$id": "parameters.json", "type": "object", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { + "additionalProperties": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.0.0/parameter.json" + } + ] + }, + "description": "JSON objects describing re-usable channel parameters." + }, + "tag.json": { + "$id": "tag.json", + "type": "object", + "additionalProperties": false, + "required": [ + "name" + ], + "properties": { + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "externalDocs": { + "$ref": "http://asyncapi.com/definitions/2.0.0/externalDocs.json" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.0.0/specificationExtension.json" + } + } + }, + "operationTrait.json": { + "$id": "operationTrait.json", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { "$ref": "http://asyncapi.com/definitions/2.0.0/specificationExtension.json" } }, @@ -819,405 +745,144 @@ } } }, - "http://asyncapi.com/definitions/2.0.0/tag.json": { - "$id": "http://asyncapi.com/definitions/2.0.0/tag.json", + "correlationId.json": { + "$id": "correlationId.json", "type": "object", - "additionalProperties": false, "required": [ - "name" + "location" ], + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.0.0/specificationExtension.json" + } + }, "properties": { - "name": { - "type": "string" - }, "description": { - "type": "string" + "type": "string", + "description": "A optional description of the correlation ID. GitHub Flavored Markdown is allowed." }, - "externalDocs": { - "$ref": "http://asyncapi.com/definitions/2.0.0/externalDocs.json" + "location": { + "type": "string", + "description": "A runtime expression that specifies the location of the correlation ID", + "pattern": "^\\$message\\.(header|payload)#(\\/(([^\\/~])|(~[01]))*)*" } - }, + } + }, + "messageTrait.json": { + "$id": "messageTrait.json", + "type": "object", + "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { "$ref": "http://asyncapi.com/definitions/2.0.0/specificationExtension.json" } - } - }, - "http://asyncapi.com/definitions/2.0.0/message.json": { - "$id": "http://asyncapi.com/definitions/2.0.0/message.json", - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/2.0.0/Reference.json" + }, + "properties": { + "schemaFormat": { + "type": "string" }, - { - "oneOf": [ + "contentType": { + "type": "string" + }, + "headers": { + "allOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.0.0/schema.json" + }, { - "type": "object", - "required": [ - "oneOf" - ], - "additionalProperties": false, "properties": { - "oneOf": { - "type": "array", - "items": { - "$ref": "http://asyncapi.com/definitions/2.0.0/message.json" - } + "type": { + "const": "object" } } + } + ] + }, + "correlationId": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.0.0/Reference.json" }, { - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "http://asyncapi.com/definitions/2.0.0/specificationExtension.json" - } - }, - "properties": { - "schemaFormat": { - "type": "string" - }, - "contentType": { - "type": "string" - }, - "headers": { - "allOf": [ - { - "$ref": "http://asyncapi.com/definitions/2.0.0/schema.json" - }, - { - "properties": { - "type": { - "const": "object" - } - } - } - ] - }, - "payload": {}, - "correlationId": { - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/2.0.0/Reference.json" - }, - { - "$ref": "http://asyncapi.com/definitions/2.0.0/correlationId.json" - } - ] - }, - "tags": { - "type": "array", - "items": { - "$ref": "http://asyncapi.com/definitions/2.0.0/tag.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." - }, - "externalDocs": { - "$ref": "http://asyncapi.com/definitions/2.0.0/externalDocs.json" - }, - "deprecated": { - "type": "boolean", - "default": false - }, - "examples": { - "type": "array", - "items": { - "type": "object", - "additionalProperties": false, - "properties": { - "headers": { - "type": "object" - }, - "payload": {} - } - } - }, - "bindings": { - "$ref": "http://asyncapi.com/definitions/2.0.0/bindingsObject.json" - }, - "traits": { - "type": "array", - "items": { - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/2.0.0/Reference.json" - }, - { - "$ref": "http://asyncapi.com/definitions/2.0.0/messageTrait.json" - } - ] - } - } - }, - "allOf": [ - { - "if": { - "not": { - "required": [ - "schemaFormat" - ] - } - }, - "then": { - "properties": { - "payload": { - "$ref": "http://asyncapi.com/definitions/2.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" - ] - } - } - }, - "then": { - "properties": { - "payload": { - "$ref": "http://asyncapi.com/definitions/2.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/2.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/2.0.0/avroSchema_v1.json" - } - } - } - } - ] - } - ] - } - ] - }, - "http://asyncapi.com/definitions/2.0.0/correlationId.json": { - "$id": "http://asyncapi.com/definitions/2.0.0/correlationId.json", - "type": "object", - "required": [ - "location" - ], - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "http://asyncapi.com/definitions/2.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/2.0.0/messageTrait.json": { - "$id": "http://asyncapi.com/definitions/2.0.0/messageTrait.json", - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "http://asyncapi.com/definitions/2.0.0/specificationExtension.json" - } - }, - "properties": { - "schemaFormat": { - "type": "string" - }, - "contentType": { - "type": "string" - }, - "headers": { - "allOf": [ - { - "$ref": "http://asyncapi.com/definitions/2.0.0/schema.json" - }, - { - "properties": { - "type": { - "const": "object" - } - } - } - ] - }, - "correlationId": { - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/2.0.0/Reference.json" - }, - { - "$ref": "http://asyncapi.com/definitions/2.0.0/correlationId.json" - } - ] - }, - "tags": { - "type": "array", - "items": { - "$ref": "http://asyncapi.com/definitions/2.0.0/tag.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." - }, - "externalDocs": { - "$ref": "http://asyncapi.com/definitions/2.0.0/externalDocs.json" - }, - "deprecated": { - "type": "boolean", - "default": false - }, - "examples": { - "type": "array", - "items": { - "type": "object" - } - }, - "bindings": { - "$ref": "http://asyncapi.com/definitions/2.0.0/bindingsObject.json" - } - } - }, - "http://asyncapi.com/definitions/2.0.0/openapiSchema_3_0.json": { - "$id": "http://asyncapi.com/definitions/2.0.0/openapiSchema_3_0.json", - "type": "object", - "definitions": { - "ExternalDocumentation": { - "type": "object", - "required": [ - "url" - ], - "properties": { - "description": { - "type": "string" - }, - "url": { - "type": "string", - "format": "uri-reference" - } - }, - "patternProperties": { - "^x-": {} - }, - "additionalProperties": false - }, - "Discriminator": { - "type": "object", - "required": [ - "propertyName" - ], - "properties": { - "propertyName": { - "type": "string" - }, - "mapping": { + "$ref": "http://asyncapi.com/definitions/2.0.0/correlationId.json" + } + ] + }, + "tags": { + "type": "array", + "items": { + "$ref": "http://asyncapi.com/definitions/2.0.0/tag.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." + }, + "externalDocs": { + "$ref": "http://asyncapi.com/definitions/2.0.0/externalDocs.json" + }, + "deprecated": { + "type": "boolean", + "default": false + }, + "examples": { + "type": "array", + "items": { + "type": "object" + } + }, + "bindings": { + "$ref": "http://asyncapi.com/definitions/2.0.0/bindingsObject.json" + } + } + }, + "openapiSchema_3_0.json": { + "$id": "openapiSchema_3_0.json", + "type": "object", + "definitions": { + "ExternalDocumentation": { + "type": "object", + "required": [ + "url" + ], + "properties": { + "description": { + "type": "string" + }, + "url": { + "type": "string", + "format": "uri-reference" + } + }, + "patternProperties": { + "^x-": {} + }, + "additionalProperties": false + }, + "Discriminator": { + "type": "object", + "required": [ + "propertyName" + ], + "properties": { + "propertyName": { + "type": "string" + }, + "mapping": { "type": "object", "additionalProperties": { "type": "string" @@ -1472,8 +1137,8 @@ }, "additionalProperties": false }, - "http://asyncapi.com/definitions/2.0.0/avroSchema_v1.json": { - "$id": "http://asyncapi.com/definitions/2.0.0/avroSchema_v1.json", + "avroSchema_v1.json": { + "$id": "avroSchema_v1.json", "definitions": { "avroSchema": { "title": "Avro Schema", @@ -1593,18 +1258,125 @@ } }, "required": [ - "name", - "type" + "name", + "type" + ] + }, + "avroRecord": { + "title": "Record", + "description": "A Record", + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "record" + }, + "name": { + "$ref": "#/definitions/name" + }, + "namespace": { + "$ref": "#/definitions/namespace" + }, + "doc": { + "type": "string" + }, + "aliases": { + "type": "array", + "items": { + "$ref": "#/definitions/name" + } + }, + "fields": { + "type": "array", + "items": { + "$ref": "#/definitions/avroField" + } + } + }, + "required": [ + "type", + "name", + "fields" + ] + }, + "avroEnum": { + "title": "Enum", + "description": "An enumeration", + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "enum" + }, + "name": { + "$ref": "#/definitions/name" + }, + "namespace": { + "$ref": "#/definitions/namespace" + }, + "doc": { + "type": "string" + }, + "aliases": { + "type": "array", + "items": { + "$ref": "#/definitions/name" + } + }, + "symbols": { + "type": "array", + "items": { + "$ref": "#/definitions/name" + } + } + }, + "required": [ + "type", + "name", + "symbols" + ] + }, + "avroArray": { + "title": "Array", + "description": "An array", + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "array" + }, + "name": { + "$ref": "#/definitions/name" + }, + "namespace": { + "$ref": "#/definitions/namespace" + }, + "doc": { + "type": "string" + }, + "aliases": { + "type": "array", + "items": { + "$ref": "#/definitions/name" + } + }, + "items": { + "$ref": "#/definitions/types" + } + }, + "required": [ + "type", + "items" ] }, - "avroRecord": { - "title": "Record", - "description": "A Record", + "avroMap": { + "title": "Map", + "description": "A map of values", "type": "object", "properties": { "type": { "type": "string", - "const": "record" + "const": "map" }, "name": { "$ref": "#/definitions/name" @@ -1621,27 +1393,23 @@ "$ref": "#/definitions/name" } }, - "fields": { - "type": "array", - "items": { - "$ref": "#/definitions/avroField" - } + "values": { + "$ref": "#/definitions/types" } }, "required": [ "type", - "name", - "fields" + "values" ] }, - "avroEnum": { - "title": "Enum", - "description": "An enumeration", + "avroFixed": { + "title": "Fixed", + "description": "A fixed sized array of bytes", "type": "object", "properties": { "type": { "type": "string", - "const": "enum" + "const": "fixed" }, "name": { "$ref": "#/definitions/name" @@ -1658,140 +1426,323 @@ "$ref": "#/definitions/name" } }, - "symbols": { - "type": "array", - "items": { - "$ref": "#/definitions/name" + "size": { + "type": "number" + } + }, + "required": [ + "type", + "name", + "size" + ] + }, + "name": { + "type": "string", + "pattern": "^[A-Za-z_][A-Za-z0-9_]*$" + }, + "namespace": { + "type": "string", + "pattern": "^([A-Za-z_][A-Za-z0-9_]*(\\.[A-Za-z_][A-Za-z0-9_]*)*)*$" + } + }, + "description": "Json-Schema definition for Avro AVSC files.", + "oneOf": [ + { + "$ref": "#/definitions/avroSchema" + } + ], + "title": "Avro Schema Definition" + }, + "message.json": { + "$id": "message.json", + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.0.0/Reference.json" + }, + { + "oneOf": [ + { + "type": "object", + "required": [ + "oneOf" + ], + "additionalProperties": false, + "properties": { + "oneOf": { + "type": "array", + "items": { + "$ref": "http://asyncapi.com/definitions/2.0.0/message.json" + } + } } + }, + { + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.0.0/specificationExtension.json" + } + }, + "properties": { + "schemaFormat": { + "type": "string" + }, + "contentType": { + "type": "string" + }, + "headers": { + "allOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.0.0/schema.json" + }, + { + "properties": { + "type": { + "const": "object" + } + } + } + ] + }, + "payload": {}, + "correlationId": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.0.0/correlationId.json" + } + ] + }, + "tags": { + "type": "array", + "items": { + "$ref": "http://asyncapi.com/definitions/2.0.0/tag.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." + }, + "externalDocs": { + "$ref": "http://asyncapi.com/definitions/2.0.0/externalDocs.json" + }, + "deprecated": { + "type": "boolean", + "default": false + }, + "examples": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "properties": { + "headers": { + "type": "object" + }, + "payload": {} + } + } + }, + "bindings": { + "$ref": "http://asyncapi.com/definitions/2.0.0/bindingsObject.json" + }, + "traits": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.0.0/messageTrait.json" + } + ] + } + } + }, + "allOf": [ + { + "if": { + "not": { + "required": [ + "schemaFormat" + ] + } + }, + "then": { + "properties": { + "payload": { + "$ref": "http://asyncapi.com/definitions/2.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" + ] + } + } + }, + "then": { + "properties": { + "payload": { + "$ref": "http://asyncapi.com/definitions/2.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/2.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/2.0.0/avroSchema_v1.json" + } + } + } + } + ] } - }, - "required": [ - "type", - "name", - "symbols" ] - }, - "avroArray": { - "title": "Array", - "description": "An array", - "type": "object", - "properties": { - "type": { - "type": "string", - "const": "array" - }, - "name": { - "$ref": "#/definitions/name" - }, - "namespace": { - "$ref": "#/definitions/namespace" - }, - "doc": { - "type": "string" - }, - "aliases": { - "type": "array", - "items": { - "$ref": "#/definitions/name" + } + ] + }, + "operation.json": { + "$id": "operation.json", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.0.0/specificationExtension.json" + } + }, + "properties": { + "traits": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.0.0/operationTrait.json" } - }, - "items": { - "$ref": "#/definitions/types" - } - }, - "required": [ - "type", - "items" - ] + ] + } }, - "avroMap": { - "title": "Map", - "description": "A map of values", - "type": "object", - "properties": { - "type": { - "type": "string", - "const": "map" - }, - "name": { - "$ref": "#/definitions/name" - }, - "namespace": { - "$ref": "#/definitions/namespace" - }, - "doc": { - "type": "string" - }, - "aliases": { - "type": "array", - "items": { - "$ref": "#/definitions/name" - } - }, - "values": { - "$ref": "#/definitions/types" - } - }, - "required": [ - "type", - "values" - ] + "summary": { + "type": "string" }, - "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" - } + "description": { + "type": "string" + }, + "tags": { + "type": "array", + "items": { + "$ref": "http://asyncapi.com/definitions/2.0.0/tag.json" }, - "required": [ - "type", - "name", - "size" - ] + "uniqueItems": true }, - "name": { - "type": "string", - "pattern": "^[A-Za-z_][A-Za-z0-9_]*$" + "externalDocs": { + "$ref": "http://asyncapi.com/definitions/2.0.0/externalDocs.json" }, - "namespace": { - "type": "string", - "pattern": "^([A-Za-z_][A-Za-z0-9_]*(\\.[A-Za-z_][A-Za-z0-9_]*)*)*$" - } - }, - "description": "Json-Schema definition for Avro AVSC files.", - "oneOf": [ - { - "$ref": "#/definitions/avroSchema" + "operationId": { + "type": "string" + }, + "bindings": { + "$ref": "http://asyncapi.com/definitions/2.0.0/bindingsObject.json" + }, + "message": { + "$ref": "http://asyncapi.com/definitions/2.0.0/message.json" } - ], - "title": "Avro Schema Definition" + } }, - "http://asyncapi.com/definitions/2.0.0/components.json": { - "$id": "http://asyncapi.com/definitions/2.0.0/components.json", + "channelItem.json": { + "$id": "channelItem.json", "type": "object", - "description": "An object to hold a set of reusable objects for different aspects of the AsyncAPI Specification.", "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { @@ -1799,130 +1750,61 @@ } }, "properties": { - "schemas": { - "$ref": "http://asyncapi.com/definitions/2.0.0/schemas.json" - }, - "messages": { - "$ref": "http://asyncapi.com/definitions/2.0.0/messages.json" - }, - "securitySchemes": { - "type": "object", - "patternProperties": { - "^[\\w\\d\\.\\-_]+$": { - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/2.0.0/Reference.json" - }, - { - "$ref": "http://asyncapi.com/definitions/2.0.0/SecurityScheme.json" - } - ] - } - } + "$ref": { + "$ref": "http://asyncapi.com/definitions/2.0.0/ReferenceObject.json" }, "parameters": { "$ref": "http://asyncapi.com/definitions/2.0.0/parameters.json" }, - "correlationIds": { - "type": "object", - "patternProperties": { - "^[\\w\\d\\.\\-_]+$": { - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/2.0.0/Reference.json" - }, - { - "$ref": "http://asyncapi.com/definitions/2.0.0/correlationId.json" - } - ] - } - } - }, - "operationTraits": { - "type": "object", - "additionalProperties": { - "$ref": "http://asyncapi.com/definitions/2.0.0/operationTrait.json" - } - }, - "messageTraits": { - "type": "object", - "additionalProperties": { - "$ref": "http://asyncapi.com/definitions/2.0.0/messageTrait.json" - } - }, - "serverBindings": { - "type": "object", - "additionalProperties": { - "$ref": "http://asyncapi.com/definitions/2.0.0/bindingsObject.json" - } - }, - "channelBindings": { - "type": "object", - "additionalProperties": { - "$ref": "http://asyncapi.com/definitions/2.0.0/bindingsObject.json" - } + "description": { + "type": "string", + "description": "A description of the channel." }, - "operationBindings": { - "type": "object", - "additionalProperties": { - "$ref": "http://asyncapi.com/definitions/2.0.0/bindingsObject.json" - } + "publish": { + "$ref": "http://asyncapi.com/definitions/2.0.0/operation.json" }, - "messageBindings": { - "type": "object", - "additionalProperties": { - "$ref": "http://asyncapi.com/definitions/2.0.0/bindingsObject.json" - } + "subscribe": { + "$ref": "http://asyncapi.com/definitions/2.0.0/operation.json" + }, + "deprecated": { + "type": "boolean", + "default": false + }, + "bindings": { + "$ref": "http://asyncapi.com/definitions/2.0.0/bindingsObject.json" } } }, - "http://asyncapi.com/definitions/2.0.0/schemas.json": { - "$id": "http://asyncapi.com/definitions/2.0.0/schemas.json", + "channels.json": { + "$id": "channels.json", + "type": "object", + "propertyNames": { + "type": "string", + "format": "uri-template", + "minLength": 1 + }, + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/2.0.0/channelItem.json" + } + }, + "schemas.json": { + "$id": "schemas.json", "type": "object", "additionalProperties": { "$ref": "http://asyncapi.com/definitions/2.0.0/schema.json" }, "description": "JSON objects describing schemas the API uses." }, - "http://asyncapi.com/definitions/2.0.0/messages.json": { - "$id": "http://asyncapi.com/definitions/2.0.0/messages.json", + "messages.json": { + "$id": "messages.json", "type": "object", "additionalProperties": { "$ref": "http://asyncapi.com/definitions/2.0.0/message.json" }, "description": "JSON objects describing the messages being consumed and produced by the API." }, - "http://asyncapi.com/definitions/2.0.0/SecurityScheme.json": { - "$id": "http://asyncapi.com/definitions/2.0.0/SecurityScheme.json", - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/2.0.0/userPassword.json" - }, - { - "$ref": "http://asyncapi.com/definitions/2.0.0/apiKey.json" - }, - { - "$ref": "http://asyncapi.com/definitions/2.0.0/X509.json" - }, - { - "$ref": "http://asyncapi.com/definitions/2.0.0/symmetricEncryption.json" - }, - { - "$ref": "http://asyncapi.com/definitions/2.0.0/asymmetricEncryption.json" - }, - { - "$ref": "http://asyncapi.com/definitions/2.0.0/HTTPSecurityScheme.json" - }, - { - "$ref": "http://asyncapi.com/definitions/2.0.0/oauth2Flows.json" - }, - { - "$ref": "http://asyncapi.com/definitions/2.0.0/openIdConnect.json" - } - ] - }, - "http://asyncapi.com/definitions/2.0.0/userPassword.json": { - "$id": "http://asyncapi.com/definitions/2.0.0/userPassword.json", + "userPassword.json": { + "$id": "userPassword.json", "type": "object", "required": [ "type" @@ -1945,8 +1827,8 @@ }, "additionalProperties": false }, - "http://asyncapi.com/definitions/2.0.0/apiKey.json": { - "$id": "http://asyncapi.com/definitions/2.0.0/apiKey.json", + "apiKey.json": { + "$id": "apiKey.json", "type": "object", "required": [ "type", @@ -1977,8 +1859,8 @@ }, "additionalProperties": false }, - "http://asyncapi.com/definitions/2.0.0/X509.json": { - "$id": "http://asyncapi.com/definitions/2.0.0/X509.json", + "X509.json": { + "$id": "X509.json", "type": "object", "required": [ "type" @@ -2001,8 +1883,8 @@ }, "additionalProperties": false }, - "http://asyncapi.com/definitions/2.0.0/symmetricEncryption.json": { - "$id": "http://asyncapi.com/definitions/2.0.0/symmetricEncryption.json", + "symmetricEncryption.json": { + "$id": "symmetricEncryption.json", "type": "object", "required": [ "type" @@ -2025,8 +1907,8 @@ }, "additionalProperties": false }, - "http://asyncapi.com/definitions/2.0.0/asymmetricEncryption.json": { - "$id": "http://asyncapi.com/definitions/2.0.0/asymmetricEncryption.json", + "asymmetricEncryption.json": { + "$id": "asymmetricEncryption.json", "type": "object", "required": [ "type" @@ -2049,22 +1931,8 @@ }, "additionalProperties": false }, - "http://asyncapi.com/definitions/2.0.0/HTTPSecurityScheme.json": { - "$id": "http://asyncapi.com/definitions/2.0.0/HTTPSecurityScheme.json", - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/2.0.0/NonBearerHTTPSecurityScheme.json" - }, - { - "$ref": "http://asyncapi.com/definitions/2.0.0/BearerHTTPSecurityScheme.json" - }, - { - "$ref": "http://asyncapi.com/definitions/2.0.0/APIKeyHTTPSecurityScheme.json" - } - ] - }, - "http://asyncapi.com/definitions/2.0.0/NonBearerHTTPSecurityScheme.json": { - "$id": "http://asyncapi.com/definitions/2.0.0/NonBearerHTTPSecurityScheme.json", + "NonBearerHTTPSecurityScheme.json": { + "$id": "NonBearerHTTPSecurityScheme.json", "not": { "type": "object", "properties": { @@ -2102,8 +1970,8 @@ }, "additionalProperties": false }, - "http://asyncapi.com/definitions/2.0.0/BearerHTTPSecurityScheme.json": { - "$id": "http://asyncapi.com/definitions/2.0.0/BearerHTTPSecurityScheme.json", + "BearerHTTPSecurityScheme.json": { + "$id": "BearerHTTPSecurityScheme.json", "type": "object", "required": [ "type", @@ -2136,8 +2004,8 @@ }, "additionalProperties": false }, - "http://asyncapi.com/definitions/2.0.0/APIKeyHTTPSecurityScheme.json": { - "$id": "http://asyncapi.com/definitions/2.0.0/APIKeyHTTPSecurityScheme.json", + "APIKeyHTTPSecurityScheme.json": { + "$id": "APIKeyHTTPSecurityScheme.json", "type": "object", "required": [ "type", @@ -2173,8 +2041,56 @@ }, "additionalProperties": false }, - "http://asyncapi.com/definitions/2.0.0/oauth2Flows.json": { - "$id": "http://asyncapi.com/definitions/2.0.0/oauth2Flows.json", + "HTTPSecurityScheme.json": { + "$id": "HTTPSecurityScheme.json", + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.0.0/NonBearerHTTPSecurityScheme.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.0.0/BearerHTTPSecurityScheme.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.0.0/APIKeyHTTPSecurityScheme.json" + } + ] + }, + "oauth2Scopes.json": { + "$id": "oauth2Scopes.json", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "oauth2Flow.json": { + "$id": "oauth2Flow.json", + "type": "object", + "properties": { + "authorizationUrl": { + "type": "string", + "format": "uri" + }, + "tokenUrl": { + "type": "string", + "format": "uri" + }, + "refreshUrl": { + "type": "string", + "format": "uri" + }, + "scopes": { + "$ref": "http://asyncapi.com/definitions/2.0.0/oauth2Scopes.json" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.0.0/specificationExtension.json" + } + }, + "additionalProperties": false + }, + "oauth2Flows.json": { + "$id": "oauth2Flows.json", "type": "object", "required": [ "type", @@ -2277,42 +2193,8 @@ } } }, - "http://asyncapi.com/definitions/2.0.0/oauth2Flow.json": { - "$id": "http://asyncapi.com/definitions/2.0.0/oauth2Flow.json", - "type": "object", - "properties": { - "authorizationUrl": { - "type": "string", - "format": "uri" - }, - "tokenUrl": { - "type": "string", - "format": "uri" - }, - "refreshUrl": { - "type": "string", - "format": "uri" - }, - "scopes": { - "$ref": "http://asyncapi.com/definitions/2.0.0/oauth2Scopes.json" - } - }, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "http://asyncapi.com/definitions/2.0.0/specificationExtension.json" - } - }, - "additionalProperties": false - }, - "http://asyncapi.com/definitions/2.0.0/oauth2Scopes.json": { - "$id": "http://asyncapi.com/definitions/2.0.0/oauth2Scopes.json", - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "http://asyncapi.com/definitions/2.0.0/openIdConnect.json": { - "$id": "http://asyncapi.com/definitions/2.0.0/openIdConnect.json", + "openIdConnect.json": { + "$id": "openIdConnect.json", "type": "object", "required": [ "type", @@ -2339,7 +2221,125 @@ } }, "additionalProperties": false + }, + "SecurityScheme.json": { + "$id": "SecurityScheme.json", + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.0.0/userPassword.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.0.0/apiKey.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.0.0/X509.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.0.0/symmetricEncryption.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.0.0/asymmetricEncryption.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.0.0/HTTPSecurityScheme.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.0.0/oauth2Flows.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.0.0/openIdConnect.json" + } + ] + }, + "components.json": { + "$id": "components.json", + "type": "object", + "description": "An object to hold a set of reusable objects for different aspects of the AsyncAPI Specification.", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.0.0/specificationExtension.json" + } + }, + "properties": { + "schemas": { + "$ref": "http://asyncapi.com/definitions/2.0.0/schemas.json" + }, + "messages": { + "$ref": "http://asyncapi.com/definitions/2.0.0/messages.json" + }, + "securitySchemes": { + "type": "object", + "patternProperties": { + "^[\\w\\d\\.\\-_]+$": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.0.0/SecurityScheme.json" + } + ] + } + } + }, + "parameters": { + "$ref": "http://asyncapi.com/definitions/2.0.0/parameters.json" + }, + "correlationIds": { + "type": "object", + "patternProperties": { + "^[\\w\\d\\.\\-_]+$": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.0.0/correlationId.json" + } + ] + } + } + }, + "operationTraits": { + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/2.0.0/operationTrait.json" + } + }, + "messageTraits": { + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/2.0.0/messageTrait.json" + } + }, + "serverBindings": { + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/2.0.0/bindingsObject.json" + } + }, + "channelBindings": { + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/2.0.0/bindingsObject.json" + } + }, + "operationBindings": { + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/2.0.0/bindingsObject.json" + } + }, + "messageBindings": { + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/2.0.0/bindingsObject.json" + } + } + } } }, + "$id": "http://asyncapi.com/definitions/2.0.0/asyncapi.json", "description": "!!Auto generated!! \n Do not manually edit. " } \ No newline at end of file diff --git a/schemas/2.1.0-without-$id.json b/schemas/2.1.0-without-$id.json index f2db9a08..b71978fa 100644 --- a/schemas/2.1.0-without-$id.json +++ b/schemas/2.1.0-without-$id.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema", + "$schema": "http://json-schema.org/draft-07/schema#", "title": "AsyncAPI 2.1.0 schema.", "type": "object", "required": [ @@ -61,45 +61,6 @@ "additionalProperties": true, "additionalItems": true }, - "info": { - "type": "object", - "description": "General information about the API.", - "required": [ - "version", - "title" - ], - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "properties": { - "title": { - "type": "string", - "description": "A unique and precise title of the API." - }, - "version": { - "type": "string", - "description": "A semantic version number of the API." - }, - "description": { - "type": "string", - "description": "A longer description of the API. Should be different from the title. CommonMark is allowed." - }, - "termsOfService": { - "type": "string", - "description": "A URL to the Terms of Service for the API. MUST be in the format of a URL.", - "format": "uri" - }, - "contact": { - "$ref": "#/definitions/contact" - }, - "license": { - "$ref": "#/definitions/license" - } - } - }, "contact": { "type": "object", "description": "Contact information for the owners of the API.", @@ -149,12 +110,12 @@ } } }, - "server": { + "info": { "type": "object", - "description": "An object representing a Server.", + "description": "General information about the API.", "required": [ - "url", - "protocol" + "version", + "title" ], "additionalProperties": false, "patternProperties": { @@ -163,39 +124,31 @@ } }, "properties": { - "url": { - "type": "string" - }, - "description": { - "type": "string" + "title": { + "type": "string", + "description": "A unique and precise title of the API." }, - "protocol": { + "version": { "type": "string", - "description": "The transfer protocol." + "description": "A semantic version number of the API." }, - "protocolVersion": { - "type": "string" + "description": { + "type": "string", + "description": "A longer description of the API. Should be different from the title. CommonMark is allowed." }, - "variables": { - "$ref": "#/definitions/serverVariables" + "termsOfService": { + "type": "string", + "description": "A URL to the Terms of Service for the API. MUST be in the format of a URL.", + "format": "uri" }, - "security": { - "type": "array", - "items": { - "$ref": "#/definitions/SecurityRequirement" - } + "contact": { + "$ref": "#/definitions/contact" }, - "bindings": { - "$ref": "#/definitions/bindingsObject" + "license": { + "$ref": "#/definitions/license" } } }, - "serverVariables": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/serverVariable" - } - }, "serverVariable": { "type": "object", "description": "An object representing a Server Variable for server URL template substitution.", @@ -227,6 +180,12 @@ } } }, + "serverVariables": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/serverVariable" + } + }, "SecurityRequirement": { "type": "object", "additionalProperties": { @@ -257,19 +216,13 @@ "ibmmq": {} } }, - "channels": { - "type": "object", - "propertyNames": { - "type": "string", - "format": "uri-template", - "minLength": 1 - }, - "additionalProperties": { - "$ref": "#/definitions/channelItem" - } - }, - "channelItem": { + "server": { "type": "object", + "description": "An object representing a Server.", + "required": [ + "url", + "protocol" + ], "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { @@ -277,25 +230,27 @@ } }, "properties": { - "$ref": { - "$ref": "#/definitions/ReferenceObject" - }, - "parameters": { - "$ref": "#/definitions/parameters" + "url": { + "type": "string" }, "description": { + "type": "string" + }, + "protocol": { "type": "string", - "description": "A description of the channel." + "description": "The transfer protocol." }, - "publish": { - "$ref": "#/definitions/operation" + "protocolVersion": { + "type": "string" }, - "subscribe": { - "$ref": "#/definitions/operation" + "variables": { + "$ref": "#/definitions/serverVariables" }, - "deprecated": { - "type": "boolean", - "default": false + "security": { + "type": "array", + "items": { + "$ref": "#/definitions/SecurityRequirement" + } }, "bindings": { "$ref": "#/definitions/bindingsObject" @@ -306,20 +261,6 @@ "type": "string", "format": "uri-reference" }, - "parameters": { - "type": "object", - "additionalProperties": { - "oneOf": [ - { - "$ref": "#/definitions/Reference" - }, - { - "$ref": "#/definitions/parameter" - } - ] - }, - "description": "JSON objects describing re-usable channel parameters." - }, "Reference": { "type": "object", "required": [ @@ -331,187 +272,66 @@ } } }, - "parameter": { - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" + "json-schema-draft-07-schema": { + "title": "Core schema meta-schema", + "definitions": { + "schemaArray": { + "type": "array", + "minItems": 1, + "items": { + "$ref": "#/definitions/json-schema-draft-07-schema" + } + }, + "nonNegativeInteger": { + "type": "integer", + "minimum": 0 + }, + "nonNegativeIntegerDefault0": { + "allOf": [ + { + "$ref": "#/definitions/json-schema-draft-07-schema/definitions/nonNegativeInteger" + }, + { + "default": 0 + } + ] + }, + "simpleTypes": { + "enum": [ + "array", + "boolean", + "integer", + "null", + "number", + "object", + "string" + ] + }, + "stringArray": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true, + "default": [] } }, + "type": [ + "object", + "boolean" + ], "properties": { - "description": { + "$id": { "type": "string", - "description": "A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed." - }, - "schema": { - "$ref": "#/definitions/schema" + "format": "uri-reference" }, - "location": { + "$schema": { "type": "string", - "description": "A runtime expression that specifies the location of the parameter value", - "pattern": "^\\$message\\.(header|payload)#(\\/(([^\\/~])|(~[01]))*)*" + "format": "uri" }, "$ref": { - "$ref": "#/definitions/ReferenceObject" - } - } - }, - "schema": { - "allOf": [ - { - "$ref": "#/definitions/json-schema-draft-07-schema" - }, - { - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "properties": { - "additionalProperties": { - "anyOf": [ - { - "$ref": "#/definitions/schema" - }, - { - "type": "boolean" - } - ], - "default": {} - }, - "items": { - "anyOf": [ - { - "$ref": "#/definitions/schema" - }, - { - "type": "array", - "minItems": 1, - "items": { - "$ref": "#/definitions/schema" - } - } - ], - "default": {} - }, - "allOf": { - "type": "array", - "minItems": 1, - "items": { - "$ref": "#/definitions/schema" - } - }, - "oneOf": { - "type": "array", - "minItems": 1, - "items": { - "$ref": "#/definitions/schema" - } - }, - "anyOf": { - "type": "array", - "minItems": 1, - "items": { - "$ref": "#/definitions/schema" - } - }, - "not": { - "$ref": "#/definitions/schema" - }, - "properties": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/schema" - }, - "default": {} - }, - "patternProperties": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/schema" - }, - "default": {} - }, - "propertyNames": { - "$ref": "#/definitions/schema" - }, - "contains": { - "$ref": "#/definitions/schema" - }, - "discriminator": { - "type": "string" - }, - "externalDocs": { - "$ref": "#/definitions/externalDocs" - }, - "deprecated": { - "type": "boolean", - "default": false - } - } - } - ] - }, - "json-schema-draft-07-schema": { - "title": "Core schema meta-schema", - "definitions": { - "schemaArray": { - "type": "array", - "minItems": 1, - "items": { - "$ref": "#/definitions/json-schema-draft-07-schema" - } - }, - "nonNegativeInteger": { - "type": "integer", - "minimum": 0 - }, - "nonNegativeIntegerDefault0": { - "allOf": [ - { - "$ref": "#/definitions/json-schema-draft-07-schema/definitions/nonNegativeInteger" - }, - { - "default": 0 - } - ] - }, - "simpleTypes": { - "enum": [ - "array", - "boolean", - "integer", - "null", - "number", - "object", - "string" - ] - }, - "stringArray": { - "type": "array", - "items": { - "type": "string" - }, - "uniqueItems": true, - "default": [] - } - }, - "type": [ - "object", - "boolean" - ], - "properties": { - "$id": { - "type": "string", - "format": "uri-reference" - }, - "$schema": { - "type": "string", - "format": "uri" - }, - "$ref": { - "type": "string", - "format": "uri-reference" + "type": "string", + "format": "uri-reference" }, "$comment": { "type": "string" @@ -717,8 +537,103 @@ } } }, - "operation": { - "type": "object", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/json-schema-draft-07-schema" + }, + { + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, + "properties": { + "additionalProperties": { + "anyOf": [ + { + "$ref": "#/definitions/schema" + }, + { + "type": "boolean" + } + ], + "default": {} + }, + "items": { + "anyOf": [ + { + "$ref": "#/definitions/schema" + }, + { + "type": "array", + "minItems": 1, + "items": { + "$ref": "#/definitions/schema" + } + } + ], + "default": {} + }, + "allOf": { + "type": "array", + "minItems": 1, + "items": { + "$ref": "#/definitions/schema" + } + }, + "oneOf": { + "type": "array", + "minItems": 1, + "items": { + "$ref": "#/definitions/schema" + } + }, + "anyOf": { + "type": "array", + "minItems": 1, + "items": { + "$ref": "#/definitions/schema" + } + }, + "not": { + "$ref": "#/definitions/schema" + }, + "properties": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/schema" + }, + "default": {} + }, + "patternProperties": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/schema" + }, + "default": {} + }, + "propertyNames": { + "$ref": "#/definitions/schema" + }, + "contains": { + "$ref": "#/definitions/schema" + }, + "discriminator": { + "type": "string" + }, + "externalDocs": { + "$ref": "#/definitions/externalDocs" + }, + "deprecated": { + "type": "boolean", + "default": false + } + } + } + ] + }, + "parameter": { "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { @@ -726,43 +641,57 @@ } }, "properties": { - "traits": { - "type": "array", - "items": { - "oneOf": [ - { - "$ref": "#/definitions/Reference" - }, - { - "$ref": "#/definitions/operationTrait" - } - ] - } - }, - "summary": { - "type": "string" - }, "description": { - "type": "string" + "type": "string", + "description": "A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed." }, - "tags": { - "type": "array", - "items": { - "$ref": "#/definitions/tag" - }, - "uniqueItems": true + "schema": { + "$ref": "#/definitions/schema" }, - "externalDocs": { - "$ref": "#/definitions/externalDocs" + "location": { + "type": "string", + "description": "A runtime expression that specifies the location of the parameter value", + "pattern": "^\\$message\\.(header|payload)#(\\/(([^\\/~])|(~[01]))*)*" }, - "operationId": { - "type": "string" + "$ref": { + "$ref": "#/definitions/ReferenceObject" + } + } + }, + "parameters": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/parameter" + } + ] + }, + "description": "JSON objects describing re-usable channel parameters." + }, + "tag": { + "type": "object", + "additionalProperties": false, + "required": [ + "name" + ], + "properties": { + "name": { + "type": "string" }, - "bindings": { - "$ref": "#/definitions/bindingsObject" + "description": { + "type": "string" }, - "message": { - "$ref": "#/definitions/message" + "externalDocs": { + "$ref": "#/definitions/externalDocs" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" } } }, @@ -799,390 +728,108 @@ } } }, - "tag": { + "correlationId": { "type": "object", - "additionalProperties": false, "required": [ - "name" + "location" ], + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, "properties": { - "name": { - "type": "string" - }, "description": { - "type": "string" + "type": "string", + "description": "A optional description of the correlation ID. GitHub Flavored Markdown is allowed." }, - "externalDocs": { - "$ref": "#/definitions/externalDocs" + "location": { + "type": "string", + "description": "A runtime expression that specifies the location of the correlation ID", + "pattern": "^\\$message\\.(header|payload)#(\\/(([^\\/~])|(~[01]))*)*" } - }, + } + }, + "messageTrait": { + "type": "object", + "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { "$ref": "#/definitions/specificationExtension" } - } - }, - "message": { - "oneOf": [ - { - "$ref": "#/definitions/Reference" + }, + "properties": { + "schemaFormat": { + "type": "string" }, - { - "oneOf": [ + "contentType": { + "type": "string" + }, + "headers": { + "allOf": [ + { + "$ref": "#/definitions/schema" + }, { - "type": "object", - "required": [ - "oneOf" - ], - "additionalProperties": false, "properties": { - "oneOf": { - "type": "array", - "items": { - "$ref": "#/definitions/message" - } + "type": { + "const": "object" } } + } + ] + }, + "correlationId": { + "oneOf": [ + { + "$ref": "#/definitions/Reference" }, { - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "properties": { - "schemaFormat": { - "type": "string" - }, - "contentType": { - "type": "string" - }, - "headers": { - "allOf": [ - { - "$ref": "#/definitions/schema" - }, - { - "properties": { - "type": { - "const": "object" - } - } - } - ] - }, - "payload": {}, - "correlationId": { - "oneOf": [ - { - "$ref": "#/definitions/Reference" - }, - { - "$ref": "#/definitions/correlationId" - } - ] - }, - "tags": { - "type": "array", - "items": { - "$ref": "#/definitions/tag" - }, - "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." - }, - "externalDocs": { - "$ref": "#/definitions/externalDocs" - }, - "deprecated": { - "type": "boolean", - "default": false - }, - "examples": { - "type": "array", - "items": { - "type": "object", - "additionalProperties": false, - "anyOf": [ - { - "required": [ - "payload" - ] - }, - { - "required": [ - "headers" - ] - } - ], - "properties": { - "name": { - "type": "string", - "description": "Machine readable name of the message example." - }, - "summary": { - "type": "string", - "description": "A brief summary of the message example." - }, - "headers": { - "type": "object" - }, - "payload": {} - } - } - }, - "bindings": { - "$ref": "#/definitions/bindingsObject" - }, - "traits": { - "type": "array", - "items": { - "oneOf": [ - { - "$ref": "#/definitions/Reference" - }, - { - "$ref": "#/definitions/messageTrait" - } - ] - } - } - }, - "allOf": [ - { - "if": { - "not": { - "required": [ - "schemaFormat" - ] - } - }, - "then": { - "properties": { - "payload": { - "$ref": "#/definitions/schema" - } - } - } - }, - { - "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" - ] - } - } - }, - "then": { - "properties": { - "payload": { - "$ref": "#/definitions/schema" - } - } - } - }, - { - "if": { - "required": [ - "schemaFormat" - ], - "properties": { - "schemaFormat": { - "enum": [ - "application/schema+json;version=draft-07", - "application/schema+yaml;version=draft-07" - ] - } - } - }, - "then": { - "properties": { - "payload": { - "$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": { - "payload": { - "$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": { - "payload": { - "$ref": "#/definitions/avroSchema_v1" - } - } - } - } - ] - } - ] - } - ] - }, - "correlationId": { - "type": "object", - "required": [ - "location" - ], - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "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]))*)*" - } - } - }, - "messageTrait": { - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "properties": { - "schemaFormat": { - "type": "string" - }, - "contentType": { - "type": "string" - }, - "headers": { - "allOf": [ - { - "$ref": "#/definitions/schema" - }, - { - "properties": { - "type": { - "const": "object" - } - } - } - ] - }, - "correlationId": { - "oneOf": [ - { - "$ref": "#/definitions/Reference" - }, - { - "$ref": "#/definitions/correlationId" - } - ] - }, - "tags": { - "type": "array", - "items": { - "$ref": "#/definitions/tag" - }, - "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." - }, - "externalDocs": { - "$ref": "#/definitions/externalDocs" - }, - "deprecated": { - "type": "boolean", - "default": false - }, - "examples": { - "type": "array", - "items": { - "type": "object", - "additionalProperties": false, - "anyOf": [ - { - "required": [ - "payload" - ] + "$ref": "#/definitions/correlationId" + } + ] + }, + "tags": { + "type": "array", + "items": { + "$ref": "#/definitions/tag" + }, + "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." + }, + "externalDocs": { + "$ref": "#/definitions/externalDocs" + }, + "deprecated": { + "type": "boolean", + "default": false + }, + "examples": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "anyOf": [ + { + "required": [ + "payload" + ] }, { "required": [ @@ -1812,137 +1459,372 @@ ], "title": "Avro Schema Definition" }, - "components": { - "type": "object", - "description": "An object to hold a set of reusable objects for different aspects of the AsyncAPI Specification.", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "properties": { - "schemas": { - "$ref": "#/definitions/schemas" - }, - "messages": { - "$ref": "#/definitions/messages" + "message": { + "oneOf": [ + { + "$ref": "#/definitions/Reference" }, - "securitySchemes": { - "type": "object", - "patternProperties": { - "^[\\w\\d\\.\\-_]+$": { - "oneOf": [ + { + "oneOf": [ + { + "type": "object", + "required": [ + "oneOf" + ], + "additionalProperties": false, + "properties": { + "oneOf": { + "type": "array", + "items": { + "$ref": "#/definitions/message" + } + } + } + }, + { + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, + "properties": { + "schemaFormat": { + "type": "string" + }, + "contentType": { + "type": "string" + }, + "headers": { + "allOf": [ + { + "$ref": "#/definitions/schema" + }, + { + "properties": { + "type": { + "const": "object" + } + } + } + ] + }, + "payload": {}, + "correlationId": { + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/correlationId" + } + ] + }, + "tags": { + "type": "array", + "items": { + "$ref": "#/definitions/tag" + }, + "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." + }, + "externalDocs": { + "$ref": "#/definitions/externalDocs" + }, + "deprecated": { + "type": "boolean", + "default": false + }, + "examples": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "anyOf": [ + { + "required": [ + "payload" + ] + }, + { + "required": [ + "headers" + ] + } + ], + "properties": { + "name": { + "type": "string", + "description": "Machine readable name of the message example." + }, + "summary": { + "type": "string", + "description": "A brief summary of the message example." + }, + "headers": { + "type": "object" + }, + "payload": {} + } + } + }, + "bindings": { + "$ref": "#/definitions/bindingsObject" + }, + "traits": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/messageTrait" + } + ] + } + } + }, + "allOf": [ { - "$ref": "#/definitions/Reference" + "if": { + "not": { + "required": [ + "schemaFormat" + ] + } + }, + "then": { + "properties": { + "payload": { + "$ref": "#/definitions/schema" + } + } + } }, { - "$ref": "#/definitions/SecurityScheme" - } - ] - } - } - }, - "parameters": { - "$ref": "#/definitions/parameters" - }, - "correlationIds": { - "type": "object", - "patternProperties": { - "^[\\w\\d\\.\\-_]+$": { - "oneOf": [ + "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" + ] + } + } + }, + "then": { + "properties": { + "payload": { + "$ref": "#/definitions/schema" + } + } + } + }, { - "$ref": "#/definitions/Reference" + "if": { + "required": [ + "schemaFormat" + ], + "properties": { + "schemaFormat": { + "enum": [ + "application/schema+json;version=draft-07", + "application/schema+yaml;version=draft-07" + ] + } + } + }, + "then": { + "properties": { + "payload": { + "$ref": "#/definitions/json-schema-draft-07-schema" + } + } + } }, { - "$ref": "#/definitions/correlationId" + "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": "#/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": { + "payload": { + "$ref": "#/definitions/avroSchema_v1" + } + } + } } ] } + ] + } + ] + }, + "operation": { + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, + "properties": { + "traits": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/operationTrait" + } + ] } }, - "operationTraits": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/operationTrait" - } + "summary": { + "type": "string" }, - "messageTraits": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/messageTrait" - } + "description": { + "type": "string" }, - "serverBindings": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/bindingsObject" - } + "tags": { + "type": "array", + "items": { + "$ref": "#/definitions/tag" + }, + "uniqueItems": true }, - "channelBindings": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/bindingsObject" - } + "externalDocs": { + "$ref": "#/definitions/externalDocs" }, - "operationBindings": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/bindingsObject" - } + "operationId": { + "type": "string" }, - "messageBindings": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/bindingsObject" - } + "bindings": { + "$ref": "#/definitions/bindingsObject" + }, + "message": { + "$ref": "#/definitions/message" } } }, - "schemas": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/schema" - }, - "description": "JSON objects describing schemas the API uses." - }, - "messages": { + "channelItem": { "type": "object", - "additionalProperties": { - "$ref": "#/definitions/message" + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } }, - "description": "JSON objects describing the messages being consumed and produced by the API." - }, - "SecurityScheme": { - "oneOf": [ - { - "$ref": "#/definitions/userPassword" - }, - { - "$ref": "#/definitions/apiKey" - }, - { - "$ref": "#/definitions/X509" + "properties": { + "$ref": { + "$ref": "#/definitions/ReferenceObject" }, - { - "$ref": "#/definitions/symmetricEncryption" + "parameters": { + "$ref": "#/definitions/parameters" }, - { - "$ref": "#/definitions/asymmetricEncryption" + "description": { + "type": "string", + "description": "A description of the channel." }, - { - "$ref": "#/definitions/HTTPSecurityScheme" + "publish": { + "$ref": "#/definitions/operation" }, - { - "$ref": "#/definitions/oauth2Flows" + "subscribe": { + "$ref": "#/definitions/operation" }, - { - "$ref": "#/definitions/openIdConnect" + "deprecated": { + "type": "boolean", + "default": false }, - { - "$ref": "#/definitions/SaslSecurityScheme" + "bindings": { + "$ref": "#/definitions/bindingsObject" } - ] + } + }, + "channels": { + "type": "object", + "propertyNames": { + "type": "string", + "format": "uri-template", + "minLength": 1 + }, + "additionalProperties": { + "$ref": "#/definitions/channelItem" + } + }, + "schemas": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/schema" + }, + "description": "JSON objects describing schemas the API uses." + }, + "messages": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/message" + }, + "description": "JSON objects describing the messages being consumed and produced by the API." }, "userPassword": { "type": "object", @@ -2067,19 +1949,6 @@ }, "additionalProperties": false }, - "HTTPSecurityScheme": { - "oneOf": [ - { - "$ref": "#/definitions/NonBearerHTTPSecurityScheme" - }, - { - "$ref": "#/definitions/BearerHTTPSecurityScheme" - }, - { - "$ref": "#/definitions/APIKeyHTTPSecurityScheme" - } - ] - }, "NonBearerHTTPSecurityScheme": { "not": { "type": "object", @@ -2187,6 +2056,51 @@ }, "additionalProperties": false }, + "HTTPSecurityScheme": { + "oneOf": [ + { + "$ref": "#/definitions/NonBearerHTTPSecurityScheme" + }, + { + "$ref": "#/definitions/BearerHTTPSecurityScheme" + }, + { + "$ref": "#/definitions/APIKeyHTTPSecurityScheme" + } + ] + }, + "oauth2Scopes": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "oauth2Flow": { + "type": "object", + "properties": { + "authorizationUrl": { + "type": "string", + "format": "uri" + }, + "tokenUrl": { + "type": "string", + "format": "uri" + }, + "refreshUrl": { + "type": "string", + "format": "uri" + }, + "scopes": { + "$ref": "#/definitions/oauth2Scopes" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, + "additionalProperties": false + }, "oauth2Flows": { "type": "object", "required": [ @@ -2290,38 +2204,6 @@ } } }, - "oauth2Flow": { - "type": "object", - "properties": { - "authorizationUrl": { - "type": "string", - "format": "uri" - }, - "tokenUrl": { - "type": "string", - "format": "uri" - }, - "refreshUrl": { - "type": "string", - "format": "uri" - }, - "scopes": { - "$ref": "#/definitions/oauth2Scopes" - } - }, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "additionalProperties": false - }, - "oauth2Scopes": { - "type": "object", - "additionalProperties": { - "type": "string" - } - }, "openIdConnect": { "type": "object", "required": [ @@ -2350,19 +2232,6 @@ }, "additionalProperties": false }, - "SaslSecurityScheme": { - "oneOf": [ - { - "$ref": "#/definitions/SaslPlainSecurityScheme" - }, - { - "$ref": "#/definitions/SaslScramSecurityScheme" - }, - { - "$ref": "#/definitions/SaslGssapiSecurityScheme" - } - ] - }, "SaslPlainSecurityScheme": { "type": "object", "required": [ @@ -2432,6 +2301,137 @@ } }, "additionalProperties": false + }, + "SaslSecurityScheme": { + "oneOf": [ + { + "$ref": "#/definitions/SaslPlainSecurityScheme" + }, + { + "$ref": "#/definitions/SaslScramSecurityScheme" + }, + { + "$ref": "#/definitions/SaslGssapiSecurityScheme" + } + ] + }, + "SecurityScheme": { + "oneOf": [ + { + "$ref": "#/definitions/userPassword" + }, + { + "$ref": "#/definitions/apiKey" + }, + { + "$ref": "#/definitions/X509" + }, + { + "$ref": "#/definitions/symmetricEncryption" + }, + { + "$ref": "#/definitions/asymmetricEncryption" + }, + { + "$ref": "#/definitions/HTTPSecurityScheme" + }, + { + "$ref": "#/definitions/oauth2Flows" + }, + { + "$ref": "#/definitions/openIdConnect" + }, + { + "$ref": "#/definitions/SaslSecurityScheme" + } + ] + }, + "components": { + "type": "object", + "description": "An object to hold a set of reusable objects for different aspects of the AsyncAPI Specification.", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, + "properties": { + "schemas": { + "$ref": "#/definitions/schemas" + }, + "messages": { + "$ref": "#/definitions/messages" + }, + "securitySchemes": { + "type": "object", + "patternProperties": { + "^[\\w\\d\\.\\-_]+$": { + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/SecurityScheme" + } + ] + } + } + }, + "parameters": { + "$ref": "#/definitions/parameters" + }, + "correlationIds": { + "type": "object", + "patternProperties": { + "^[\\w\\d\\.\\-_]+$": { + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/correlationId" + } + ] + } + } + }, + "operationTraits": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/operationTrait" + } + }, + "messageTraits": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/messageTrait" + } + }, + "serverBindings": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/bindingsObject" + } + }, + "channelBindings": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/bindingsObject" + } + }, + "operationBindings": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/bindingsObject" + } + }, + "messageBindings": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/bindingsObject" + } + } + } } }, "description": "!!Auto generated!! \n Do not manually edit. " diff --git a/schemas/2.1.0.json b/schemas/2.1.0.json index 0b8fd84c..57fbb19c 100644 --- a/schemas/2.1.0.json +++ b/schemas/2.1.0.json @@ -1,6 +1,5 @@ { - "$id": "http://asyncapi.com/definitions/2.1.0/asyncapi.json", - "$schema": "http://json-schema.org/draft-07/schema", + "$schema": "http://json-schema.org/draft-07/schema#", "title": "AsyncAPI 2.1.0 schema.", "type": "object", "required": [ @@ -57,54 +56,14 @@ } }, "definitions": { - "http://asyncapi.com/definitions/2.1.0/specificationExtension.json": { - "$id": "http://asyncapi.com/definitions/2.1.0/specificationExtension.json", + "specificationExtension.json": { + "$id": "specificationExtension.json", "description": "Any property starting with x- is valid.", "additionalProperties": true, "additionalItems": true }, - "http://asyncapi.com/definitions/2.1.0/info.json": { - "$id": "http://asyncapi.com/definitions/2.1.0/info.json", - "type": "object", - "description": "General information about the API.", - "required": [ - "version", - "title" - ], - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "http://asyncapi.com/definitions/2.1.0/specificationExtension.json" - } - }, - "properties": { - "title": { - "type": "string", - "description": "A unique and precise title of the API." - }, - "version": { - "type": "string", - "description": "A semantic version number of the API." - }, - "description": { - "type": "string", - "description": "A longer description of the API. Should be different from the title. CommonMark is allowed." - }, - "termsOfService": { - "type": "string", - "description": "A URL to the Terms of Service for the API. MUST be in the format of a URL.", - "format": "uri" - }, - "contact": { - "$ref": "http://asyncapi.com/definitions/2.1.0/contact.json" - }, - "license": { - "$ref": "http://asyncapi.com/definitions/2.1.0/license.json" - } - } - }, - "http://asyncapi.com/definitions/2.1.0/contact.json": { - "$id": "http://asyncapi.com/definitions/2.1.0/contact.json", + "contact.json": { + "$id": "contact.json", "type": "object", "description": "Contact information for the owners of the API.", "additionalProperties": false, @@ -130,8 +89,8 @@ } } }, - "http://asyncapi.com/definitions/2.1.0/license.json": { - "$id": "http://asyncapi.com/definitions/2.1.0/license.json", + "license.json": { + "$id": "license.json", "type": "object", "required": [ "name" @@ -154,13 +113,13 @@ } } }, - "http://asyncapi.com/definitions/2.1.0/server.json": { - "$id": "http://asyncapi.com/definitions/2.1.0/server.json", + "info.json": { + "$id": "info.json", "type": "object", - "description": "An object representing a Server.", + "description": "General information about the API.", "required": [ - "url", - "protocol" + "version", + "title" ], "additionalProperties": false, "patternProperties": { @@ -169,42 +128,33 @@ } }, "properties": { - "url": { - "type": "string" - }, - "description": { - "type": "string" + "title": { + "type": "string", + "description": "A unique and precise title of the API." }, - "protocol": { + "version": { "type": "string", - "description": "The transfer protocol." + "description": "A semantic version number of the API." }, - "protocolVersion": { - "type": "string" + "description": { + "type": "string", + "description": "A longer description of the API. Should be different from the title. CommonMark is allowed." }, - "variables": { - "$ref": "http://asyncapi.com/definitions/2.1.0/serverVariables.json" + "termsOfService": { + "type": "string", + "description": "A URL to the Terms of Service for the API. MUST be in the format of a URL.", + "format": "uri" }, - "security": { - "type": "array", - "items": { - "$ref": "http://asyncapi.com/definitions/2.1.0/SecurityRequirement.json" - } + "contact": { + "$ref": "http://asyncapi.com/definitions/2.1.0/contact.json" }, - "bindings": { - "$ref": "http://asyncapi.com/definitions/2.1.0/bindingsObject.json" + "license": { + "$ref": "http://asyncapi.com/definitions/2.1.0/license.json" } } }, - "http://asyncapi.com/definitions/2.1.0/serverVariables.json": { - "$id": "http://asyncapi.com/definitions/2.1.0/serverVariables.json", - "type": "object", - "additionalProperties": { - "$ref": "http://asyncapi.com/definitions/2.1.0/serverVariable.json" - } - }, - "http://asyncapi.com/definitions/2.1.0/serverVariable.json": { - "$id": "http://asyncapi.com/definitions/2.1.0/serverVariable.json", + "serverVariable.json": { + "$id": "serverVariable.json", "type": "object", "description": "An object representing a Server Variable for server URL template substitution.", "additionalProperties": false, @@ -235,8 +185,15 @@ } } }, - "http://asyncapi.com/definitions/2.1.0/SecurityRequirement.json": { - "$id": "http://asyncapi.com/definitions/2.1.0/SecurityRequirement.json", + "serverVariables.json": { + "$id": "serverVariables.json", + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/2.1.0/serverVariable.json" + } + }, + "SecurityRequirement.json": { + "$id": "SecurityRequirement.json", "type": "object", "additionalProperties": { "type": "array", @@ -246,8 +203,8 @@ "uniqueItems": true } }, - "http://asyncapi.com/definitions/2.1.0/bindingsObject.json": { - "$id": "http://asyncapi.com/definitions/2.1.0/bindingsObject.json", + "bindingsObject.json": { + "$id": "bindingsObject.json", "type": "object", "additionalProperties": true, "properties": { @@ -267,21 +224,14 @@ "ibmmq": {} } }, - "http://asyncapi.com/definitions/2.1.0/channels.json": { - "$id": "http://asyncapi.com/definitions/2.1.0/channels.json", - "type": "object", - "propertyNames": { - "type": "string", - "format": "uri-template", - "minLength": 1 - }, - "additionalProperties": { - "$ref": "http://asyncapi.com/definitions/2.1.0/channelItem.json" - } - }, - "http://asyncapi.com/definitions/2.1.0/channelItem.json": { - "$id": "http://asyncapi.com/definitions/2.1.0/channelItem.json", + "server.json": { + "$id": "server.json", "type": "object", + "description": "An object representing a Server.", + "required": [ + "url", + "protocol" + ], "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { @@ -289,53 +239,40 @@ } }, "properties": { - "$ref": { - "$ref": "http://asyncapi.com/definitions/2.1.0/ReferenceObject.json" - }, - "parameters": { - "$ref": "http://asyncapi.com/definitions/2.1.0/parameters.json" + "url": { + "type": "string" }, "description": { + "type": "string" + }, + "protocol": { "type": "string", - "description": "A description of the channel." + "description": "The transfer protocol." }, - "publish": { - "$ref": "http://asyncapi.com/definitions/2.1.0/operation.json" + "protocolVersion": { + "type": "string" }, - "subscribe": { - "$ref": "http://asyncapi.com/definitions/2.1.0/operation.json" + "variables": { + "$ref": "http://asyncapi.com/definitions/2.1.0/serverVariables.json" }, - "deprecated": { - "type": "boolean", - "default": false + "security": { + "type": "array", + "items": { + "$ref": "http://asyncapi.com/definitions/2.1.0/SecurityRequirement.json" + } }, "bindings": { "$ref": "http://asyncapi.com/definitions/2.1.0/bindingsObject.json" } } }, - "http://asyncapi.com/definitions/2.1.0/ReferenceObject.json": { - "$id": "http://asyncapi.com/definitions/2.1.0/ReferenceObject.json", + "ReferenceObject.json": { + "$id": "ReferenceObject.json", "type": "string", "format": "uri-reference" }, - "http://asyncapi.com/definitions/2.1.0/parameters.json": { - "$id": "http://asyncapi.com/definitions/2.1.0/parameters.json", - "type": "object", - "additionalProperties": { - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/2.1.0/Reference.json" - }, - { - "$ref": "http://asyncapi.com/definitions/2.1.0/parameter.json" - } - ] - }, - "description": "JSON objects describing re-usable channel parameters." - }, - "http://asyncapi.com/definitions/2.1.0/Reference.json": { - "$id": "http://asyncapi.com/definitions/2.1.0/Reference.json", + "Reference.json": { + "$id": "Reference.json", "type": "object", "required": [ "$ref" @@ -346,190 +283,67 @@ } } }, - "http://asyncapi.com/definitions/2.1.0/parameter.json": { - "$id": "http://asyncapi.com/definitions/2.1.0/parameter.json", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "http://asyncapi.com/definitions/2.1.0/specificationExtension.json" + "http://json-schema.org/draft-07/schema": { + "$id": "http://json-schema.org/draft-07/schema", + "title": "Core schema meta-schema", + "definitions": { + "schemaArray": { + "type": "array", + "minItems": 1, + "items": { + "$ref": "#" + } + }, + "nonNegativeInteger": { + "type": "integer", + "minimum": 0 + }, + "nonNegativeIntegerDefault0": { + "allOf": [ + { + "$ref": "#/definitions/nonNegativeInteger" + }, + { + "default": 0 + } + ] + }, + "simpleTypes": { + "enum": [ + "array", + "boolean", + "integer", + "null", + "number", + "object", + "string" + ] + }, + "stringArray": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true, + "default": [] } }, + "type": [ + "object", + "boolean" + ], "properties": { - "description": { + "$id": { "type": "string", - "description": "A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed." - }, - "schema": { - "$ref": "http://asyncapi.com/definitions/2.1.0/schema.json" + "format": "uri-reference" }, - "location": { + "$schema": { "type": "string", - "description": "A runtime expression that specifies the location of the parameter value", - "pattern": "^\\$message\\.(header|payload)#(\\/(([^\\/~])|(~[01]))*)*" + "format": "uri" }, "$ref": { - "$ref": "http://asyncapi.com/definitions/2.1.0/ReferenceObject.json" - } - } - }, - "http://asyncapi.com/definitions/2.1.0/schema.json": { - "$id": "http://asyncapi.com/definitions/2.1.0/schema.json", - "allOf": [ - { - "$ref": "http://json-schema.org/draft-07/schema#" - }, - { - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "http://asyncapi.com/definitions/2.1.0/specificationExtension.json" - } - }, - "properties": { - "additionalProperties": { - "anyOf": [ - { - "$ref": "http://asyncapi.com/definitions/2.1.0/schema.json" - }, - { - "type": "boolean" - } - ], - "default": {} - }, - "items": { - "anyOf": [ - { - "$ref": "http://asyncapi.com/definitions/2.1.0/schema.json" - }, - { - "type": "array", - "minItems": 1, - "items": { - "$ref": "http://asyncapi.com/definitions/2.1.0/schema.json" - } - } - ], - "default": {} - }, - "allOf": { - "type": "array", - "minItems": 1, - "items": { - "$ref": "http://asyncapi.com/definitions/2.1.0/schema.json" - } - }, - "oneOf": { - "type": "array", - "minItems": 1, - "items": { - "$ref": "http://asyncapi.com/definitions/2.1.0/schema.json" - } - }, - "anyOf": { - "type": "array", - "minItems": 1, - "items": { - "$ref": "http://asyncapi.com/definitions/2.1.0/schema.json" - } - }, - "not": { - "$ref": "http://asyncapi.com/definitions/2.1.0/schema.json" - }, - "properties": { - "type": "object", - "additionalProperties": { - "$ref": "http://asyncapi.com/definitions/2.1.0/schema.json" - }, - "default": {} - }, - "patternProperties": { - "type": "object", - "additionalProperties": { - "$ref": "http://asyncapi.com/definitions/2.1.0/schema.json" - }, - "default": {} - }, - "propertyNames": { - "$ref": "http://asyncapi.com/definitions/2.1.0/schema.json" - }, - "contains": { - "$ref": "http://asyncapi.com/definitions/2.1.0/schema.json" - }, - "discriminator": { - "type": "string" - }, - "externalDocs": { - "$ref": "http://asyncapi.com/definitions/2.1.0/externalDocs.json" - }, - "deprecated": { - "type": "boolean", - "default": false - } - } - } - ] - }, - "http://json-schema.org/draft-07/schema": { - "$id": "http://json-schema.org/draft-07/schema", - "title": "Core schema meta-schema", - "definitions": { - "schemaArray": { - "type": "array", - "minItems": 1, - "items": { - "$ref": "#" - } - }, - "nonNegativeInteger": { - "type": "integer", - "minimum": 0 - }, - "nonNegativeIntegerDefault0": { - "allOf": [ - { - "$ref": "#/definitions/nonNegativeInteger" - }, - { - "default": 0 - } - ] - }, - "simpleTypes": { - "enum": [ - "array", - "boolean", - "integer", - "null", - "number", - "object", - "string" - ] - }, - "stringArray": { - "type": "array", - "items": { - "type": "string" - }, - "uniqueItems": true, - "default": [] - } - }, - "type": [ - "object", - "boolean" - ], - "properties": { - "$id": { - "type": "string", - "format": "uri-reference" - }, - "$schema": { - "type": "string", - "format": "uri" - }, - "$ref": { - "type": "string", - "format": "uri-reference" + "type": "string", + "format": "uri-reference" }, "$comment": { "type": "string" @@ -713,8 +527,8 @@ }, "default": true }, - "http://asyncapi.com/definitions/2.1.0/externalDocs.json": { - "$id": "http://asyncapi.com/definitions/2.1.0/externalDocs.json", + "externalDocs.json": { + "$id": "externalDocs.json", "type": "object", "additionalProperties": false, "description": "information about external documentation", @@ -736,9 +550,105 @@ } } }, - "http://asyncapi.com/definitions/2.1.0/operation.json": { - "$id": "http://asyncapi.com/definitions/2.1.0/operation.json", - "type": "object", + "schema.json": { + "$id": "schema.json", + "allOf": [ + { + "$ref": "http://json-schema.org/draft-07/schema#" + }, + { + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.1.0/specificationExtension.json" + } + }, + "properties": { + "additionalProperties": { + "anyOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.1.0/schema.json" + }, + { + "type": "boolean" + } + ], + "default": {} + }, + "items": { + "anyOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.1.0/schema.json" + }, + { + "type": "array", + "minItems": 1, + "items": { + "$ref": "http://asyncapi.com/definitions/2.1.0/schema.json" + } + } + ], + "default": {} + }, + "allOf": { + "type": "array", + "minItems": 1, + "items": { + "$ref": "http://asyncapi.com/definitions/2.1.0/schema.json" + } + }, + "oneOf": { + "type": "array", + "minItems": 1, + "items": { + "$ref": "http://asyncapi.com/definitions/2.1.0/schema.json" + } + }, + "anyOf": { + "type": "array", + "minItems": 1, + "items": { + "$ref": "http://asyncapi.com/definitions/2.1.0/schema.json" + } + }, + "not": { + "$ref": "http://asyncapi.com/definitions/2.1.0/schema.json" + }, + "properties": { + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/2.1.0/schema.json" + }, + "default": {} + }, + "patternProperties": { + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/2.1.0/schema.json" + }, + "default": {} + }, + "propertyNames": { + "$ref": "http://asyncapi.com/definitions/2.1.0/schema.json" + }, + "contains": { + "$ref": "http://asyncapi.com/definitions/2.1.0/schema.json" + }, + "discriminator": { + "type": "string" + }, + "externalDocs": { + "$ref": "http://asyncapi.com/definitions/2.1.0/externalDocs.json" + }, + "deprecated": { + "type": "boolean", + "default": false + } + } + } + ] + }, + "parameter.json": { + "$id": "parameter.json", "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { @@ -746,52 +656,68 @@ } }, "properties": { - "traits": { - "type": "array", - "items": { - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/2.1.0/Reference.json" - }, - { - "$ref": "http://asyncapi.com/definitions/2.1.0/operationTrait.json" - } - ] - } - }, - "summary": { - "type": "string" - }, "description": { - "type": "string" - }, - "tags": { - "type": "array", - "items": { - "$ref": "http://asyncapi.com/definitions/2.1.0/tag.json" - }, - "uniqueItems": true - }, - "externalDocs": { - "$ref": "http://asyncapi.com/definitions/2.1.0/externalDocs.json" + "type": "string", + "description": "A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed." }, - "operationId": { - "type": "string" + "schema": { + "$ref": "http://asyncapi.com/definitions/2.1.0/schema.json" }, - "bindings": { - "$ref": "http://asyncapi.com/definitions/2.1.0/bindingsObject.json" + "location": { + "type": "string", + "description": "A runtime expression that specifies the location of the parameter value", + "pattern": "^\\$message\\.(header|payload)#(\\/(([^\\/~])|(~[01]))*)*" }, - "message": { - "$ref": "http://asyncapi.com/definitions/2.1.0/message.json" + "$ref": { + "$ref": "http://asyncapi.com/definitions/2.1.0/ReferenceObject.json" } } }, - "http://asyncapi.com/definitions/2.1.0/operationTrait.json": { - "$id": "http://asyncapi.com/definitions/2.1.0/operationTrait.json", + "parameters.json": { + "$id": "parameters.json", "type": "object", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { + "additionalProperties": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.1.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.1.0/parameter.json" + } + ] + }, + "description": "JSON objects describing re-usable channel parameters." + }, + "tag.json": { + "$id": "tag.json", + "type": "object", + "additionalProperties": false, + "required": [ + "name" + ], + "properties": { + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "externalDocs": { + "$ref": "http://asyncapi.com/definitions/2.1.0/externalDocs.json" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.1.0/specificationExtension.json" + } + } + }, + "operationTrait.json": { + "$id": "operationTrait.json", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { "$ref": "http://asyncapi.com/definitions/2.1.0/specificationExtension.json" } }, @@ -820,394 +746,110 @@ } } }, - "http://asyncapi.com/definitions/2.1.0/tag.json": { - "$id": "http://asyncapi.com/definitions/2.1.0/tag.json", + "correlationId.json": { + "$id": "correlationId.json", "type": "object", - "additionalProperties": false, "required": [ - "name" + "location" ], + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.1.0/specificationExtension.json" + } + }, "properties": { - "name": { - "type": "string" - }, "description": { - "type": "string" + "type": "string", + "description": "A optional description of the correlation ID. GitHub Flavored Markdown is allowed." }, - "externalDocs": { - "$ref": "http://asyncapi.com/definitions/2.1.0/externalDocs.json" + "location": { + "type": "string", + "description": "A runtime expression that specifies the location of the correlation ID", + "pattern": "^\\$message\\.(header|payload)#(\\/(([^\\/~])|(~[01]))*)*" } - }, + } + }, + "messageTrait.json": { + "$id": "messageTrait.json", + "type": "object", + "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { "$ref": "http://asyncapi.com/definitions/2.1.0/specificationExtension.json" } - } - }, - "http://asyncapi.com/definitions/2.1.0/message.json": { - "$id": "http://asyncapi.com/definitions/2.1.0/message.json", - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/2.1.0/Reference.json" + }, + "properties": { + "schemaFormat": { + "type": "string" }, - { - "oneOf": [ + "contentType": { + "type": "string" + }, + "headers": { + "allOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.1.0/schema.json" + }, { - "type": "object", - "required": [ - "oneOf" - ], - "additionalProperties": false, "properties": { - "oneOf": { - "type": "array", - "items": { - "$ref": "http://asyncapi.com/definitions/2.1.0/message.json" - } + "type": { + "const": "object" } } + } + ] + }, + "correlationId": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.1.0/Reference.json" }, { - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "http://asyncapi.com/definitions/2.1.0/specificationExtension.json" - } - }, - "properties": { - "schemaFormat": { - "type": "string" - }, - "contentType": { - "type": "string" - }, - "headers": { - "allOf": [ - { - "$ref": "http://asyncapi.com/definitions/2.1.0/schema.json" - }, - { - "properties": { - "type": { - "const": "object" - } - } - } - ] - }, - "payload": {}, - "correlationId": { - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/2.1.0/Reference.json" - }, - { - "$ref": "http://asyncapi.com/definitions/2.1.0/correlationId.json" - } - ] - }, - "tags": { - "type": "array", - "items": { - "$ref": "http://asyncapi.com/definitions/2.1.0/tag.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." - }, - "externalDocs": { - "$ref": "http://asyncapi.com/definitions/2.1.0/externalDocs.json" - }, - "deprecated": { - "type": "boolean", - "default": false - }, - "examples": { - "type": "array", - "items": { - "type": "object", - "additionalProperties": false, - "anyOf": [ - { - "required": [ - "payload" - ] - }, - { - "required": [ - "headers" - ] - } - ], - "properties": { - "name": { - "type": "string", - "description": "Machine readable name of the message example." - }, - "summary": { - "type": "string", - "description": "A brief summary of the message example." - }, - "headers": { - "type": "object" - }, - "payload": {} - } - } - }, - "bindings": { - "$ref": "http://asyncapi.com/definitions/2.1.0/bindingsObject.json" - }, - "traits": { - "type": "array", - "items": { - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/2.1.0/Reference.json" - }, - { - "$ref": "http://asyncapi.com/definitions/2.1.0/messageTrait.json" - } - ] - } - } - }, - "allOf": [ - { - "if": { - "not": { - "required": [ - "schemaFormat" - ] - } - }, - "then": { - "properties": { - "payload": { - "$ref": "http://asyncapi.com/definitions/2.1.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" - ] - } - } - }, - "then": { - "properties": { - "payload": { - "$ref": "http://asyncapi.com/definitions/2.1.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/2.1.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/2.1.0/avroSchema_v1.json" - } - } - } - } - ] - } - ] - } - ] - }, - "http://asyncapi.com/definitions/2.1.0/correlationId.json": { - "$id": "http://asyncapi.com/definitions/2.1.0/correlationId.json", - "type": "object", - "required": [ - "location" - ], - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "http://asyncapi.com/definitions/2.1.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/2.1.0/messageTrait.json": { - "$id": "http://asyncapi.com/definitions/2.1.0/messageTrait.json", - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "http://asyncapi.com/definitions/2.1.0/specificationExtension.json" - } - }, - "properties": { - "schemaFormat": { - "type": "string" - }, - "contentType": { - "type": "string" - }, - "headers": { - "allOf": [ - { - "$ref": "http://asyncapi.com/definitions/2.1.0/schema.json" - }, - { - "properties": { - "type": { - "const": "object" - } - } - } - ] - }, - "correlationId": { - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/2.1.0/Reference.json" - }, - { - "$ref": "http://asyncapi.com/definitions/2.1.0/correlationId.json" - } - ] - }, - "tags": { - "type": "array", - "items": { - "$ref": "http://asyncapi.com/definitions/2.1.0/tag.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." - }, - "externalDocs": { - "$ref": "http://asyncapi.com/definitions/2.1.0/externalDocs.json" - }, - "deprecated": { - "type": "boolean", - "default": false - }, - "examples": { - "type": "array", - "items": { - "type": "object", - "additionalProperties": false, - "anyOf": [ - { - "required": [ - "payload" - ] + "$ref": "http://asyncapi.com/definitions/2.1.0/correlationId.json" + } + ] + }, + "tags": { + "type": "array", + "items": { + "$ref": "http://asyncapi.com/definitions/2.1.0/tag.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." + }, + "externalDocs": { + "$ref": "http://asyncapi.com/definitions/2.1.0/externalDocs.json" + }, + "deprecated": { + "type": "boolean", + "default": false + }, + "examples": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "anyOf": [ + { + "required": [ + "payload" + ] }, { "required": [ @@ -1236,8 +878,8 @@ } } }, - "http://asyncapi.com/definitions/2.1.0/openapiSchema_3_0.json": { - "$id": "http://asyncapi.com/definitions/2.1.0/openapiSchema_3_0.json", + "openapiSchema_3_0.json": { + "$id": "openapiSchema_3_0.json", "type": "object", "definitions": { "ExternalDocumentation": { @@ -1523,8 +1165,8 @@ }, "additionalProperties": false }, - "http://asyncapi.com/definitions/2.1.0/avroSchema_v1.json": { - "$id": "http://asyncapi.com/definitions/2.1.0/avroSchema_v1.json", + "avroSchema_v1.json": { + "$id": "avroSchema_v1.json", "definitions": { "avroSchema": { "title": "Avro Schema", @@ -1839,144 +1481,381 @@ ], "title": "Avro Schema Definition" }, - "http://asyncapi.com/definitions/2.1.0/components.json": { - "$id": "http://asyncapi.com/definitions/2.1.0/components.json", - "type": "object", - "description": "An object to hold a set of reusable objects for different aspects of the AsyncAPI Specification.", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "http://asyncapi.com/definitions/2.1.0/specificationExtension.json" - } - }, - "properties": { - "schemas": { - "$ref": "http://asyncapi.com/definitions/2.1.0/schemas.json" - }, - "messages": { - "$ref": "http://asyncapi.com/definitions/2.1.0/messages.json" + "message.json": { + "$id": "message.json", + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.1.0/Reference.json" }, - "securitySchemes": { - "type": "object", - "patternProperties": { - "^[\\w\\d\\.\\-_]+$": { - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/2.1.0/Reference.json" - }, - { - "$ref": "http://asyncapi.com/definitions/2.1.0/SecurityScheme.json" - } - ] - } - } - }, - "parameters": { - "$ref": "http://asyncapi.com/definitions/2.1.0/parameters.json" - }, - "correlationIds": { - "type": "object", - "patternProperties": { - "^[\\w\\d\\.\\-_]+$": { - "oneOf": [ + { + "oneOf": [ + { + "type": "object", + "required": [ + "oneOf" + ], + "additionalProperties": false, + "properties": { + "oneOf": { + "type": "array", + "items": { + "$ref": "http://asyncapi.com/definitions/2.1.0/message.json" + } + } + } + }, + { + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.1.0/specificationExtension.json" + } + }, + "properties": { + "schemaFormat": { + "type": "string" + }, + "contentType": { + "type": "string" + }, + "headers": { + "allOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.1.0/schema.json" + }, + { + "properties": { + "type": { + "const": "object" + } + } + } + ] + }, + "payload": {}, + "correlationId": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.1.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.1.0/correlationId.json" + } + ] + }, + "tags": { + "type": "array", + "items": { + "$ref": "http://asyncapi.com/definitions/2.1.0/tag.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." + }, + "externalDocs": { + "$ref": "http://asyncapi.com/definitions/2.1.0/externalDocs.json" + }, + "deprecated": { + "type": "boolean", + "default": false + }, + "examples": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "anyOf": [ + { + "required": [ + "payload" + ] + }, + { + "required": [ + "headers" + ] + } + ], + "properties": { + "name": { + "type": "string", + "description": "Machine readable name of the message example." + }, + "summary": { + "type": "string", + "description": "A brief summary of the message example." + }, + "headers": { + "type": "object" + }, + "payload": {} + } + } + }, + "bindings": { + "$ref": "http://asyncapi.com/definitions/2.1.0/bindingsObject.json" + }, + "traits": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.1.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.1.0/messageTrait.json" + } + ] + } + } + }, + "allOf": [ { - "$ref": "http://asyncapi.com/definitions/2.1.0/Reference.json" + "if": { + "not": { + "required": [ + "schemaFormat" + ] + } + }, + "then": { + "properties": { + "payload": { + "$ref": "http://asyncapi.com/definitions/2.1.0/schema.json" + } + } + } }, { - "$ref": "http://asyncapi.com/definitions/2.1.0/correlationId.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" + ] + } + } + }, + "then": { + "properties": { + "payload": { + "$ref": "http://asyncapi.com/definitions/2.1.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/2.1.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/2.1.0/avroSchema_v1.json" + } + } + } } ] } + ] + } + ] + }, + "operation.json": { + "$id": "operation.json", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.1.0/specificationExtension.json" + } + }, + "properties": { + "traits": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.1.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.1.0/operationTrait.json" + } + ] } }, - "operationTraits": { - "type": "object", - "additionalProperties": { - "$ref": "http://asyncapi.com/definitions/2.1.0/operationTrait.json" - } + "summary": { + "type": "string" }, - "messageTraits": { - "type": "object", - "additionalProperties": { - "$ref": "http://asyncapi.com/definitions/2.1.0/messageTrait.json" - } + "description": { + "type": "string" }, - "serverBindings": { - "type": "object", - "additionalProperties": { - "$ref": "http://asyncapi.com/definitions/2.1.0/bindingsObject.json" - } + "tags": { + "type": "array", + "items": { + "$ref": "http://asyncapi.com/definitions/2.1.0/tag.json" + }, + "uniqueItems": true }, - "channelBindings": { - "type": "object", - "additionalProperties": { - "$ref": "http://asyncapi.com/definitions/2.1.0/bindingsObject.json" - } + "externalDocs": { + "$ref": "http://asyncapi.com/definitions/2.1.0/externalDocs.json" }, - "operationBindings": { - "type": "object", - "additionalProperties": { - "$ref": "http://asyncapi.com/definitions/2.1.0/bindingsObject.json" - } + "operationId": { + "type": "string" }, - "messageBindings": { - "type": "object", - "additionalProperties": { - "$ref": "http://asyncapi.com/definitions/2.1.0/bindingsObject.json" - } + "bindings": { + "$ref": "http://asyncapi.com/definitions/2.1.0/bindingsObject.json" + }, + "message": { + "$ref": "http://asyncapi.com/definitions/2.1.0/message.json" + } + } + }, + "channelItem.json": { + "$id": "channelItem.json", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.1.0/specificationExtension.json" + } + }, + "properties": { + "$ref": { + "$ref": "http://asyncapi.com/definitions/2.1.0/ReferenceObject.json" + }, + "parameters": { + "$ref": "http://asyncapi.com/definitions/2.1.0/parameters.json" + }, + "description": { + "type": "string", + "description": "A description of the channel." + }, + "publish": { + "$ref": "http://asyncapi.com/definitions/2.1.0/operation.json" + }, + "subscribe": { + "$ref": "http://asyncapi.com/definitions/2.1.0/operation.json" + }, + "deprecated": { + "type": "boolean", + "default": false + }, + "bindings": { + "$ref": "http://asyncapi.com/definitions/2.1.0/bindingsObject.json" } } }, - "http://asyncapi.com/definitions/2.1.0/schemas.json": { - "$id": "http://asyncapi.com/definitions/2.1.0/schemas.json", + "channels.json": { + "$id": "channels.json", + "type": "object", + "propertyNames": { + "type": "string", + "format": "uri-template", + "minLength": 1 + }, + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/2.1.0/channelItem.json" + } + }, + "schemas.json": { + "$id": "schemas.json", "type": "object", "additionalProperties": { "$ref": "http://asyncapi.com/definitions/2.1.0/schema.json" }, "description": "JSON objects describing schemas the API uses." }, - "http://asyncapi.com/definitions/2.1.0/messages.json": { - "$id": "http://asyncapi.com/definitions/2.1.0/messages.json", + "messages.json": { + "$id": "messages.json", "type": "object", "additionalProperties": { "$ref": "http://asyncapi.com/definitions/2.1.0/message.json" }, "description": "JSON objects describing the messages being consumed and produced by the API." }, - "http://asyncapi.com/definitions/2.1.0/SecurityScheme.json": { - "$id": "http://asyncapi.com/definitions/2.1.0/SecurityScheme.json", - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/2.1.0/userPassword.json" - }, - { - "$ref": "http://asyncapi.com/definitions/2.1.0/apiKey.json" - }, - { - "$ref": "http://asyncapi.com/definitions/2.1.0/X509.json" - }, - { - "$ref": "http://asyncapi.com/definitions/2.1.0/symmetricEncryption.json" - }, - { - "$ref": "http://asyncapi.com/definitions/2.1.0/asymmetricEncryption.json" - }, - { - "$ref": "http://asyncapi.com/definitions/2.1.0/HTTPSecurityScheme.json" - }, - { - "$ref": "http://asyncapi.com/definitions/2.1.0/oauth2Flows.json" - }, - { - "$ref": "http://asyncapi.com/definitions/2.1.0/openIdConnect.json" - }, - { - "$ref": "http://asyncapi.com/definitions/2.1.0/SaslSecurityScheme.json" - } - ] - }, - "http://asyncapi.com/definitions/2.1.0/userPassword.json": { - "$id": "http://asyncapi.com/definitions/2.1.0/userPassword.json", + "userPassword.json": { + "$id": "userPassword.json", "type": "object", "required": [ "type" @@ -1999,8 +1878,8 @@ }, "additionalProperties": false }, - "http://asyncapi.com/definitions/2.1.0/apiKey.json": { - "$id": "http://asyncapi.com/definitions/2.1.0/apiKey.json", + "apiKey.json": { + "$id": "apiKey.json", "type": "object", "required": [ "type", @@ -2031,8 +1910,8 @@ }, "additionalProperties": false }, - "http://asyncapi.com/definitions/2.1.0/X509.json": { - "$id": "http://asyncapi.com/definitions/2.1.0/X509.json", + "X509.json": { + "$id": "X509.json", "type": "object", "required": [ "type" @@ -2055,8 +1934,8 @@ }, "additionalProperties": false }, - "http://asyncapi.com/definitions/2.1.0/symmetricEncryption.json": { - "$id": "http://asyncapi.com/definitions/2.1.0/symmetricEncryption.json", + "symmetricEncryption.json": { + "$id": "symmetricEncryption.json", "type": "object", "required": [ "type" @@ -2079,8 +1958,8 @@ }, "additionalProperties": false }, - "http://asyncapi.com/definitions/2.1.0/asymmetricEncryption.json": { - "$id": "http://asyncapi.com/definitions/2.1.0/asymmetricEncryption.json", + "asymmetricEncryption.json": { + "$id": "asymmetricEncryption.json", "type": "object", "required": [ "type" @@ -2103,22 +1982,8 @@ }, "additionalProperties": false }, - "http://asyncapi.com/definitions/2.1.0/HTTPSecurityScheme.json": { - "$id": "http://asyncapi.com/definitions/2.1.0/HTTPSecurityScheme.json", - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/2.1.0/NonBearerHTTPSecurityScheme.json" - }, - { - "$ref": "http://asyncapi.com/definitions/2.1.0/BearerHTTPSecurityScheme.json" - }, - { - "$ref": "http://asyncapi.com/definitions/2.1.0/APIKeyHTTPSecurityScheme.json" - } - ] - }, - "http://asyncapi.com/definitions/2.1.0/NonBearerHTTPSecurityScheme.json": { - "$id": "http://asyncapi.com/definitions/2.1.0/NonBearerHTTPSecurityScheme.json", + "NonBearerHTTPSecurityScheme.json": { + "$id": "NonBearerHTTPSecurityScheme.json", "not": { "type": "object", "properties": { @@ -2156,8 +2021,8 @@ }, "additionalProperties": false }, - "http://asyncapi.com/definitions/2.1.0/BearerHTTPSecurityScheme.json": { - "$id": "http://asyncapi.com/definitions/2.1.0/BearerHTTPSecurityScheme.json", + "BearerHTTPSecurityScheme.json": { + "$id": "BearerHTTPSecurityScheme.json", "type": "object", "required": [ "type", @@ -2190,8 +2055,8 @@ }, "additionalProperties": false }, - "http://asyncapi.com/definitions/2.1.0/APIKeyHTTPSecurityScheme.json": { - "$id": "http://asyncapi.com/definitions/2.1.0/APIKeyHTTPSecurityScheme.json", + "APIKeyHTTPSecurityScheme.json": { + "$id": "APIKeyHTTPSecurityScheme.json", "type": "object", "required": [ "type", @@ -2227,8 +2092,56 @@ }, "additionalProperties": false }, - "http://asyncapi.com/definitions/2.1.0/oauth2Flows.json": { - "$id": "http://asyncapi.com/definitions/2.1.0/oauth2Flows.json", + "HTTPSecurityScheme.json": { + "$id": "HTTPSecurityScheme.json", + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.1.0/NonBearerHTTPSecurityScheme.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.1.0/BearerHTTPSecurityScheme.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.1.0/APIKeyHTTPSecurityScheme.json" + } + ] + }, + "oauth2Scopes.json": { + "$id": "oauth2Scopes.json", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "oauth2Flow.json": { + "$id": "oauth2Flow.json", + "type": "object", + "properties": { + "authorizationUrl": { + "type": "string", + "format": "uri" + }, + "tokenUrl": { + "type": "string", + "format": "uri" + }, + "refreshUrl": { + "type": "string", + "format": "uri" + }, + "scopes": { + "$ref": "http://asyncapi.com/definitions/2.1.0/oauth2Scopes.json" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.1.0/specificationExtension.json" + } + }, + "additionalProperties": false + }, + "oauth2Flows.json": { + "$id": "oauth2Flows.json", "type": "object", "required": [ "type", @@ -2331,42 +2244,8 @@ } } }, - "http://asyncapi.com/definitions/2.1.0/oauth2Flow.json": { - "$id": "http://asyncapi.com/definitions/2.1.0/oauth2Flow.json", - "type": "object", - "properties": { - "authorizationUrl": { - "type": "string", - "format": "uri" - }, - "tokenUrl": { - "type": "string", - "format": "uri" - }, - "refreshUrl": { - "type": "string", - "format": "uri" - }, - "scopes": { - "$ref": "http://asyncapi.com/definitions/2.1.0/oauth2Scopes.json" - } - }, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "http://asyncapi.com/definitions/2.1.0/specificationExtension.json" - } - }, - "additionalProperties": false - }, - "http://asyncapi.com/definitions/2.1.0/oauth2Scopes.json": { - "$id": "http://asyncapi.com/definitions/2.1.0/oauth2Scopes.json", - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "http://asyncapi.com/definitions/2.1.0/openIdConnect.json": { - "$id": "http://asyncapi.com/definitions/2.1.0/openIdConnect.json", + "openIdConnect.json": { + "$id": "openIdConnect.json", "type": "object", "required": [ "type", @@ -2394,22 +2273,8 @@ }, "additionalProperties": false }, - "http://asyncapi.com/definitions/2.1.0/SaslSecurityScheme.json": { - "$id": "http://asyncapi.com/definitions/2.1.0/SaslSecurityScheme.json", - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/2.1.0/SaslPlainSecurityScheme.json" - }, - { - "$ref": "http://asyncapi.com/definitions/2.1.0/SaslScramSecurityScheme.json" - }, - { - "$ref": "http://asyncapi.com/definitions/2.1.0/SaslGssapiSecurityScheme.json" - } - ] - }, - "http://asyncapi.com/definitions/2.1.0/SaslPlainSecurityScheme.json": { - "$id": "http://asyncapi.com/definitions/2.1.0/SaslPlainSecurityScheme.json", + "SaslPlainSecurityScheme.json": { + "$id": "SaslPlainSecurityScheme.json", "type": "object", "required": [ "type" @@ -2432,8 +2297,8 @@ }, "additionalProperties": false }, - "http://asyncapi.com/definitions/2.1.0/SaslScramSecurityScheme.json": { - "$id": "http://asyncapi.com/definitions/2.1.0/SaslScramSecurityScheme.json", + "SaslScramSecurityScheme.json": { + "$id": "SaslScramSecurityScheme.json", "type": "object", "required": [ "type" @@ -2457,8 +2322,8 @@ }, "additionalProperties": false }, - "http://asyncapi.com/definitions/2.1.0/SaslGssapiSecurityScheme.json": { - "$id": "http://asyncapi.com/definitions/2.1.0/SaslGssapiSecurityScheme.json", + "SaslGssapiSecurityScheme.json": { + "$id": "SaslGssapiSecurityScheme.json", "type": "object", "required": [ "type" @@ -2480,7 +2345,142 @@ } }, "additionalProperties": false + }, + "SaslSecurityScheme.json": { + "$id": "SaslSecurityScheme.json", + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.1.0/SaslPlainSecurityScheme.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.1.0/SaslScramSecurityScheme.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.1.0/SaslGssapiSecurityScheme.json" + } + ] + }, + "SecurityScheme.json": { + "$id": "SecurityScheme.json", + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.1.0/userPassword.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.1.0/apiKey.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.1.0/X509.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.1.0/symmetricEncryption.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.1.0/asymmetricEncryption.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.1.0/HTTPSecurityScheme.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.1.0/oauth2Flows.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.1.0/openIdConnect.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.1.0/SaslSecurityScheme.json" + } + ] + }, + "components.json": { + "$id": "components.json", + "type": "object", + "description": "An object to hold a set of reusable objects for different aspects of the AsyncAPI Specification.", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.1.0/specificationExtension.json" + } + }, + "properties": { + "schemas": { + "$ref": "http://asyncapi.com/definitions/2.1.0/schemas.json" + }, + "messages": { + "$ref": "http://asyncapi.com/definitions/2.1.0/messages.json" + }, + "securitySchemes": { + "type": "object", + "patternProperties": { + "^[\\w\\d\\.\\-_]+$": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.1.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.1.0/SecurityScheme.json" + } + ] + } + } + }, + "parameters": { + "$ref": "http://asyncapi.com/definitions/2.1.0/parameters.json" + }, + "correlationIds": { + "type": "object", + "patternProperties": { + "^[\\w\\d\\.\\-_]+$": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.1.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.1.0/correlationId.json" + } + ] + } + } + }, + "operationTraits": { + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/2.1.0/operationTrait.json" + } + }, + "messageTraits": { + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/2.1.0/messageTrait.json" + } + }, + "serverBindings": { + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/2.1.0/bindingsObject.json" + } + }, + "channelBindings": { + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/2.1.0/bindingsObject.json" + } + }, + "operationBindings": { + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/2.1.0/bindingsObject.json" + } + }, + "messageBindings": { + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/2.1.0/bindingsObject.json" + } + } + } } }, + "$id": "http://asyncapi.com/definitions/2.1.0/asyncapi.json", "description": "!!Auto generated!! \n Do not manually edit. " } \ No newline at end of file diff --git a/schemas/2.2.0-without-$id.json b/schemas/2.2.0-without-$id.json index d2306956..73d4d6fe 100644 --- a/schemas/2.2.0-without-$id.json +++ b/schemas/2.2.0-without-$id.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema", + "$schema": "http://json-schema.org/draft-07/schema#", "title": "AsyncAPI 2.2.0 schema.", "type": "object", "required": [ @@ -61,45 +61,6 @@ "additionalProperties": true, "additionalItems": true }, - "info": { - "type": "object", - "description": "General information about the API.", - "required": [ - "version", - "title" - ], - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "properties": { - "title": { - "type": "string", - "description": "A unique and precise title of the API." - }, - "version": { - "type": "string", - "description": "A semantic version number of the API." - }, - "description": { - "type": "string", - "description": "A longer description of the API. Should be different from the title. CommonMark is allowed." - }, - "termsOfService": { - "type": "string", - "description": "A URL to the Terms of Service for the API. MUST be in the format of a URL.", - "format": "uri" - }, - "contact": { - "$ref": "#/definitions/contact" - }, - "license": { - "$ref": "#/definitions/license" - } - } - }, "contact": { "type": "object", "description": "Contact information for the owners of the API.", @@ -149,12 +110,12 @@ } } }, - "server": { + "info": { "type": "object", - "description": "An object representing a Server.", + "description": "General information about the API.", "required": [ - "url", - "protocol" + "version", + "title" ], "additionalProperties": false, "patternProperties": { @@ -163,39 +124,31 @@ } }, "properties": { - "url": { - "type": "string" - }, - "description": { - "type": "string" + "title": { + "type": "string", + "description": "A unique and precise title of the API." }, - "protocol": { + "version": { "type": "string", - "description": "The transfer protocol." + "description": "A semantic version number of the API." }, - "protocolVersion": { - "type": "string" + "description": { + "type": "string", + "description": "A longer description of the API. Should be different from the title. CommonMark is allowed." }, - "variables": { - "$ref": "#/definitions/serverVariables" + "termsOfService": { + "type": "string", + "description": "A URL to the Terms of Service for the API. MUST be in the format of a URL.", + "format": "uri" }, - "security": { - "type": "array", - "items": { - "$ref": "#/definitions/SecurityRequirement" - } + "contact": { + "$ref": "#/definitions/contact" }, - "bindings": { - "$ref": "#/definitions/bindingsObject" + "license": { + "$ref": "#/definitions/license" } } }, - "serverVariables": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/serverVariable" - } - }, "serverVariable": { "type": "object", "description": "An object representing a Server Variable for server URL template substitution.", @@ -227,6 +180,12 @@ } } }, + "serverVariables": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/serverVariable" + } + }, "SecurityRequirement": { "type": "object", "additionalProperties": { @@ -258,19 +217,13 @@ "ibmmq": {} } }, - "channels": { - "type": "object", - "propertyNames": { - "type": "string", - "format": "uri-template", - "minLength": 1 - }, - "additionalProperties": { - "$ref": "#/definitions/channelItem" - } - }, - "channelItem": { + "server": { "type": "object", + "description": "An object representing a Server.", + "required": [ + "url", + "protocol" + ], "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { @@ -278,33 +231,27 @@ } }, "properties": { - "$ref": { - "$ref": "#/definitions/ReferenceObject" - }, - "parameters": { - "$ref": "#/definitions/parameters" + "url": { + "type": "string" }, "description": { - "type": "string", - "description": "A description of the channel." + "type": "string" }, - "servers": { - "type": "array", - "description": "The names of the servers on which this channel is available. If absent or empty then this channel must be available on all servers.", - "items": { - "type": "string" - }, - "uniqueItems": true + "protocol": { + "type": "string", + "description": "The transfer protocol." }, - "publish": { - "$ref": "#/definitions/operation" + "protocolVersion": { + "type": "string" }, - "subscribe": { - "$ref": "#/definitions/operation" + "variables": { + "$ref": "#/definitions/serverVariables" }, - "deprecated": { - "type": "boolean", - "default": false + "security": { + "type": "array", + "items": { + "$ref": "#/definitions/SecurityRequirement" + } }, "bindings": { "$ref": "#/definitions/bindingsObject" @@ -315,20 +262,6 @@ "type": "string", "format": "uri-reference" }, - "parameters": { - "type": "object", - "additionalProperties": { - "oneOf": [ - { - "$ref": "#/definitions/Reference" - }, - { - "$ref": "#/definitions/parameter" - } - ] - }, - "description": "JSON objects describing re-usable channel parameters." - }, "Reference": { "type": "object", "required": [ @@ -340,187 +273,66 @@ } } }, - "parameter": { - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" + "json-schema-draft-07-schema": { + "title": "Core schema meta-schema", + "definitions": { + "schemaArray": { + "type": "array", + "minItems": 1, + "items": { + "$ref": "#/definitions/json-schema-draft-07-schema" + } + }, + "nonNegativeInteger": { + "type": "integer", + "minimum": 0 + }, + "nonNegativeIntegerDefault0": { + "allOf": [ + { + "$ref": "#/definitions/json-schema-draft-07-schema/definitions/nonNegativeInteger" + }, + { + "default": 0 + } + ] + }, + "simpleTypes": { + "enum": [ + "array", + "boolean", + "integer", + "null", + "number", + "object", + "string" + ] + }, + "stringArray": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true, + "default": [] } }, + "type": [ + "object", + "boolean" + ], "properties": { - "description": { + "$id": { "type": "string", - "description": "A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed." - }, - "schema": { - "$ref": "#/definitions/schema" + "format": "uri-reference" }, - "location": { + "$schema": { "type": "string", - "description": "A runtime expression that specifies the location of the parameter value", - "pattern": "^\\$message\\.(header|payload)#(\\/(([^\\/~])|(~[01]))*)*" + "format": "uri" }, "$ref": { - "$ref": "#/definitions/ReferenceObject" - } - } - }, - "schema": { - "allOf": [ - { - "$ref": "#/definitions/json-schema-draft-07-schema" - }, - { - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "properties": { - "additionalProperties": { - "anyOf": [ - { - "$ref": "#/definitions/schema" - }, - { - "type": "boolean" - } - ], - "default": {} - }, - "items": { - "anyOf": [ - { - "$ref": "#/definitions/schema" - }, - { - "type": "array", - "minItems": 1, - "items": { - "$ref": "#/definitions/schema" - } - } - ], - "default": {} - }, - "allOf": { - "type": "array", - "minItems": 1, - "items": { - "$ref": "#/definitions/schema" - } - }, - "oneOf": { - "type": "array", - "minItems": 1, - "items": { - "$ref": "#/definitions/schema" - } - }, - "anyOf": { - "type": "array", - "minItems": 1, - "items": { - "$ref": "#/definitions/schema" - } - }, - "not": { - "$ref": "#/definitions/schema" - }, - "properties": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/schema" - }, - "default": {} - }, - "patternProperties": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/schema" - }, - "default": {} - }, - "propertyNames": { - "$ref": "#/definitions/schema" - }, - "contains": { - "$ref": "#/definitions/schema" - }, - "discriminator": { - "type": "string" - }, - "externalDocs": { - "$ref": "#/definitions/externalDocs" - }, - "deprecated": { - "type": "boolean", - "default": false - } - } - } - ] - }, - "json-schema-draft-07-schema": { - "title": "Core schema meta-schema", - "definitions": { - "schemaArray": { - "type": "array", - "minItems": 1, - "items": { - "$ref": "#/definitions/json-schema-draft-07-schema" - } - }, - "nonNegativeInteger": { - "type": "integer", - "minimum": 0 - }, - "nonNegativeIntegerDefault0": { - "allOf": [ - { - "$ref": "#/definitions/json-schema-draft-07-schema/definitions/nonNegativeInteger" - }, - { - "default": 0 - } - ] - }, - "simpleTypes": { - "enum": [ - "array", - "boolean", - "integer", - "null", - "number", - "object", - "string" - ] - }, - "stringArray": { - "type": "array", - "items": { - "type": "string" - }, - "uniqueItems": true, - "default": [] - } - }, - "type": [ - "object", - "boolean" - ], - "properties": { - "$id": { - "type": "string", - "format": "uri-reference" - }, - "$schema": { - "type": "string", - "format": "uri" - }, - "$ref": { - "type": "string", - "format": "uri-reference" + "type": "string", + "format": "uri-reference" }, "$comment": { "type": "string" @@ -726,8 +538,103 @@ } } }, - "operation": { - "type": "object", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/json-schema-draft-07-schema" + }, + { + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, + "properties": { + "additionalProperties": { + "anyOf": [ + { + "$ref": "#/definitions/schema" + }, + { + "type": "boolean" + } + ], + "default": {} + }, + "items": { + "anyOf": [ + { + "$ref": "#/definitions/schema" + }, + { + "type": "array", + "minItems": 1, + "items": { + "$ref": "#/definitions/schema" + } + } + ], + "default": {} + }, + "allOf": { + "type": "array", + "minItems": 1, + "items": { + "$ref": "#/definitions/schema" + } + }, + "oneOf": { + "type": "array", + "minItems": 1, + "items": { + "$ref": "#/definitions/schema" + } + }, + "anyOf": { + "type": "array", + "minItems": 1, + "items": { + "$ref": "#/definitions/schema" + } + }, + "not": { + "$ref": "#/definitions/schema" + }, + "properties": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/schema" + }, + "default": {} + }, + "patternProperties": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/schema" + }, + "default": {} + }, + "propertyNames": { + "$ref": "#/definitions/schema" + }, + "contains": { + "$ref": "#/definitions/schema" + }, + "discriminator": { + "type": "string" + }, + "externalDocs": { + "$ref": "#/definitions/externalDocs" + }, + "deprecated": { + "type": "boolean", + "default": false + } + } + } + ] + }, + "parameter": { "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { @@ -735,43 +642,57 @@ } }, "properties": { - "traits": { - "type": "array", - "items": { - "oneOf": [ - { - "$ref": "#/definitions/Reference" - }, - { - "$ref": "#/definitions/operationTrait" - } - ] - } - }, - "summary": { - "type": "string" - }, "description": { - "type": "string" + "type": "string", + "description": "A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed." }, - "tags": { - "type": "array", - "items": { - "$ref": "#/definitions/tag" - }, - "uniqueItems": true + "schema": { + "$ref": "#/definitions/schema" }, - "externalDocs": { - "$ref": "#/definitions/externalDocs" + "location": { + "type": "string", + "description": "A runtime expression that specifies the location of the parameter value", + "pattern": "^\\$message\\.(header|payload)#(\\/(([^\\/~])|(~[01]))*)*" }, - "operationId": { + "$ref": { + "$ref": "#/definitions/ReferenceObject" + } + } + }, + "parameters": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/parameter" + } + ] + }, + "description": "JSON objects describing re-usable channel parameters." + }, + "tag": { + "type": "object", + "additionalProperties": false, + "required": [ + "name" + ], + "properties": { + "name": { "type": "string" }, - "bindings": { - "$ref": "#/definitions/bindingsObject" + "description": { + "type": "string" }, - "message": { - "$ref": "#/definitions/message" + "externalDocs": { + "$ref": "#/definitions/externalDocs" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" } } }, @@ -808,426 +729,141 @@ } } }, - "tag": { + "correlationId": { "type": "object", - "additionalProperties": false, "required": [ - "name" + "location" ], + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, "properties": { - "name": { - "type": "string" - }, "description": { - "type": "string" + "type": "string", + "description": "A optional description of the correlation ID. GitHub Flavored Markdown is allowed." }, - "externalDocs": { - "$ref": "#/definitions/externalDocs" + "location": { + "type": "string", + "description": "A runtime expression that specifies the location of the correlation ID", + "pattern": "^\\$message\\.(header|payload)#(\\/(([^\\/~])|(~[01]))*)*" } - }, + } + }, + "messageTrait": { + "type": "object", + "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { "$ref": "#/definitions/specificationExtension" } - } - }, - "message": { - "oneOf": [ - { - "$ref": "#/definitions/Reference" + }, + "properties": { + "schemaFormat": { + "type": "string" }, - { - "oneOf": [ + "contentType": { + "type": "string" + }, + "headers": { + "allOf": [ + { + "$ref": "#/definitions/schema" + }, { - "type": "object", - "required": [ - "oneOf" - ], - "additionalProperties": false, "properties": { - "oneOf": { - "type": "array", - "items": { - "$ref": "#/definitions/message" - } + "type": { + "const": "object" } } + } + ] + }, + "correlationId": { + "oneOf": [ + { + "$ref": "#/definitions/Reference" }, { - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "properties": { - "schemaFormat": { - "type": "string" - }, - "contentType": { - "type": "string" - }, - "headers": { - "allOf": [ - { - "$ref": "#/definitions/schema" - }, - { - "properties": { - "type": { - "const": "object" - } - } - } - ] - }, - "payload": {}, - "correlationId": { - "oneOf": [ - { - "$ref": "#/definitions/Reference" - }, - { - "$ref": "#/definitions/correlationId" - } - ] - }, - "tags": { - "type": "array", - "items": { - "$ref": "#/definitions/tag" - }, - "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." - }, - "externalDocs": { - "$ref": "#/definitions/externalDocs" - }, - "deprecated": { - "type": "boolean", - "default": false - }, - "examples": { - "type": "array", - "items": { - "type": "object", - "additionalProperties": false, - "anyOf": [ - { - "required": [ - "payload" - ] - }, - { - "required": [ - "headers" - ] - } - ], - "properties": { - "name": { - "type": "string", - "description": "Machine readable name of the message example." - }, - "summary": { - "type": "string", - "description": "A brief summary of the message example." - }, - "headers": { - "type": "object" - }, - "payload": {} - } - } - }, - "bindings": { - "$ref": "#/definitions/bindingsObject" - }, - "traits": { - "type": "array", - "items": { - "oneOf": [ - { - "$ref": "#/definitions/Reference" - }, - { - "$ref": "#/definitions/messageTrait" - } - ] - } - } - }, - "allOf": [ - { - "if": { - "not": { - "required": [ - "schemaFormat" - ] - } - }, - "then": { - "properties": { - "payload": { - "$ref": "#/definitions/schema" - } - } - } - }, - { - "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" - ] - } - } - }, - "then": { - "properties": { - "payload": { - "$ref": "#/definitions/schema" - } - } - } - }, - { - "if": { - "required": [ - "schemaFormat" - ], - "properties": { - "schemaFormat": { - "enum": [ - "application/schema+json;version=draft-07", - "application/schema+yaml;version=draft-07" - ] - } - } - }, - "then": { - "properties": { - "payload": { - "$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": { - "payload": { - "$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": { - "payload": { - "$ref": "#/definitions/avroSchema_v1" - } - } - } - } - ] - } - ] - } - ] - }, - "correlationId": { - "type": "object", - "required": [ - "location" - ], - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "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]))*)*" - } - } - }, - "messageTrait": { - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "properties": { - "schemaFormat": { - "type": "string" - }, - "contentType": { - "type": "string" - }, - "headers": { - "allOf": [ - { - "$ref": "#/definitions/schema" - }, - { - "properties": { - "type": { - "const": "object" - } - } - } - ] - }, - "correlationId": { - "oneOf": [ - { - "$ref": "#/definitions/Reference" - }, - { - "$ref": "#/definitions/correlationId" - } - ] - }, - "tags": { - "type": "array", - "items": { - "$ref": "#/definitions/tag" - }, - "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." - }, - "externalDocs": { - "$ref": "#/definitions/externalDocs" - }, - "deprecated": { - "type": "boolean", - "default": false - }, - "examples": { - "type": "array", - "items": { - "type": "object" - } - }, - "bindings": { - "$ref": "#/definitions/bindingsObject" - } - } - }, - "openapiSchema_3_0": { - "type": "object", - "definitions": { - "ExternalDocumentation": { - "type": "object", - "required": [ - "url" - ], - "properties": { - "description": { - "type": "string" - }, - "url": { - "type": "string", - "format": "uri-reference" - } - }, - "patternProperties": { - "^x-": {} - }, - "additionalProperties": false - }, - "Discriminator": { - "type": "object", - "required": [ - "propertyName" - ], - "properties": { - "propertyName": { - "type": "string" - }, - "mapping": { + "$ref": "#/definitions/correlationId" + } + ] + }, + "tags": { + "type": "array", + "items": { + "$ref": "#/definitions/tag" + }, + "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." + }, + "externalDocs": { + "$ref": "#/definitions/externalDocs" + }, + "deprecated": { + "type": "boolean", + "default": false + }, + "examples": { + "type": "array", + "items": { + "type": "object" + } + }, + "bindings": { + "$ref": "#/definitions/bindingsObject" + } + } + }, + "openapiSchema_3_0": { + "type": "object", + "definitions": { + "ExternalDocumentation": { + "type": "object", + "required": [ + "url" + ], + "properties": { + "description": { + "type": "string" + }, + "url": { + "type": "string", + "format": "uri-reference" + } + }, + "patternProperties": { + "^x-": {} + }, + "additionalProperties": false + }, + "Discriminator": { + "type": "object", + "required": [ + "propertyName" + ], + "properties": { + "propertyName": { + "type": "string" + }, + "mapping": { "type": "object", "additionalProperties": { "type": "string" @@ -1773,33 +1409,294 @@ "size": { "type": "number" } - }, - "required": [ - "type", - "name", - "size" + }, + "required": [ + "type", + "name", + "size" + ] + }, + "name": { + "type": "string", + "pattern": "^[A-Za-z_][A-Za-z0-9_]*$" + }, + "namespace": { + "type": "string", + "pattern": "^([A-Za-z_][A-Za-z0-9_]*(\\.[A-Za-z_][A-Za-z0-9_]*)*)*$" + } + }, + "description": "Json-Schema definition for Avro AVSC files.", + "oneOf": [ + { + "$ref": "#/definitions/avroSchema_v1/definitions/avroSchema" + } + ], + "title": "Avro Schema Definition" + }, + "message": { + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "oneOf": [ + { + "type": "object", + "required": [ + "oneOf" + ], + "additionalProperties": false, + "properties": { + "oneOf": { + "type": "array", + "items": { + "$ref": "#/definitions/message" + } + } + } + }, + { + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, + "properties": { + "schemaFormat": { + "type": "string" + }, + "contentType": { + "type": "string" + }, + "headers": { + "allOf": [ + { + "$ref": "#/definitions/schema" + }, + { + "properties": { + "type": { + "const": "object" + } + } + } + ] + }, + "payload": {}, + "correlationId": { + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/correlationId" + } + ] + }, + "tags": { + "type": "array", + "items": { + "$ref": "#/definitions/tag" + }, + "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." + }, + "externalDocs": { + "$ref": "#/definitions/externalDocs" + }, + "deprecated": { + "type": "boolean", + "default": false + }, + "examples": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "anyOf": [ + { + "required": [ + "payload" + ] + }, + { + "required": [ + "headers" + ] + } + ], + "properties": { + "name": { + "type": "string", + "description": "Machine readable name of the message example." + }, + "summary": { + "type": "string", + "description": "A brief summary of the message example." + }, + "headers": { + "type": "object" + }, + "payload": {} + } + } + }, + "bindings": { + "$ref": "#/definitions/bindingsObject" + }, + "traits": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/messageTrait" + } + ] + } + } + }, + "allOf": [ + { + "if": { + "not": { + "required": [ + "schemaFormat" + ] + } + }, + "then": { + "properties": { + "payload": { + "$ref": "#/definitions/schema" + } + } + } + }, + { + "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" + ] + } + } + }, + "then": { + "properties": { + "payload": { + "$ref": "#/definitions/schema" + } + } + } + }, + { + "if": { + "required": [ + "schemaFormat" + ], + "properties": { + "schemaFormat": { + "enum": [ + "application/schema+json;version=draft-07", + "application/schema+yaml;version=draft-07" + ] + } + } + }, + "then": { + "properties": { + "payload": { + "$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": { + "payload": { + "$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": { + "payload": { + "$ref": "#/definitions/avroSchema_v1" + } + } + } + } + ] + } ] - }, - "name": { - "type": "string", - "pattern": "^[A-Za-z_][A-Za-z0-9_]*$" - }, - "namespace": { - "type": "string", - "pattern": "^([A-Za-z_][A-Za-z0-9_]*(\\.[A-Za-z_][A-Za-z0-9_]*)*)*$" - } - }, - "description": "Json-Schema definition for Avro AVSC files.", - "oneOf": [ - { - "$ref": "#/definitions/avroSchema_v1/definitions/avroSchema" } - ], - "title": "Avro Schema Definition" + ] }, - "components": { + "operation": { "type": "object", - "description": "An object to hold a set of reusable objects for different aspects of the AsyncAPI Specification.", "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { @@ -1807,127 +1704,112 @@ } }, "properties": { - "schemas": { - "$ref": "#/definitions/schemas" - }, - "messages": { - "$ref": "#/definitions/messages" - }, - "securitySchemes": { - "type": "object", - "patternProperties": { - "^[\\w\\d\\.\\-_]+$": { - "oneOf": [ - { - "$ref": "#/definitions/Reference" - }, - { - "$ref": "#/definitions/SecurityScheme" - } - ] - } + "traits": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/operationTrait" + } + ] } }, - "parameters": { - "$ref": "#/definitions/parameters" - }, - "correlationIds": { - "type": "object", - "patternProperties": { - "^[\\w\\d\\.\\-_]+$": { - "oneOf": [ - { - "$ref": "#/definitions/Reference" - }, - { - "$ref": "#/definitions/correlationId" - } - ] - } - } + "summary": { + "type": "string" }, - "operationTraits": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/operationTrait" - } + "description": { + "type": "string" }, - "messageTraits": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/messageTrait" - } + "tags": { + "type": "array", + "items": { + "$ref": "#/definitions/tag" + }, + "uniqueItems": true }, - "serverBindings": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/bindingsObject" - } + "externalDocs": { + "$ref": "#/definitions/externalDocs" }, - "channelBindings": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/bindingsObject" - } + "operationId": { + "type": "string" }, - "operationBindings": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/bindingsObject" - } + "bindings": { + "$ref": "#/definitions/bindingsObject" }, - "messageBindings": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/bindingsObject" - } + "message": { + "$ref": "#/definitions/message" } } }, - "schemas": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/schema" - }, - "description": "JSON objects describing schemas the API uses." - }, - "messages": { + "channelItem": { "type": "object", - "additionalProperties": { - "$ref": "#/definitions/message" + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } }, - "description": "JSON objects describing the messages being consumed and produced by the API." - }, - "SecurityScheme": { - "oneOf": [ - { - "$ref": "#/definitions/userPassword" - }, - { - "$ref": "#/definitions/apiKey" + "properties": { + "$ref": { + "$ref": "#/definitions/ReferenceObject" }, - { - "$ref": "#/definitions/X509" + "parameters": { + "$ref": "#/definitions/parameters" }, - { - "$ref": "#/definitions/symmetricEncryption" + "description": { + "type": "string", + "description": "A description of the channel." }, - { - "$ref": "#/definitions/asymmetricEncryption" + "servers": { + "type": "array", + "description": "The names of the servers on which this channel is available. If absent or empty then this channel must be available on all servers.", + "items": { + "type": "string" + }, + "uniqueItems": true }, - { - "$ref": "#/definitions/HTTPSecurityScheme" + "publish": { + "$ref": "#/definitions/operation" }, - { - "$ref": "#/definitions/oauth2Flows" + "subscribe": { + "$ref": "#/definitions/operation" }, - { - "$ref": "#/definitions/openIdConnect" + "deprecated": { + "type": "boolean", + "default": false }, - { - "$ref": "#/definitions/SaslSecurityScheme" + "bindings": { + "$ref": "#/definitions/bindingsObject" } - ] + } + }, + "channels": { + "type": "object", + "propertyNames": { + "type": "string", + "format": "uri-template", + "minLength": 1 + }, + "additionalProperties": { + "$ref": "#/definitions/channelItem" + } + }, + "schemas": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/schema" + }, + "description": "JSON objects describing schemas the API uses." + }, + "messages": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/message" + }, + "description": "JSON objects describing the messages being consumed and produced by the API." }, "userPassword": { "type": "object", @@ -2052,19 +1934,6 @@ }, "additionalProperties": false }, - "HTTPSecurityScheme": { - "oneOf": [ - { - "$ref": "#/definitions/NonBearerHTTPSecurityScheme" - }, - { - "$ref": "#/definitions/BearerHTTPSecurityScheme" - }, - { - "$ref": "#/definitions/APIKeyHTTPSecurityScheme" - } - ] - }, "NonBearerHTTPSecurityScheme": { "not": { "type": "object", @@ -2172,6 +2041,51 @@ }, "additionalProperties": false }, + "HTTPSecurityScheme": { + "oneOf": [ + { + "$ref": "#/definitions/NonBearerHTTPSecurityScheme" + }, + { + "$ref": "#/definitions/BearerHTTPSecurityScheme" + }, + { + "$ref": "#/definitions/APIKeyHTTPSecurityScheme" + } + ] + }, + "oauth2Scopes": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "oauth2Flow": { + "type": "object", + "properties": { + "authorizationUrl": { + "type": "string", + "format": "uri" + }, + "tokenUrl": { + "type": "string", + "format": "uri" + }, + "refreshUrl": { + "type": "string", + "format": "uri" + }, + "scopes": { + "$ref": "#/definitions/oauth2Scopes" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, + "additionalProperties": false + }, "oauth2Flows": { "type": "object", "required": [ @@ -2275,38 +2189,6 @@ } } }, - "oauth2Flow": { - "type": "object", - "properties": { - "authorizationUrl": { - "type": "string", - "format": "uri" - }, - "tokenUrl": { - "type": "string", - "format": "uri" - }, - "refreshUrl": { - "type": "string", - "format": "uri" - }, - "scopes": { - "$ref": "#/definitions/oauth2Scopes" - } - }, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "additionalProperties": false - }, - "oauth2Scopes": { - "type": "object", - "additionalProperties": { - "type": "string" - } - }, "openIdConnect": { "type": "object", "required": [ @@ -2335,19 +2217,6 @@ }, "additionalProperties": false }, - "SaslSecurityScheme": { - "oneOf": [ - { - "$ref": "#/definitions/SaslPlainSecurityScheme" - }, - { - "$ref": "#/definitions/SaslScramSecurityScheme" - }, - { - "$ref": "#/definitions/SaslGssapiSecurityScheme" - } - ] - }, "SaslPlainSecurityScheme": { "type": "object", "required": [ @@ -2417,6 +2286,137 @@ } }, "additionalProperties": false + }, + "SaslSecurityScheme": { + "oneOf": [ + { + "$ref": "#/definitions/SaslPlainSecurityScheme" + }, + { + "$ref": "#/definitions/SaslScramSecurityScheme" + }, + { + "$ref": "#/definitions/SaslGssapiSecurityScheme" + } + ] + }, + "SecurityScheme": { + "oneOf": [ + { + "$ref": "#/definitions/userPassword" + }, + { + "$ref": "#/definitions/apiKey" + }, + { + "$ref": "#/definitions/X509" + }, + { + "$ref": "#/definitions/symmetricEncryption" + }, + { + "$ref": "#/definitions/asymmetricEncryption" + }, + { + "$ref": "#/definitions/HTTPSecurityScheme" + }, + { + "$ref": "#/definitions/oauth2Flows" + }, + { + "$ref": "#/definitions/openIdConnect" + }, + { + "$ref": "#/definitions/SaslSecurityScheme" + } + ] + }, + "components": { + "type": "object", + "description": "An object to hold a set of reusable objects for different aspects of the AsyncAPI Specification.", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, + "properties": { + "schemas": { + "$ref": "#/definitions/schemas" + }, + "messages": { + "$ref": "#/definitions/messages" + }, + "securitySchemes": { + "type": "object", + "patternProperties": { + "^[\\w\\d\\.\\-_]+$": { + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/SecurityScheme" + } + ] + } + } + }, + "parameters": { + "$ref": "#/definitions/parameters" + }, + "correlationIds": { + "type": "object", + "patternProperties": { + "^[\\w\\d\\.\\-_]+$": { + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/correlationId" + } + ] + } + } + }, + "operationTraits": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/operationTrait" + } + }, + "messageTraits": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/messageTrait" + } + }, + "serverBindings": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/bindingsObject" + } + }, + "channelBindings": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/bindingsObject" + } + }, + "operationBindings": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/bindingsObject" + } + }, + "messageBindings": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/bindingsObject" + } + } + } } }, "description": "!!Auto generated!! \n Do not manually edit. " diff --git a/schemas/2.2.0.json b/schemas/2.2.0.json index 2371c167..7aed12a8 100644 --- a/schemas/2.2.0.json +++ b/schemas/2.2.0.json @@ -1,6 +1,5 @@ { - "$id": "http://asyncapi.com/definitions/2.2.0/asyncapi.json", - "$schema": "http://json-schema.org/draft-07/schema", + "$schema": "http://json-schema.org/draft-07/schema#", "title": "AsyncAPI 2.2.0 schema.", "type": "object", "required": [ @@ -57,54 +56,14 @@ } }, "definitions": { - "http://asyncapi.com/definitions/2.2.0/specificationExtension.json": { - "$id": "http://asyncapi.com/definitions/2.2.0/specificationExtension.json", + "specificationExtension.json": { + "$id": "specificationExtension.json", "description": "Any property starting with x- is valid.", "additionalProperties": true, "additionalItems": true }, - "http://asyncapi.com/definitions/2.2.0/info.json": { - "$id": "http://asyncapi.com/definitions/2.2.0/info.json", - "type": "object", - "description": "General information about the API.", - "required": [ - "version", - "title" - ], - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "http://asyncapi.com/definitions/2.2.0/specificationExtension.json" - } - }, - "properties": { - "title": { - "type": "string", - "description": "A unique and precise title of the API." - }, - "version": { - "type": "string", - "description": "A semantic version number of the API." - }, - "description": { - "type": "string", - "description": "A longer description of the API. Should be different from the title. CommonMark is allowed." - }, - "termsOfService": { - "type": "string", - "description": "A URL to the Terms of Service for the API. MUST be in the format of a URL.", - "format": "uri" - }, - "contact": { - "$ref": "http://asyncapi.com/definitions/2.2.0/contact.json" - }, - "license": { - "$ref": "http://asyncapi.com/definitions/2.2.0/license.json" - } - } - }, - "http://asyncapi.com/definitions/2.2.0/contact.json": { - "$id": "http://asyncapi.com/definitions/2.2.0/contact.json", + "contact.json": { + "$id": "contact.json", "type": "object", "description": "Contact information for the owners of the API.", "additionalProperties": false, @@ -130,8 +89,8 @@ } } }, - "http://asyncapi.com/definitions/2.2.0/license.json": { - "$id": "http://asyncapi.com/definitions/2.2.0/license.json", + "license.json": { + "$id": "license.json", "type": "object", "required": [ "name" @@ -154,13 +113,13 @@ } } }, - "http://asyncapi.com/definitions/2.2.0/server.json": { - "$id": "http://asyncapi.com/definitions/2.2.0/server.json", + "info.json": { + "$id": "info.json", "type": "object", - "description": "An object representing a Server.", + "description": "General information about the API.", "required": [ - "url", - "protocol" + "version", + "title" ], "additionalProperties": false, "patternProperties": { @@ -169,42 +128,33 @@ } }, "properties": { - "url": { - "type": "string" - }, - "description": { - "type": "string" + "title": { + "type": "string", + "description": "A unique and precise title of the API." }, - "protocol": { + "version": { "type": "string", - "description": "The transfer protocol." + "description": "A semantic version number of the API." }, - "protocolVersion": { - "type": "string" + "description": { + "type": "string", + "description": "A longer description of the API. Should be different from the title. CommonMark is allowed." }, - "variables": { - "$ref": "http://asyncapi.com/definitions/2.2.0/serverVariables.json" + "termsOfService": { + "type": "string", + "description": "A URL to the Terms of Service for the API. MUST be in the format of a URL.", + "format": "uri" }, - "security": { - "type": "array", - "items": { - "$ref": "http://asyncapi.com/definitions/2.2.0/SecurityRequirement.json" - } + "contact": { + "$ref": "http://asyncapi.com/definitions/2.2.0/contact.json" }, - "bindings": { - "$ref": "http://asyncapi.com/definitions/2.2.0/bindingsObject.json" + "license": { + "$ref": "http://asyncapi.com/definitions/2.2.0/license.json" } } }, - "http://asyncapi.com/definitions/2.2.0/serverVariables.json": { - "$id": "http://asyncapi.com/definitions/2.2.0/serverVariables.json", - "type": "object", - "additionalProperties": { - "$ref": "http://asyncapi.com/definitions/2.2.0/serverVariable.json" - } - }, - "http://asyncapi.com/definitions/2.2.0/serverVariable.json": { - "$id": "http://asyncapi.com/definitions/2.2.0/serverVariable.json", + "serverVariable.json": { + "$id": "serverVariable.json", "type": "object", "description": "An object representing a Server Variable for server URL template substitution.", "additionalProperties": false, @@ -235,8 +185,15 @@ } } }, - "http://asyncapi.com/definitions/2.2.0/SecurityRequirement.json": { - "$id": "http://asyncapi.com/definitions/2.2.0/SecurityRequirement.json", + "serverVariables.json": { + "$id": "serverVariables.json", + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/2.2.0/serverVariable.json" + } + }, + "SecurityRequirement.json": { + "$id": "SecurityRequirement.json", "type": "object", "additionalProperties": { "type": "array", @@ -246,8 +203,8 @@ "uniqueItems": true } }, - "http://asyncapi.com/definitions/2.2.0/bindingsObject.json": { - "$id": "http://asyncapi.com/definitions/2.2.0/bindingsObject.json", + "bindingsObject.json": { + "$id": "bindingsObject.json", "type": "object", "additionalProperties": true, "properties": { @@ -268,21 +225,14 @@ "ibmmq": {} } }, - "http://asyncapi.com/definitions/2.2.0/channels.json": { - "$id": "http://asyncapi.com/definitions/2.2.0/channels.json", - "type": "object", - "propertyNames": { - "type": "string", - "format": "uri-template", - "minLength": 1 - }, - "additionalProperties": { - "$ref": "http://asyncapi.com/definitions/2.2.0/channelItem.json" - } - }, - "http://asyncapi.com/definitions/2.2.0/channelItem.json": { - "$id": "http://asyncapi.com/definitions/2.2.0/channelItem.json", + "server.json": { + "$id": "server.json", "type": "object", + "description": "An object representing a Server.", + "required": [ + "url", + "protocol" + ], "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { @@ -290,61 +240,40 @@ } }, "properties": { - "$ref": { - "$ref": "http://asyncapi.com/definitions/2.2.0/ReferenceObject.json" - }, - "parameters": { - "$ref": "http://asyncapi.com/definitions/2.2.0/parameters.json" + "url": { + "type": "string" }, "description": { - "type": "string", - "description": "A description of the channel." + "type": "string" }, - "servers": { - "type": "array", - "description": "The names of the servers on which this channel is available. If absent or empty then this channel must be available on all servers.", - "items": { - "type": "string" - }, - "uniqueItems": true + "protocol": { + "type": "string", + "description": "The transfer protocol." }, - "publish": { - "$ref": "http://asyncapi.com/definitions/2.2.0/operation.json" + "protocolVersion": { + "type": "string" }, - "subscribe": { - "$ref": "http://asyncapi.com/definitions/2.2.0/operation.json" + "variables": { + "$ref": "http://asyncapi.com/definitions/2.2.0/serverVariables.json" }, - "deprecated": { - "type": "boolean", - "default": false + "security": { + "type": "array", + "items": { + "$ref": "http://asyncapi.com/definitions/2.2.0/SecurityRequirement.json" + } }, "bindings": { "$ref": "http://asyncapi.com/definitions/2.2.0/bindingsObject.json" } } }, - "http://asyncapi.com/definitions/2.2.0/ReferenceObject.json": { - "$id": "http://asyncapi.com/definitions/2.2.0/ReferenceObject.json", + "ReferenceObject.json": { + "$id": "ReferenceObject.json", "type": "string", "format": "uri-reference" }, - "http://asyncapi.com/definitions/2.2.0/parameters.json": { - "$id": "http://asyncapi.com/definitions/2.2.0/parameters.json", - "type": "object", - "additionalProperties": { - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/2.2.0/Reference.json" - }, - { - "$ref": "http://asyncapi.com/definitions/2.2.0/parameter.json" - } - ] - }, - "description": "JSON objects describing re-usable channel parameters." - }, - "http://asyncapi.com/definitions/2.2.0/Reference.json": { - "$id": "http://asyncapi.com/definitions/2.2.0/Reference.json", + "Reference.json": { + "$id": "Reference.json", "type": "object", "required": [ "$ref" @@ -355,190 +284,67 @@ } } }, - "http://asyncapi.com/definitions/2.2.0/parameter.json": { - "$id": "http://asyncapi.com/definitions/2.2.0/parameter.json", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "http://asyncapi.com/definitions/2.2.0/specificationExtension.json" + "http://json-schema.org/draft-07/schema": { + "$id": "http://json-schema.org/draft-07/schema", + "title": "Core schema meta-schema", + "definitions": { + "schemaArray": { + "type": "array", + "minItems": 1, + "items": { + "$ref": "#" + } + }, + "nonNegativeInteger": { + "type": "integer", + "minimum": 0 + }, + "nonNegativeIntegerDefault0": { + "allOf": [ + { + "$ref": "#/definitions/nonNegativeInteger" + }, + { + "default": 0 + } + ] + }, + "simpleTypes": { + "enum": [ + "array", + "boolean", + "integer", + "null", + "number", + "object", + "string" + ] + }, + "stringArray": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true, + "default": [] } }, + "type": [ + "object", + "boolean" + ], "properties": { - "description": { + "$id": { "type": "string", - "description": "A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed." - }, - "schema": { - "$ref": "http://asyncapi.com/definitions/2.2.0/schema.json" + "format": "uri-reference" }, - "location": { + "$schema": { "type": "string", - "description": "A runtime expression that specifies the location of the parameter value", - "pattern": "^\\$message\\.(header|payload)#(\\/(([^\\/~])|(~[01]))*)*" + "format": "uri" }, "$ref": { - "$ref": "http://asyncapi.com/definitions/2.2.0/ReferenceObject.json" - } - } - }, - "http://asyncapi.com/definitions/2.2.0/schema.json": { - "$id": "http://asyncapi.com/definitions/2.2.0/schema.json", - "allOf": [ - { - "$ref": "http://json-schema.org/draft-07/schema#" - }, - { - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "http://asyncapi.com/definitions/2.2.0/specificationExtension.json" - } - }, - "properties": { - "additionalProperties": { - "anyOf": [ - { - "$ref": "http://asyncapi.com/definitions/2.2.0/schema.json" - }, - { - "type": "boolean" - } - ], - "default": {} - }, - "items": { - "anyOf": [ - { - "$ref": "http://asyncapi.com/definitions/2.2.0/schema.json" - }, - { - "type": "array", - "minItems": 1, - "items": { - "$ref": "http://asyncapi.com/definitions/2.2.0/schema.json" - } - } - ], - "default": {} - }, - "allOf": { - "type": "array", - "minItems": 1, - "items": { - "$ref": "http://asyncapi.com/definitions/2.2.0/schema.json" - } - }, - "oneOf": { - "type": "array", - "minItems": 1, - "items": { - "$ref": "http://asyncapi.com/definitions/2.2.0/schema.json" - } - }, - "anyOf": { - "type": "array", - "minItems": 1, - "items": { - "$ref": "http://asyncapi.com/definitions/2.2.0/schema.json" - } - }, - "not": { - "$ref": "http://asyncapi.com/definitions/2.2.0/schema.json" - }, - "properties": { - "type": "object", - "additionalProperties": { - "$ref": "http://asyncapi.com/definitions/2.2.0/schema.json" - }, - "default": {} - }, - "patternProperties": { - "type": "object", - "additionalProperties": { - "$ref": "http://asyncapi.com/definitions/2.2.0/schema.json" - }, - "default": {} - }, - "propertyNames": { - "$ref": "http://asyncapi.com/definitions/2.2.0/schema.json" - }, - "contains": { - "$ref": "http://asyncapi.com/definitions/2.2.0/schema.json" - }, - "discriminator": { - "type": "string" - }, - "externalDocs": { - "$ref": "http://asyncapi.com/definitions/2.2.0/externalDocs.json" - }, - "deprecated": { - "type": "boolean", - "default": false - } - } - } - ] - }, - "http://json-schema.org/draft-07/schema": { - "$id": "http://json-schema.org/draft-07/schema", - "title": "Core schema meta-schema", - "definitions": { - "schemaArray": { - "type": "array", - "minItems": 1, - "items": { - "$ref": "#" - } - }, - "nonNegativeInteger": { - "type": "integer", - "minimum": 0 - }, - "nonNegativeIntegerDefault0": { - "allOf": [ - { - "$ref": "#/definitions/nonNegativeInteger" - }, - { - "default": 0 - } - ] - }, - "simpleTypes": { - "enum": [ - "array", - "boolean", - "integer", - "null", - "number", - "object", - "string" - ] - }, - "stringArray": { - "type": "array", - "items": { - "type": "string" - }, - "uniqueItems": true, - "default": [] - } - }, - "type": [ - "object", - "boolean" - ], - "properties": { - "$id": { - "type": "string", - "format": "uri-reference" - }, - "$schema": { - "type": "string", - "format": "uri" - }, - "$ref": { - "type": "string", - "format": "uri-reference" + "type": "string", + "format": "uri-reference" }, "$comment": { "type": "string" @@ -722,8 +528,8 @@ }, "default": true }, - "http://asyncapi.com/definitions/2.2.0/externalDocs.json": { - "$id": "http://asyncapi.com/definitions/2.2.0/externalDocs.json", + "externalDocs.json": { + "$id": "externalDocs.json", "type": "object", "additionalProperties": false, "description": "information about external documentation", @@ -745,9 +551,105 @@ } } }, - "http://asyncapi.com/definitions/2.2.0/operation.json": { - "$id": "http://asyncapi.com/definitions/2.2.0/operation.json", - "type": "object", + "schema.json": { + "$id": "schema.json", + "allOf": [ + { + "$ref": "http://json-schema.org/draft-07/schema#" + }, + { + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.2.0/specificationExtension.json" + } + }, + "properties": { + "additionalProperties": { + "anyOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.2.0/schema.json" + }, + { + "type": "boolean" + } + ], + "default": {} + }, + "items": { + "anyOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.2.0/schema.json" + }, + { + "type": "array", + "minItems": 1, + "items": { + "$ref": "http://asyncapi.com/definitions/2.2.0/schema.json" + } + } + ], + "default": {} + }, + "allOf": { + "type": "array", + "minItems": 1, + "items": { + "$ref": "http://asyncapi.com/definitions/2.2.0/schema.json" + } + }, + "oneOf": { + "type": "array", + "minItems": 1, + "items": { + "$ref": "http://asyncapi.com/definitions/2.2.0/schema.json" + } + }, + "anyOf": { + "type": "array", + "minItems": 1, + "items": { + "$ref": "http://asyncapi.com/definitions/2.2.0/schema.json" + } + }, + "not": { + "$ref": "http://asyncapi.com/definitions/2.2.0/schema.json" + }, + "properties": { + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/2.2.0/schema.json" + }, + "default": {} + }, + "patternProperties": { + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/2.2.0/schema.json" + }, + "default": {} + }, + "propertyNames": { + "$ref": "http://asyncapi.com/definitions/2.2.0/schema.json" + }, + "contains": { + "$ref": "http://asyncapi.com/definitions/2.2.0/schema.json" + }, + "discriminator": { + "type": "string" + }, + "externalDocs": { + "$ref": "http://asyncapi.com/definitions/2.2.0/externalDocs.json" + }, + "deprecated": { + "type": "boolean", + "default": false + } + } + } + ] + }, + "parameter.json": { + "$id": "parameter.json", "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { @@ -755,48 +657,64 @@ } }, "properties": { - "traits": { - "type": "array", - "items": { - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/2.2.0/Reference.json" - }, - { - "$ref": "http://asyncapi.com/definitions/2.2.0/operationTrait.json" - } - ] - } - }, - "summary": { - "type": "string" - }, "description": { - "type": "string" - }, - "tags": { - "type": "array", - "items": { - "$ref": "http://asyncapi.com/definitions/2.2.0/tag.json" - }, - "uniqueItems": true + "type": "string", + "description": "A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed." }, - "externalDocs": { - "$ref": "http://asyncapi.com/definitions/2.2.0/externalDocs.json" + "schema": { + "$ref": "http://asyncapi.com/definitions/2.2.0/schema.json" }, - "operationId": { - "type": "string" + "location": { + "type": "string", + "description": "A runtime expression that specifies the location of the parameter value", + "pattern": "^\\$message\\.(header|payload)#(\\/(([^\\/~])|(~[01]))*)*" }, - "bindings": { - "$ref": "http://asyncapi.com/definitions/2.2.0/bindingsObject.json" + "$ref": { + "$ref": "http://asyncapi.com/definitions/2.2.0/ReferenceObject.json" + } + } + }, + "parameters.json": { + "$id": "parameters.json", + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.2.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.2.0/parameter.json" + } + ] + }, + "description": "JSON objects describing re-usable channel parameters." + }, + "tag.json": { + "$id": "tag.json", + "type": "object", + "additionalProperties": false, + "required": [ + "name" + ], + "properties": { + "name": { + "type": "string" }, - "message": { - "$ref": "http://asyncapi.com/definitions/2.2.0/message.json" + "description": { + "type": "string" + }, + "externalDocs": { + "$ref": "http://asyncapi.com/definitions/2.2.0/externalDocs.json" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.2.0/specificationExtension.json" } } }, - "http://asyncapi.com/definitions/2.2.0/operationTrait.json": { - "$id": "http://asyncapi.com/definitions/2.2.0/operationTrait.json", + "operationTrait.json": { + "$id": "operationTrait.json", "type": "object", "additionalProperties": false, "patternProperties": { @@ -829,488 +747,201 @@ } } }, - "http://asyncapi.com/definitions/2.2.0/tag.json": { - "$id": "http://asyncapi.com/definitions/2.2.0/tag.json", + "correlationId.json": { + "$id": "correlationId.json", "type": "object", - "additionalProperties": false, "required": [ - "name" + "location" ], + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.2.0/specificationExtension.json" + } + }, "properties": { - "name": { - "type": "string" - }, "description": { - "type": "string" + "type": "string", + "description": "A optional description of the correlation ID. GitHub Flavored Markdown is allowed." }, - "externalDocs": { - "$ref": "http://asyncapi.com/definitions/2.2.0/externalDocs.json" + "location": { + "type": "string", + "description": "A runtime expression that specifies the location of the correlation ID", + "pattern": "^\\$message\\.(header|payload)#(\\/(([^\\/~])|(~[01]))*)*" } - }, + } + }, + "messageTrait.json": { + "$id": "messageTrait.json", + "type": "object", + "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { "$ref": "http://asyncapi.com/definitions/2.2.0/specificationExtension.json" } - } - }, - "http://asyncapi.com/definitions/2.2.0/message.json": { - "$id": "http://asyncapi.com/definitions/2.2.0/message.json", - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/2.2.0/Reference.json" + }, + "properties": { + "schemaFormat": { + "type": "string" }, - { - "oneOf": [ + "contentType": { + "type": "string" + }, + "headers": { + "allOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.2.0/schema.json" + }, { - "type": "object", - "required": [ - "oneOf" - ], - "additionalProperties": false, "properties": { - "oneOf": { - "type": "array", - "items": { - "$ref": "http://asyncapi.com/definitions/2.2.0/message.json" - } + "type": { + "const": "object" } } + } + ] + }, + "correlationId": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.2.0/Reference.json" }, { + "$ref": "http://asyncapi.com/definitions/2.2.0/correlationId.json" + } + ] + }, + "tags": { + "type": "array", + "items": { + "$ref": "http://asyncapi.com/definitions/2.2.0/tag.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." + }, + "externalDocs": { + "$ref": "http://asyncapi.com/definitions/2.2.0/externalDocs.json" + }, + "deprecated": { + "type": "boolean", + "default": false + }, + "examples": { + "type": "array", + "items": { + "type": "object" + } + }, + "bindings": { + "$ref": "http://asyncapi.com/definitions/2.2.0/bindingsObject.json" + } + } + }, + "openapiSchema_3_0.json": { + "$id": "openapiSchema_3_0.json", + "type": "object", + "definitions": { + "ExternalDocumentation": { + "type": "object", + "required": [ + "url" + ], + "properties": { + "description": { + "type": "string" + }, + "url": { + "type": "string", + "format": "uri-reference" + } + }, + "patternProperties": { + "^x-": {} + }, + "additionalProperties": false + }, + "Discriminator": { + "type": "object", + "required": [ + "propertyName" + ], + "properties": { + "propertyName": { + "type": "string" + }, + "mapping": { "type": "object", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "http://asyncapi.com/definitions/2.2.0/specificationExtension.json" - } - }, - "properties": { - "schemaFormat": { - "type": "string" - }, - "contentType": { - "type": "string" - }, - "headers": { - "allOf": [ - { - "$ref": "http://asyncapi.com/definitions/2.2.0/schema.json" - }, - { - "properties": { - "type": { - "const": "object" - } - } - } - ] - }, - "payload": {}, - "correlationId": { - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/2.2.0/Reference.json" - }, - { - "$ref": "http://asyncapi.com/definitions/2.2.0/correlationId.json" - } - ] - }, - "tags": { - "type": "array", - "items": { - "$ref": "http://asyncapi.com/definitions/2.2.0/tag.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." - }, - "externalDocs": { - "$ref": "http://asyncapi.com/definitions/2.2.0/externalDocs.json" - }, - "deprecated": { - "type": "boolean", - "default": false - }, - "examples": { - "type": "array", - "items": { - "type": "object", - "additionalProperties": false, - "anyOf": [ - { - "required": [ - "payload" - ] - }, - { - "required": [ - "headers" - ] - } - ], - "properties": { - "name": { - "type": "string", - "description": "Machine readable name of the message example." - }, - "summary": { - "type": "string", - "description": "A brief summary of the message example." - }, - "headers": { - "type": "object" - }, - "payload": {} - } - } - }, - "bindings": { - "$ref": "http://asyncapi.com/definitions/2.2.0/bindingsObject.json" - }, - "traits": { - "type": "array", - "items": { - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/2.2.0/Reference.json" - }, - { - "$ref": "http://asyncapi.com/definitions/2.2.0/messageTrait.json" - } - ] - } - } - }, - "allOf": [ - { - "if": { - "not": { - "required": [ - "schemaFormat" - ] - } - }, - "then": { - "properties": { - "payload": { - "$ref": "http://asyncapi.com/definitions/2.2.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" - ] - } - } - }, - "then": { - "properties": { - "payload": { - "$ref": "http://asyncapi.com/definitions/2.2.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/2.2.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/2.2.0/avroSchema_v1.json" - } - } - } - } - ] + "additionalProperties": { + "type": "string" + } } - ] - } - ] - }, - "http://asyncapi.com/definitions/2.2.0/correlationId.json": { - "$id": "http://asyncapi.com/definitions/2.2.0/correlationId.json", - "type": "object", - "required": [ - "location" - ], - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "http://asyncapi.com/definitions/2.2.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/2.2.0/messageTrait.json": { - "$id": "http://asyncapi.com/definitions/2.2.0/messageTrait.json", - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "http://asyncapi.com/definitions/2.2.0/specificationExtension.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 } }, "properties": { - "schemaFormat": { + "title": { "type": "string" }, - "contentType": { - "type": "string" + "multipleOf": { + "type": "number", + "exclusiveMinimum": 0 }, - "headers": { - "allOf": [ - { - "$ref": "http://asyncapi.com/definitions/2.2.0/schema.json" - }, - { - "properties": { - "type": { - "const": "object" - } - } - } - ] - }, - "correlationId": { - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/2.2.0/Reference.json" - }, - { - "$ref": "http://asyncapi.com/definitions/2.2.0/correlationId.json" - } - ] - }, - "tags": { - "type": "array", - "items": { - "$ref": "http://asyncapi.com/definitions/2.2.0/tag.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." - }, - "externalDocs": { - "$ref": "http://asyncapi.com/definitions/2.2.0/externalDocs.json" - }, - "deprecated": { - "type": "boolean", - "default": false - }, - "examples": { - "type": "array", - "items": { - "type": "object" - } - }, - "bindings": { - "$ref": "http://asyncapi.com/definitions/2.2.0/bindingsObject.json" - } - } - }, - "http://asyncapi.com/definitions/2.2.0/openapiSchema_3_0.json": { - "$id": "http://asyncapi.com/definitions/2.2.0/openapiSchema_3_0.json", - "type": "object", - "definitions": { - "ExternalDocumentation": { - "type": "object", - "required": [ - "url" - ], - "properties": { - "description": { - "type": "string" - }, - "url": { - "type": "string", - "format": "uri-reference" - } - }, - "patternProperties": { - "^x-": {} - }, - "additionalProperties": false - }, - "Discriminator": { - "type": "object", - "required": [ - "propertyName" - ], - "properties": { - "propertyName": { - "type": "string" - }, - "mapping": { - "type": "object", - "additionalProperties": { - "type": "string" - } - } - } - }, - "Reference": { - "type": "object", - "required": [ - "$ref" - ], - "patternProperties": { - "^\\$ref$": { - "type": "string", - "format": "uri-reference" - } - } - }, - "XML": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "namespace": { - "type": "string", - "format": "uri" - }, - "prefix": { - "type": "string" - }, - "attribute": { - "type": "boolean", - "default": false - }, - "wrapped": { - "type": "boolean", - "default": false - } - }, - "patternProperties": { - "^x-": {} - }, - "additionalProperties": false - } - }, - "properties": { - "title": { - "type": "string" - }, - "multipleOf": { - "type": "number", - "exclusiveMinimum": 0 - }, - "maximum": { - "type": "number" + "maximum": { + "type": "number" }, "exclusiveMaximum": { "type": "boolean", @@ -1508,8 +1139,8 @@ }, "additionalProperties": false }, - "http://asyncapi.com/definitions/2.2.0/avroSchema_v1.json": { - "$id": "http://asyncapi.com/definitions/2.2.0/avroSchema_v1.json", + "avroSchema_v1.json": { + "$id": "avroSchema_v1.json", "definitions": { "avroSchema": { "title": "Avro Schema", @@ -1700,134 +1331,446 @@ "$ref": "#/definitions/name" } } - }, - "required": [ - "type", - "name", - "symbols" + }, + "required": [ + "type", + "name", + "symbols" + ] + }, + "avroArray": { + "title": "Array", + "description": "An array", + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "array" + }, + "name": { + "$ref": "#/definitions/name" + }, + "namespace": { + "$ref": "#/definitions/namespace" + }, + "doc": { + "type": "string" + }, + "aliases": { + "type": "array", + "items": { + "$ref": "#/definitions/name" + } + }, + "items": { + "$ref": "#/definitions/types" + } + }, + "required": [ + "type", + "items" + ] + }, + "avroMap": { + "title": "Map", + "description": "A map of values", + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "map" + }, + "name": { + "$ref": "#/definitions/name" + }, + "namespace": { + "$ref": "#/definitions/namespace" + }, + "doc": { + "type": "string" + }, + "aliases": { + "type": "array", + "items": { + "$ref": "#/definitions/name" + } + }, + "values": { + "$ref": "#/definitions/types" + } + }, + "required": [ + "type", + "values" + ] + }, + "avroFixed": { + "title": "Fixed", + "description": "A fixed sized array of bytes", + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "fixed" + }, + "name": { + "$ref": "#/definitions/name" + }, + "namespace": { + "$ref": "#/definitions/namespace" + }, + "doc": { + "type": "string" + }, + "aliases": { + "type": "array", + "items": { + "$ref": "#/definitions/name" + } + }, + "size": { + "type": "number" + } + }, + "required": [ + "type", + "name", + "size" + ] + }, + "name": { + "type": "string", + "pattern": "^[A-Za-z_][A-Za-z0-9_]*$" + }, + "namespace": { + "type": "string", + "pattern": "^([A-Za-z_][A-Za-z0-9_]*(\\.[A-Za-z_][A-Za-z0-9_]*)*)*$" + } + }, + "description": "Json-Schema definition for Avro AVSC files.", + "oneOf": [ + { + "$ref": "#/definitions/avroSchema" + } + ], + "title": "Avro Schema Definition" + }, + "message.json": { + "$id": "message.json", + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.2.0/Reference.json" + }, + { + "oneOf": [ + { + "type": "object", + "required": [ + "oneOf" + ], + "additionalProperties": false, + "properties": { + "oneOf": { + "type": "array", + "items": { + "$ref": "http://asyncapi.com/definitions/2.2.0/message.json" + } + } + } + }, + { + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.2.0/specificationExtension.json" + } + }, + "properties": { + "schemaFormat": { + "type": "string" + }, + "contentType": { + "type": "string" + }, + "headers": { + "allOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.2.0/schema.json" + }, + { + "properties": { + "type": { + "const": "object" + } + } + } + ] + }, + "payload": {}, + "correlationId": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.2.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.2.0/correlationId.json" + } + ] + }, + "tags": { + "type": "array", + "items": { + "$ref": "http://asyncapi.com/definitions/2.2.0/tag.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." + }, + "externalDocs": { + "$ref": "http://asyncapi.com/definitions/2.2.0/externalDocs.json" + }, + "deprecated": { + "type": "boolean", + "default": false + }, + "examples": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "anyOf": [ + { + "required": [ + "payload" + ] + }, + { + "required": [ + "headers" + ] + } + ], + "properties": { + "name": { + "type": "string", + "description": "Machine readable name of the message example." + }, + "summary": { + "type": "string", + "description": "A brief summary of the message example." + }, + "headers": { + "type": "object" + }, + "payload": {} + } + } + }, + "bindings": { + "$ref": "http://asyncapi.com/definitions/2.2.0/bindingsObject.json" + }, + "traits": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.2.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.2.0/messageTrait.json" + } + ] + } + } + }, + "allOf": [ + { + "if": { + "not": { + "required": [ + "schemaFormat" + ] + } + }, + "then": { + "properties": { + "payload": { + "$ref": "http://asyncapi.com/definitions/2.2.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" + ] + } + } + }, + "then": { + "properties": { + "payload": { + "$ref": "http://asyncapi.com/definitions/2.2.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/2.2.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/2.2.0/avroSchema_v1.json" + } + } + } + } + ] + } ] - }, - "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" + } + ] + }, + "operation.json": { + "$id": "operation.json", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.2.0/specificationExtension.json" + } + }, + "properties": { + "traits": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.2.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.2.0/operationTrait.json" } - }, - "items": { - "$ref": "#/definitions/types" - } - }, - "required": [ - "type", - "items" - ] + ] + } }, - "avroMap": { - "title": "Map", - "description": "A map of values", - "type": "object", - "properties": { - "type": { - "type": "string", - "const": "map" - }, - "name": { - "$ref": "#/definitions/name" - }, - "namespace": { - "$ref": "#/definitions/namespace" - }, - "doc": { - "type": "string" - }, - "aliases": { - "type": "array", - "items": { - "$ref": "#/definitions/name" - } - }, - "values": { - "$ref": "#/definitions/types" - } - }, - "required": [ - "type", - "values" - ] + "summary": { + "type": "string" }, - "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" - } + "description": { + "type": "string" + }, + "tags": { + "type": "array", + "items": { + "$ref": "http://asyncapi.com/definitions/2.2.0/tag.json" }, - "required": [ - "type", - "name", - "size" - ] + "uniqueItems": true }, - "name": { - "type": "string", - "pattern": "^[A-Za-z_][A-Za-z0-9_]*$" + "externalDocs": { + "$ref": "http://asyncapi.com/definitions/2.2.0/externalDocs.json" }, - "namespace": { - "type": "string", - "pattern": "^([A-Za-z_][A-Za-z0-9_]*(\\.[A-Za-z_][A-Za-z0-9_]*)*)*$" - } - }, - "description": "Json-Schema definition for Avro AVSC files.", - "oneOf": [ - { - "$ref": "#/definitions/avroSchema" + "operationId": { + "type": "string" + }, + "bindings": { + "$ref": "http://asyncapi.com/definitions/2.2.0/bindingsObject.json" + }, + "message": { + "$ref": "http://asyncapi.com/definitions/2.2.0/message.json" } - ], - "title": "Avro Schema Definition" + } }, - "http://asyncapi.com/definitions/2.2.0/components.json": { - "$id": "http://asyncapi.com/definitions/2.2.0/components.json", + "channelItem.json": { + "$id": "channelItem.json", "type": "object", - "description": "An object to hold a set of reusable objects for different aspects of the AsyncAPI Specification.", "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { @@ -1835,133 +1778,69 @@ } }, "properties": { - "schemas": { - "$ref": "http://asyncapi.com/definitions/2.2.0/schemas.json" - }, - "messages": { - "$ref": "http://asyncapi.com/definitions/2.2.0/messages.json" - }, - "securitySchemes": { - "type": "object", - "patternProperties": { - "^[\\w\\d\\.\\-_]+$": { - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/2.2.0/Reference.json" - }, - { - "$ref": "http://asyncapi.com/definitions/2.2.0/SecurityScheme.json" - } - ] - } - } + "$ref": { + "$ref": "http://asyncapi.com/definitions/2.2.0/ReferenceObject.json" }, "parameters": { "$ref": "http://asyncapi.com/definitions/2.2.0/parameters.json" }, - "correlationIds": { - "type": "object", - "patternProperties": { - "^[\\w\\d\\.\\-_]+$": { - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/2.2.0/Reference.json" - }, - { - "$ref": "http://asyncapi.com/definitions/2.2.0/correlationId.json" - } - ] - } - } - }, - "operationTraits": { - "type": "object", - "additionalProperties": { - "$ref": "http://asyncapi.com/definitions/2.2.0/operationTrait.json" - } + "description": { + "type": "string", + "description": "A description of the channel." }, - "messageTraits": { - "type": "object", - "additionalProperties": { - "$ref": "http://asyncapi.com/definitions/2.2.0/messageTrait.json" - } + "servers": { + "type": "array", + "description": "The names of the servers on which this channel is available. If absent or empty then this channel must be available on all servers.", + "items": { + "type": "string" + }, + "uniqueItems": true }, - "serverBindings": { - "type": "object", - "additionalProperties": { - "$ref": "http://asyncapi.com/definitions/2.2.0/bindingsObject.json" - } + "publish": { + "$ref": "http://asyncapi.com/definitions/2.2.0/operation.json" }, - "channelBindings": { - "type": "object", - "additionalProperties": { - "$ref": "http://asyncapi.com/definitions/2.2.0/bindingsObject.json" - } + "subscribe": { + "$ref": "http://asyncapi.com/definitions/2.2.0/operation.json" }, - "operationBindings": { - "type": "object", - "additionalProperties": { - "$ref": "http://asyncapi.com/definitions/2.2.0/bindingsObject.json" - } + "deprecated": { + "type": "boolean", + "default": false }, - "messageBindings": { - "type": "object", - "additionalProperties": { - "$ref": "http://asyncapi.com/definitions/2.2.0/bindingsObject.json" - } + "bindings": { + "$ref": "http://asyncapi.com/definitions/2.2.0/bindingsObject.json" } } }, - "http://asyncapi.com/definitions/2.2.0/schemas.json": { - "$id": "http://asyncapi.com/definitions/2.2.0/schemas.json", + "channels.json": { + "$id": "channels.json", + "type": "object", + "propertyNames": { + "type": "string", + "format": "uri-template", + "minLength": 1 + }, + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/2.2.0/channelItem.json" + } + }, + "schemas.json": { + "$id": "schemas.json", "type": "object", "additionalProperties": { "$ref": "http://asyncapi.com/definitions/2.2.0/schema.json" }, "description": "JSON objects describing schemas the API uses." }, - "http://asyncapi.com/definitions/2.2.0/messages.json": { - "$id": "http://asyncapi.com/definitions/2.2.0/messages.json", + "messages.json": { + "$id": "messages.json", "type": "object", "additionalProperties": { "$ref": "http://asyncapi.com/definitions/2.2.0/message.json" }, "description": "JSON objects describing the messages being consumed and produced by the API." }, - "http://asyncapi.com/definitions/2.2.0/SecurityScheme.json": { - "$id": "http://asyncapi.com/definitions/2.2.0/SecurityScheme.json", - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/2.2.0/userPassword.json" - }, - { - "$ref": "http://asyncapi.com/definitions/2.2.0/apiKey.json" - }, - { - "$ref": "http://asyncapi.com/definitions/2.2.0/X509.json" - }, - { - "$ref": "http://asyncapi.com/definitions/2.2.0/symmetricEncryption.json" - }, - { - "$ref": "http://asyncapi.com/definitions/2.2.0/asymmetricEncryption.json" - }, - { - "$ref": "http://asyncapi.com/definitions/2.2.0/HTTPSecurityScheme.json" - }, - { - "$ref": "http://asyncapi.com/definitions/2.2.0/oauth2Flows.json" - }, - { - "$ref": "http://asyncapi.com/definitions/2.2.0/openIdConnect.json" - }, - { - "$ref": "http://asyncapi.com/definitions/2.2.0/SaslSecurityScheme.json" - } - ] - }, - "http://asyncapi.com/definitions/2.2.0/userPassword.json": { - "$id": "http://asyncapi.com/definitions/2.2.0/userPassword.json", + "userPassword.json": { + "$id": "userPassword.json", "type": "object", "required": [ "type" @@ -1984,8 +1863,8 @@ }, "additionalProperties": false }, - "http://asyncapi.com/definitions/2.2.0/apiKey.json": { - "$id": "http://asyncapi.com/definitions/2.2.0/apiKey.json", + "apiKey.json": { + "$id": "apiKey.json", "type": "object", "required": [ "type", @@ -2016,8 +1895,8 @@ }, "additionalProperties": false }, - "http://asyncapi.com/definitions/2.2.0/X509.json": { - "$id": "http://asyncapi.com/definitions/2.2.0/X509.json", + "X509.json": { + "$id": "X509.json", "type": "object", "required": [ "type" @@ -2040,8 +1919,8 @@ }, "additionalProperties": false }, - "http://asyncapi.com/definitions/2.2.0/symmetricEncryption.json": { - "$id": "http://asyncapi.com/definitions/2.2.0/symmetricEncryption.json", + "symmetricEncryption.json": { + "$id": "symmetricEncryption.json", "type": "object", "required": [ "type" @@ -2064,8 +1943,8 @@ }, "additionalProperties": false }, - "http://asyncapi.com/definitions/2.2.0/asymmetricEncryption.json": { - "$id": "http://asyncapi.com/definitions/2.2.0/asymmetricEncryption.json", + "asymmetricEncryption.json": { + "$id": "asymmetricEncryption.json", "type": "object", "required": [ "type" @@ -2088,22 +1967,8 @@ }, "additionalProperties": false }, - "http://asyncapi.com/definitions/2.2.0/HTTPSecurityScheme.json": { - "$id": "http://asyncapi.com/definitions/2.2.0/HTTPSecurityScheme.json", - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/2.2.0/NonBearerHTTPSecurityScheme.json" - }, - { - "$ref": "http://asyncapi.com/definitions/2.2.0/BearerHTTPSecurityScheme.json" - }, - { - "$ref": "http://asyncapi.com/definitions/2.2.0/APIKeyHTTPSecurityScheme.json" - } - ] - }, - "http://asyncapi.com/definitions/2.2.0/NonBearerHTTPSecurityScheme.json": { - "$id": "http://asyncapi.com/definitions/2.2.0/NonBearerHTTPSecurityScheme.json", + "NonBearerHTTPSecurityScheme.json": { + "$id": "NonBearerHTTPSecurityScheme.json", "not": { "type": "object", "properties": { @@ -2141,8 +2006,8 @@ }, "additionalProperties": false }, - "http://asyncapi.com/definitions/2.2.0/BearerHTTPSecurityScheme.json": { - "$id": "http://asyncapi.com/definitions/2.2.0/BearerHTTPSecurityScheme.json", + "BearerHTTPSecurityScheme.json": { + "$id": "BearerHTTPSecurityScheme.json", "type": "object", "required": [ "type", @@ -2175,8 +2040,8 @@ }, "additionalProperties": false }, - "http://asyncapi.com/definitions/2.2.0/APIKeyHTTPSecurityScheme.json": { - "$id": "http://asyncapi.com/definitions/2.2.0/APIKeyHTTPSecurityScheme.json", + "APIKeyHTTPSecurityScheme.json": { + "$id": "APIKeyHTTPSecurityScheme.json", "type": "object", "required": [ "type", @@ -2212,8 +2077,56 @@ }, "additionalProperties": false }, - "http://asyncapi.com/definitions/2.2.0/oauth2Flows.json": { - "$id": "http://asyncapi.com/definitions/2.2.0/oauth2Flows.json", + "HTTPSecurityScheme.json": { + "$id": "HTTPSecurityScheme.json", + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.2.0/NonBearerHTTPSecurityScheme.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.2.0/BearerHTTPSecurityScheme.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.2.0/APIKeyHTTPSecurityScheme.json" + } + ] + }, + "oauth2Scopes.json": { + "$id": "oauth2Scopes.json", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "oauth2Flow.json": { + "$id": "oauth2Flow.json", + "type": "object", + "properties": { + "authorizationUrl": { + "type": "string", + "format": "uri" + }, + "tokenUrl": { + "type": "string", + "format": "uri" + }, + "refreshUrl": { + "type": "string", + "format": "uri" + }, + "scopes": { + "$ref": "http://asyncapi.com/definitions/2.2.0/oauth2Scopes.json" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.2.0/specificationExtension.json" + } + }, + "additionalProperties": false + }, + "oauth2Flows.json": { + "$id": "oauth2Flows.json", "type": "object", "required": [ "type", @@ -2316,42 +2229,8 @@ } } }, - "http://asyncapi.com/definitions/2.2.0/oauth2Flow.json": { - "$id": "http://asyncapi.com/definitions/2.2.0/oauth2Flow.json", - "type": "object", - "properties": { - "authorizationUrl": { - "type": "string", - "format": "uri" - }, - "tokenUrl": { - "type": "string", - "format": "uri" - }, - "refreshUrl": { - "type": "string", - "format": "uri" - }, - "scopes": { - "$ref": "http://asyncapi.com/definitions/2.2.0/oauth2Scopes.json" - } - }, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "http://asyncapi.com/definitions/2.2.0/specificationExtension.json" - } - }, - "additionalProperties": false - }, - "http://asyncapi.com/definitions/2.2.0/oauth2Scopes.json": { - "$id": "http://asyncapi.com/definitions/2.2.0/oauth2Scopes.json", - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "http://asyncapi.com/definitions/2.2.0/openIdConnect.json": { - "$id": "http://asyncapi.com/definitions/2.2.0/openIdConnect.json", + "openIdConnect.json": { + "$id": "openIdConnect.json", "type": "object", "required": [ "type", @@ -2379,22 +2258,8 @@ }, "additionalProperties": false }, - "http://asyncapi.com/definitions/2.2.0/SaslSecurityScheme.json": { - "$id": "http://asyncapi.com/definitions/2.2.0/SaslSecurityScheme.json", - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/2.2.0/SaslPlainSecurityScheme.json" - }, - { - "$ref": "http://asyncapi.com/definitions/2.2.0/SaslScramSecurityScheme.json" - }, - { - "$ref": "http://asyncapi.com/definitions/2.2.0/SaslGssapiSecurityScheme.json" - } - ] - }, - "http://asyncapi.com/definitions/2.2.0/SaslPlainSecurityScheme.json": { - "$id": "http://asyncapi.com/definitions/2.2.0/SaslPlainSecurityScheme.json", + "SaslPlainSecurityScheme.json": { + "$id": "SaslPlainSecurityScheme.json", "type": "object", "required": [ "type" @@ -2417,8 +2282,8 @@ }, "additionalProperties": false }, - "http://asyncapi.com/definitions/2.2.0/SaslScramSecurityScheme.json": { - "$id": "http://asyncapi.com/definitions/2.2.0/SaslScramSecurityScheme.json", + "SaslScramSecurityScheme.json": { + "$id": "SaslScramSecurityScheme.json", "type": "object", "required": [ "type" @@ -2442,8 +2307,8 @@ }, "additionalProperties": false }, - "http://asyncapi.com/definitions/2.2.0/SaslGssapiSecurityScheme.json": { - "$id": "http://asyncapi.com/definitions/2.2.0/SaslGssapiSecurityScheme.json", + "SaslGssapiSecurityScheme.json": { + "$id": "SaslGssapiSecurityScheme.json", "type": "object", "required": [ "type" @@ -2465,7 +2330,142 @@ } }, "additionalProperties": false + }, + "SaslSecurityScheme.json": { + "$id": "SaslSecurityScheme.json", + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.2.0/SaslPlainSecurityScheme.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.2.0/SaslScramSecurityScheme.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.2.0/SaslGssapiSecurityScheme.json" + } + ] + }, + "SecurityScheme.json": { + "$id": "SecurityScheme.json", + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.2.0/userPassword.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.2.0/apiKey.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.2.0/X509.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.2.0/symmetricEncryption.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.2.0/asymmetricEncryption.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.2.0/HTTPSecurityScheme.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.2.0/oauth2Flows.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.2.0/openIdConnect.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.2.0/SaslSecurityScheme.json" + } + ] + }, + "components.json": { + "$id": "components.json", + "type": "object", + "description": "An object to hold a set of reusable objects for different aspects of the AsyncAPI Specification.", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.2.0/specificationExtension.json" + } + }, + "properties": { + "schemas": { + "$ref": "http://asyncapi.com/definitions/2.2.0/schemas.json" + }, + "messages": { + "$ref": "http://asyncapi.com/definitions/2.2.0/messages.json" + }, + "securitySchemes": { + "type": "object", + "patternProperties": { + "^[\\w\\d\\.\\-_]+$": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.2.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.2.0/SecurityScheme.json" + } + ] + } + } + }, + "parameters": { + "$ref": "http://asyncapi.com/definitions/2.2.0/parameters.json" + }, + "correlationIds": { + "type": "object", + "patternProperties": { + "^[\\w\\d\\.\\-_]+$": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.2.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.2.0/correlationId.json" + } + ] + } + } + }, + "operationTraits": { + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/2.2.0/operationTrait.json" + } + }, + "messageTraits": { + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/2.2.0/messageTrait.json" + } + }, + "serverBindings": { + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/2.2.0/bindingsObject.json" + } + }, + "channelBindings": { + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/2.2.0/bindingsObject.json" + } + }, + "operationBindings": { + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/2.2.0/bindingsObject.json" + } + }, + "messageBindings": { + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/2.2.0/bindingsObject.json" + } + } + } } }, + "$id": "http://asyncapi.com/definitions/2.2.0/asyncapi.json", "description": "!!Auto generated!! \n Do not manually edit. " } \ No newline at end of file diff --git a/schemas/2.3.0-without-$id.json b/schemas/2.3.0-without-$id.json index e55f77bf..980bd0e8 100644 --- a/schemas/2.3.0-without-$id.json +++ b/schemas/2.3.0-without-$id.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema", + "$schema": "http://json-schema.org/draft-07/schema#", "title": "AsyncAPI 2.3.0 schema.", "type": "object", "required": [ @@ -58,45 +58,6 @@ "additionalProperties": true, "additionalItems": true }, - "info": { - "type": "object", - "description": "General information about the API.", - "required": [ - "version", - "title" - ], - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "properties": { - "title": { - "type": "string", - "description": "A unique and precise title of the API." - }, - "version": { - "type": "string", - "description": "A semantic version number of the API." - }, - "description": { - "type": "string", - "description": "A longer description of the API. Should be different from the title. CommonMark is allowed." - }, - "termsOfService": { - "type": "string", - "description": "A URL to the Terms of Service for the API. MUST be in the format of a URL.", - "format": "uri" - }, - "contact": { - "$ref": "#/definitions/contact" - }, - "license": { - "$ref": "#/definitions/license" - } - } - }, "contact": { "type": "object", "description": "Contact information for the owners of the API.", @@ -146,41 +107,12 @@ } } }, - "servers": { - "description": "An object representing multiple servers.", - "type": "object", - "additionalProperties": { - "oneOf": [ - { - "$ref": "#/definitions/Reference" - }, - { - "$ref": "#/definitions/server" - } - ] - } - }, - "Reference": { - "type": "object", - "required": [ - "$ref" - ], - "properties": { - "$ref": { - "$ref": "#/definitions/ReferenceObject" - } - } - }, - "ReferenceObject": { - "type": "string", - "format": "uri-reference" - }, - "server": { + "info": { "type": "object", - "description": "An object representing a Server.", + "description": "General information about the API.", "required": [ - "url", - "protocol" + "version", + "title" ], "additionalProperties": false, "patternProperties": { @@ -189,37 +121,44 @@ } }, "properties": { - "url": { - "type": "string" - }, - "description": { - "type": "string" + "title": { + "type": "string", + "description": "A unique and precise title of the API." }, - "protocol": { + "version": { "type": "string", - "description": "The transfer protocol." + "description": "A semantic version number of the API." }, - "protocolVersion": { - "type": "string" + "description": { + "type": "string", + "description": "A longer description of the API. Should be different from the title. CommonMark is allowed." }, - "variables": { - "$ref": "#/definitions/serverVariables" + "termsOfService": { + "type": "string", + "description": "A URL to the Terms of Service for the API. MUST be in the format of a URL.", + "format": "uri" }, - "security": { - "type": "array", - "items": { - "$ref": "#/definitions/SecurityRequirement" - } + "contact": { + "$ref": "#/definitions/contact" }, - "bindings": { - "$ref": "#/definitions/bindingsObject" + "license": { + "$ref": "#/definitions/license" } } }, - "serverVariables": { + "ReferenceObject": { + "type": "string", + "format": "uri-reference" + }, + "Reference": { "type": "object", - "additionalProperties": { - "$ref": "#/definitions/serverVariable" + "required": [ + "$ref" + ], + "properties": { + "$ref": { + "$ref": "#/definitions/ReferenceObject" + } } }, "serverVariable": { @@ -253,6 +192,12 @@ } } }, + "serverVariables": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/serverVariable" + } + }, "SecurityRequirement": { "type": "object", "additionalProperties": { @@ -285,19 +230,13 @@ "solace": {} } }, - "channels": { - "type": "object", - "propertyNames": { - "type": "string", - "format": "uri-template", - "minLength": 1 - }, - "additionalProperties": { - "$ref": "#/definitions/channelItem" - } - }, - "channelItem": { + "server": { "type": "object", + "description": "An object representing a Server.", + "required": [ + "url", + "protocol" + ], "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { @@ -305,40 +244,35 @@ } }, "properties": { - "$ref": { - "$ref": "#/definitions/ReferenceObject" - }, - "parameters": { - "$ref": "#/definitions/parameters" + "url": { + "type": "string" }, "description": { - "type": "string", - "description": "A description of the channel." + "type": "string" }, - "servers": { - "type": "array", - "description": "The names of the servers on which this channel is available. If absent or empty then this channel must be available on all servers.", - "items": { - "type": "string" - }, - "uniqueItems": true + "protocol": { + "type": "string", + "description": "The transfer protocol." }, - "publish": { - "$ref": "#/definitions/operation" + "protocolVersion": { + "type": "string" }, - "subscribe": { - "$ref": "#/definitions/operation" + "variables": { + "$ref": "#/definitions/serverVariables" }, - "deprecated": { - "type": "boolean", - "default": false + "security": { + "type": "array", + "items": { + "$ref": "#/definitions/SecurityRequirement" + } }, "bindings": { "$ref": "#/definitions/bindingsObject" } } }, - "parameters": { + "servers": { + "description": "An object representing multiple servers.", "type": "object", "additionalProperties": { "oneOf": [ @@ -346,189 +280,67 @@ "$ref": "#/definitions/Reference" }, { - "$ref": "#/definitions/parameter" + "$ref": "#/definitions/server" } ] - }, - "description": "JSON objects describing re-usable channel parameters." + } }, - "parameter": { - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" + "json-schema-draft-07-schema": { + "title": "Core schema meta-schema", + "definitions": { + "schemaArray": { + "type": "array", + "minItems": 1, + "items": { + "$ref": "#/definitions/json-schema-draft-07-schema" + } + }, + "nonNegativeInteger": { + "type": "integer", + "minimum": 0 + }, + "nonNegativeIntegerDefault0": { + "allOf": [ + { + "$ref": "#/definitions/json-schema-draft-07-schema/definitions/nonNegativeInteger" + }, + { + "default": 0 + } + ] + }, + "simpleTypes": { + "enum": [ + "array", + "boolean", + "integer", + "null", + "number", + "object", + "string" + ] + }, + "stringArray": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true, + "default": [] } }, + "type": [ + "object", + "boolean" + ], "properties": { - "description": { + "$id": { "type": "string", - "description": "A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed." - }, - "schema": { - "$ref": "#/definitions/schema" + "format": "uri-reference" }, - "location": { + "$schema": { "type": "string", - "description": "A runtime expression that specifies the location of the parameter value", - "pattern": "^\\$message\\.(header|payload)#(\\/(([^\\/~])|(~[01]))*)*" - }, - "$ref": { - "$ref": "#/definitions/ReferenceObject" - } - } - }, - "schema": { - "allOf": [ - { - "$ref": "#/definitions/json-schema-draft-07-schema" - }, - { - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "properties": { - "additionalProperties": { - "anyOf": [ - { - "$ref": "#/definitions/schema" - }, - { - "type": "boolean" - } - ], - "default": {} - }, - "items": { - "anyOf": [ - { - "$ref": "#/definitions/schema" - }, - { - "type": "array", - "minItems": 1, - "items": { - "$ref": "#/definitions/schema" - } - } - ], - "default": {} - }, - "allOf": { - "type": "array", - "minItems": 1, - "items": { - "$ref": "#/definitions/schema" - } - }, - "oneOf": { - "type": "array", - "minItems": 1, - "items": { - "$ref": "#/definitions/schema" - } - }, - "anyOf": { - "type": "array", - "minItems": 1, - "items": { - "$ref": "#/definitions/schema" - } - }, - "not": { - "$ref": "#/definitions/schema" - }, - "properties": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/schema" - }, - "default": {} - }, - "patternProperties": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/schema" - }, - "default": {} - }, - "propertyNames": { - "$ref": "#/definitions/schema" - }, - "contains": { - "$ref": "#/definitions/schema" - }, - "discriminator": { - "type": "string" - }, - "externalDocs": { - "$ref": "#/definitions/externalDocs" - }, - "deprecated": { - "type": "boolean", - "default": false - } - } - } - ] - }, - "json-schema-draft-07-schema": { - "title": "Core schema meta-schema", - "definitions": { - "schemaArray": { - "type": "array", - "minItems": 1, - "items": { - "$ref": "#/definitions/json-schema-draft-07-schema" - } - }, - "nonNegativeInteger": { - "type": "integer", - "minimum": 0 - }, - "nonNegativeIntegerDefault0": { - "allOf": [ - { - "$ref": "#/definitions/json-schema-draft-07-schema/definitions/nonNegativeInteger" - }, - { - "default": 0 - } - ] - }, - "simpleTypes": { - "enum": [ - "array", - "boolean", - "integer", - "null", - "number", - "object", - "string" - ] - }, - "stringArray": { - "type": "array", - "items": { - "type": "string" - }, - "uniqueItems": true, - "default": [] - } - }, - "type": [ - "object", - "boolean" - ], - "properties": { - "$id": { - "type": "string", - "format": "uri-reference" - }, - "$schema": { - "type": "string", - "format": "uri" + "format": "uri" }, "$ref": { "type": "string", @@ -738,97 +550,150 @@ } } }, - "operation": { - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "properties": { - "traits": { - "type": "array", - "items": { - "oneOf": [ - { - "$ref": "#/definitions/Reference" - }, - { - "$ref": "#/definitions/operationTrait" - } - ] - } - }, - "summary": { - "type": "string" - }, - "description": { - "type": "string" - }, - "tags": { - "type": "array", - "items": { - "$ref": "#/definitions/tag" - }, - "uniqueItems": true - }, - "externalDocs": { - "$ref": "#/definitions/externalDocs" - }, - "operationId": { - "type": "string" - }, - "bindings": { - "$ref": "#/definitions/bindingsObject" - }, - "message": { - "$ref": "#/definitions/message" - } - } - }, - "operationTrait": { - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "properties": { - "summary": { - "type": "string" - }, - "description": { - "type": "string" + "schema": { + "allOf": [ + { + "$ref": "#/definitions/json-schema-draft-07-schema" }, - "tags": { - "type": "array", - "items": { - "$ref": "#/definitions/tag" + { + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } }, - "uniqueItems": true - }, - "externalDocs": { - "$ref": "#/definitions/externalDocs" - }, - "operationId": { - "type": "string" - }, - "bindings": { - "$ref": "#/definitions/bindingsObject" - } - } - }, - "tag": { - "type": "object", - "additionalProperties": false, - "required": [ - "name" - ], - "properties": { - "name": { - "type": "string" + "properties": { + "additionalProperties": { + "anyOf": [ + { + "$ref": "#/definitions/schema" + }, + { + "type": "boolean" + } + ], + "default": {} + }, + "items": { + "anyOf": [ + { + "$ref": "#/definitions/schema" + }, + { + "type": "array", + "minItems": 1, + "items": { + "$ref": "#/definitions/schema" + } + } + ], + "default": {} + }, + "allOf": { + "type": "array", + "minItems": 1, + "items": { + "$ref": "#/definitions/schema" + } + }, + "oneOf": { + "type": "array", + "minItems": 1, + "items": { + "$ref": "#/definitions/schema" + } + }, + "anyOf": { + "type": "array", + "minItems": 1, + "items": { + "$ref": "#/definitions/schema" + } + }, + "not": { + "$ref": "#/definitions/schema" + }, + "properties": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/schema" + }, + "default": {} + }, + "patternProperties": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/schema" + }, + "default": {} + }, + "propertyNames": { + "$ref": "#/definitions/schema" + }, + "contains": { + "$ref": "#/definitions/schema" + }, + "discriminator": { + "type": "string" + }, + "externalDocs": { + "$ref": "#/definitions/externalDocs" + }, + "deprecated": { + "type": "boolean", + "default": false + } + } + } + ] + }, + "parameter": { + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, + "properties": { + "description": { + "type": "string", + "description": "A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed." + }, + "schema": { + "$ref": "#/definitions/schema" + }, + "location": { + "type": "string", + "description": "A runtime expression that specifies the location of the parameter value", + "pattern": "^\\$message\\.(header|payload)#(\\/(([^\\/~])|(~[01]))*)*" + }, + "$ref": { + "$ref": "#/definitions/ReferenceObject" + } + } + }, + "parameters": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/parameter" + } + ] + }, + "description": "JSON objects describing re-usable channel parameters." + }, + "tag": { + "type": "object", + "additionalProperties": false, + "required": [ + "name" + ], + "properties": { + "name": { + "type": "string" }, "description": { "type": "string" @@ -843,270 +708,38 @@ } } }, - "message": { - "oneOf": [ - { - "$ref": "#/definitions/Reference" - }, - { - "oneOf": [ - { - "type": "object", - "required": [ - "oneOf" - ], - "additionalProperties": false, - "properties": { - "oneOf": { - "type": "array", - "items": { - "$ref": "#/definitions/message" - } - } - } - }, - { - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "properties": { - "schemaFormat": { - "type": "string" - }, - "contentType": { - "type": "string" - }, - "headers": { - "allOf": [ - { - "$ref": "#/definitions/schema" - }, - { - "properties": { - "type": { - "const": "object" - } - } - } - ] - }, - "payload": {}, - "correlationId": { - "oneOf": [ - { - "$ref": "#/definitions/Reference" - }, - { - "$ref": "#/definitions/correlationId" - } - ] - }, - "tags": { - "type": "array", - "items": { - "$ref": "#/definitions/tag" - }, - "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." - }, - "externalDocs": { - "$ref": "#/definitions/externalDocs" - }, - "deprecated": { - "type": "boolean", - "default": false - }, - "examples": { - "type": "array", - "items": { - "type": "object", - "additionalProperties": false, - "anyOf": [ - { - "required": [ - "payload" - ] - }, - { - "required": [ - "headers" - ] - } - ], - "properties": { - "name": { - "type": "string", - "description": "Machine readable name of the message example." - }, - "summary": { - "type": "string", - "description": "A brief summary of the message example." - }, - "headers": { - "type": "object" - }, - "payload": {} - } - } - }, - "bindings": { - "$ref": "#/definitions/bindingsObject" - }, - "traits": { - "type": "array", - "items": { - "oneOf": [ - { - "$ref": "#/definitions/Reference" - }, - { - "$ref": "#/definitions/messageTrait" - } - ] - } - } - }, - "allOf": [ - { - "if": { - "not": { - "required": [ - "schemaFormat" - ] - } - }, - "then": { - "properties": { - "payload": { - "$ref": "#/definitions/schema" - } - } - } - }, - { - "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" - ] - } - } - }, - "then": { - "properties": { - "payload": { - "$ref": "#/definitions/schema" - } - } - } - }, - { - "if": { - "required": [ - "schemaFormat" - ], - "properties": { - "schemaFormat": { - "enum": [ - "application/schema+json;version=draft-07", - "application/schema+yaml;version=draft-07" - ] - } - } - }, - "then": { - "properties": { - "payload": { - "$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": { - "payload": { - "$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": { - "payload": { - "$ref": "#/definitions/avroSchema_v1" - } - } - } - } - ] - } - ] + "operationTrait": { + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" } - ] + }, + "properties": { + "summary": { + "type": "string" + }, + "description": { + "type": "string" + }, + "tags": { + "type": "array", + "items": { + "$ref": "#/definitions/tag" + }, + "uniqueItems": true + }, + "externalDocs": { + "$ref": "#/definitions/externalDocs" + }, + "operationId": { + "type": "string" + }, + "bindings": { + "$ref": "#/definitions/bindingsObject" + } + } }, "correlationId": { "type": "object", @@ -1788,33 +1421,297 @@ "size": { "type": "number" } - }, - "required": [ - "type", - "name", - "size" + }, + "required": [ + "type", + "name", + "size" + ] + }, + "name": { + "type": "string", + "pattern": "^[A-Za-z_][A-Za-z0-9_]*$" + }, + "namespace": { + "type": "string", + "pattern": "^([A-Za-z_][A-Za-z0-9_]*(\\.[A-Za-z_][A-Za-z0-9_]*)*)*$" + } + }, + "description": "Json-Schema definition for Avro AVSC files.", + "oneOf": [ + { + "$ref": "#/definitions/avroSchema_v1/definitions/avroSchema" + } + ], + "title": "Avro Schema Definition" + }, + "message": { + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "oneOf": [ + { + "type": "object", + "required": [ + "oneOf" + ], + "additionalProperties": false, + "properties": { + "oneOf": { + "type": "array", + "items": { + "$ref": "#/definitions/message" + } + } + } + }, + { + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, + "properties": { + "schemaFormat": { + "type": "string" + }, + "contentType": { + "type": "string" + }, + "headers": { + "allOf": [ + { + "$ref": "#/definitions/schema" + }, + { + "properties": { + "type": { + "const": "object" + } + } + } + ] + }, + "payload": {}, + "correlationId": { + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/correlationId" + } + ] + }, + "tags": { + "type": "array", + "items": { + "$ref": "#/definitions/tag" + }, + "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." + }, + "externalDocs": { + "$ref": "#/definitions/externalDocs" + }, + "deprecated": { + "type": "boolean", + "default": false + }, + "examples": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "anyOf": [ + { + "required": [ + "payload" + ] + }, + { + "required": [ + "headers" + ] + } + ], + "properties": { + "name": { + "type": "string", + "description": "Machine readable name of the message example." + }, + "summary": { + "type": "string", + "description": "A brief summary of the message example." + }, + "headers": { + "type": "object" + }, + "payload": {} + } + } + }, + "bindings": { + "$ref": "#/definitions/bindingsObject" + }, + "traits": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/messageTrait" + } + ] + } + } + }, + "allOf": [ + { + "if": { + "not": { + "required": [ + "schemaFormat" + ] + } + }, + "then": { + "properties": { + "payload": { + "$ref": "#/definitions/schema" + } + } + } + }, + { + "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" + ] + } + } + }, + "then": { + "properties": { + "payload": { + "$ref": "#/definitions/schema" + } + } + } + }, + { + "if": { + "required": [ + "schemaFormat" + ], + "properties": { + "schemaFormat": { + "enum": [ + "application/schema+json;version=draft-07", + "application/schema+yaml;version=draft-07" + ] + } + } + }, + "then": { + "properties": { + "payload": { + "$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": { + "payload": { + "$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": { + "payload": { + "$ref": "#/definitions/avroSchema_v1" + } + } + } + } + ] + } ] - }, - "name": { - "type": "string", - "pattern": "^[A-Za-z_][A-Za-z0-9_]*$" - }, - "namespace": { - "type": "string", - "pattern": "^([A-Za-z_][A-Za-z0-9_]*(\\.[A-Za-z_][A-Za-z0-9_]*)*)*$" - } - }, - "description": "Json-Schema definition for Avro AVSC files.", - "oneOf": [ - { - "$ref": "#/definitions/avroSchema_v1/definitions/avroSchema" } - ], - "title": "Avro Schema Definition" + ] }, - "components": { + "operation": { "type": "object", - "description": "An object to hold a set of reusable objects for different aspects of the AsyncAPI Specification.", "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { @@ -1822,133 +1719,112 @@ } }, "properties": { - "schemas": { - "$ref": "#/definitions/schemas" - }, - "servers": { - "$ref": "#/definitions/servers" - }, - "channels": { - "$ref": "#/definitions/channels" - }, - "messages": { - "$ref": "#/definitions/messages" - }, - "securitySchemes": { - "type": "object", - "patternProperties": { - "^[\\w\\d\\.\\-_]+$": { - "oneOf": [ - { - "$ref": "#/definitions/Reference" - }, - { - "$ref": "#/definitions/SecurityScheme" - } - ] - } + "traits": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/operationTrait" + } + ] } }, - "parameters": { - "$ref": "#/definitions/parameters" - }, - "correlationIds": { - "type": "object", - "patternProperties": { - "^[\\w\\d\\.\\-_]+$": { - "oneOf": [ - { - "$ref": "#/definitions/Reference" - }, - { - "$ref": "#/definitions/correlationId" - } - ] - } - } + "summary": { + "type": "string" }, - "operationTraits": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/operationTrait" - } + "description": { + "type": "string" }, - "messageTraits": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/messageTrait" - } + "tags": { + "type": "array", + "items": { + "$ref": "#/definitions/tag" + }, + "uniqueItems": true }, - "serverBindings": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/bindingsObject" - } + "externalDocs": { + "$ref": "#/definitions/externalDocs" }, - "channelBindings": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/bindingsObject" - } + "operationId": { + "type": "string" }, - "operationBindings": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/bindingsObject" - } + "bindings": { + "$ref": "#/definitions/bindingsObject" }, - "messageBindings": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/bindingsObject" - } + "message": { + "$ref": "#/definitions/message" } } }, - "schemas": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/schema" - }, - "description": "JSON objects describing schemas the API uses." - }, - "messages": { + "channelItem": { "type": "object", - "additionalProperties": { - "$ref": "#/definitions/message" + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } }, - "description": "JSON objects describing the messages being consumed and produced by the API." - }, - "SecurityScheme": { - "oneOf": [ - { - "$ref": "#/definitions/userPassword" - }, - { - "$ref": "#/definitions/apiKey" + "properties": { + "$ref": { + "$ref": "#/definitions/ReferenceObject" }, - { - "$ref": "#/definitions/X509" + "parameters": { + "$ref": "#/definitions/parameters" }, - { - "$ref": "#/definitions/symmetricEncryption" + "description": { + "type": "string", + "description": "A description of the channel." }, - { - "$ref": "#/definitions/asymmetricEncryption" + "servers": { + "type": "array", + "description": "The names of the servers on which this channel is available. If absent or empty then this channel must be available on all servers.", + "items": { + "type": "string" + }, + "uniqueItems": true }, - { - "$ref": "#/definitions/HTTPSecurityScheme" + "publish": { + "$ref": "#/definitions/operation" }, - { - "$ref": "#/definitions/oauth2Flows" + "subscribe": { + "$ref": "#/definitions/operation" }, - { - "$ref": "#/definitions/openIdConnect" + "deprecated": { + "type": "boolean", + "default": false }, - { - "$ref": "#/definitions/SaslSecurityScheme" + "bindings": { + "$ref": "#/definitions/bindingsObject" } - ] + } + }, + "channels": { + "type": "object", + "propertyNames": { + "type": "string", + "format": "uri-template", + "minLength": 1 + }, + "additionalProperties": { + "$ref": "#/definitions/channelItem" + } + }, + "schemas": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/schema" + }, + "description": "JSON objects describing schemas the API uses." + }, + "messages": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/message" + }, + "description": "JSON objects describing the messages being consumed and produced by the API." }, "userPassword": { "type": "object", @@ -2073,19 +1949,6 @@ }, "additionalProperties": false }, - "HTTPSecurityScheme": { - "oneOf": [ - { - "$ref": "#/definitions/NonBearerHTTPSecurityScheme" - }, - { - "$ref": "#/definitions/BearerHTTPSecurityScheme" - }, - { - "$ref": "#/definitions/APIKeyHTTPSecurityScheme" - } - ] - }, "NonBearerHTTPSecurityScheme": { "not": { "type": "object", @@ -2193,6 +2056,51 @@ }, "additionalProperties": false }, + "HTTPSecurityScheme": { + "oneOf": [ + { + "$ref": "#/definitions/NonBearerHTTPSecurityScheme" + }, + { + "$ref": "#/definitions/BearerHTTPSecurityScheme" + }, + { + "$ref": "#/definitions/APIKeyHTTPSecurityScheme" + } + ] + }, + "oauth2Scopes": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "oauth2Flow": { + "type": "object", + "properties": { + "authorizationUrl": { + "type": "string", + "format": "uri" + }, + "tokenUrl": { + "type": "string", + "format": "uri" + }, + "refreshUrl": { + "type": "string", + "format": "uri" + }, + "scopes": { + "$ref": "#/definitions/oauth2Scopes" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, + "additionalProperties": false + }, "oauth2Flows": { "type": "object", "required": [ @@ -2296,38 +2204,6 @@ } } }, - "oauth2Flow": { - "type": "object", - "properties": { - "authorizationUrl": { - "type": "string", - "format": "uri" - }, - "tokenUrl": { - "type": "string", - "format": "uri" - }, - "refreshUrl": { - "type": "string", - "format": "uri" - }, - "scopes": { - "$ref": "#/definitions/oauth2Scopes" - } - }, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "additionalProperties": false - }, - "oauth2Scopes": { - "type": "object", - "additionalProperties": { - "type": "string" - } - }, "openIdConnect": { "type": "object", "required": [ @@ -2356,19 +2232,6 @@ }, "additionalProperties": false }, - "SaslSecurityScheme": { - "oneOf": [ - { - "$ref": "#/definitions/SaslPlainSecurityScheme" - }, - { - "$ref": "#/definitions/SaslScramSecurityScheme" - }, - { - "$ref": "#/definitions/SaslGssapiSecurityScheme" - } - ] - }, "SaslPlainSecurityScheme": { "type": "object", "required": [ @@ -2438,6 +2301,143 @@ } }, "additionalProperties": false + }, + "SaslSecurityScheme": { + "oneOf": [ + { + "$ref": "#/definitions/SaslPlainSecurityScheme" + }, + { + "$ref": "#/definitions/SaslScramSecurityScheme" + }, + { + "$ref": "#/definitions/SaslGssapiSecurityScheme" + } + ] + }, + "SecurityScheme": { + "oneOf": [ + { + "$ref": "#/definitions/userPassword" + }, + { + "$ref": "#/definitions/apiKey" + }, + { + "$ref": "#/definitions/X509" + }, + { + "$ref": "#/definitions/symmetricEncryption" + }, + { + "$ref": "#/definitions/asymmetricEncryption" + }, + { + "$ref": "#/definitions/HTTPSecurityScheme" + }, + { + "$ref": "#/definitions/oauth2Flows" + }, + { + "$ref": "#/definitions/openIdConnect" + }, + { + "$ref": "#/definitions/SaslSecurityScheme" + } + ] + }, + "components": { + "type": "object", + "description": "An object to hold a set of reusable objects for different aspects of the AsyncAPI Specification.", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, + "properties": { + "schemas": { + "$ref": "#/definitions/schemas" + }, + "servers": { + "$ref": "#/definitions/servers" + }, + "channels": { + "$ref": "#/definitions/channels" + }, + "messages": { + "$ref": "#/definitions/messages" + }, + "securitySchemes": { + "type": "object", + "patternProperties": { + "^[\\w\\d\\.\\-_]+$": { + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/SecurityScheme" + } + ] + } + } + }, + "parameters": { + "$ref": "#/definitions/parameters" + }, + "correlationIds": { + "type": "object", + "patternProperties": { + "^[\\w\\d\\.\\-_]+$": { + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/correlationId" + } + ] + } + } + }, + "operationTraits": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/operationTrait" + } + }, + "messageTraits": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/messageTrait" + } + }, + "serverBindings": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/bindingsObject" + } + }, + "channelBindings": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/bindingsObject" + } + }, + "operationBindings": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/bindingsObject" + } + }, + "messageBindings": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/bindingsObject" + } + } + } } }, "description": "!!Auto generated!! \n Do not manually edit. " diff --git a/schemas/2.3.0.json b/schemas/2.3.0.json index 3fe29a9f..495ed50e 100644 --- a/schemas/2.3.0.json +++ b/schemas/2.3.0.json @@ -1,6 +1,5 @@ { - "$id": "http://asyncapi.com/definitions/2.3.0/asyncapi.json", - "$schema": "http://json-schema.org/draft-07/schema", + "$schema": "http://json-schema.org/draft-07/schema#", "title": "AsyncAPI 2.3.0 schema.", "type": "object", "required": [ @@ -54,54 +53,14 @@ } }, "definitions": { - "http://asyncapi.com/definitions/2.3.0/specificationExtension.json": { - "$id": "http://asyncapi.com/definitions/2.3.0/specificationExtension.json", + "specificationExtension.json": { + "$id": "specificationExtension.json", "description": "Any property starting with x- is valid.", "additionalProperties": true, "additionalItems": true }, - "http://asyncapi.com/definitions/2.3.0/info.json": { - "$id": "http://asyncapi.com/definitions/2.3.0/info.json", - "type": "object", - "description": "General information about the API.", - "required": [ - "version", - "title" - ], - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "http://asyncapi.com/definitions/2.3.0/specificationExtension.json" - } - }, - "properties": { - "title": { - "type": "string", - "description": "A unique and precise title of the API." - }, - "version": { - "type": "string", - "description": "A semantic version number of the API." - }, - "description": { - "type": "string", - "description": "A longer description of the API. Should be different from the title. CommonMark is allowed." - }, - "termsOfService": { - "type": "string", - "description": "A URL to the Terms of Service for the API. MUST be in the format of a URL.", - "format": "uri" - }, - "contact": { - "$ref": "http://asyncapi.com/definitions/2.3.0/contact.json" - }, - "license": { - "$ref": "http://asyncapi.com/definitions/2.3.0/license.json" - } - } - }, - "http://asyncapi.com/definitions/2.3.0/contact.json": { - "$id": "http://asyncapi.com/definitions/2.3.0/contact.json", + "contact.json": { + "$id": "contact.json", "type": "object", "description": "Contact information for the owners of the API.", "additionalProperties": false, @@ -127,8 +86,8 @@ } } }, - "http://asyncapi.com/definitions/2.3.0/license.json": { - "$id": "http://asyncapi.com/definitions/2.3.0/license.json", + "license.json": { + "$id": "license.json", "type": "object", "required": [ "name" @@ -151,45 +110,13 @@ } } }, - "http://asyncapi.com/definitions/2.3.0/servers.json": { - "$id": "http://asyncapi.com/definitions/2.3.0/servers.json", - "description": "An object representing multiple servers.", - "type": "object", - "additionalProperties": { - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/2.3.0/Reference.json" - }, - { - "$ref": "http://asyncapi.com/definitions/2.3.0/server.json" - } - ] - } - }, - "http://asyncapi.com/definitions/2.3.0/Reference.json": { - "$id": "http://asyncapi.com/definitions/2.3.0/Reference.json", - "type": "object", - "required": [ - "$ref" - ], - "properties": { - "$ref": { - "$ref": "http://asyncapi.com/definitions/2.3.0/ReferenceObject.json" - } - } - }, - "http://asyncapi.com/definitions/2.3.0/ReferenceObject.json": { - "$id": "http://asyncapi.com/definitions/2.3.0/ReferenceObject.json", - "type": "string", - "format": "uri-reference" - }, - "http://asyncapi.com/definitions/2.3.0/server.json": { - "$id": "http://asyncapi.com/definitions/2.3.0/server.json", + "info.json": { + "$id": "info.json", "type": "object", - "description": "An object representing a Server.", + "description": "General information about the API.", "required": [ - "url", - "protocol" + "version", + "title" ], "additionalProperties": false, "patternProperties": { @@ -198,42 +125,50 @@ } }, "properties": { - "url": { - "type": "string" - }, - "description": { - "type": "string" + "title": { + "type": "string", + "description": "A unique and precise title of the API." }, - "protocol": { + "version": { "type": "string", - "description": "The transfer protocol." + "description": "A semantic version number of the API." }, - "protocolVersion": { - "type": "string" + "description": { + "type": "string", + "description": "A longer description of the API. Should be different from the title. CommonMark is allowed." }, - "variables": { - "$ref": "http://asyncapi.com/definitions/2.3.0/serverVariables.json" + "termsOfService": { + "type": "string", + "description": "A URL to the Terms of Service for the API. MUST be in the format of a URL.", + "format": "uri" }, - "security": { - "type": "array", - "items": { - "$ref": "http://asyncapi.com/definitions/2.3.0/SecurityRequirement.json" - } + "contact": { + "$ref": "http://asyncapi.com/definitions/2.3.0/contact.json" }, - "bindings": { - "$ref": "http://asyncapi.com/definitions/2.3.0/bindingsObject.json" + "license": { + "$ref": "http://asyncapi.com/definitions/2.3.0/license.json" } } }, - "http://asyncapi.com/definitions/2.3.0/serverVariables.json": { - "$id": "http://asyncapi.com/definitions/2.3.0/serverVariables.json", + "ReferenceObject.json": { + "$id": "ReferenceObject.json", + "type": "string", + "format": "uri-reference" + }, + "Reference.json": { + "$id": "Reference.json", "type": "object", - "additionalProperties": { - "$ref": "http://asyncapi.com/definitions/2.3.0/serverVariable.json" + "required": [ + "$ref" + ], + "properties": { + "$ref": { + "$ref": "http://asyncapi.com/definitions/2.3.0/ReferenceObject.json" + } } }, - "http://asyncapi.com/definitions/2.3.0/serverVariable.json": { - "$id": "http://asyncapi.com/definitions/2.3.0/serverVariable.json", + "serverVariable.json": { + "$id": "serverVariable.json", "type": "object", "description": "An object representing a Server Variable for server URL template substitution.", "additionalProperties": false, @@ -264,8 +199,15 @@ } } }, - "http://asyncapi.com/definitions/2.3.0/SecurityRequirement.json": { - "$id": "http://asyncapi.com/definitions/2.3.0/SecurityRequirement.json", + "serverVariables.json": { + "$id": "serverVariables.json", + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/2.3.0/serverVariable.json" + } + }, + "SecurityRequirement.json": { + "$id": "SecurityRequirement.json", "type": "object", "additionalProperties": { "type": "array", @@ -275,8 +217,8 @@ "uniqueItems": true } }, - "http://asyncapi.com/definitions/2.3.0/bindingsObject.json": { - "$id": "http://asyncapi.com/definitions/2.3.0/bindingsObject.json", + "bindingsObject.json": { + "$id": "bindingsObject.json", "type": "object", "additionalProperties": true, "properties": { @@ -298,21 +240,14 @@ "solace": {} } }, - "http://asyncapi.com/definitions/2.3.0/channels.json": { - "$id": "http://asyncapi.com/definitions/2.3.0/channels.json", - "type": "object", - "propertyNames": { - "type": "string", - "format": "uri-template", - "minLength": 1 - }, - "additionalProperties": { - "$ref": "http://asyncapi.com/definitions/2.3.0/channelItem.json" - } - }, - "http://asyncapi.com/definitions/2.3.0/channelItem.json": { - "$id": "http://asyncapi.com/definitions/2.3.0/channelItem.json", + "server.json": { + "$id": "server.json", "type": "object", + "description": "An object representing a Server.", + "required": [ + "url", + "protocol" + ], "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { @@ -320,41 +255,36 @@ } }, "properties": { - "$ref": { - "$ref": "http://asyncapi.com/definitions/2.3.0/ReferenceObject.json" - }, - "parameters": { - "$ref": "http://asyncapi.com/definitions/2.3.0/parameters.json" + "url": { + "type": "string" }, "description": { - "type": "string", - "description": "A description of the channel." + "type": "string" }, - "servers": { - "type": "array", - "description": "The names of the servers on which this channel is available. If absent or empty then this channel must be available on all servers.", - "items": { - "type": "string" - }, - "uniqueItems": true + "protocol": { + "type": "string", + "description": "The transfer protocol." }, - "publish": { - "$ref": "http://asyncapi.com/definitions/2.3.0/operation.json" + "protocolVersion": { + "type": "string" }, - "subscribe": { - "$ref": "http://asyncapi.com/definitions/2.3.0/operation.json" + "variables": { + "$ref": "http://asyncapi.com/definitions/2.3.0/serverVariables.json" }, - "deprecated": { - "type": "boolean", - "default": false + "security": { + "type": "array", + "items": { + "$ref": "http://asyncapi.com/definitions/2.3.0/SecurityRequirement.json" + } }, "bindings": { "$ref": "http://asyncapi.com/definitions/2.3.0/bindingsObject.json" } } }, - "http://asyncapi.com/definitions/2.3.0/parameters.json": { - "$id": "http://asyncapi.com/definitions/2.3.0/parameters.json", + "servers.json": { + "$id": "servers.json", + "description": "An object representing multiple servers.", "type": "object", "additionalProperties": { "oneOf": [ @@ -362,196 +292,72 @@ "$ref": "http://asyncapi.com/definitions/2.3.0/Reference.json" }, { - "$ref": "http://asyncapi.com/definitions/2.3.0/parameter.json" + "$ref": "http://asyncapi.com/definitions/2.3.0/server.json" } ] - }, - "description": "JSON objects describing re-usable channel parameters." + } }, - "http://asyncapi.com/definitions/2.3.0/parameter.json": { - "$id": "http://asyncapi.com/definitions/2.3.0/parameter.json", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "http://asyncapi.com/definitions/2.3.0/specificationExtension.json" + "http://json-schema.org/draft-07/schema": { + "$id": "http://json-schema.org/draft-07/schema", + "title": "Core schema meta-schema", + "definitions": { + "schemaArray": { + "type": "array", + "minItems": 1, + "items": { + "$ref": "#" + } + }, + "nonNegativeInteger": { + "type": "integer", + "minimum": 0 + }, + "nonNegativeIntegerDefault0": { + "allOf": [ + { + "$ref": "#/definitions/nonNegativeInteger" + }, + { + "default": 0 + } + ] + }, + "simpleTypes": { + "enum": [ + "array", + "boolean", + "integer", + "null", + "number", + "object", + "string" + ] + }, + "stringArray": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true, + "default": [] } }, + "type": [ + "object", + "boolean" + ], "properties": { - "description": { + "$id": { "type": "string", - "description": "A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed." - }, - "schema": { - "$ref": "http://asyncapi.com/definitions/2.3.0/schema.json" + "format": "uri-reference" }, - "location": { + "$schema": { "type": "string", - "description": "A runtime expression that specifies the location of the parameter value", - "pattern": "^\\$message\\.(header|payload)#(\\/(([^\\/~])|(~[01]))*)*" + "format": "uri" }, "$ref": { - "$ref": "http://asyncapi.com/definitions/2.3.0/ReferenceObject.json" - } - } - }, - "http://asyncapi.com/definitions/2.3.0/schema.json": { - "$id": "http://asyncapi.com/definitions/2.3.0/schema.json", - "allOf": [ - { - "$ref": "http://json-schema.org/draft-07/schema#" - }, - { - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "http://asyncapi.com/definitions/2.3.0/specificationExtension.json" - } - }, - "properties": { - "additionalProperties": { - "anyOf": [ - { - "$ref": "http://asyncapi.com/definitions/2.3.0/schema.json" - }, - { - "type": "boolean" - } - ], - "default": {} - }, - "items": { - "anyOf": [ - { - "$ref": "http://asyncapi.com/definitions/2.3.0/schema.json" - }, - { - "type": "array", - "minItems": 1, - "items": { - "$ref": "http://asyncapi.com/definitions/2.3.0/schema.json" - } - } - ], - "default": {} - }, - "allOf": { - "type": "array", - "minItems": 1, - "items": { - "$ref": "http://asyncapi.com/definitions/2.3.0/schema.json" - } - }, - "oneOf": { - "type": "array", - "minItems": 1, - "items": { - "$ref": "http://asyncapi.com/definitions/2.3.0/schema.json" - } - }, - "anyOf": { - "type": "array", - "minItems": 1, - "items": { - "$ref": "http://asyncapi.com/definitions/2.3.0/schema.json" - } - }, - "not": { - "$ref": "http://asyncapi.com/definitions/2.3.0/schema.json" - }, - "properties": { - "type": "object", - "additionalProperties": { - "$ref": "http://asyncapi.com/definitions/2.3.0/schema.json" - }, - "default": {} - }, - "patternProperties": { - "type": "object", - "additionalProperties": { - "$ref": "http://asyncapi.com/definitions/2.3.0/schema.json" - }, - "default": {} - }, - "propertyNames": { - "$ref": "http://asyncapi.com/definitions/2.3.0/schema.json" - }, - "contains": { - "$ref": "http://asyncapi.com/definitions/2.3.0/schema.json" - }, - "discriminator": { - "type": "string" - }, - "externalDocs": { - "$ref": "http://asyncapi.com/definitions/2.3.0/externalDocs.json" - }, - "deprecated": { - "type": "boolean", - "default": false - } - } - } - ] - }, - "http://json-schema.org/draft-07/schema": { - "$id": "http://json-schema.org/draft-07/schema", - "title": "Core schema meta-schema", - "definitions": { - "schemaArray": { - "type": "array", - "minItems": 1, - "items": { - "$ref": "#" - } - }, - "nonNegativeInteger": { - "type": "integer", - "minimum": 0 - }, - "nonNegativeIntegerDefault0": { - "allOf": [ - { - "$ref": "#/definitions/nonNegativeInteger" - }, - { - "default": 0 - } - ] - }, - "simpleTypes": { - "enum": [ - "array", - "boolean", - "integer", - "null", - "number", - "object", - "string" - ] - }, - "stringArray": { - "type": "array", - "items": { - "type": "string" - }, - "uniqueItems": true, - "default": [] - } - }, - "type": [ - "object", - "boolean" - ], - "properties": { - "$id": { - "type": "string", - "format": "uri-reference" - }, - "$schema": { - "type": "string", - "format": "uri" - }, - "$ref": { - "type": "string", - "format": "uri-reference" + "type": "string", + "format": "uri-reference" }, "$comment": { "type": "string" @@ -735,8 +541,8 @@ }, "default": true }, - "http://asyncapi.com/definitions/2.3.0/externalDocs.json": { - "$id": "http://asyncapi.com/definitions/2.3.0/externalDocs.json", + "externalDocs.json": { + "$id": "externalDocs.json", "type": "object", "additionalProperties": false, "description": "information about external documentation", @@ -758,9 +564,105 @@ } } }, - "http://asyncapi.com/definitions/2.3.0/operation.json": { - "$id": "http://asyncapi.com/definitions/2.3.0/operation.json", - "type": "object", + "schema.json": { + "$id": "schema.json", + "allOf": [ + { + "$ref": "http://json-schema.org/draft-07/schema#" + }, + { + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.3.0/specificationExtension.json" + } + }, + "properties": { + "additionalProperties": { + "anyOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.3.0/schema.json" + }, + { + "type": "boolean" + } + ], + "default": {} + }, + "items": { + "anyOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.3.0/schema.json" + }, + { + "type": "array", + "minItems": 1, + "items": { + "$ref": "http://asyncapi.com/definitions/2.3.0/schema.json" + } + } + ], + "default": {} + }, + "allOf": { + "type": "array", + "minItems": 1, + "items": { + "$ref": "http://asyncapi.com/definitions/2.3.0/schema.json" + } + }, + "oneOf": { + "type": "array", + "minItems": 1, + "items": { + "$ref": "http://asyncapi.com/definitions/2.3.0/schema.json" + } + }, + "anyOf": { + "type": "array", + "minItems": 1, + "items": { + "$ref": "http://asyncapi.com/definitions/2.3.0/schema.json" + } + }, + "not": { + "$ref": "http://asyncapi.com/definitions/2.3.0/schema.json" + }, + "properties": { + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/2.3.0/schema.json" + }, + "default": {} + }, + "patternProperties": { + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/2.3.0/schema.json" + }, + "default": {} + }, + "propertyNames": { + "$ref": "http://asyncapi.com/definitions/2.3.0/schema.json" + }, + "contains": { + "$ref": "http://asyncapi.com/definitions/2.3.0/schema.json" + }, + "discriminator": { + "type": "string" + }, + "externalDocs": { + "$ref": "http://asyncapi.com/definitions/2.3.0/externalDocs.json" + }, + "deprecated": { + "type": "boolean", + "default": false + } + } + } + ] + }, + "parameter.json": { + "$id": "parameter.json", "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { @@ -768,48 +670,64 @@ } }, "properties": { - "traits": { - "type": "array", - "items": { - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/2.3.0/Reference.json" - }, - { - "$ref": "http://asyncapi.com/definitions/2.3.0/operationTrait.json" - } - ] - } + "description": { + "type": "string", + "description": "A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed." }, - "summary": { + "schema": { + "$ref": "http://asyncapi.com/definitions/2.3.0/schema.json" + }, + "location": { + "type": "string", + "description": "A runtime expression that specifies the location of the parameter value", + "pattern": "^\\$message\\.(header|payload)#(\\/(([^\\/~])|(~[01]))*)*" + }, + "$ref": { + "$ref": "http://asyncapi.com/definitions/2.3.0/ReferenceObject.json" + } + } + }, + "parameters.json": { + "$id": "parameters.json", + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.3.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.3.0/parameter.json" + } + ] + }, + "description": "JSON objects describing re-usable channel parameters." + }, + "tag.json": { + "$id": "tag.json", + "type": "object", + "additionalProperties": false, + "required": [ + "name" + ], + "properties": { + "name": { "type": "string" }, "description": { "type": "string" }, - "tags": { - "type": "array", - "items": { - "$ref": "http://asyncapi.com/definitions/2.3.0/tag.json" - }, - "uniqueItems": true - }, "externalDocs": { "$ref": "http://asyncapi.com/definitions/2.3.0/externalDocs.json" - }, - "operationId": { - "type": "string" - }, - "bindings": { - "$ref": "http://asyncapi.com/definitions/2.3.0/bindingsObject.json" - }, - "message": { - "$ref": "http://asyncapi.com/definitions/2.3.0/message.json" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.3.0/specificationExtension.json" } } }, - "http://asyncapi.com/definitions/2.3.0/operationTrait.json": { - "$id": "http://asyncapi.com/definitions/2.3.0/operationTrait.json", + "operationTrait.json": { + "$id": "operationTrait.json", "type": "object", "additionalProperties": false, "patternProperties": { @@ -842,434 +760,144 @@ } } }, - "http://asyncapi.com/definitions/2.3.0/tag.json": { - "$id": "http://asyncapi.com/definitions/2.3.0/tag.json", + "correlationId.json": { + "$id": "correlationId.json", "type": "object", - "additionalProperties": false, "required": [ - "name" + "location" ], + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.3.0/specificationExtension.json" + } + }, "properties": { - "name": { - "type": "string" - }, "description": { - "type": "string" + "type": "string", + "description": "A optional description of the correlation ID. GitHub Flavored Markdown is allowed." }, - "externalDocs": { - "$ref": "http://asyncapi.com/definitions/2.3.0/externalDocs.json" + "location": { + "type": "string", + "description": "A runtime expression that specifies the location of the correlation ID", + "pattern": "^\\$message\\.(header|payload)#(\\/(([^\\/~])|(~[01]))*)*" } - }, + } + }, + "messageTrait.json": { + "$id": "messageTrait.json", + "type": "object", + "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { "$ref": "http://asyncapi.com/definitions/2.3.0/specificationExtension.json" } - } - }, - "http://asyncapi.com/definitions/2.3.0/message.json": { - "$id": "http://asyncapi.com/definitions/2.3.0/message.json", - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/2.3.0/Reference.json" + }, + "properties": { + "schemaFormat": { + "type": "string" }, - { - "oneOf": [ + "contentType": { + "type": "string" + }, + "headers": { + "allOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.3.0/schema.json" + }, { - "type": "object", - "required": [ - "oneOf" - ], - "additionalProperties": false, "properties": { - "oneOf": { - "type": "array", - "items": { - "$ref": "http://asyncapi.com/definitions/2.3.0/message.json" - } + "type": { + "const": "object" } } + } + ] + }, + "correlationId": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.3.0/Reference.json" }, { - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "http://asyncapi.com/definitions/2.3.0/specificationExtension.json" - } - }, - "properties": { - "schemaFormat": { - "type": "string" - }, - "contentType": { - "type": "string" - }, - "headers": { - "allOf": [ - { - "$ref": "http://asyncapi.com/definitions/2.3.0/schema.json" - }, - { - "properties": { - "type": { - "const": "object" - } - } - } - ] - }, - "payload": {}, - "correlationId": { - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/2.3.0/Reference.json" - }, - { - "$ref": "http://asyncapi.com/definitions/2.3.0/correlationId.json" - } - ] - }, - "tags": { - "type": "array", - "items": { - "$ref": "http://asyncapi.com/definitions/2.3.0/tag.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." - }, - "externalDocs": { - "$ref": "http://asyncapi.com/definitions/2.3.0/externalDocs.json" - }, - "deprecated": { - "type": "boolean", - "default": false - }, - "examples": { - "type": "array", - "items": { - "type": "object", - "additionalProperties": false, - "anyOf": [ - { - "required": [ - "payload" - ] - }, - { - "required": [ - "headers" - ] - } - ], - "properties": { - "name": { - "type": "string", - "description": "Machine readable name of the message example." - }, - "summary": { - "type": "string", - "description": "A brief summary of the message example." - }, - "headers": { - "type": "object" - }, - "payload": {} - } - } - }, - "bindings": { - "$ref": "http://asyncapi.com/definitions/2.3.0/bindingsObject.json" - }, - "traits": { - "type": "array", - "items": { - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/2.3.0/Reference.json" - }, - { - "$ref": "http://asyncapi.com/definitions/2.3.0/messageTrait.json" - } - ] - } - } - }, - "allOf": [ - { - "if": { - "not": { - "required": [ - "schemaFormat" - ] - } - }, - "then": { - "properties": { - "payload": { - "$ref": "http://asyncapi.com/definitions/2.3.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" - ] - } - } - }, - "then": { - "properties": { - "payload": { - "$ref": "http://asyncapi.com/definitions/2.3.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/2.3.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/2.3.0/avroSchema_v1.json" - } - } - } - } - ] - } - ] - } - ] - }, - "http://asyncapi.com/definitions/2.3.0/correlationId.json": { - "$id": "http://asyncapi.com/definitions/2.3.0/correlationId.json", - "type": "object", - "required": [ - "location" - ], - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "http://asyncapi.com/definitions/2.3.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/2.3.0/messageTrait.json": { - "$id": "http://asyncapi.com/definitions/2.3.0/messageTrait.json", - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "http://asyncapi.com/definitions/2.3.0/specificationExtension.json" - } - }, - "properties": { - "schemaFormat": { - "type": "string" - }, - "contentType": { - "type": "string" - }, - "headers": { - "allOf": [ - { - "$ref": "http://asyncapi.com/definitions/2.3.0/schema.json" - }, - { - "properties": { - "type": { - "const": "object" - } - } - } - ] - }, - "correlationId": { - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/2.3.0/Reference.json" - }, - { - "$ref": "http://asyncapi.com/definitions/2.3.0/correlationId.json" - } - ] - }, - "tags": { - "type": "array", - "items": { - "$ref": "http://asyncapi.com/definitions/2.3.0/tag.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." - }, - "externalDocs": { - "$ref": "http://asyncapi.com/definitions/2.3.0/externalDocs.json" - }, - "deprecated": { - "type": "boolean", - "default": false - }, - "examples": { - "type": "array", - "items": { - "type": "object" - } - }, - "bindings": { - "$ref": "http://asyncapi.com/definitions/2.3.0/bindingsObject.json" - } - } - }, - "http://asyncapi.com/definitions/2.3.0/openapiSchema_3_0.json": { - "$id": "http://asyncapi.com/definitions/2.3.0/openapiSchema_3_0.json", - "type": "object", - "definitions": { - "ExternalDocumentation": { - "type": "object", - "required": [ - "url" - ], - "properties": { - "description": { - "type": "string" - }, - "url": { - "type": "string", - "format": "uri-reference" - } - }, - "patternProperties": { - "^x-": {} - }, - "additionalProperties": false - }, - "Discriminator": { - "type": "object", - "required": [ - "propertyName" - ], - "properties": { - "propertyName": { - "type": "string" - }, - "mapping": { + "$ref": "http://asyncapi.com/definitions/2.3.0/correlationId.json" + } + ] + }, + "tags": { + "type": "array", + "items": { + "$ref": "http://asyncapi.com/definitions/2.3.0/tag.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." + }, + "externalDocs": { + "$ref": "http://asyncapi.com/definitions/2.3.0/externalDocs.json" + }, + "deprecated": { + "type": "boolean", + "default": false + }, + "examples": { + "type": "array", + "items": { + "type": "object" + } + }, + "bindings": { + "$ref": "http://asyncapi.com/definitions/2.3.0/bindingsObject.json" + } + } + }, + "openapiSchema_3_0.json": { + "$id": "openapiSchema_3_0.json", + "type": "object", + "definitions": { + "ExternalDocumentation": { + "type": "object", + "required": [ + "url" + ], + "properties": { + "description": { + "type": "string" + }, + "url": { + "type": "string", + "format": "uri-reference" + } + }, + "patternProperties": { + "^x-": {} + }, + "additionalProperties": false + }, + "Discriminator": { + "type": "object", + "required": [ + "propertyName" + ], + "properties": { + "propertyName": { + "type": "string" + }, + "mapping": { "type": "object", "additionalProperties": { "type": "string" @@ -1524,8 +1152,8 @@ }, "additionalProperties": false }, - "http://asyncapi.com/definitions/2.3.0/avroSchema_v1.json": { - "$id": "http://asyncapi.com/definitions/2.3.0/avroSchema_v1.json", + "avroSchema_v1.json": { + "$id": "avroSchema_v1.json", "definitions": { "avroSchema": { "title": "Avro Schema", @@ -1816,34 +1444,299 @@ "size": { "type": "number" } - }, - "required": [ - "type", - "name", - "size" + }, + "required": [ + "type", + "name", + "size" + ] + }, + "name": { + "type": "string", + "pattern": "^[A-Za-z_][A-Za-z0-9_]*$" + }, + "namespace": { + "type": "string", + "pattern": "^([A-Za-z_][A-Za-z0-9_]*(\\.[A-Za-z_][A-Za-z0-9_]*)*)*$" + } + }, + "description": "Json-Schema definition for Avro AVSC files.", + "oneOf": [ + { + "$ref": "#/definitions/avroSchema" + } + ], + "title": "Avro Schema Definition" + }, + "message.json": { + "$id": "message.json", + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.3.0/Reference.json" + }, + { + "oneOf": [ + { + "type": "object", + "required": [ + "oneOf" + ], + "additionalProperties": false, + "properties": { + "oneOf": { + "type": "array", + "items": { + "$ref": "http://asyncapi.com/definitions/2.3.0/message.json" + } + } + } + }, + { + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.3.0/specificationExtension.json" + } + }, + "properties": { + "schemaFormat": { + "type": "string" + }, + "contentType": { + "type": "string" + }, + "headers": { + "allOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.3.0/schema.json" + }, + { + "properties": { + "type": { + "const": "object" + } + } + } + ] + }, + "payload": {}, + "correlationId": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.3.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.3.0/correlationId.json" + } + ] + }, + "tags": { + "type": "array", + "items": { + "$ref": "http://asyncapi.com/definitions/2.3.0/tag.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." + }, + "externalDocs": { + "$ref": "http://asyncapi.com/definitions/2.3.0/externalDocs.json" + }, + "deprecated": { + "type": "boolean", + "default": false + }, + "examples": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "anyOf": [ + { + "required": [ + "payload" + ] + }, + { + "required": [ + "headers" + ] + } + ], + "properties": { + "name": { + "type": "string", + "description": "Machine readable name of the message example." + }, + "summary": { + "type": "string", + "description": "A brief summary of the message example." + }, + "headers": { + "type": "object" + }, + "payload": {} + } + } + }, + "bindings": { + "$ref": "http://asyncapi.com/definitions/2.3.0/bindingsObject.json" + }, + "traits": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.3.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.3.0/messageTrait.json" + } + ] + } + } + }, + "allOf": [ + { + "if": { + "not": { + "required": [ + "schemaFormat" + ] + } + }, + "then": { + "properties": { + "payload": { + "$ref": "http://asyncapi.com/definitions/2.3.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" + ] + } + } + }, + "then": { + "properties": { + "payload": { + "$ref": "http://asyncapi.com/definitions/2.3.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/2.3.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/2.3.0/avroSchema_v1.json" + } + } + } + } + ] + } ] - }, - "name": { - "type": "string", - "pattern": "^[A-Za-z_][A-Za-z0-9_]*$" - }, - "namespace": { - "type": "string", - "pattern": "^([A-Za-z_][A-Za-z0-9_]*(\\.[A-Za-z_][A-Za-z0-9_]*)*)*$" - } - }, - "description": "Json-Schema definition for Avro AVSC files.", - "oneOf": [ - { - "$ref": "#/definitions/avroSchema" } - ], - "title": "Avro Schema Definition" + ] }, - "http://asyncapi.com/definitions/2.3.0/components.json": { - "$id": "http://asyncapi.com/definitions/2.3.0/components.json", + "operation.json": { + "$id": "operation.json", "type": "object", - "description": "An object to hold a set of reusable objects for different aspects of the AsyncAPI Specification.", "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { @@ -1851,139 +1744,119 @@ } }, "properties": { - "schemas": { - "$ref": "http://asyncapi.com/definitions/2.3.0/schemas.json" - }, - "servers": { - "$ref": "http://asyncapi.com/definitions/2.3.0/servers.json" - }, - "channels": { - "$ref": "http://asyncapi.com/definitions/2.3.0/channels.json" - }, - "messages": { - "$ref": "http://asyncapi.com/definitions/2.3.0/messages.json" - }, - "securitySchemes": { - "type": "object", - "patternProperties": { - "^[\\w\\d\\.\\-_]+$": { - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/2.3.0/Reference.json" - }, - { - "$ref": "http://asyncapi.com/definitions/2.3.0/SecurityScheme.json" - } - ] - } + "traits": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.3.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.3.0/operationTrait.json" + } + ] } }, - "parameters": { - "$ref": "http://asyncapi.com/definitions/2.3.0/parameters.json" - }, - "correlationIds": { - "type": "object", - "patternProperties": { - "^[\\w\\d\\.\\-_]+$": { - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/2.3.0/Reference.json" - }, - { - "$ref": "http://asyncapi.com/definitions/2.3.0/correlationId.json" - } - ] - } - } + "summary": { + "type": "string" }, - "operationTraits": { - "type": "object", - "additionalProperties": { - "$ref": "http://asyncapi.com/definitions/2.3.0/operationTrait.json" - } + "description": { + "type": "string" }, - "messageTraits": { - "type": "object", - "additionalProperties": { - "$ref": "http://asyncapi.com/definitions/2.3.0/messageTrait.json" - } + "tags": { + "type": "array", + "items": { + "$ref": "http://asyncapi.com/definitions/2.3.0/tag.json" + }, + "uniqueItems": true }, - "serverBindings": { - "type": "object", - "additionalProperties": { - "$ref": "http://asyncapi.com/definitions/2.3.0/bindingsObject.json" - } + "externalDocs": { + "$ref": "http://asyncapi.com/definitions/2.3.0/externalDocs.json" }, - "channelBindings": { - "type": "object", - "additionalProperties": { - "$ref": "http://asyncapi.com/definitions/2.3.0/bindingsObject.json" - } + "operationId": { + "type": "string" }, - "operationBindings": { - "type": "object", - "additionalProperties": { - "$ref": "http://asyncapi.com/definitions/2.3.0/bindingsObject.json" - } + "bindings": { + "$ref": "http://asyncapi.com/definitions/2.3.0/bindingsObject.json" }, - "messageBindings": { - "type": "object", - "additionalProperties": { - "$ref": "http://asyncapi.com/definitions/2.3.0/bindingsObject.json" - } + "message": { + "$ref": "http://asyncapi.com/definitions/2.3.0/message.json" } } }, - "http://asyncapi.com/definitions/2.3.0/schemas.json": { - "$id": "http://asyncapi.com/definitions/2.3.0/schemas.json", - "type": "object", - "additionalProperties": { - "$ref": "http://asyncapi.com/definitions/2.3.0/schema.json" - }, - "description": "JSON objects describing schemas the API uses." - }, - "http://asyncapi.com/definitions/2.3.0/messages.json": { - "$id": "http://asyncapi.com/definitions/2.3.0/messages.json", + "channelItem.json": { + "$id": "channelItem.json", "type": "object", - "additionalProperties": { - "$ref": "http://asyncapi.com/definitions/2.3.0/message.json" + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.3.0/specificationExtension.json" + } }, - "description": "JSON objects describing the messages being consumed and produced by the API." - }, - "http://asyncapi.com/definitions/2.3.0/SecurityScheme.json": { - "$id": "http://asyncapi.com/definitions/2.3.0/SecurityScheme.json", - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/2.3.0/userPassword.json" - }, - { - "$ref": "http://asyncapi.com/definitions/2.3.0/apiKey.json" + "properties": { + "$ref": { + "$ref": "http://asyncapi.com/definitions/2.3.0/ReferenceObject.json" }, - { - "$ref": "http://asyncapi.com/definitions/2.3.0/X509.json" + "parameters": { + "$ref": "http://asyncapi.com/definitions/2.3.0/parameters.json" }, - { - "$ref": "http://asyncapi.com/definitions/2.3.0/symmetricEncryption.json" + "description": { + "type": "string", + "description": "A description of the channel." }, - { - "$ref": "http://asyncapi.com/definitions/2.3.0/asymmetricEncryption.json" + "servers": { + "type": "array", + "description": "The names of the servers on which this channel is available. If absent or empty then this channel must be available on all servers.", + "items": { + "type": "string" + }, + "uniqueItems": true }, - { - "$ref": "http://asyncapi.com/definitions/2.3.0/HTTPSecurityScheme.json" + "publish": { + "$ref": "http://asyncapi.com/definitions/2.3.0/operation.json" }, - { - "$ref": "http://asyncapi.com/definitions/2.3.0/oauth2Flows.json" + "subscribe": { + "$ref": "http://asyncapi.com/definitions/2.3.0/operation.json" }, - { - "$ref": "http://asyncapi.com/definitions/2.3.0/openIdConnect.json" + "deprecated": { + "type": "boolean", + "default": false }, - { - "$ref": "http://asyncapi.com/definitions/2.3.0/SaslSecurityScheme.json" + "bindings": { + "$ref": "http://asyncapi.com/definitions/2.3.0/bindingsObject.json" } - ] + } + }, + "channels.json": { + "$id": "channels.json", + "type": "object", + "propertyNames": { + "type": "string", + "format": "uri-template", + "minLength": 1 + }, + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/2.3.0/channelItem.json" + } + }, + "schemas.json": { + "$id": "schemas.json", + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/2.3.0/schema.json" + }, + "description": "JSON objects describing schemas the API uses." + }, + "messages.json": { + "$id": "messages.json", + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/2.3.0/message.json" + }, + "description": "JSON objects describing the messages being consumed and produced by the API." }, - "http://asyncapi.com/definitions/2.3.0/userPassword.json": { - "$id": "http://asyncapi.com/definitions/2.3.0/userPassword.json", + "userPassword.json": { + "$id": "userPassword.json", "type": "object", "required": [ "type" @@ -2006,8 +1879,8 @@ }, "additionalProperties": false }, - "http://asyncapi.com/definitions/2.3.0/apiKey.json": { - "$id": "http://asyncapi.com/definitions/2.3.0/apiKey.json", + "apiKey.json": { + "$id": "apiKey.json", "type": "object", "required": [ "type", @@ -2038,8 +1911,8 @@ }, "additionalProperties": false }, - "http://asyncapi.com/definitions/2.3.0/X509.json": { - "$id": "http://asyncapi.com/definitions/2.3.0/X509.json", + "X509.json": { + "$id": "X509.json", "type": "object", "required": [ "type" @@ -2062,8 +1935,8 @@ }, "additionalProperties": false }, - "http://asyncapi.com/definitions/2.3.0/symmetricEncryption.json": { - "$id": "http://asyncapi.com/definitions/2.3.0/symmetricEncryption.json", + "symmetricEncryption.json": { + "$id": "symmetricEncryption.json", "type": "object", "required": [ "type" @@ -2086,8 +1959,8 @@ }, "additionalProperties": false }, - "http://asyncapi.com/definitions/2.3.0/asymmetricEncryption.json": { - "$id": "http://asyncapi.com/definitions/2.3.0/asymmetricEncryption.json", + "asymmetricEncryption.json": { + "$id": "asymmetricEncryption.json", "type": "object", "required": [ "type" @@ -2110,22 +1983,8 @@ }, "additionalProperties": false }, - "http://asyncapi.com/definitions/2.3.0/HTTPSecurityScheme.json": { - "$id": "http://asyncapi.com/definitions/2.3.0/HTTPSecurityScheme.json", - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/2.3.0/NonBearerHTTPSecurityScheme.json" - }, - { - "$ref": "http://asyncapi.com/definitions/2.3.0/BearerHTTPSecurityScheme.json" - }, - { - "$ref": "http://asyncapi.com/definitions/2.3.0/APIKeyHTTPSecurityScheme.json" - } - ] - }, - "http://asyncapi.com/definitions/2.3.0/NonBearerHTTPSecurityScheme.json": { - "$id": "http://asyncapi.com/definitions/2.3.0/NonBearerHTTPSecurityScheme.json", + "NonBearerHTTPSecurityScheme.json": { + "$id": "NonBearerHTTPSecurityScheme.json", "not": { "type": "object", "properties": { @@ -2163,8 +2022,8 @@ }, "additionalProperties": false }, - "http://asyncapi.com/definitions/2.3.0/BearerHTTPSecurityScheme.json": { - "$id": "http://asyncapi.com/definitions/2.3.0/BearerHTTPSecurityScheme.json", + "BearerHTTPSecurityScheme.json": { + "$id": "BearerHTTPSecurityScheme.json", "type": "object", "required": [ "type", @@ -2197,8 +2056,8 @@ }, "additionalProperties": false }, - "http://asyncapi.com/definitions/2.3.0/APIKeyHTTPSecurityScheme.json": { - "$id": "http://asyncapi.com/definitions/2.3.0/APIKeyHTTPSecurityScheme.json", + "APIKeyHTTPSecurityScheme.json": { + "$id": "APIKeyHTTPSecurityScheme.json", "type": "object", "required": [ "type", @@ -2234,8 +2093,56 @@ }, "additionalProperties": false }, - "http://asyncapi.com/definitions/2.3.0/oauth2Flows.json": { - "$id": "http://asyncapi.com/definitions/2.3.0/oauth2Flows.json", + "HTTPSecurityScheme.json": { + "$id": "HTTPSecurityScheme.json", + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.3.0/NonBearerHTTPSecurityScheme.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.3.0/BearerHTTPSecurityScheme.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.3.0/APIKeyHTTPSecurityScheme.json" + } + ] + }, + "oauth2Scopes.json": { + "$id": "oauth2Scopes.json", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "oauth2Flow.json": { + "$id": "oauth2Flow.json", + "type": "object", + "properties": { + "authorizationUrl": { + "type": "string", + "format": "uri" + }, + "tokenUrl": { + "type": "string", + "format": "uri" + }, + "refreshUrl": { + "type": "string", + "format": "uri" + }, + "scopes": { + "$ref": "http://asyncapi.com/definitions/2.3.0/oauth2Scopes.json" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.3.0/specificationExtension.json" + } + }, + "additionalProperties": false + }, + "oauth2Flows.json": { + "$id": "oauth2Flows.json", "type": "object", "required": [ "type", @@ -2338,42 +2245,8 @@ } } }, - "http://asyncapi.com/definitions/2.3.0/oauth2Flow.json": { - "$id": "http://asyncapi.com/definitions/2.3.0/oauth2Flow.json", - "type": "object", - "properties": { - "authorizationUrl": { - "type": "string", - "format": "uri" - }, - "tokenUrl": { - "type": "string", - "format": "uri" - }, - "refreshUrl": { - "type": "string", - "format": "uri" - }, - "scopes": { - "$ref": "http://asyncapi.com/definitions/2.3.0/oauth2Scopes.json" - } - }, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "http://asyncapi.com/definitions/2.3.0/specificationExtension.json" - } - }, - "additionalProperties": false - }, - "http://asyncapi.com/definitions/2.3.0/oauth2Scopes.json": { - "$id": "http://asyncapi.com/definitions/2.3.0/oauth2Scopes.json", - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "http://asyncapi.com/definitions/2.3.0/openIdConnect.json": { - "$id": "http://asyncapi.com/definitions/2.3.0/openIdConnect.json", + "openIdConnect.json": { + "$id": "openIdConnect.json", "type": "object", "required": [ "type", @@ -2401,22 +2274,8 @@ }, "additionalProperties": false }, - "http://asyncapi.com/definitions/2.3.0/SaslSecurityScheme.json": { - "$id": "http://asyncapi.com/definitions/2.3.0/SaslSecurityScheme.json", - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/2.3.0/SaslPlainSecurityScheme.json" - }, - { - "$ref": "http://asyncapi.com/definitions/2.3.0/SaslScramSecurityScheme.json" - }, - { - "$ref": "http://asyncapi.com/definitions/2.3.0/SaslGssapiSecurityScheme.json" - } - ] - }, - "http://asyncapi.com/definitions/2.3.0/SaslPlainSecurityScheme.json": { - "$id": "http://asyncapi.com/definitions/2.3.0/SaslPlainSecurityScheme.json", + "SaslPlainSecurityScheme.json": { + "$id": "SaslPlainSecurityScheme.json", "type": "object", "required": [ "type" @@ -2439,8 +2298,8 @@ }, "additionalProperties": false }, - "http://asyncapi.com/definitions/2.3.0/SaslScramSecurityScheme.json": { - "$id": "http://asyncapi.com/definitions/2.3.0/SaslScramSecurityScheme.json", + "SaslScramSecurityScheme.json": { + "$id": "SaslScramSecurityScheme.json", "type": "object", "required": [ "type" @@ -2464,8 +2323,8 @@ }, "additionalProperties": false }, - "http://asyncapi.com/definitions/2.3.0/SaslGssapiSecurityScheme.json": { - "$id": "http://asyncapi.com/definitions/2.3.0/SaslGssapiSecurityScheme.json", + "SaslGssapiSecurityScheme.json": { + "$id": "SaslGssapiSecurityScheme.json", "type": "object", "required": [ "type" @@ -2487,7 +2346,148 @@ } }, "additionalProperties": false + }, + "SaslSecurityScheme.json": { + "$id": "SaslSecurityScheme.json", + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.3.0/SaslPlainSecurityScheme.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.3.0/SaslScramSecurityScheme.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.3.0/SaslGssapiSecurityScheme.json" + } + ] + }, + "SecurityScheme.json": { + "$id": "SecurityScheme.json", + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.3.0/userPassword.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.3.0/apiKey.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.3.0/X509.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.3.0/symmetricEncryption.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.3.0/asymmetricEncryption.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.3.0/HTTPSecurityScheme.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.3.0/oauth2Flows.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.3.0/openIdConnect.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.3.0/SaslSecurityScheme.json" + } + ] + }, + "components.json": { + "$id": "components.json", + "type": "object", + "description": "An object to hold a set of reusable objects for different aspects of the AsyncAPI Specification.", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.3.0/specificationExtension.json" + } + }, + "properties": { + "schemas": { + "$ref": "http://asyncapi.com/definitions/2.3.0/schemas.json" + }, + "servers": { + "$ref": "http://asyncapi.com/definitions/2.3.0/servers.json" + }, + "channels": { + "$ref": "http://asyncapi.com/definitions/2.3.0/channels.json" + }, + "messages": { + "$ref": "http://asyncapi.com/definitions/2.3.0/messages.json" + }, + "securitySchemes": { + "type": "object", + "patternProperties": { + "^[\\w\\d\\.\\-_]+$": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.3.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.3.0/SecurityScheme.json" + } + ] + } + } + }, + "parameters": { + "$ref": "http://asyncapi.com/definitions/2.3.0/parameters.json" + }, + "correlationIds": { + "type": "object", + "patternProperties": { + "^[\\w\\d\\.\\-_]+$": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.3.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.3.0/correlationId.json" + } + ] + } + } + }, + "operationTraits": { + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/2.3.0/operationTrait.json" + } + }, + "messageTraits": { + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/2.3.0/messageTrait.json" + } + }, + "serverBindings": { + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/2.3.0/bindingsObject.json" + } + }, + "channelBindings": { + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/2.3.0/bindingsObject.json" + } + }, + "operationBindings": { + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/2.3.0/bindingsObject.json" + } + }, + "messageBindings": { + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/2.3.0/bindingsObject.json" + } + } + } } }, + "$id": "http://asyncapi.com/definitions/2.3.0/asyncapi.json", "description": "!!Auto generated!! \n Do not manually edit. " } \ No newline at end of file diff --git a/schemas/2.4.0-without-$id.json b/schemas/2.4.0-without-$id.json index a1b83162..a05979e1 100644 --- a/schemas/2.4.0-without-$id.json +++ b/schemas/2.4.0-without-$id.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema", + "$schema": "http://json-schema.org/draft-07/schema#", "title": "AsyncAPI 2.4.0 schema.", "type": "object", "required": [ @@ -58,45 +58,6 @@ "additionalProperties": true, "additionalItems": true }, - "info": { - "type": "object", - "description": "General information about the API.", - "required": [ - "version", - "title" - ], - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "properties": { - "title": { - "type": "string", - "description": "A unique and precise title of the API." - }, - "version": { - "type": "string", - "description": "A semantic version number of the API." - }, - "description": { - "type": "string", - "description": "A longer description of the API. Should be different from the title. CommonMark is allowed." - }, - "termsOfService": { - "type": "string", - "description": "A URL to the Terms of Service for the API. MUST be in the format of a URL.", - "format": "uri" - }, - "contact": { - "$ref": "#/definitions/contact" - }, - "license": { - "$ref": "#/definitions/license" - } - } - }, "contact": { "type": "object", "description": "Contact information for the owners of the API.", @@ -146,41 +107,12 @@ } } }, - "servers": { - "description": "An object representing multiple servers.", - "type": "object", - "additionalProperties": { - "oneOf": [ - { - "$ref": "#/definitions/Reference" - }, - { - "$ref": "#/definitions/server" - } - ] - } - }, - "Reference": { - "type": "object", - "required": [ - "$ref" - ], - "properties": { - "$ref": { - "$ref": "#/definitions/ReferenceObject" - } - } - }, - "ReferenceObject": { - "type": "string", - "format": "uri-reference" - }, - "server": { + "info": { "type": "object", - "description": "An object representing a Server.", + "description": "General information about the API.", "required": [ - "url", - "protocol" + "version", + "title" ], "additionalProperties": false, "patternProperties": { @@ -189,37 +121,44 @@ } }, "properties": { - "url": { - "type": "string" - }, - "description": { - "type": "string" + "title": { + "type": "string", + "description": "A unique and precise title of the API." }, - "protocol": { + "version": { "type": "string", - "description": "The transfer protocol." + "description": "A semantic version number of the API." }, - "protocolVersion": { - "type": "string" + "description": { + "type": "string", + "description": "A longer description of the API. Should be different from the title. CommonMark is allowed." }, - "variables": { - "$ref": "#/definitions/serverVariables" + "termsOfService": { + "type": "string", + "description": "A URL to the Terms of Service for the API. MUST be in the format of a URL.", + "format": "uri" }, - "security": { - "type": "array", - "items": { - "$ref": "#/definitions/SecurityRequirement" - } + "contact": { + "$ref": "#/definitions/contact" }, - "bindings": { - "$ref": "#/definitions/bindingsObject" + "license": { + "$ref": "#/definitions/license" } } }, - "serverVariables": { + "ReferenceObject": { + "type": "string", + "format": "uri-reference" + }, + "Reference": { "type": "object", - "additionalProperties": { - "$ref": "#/definitions/serverVariable" + "required": [ + "$ref" + ], + "properties": { + "$ref": { + "$ref": "#/definitions/ReferenceObject" + } } }, "serverVariable": { @@ -253,6 +192,12 @@ } } }, + "serverVariables": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/serverVariable" + } + }, "SecurityRequirement": { "type": "object", "additionalProperties": { @@ -285,19 +230,13 @@ "solace": {} } }, - "channels": { - "type": "object", - "propertyNames": { - "type": "string", - "format": "uri-template", - "minLength": 1 - }, - "additionalProperties": { - "$ref": "#/definitions/channelItem" - } - }, - "channelItem": { + "server": { "type": "object", + "description": "An object representing a Server.", + "required": [ + "url", + "protocol" + ], "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { @@ -305,40 +244,35 @@ } }, "properties": { - "$ref": { - "$ref": "#/definitions/ReferenceObject" - }, - "parameters": { - "$ref": "#/definitions/parameters" + "url": { + "type": "string" }, "description": { - "type": "string", - "description": "A description of the channel." + "type": "string" }, - "servers": { - "type": "array", - "description": "The names of the servers on which this channel is available. If absent or empty then this channel must be available on all servers.", - "items": { - "type": "string" - }, - "uniqueItems": true + "protocol": { + "type": "string", + "description": "The transfer protocol." }, - "publish": { - "$ref": "#/definitions/operation" + "protocolVersion": { + "type": "string" }, - "subscribe": { - "$ref": "#/definitions/operation" + "variables": { + "$ref": "#/definitions/serverVariables" }, - "deprecated": { - "type": "boolean", - "default": false + "security": { + "type": "array", + "items": { + "$ref": "#/definitions/SecurityRequirement" + } }, "bindings": { "$ref": "#/definitions/bindingsObject" } } }, - "parameters": { + "servers": { + "description": "An object representing multiple servers.", "type": "object", "additionalProperties": { "oneOf": [ @@ -346,189 +280,67 @@ "$ref": "#/definitions/Reference" }, { - "$ref": "#/definitions/parameter" + "$ref": "#/definitions/server" } ] - }, - "description": "JSON objects describing re-usable channel parameters." + } }, - "parameter": { - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" + "json-schema-draft-07-schema": { + "title": "Core schema meta-schema", + "definitions": { + "schemaArray": { + "type": "array", + "minItems": 1, + "items": { + "$ref": "#/definitions/json-schema-draft-07-schema" + } + }, + "nonNegativeInteger": { + "type": "integer", + "minimum": 0 + }, + "nonNegativeIntegerDefault0": { + "allOf": [ + { + "$ref": "#/definitions/json-schema-draft-07-schema/definitions/nonNegativeInteger" + }, + { + "default": 0 + } + ] + }, + "simpleTypes": { + "enum": [ + "array", + "boolean", + "integer", + "null", + "number", + "object", + "string" + ] + }, + "stringArray": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true, + "default": [] } }, + "type": [ + "object", + "boolean" + ], "properties": { - "description": { + "$id": { "type": "string", - "description": "A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed." - }, - "schema": { - "$ref": "#/definitions/schema" + "format": "uri-reference" }, - "location": { + "$schema": { "type": "string", - "description": "A runtime expression that specifies the location of the parameter value", - "pattern": "^\\$message\\.(header|payload)#(\\/(([^\\/~])|(~[01]))*)*" - }, - "$ref": { - "$ref": "#/definitions/ReferenceObject" - } - } - }, - "schema": { - "allOf": [ - { - "$ref": "#/definitions/json-schema-draft-07-schema" - }, - { - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "properties": { - "additionalProperties": { - "anyOf": [ - { - "$ref": "#/definitions/schema" - }, - { - "type": "boolean" - } - ], - "default": {} - }, - "items": { - "anyOf": [ - { - "$ref": "#/definitions/schema" - }, - { - "type": "array", - "minItems": 1, - "items": { - "$ref": "#/definitions/schema" - } - } - ], - "default": {} - }, - "allOf": { - "type": "array", - "minItems": 1, - "items": { - "$ref": "#/definitions/schema" - } - }, - "oneOf": { - "type": "array", - "minItems": 1, - "items": { - "$ref": "#/definitions/schema" - } - }, - "anyOf": { - "type": "array", - "minItems": 1, - "items": { - "$ref": "#/definitions/schema" - } - }, - "not": { - "$ref": "#/definitions/schema" - }, - "properties": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/schema" - }, - "default": {} - }, - "patternProperties": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/schema" - }, - "default": {} - }, - "propertyNames": { - "$ref": "#/definitions/schema" - }, - "contains": { - "$ref": "#/definitions/schema" - }, - "discriminator": { - "type": "string" - }, - "externalDocs": { - "$ref": "#/definitions/externalDocs" - }, - "deprecated": { - "type": "boolean", - "default": false - } - } - } - ] - }, - "json-schema-draft-07-schema": { - "title": "Core schema meta-schema", - "definitions": { - "schemaArray": { - "type": "array", - "minItems": 1, - "items": { - "$ref": "#/definitions/json-schema-draft-07-schema" - } - }, - "nonNegativeInteger": { - "type": "integer", - "minimum": 0 - }, - "nonNegativeIntegerDefault0": { - "allOf": [ - { - "$ref": "#/definitions/json-schema-draft-07-schema/definitions/nonNegativeInteger" - }, - { - "default": 0 - } - ] - }, - "simpleTypes": { - "enum": [ - "array", - "boolean", - "integer", - "null", - "number", - "object", - "string" - ] - }, - "stringArray": { - "type": "array", - "items": { - "type": "string" - }, - "uniqueItems": true, - "default": [] - } - }, - "type": [ - "object", - "boolean" - ], - "properties": { - "$id": { - "type": "string", - "format": "uri-reference" - }, - "$schema": { - "type": "string", - "format": "uri" + "format": "uri" }, "$ref": { "type": "string", @@ -738,100 +550,141 @@ } } }, - "operation": { - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "properties": { - "traits": { - "type": "array", - "items": { - "oneOf": [ - { - "$ref": "#/definitions/Reference" - }, - { - "$ref": "#/definitions/operationTrait" - } - ] - } - }, - "summary": { - "type": "string" - }, - "description": { - "type": "string" - }, - "security": { - "type": "array", - "items": { - "$ref": "#/definitions/SecurityRequirement" - } - }, - "tags": { - "type": "array", - "items": { - "$ref": "#/definitions/tag" - }, - "uniqueItems": true - }, - "externalDocs": { - "$ref": "#/definitions/externalDocs" - }, - "operationId": { - "type": "string" - }, - "bindings": { - "$ref": "#/definitions/bindingsObject" - }, - "message": { - "$ref": "#/definitions/message" - } - } - }, - "operationTrait": { - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "properties": { - "summary": { - "type": "string" - }, - "description": { - "type": "string" + "schema": { + "allOf": [ + { + "$ref": "#/definitions/json-schema-draft-07-schema" }, - "tags": { - "type": "array", - "items": { - "$ref": "#/definitions/tag" + { + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } }, - "uniqueItems": true - }, - "externalDocs": { - "$ref": "#/definitions/externalDocs" - }, - "operationId": { - "type": "string" - }, - "security": { - "type": "array", - "items": { - "$ref": "#/definitions/SecurityRequirement" - } - }, - "bindings": { - "$ref": "#/definitions/bindingsObject" + "properties": { + "additionalProperties": { + "anyOf": [ + { + "$ref": "#/definitions/schema" + }, + { + "type": "boolean" + } + ], + "default": {} + }, + "items": { + "anyOf": [ + { + "$ref": "#/definitions/schema" + }, + { + "type": "array", + "minItems": 1, + "items": { + "$ref": "#/definitions/schema" + } + } + ], + "default": {} + }, + "allOf": { + "type": "array", + "minItems": 1, + "items": { + "$ref": "#/definitions/schema" + } + }, + "oneOf": { + "type": "array", + "minItems": 1, + "items": { + "$ref": "#/definitions/schema" + } + }, + "anyOf": { + "type": "array", + "minItems": 1, + "items": { + "$ref": "#/definitions/schema" + } + }, + "not": { + "$ref": "#/definitions/schema" + }, + "properties": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/schema" + }, + "default": {} + }, + "patternProperties": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/schema" + }, + "default": {} + }, + "propertyNames": { + "$ref": "#/definitions/schema" + }, + "contains": { + "$ref": "#/definitions/schema" + }, + "discriminator": { + "type": "string" + }, + "externalDocs": { + "$ref": "#/definitions/externalDocs" + }, + "deprecated": { + "type": "boolean", + "default": false + } + } + } + ] + }, + "parameter": { + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, + "properties": { + "description": { + "type": "string", + "description": "A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed." + }, + "schema": { + "$ref": "#/definitions/schema" + }, + "location": { + "type": "string", + "description": "A runtime expression that specifies the location of the parameter value", + "pattern": "^\\$message\\.(header|payload)#(\\/(([^\\/~])|(~[01]))*)*" + }, + "$ref": { + "$ref": "#/definitions/ReferenceObject" } } }, + "parameters": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/parameter" + } + ] + }, + "description": "JSON objects describing re-usable channel parameters." + }, "tag": { "type": "object", "additionalProperties": false, @@ -855,276 +708,44 @@ } } }, - "message": { - "oneOf": [ - { - "$ref": "#/definitions/Reference" + "operationTrait": { + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, + "properties": { + "summary": { + "type": "string" }, - { - "oneOf": [ - { - "type": "object", - "required": [ - "oneOf" - ], - "additionalProperties": false, - "properties": { - "oneOf": { - "type": "array", - "items": { - "$ref": "#/definitions/message" - } - } - } - }, - { - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "properties": { - "schemaFormat": { - "type": "string" - }, - "contentType": { - "type": "string" - }, - "headers": { - "allOf": [ - { - "$ref": "#/definitions/schema" - }, - { - "properties": { - "type": { - "const": "object" - } - } - } - ] - }, - "messageId": { - "type": "string" - }, - "payload": {}, - "correlationId": { - "oneOf": [ - { - "$ref": "#/definitions/Reference" - }, - { - "$ref": "#/definitions/correlationId" - } - ] - }, - "tags": { - "type": "array", - "items": { - "$ref": "#/definitions/tag" - }, - "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." - }, - "externalDocs": { - "$ref": "#/definitions/externalDocs" - }, - "deprecated": { - "type": "boolean", - "default": false - }, - "examples": { - "type": "array", - "items": { - "type": "object", - "additionalProperties": false, - "anyOf": [ - { - "required": [ - "payload" - ] - }, - { - "required": [ - "headers" - ] - } - ], - "properties": { - "name": { - "type": "string", - "description": "Machine readable name of the message example." - }, - "summary": { - "type": "string", - "description": "A brief summary of the message example." - }, - "headers": { - "type": "object" - }, - "payload": {} - } - } - }, - "bindings": { - "$ref": "#/definitions/bindingsObject" - }, - "traits": { - "type": "array", - "items": { - "oneOf": [ - { - "$ref": "#/definitions/Reference" - }, - { - "$ref": "#/definitions/messageTrait" - } - ] - } - } - }, - "allOf": [ - { - "if": { - "not": { - "required": [ - "schemaFormat" - ] - } - }, - "then": { - "properties": { - "payload": { - "$ref": "#/definitions/schema" - } - } - } - }, - { - "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" - ] - } - } - }, - "then": { - "properties": { - "payload": { - "$ref": "#/definitions/schema" - } - } - } - }, - { - "if": { - "required": [ - "schemaFormat" - ], - "properties": { - "schemaFormat": { - "enum": [ - "application/schema+json;version=draft-07", - "application/schema+yaml;version=draft-07" - ] - } - } - }, - "then": { - "properties": { - "payload": { - "$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": { - "payload": { - "$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": { - "payload": { - "$ref": "#/definitions/avroSchema_v1" - } - } - } - } - ] - } - ] + "description": { + "type": "string" + }, + "tags": { + "type": "array", + "items": { + "$ref": "#/definitions/tag" + }, + "uniqueItems": true + }, + "externalDocs": { + "$ref": "#/definitions/externalDocs" + }, + "operationId": { + "type": "string" + }, + "security": { + "type": "array", + "items": { + "$ref": "#/definitions/SecurityRequirement" + } + }, + "bindings": { + "$ref": "#/definitions/bindingsObject" } - ] + } }, "correlationId": { "type": "object", @@ -1809,33 +1430,303 @@ "size": { "type": "number" } - }, - "required": [ - "type", - "name", - "size" + }, + "required": [ + "type", + "name", + "size" + ] + }, + "name": { + "type": "string", + "pattern": "^[A-Za-z_][A-Za-z0-9_]*$" + }, + "namespace": { + "type": "string", + "pattern": "^([A-Za-z_][A-Za-z0-9_]*(\\.[A-Za-z_][A-Za-z0-9_]*)*)*$" + } + }, + "description": "Json-Schema definition for Avro AVSC files.", + "oneOf": [ + { + "$ref": "#/definitions/avroSchema_v1/definitions/avroSchema" + } + ], + "title": "Avro Schema Definition" + }, + "message": { + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "oneOf": [ + { + "type": "object", + "required": [ + "oneOf" + ], + "additionalProperties": false, + "properties": { + "oneOf": { + "type": "array", + "items": { + "$ref": "#/definitions/message" + } + } + } + }, + { + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, + "properties": { + "schemaFormat": { + "type": "string" + }, + "contentType": { + "type": "string" + }, + "headers": { + "allOf": [ + { + "$ref": "#/definitions/schema" + }, + { + "properties": { + "type": { + "const": "object" + } + } + } + ] + }, + "messageId": { + "type": "string" + }, + "payload": {}, + "correlationId": { + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/correlationId" + } + ] + }, + "tags": { + "type": "array", + "items": { + "$ref": "#/definitions/tag" + }, + "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." + }, + "externalDocs": { + "$ref": "#/definitions/externalDocs" + }, + "deprecated": { + "type": "boolean", + "default": false + }, + "examples": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "anyOf": [ + { + "required": [ + "payload" + ] + }, + { + "required": [ + "headers" + ] + } + ], + "properties": { + "name": { + "type": "string", + "description": "Machine readable name of the message example." + }, + "summary": { + "type": "string", + "description": "A brief summary of the message example." + }, + "headers": { + "type": "object" + }, + "payload": {} + } + } + }, + "bindings": { + "$ref": "#/definitions/bindingsObject" + }, + "traits": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/messageTrait" + } + ] + } + } + }, + "allOf": [ + { + "if": { + "not": { + "required": [ + "schemaFormat" + ] + } + }, + "then": { + "properties": { + "payload": { + "$ref": "#/definitions/schema" + } + } + } + }, + { + "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" + ] + } + } + }, + "then": { + "properties": { + "payload": { + "$ref": "#/definitions/schema" + } + } + } + }, + { + "if": { + "required": [ + "schemaFormat" + ], + "properties": { + "schemaFormat": { + "enum": [ + "application/schema+json;version=draft-07", + "application/schema+yaml;version=draft-07" + ] + } + } + }, + "then": { + "properties": { + "payload": { + "$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": { + "payload": { + "$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": { + "payload": { + "$ref": "#/definitions/avroSchema_v1" + } + } + } + } + ] + } ] - }, - "name": { - "type": "string", - "pattern": "^[A-Za-z_][A-Za-z0-9_]*$" - }, - "namespace": { - "type": "string", - "pattern": "^([A-Za-z_][A-Za-z0-9_]*(\\.[A-Za-z_][A-Za-z0-9_]*)*)*$" - } - }, - "description": "Json-Schema definition for Avro AVSC files.", - "oneOf": [ - { - "$ref": "#/definitions/avroSchema_v1/definitions/avroSchema" } - ], - "title": "Avro Schema Definition" + ] }, - "components": { + "operation": { "type": "object", - "description": "An object to hold a set of reusable objects for different aspects of the AsyncAPI Specification.", "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { @@ -1843,136 +1734,118 @@ } }, "properties": { - "schemas": { - "$ref": "#/definitions/schemas" - }, - "servers": { - "$ref": "#/definitions/servers" - }, - "channels": { - "$ref": "#/definitions/channels" - }, - "serverVariables": { - "$ref": "#/definitions/serverVariables" - }, - "messages": { - "$ref": "#/definitions/messages" - }, - "securitySchemes": { - "type": "object", - "patternProperties": { - "^[\\w\\d\\.\\-_]+$": { - "oneOf": [ - { - "$ref": "#/definitions/Reference" - }, - { - "$ref": "#/definitions/SecurityScheme" - } - ] - } + "traits": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/operationTrait" + } + ] } }, - "parameters": { - "$ref": "#/definitions/parameters" + "summary": { + "type": "string" }, - "correlationIds": { - "type": "object", - "patternProperties": { - "^[\\w\\d\\.\\-_]+$": { - "oneOf": [ - { - "$ref": "#/definitions/Reference" - }, - { - "$ref": "#/definitions/correlationId" - } - ] - } - } + "description": { + "type": "string" }, - "operationTraits": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/operationTrait" + "security": { + "type": "array", + "items": { + "$ref": "#/definitions/SecurityRequirement" } }, - "messageTraits": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/messageTrait" - } + "tags": { + "type": "array", + "items": { + "$ref": "#/definitions/tag" + }, + "uniqueItems": true }, - "serverBindings": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/bindingsObject" - } + "externalDocs": { + "$ref": "#/definitions/externalDocs" }, - "channelBindings": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/bindingsObject" - } + "operationId": { + "type": "string" }, - "operationBindings": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/bindingsObject" - } + "bindings": { + "$ref": "#/definitions/bindingsObject" }, - "messageBindings": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/bindingsObject" - } + "message": { + "$ref": "#/definitions/message" } } }, - "schemas": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/schema" - }, - "description": "JSON objects describing schemas the API uses." - }, - "messages": { + "channelItem": { "type": "object", - "additionalProperties": { - "$ref": "#/definitions/message" + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } }, - "description": "JSON objects describing the messages being consumed and produced by the API." - }, - "SecurityScheme": { - "oneOf": [ - { - "$ref": "#/definitions/userPassword" - }, - { - "$ref": "#/definitions/apiKey" + "properties": { + "$ref": { + "$ref": "#/definitions/ReferenceObject" }, - { - "$ref": "#/definitions/X509" + "parameters": { + "$ref": "#/definitions/parameters" }, - { - "$ref": "#/definitions/symmetricEncryption" + "description": { + "type": "string", + "description": "A description of the channel." }, - { - "$ref": "#/definitions/asymmetricEncryption" + "servers": { + "type": "array", + "description": "The names of the servers on which this channel is available. If absent or empty then this channel must be available on all servers.", + "items": { + "type": "string" + }, + "uniqueItems": true }, - { - "$ref": "#/definitions/HTTPSecurityScheme" + "publish": { + "$ref": "#/definitions/operation" }, - { - "$ref": "#/definitions/oauth2Flows" + "subscribe": { + "$ref": "#/definitions/operation" }, - { - "$ref": "#/definitions/openIdConnect" + "deprecated": { + "type": "boolean", + "default": false }, - { - "$ref": "#/definitions/SaslSecurityScheme" + "bindings": { + "$ref": "#/definitions/bindingsObject" } - ] + } + }, + "channels": { + "type": "object", + "propertyNames": { + "type": "string", + "format": "uri-template", + "minLength": 1 + }, + "additionalProperties": { + "$ref": "#/definitions/channelItem" + } + }, + "schemas": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/schema" + }, + "description": "JSON objects describing schemas the API uses." + }, + "messages": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/message" + }, + "description": "JSON objects describing the messages being consumed and produced by the API." }, "userPassword": { "type": "object", @@ -2097,19 +1970,6 @@ }, "additionalProperties": false }, - "HTTPSecurityScheme": { - "oneOf": [ - { - "$ref": "#/definitions/NonBearerHTTPSecurityScheme" - }, - { - "$ref": "#/definitions/BearerHTTPSecurityScheme" - }, - { - "$ref": "#/definitions/APIKeyHTTPSecurityScheme" - } - ] - }, "NonBearerHTTPSecurityScheme": { "not": { "type": "object", @@ -2217,6 +2077,51 @@ }, "additionalProperties": false }, + "HTTPSecurityScheme": { + "oneOf": [ + { + "$ref": "#/definitions/NonBearerHTTPSecurityScheme" + }, + { + "$ref": "#/definitions/BearerHTTPSecurityScheme" + }, + { + "$ref": "#/definitions/APIKeyHTTPSecurityScheme" + } + ] + }, + "oauth2Scopes": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "oauth2Flow": { + "type": "object", + "properties": { + "authorizationUrl": { + "type": "string", + "format": "uri" + }, + "tokenUrl": { + "type": "string", + "format": "uri" + }, + "refreshUrl": { + "type": "string", + "format": "uri" + }, + "scopes": { + "$ref": "#/definitions/oauth2Scopes" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, + "additionalProperties": false + }, "oauth2Flows": { "type": "object", "required": [ @@ -2320,38 +2225,6 @@ } } }, - "oauth2Flow": { - "type": "object", - "properties": { - "authorizationUrl": { - "type": "string", - "format": "uri" - }, - "tokenUrl": { - "type": "string", - "format": "uri" - }, - "refreshUrl": { - "type": "string", - "format": "uri" - }, - "scopes": { - "$ref": "#/definitions/oauth2Scopes" - } - }, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "additionalProperties": false - }, - "oauth2Scopes": { - "type": "object", - "additionalProperties": { - "type": "string" - } - }, "openIdConnect": { "type": "object", "required": [ @@ -2380,19 +2253,6 @@ }, "additionalProperties": false }, - "SaslSecurityScheme": { - "oneOf": [ - { - "$ref": "#/definitions/SaslPlainSecurityScheme" - }, - { - "$ref": "#/definitions/SaslScramSecurityScheme" - }, - { - "$ref": "#/definitions/SaslGssapiSecurityScheme" - } - ] - }, "SaslPlainSecurityScheme": { "type": "object", "required": [ @@ -2462,6 +2322,146 @@ } }, "additionalProperties": false + }, + "SaslSecurityScheme": { + "oneOf": [ + { + "$ref": "#/definitions/SaslPlainSecurityScheme" + }, + { + "$ref": "#/definitions/SaslScramSecurityScheme" + }, + { + "$ref": "#/definitions/SaslGssapiSecurityScheme" + } + ] + }, + "SecurityScheme": { + "oneOf": [ + { + "$ref": "#/definitions/userPassword" + }, + { + "$ref": "#/definitions/apiKey" + }, + { + "$ref": "#/definitions/X509" + }, + { + "$ref": "#/definitions/symmetricEncryption" + }, + { + "$ref": "#/definitions/asymmetricEncryption" + }, + { + "$ref": "#/definitions/HTTPSecurityScheme" + }, + { + "$ref": "#/definitions/oauth2Flows" + }, + { + "$ref": "#/definitions/openIdConnect" + }, + { + "$ref": "#/definitions/SaslSecurityScheme" + } + ] + }, + "components": { + "type": "object", + "description": "An object to hold a set of reusable objects for different aspects of the AsyncAPI Specification.", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, + "properties": { + "schemas": { + "$ref": "#/definitions/schemas" + }, + "servers": { + "$ref": "#/definitions/servers" + }, + "channels": { + "$ref": "#/definitions/channels" + }, + "serverVariables": { + "$ref": "#/definitions/serverVariables" + }, + "messages": { + "$ref": "#/definitions/messages" + }, + "securitySchemes": { + "type": "object", + "patternProperties": { + "^[\\w\\d\\.\\-_]+$": { + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/SecurityScheme" + } + ] + } + } + }, + "parameters": { + "$ref": "#/definitions/parameters" + }, + "correlationIds": { + "type": "object", + "patternProperties": { + "^[\\w\\d\\.\\-_]+$": { + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/correlationId" + } + ] + } + } + }, + "operationTraits": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/operationTrait" + } + }, + "messageTraits": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/messageTrait" + } + }, + "serverBindings": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/bindingsObject" + } + }, + "channelBindings": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/bindingsObject" + } + }, + "operationBindings": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/bindingsObject" + } + }, + "messageBindings": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/bindingsObject" + } + } + } } }, "description": "!!Auto generated!! \n Do not manually edit. " diff --git a/schemas/2.4.0.json b/schemas/2.4.0.json index 04fd49f9..f44dc71f 100644 --- a/schemas/2.4.0.json +++ b/schemas/2.4.0.json @@ -1,6 +1,5 @@ { - "$id": "http://asyncapi.com/definitions/2.4.0/asyncapi.json", - "$schema": "http://json-schema.org/draft-07/schema", + "$schema": "http://json-schema.org/draft-07/schema#", "title": "AsyncAPI 2.4.0 schema.", "type": "object", "required": [ @@ -54,54 +53,14 @@ } }, "definitions": { - "http://asyncapi.com/definitions/2.4.0/specificationExtension.json": { - "$id": "http://asyncapi.com/definitions/2.4.0/specificationExtension.json", + "specificationExtension.json": { + "$id": "specificationExtension.json", "description": "Any property starting with x- is valid.", "additionalProperties": true, "additionalItems": true }, - "http://asyncapi.com/definitions/2.4.0/info.json": { - "$id": "http://asyncapi.com/definitions/2.4.0/info.json", - "type": "object", - "description": "General information about the API.", - "required": [ - "version", - "title" - ], - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "http://asyncapi.com/definitions/2.4.0/specificationExtension.json" - } - }, - "properties": { - "title": { - "type": "string", - "description": "A unique and precise title of the API." - }, - "version": { - "type": "string", - "description": "A semantic version number of the API." - }, - "description": { - "type": "string", - "description": "A longer description of the API. Should be different from the title. CommonMark is allowed." - }, - "termsOfService": { - "type": "string", - "description": "A URL to the Terms of Service for the API. MUST be in the format of a URL.", - "format": "uri" - }, - "contact": { - "$ref": "http://asyncapi.com/definitions/2.4.0/contact.json" - }, - "license": { - "$ref": "http://asyncapi.com/definitions/2.4.0/license.json" - } - } - }, - "http://asyncapi.com/definitions/2.4.0/contact.json": { - "$id": "http://asyncapi.com/definitions/2.4.0/contact.json", + "contact.json": { + "$id": "contact.json", "type": "object", "description": "Contact information for the owners of the API.", "additionalProperties": false, @@ -127,8 +86,8 @@ } } }, - "http://asyncapi.com/definitions/2.4.0/license.json": { - "$id": "http://asyncapi.com/definitions/2.4.0/license.json", + "license.json": { + "$id": "license.json", "type": "object", "required": [ "name" @@ -151,45 +110,13 @@ } } }, - "http://asyncapi.com/definitions/2.4.0/servers.json": { - "$id": "http://asyncapi.com/definitions/2.4.0/servers.json", - "description": "An object representing multiple servers.", - "type": "object", - "additionalProperties": { - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/2.4.0/Reference.json" - }, - { - "$ref": "http://asyncapi.com/definitions/2.4.0/server.json" - } - ] - } - }, - "http://asyncapi.com/definitions/2.4.0/Reference.json": { - "$id": "http://asyncapi.com/definitions/2.4.0/Reference.json", - "type": "object", - "required": [ - "$ref" - ], - "properties": { - "$ref": { - "$ref": "http://asyncapi.com/definitions/2.4.0/ReferenceObject.json" - } - } - }, - "http://asyncapi.com/definitions/2.4.0/ReferenceObject.json": { - "$id": "http://asyncapi.com/definitions/2.4.0/ReferenceObject.json", - "type": "string", - "format": "uri-reference" - }, - "http://asyncapi.com/definitions/2.4.0/server.json": { - "$id": "http://asyncapi.com/definitions/2.4.0/server.json", + "info.json": { + "$id": "info.json", "type": "object", - "description": "An object representing a Server.", + "description": "General information about the API.", "required": [ - "url", - "protocol" + "version", + "title" ], "additionalProperties": false, "patternProperties": { @@ -198,42 +125,50 @@ } }, "properties": { - "url": { - "type": "string" - }, - "description": { - "type": "string" + "title": { + "type": "string", + "description": "A unique and precise title of the API." }, - "protocol": { + "version": { "type": "string", - "description": "The transfer protocol." + "description": "A semantic version number of the API." }, - "protocolVersion": { - "type": "string" + "description": { + "type": "string", + "description": "A longer description of the API. Should be different from the title. CommonMark is allowed." }, - "variables": { - "$ref": "http://asyncapi.com/definitions/2.4.0/serverVariables.json" + "termsOfService": { + "type": "string", + "description": "A URL to the Terms of Service for the API. MUST be in the format of a URL.", + "format": "uri" }, - "security": { - "type": "array", - "items": { - "$ref": "http://asyncapi.com/definitions/2.4.0/SecurityRequirement.json" - } + "contact": { + "$ref": "http://asyncapi.com/definitions/2.4.0/contact.json" }, - "bindings": { - "$ref": "http://asyncapi.com/definitions/2.4.0/bindingsObject.json" + "license": { + "$ref": "http://asyncapi.com/definitions/2.4.0/license.json" } } }, - "http://asyncapi.com/definitions/2.4.0/serverVariables.json": { - "$id": "http://asyncapi.com/definitions/2.4.0/serverVariables.json", + "ReferenceObject.json": { + "$id": "ReferenceObject.json", + "type": "string", + "format": "uri-reference" + }, + "Reference.json": { + "$id": "Reference.json", "type": "object", - "additionalProperties": { - "$ref": "http://asyncapi.com/definitions/2.4.0/serverVariable.json" + "required": [ + "$ref" + ], + "properties": { + "$ref": { + "$ref": "http://asyncapi.com/definitions/2.4.0/ReferenceObject.json" + } } }, - "http://asyncapi.com/definitions/2.4.0/serverVariable.json": { - "$id": "http://asyncapi.com/definitions/2.4.0/serverVariable.json", + "serverVariable.json": { + "$id": "serverVariable.json", "type": "object", "description": "An object representing a Server Variable for server URL template substitution.", "additionalProperties": false, @@ -264,8 +199,15 @@ } } }, - "http://asyncapi.com/definitions/2.4.0/SecurityRequirement.json": { - "$id": "http://asyncapi.com/definitions/2.4.0/SecurityRequirement.json", + "serverVariables.json": { + "$id": "serverVariables.json", + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/2.4.0/serverVariable.json" + } + }, + "SecurityRequirement.json": { + "$id": "SecurityRequirement.json", "type": "object", "additionalProperties": { "type": "array", @@ -275,8 +217,8 @@ "uniqueItems": true } }, - "http://asyncapi.com/definitions/2.4.0/bindingsObject.json": { - "$id": "http://asyncapi.com/definitions/2.4.0/bindingsObject.json", + "bindingsObject.json": { + "$id": "bindingsObject.json", "type": "object", "additionalProperties": true, "properties": { @@ -298,21 +240,14 @@ "solace": {} } }, - "http://asyncapi.com/definitions/2.4.0/channels.json": { - "$id": "http://asyncapi.com/definitions/2.4.0/channels.json", - "type": "object", - "propertyNames": { - "type": "string", - "format": "uri-template", - "minLength": 1 - }, - "additionalProperties": { - "$ref": "http://asyncapi.com/definitions/2.4.0/channelItem.json" - } - }, - "http://asyncapi.com/definitions/2.4.0/channelItem.json": { - "$id": "http://asyncapi.com/definitions/2.4.0/channelItem.json", + "server.json": { + "$id": "server.json", "type": "object", + "description": "An object representing a Server.", + "required": [ + "url", + "protocol" + ], "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { @@ -320,41 +255,36 @@ } }, "properties": { - "$ref": { - "$ref": "http://asyncapi.com/definitions/2.4.0/ReferenceObject.json" - }, - "parameters": { - "$ref": "http://asyncapi.com/definitions/2.4.0/parameters.json" + "url": { + "type": "string" }, "description": { - "type": "string", - "description": "A description of the channel." + "type": "string" }, - "servers": { - "type": "array", - "description": "The names of the servers on which this channel is available. If absent or empty then this channel must be available on all servers.", - "items": { - "type": "string" - }, - "uniqueItems": true + "protocol": { + "type": "string", + "description": "The transfer protocol." }, - "publish": { - "$ref": "http://asyncapi.com/definitions/2.4.0/operation.json" + "protocolVersion": { + "type": "string" }, - "subscribe": { - "$ref": "http://asyncapi.com/definitions/2.4.0/operation.json" + "variables": { + "$ref": "http://asyncapi.com/definitions/2.4.0/serverVariables.json" }, - "deprecated": { - "type": "boolean", - "default": false + "security": { + "type": "array", + "items": { + "$ref": "http://asyncapi.com/definitions/2.4.0/SecurityRequirement.json" + } }, "bindings": { "$ref": "http://asyncapi.com/definitions/2.4.0/bindingsObject.json" } } }, - "http://asyncapi.com/definitions/2.4.0/parameters.json": { - "$id": "http://asyncapi.com/definitions/2.4.0/parameters.json", + "servers.json": { + "$id": "servers.json", + "description": "An object representing multiple servers.", "type": "object", "additionalProperties": { "oneOf": [ @@ -362,196 +292,72 @@ "$ref": "http://asyncapi.com/definitions/2.4.0/Reference.json" }, { - "$ref": "http://asyncapi.com/definitions/2.4.0/parameter.json" + "$ref": "http://asyncapi.com/definitions/2.4.0/server.json" } ] - }, - "description": "JSON objects describing re-usable channel parameters." + } }, - "http://asyncapi.com/definitions/2.4.0/parameter.json": { - "$id": "http://asyncapi.com/definitions/2.4.0/parameter.json", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "http://asyncapi.com/definitions/2.4.0/specificationExtension.json" + "http://json-schema.org/draft-07/schema": { + "$id": "http://json-schema.org/draft-07/schema", + "title": "Core schema meta-schema", + "definitions": { + "schemaArray": { + "type": "array", + "minItems": 1, + "items": { + "$ref": "#" + } + }, + "nonNegativeInteger": { + "type": "integer", + "minimum": 0 + }, + "nonNegativeIntegerDefault0": { + "allOf": [ + { + "$ref": "#/definitions/nonNegativeInteger" + }, + { + "default": 0 + } + ] + }, + "simpleTypes": { + "enum": [ + "array", + "boolean", + "integer", + "null", + "number", + "object", + "string" + ] + }, + "stringArray": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true, + "default": [] } }, + "type": [ + "object", + "boolean" + ], "properties": { - "description": { + "$id": { "type": "string", - "description": "A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed." - }, - "schema": { - "$ref": "http://asyncapi.com/definitions/2.4.0/schema.json" + "format": "uri-reference" }, - "location": { + "$schema": { "type": "string", - "description": "A runtime expression that specifies the location of the parameter value", - "pattern": "^\\$message\\.(header|payload)#(\\/(([^\\/~])|(~[01]))*)*" + "format": "uri" }, "$ref": { - "$ref": "http://asyncapi.com/definitions/2.4.0/ReferenceObject.json" - } - } - }, - "http://asyncapi.com/definitions/2.4.0/schema.json": { - "$id": "http://asyncapi.com/definitions/2.4.0/schema.json", - "allOf": [ - { - "$ref": "http://json-schema.org/draft-07/schema#" - }, - { - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "http://asyncapi.com/definitions/2.4.0/specificationExtension.json" - } - }, - "properties": { - "additionalProperties": { - "anyOf": [ - { - "$ref": "http://asyncapi.com/definitions/2.4.0/schema.json" - }, - { - "type": "boolean" - } - ], - "default": {} - }, - "items": { - "anyOf": [ - { - "$ref": "http://asyncapi.com/definitions/2.4.0/schema.json" - }, - { - "type": "array", - "minItems": 1, - "items": { - "$ref": "http://asyncapi.com/definitions/2.4.0/schema.json" - } - } - ], - "default": {} - }, - "allOf": { - "type": "array", - "minItems": 1, - "items": { - "$ref": "http://asyncapi.com/definitions/2.4.0/schema.json" - } - }, - "oneOf": { - "type": "array", - "minItems": 1, - "items": { - "$ref": "http://asyncapi.com/definitions/2.4.0/schema.json" - } - }, - "anyOf": { - "type": "array", - "minItems": 1, - "items": { - "$ref": "http://asyncapi.com/definitions/2.4.0/schema.json" - } - }, - "not": { - "$ref": "http://asyncapi.com/definitions/2.4.0/schema.json" - }, - "properties": { - "type": "object", - "additionalProperties": { - "$ref": "http://asyncapi.com/definitions/2.4.0/schema.json" - }, - "default": {} - }, - "patternProperties": { - "type": "object", - "additionalProperties": { - "$ref": "http://asyncapi.com/definitions/2.4.0/schema.json" - }, - "default": {} - }, - "propertyNames": { - "$ref": "http://asyncapi.com/definitions/2.4.0/schema.json" - }, - "contains": { - "$ref": "http://asyncapi.com/definitions/2.4.0/schema.json" - }, - "discriminator": { - "type": "string" - }, - "externalDocs": { - "$ref": "http://asyncapi.com/definitions/2.4.0/externalDocs.json" - }, - "deprecated": { - "type": "boolean", - "default": false - } - } - } - ] - }, - "http://json-schema.org/draft-07/schema": { - "$id": "http://json-schema.org/draft-07/schema", - "title": "Core schema meta-schema", - "definitions": { - "schemaArray": { - "type": "array", - "minItems": 1, - "items": { - "$ref": "#" - } - }, - "nonNegativeInteger": { - "type": "integer", - "minimum": 0 - }, - "nonNegativeIntegerDefault0": { - "allOf": [ - { - "$ref": "#/definitions/nonNegativeInteger" - }, - { - "default": 0 - } - ] - }, - "simpleTypes": { - "enum": [ - "array", - "boolean", - "integer", - "null", - "number", - "object", - "string" - ] - }, - "stringArray": { - "type": "array", - "items": { - "type": "string" - }, - "uniqueItems": true, - "default": [] - } - }, - "type": [ - "object", - "boolean" - ], - "properties": { - "$id": { - "type": "string", - "format": "uri-reference" - }, - "$schema": { - "type": "string", - "format": "uri" - }, - "$ref": { - "type": "string", - "format": "uri-reference" + "type": "string", + "format": "uri-reference" }, "$comment": { "type": "string" @@ -735,8 +541,8 @@ }, "default": true }, - "http://asyncapi.com/definitions/2.4.0/externalDocs.json": { - "$id": "http://asyncapi.com/definitions/2.4.0/externalDocs.json", + "externalDocs.json": { + "$id": "externalDocs.json", "type": "object", "additionalProperties": false, "description": "information about external documentation", @@ -758,9 +564,105 @@ } } }, - "http://asyncapi.com/definitions/2.4.0/operation.json": { - "$id": "http://asyncapi.com/definitions/2.4.0/operation.json", - "type": "object", + "schema.json": { + "$id": "schema.json", + "allOf": [ + { + "$ref": "http://json-schema.org/draft-07/schema#" + }, + { + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.4.0/specificationExtension.json" + } + }, + "properties": { + "additionalProperties": { + "anyOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.4.0/schema.json" + }, + { + "type": "boolean" + } + ], + "default": {} + }, + "items": { + "anyOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.4.0/schema.json" + }, + { + "type": "array", + "minItems": 1, + "items": { + "$ref": "http://asyncapi.com/definitions/2.4.0/schema.json" + } + } + ], + "default": {} + }, + "allOf": { + "type": "array", + "minItems": 1, + "items": { + "$ref": "http://asyncapi.com/definitions/2.4.0/schema.json" + } + }, + "oneOf": { + "type": "array", + "minItems": 1, + "items": { + "$ref": "http://asyncapi.com/definitions/2.4.0/schema.json" + } + }, + "anyOf": { + "type": "array", + "minItems": 1, + "items": { + "$ref": "http://asyncapi.com/definitions/2.4.0/schema.json" + } + }, + "not": { + "$ref": "http://asyncapi.com/definitions/2.4.0/schema.json" + }, + "properties": { + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/2.4.0/schema.json" + }, + "default": {} + }, + "patternProperties": { + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/2.4.0/schema.json" + }, + "default": {} + }, + "propertyNames": { + "$ref": "http://asyncapi.com/definitions/2.4.0/schema.json" + }, + "contains": { + "$ref": "http://asyncapi.com/definitions/2.4.0/schema.json" + }, + "discriminator": { + "type": "string" + }, + "externalDocs": { + "$ref": "http://asyncapi.com/definitions/2.4.0/externalDocs.json" + }, + "deprecated": { + "type": "boolean", + "default": false + } + } + } + ] + }, + "parameter.json": { + "$id": "parameter.json", "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { @@ -768,54 +670,64 @@ } }, "properties": { - "traits": { - "type": "array", - "items": { - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/2.4.0/Reference.json" - }, - { - "$ref": "http://asyncapi.com/definitions/2.4.0/operationTrait.json" - } - ] - } + "description": { + "type": "string", + "description": "A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed." }, - "summary": { - "type": "string" + "schema": { + "$ref": "http://asyncapi.com/definitions/2.4.0/schema.json" }, - "description": { - "type": "string" + "location": { + "type": "string", + "description": "A runtime expression that specifies the location of the parameter value", + "pattern": "^\\$message\\.(header|payload)#(\\/(([^\\/~])|(~[01]))*)*" }, - "security": { - "type": "array", - "items": { - "$ref": "http://asyncapi.com/definitions/2.4.0/SecurityRequirement.json" + "$ref": { + "$ref": "http://asyncapi.com/definitions/2.4.0/ReferenceObject.json" + } + } + }, + "parameters.json": { + "$id": "parameters.json", + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.4.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.4.0/parameter.json" } + ] + }, + "description": "JSON objects describing re-usable channel parameters." + }, + "tag.json": { + "$id": "tag.json", + "type": "object", + "additionalProperties": false, + "required": [ + "name" + ], + "properties": { + "name": { + "type": "string" }, - "tags": { - "type": "array", - "items": { - "$ref": "http://asyncapi.com/definitions/2.4.0/tag.json" - }, - "uniqueItems": true + "description": { + "type": "string" }, "externalDocs": { "$ref": "http://asyncapi.com/definitions/2.4.0/externalDocs.json" - }, - "operationId": { - "type": "string" - }, - "bindings": { - "$ref": "http://asyncapi.com/definitions/2.4.0/bindingsObject.json" - }, - "message": { - "$ref": "http://asyncapi.com/definitions/2.4.0/message.json" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.4.0/specificationExtension.json" } } }, - "http://asyncapi.com/definitions/2.4.0/operationTrait.json": { - "$id": "http://asyncapi.com/definitions/2.4.0/operationTrait.json", + "operationTrait.json": { + "$id": "operationTrait.json", "type": "object", "additionalProperties": false, "patternProperties": { @@ -854,443 +766,147 @@ } } }, - "http://asyncapi.com/definitions/2.4.0/tag.json": { - "$id": "http://asyncapi.com/definitions/2.4.0/tag.json", + "correlationId.json": { + "$id": "correlationId.json", "type": "object", - "additionalProperties": false, "required": [ - "name" + "location" ], + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.4.0/specificationExtension.json" + } + }, "properties": { - "name": { - "type": "string" - }, "description": { - "type": "string" + "type": "string", + "description": "A optional description of the correlation ID. GitHub Flavored Markdown is allowed." }, - "externalDocs": { - "$ref": "http://asyncapi.com/definitions/2.4.0/externalDocs.json" + "location": { + "type": "string", + "description": "A runtime expression that specifies the location of the correlation ID", + "pattern": "^\\$message\\.(header|payload)#(\\/(([^\\/~])|(~[01]))*)*" } - }, + } + }, + "messageTrait.json": { + "$id": "messageTrait.json", + "type": "object", + "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { "$ref": "http://asyncapi.com/definitions/2.4.0/specificationExtension.json" } - } - }, - "http://asyncapi.com/definitions/2.4.0/message.json": { - "$id": "http://asyncapi.com/definitions/2.4.0/message.json", - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/2.4.0/Reference.json" + }, + "properties": { + "schemaFormat": { + "type": "string" }, - { - "oneOf": [ + "contentType": { + "type": "string" + }, + "headers": { + "allOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.4.0/schema.json" + }, { - "type": "object", - "required": [ - "oneOf" - ], - "additionalProperties": false, "properties": { - "oneOf": { - "type": "array", - "items": { - "$ref": "http://asyncapi.com/definitions/2.4.0/message.json" - } + "type": { + "const": "object" } } + } + ] + }, + "messageId": { + "type": "string" + }, + "correlationId": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.4.0/Reference.json" }, { - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "http://asyncapi.com/definitions/2.4.0/specificationExtension.json" - } - }, - "properties": { - "schemaFormat": { - "type": "string" - }, - "contentType": { - "type": "string" - }, - "headers": { - "allOf": [ - { - "$ref": "http://asyncapi.com/definitions/2.4.0/schema.json" - }, - { - "properties": { - "type": { - "const": "object" - } - } - } - ] - }, - "messageId": { - "type": "string" - }, - "payload": {}, - "correlationId": { - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/2.4.0/Reference.json" - }, - { - "$ref": "http://asyncapi.com/definitions/2.4.0/correlationId.json" - } - ] - }, - "tags": { - "type": "array", - "items": { - "$ref": "http://asyncapi.com/definitions/2.4.0/tag.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." - }, - "externalDocs": { - "$ref": "http://asyncapi.com/definitions/2.4.0/externalDocs.json" - }, - "deprecated": { - "type": "boolean", - "default": false - }, - "examples": { - "type": "array", - "items": { - "type": "object", - "additionalProperties": false, - "anyOf": [ - { - "required": [ - "payload" - ] - }, - { - "required": [ - "headers" - ] - } - ], - "properties": { - "name": { - "type": "string", - "description": "Machine readable name of the message example." - }, - "summary": { - "type": "string", - "description": "A brief summary of the message example." - }, - "headers": { - "type": "object" - }, - "payload": {} - } - } - }, - "bindings": { - "$ref": "http://asyncapi.com/definitions/2.4.0/bindingsObject.json" - }, - "traits": { - "type": "array", - "items": { - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/2.4.0/Reference.json" - }, - { - "$ref": "http://asyncapi.com/definitions/2.4.0/messageTrait.json" - } - ] - } - } - }, - "allOf": [ - { - "if": { - "not": { - "required": [ - "schemaFormat" - ] - } - }, - "then": { - "properties": { - "payload": { - "$ref": "http://asyncapi.com/definitions/2.4.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" - ] - } - } - }, - "then": { - "properties": { - "payload": { - "$ref": "http://asyncapi.com/definitions/2.4.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/2.4.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/2.4.0/avroSchema_v1.json" - } - } - } - } - ] - } - ] - } - ] - }, - "http://asyncapi.com/definitions/2.4.0/correlationId.json": { - "$id": "http://asyncapi.com/definitions/2.4.0/correlationId.json", - "type": "object", - "required": [ - "location" - ], - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "http://asyncapi.com/definitions/2.4.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/2.4.0/messageTrait.json": { - "$id": "http://asyncapi.com/definitions/2.4.0/messageTrait.json", - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "http://asyncapi.com/definitions/2.4.0/specificationExtension.json" - } - }, - "properties": { - "schemaFormat": { - "type": "string" - }, - "contentType": { - "type": "string" - }, - "headers": { - "allOf": [ - { - "$ref": "http://asyncapi.com/definitions/2.4.0/schema.json" - }, - { - "properties": { - "type": { - "const": "object" - } - } - } - ] - }, - "messageId": { - "type": "string" - }, - "correlationId": { - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/2.4.0/Reference.json" - }, - { - "$ref": "http://asyncapi.com/definitions/2.4.0/correlationId.json" - } - ] - }, - "tags": { - "type": "array", - "items": { - "$ref": "http://asyncapi.com/definitions/2.4.0/tag.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." - }, - "externalDocs": { - "$ref": "http://asyncapi.com/definitions/2.4.0/externalDocs.json" - }, - "deprecated": { - "type": "boolean", - "default": false - }, - "examples": { - "type": "array", - "items": { - "type": "object" - } - }, - "bindings": { - "$ref": "http://asyncapi.com/definitions/2.4.0/bindingsObject.json" - } - } - }, - "http://asyncapi.com/definitions/2.4.0/openapiSchema_3_0.json": { - "$id": "http://asyncapi.com/definitions/2.4.0/openapiSchema_3_0.json", - "type": "object", - "definitions": { - "ExternalDocumentation": { - "type": "object", - "required": [ - "url" - ], - "properties": { - "description": { - "type": "string" - }, - "url": { - "type": "string", - "format": "uri-reference" - } - }, - "patternProperties": { - "^x-": {} - }, - "additionalProperties": false - }, - "Discriminator": { - "type": "object", - "required": [ - "propertyName" - ], - "properties": { - "propertyName": { - "type": "string" - }, - "mapping": { + "$ref": "http://asyncapi.com/definitions/2.4.0/correlationId.json" + } + ] + }, + "tags": { + "type": "array", + "items": { + "$ref": "http://asyncapi.com/definitions/2.4.0/tag.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." + }, + "externalDocs": { + "$ref": "http://asyncapi.com/definitions/2.4.0/externalDocs.json" + }, + "deprecated": { + "type": "boolean", + "default": false + }, + "examples": { + "type": "array", + "items": { + "type": "object" + } + }, + "bindings": { + "$ref": "http://asyncapi.com/definitions/2.4.0/bindingsObject.json" + } + } + }, + "openapiSchema_3_0.json": { + "$id": "openapiSchema_3_0.json", + "type": "object", + "definitions": { + "ExternalDocumentation": { + "type": "object", + "required": [ + "url" + ], + "properties": { + "description": { + "type": "string" + }, + "url": { + "type": "string", + "format": "uri-reference" + } + }, + "patternProperties": { + "^x-": {} + }, + "additionalProperties": false + }, + "Discriminator": { + "type": "object", + "required": [ + "propertyName" + ], + "properties": { + "propertyName": { + "type": "string" + }, + "mapping": { "type": "object", "additionalProperties": { "type": "string" @@ -1545,8 +1161,8 @@ }, "additionalProperties": false }, - "http://asyncapi.com/definitions/2.4.0/avroSchema_v1.json": { - "$id": "http://asyncapi.com/definitions/2.4.0/avroSchema_v1.json", + "avroSchema_v1.json": { + "$id": "avroSchema_v1.json", "definitions": { "avroSchema": { "title": "Avro Schema", @@ -1837,34 +1453,305 @@ "size": { "type": "number" } - }, - "required": [ - "type", - "name", - "size" + }, + "required": [ + "type", + "name", + "size" + ] + }, + "name": { + "type": "string", + "pattern": "^[A-Za-z_][A-Za-z0-9_]*$" + }, + "namespace": { + "type": "string", + "pattern": "^([A-Za-z_][A-Za-z0-9_]*(\\.[A-Za-z_][A-Za-z0-9_]*)*)*$" + } + }, + "description": "Json-Schema definition for Avro AVSC files.", + "oneOf": [ + { + "$ref": "#/definitions/avroSchema" + } + ], + "title": "Avro Schema Definition" + }, + "message.json": { + "$id": "message.json", + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.4.0/Reference.json" + }, + { + "oneOf": [ + { + "type": "object", + "required": [ + "oneOf" + ], + "additionalProperties": false, + "properties": { + "oneOf": { + "type": "array", + "items": { + "$ref": "http://asyncapi.com/definitions/2.4.0/message.json" + } + } + } + }, + { + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.4.0/specificationExtension.json" + } + }, + "properties": { + "schemaFormat": { + "type": "string" + }, + "contentType": { + "type": "string" + }, + "headers": { + "allOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.4.0/schema.json" + }, + { + "properties": { + "type": { + "const": "object" + } + } + } + ] + }, + "messageId": { + "type": "string" + }, + "payload": {}, + "correlationId": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.4.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.4.0/correlationId.json" + } + ] + }, + "tags": { + "type": "array", + "items": { + "$ref": "http://asyncapi.com/definitions/2.4.0/tag.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." + }, + "externalDocs": { + "$ref": "http://asyncapi.com/definitions/2.4.0/externalDocs.json" + }, + "deprecated": { + "type": "boolean", + "default": false + }, + "examples": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "anyOf": [ + { + "required": [ + "payload" + ] + }, + { + "required": [ + "headers" + ] + } + ], + "properties": { + "name": { + "type": "string", + "description": "Machine readable name of the message example." + }, + "summary": { + "type": "string", + "description": "A brief summary of the message example." + }, + "headers": { + "type": "object" + }, + "payload": {} + } + } + }, + "bindings": { + "$ref": "http://asyncapi.com/definitions/2.4.0/bindingsObject.json" + }, + "traits": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.4.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.4.0/messageTrait.json" + } + ] + } + } + }, + "allOf": [ + { + "if": { + "not": { + "required": [ + "schemaFormat" + ] + } + }, + "then": { + "properties": { + "payload": { + "$ref": "http://asyncapi.com/definitions/2.4.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" + ] + } + } + }, + "then": { + "properties": { + "payload": { + "$ref": "http://asyncapi.com/definitions/2.4.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/2.4.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/2.4.0/avroSchema_v1.json" + } + } + } + } + ] + } ] - }, - "name": { - "type": "string", - "pattern": "^[A-Za-z_][A-Za-z0-9_]*$" - }, - "namespace": { - "type": "string", - "pattern": "^([A-Za-z_][A-Za-z0-9_]*(\\.[A-Za-z_][A-Za-z0-9_]*)*)*$" - } - }, - "description": "Json-Schema definition for Avro AVSC files.", - "oneOf": [ - { - "$ref": "#/definitions/avroSchema" } - ], - "title": "Avro Schema Definition" + ] }, - "http://asyncapi.com/definitions/2.4.0/components.json": { - "$id": "http://asyncapi.com/definitions/2.4.0/components.json", + "operation.json": { + "$id": "operation.json", "type": "object", - "description": "An object to hold a set of reusable objects for different aspects of the AsyncAPI Specification.", "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { @@ -1872,142 +1759,125 @@ } }, "properties": { - "schemas": { - "$ref": "http://asyncapi.com/definitions/2.4.0/schemas.json" - }, - "servers": { - "$ref": "http://asyncapi.com/definitions/2.4.0/servers.json" - }, - "channels": { - "$ref": "http://asyncapi.com/definitions/2.4.0/channels.json" - }, - "serverVariables": { - "$ref": "http://asyncapi.com/definitions/2.4.0/serverVariables.json" - }, - "messages": { - "$ref": "http://asyncapi.com/definitions/2.4.0/messages.json" - }, - "securitySchemes": { - "type": "object", - "patternProperties": { - "^[\\w\\d\\.\\-_]+$": { - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/2.4.0/Reference.json" - }, - { - "$ref": "http://asyncapi.com/definitions/2.4.0/SecurityScheme.json" - } - ] - } + "traits": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.4.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.4.0/operationTrait.json" + } + ] } }, - "parameters": { - "$ref": "http://asyncapi.com/definitions/2.4.0/parameters.json" + "summary": { + "type": "string" }, - "correlationIds": { - "type": "object", - "patternProperties": { - "^[\\w\\d\\.\\-_]+$": { - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/2.4.0/Reference.json" - }, - { - "$ref": "http://asyncapi.com/definitions/2.4.0/correlationId.json" - } - ] - } - } + "description": { + "type": "string" }, - "operationTraits": { - "type": "object", - "additionalProperties": { - "$ref": "http://asyncapi.com/definitions/2.4.0/operationTrait.json" + "security": { + "type": "array", + "items": { + "$ref": "http://asyncapi.com/definitions/2.4.0/SecurityRequirement.json" } }, - "messageTraits": { - "type": "object", - "additionalProperties": { - "$ref": "http://asyncapi.com/definitions/2.4.0/messageTrait.json" - } + "tags": { + "type": "array", + "items": { + "$ref": "http://asyncapi.com/definitions/2.4.0/tag.json" + }, + "uniqueItems": true }, - "serverBindings": { - "type": "object", - "additionalProperties": { - "$ref": "http://asyncapi.com/definitions/2.4.0/bindingsObject.json" - } + "externalDocs": { + "$ref": "http://asyncapi.com/definitions/2.4.0/externalDocs.json" }, - "channelBindings": { - "type": "object", - "additionalProperties": { - "$ref": "http://asyncapi.com/definitions/2.4.0/bindingsObject.json" - } + "operationId": { + "type": "string" }, - "operationBindings": { - "type": "object", - "additionalProperties": { - "$ref": "http://asyncapi.com/definitions/2.4.0/bindingsObject.json" - } + "bindings": { + "$ref": "http://asyncapi.com/definitions/2.4.0/bindingsObject.json" }, - "messageBindings": { - "type": "object", - "additionalProperties": { - "$ref": "http://asyncapi.com/definitions/2.4.0/bindingsObject.json" - } + "message": { + "$ref": "http://asyncapi.com/definitions/2.4.0/message.json" } } }, - "http://asyncapi.com/definitions/2.4.0/schemas.json": { - "$id": "http://asyncapi.com/definitions/2.4.0/schemas.json", - "type": "object", - "additionalProperties": { - "$ref": "http://asyncapi.com/definitions/2.4.0/schema.json" - }, - "description": "JSON objects describing schemas the API uses." - }, - "http://asyncapi.com/definitions/2.4.0/messages.json": { - "$id": "http://asyncapi.com/definitions/2.4.0/messages.json", + "channelItem.json": { + "$id": "channelItem.json", "type": "object", - "additionalProperties": { - "$ref": "http://asyncapi.com/definitions/2.4.0/message.json" + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.4.0/specificationExtension.json" + } }, - "description": "JSON objects describing the messages being consumed and produced by the API." - }, - "http://asyncapi.com/definitions/2.4.0/SecurityScheme.json": { - "$id": "http://asyncapi.com/definitions/2.4.0/SecurityScheme.json", - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/2.4.0/userPassword.json" - }, - { - "$ref": "http://asyncapi.com/definitions/2.4.0/apiKey.json" + "properties": { + "$ref": { + "$ref": "http://asyncapi.com/definitions/2.4.0/ReferenceObject.json" }, - { - "$ref": "http://asyncapi.com/definitions/2.4.0/X509.json" + "parameters": { + "$ref": "http://asyncapi.com/definitions/2.4.0/parameters.json" }, - { - "$ref": "http://asyncapi.com/definitions/2.4.0/symmetricEncryption.json" + "description": { + "type": "string", + "description": "A description of the channel." }, - { - "$ref": "http://asyncapi.com/definitions/2.4.0/asymmetricEncryption.json" + "servers": { + "type": "array", + "description": "The names of the servers on which this channel is available. If absent or empty then this channel must be available on all servers.", + "items": { + "type": "string" + }, + "uniqueItems": true }, - { - "$ref": "http://asyncapi.com/definitions/2.4.0/HTTPSecurityScheme.json" + "publish": { + "$ref": "http://asyncapi.com/definitions/2.4.0/operation.json" }, - { - "$ref": "http://asyncapi.com/definitions/2.4.0/oauth2Flows.json" + "subscribe": { + "$ref": "http://asyncapi.com/definitions/2.4.0/operation.json" }, - { - "$ref": "http://asyncapi.com/definitions/2.4.0/openIdConnect.json" + "deprecated": { + "type": "boolean", + "default": false }, - { - "$ref": "http://asyncapi.com/definitions/2.4.0/SaslSecurityScheme.json" + "bindings": { + "$ref": "http://asyncapi.com/definitions/2.4.0/bindingsObject.json" } - ] + } }, - "http://asyncapi.com/definitions/2.4.0/userPassword.json": { - "$id": "http://asyncapi.com/definitions/2.4.0/userPassword.json", + "channels.json": { + "$id": "channels.json", + "type": "object", + "propertyNames": { + "type": "string", + "format": "uri-template", + "minLength": 1 + }, + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/2.4.0/channelItem.json" + } + }, + "schemas.json": { + "$id": "schemas.json", + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/2.4.0/schema.json" + }, + "description": "JSON objects describing schemas the API uses." + }, + "messages.json": { + "$id": "messages.json", + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/2.4.0/message.json" + }, + "description": "JSON objects describing the messages being consumed and produced by the API." + }, + "userPassword.json": { + "$id": "userPassword.json", "type": "object", "required": [ "type" @@ -2030,8 +1900,8 @@ }, "additionalProperties": false }, - "http://asyncapi.com/definitions/2.4.0/apiKey.json": { - "$id": "http://asyncapi.com/definitions/2.4.0/apiKey.json", + "apiKey.json": { + "$id": "apiKey.json", "type": "object", "required": [ "type", @@ -2062,8 +1932,8 @@ }, "additionalProperties": false }, - "http://asyncapi.com/definitions/2.4.0/X509.json": { - "$id": "http://asyncapi.com/definitions/2.4.0/X509.json", + "X509.json": { + "$id": "X509.json", "type": "object", "required": [ "type" @@ -2086,8 +1956,8 @@ }, "additionalProperties": false }, - "http://asyncapi.com/definitions/2.4.0/symmetricEncryption.json": { - "$id": "http://asyncapi.com/definitions/2.4.0/symmetricEncryption.json", + "symmetricEncryption.json": { + "$id": "symmetricEncryption.json", "type": "object", "required": [ "type" @@ -2110,8 +1980,8 @@ }, "additionalProperties": false }, - "http://asyncapi.com/definitions/2.4.0/asymmetricEncryption.json": { - "$id": "http://asyncapi.com/definitions/2.4.0/asymmetricEncryption.json", + "asymmetricEncryption.json": { + "$id": "asymmetricEncryption.json", "type": "object", "required": [ "type" @@ -2134,22 +2004,8 @@ }, "additionalProperties": false }, - "http://asyncapi.com/definitions/2.4.0/HTTPSecurityScheme.json": { - "$id": "http://asyncapi.com/definitions/2.4.0/HTTPSecurityScheme.json", - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/2.4.0/NonBearerHTTPSecurityScheme.json" - }, - { - "$ref": "http://asyncapi.com/definitions/2.4.0/BearerHTTPSecurityScheme.json" - }, - { - "$ref": "http://asyncapi.com/definitions/2.4.0/APIKeyHTTPSecurityScheme.json" - } - ] - }, - "http://asyncapi.com/definitions/2.4.0/NonBearerHTTPSecurityScheme.json": { - "$id": "http://asyncapi.com/definitions/2.4.0/NonBearerHTTPSecurityScheme.json", + "NonBearerHTTPSecurityScheme.json": { + "$id": "NonBearerHTTPSecurityScheme.json", "not": { "type": "object", "properties": { @@ -2187,8 +2043,8 @@ }, "additionalProperties": false }, - "http://asyncapi.com/definitions/2.4.0/BearerHTTPSecurityScheme.json": { - "$id": "http://asyncapi.com/definitions/2.4.0/BearerHTTPSecurityScheme.json", + "BearerHTTPSecurityScheme.json": { + "$id": "BearerHTTPSecurityScheme.json", "type": "object", "required": [ "type", @@ -2221,8 +2077,8 @@ }, "additionalProperties": false }, - "http://asyncapi.com/definitions/2.4.0/APIKeyHTTPSecurityScheme.json": { - "$id": "http://asyncapi.com/definitions/2.4.0/APIKeyHTTPSecurityScheme.json", + "APIKeyHTTPSecurityScheme.json": { + "$id": "APIKeyHTTPSecurityScheme.json", "type": "object", "required": [ "type", @@ -2258,8 +2114,56 @@ }, "additionalProperties": false }, - "http://asyncapi.com/definitions/2.4.0/oauth2Flows.json": { - "$id": "http://asyncapi.com/definitions/2.4.0/oauth2Flows.json", + "HTTPSecurityScheme.json": { + "$id": "HTTPSecurityScheme.json", + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.4.0/NonBearerHTTPSecurityScheme.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.4.0/BearerHTTPSecurityScheme.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.4.0/APIKeyHTTPSecurityScheme.json" + } + ] + }, + "oauth2Scopes.json": { + "$id": "oauth2Scopes.json", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "oauth2Flow.json": { + "$id": "oauth2Flow.json", + "type": "object", + "properties": { + "authorizationUrl": { + "type": "string", + "format": "uri" + }, + "tokenUrl": { + "type": "string", + "format": "uri" + }, + "refreshUrl": { + "type": "string", + "format": "uri" + }, + "scopes": { + "$ref": "http://asyncapi.com/definitions/2.4.0/oauth2Scopes.json" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.4.0/specificationExtension.json" + } + }, + "additionalProperties": false + }, + "oauth2Flows.json": { + "$id": "oauth2Flows.json", "type": "object", "required": [ "type", @@ -2362,42 +2266,8 @@ } } }, - "http://asyncapi.com/definitions/2.4.0/oauth2Flow.json": { - "$id": "http://asyncapi.com/definitions/2.4.0/oauth2Flow.json", - "type": "object", - "properties": { - "authorizationUrl": { - "type": "string", - "format": "uri" - }, - "tokenUrl": { - "type": "string", - "format": "uri" - }, - "refreshUrl": { - "type": "string", - "format": "uri" - }, - "scopes": { - "$ref": "http://asyncapi.com/definitions/2.4.0/oauth2Scopes.json" - } - }, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "http://asyncapi.com/definitions/2.4.0/specificationExtension.json" - } - }, - "additionalProperties": false - }, - "http://asyncapi.com/definitions/2.4.0/oauth2Scopes.json": { - "$id": "http://asyncapi.com/definitions/2.4.0/oauth2Scopes.json", - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "http://asyncapi.com/definitions/2.4.0/openIdConnect.json": { - "$id": "http://asyncapi.com/definitions/2.4.0/openIdConnect.json", + "openIdConnect.json": { + "$id": "openIdConnect.json", "type": "object", "required": [ "type", @@ -2425,22 +2295,8 @@ }, "additionalProperties": false }, - "http://asyncapi.com/definitions/2.4.0/SaslSecurityScheme.json": { - "$id": "http://asyncapi.com/definitions/2.4.0/SaslSecurityScheme.json", - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/2.4.0/SaslPlainSecurityScheme.json" - }, - { - "$ref": "http://asyncapi.com/definitions/2.4.0/SaslScramSecurityScheme.json" - }, - { - "$ref": "http://asyncapi.com/definitions/2.4.0/SaslGssapiSecurityScheme.json" - } - ] - }, - "http://asyncapi.com/definitions/2.4.0/SaslPlainSecurityScheme.json": { - "$id": "http://asyncapi.com/definitions/2.4.0/SaslPlainSecurityScheme.json", + "SaslPlainSecurityScheme.json": { + "$id": "SaslPlainSecurityScheme.json", "type": "object", "required": [ "type" @@ -2463,8 +2319,8 @@ }, "additionalProperties": false }, - "http://asyncapi.com/definitions/2.4.0/SaslScramSecurityScheme.json": { - "$id": "http://asyncapi.com/definitions/2.4.0/SaslScramSecurityScheme.json", + "SaslScramSecurityScheme.json": { + "$id": "SaslScramSecurityScheme.json", "type": "object", "required": [ "type" @@ -2488,8 +2344,8 @@ }, "additionalProperties": false }, - "http://asyncapi.com/definitions/2.4.0/SaslGssapiSecurityScheme.json": { - "$id": "http://asyncapi.com/definitions/2.4.0/SaslGssapiSecurityScheme.json", + "SaslGssapiSecurityScheme.json": { + "$id": "SaslGssapiSecurityScheme.json", "type": "object", "required": [ "type" @@ -2511,7 +2367,151 @@ } }, "additionalProperties": false + }, + "SaslSecurityScheme.json": { + "$id": "SaslSecurityScheme.json", + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.4.0/SaslPlainSecurityScheme.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.4.0/SaslScramSecurityScheme.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.4.0/SaslGssapiSecurityScheme.json" + } + ] + }, + "SecurityScheme.json": { + "$id": "SecurityScheme.json", + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.4.0/userPassword.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.4.0/apiKey.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.4.0/X509.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.4.0/symmetricEncryption.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.4.0/asymmetricEncryption.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.4.0/HTTPSecurityScheme.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.4.0/oauth2Flows.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.4.0/openIdConnect.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.4.0/SaslSecurityScheme.json" + } + ] + }, + "components.json": { + "$id": "components.json", + "type": "object", + "description": "An object to hold a set of reusable objects for different aspects of the AsyncAPI Specification.", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.4.0/specificationExtension.json" + } + }, + "properties": { + "schemas": { + "$ref": "http://asyncapi.com/definitions/2.4.0/schemas.json" + }, + "servers": { + "$ref": "http://asyncapi.com/definitions/2.4.0/servers.json" + }, + "channels": { + "$ref": "http://asyncapi.com/definitions/2.4.0/channels.json" + }, + "serverVariables": { + "$ref": "http://asyncapi.com/definitions/2.4.0/serverVariables.json" + }, + "messages": { + "$ref": "http://asyncapi.com/definitions/2.4.0/messages.json" + }, + "securitySchemes": { + "type": "object", + "patternProperties": { + "^[\\w\\d\\.\\-_]+$": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.4.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.4.0/SecurityScheme.json" + } + ] + } + } + }, + "parameters": { + "$ref": "http://asyncapi.com/definitions/2.4.0/parameters.json" + }, + "correlationIds": { + "type": "object", + "patternProperties": { + "^[\\w\\d\\.\\-_]+$": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.4.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.4.0/correlationId.json" + } + ] + } + } + }, + "operationTraits": { + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/2.4.0/operationTrait.json" + } + }, + "messageTraits": { + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/2.4.0/messageTrait.json" + } + }, + "serverBindings": { + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/2.4.0/bindingsObject.json" + } + }, + "channelBindings": { + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/2.4.0/bindingsObject.json" + } + }, + "operationBindings": { + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/2.4.0/bindingsObject.json" + } + }, + "messageBindings": { + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/2.4.0/bindingsObject.json" + } + } + } } }, + "$id": "http://asyncapi.com/definitions/2.4.0/asyncapi.json", "description": "!!Auto generated!! \n Do not manually edit. " } \ No newline at end of file diff --git a/schemas/2.5.0-without-$id.json b/schemas/2.5.0-without-$id.json index bd49a22e..aea9c9b6 100644 --- a/schemas/2.5.0-without-$id.json +++ b/schemas/2.5.0-without-$id.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema", + "$schema": "http://json-schema.org/draft-07/schema#", "title": "AsyncAPI 2.5.0 schema.", "type": "object", "required": [ @@ -58,45 +58,6 @@ "additionalProperties": true, "additionalItems": true }, - "info": { - "type": "object", - "description": "General information about the API.", - "required": [ - "version", - "title" - ], - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "properties": { - "title": { - "type": "string", - "description": "A unique and precise title of the API." - }, - "version": { - "type": "string", - "description": "A semantic version number of the API." - }, - "description": { - "type": "string", - "description": "A longer description of the API. Should be different from the title. CommonMark is allowed." - }, - "termsOfService": { - "type": "string", - "description": "A URL to the Terms of Service for the API. MUST be in the format of a URL.", - "format": "uri" - }, - "contact": { - "$ref": "#/definitions/contact" - }, - "license": { - "$ref": "#/definitions/license" - } - } - }, "contact": { "type": "object", "description": "Contact information for the owners of the API.", @@ -146,41 +107,12 @@ } } }, - "servers": { - "description": "An object representing multiple servers.", - "type": "object", - "additionalProperties": { - "oneOf": [ - { - "$ref": "#/definitions/Reference" - }, - { - "$ref": "#/definitions/server" - } - ] - } - }, - "Reference": { - "type": "object", - "required": [ - "$ref" - ], - "properties": { - "$ref": { - "$ref": "#/definitions/ReferenceObject" - } - } - }, - "ReferenceObject": { - "type": "string", - "format": "uri-reference" - }, - "server": { + "info": { "type": "object", - "description": "An object representing a Server.", + "description": "General information about the API.", "required": [ - "url", - "protocol" + "version", + "title" ], "additionalProperties": false, "patternProperties": { @@ -189,51 +121,44 @@ } }, "properties": { - "url": { - "type": "string" - }, - "description": { - "type": "string" - }, - "protocol": { + "title": { "type": "string", - "description": "The transfer protocol." + "description": "A unique and precise title of the API." }, - "protocolVersion": { - "type": "string" + "version": { + "type": "string", + "description": "A semantic version number of the API." }, - "variables": { - "$ref": "#/definitions/serverVariables" + "description": { + "type": "string", + "description": "A longer description of the API. Should be different from the title. CommonMark is allowed." }, - "security": { - "type": "array", - "items": { - "$ref": "#/definitions/SecurityRequirement" - } + "termsOfService": { + "type": "string", + "description": "A URL to the Terms of Service for the API. MUST be in the format of a URL.", + "format": "uri" }, - "bindings": { - "$ref": "#/definitions/bindingsObject" + "contact": { + "$ref": "#/definitions/contact" }, - "tags": { - "type": "array", - "items": { - "$ref": "#/definitions/tag" - }, - "uniqueItems": true + "license": { + "$ref": "#/definitions/license" } } }, - "serverVariables": { + "ReferenceObject": { + "type": "string", + "format": "uri-reference" + }, + "Reference": { "type": "object", - "additionalProperties": { - "oneOf": [ - { - "$ref": "#/definitions/Reference" - }, - { - "$ref": "#/definitions/serverVariable" - } - ] + "required": [ + "$ref" + ], + "properties": { + "$ref": { + "$ref": "#/definitions/ReferenceObject" + } } }, "serverVariable": { @@ -267,6 +192,19 @@ } } }, + "serverVariables": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/serverVariable" + } + ] + } + }, "SecurityRequirement": { "type": "object", "additionalProperties": { @@ -299,21 +237,20 @@ "solace": {} } }, - "tag": { + "externalDocs": { "type": "object", "additionalProperties": false, + "description": "information about external documentation", "required": [ - "name" + "url" ], "properties": { - "name": { - "type": "string" - }, "description": { "type": "string" }, - "externalDocs": { - "$ref": "#/definitions/externalDocs" + "url": { + "type": "string", + "format": "uri" } }, "patternProperties": { @@ -322,20 +259,21 @@ } } }, - "externalDocs": { + "tag": { "type": "object", "additionalProperties": false, - "description": "information about external documentation", "required": [ - "url" + "name" ], "properties": { + "name": { + "type": "string" + }, "description": { "type": "string" }, - "url": { - "type": "string", - "format": "uri" + "externalDocs": { + "$ref": "#/definitions/externalDocs" } }, "patternProperties": { @@ -344,19 +282,13 @@ } } }, - "channels": { - "type": "object", - "propertyNames": { - "type": "string", - "format": "uri-template", - "minLength": 1 - }, - "additionalProperties": { - "$ref": "#/definitions/channelItem" - } - }, - "channelItem": { + "server": { "type": "object", + "description": "An object representing a Server.", + "required": [ + "url", + "protocol" + ], "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { @@ -364,40 +296,42 @@ } }, "properties": { - "$ref": { - "$ref": "#/definitions/ReferenceObject" - }, - "parameters": { - "$ref": "#/definitions/parameters" + "url": { + "type": "string" }, "description": { - "type": "string", - "description": "A description of the channel." + "type": "string" }, - "servers": { - "type": "array", - "description": "The names of the servers on which this channel is available. If absent or empty then this channel must be available on all servers.", - "items": { - "type": "string" - }, - "uniqueItems": true + "protocol": { + "type": "string", + "description": "The transfer protocol." }, - "publish": { - "$ref": "#/definitions/operation" + "protocolVersion": { + "type": "string" }, - "subscribe": { - "$ref": "#/definitions/operation" + "variables": { + "$ref": "#/definitions/serverVariables" }, - "deprecated": { - "type": "boolean", - "default": false + "security": { + "type": "array", + "items": { + "$ref": "#/definitions/SecurityRequirement" + } }, "bindings": { "$ref": "#/definitions/bindingsObject" + }, + "tags": { + "type": "array", + "items": { + "$ref": "#/definitions/tag" + }, + "uniqueItems": true } } }, - "parameters": { + "servers": { + "description": "An object representing multiple servers.", "type": "object", "additionalProperties": { "oneOf": [ @@ -405,129 +339,10 @@ "$ref": "#/definitions/Reference" }, { - "$ref": "#/definitions/parameter" + "$ref": "#/definitions/server" } ] - }, - "description": "JSON objects describing re-usable channel parameters." - }, - "parameter": { - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "properties": { - "description": { - "type": "string", - "description": "A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed." - }, - "schema": { - "$ref": "#/definitions/schema" - }, - "location": { - "type": "string", - "description": "A runtime expression that specifies the location of the parameter value", - "pattern": "^\\$message\\.(header|payload)#(\\/(([^\\/~])|(~[01]))*)*" - } - } - }, - "schema": { - "allOf": [ - { - "$ref": "#/definitions/json-schema-draft-07-schema" - }, - { - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "properties": { - "additionalProperties": { - "anyOf": [ - { - "$ref": "#/definitions/schema" - }, - { - "type": "boolean" - } - ], - "default": {} - }, - "items": { - "anyOf": [ - { - "$ref": "#/definitions/schema" - }, - { - "type": "array", - "minItems": 1, - "items": { - "$ref": "#/definitions/schema" - } - } - ], - "default": {} - }, - "allOf": { - "type": "array", - "minItems": 1, - "items": { - "$ref": "#/definitions/schema" - } - }, - "oneOf": { - "type": "array", - "minItems": 1, - "items": { - "$ref": "#/definitions/schema" - } - }, - "anyOf": { - "type": "array", - "minItems": 1, - "items": { - "$ref": "#/definitions/schema" - } - }, - "not": { - "$ref": "#/definitions/schema" - }, - "properties": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/schema" - }, - "default": {} - }, - "patternProperties": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/schema" - }, - "default": {} - }, - "propertyNames": { - "$ref": "#/definitions/schema" - }, - "contains": { - "$ref": "#/definitions/schema" - }, - "discriminator": { - "type": "string" - }, - "externalDocs": { - "$ref": "#/definitions/externalDocs" - }, - "deprecated": { - "type": "boolean", - "default": false - } - } - } - ] + } }, "json-schema-draft-07-schema": { "title": "Core schema meta-schema", @@ -772,8 +587,103 @@ }, "default": true }, - "operation": { - "type": "object", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/json-schema-draft-07-schema" + }, + { + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, + "properties": { + "additionalProperties": { + "anyOf": [ + { + "$ref": "#/definitions/schema" + }, + { + "type": "boolean" + } + ], + "default": {} + }, + "items": { + "anyOf": [ + { + "$ref": "#/definitions/schema" + }, + { + "type": "array", + "minItems": 1, + "items": { + "$ref": "#/definitions/schema" + } + } + ], + "default": {} + }, + "allOf": { + "type": "array", + "minItems": 1, + "items": { + "$ref": "#/definitions/schema" + } + }, + "oneOf": { + "type": "array", + "minItems": 1, + "items": { + "$ref": "#/definitions/schema" + } + }, + "anyOf": { + "type": "array", + "minItems": 1, + "items": { + "$ref": "#/definitions/schema" + } + }, + "not": { + "$ref": "#/definitions/schema" + }, + "properties": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/schema" + }, + "default": {} + }, + "patternProperties": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/schema" + }, + "default": {} + }, + "propertyNames": { + "$ref": "#/definitions/schema" + }, + "contains": { + "$ref": "#/definitions/schema" + }, + "discriminator": { + "type": "string" + }, + "externalDocs": { + "$ref": "#/definitions/externalDocs" + }, + "deprecated": { + "type": "boolean", + "default": false + } + } + } + ] + }, + "parameter": { "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { @@ -781,31 +691,49 @@ } }, "properties": { - "traits": { - "type": "array", - "items": { - "oneOf": [ - { - "$ref": "#/definitions/Reference" - }, - { - "$ref": "#/definitions/operationTrait" - } - ] - } + "description": { + "type": "string", + "description": "A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed." + }, + "schema": { + "$ref": "#/definitions/schema" }, + "location": { + "type": "string", + "description": "A runtime expression that specifies the location of the parameter value", + "pattern": "^\\$message\\.(header|payload)#(\\/(([^\\/~])|(~[01]))*)*" + } + } + }, + "parameters": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/parameter" + } + ] + }, + "description": "JSON objects describing re-usable channel parameters." + }, + "operationTrait": { + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, + "properties": { "summary": { "type": "string" }, "description": { "type": "string" }, - "security": { - "type": "array", - "items": { - "$ref": "#/definitions/SecurityRequirement" - } - }, "tags": { "type": "array", "items": { @@ -819,15 +747,41 @@ "operationId": { "type": "string" }, + "security": { + "type": "array", + "items": { + "$ref": "#/definitions/SecurityRequirement" + } + }, "bindings": { "$ref": "#/definitions/bindingsObject" + } + } + }, + "correlationId": { + "type": "object", + "required": [ + "location" + ], + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, + "properties": { + "description": { + "type": "string", + "description": "A optional description of the correlation ID. GitHub Flavored Markdown is allowed." }, - "message": { - "$ref": "#/definitions/message" + "location": { + "type": "string", + "description": "A runtime expression that specifies the location of the correlation ID", + "pattern": "^\\$message\\.(header|payload)#(\\/(([^\\/~])|(~[01]))*)*" } } }, - "operationTrait": { + "messageTrait": { "type": "object", "additionalProperties": false, "patternProperties": { @@ -836,12 +790,39 @@ } }, "properties": { - "summary": { + "schemaFormat": { "type": "string" }, - "description": { + "contentType": { + "type": "string" + }, + "headers": { + "allOf": [ + { + "$ref": "#/definitions/schema" + }, + { + "properties": { + "type": { + "const": "object" + } + } + } + ] + }, + "messageId": { "type": "string" }, + "correlationId": { + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/correlationId" + } + ] + }, "tags": { "type": "array", "items": { @@ -849,16 +830,33 @@ }, "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." + }, "externalDocs": { "$ref": "#/definitions/externalDocs" }, - "operationId": { - "type": "string" + "deprecated": { + "type": "boolean", + "default": false }, - "security": { + "examples": { "type": "array", "items": { - "$ref": "#/definitions/SecurityRequirement" + "type": "object" } }, "bindings": { @@ -866,442 +864,62 @@ } } }, - "message": { - "oneOf": [ - { - "$ref": "#/definitions/Reference" + "openapiSchema_3_0": { + "type": "object", + "definitions": { + "ExternalDocumentation": { + "type": "object", + "required": [ + "url" + ], + "properties": { + "description": { + "type": "string" + }, + "url": { + "type": "string", + "format": "uri-reference" + } + }, + "patternProperties": { + "^x-": {} + }, + "additionalProperties": false }, - { - "oneOf": [ - { + "Discriminator": { + "type": "object", + "required": [ + "propertyName" + ], + "properties": { + "propertyName": { + "type": "string" + }, + "mapping": { "type": "object", - "required": [ - "oneOf" - ], - "additionalProperties": false, - "properties": { - "oneOf": { - "type": "array", - "items": { - "$ref": "#/definitions/message" - } - } + "additionalProperties": { + "type": "string" } - }, - { - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "properties": { - "schemaFormat": { - "type": "string" - }, - "contentType": { - "type": "string" - }, - "headers": { - "allOf": [ - { - "$ref": "#/definitions/schema" - }, - { - "properties": { - "type": { - "const": "object" - } - } - } - ] - }, - "messageId": { - "type": "string" - }, - "payload": {}, - "correlationId": { - "oneOf": [ - { - "$ref": "#/definitions/Reference" - }, - { - "$ref": "#/definitions/correlationId" - } - ] - }, - "tags": { - "type": "array", - "items": { - "$ref": "#/definitions/tag" - }, - "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." - }, - "externalDocs": { - "$ref": "#/definitions/externalDocs" - }, - "deprecated": { - "type": "boolean", - "default": false - }, - "examples": { - "type": "array", - "items": { - "type": "object", - "additionalProperties": false, - "anyOf": [ - { - "required": [ - "payload" - ] - }, - { - "required": [ - "headers" - ] - } - ], - "properties": { - "name": { - "type": "string", - "description": "Machine readable name of the message example." - }, - "summary": { - "type": "string", - "description": "A brief summary of the message example." - }, - "headers": { - "type": "object" - }, - "payload": {} - } - } - }, - "bindings": { - "$ref": "#/definitions/bindingsObject" - }, - "traits": { - "type": "array", - "items": { - "oneOf": [ - { - "$ref": "#/definitions/Reference" - }, - { - "$ref": "#/definitions/messageTrait" - } - ] - } - } - }, - "allOf": [ - { - "if": { - "not": { - "required": [ - "schemaFormat" - ] - } - }, - "then": { - "properties": { - "payload": { - "$ref": "#/definitions/schema" - } - } - } - }, - { - "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" - ] - } - } - }, - "then": { - "properties": { - "payload": { - "$ref": "#/definitions/schema" - } - } - } - }, - { - "if": { - "required": [ - "schemaFormat" - ], - "properties": { - "schemaFormat": { - "enum": [ - "application/schema+json;version=draft-07", - "application/schema+yaml;version=draft-07" - ] - } - } - }, - "then": { - "properties": { - "payload": { - "$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": { - "payload": { - "$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": { - "payload": { - "$ref": "#/definitions/avroSchema_v1" - } - } - } - } - ] - } - ] - } - ] - }, - "correlationId": { - "type": "object", - "required": [ - "location" - ], - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "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]))*)*" - } - } - }, - "messageTrait": { - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "properties": { - "schemaFormat": { - "type": "string" - }, - "contentType": { - "type": "string" - }, - "headers": { - "allOf": [ - { - "$ref": "#/definitions/schema" - }, - { - "properties": { - "type": { - "const": "object" - } - } - } - ] - }, - "messageId": { - "type": "string" - }, - "correlationId": { - "oneOf": [ - { - "$ref": "#/definitions/Reference" - }, - { - "$ref": "#/definitions/correlationId" - } - ] - }, - "tags": { - "type": "array", - "items": { - "$ref": "#/definitions/tag" - }, - "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." - }, - "externalDocs": { - "$ref": "#/definitions/externalDocs" - }, - "deprecated": { - "type": "boolean", - "default": false - }, - "examples": { - "type": "array", - "items": { - "type": "object" - } - }, - "bindings": { - "$ref": "#/definitions/bindingsObject" - } - } - }, - "openapiSchema_3_0": { - "type": "object", - "definitions": { - "ExternalDocumentation": { - "type": "object", - "required": [ - "url" - ], - "properties": { - "description": { - "type": "string" - }, - "url": { - "type": "string", - "format": "uri-reference" - } - }, - "patternProperties": { - "^x-": {} - }, - "additionalProperties": false - }, - "Discriminator": { - "type": "object", - "required": [ - "propertyName" - ], - "properties": { - "propertyName": { - "type": "string" - }, - "mapping": { - "type": "object", - "additionalProperties": { - "type": "string" - } - } - } - }, - "Reference": { - "type": "object", - "required": [ - "$ref" - ], - "patternProperties": { - "^\\$ref$": { - "type": "string", - "format": "uri-reference" - } - } - }, - "XML": { - "type": "object", - "properties": { - "name": { - "type": "string" + } + } + }, + "Reference": { + "type": "object", + "required": [ + "$ref" + ], + "patternProperties": { + "^\\$ref$": { + "type": "string", + "format": "uri-reference" + } + } + }, + "XML": { + "type": "object", + "properties": { + "name": { + "type": "string" }, "namespace": { "type": "string", @@ -1823,33 +1441,306 @@ "size": { "type": "number" } - }, - "required": [ - "type", - "name", - "size" + }, + "required": [ + "type", + "name", + "size" + ] + }, + "name": { + "type": "string", + "pattern": "^[A-Za-z_][A-Za-z0-9_]*$" + }, + "namespace": { + "type": "string", + "pattern": "^([A-Za-z_][A-Za-z0-9_]*(\\.[A-Za-z_][A-Za-z0-9_]*)*)*$" + } + }, + "description": "Json-Schema definition for Avro AVSC files.", + "oneOf": [ + { + "$ref": "#/definitions/avroSchema_v1/definitions/avroSchema" + } + ], + "title": "Avro Schema Definition" + }, + "message": { + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "oneOf": [ + { + "type": "object", + "required": [ + "oneOf" + ], + "additionalProperties": false, + "properties": { + "oneOf": { + "type": "array", + "items": { + "$ref": "#/definitions/message" + } + } + } + }, + { + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, + "properties": { + "schemaFormat": { + "type": "string" + }, + "contentType": { + "type": "string" + }, + "headers": { + "allOf": [ + { + "$ref": "#/definitions/schema" + }, + { + "properties": { + "type": { + "const": "object" + } + } + } + ] + }, + "messageId": { + "type": "string" + }, + "payload": {}, + "correlationId": { + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/correlationId" + } + ] + }, + "tags": { + "type": "array", + "items": { + "$ref": "#/definitions/tag" + }, + "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." + }, + "externalDocs": { + "$ref": "#/definitions/externalDocs" + }, + "deprecated": { + "type": "boolean", + "default": false + }, + "examples": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "anyOf": [ + { + "required": [ + "payload" + ] + }, + { + "required": [ + "headers" + ] + } + ], + "properties": { + "name": { + "type": "string", + "description": "Machine readable name of the message example." + }, + "summary": { + "type": "string", + "description": "A brief summary of the message example." + }, + "headers": { + "type": "object" + }, + "payload": {} + } + } + }, + "bindings": { + "$ref": "#/definitions/bindingsObject" + }, + "traits": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/messageTrait" + } + ] + } + } + }, + "allOf": [ + { + "if": { + "not": { + "required": [ + "schemaFormat" + ] + } + }, + "then": { + "properties": { + "payload": { + "$ref": "#/definitions/schema" + } + } + } + }, + { + "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" + ] + } + } + }, + "then": { + "properties": { + "payload": { + "$ref": "#/definitions/schema" + } + } + } + }, + { + "if": { + "required": [ + "schemaFormat" + ], + "properties": { + "schemaFormat": { + "enum": [ + "application/schema+json;version=draft-07", + "application/schema+yaml;version=draft-07" + ] + } + } + }, + "then": { + "properties": { + "payload": { + "$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": { + "payload": { + "$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": { + "payload": { + "$ref": "#/definitions/avroSchema_v1" + } + } + } + } + ] + } ] - }, - "name": { - "type": "string", - "pattern": "^[A-Za-z_][A-Za-z0-9_]*$" - }, - "namespace": { - "type": "string", - "pattern": "^([A-Za-z_][A-Za-z0-9_]*(\\.[A-Za-z_][A-Za-z0-9_]*)*)*$" - } - }, - "description": "Json-Schema definition for Avro AVSC files.", - "oneOf": [ - { - "$ref": "#/definitions/avroSchema_v1/definitions/avroSchema" } - ], - "title": "Avro Schema Definition" + ] }, - "components": { + "operation": { "type": "object", - "description": "An object to hold a set of reusable objects for different aspects of the AsyncAPI Specification.", "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { @@ -1857,136 +1748,118 @@ } }, "properties": { - "schemas": { - "$ref": "#/definitions/schemas" - }, - "servers": { - "$ref": "#/definitions/servers" - }, - "channels": { - "$ref": "#/definitions/channels" - }, - "serverVariables": { - "$ref": "#/definitions/serverVariables" - }, - "messages": { - "$ref": "#/definitions/messages" - }, - "securitySchemes": { - "type": "object", - "patternProperties": { - "^[\\w\\d\\.\\-_]+$": { - "oneOf": [ - { - "$ref": "#/definitions/Reference" - }, - { - "$ref": "#/definitions/SecurityScheme" - } - ] - } + "traits": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/operationTrait" + } + ] } }, - "parameters": { - "$ref": "#/definitions/parameters" + "summary": { + "type": "string" }, - "correlationIds": { - "type": "object", - "patternProperties": { - "^[\\w\\d\\.\\-_]+$": { - "oneOf": [ - { - "$ref": "#/definitions/Reference" - }, - { - "$ref": "#/definitions/correlationId" - } - ] - } - } + "description": { + "type": "string" }, - "operationTraits": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/operationTrait" + "security": { + "type": "array", + "items": { + "$ref": "#/definitions/SecurityRequirement" } }, - "messageTraits": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/messageTrait" - } + "tags": { + "type": "array", + "items": { + "$ref": "#/definitions/tag" + }, + "uniqueItems": true }, - "serverBindings": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/bindingsObject" - } + "externalDocs": { + "$ref": "#/definitions/externalDocs" }, - "channelBindings": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/bindingsObject" - } + "operationId": { + "type": "string" }, - "operationBindings": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/bindingsObject" - } + "bindings": { + "$ref": "#/definitions/bindingsObject" }, - "messageBindings": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/bindingsObject" - } + "message": { + "$ref": "#/definitions/message" } } }, - "schemas": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/schema" - }, - "description": "JSON objects describing schemas the API uses." - }, - "messages": { + "channelItem": { "type": "object", - "additionalProperties": { - "$ref": "#/definitions/message" + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } }, - "description": "JSON objects describing the messages being consumed and produced by the API." - }, - "SecurityScheme": { - "oneOf": [ - { - "$ref": "#/definitions/userPassword" - }, - { - "$ref": "#/definitions/apiKey" + "properties": { + "$ref": { + "$ref": "#/definitions/ReferenceObject" }, - { - "$ref": "#/definitions/X509" + "parameters": { + "$ref": "#/definitions/parameters" }, - { - "$ref": "#/definitions/symmetricEncryption" + "description": { + "type": "string", + "description": "A description of the channel." }, - { - "$ref": "#/definitions/asymmetricEncryption" + "servers": { + "type": "array", + "description": "The names of the servers on which this channel is available. If absent or empty then this channel must be available on all servers.", + "items": { + "type": "string" + }, + "uniqueItems": true }, - { - "$ref": "#/definitions/HTTPSecurityScheme" + "publish": { + "$ref": "#/definitions/operation" }, - { - "$ref": "#/definitions/oauth2Flows" + "subscribe": { + "$ref": "#/definitions/operation" }, - { - "$ref": "#/definitions/openIdConnect" + "deprecated": { + "type": "boolean", + "default": false }, - { - "$ref": "#/definitions/SaslSecurityScheme" + "bindings": { + "$ref": "#/definitions/bindingsObject" } - ] + } + }, + "channels": { + "type": "object", + "propertyNames": { + "type": "string", + "format": "uri-template", + "minLength": 1 + }, + "additionalProperties": { + "$ref": "#/definitions/channelItem" + } + }, + "schemas": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/schema" + }, + "description": "JSON objects describing schemas the API uses." + }, + "messages": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/message" + }, + "description": "JSON objects describing the messages being consumed and produced by the API." }, "userPassword": { "type": "object", @@ -2111,19 +1984,6 @@ }, "additionalProperties": false }, - "HTTPSecurityScheme": { - "oneOf": [ - { - "$ref": "#/definitions/NonBearerHTTPSecurityScheme" - }, - { - "$ref": "#/definitions/BearerHTTPSecurityScheme" - }, - { - "$ref": "#/definitions/APIKeyHTTPSecurityScheme" - } - ] - }, "NonBearerHTTPSecurityScheme": { "not": { "type": "object", @@ -2231,6 +2091,51 @@ }, "additionalProperties": false }, + "HTTPSecurityScheme": { + "oneOf": [ + { + "$ref": "#/definitions/NonBearerHTTPSecurityScheme" + }, + { + "$ref": "#/definitions/BearerHTTPSecurityScheme" + }, + { + "$ref": "#/definitions/APIKeyHTTPSecurityScheme" + } + ] + }, + "oauth2Scopes": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "oauth2Flow": { + "type": "object", + "properties": { + "authorizationUrl": { + "type": "string", + "format": "uri" + }, + "tokenUrl": { + "type": "string", + "format": "uri" + }, + "refreshUrl": { + "type": "string", + "format": "uri" + }, + "scopes": { + "$ref": "#/definitions/oauth2Scopes" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, + "additionalProperties": false + }, "oauth2Flows": { "type": "object", "required": [ @@ -2334,38 +2239,6 @@ } } }, - "oauth2Flow": { - "type": "object", - "properties": { - "authorizationUrl": { - "type": "string", - "format": "uri" - }, - "tokenUrl": { - "type": "string", - "format": "uri" - }, - "refreshUrl": { - "type": "string", - "format": "uri" - }, - "scopes": { - "$ref": "#/definitions/oauth2Scopes" - } - }, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "additionalProperties": false - }, - "oauth2Scopes": { - "type": "object", - "additionalProperties": { - "type": "string" - } - }, "openIdConnect": { "type": "object", "required": [ @@ -2394,19 +2267,6 @@ }, "additionalProperties": false }, - "SaslSecurityScheme": { - "oneOf": [ - { - "$ref": "#/definitions/SaslPlainSecurityScheme" - }, - { - "$ref": "#/definitions/SaslScramSecurityScheme" - }, - { - "$ref": "#/definitions/SaslGssapiSecurityScheme" - } - ] - }, "SaslPlainSecurityScheme": { "type": "object", "required": [ @@ -2476,6 +2336,146 @@ } }, "additionalProperties": false + }, + "SaslSecurityScheme": { + "oneOf": [ + { + "$ref": "#/definitions/SaslPlainSecurityScheme" + }, + { + "$ref": "#/definitions/SaslScramSecurityScheme" + }, + { + "$ref": "#/definitions/SaslGssapiSecurityScheme" + } + ] + }, + "SecurityScheme": { + "oneOf": [ + { + "$ref": "#/definitions/userPassword" + }, + { + "$ref": "#/definitions/apiKey" + }, + { + "$ref": "#/definitions/X509" + }, + { + "$ref": "#/definitions/symmetricEncryption" + }, + { + "$ref": "#/definitions/asymmetricEncryption" + }, + { + "$ref": "#/definitions/HTTPSecurityScheme" + }, + { + "$ref": "#/definitions/oauth2Flows" + }, + { + "$ref": "#/definitions/openIdConnect" + }, + { + "$ref": "#/definitions/SaslSecurityScheme" + } + ] + }, + "components": { + "type": "object", + "description": "An object to hold a set of reusable objects for different aspects of the AsyncAPI Specification.", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, + "properties": { + "schemas": { + "$ref": "#/definitions/schemas" + }, + "servers": { + "$ref": "#/definitions/servers" + }, + "channels": { + "$ref": "#/definitions/channels" + }, + "serverVariables": { + "$ref": "#/definitions/serverVariables" + }, + "messages": { + "$ref": "#/definitions/messages" + }, + "securitySchemes": { + "type": "object", + "patternProperties": { + "^[\\w\\d\\.\\-_]+$": { + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/SecurityScheme" + } + ] + } + } + }, + "parameters": { + "$ref": "#/definitions/parameters" + }, + "correlationIds": { + "type": "object", + "patternProperties": { + "^[\\w\\d\\.\\-_]+$": { + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/correlationId" + } + ] + } + } + }, + "operationTraits": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/operationTrait" + } + }, + "messageTraits": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/messageTrait" + } + }, + "serverBindings": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/bindingsObject" + } + }, + "channelBindings": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/bindingsObject" + } + }, + "operationBindings": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/bindingsObject" + } + }, + "messageBindings": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/bindingsObject" + } + } + } } }, "description": "!!Auto generated!! \n Do not manually edit. " diff --git a/schemas/2.5.0.json b/schemas/2.5.0.json index 26d872e8..ca8111c9 100644 --- a/schemas/2.5.0.json +++ b/schemas/2.5.0.json @@ -1,6 +1,5 @@ { - "$id": "http://asyncapi.com/definitions/2.5.0/asyncapi.json", - "$schema": "http://json-schema.org/draft-07/schema", + "$schema": "http://json-schema.org/draft-07/schema#", "title": "AsyncAPI 2.5.0 schema.", "type": "object", "required": [ @@ -54,54 +53,14 @@ } }, "definitions": { - "http://asyncapi.com/definitions/2.5.0/specificationExtension.json": { - "$id": "http://asyncapi.com/definitions/2.5.0/specificationExtension.json", + "specificationExtension.json": { + "$id": "specificationExtension.json", "description": "Any property starting with x- is valid.", "additionalProperties": true, "additionalItems": true }, - "http://asyncapi.com/definitions/2.5.0/info.json": { - "$id": "http://asyncapi.com/definitions/2.5.0/info.json", - "type": "object", - "description": "General information about the API.", - "required": [ - "version", - "title" - ], - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "http://asyncapi.com/definitions/2.5.0/specificationExtension.json" - } - }, - "properties": { - "title": { - "type": "string", - "description": "A unique and precise title of the API." - }, - "version": { - "type": "string", - "description": "A semantic version number of the API." - }, - "description": { - "type": "string", - "description": "A longer description of the API. Should be different from the title. CommonMark is allowed." - }, - "termsOfService": { - "type": "string", - "description": "A URL to the Terms of Service for the API. MUST be in the format of a URL.", - "format": "uri" - }, - "contact": { - "$ref": "http://asyncapi.com/definitions/2.5.0/contact.json" - }, - "license": { - "$ref": "http://asyncapi.com/definitions/2.5.0/license.json" - } - } - }, - "http://asyncapi.com/definitions/2.5.0/contact.json": { - "$id": "http://asyncapi.com/definitions/2.5.0/contact.json", + "contact.json": { + "$id": "contact.json", "type": "object", "description": "Contact information for the owners of the API.", "additionalProperties": false, @@ -127,8 +86,8 @@ } } }, - "http://asyncapi.com/definitions/2.5.0/license.json": { - "$id": "http://asyncapi.com/definitions/2.5.0/license.json", + "license.json": { + "$id": "license.json", "type": "object", "required": [ "name" @@ -151,45 +110,13 @@ } } }, - "http://asyncapi.com/definitions/2.5.0/servers.json": { - "$id": "http://asyncapi.com/definitions/2.5.0/servers.json", - "description": "An object representing multiple servers.", - "type": "object", - "additionalProperties": { - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/2.5.0/Reference.json" - }, - { - "$ref": "http://asyncapi.com/definitions/2.5.0/server.json" - } - ] - } - }, - "http://asyncapi.com/definitions/2.5.0/Reference.json": { - "$id": "http://asyncapi.com/definitions/2.5.0/Reference.json", - "type": "object", - "required": [ - "$ref" - ], - "properties": { - "$ref": { - "$ref": "http://asyncapi.com/definitions/2.5.0/ReferenceObject.json" - } - } - }, - "http://asyncapi.com/definitions/2.5.0/ReferenceObject.json": { - "$id": "http://asyncapi.com/definitions/2.5.0/ReferenceObject.json", - "type": "string", - "format": "uri-reference" - }, - "http://asyncapi.com/definitions/2.5.0/server.json": { - "$id": "http://asyncapi.com/definitions/2.5.0/server.json", + "info.json": { + "$id": "info.json", "type": "object", - "description": "An object representing a Server.", + "description": "General information about the API.", "required": [ - "url", - "protocol" + "version", + "title" ], "additionalProperties": false, "patternProperties": { @@ -198,56 +125,50 @@ } }, "properties": { - "url": { - "type": "string" - }, - "description": { - "type": "string" - }, - "protocol": { + "title": { "type": "string", - "description": "The transfer protocol." + "description": "A unique and precise title of the API." }, - "protocolVersion": { - "type": "string" + "version": { + "type": "string", + "description": "A semantic version number of the API." }, - "variables": { - "$ref": "http://asyncapi.com/definitions/2.5.0/serverVariables.json" + "description": { + "type": "string", + "description": "A longer description of the API. Should be different from the title. CommonMark is allowed." }, - "security": { - "type": "array", - "items": { - "$ref": "http://asyncapi.com/definitions/2.5.0/SecurityRequirement.json" - } + "termsOfService": { + "type": "string", + "description": "A URL to the Terms of Service for the API. MUST be in the format of a URL.", + "format": "uri" }, - "bindings": { - "$ref": "http://asyncapi.com/definitions/2.5.0/bindingsObject.json" + "contact": { + "$ref": "http://asyncapi.com/definitions/2.5.0/contact.json" }, - "tags": { - "type": "array", - "items": { - "$ref": "http://asyncapi.com/definitions/2.5.0/tag.json" - }, - "uniqueItems": true + "license": { + "$ref": "http://asyncapi.com/definitions/2.5.0/license.json" } } }, - "http://asyncapi.com/definitions/2.5.0/serverVariables.json": { - "$id": "http://asyncapi.com/definitions/2.5.0/serverVariables.json", + "ReferenceObject.json": { + "$id": "ReferenceObject.json", + "type": "string", + "format": "uri-reference" + }, + "Reference.json": { + "$id": "Reference.json", "type": "object", - "additionalProperties": { - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/2.5.0/Reference.json" - }, - { - "$ref": "http://asyncapi.com/definitions/2.5.0/serverVariable.json" - } - ] + "required": [ + "$ref" + ], + "properties": { + "$ref": { + "$ref": "http://asyncapi.com/definitions/2.5.0/ReferenceObject.json" + } } }, - "http://asyncapi.com/definitions/2.5.0/serverVariable.json": { - "$id": "http://asyncapi.com/definitions/2.5.0/serverVariable.json", + "serverVariable.json": { + "$id": "serverVariable.json", "type": "object", "description": "An object representing a Server Variable for server URL template substitution.", "additionalProperties": false, @@ -278,8 +199,22 @@ } } }, - "http://asyncapi.com/definitions/2.5.0/SecurityRequirement.json": { - "$id": "http://asyncapi.com/definitions/2.5.0/SecurityRequirement.json", + "serverVariables.json": { + "$id": "serverVariables.json", + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.5.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.5.0/serverVariable.json" + } + ] + } + }, + "SecurityRequirement.json": { + "$id": "SecurityRequirement.json", "type": "object", "additionalProperties": { "type": "array", @@ -289,8 +224,8 @@ "uniqueItems": true } }, - "http://asyncapi.com/definitions/2.5.0/bindingsObject.json": { - "$id": "http://asyncapi.com/definitions/2.5.0/bindingsObject.json", + "bindingsObject.json": { + "$id": "bindingsObject.json", "type": "object", "additionalProperties": true, "properties": { @@ -312,22 +247,21 @@ "solace": {} } }, - "http://asyncapi.com/definitions/2.5.0/tag.json": { - "$id": "http://asyncapi.com/definitions/2.5.0/tag.json", + "externalDocs.json": { + "$id": "externalDocs.json", "type": "object", "additionalProperties": false, + "description": "information about external documentation", "required": [ - "name" + "url" ], "properties": { - "name": { - "type": "string" - }, "description": { "type": "string" }, - "externalDocs": { - "$ref": "http://asyncapi.com/definitions/2.5.0/externalDocs.json" + "url": { + "type": "string", + "format": "uri" } }, "patternProperties": { @@ -336,21 +270,22 @@ } } }, - "http://asyncapi.com/definitions/2.5.0/externalDocs.json": { - "$id": "http://asyncapi.com/definitions/2.5.0/externalDocs.json", + "tag.json": { + "$id": "tag.json", "type": "object", "additionalProperties": false, - "description": "information about external documentation", "required": [ - "url" + "name" ], "properties": { + "name": { + "type": "string" + }, "description": { "type": "string" }, - "url": { - "type": "string", - "format": "uri" + "externalDocs": { + "$ref": "http://asyncapi.com/definitions/2.5.0/externalDocs.json" } }, "patternProperties": { @@ -359,21 +294,14 @@ } } }, - "http://asyncapi.com/definitions/2.5.0/channels.json": { - "$id": "http://asyncapi.com/definitions/2.5.0/channels.json", - "type": "object", - "propertyNames": { - "type": "string", - "format": "uri-template", - "minLength": 1 - }, - "additionalProperties": { - "$ref": "http://asyncapi.com/definitions/2.5.0/channelItem.json" - } - }, - "http://asyncapi.com/definitions/2.5.0/channelItem.json": { - "$id": "http://asyncapi.com/definitions/2.5.0/channelItem.json", + "server.json": { + "$id": "server.json", "type": "object", + "description": "An object representing a Server.", + "required": [ + "url", + "protocol" + ], "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { @@ -381,41 +309,43 @@ } }, "properties": { - "$ref": { - "$ref": "http://asyncapi.com/definitions/2.5.0/ReferenceObject.json" - }, - "parameters": { - "$ref": "http://asyncapi.com/definitions/2.5.0/parameters.json" + "url": { + "type": "string" }, "description": { - "type": "string", - "description": "A description of the channel." + "type": "string" }, - "servers": { - "type": "array", - "description": "The names of the servers on which this channel is available. If absent or empty then this channel must be available on all servers.", - "items": { - "type": "string" - }, - "uniqueItems": true + "protocol": { + "type": "string", + "description": "The transfer protocol." }, - "publish": { - "$ref": "http://asyncapi.com/definitions/2.5.0/operation.json" + "protocolVersion": { + "type": "string" }, - "subscribe": { - "$ref": "http://asyncapi.com/definitions/2.5.0/operation.json" + "variables": { + "$ref": "http://asyncapi.com/definitions/2.5.0/serverVariables.json" }, - "deprecated": { - "type": "boolean", - "default": false + "security": { + "type": "array", + "items": { + "$ref": "http://asyncapi.com/definitions/2.5.0/SecurityRequirement.json" + } }, "bindings": { "$ref": "http://asyncapi.com/definitions/2.5.0/bindingsObject.json" + }, + "tags": { + "type": "array", + "items": { + "$ref": "http://asyncapi.com/definitions/2.5.0/tag.json" + }, + "uniqueItems": true } } }, - "http://asyncapi.com/definitions/2.5.0/parameters.json": { - "$id": "http://asyncapi.com/definitions/2.5.0/parameters.json", + "servers.json": { + "$id": "servers.json", + "description": "An object representing multiple servers.", "type": "object", "additionalProperties": { "oneOf": [ @@ -423,146 +353,25 @@ "$ref": "http://asyncapi.com/definitions/2.5.0/Reference.json" }, { - "$ref": "http://asyncapi.com/definitions/2.5.0/parameter.json" + "$ref": "http://asyncapi.com/definitions/2.5.0/server.json" } ] - }, - "description": "JSON objects describing re-usable channel parameters." + } }, - "http://asyncapi.com/definitions/2.5.0/parameter.json": { - "$id": "http://asyncapi.com/definitions/2.5.0/parameter.json", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "http://asyncapi.com/definitions/2.5.0/specificationExtension.json" - } - }, - "properties": { - "description": { - "type": "string", - "description": "A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed." + "http://json-schema.org/draft-07/schema": { + "$id": "http://json-schema.org/draft-07/schema", + "title": "Core schema meta-schema", + "definitions": { + "schemaArray": { + "type": "array", + "minItems": 1, + "items": { + "$ref": "#" + } }, - "schema": { - "$ref": "http://asyncapi.com/definitions/2.5.0/schema.json" - }, - "location": { - "type": "string", - "description": "A runtime expression that specifies the location of the parameter value", - "pattern": "^\\$message\\.(header|payload)#(\\/(([^\\/~])|(~[01]))*)*" - } - } - }, - "http://asyncapi.com/definitions/2.5.0/schema.json": { - "$id": "http://asyncapi.com/definitions/2.5.0/schema.json", - "allOf": [ - { - "$ref": "http://json-schema.org/draft-07/schema#" - }, - { - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "http://asyncapi.com/definitions/2.5.0/specificationExtension.json" - } - }, - "properties": { - "additionalProperties": { - "anyOf": [ - { - "$ref": "http://asyncapi.com/definitions/2.5.0/schema.json" - }, - { - "type": "boolean" - } - ], - "default": {} - }, - "items": { - "anyOf": [ - { - "$ref": "http://asyncapi.com/definitions/2.5.0/schema.json" - }, - { - "type": "array", - "minItems": 1, - "items": { - "$ref": "http://asyncapi.com/definitions/2.5.0/schema.json" - } - } - ], - "default": {} - }, - "allOf": { - "type": "array", - "minItems": 1, - "items": { - "$ref": "http://asyncapi.com/definitions/2.5.0/schema.json" - } - }, - "oneOf": { - "type": "array", - "minItems": 1, - "items": { - "$ref": "http://asyncapi.com/definitions/2.5.0/schema.json" - } - }, - "anyOf": { - "type": "array", - "minItems": 1, - "items": { - "$ref": "http://asyncapi.com/definitions/2.5.0/schema.json" - } - }, - "not": { - "$ref": "http://asyncapi.com/definitions/2.5.0/schema.json" - }, - "properties": { - "type": "object", - "additionalProperties": { - "$ref": "http://asyncapi.com/definitions/2.5.0/schema.json" - }, - "default": {} - }, - "patternProperties": { - "type": "object", - "additionalProperties": { - "$ref": "http://asyncapi.com/definitions/2.5.0/schema.json" - }, - "default": {} - }, - "propertyNames": { - "$ref": "http://asyncapi.com/definitions/2.5.0/schema.json" - }, - "contains": { - "$ref": "http://asyncapi.com/definitions/2.5.0/schema.json" - }, - "discriminator": { - "type": "string" - }, - "externalDocs": { - "$ref": "http://asyncapi.com/definitions/2.5.0/externalDocs.json" - }, - "deprecated": { - "type": "boolean", - "default": false - } - } - } - ] - }, - "http://json-schema.org/draft-07/schema": { - "$id": "http://json-schema.org/draft-07/schema", - "title": "Core schema meta-schema", - "definitions": { - "schemaArray": { - "type": "array", - "minItems": 1, - "items": { - "$ref": "#" - } - }, - "nonNegativeInteger": { - "type": "integer", - "minimum": 0 + "nonNegativeInteger": { + "type": "integer", + "minimum": 0 }, "nonNegativeIntegerDefault0": { "allOf": [ @@ -793,9 +602,105 @@ }, "default": true }, - "http://asyncapi.com/definitions/2.5.0/operation.json": { - "$id": "http://asyncapi.com/definitions/2.5.0/operation.json", - "type": "object", + "schema.json": { + "$id": "schema.json", + "allOf": [ + { + "$ref": "http://json-schema.org/draft-07/schema#" + }, + { + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.5.0/specificationExtension.json" + } + }, + "properties": { + "additionalProperties": { + "anyOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.5.0/schema.json" + }, + { + "type": "boolean" + } + ], + "default": {} + }, + "items": { + "anyOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.5.0/schema.json" + }, + { + "type": "array", + "minItems": 1, + "items": { + "$ref": "http://asyncapi.com/definitions/2.5.0/schema.json" + } + } + ], + "default": {} + }, + "allOf": { + "type": "array", + "minItems": 1, + "items": { + "$ref": "http://asyncapi.com/definitions/2.5.0/schema.json" + } + }, + "oneOf": { + "type": "array", + "minItems": 1, + "items": { + "$ref": "http://asyncapi.com/definitions/2.5.0/schema.json" + } + }, + "anyOf": { + "type": "array", + "minItems": 1, + "items": { + "$ref": "http://asyncapi.com/definitions/2.5.0/schema.json" + } + }, + "not": { + "$ref": "http://asyncapi.com/definitions/2.5.0/schema.json" + }, + "properties": { + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/2.5.0/schema.json" + }, + "default": {} + }, + "patternProperties": { + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/2.5.0/schema.json" + }, + "default": {} + }, + "propertyNames": { + "$ref": "http://asyncapi.com/definitions/2.5.0/schema.json" + }, + "contains": { + "$ref": "http://asyncapi.com/definitions/2.5.0/schema.json" + }, + "discriminator": { + "type": "string" + }, + "externalDocs": { + "$ref": "http://asyncapi.com/definitions/2.5.0/externalDocs.json" + }, + "deprecated": { + "type": "boolean", + "default": false + } + } + } + ] + }, + "parameter.json": { + "$id": "parameter.json", "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { @@ -803,54 +708,37 @@ } }, "properties": { - "traits": { - "type": "array", - "items": { - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/2.5.0/Reference.json" - }, - { - "$ref": "http://asyncapi.com/definitions/2.5.0/operationTrait.json" - } - ] - } - }, - "summary": { - "type": "string" - }, "description": { - "type": "string" + "type": "string", + "description": "A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed." }, - "security": { - "type": "array", - "items": { - "$ref": "http://asyncapi.com/definitions/2.5.0/SecurityRequirement.json" - } + "schema": { + "$ref": "http://asyncapi.com/definitions/2.5.0/schema.json" }, - "tags": { - "type": "array", - "items": { - "$ref": "http://asyncapi.com/definitions/2.5.0/tag.json" + "location": { + "type": "string", + "description": "A runtime expression that specifies the location of the parameter value", + "pattern": "^\\$message\\.(header|payload)#(\\/(([^\\/~])|(~[01]))*)*" + } + } + }, + "parameters.json": { + "$id": "parameters.json", + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.5.0/Reference.json" }, - "uniqueItems": true - }, - "externalDocs": { - "$ref": "http://asyncapi.com/definitions/2.5.0/externalDocs.json" - }, - "operationId": { - "type": "string" - }, - "bindings": { - "$ref": "http://asyncapi.com/definitions/2.5.0/bindingsObject.json" - }, - "message": { - "$ref": "http://asyncapi.com/definitions/2.5.0/message.json" - } - } + { + "$ref": "http://asyncapi.com/definitions/2.5.0/parameter.json" + } + ] + }, + "description": "JSON objects describing re-usable channel parameters." }, - "http://asyncapi.com/definitions/2.5.0/operationTrait.json": { - "$id": "http://asyncapi.com/definitions/2.5.0/operationTrait.json", + "operationTrait.json": { + "$id": "operationTrait.json", "type": "object", "additionalProperties": false, "patternProperties": { @@ -889,422 +777,147 @@ } } }, - "http://asyncapi.com/definitions/2.5.0/message.json": { - "$id": "http://asyncapi.com/definitions/2.5.0/message.json", - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/2.5.0/Reference.json" + "correlationId.json": { + "$id": "correlationId.json", + "type": "object", + "required": [ + "location" + ], + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.5.0/specificationExtension.json" + } + }, + "properties": { + "description": { + "type": "string", + "description": "A optional description of the correlation ID. GitHub Flavored Markdown is allowed." }, - { - "oneOf": [ + "location": { + "type": "string", + "description": "A runtime expression that specifies the location of the correlation ID", + "pattern": "^\\$message\\.(header|payload)#(\\/(([^\\/~])|(~[01]))*)*" + } + } + }, + "messageTrait.json": { + "$id": "messageTrait.json", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.5.0/specificationExtension.json" + } + }, + "properties": { + "schemaFormat": { + "type": "string" + }, + "contentType": { + "type": "string" + }, + "headers": { + "allOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.5.0/schema.json" + }, { - "type": "object", - "required": [ - "oneOf" - ], - "additionalProperties": false, "properties": { - "oneOf": { - "type": "array", - "items": { - "$ref": "http://asyncapi.com/definitions/2.5.0/message.json" - } + "type": { + "const": "object" } } + } + ] + }, + "messageId": { + "type": "string" + }, + "correlationId": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.5.0/Reference.json" }, { - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "http://asyncapi.com/definitions/2.5.0/specificationExtension.json" - } - }, - "properties": { - "schemaFormat": { - "type": "string" - }, - "contentType": { - "type": "string" - }, - "headers": { - "allOf": [ - { - "$ref": "http://asyncapi.com/definitions/2.5.0/schema.json" - }, - { - "properties": { - "type": { - "const": "object" - } - } - } - ] - }, - "messageId": { - "type": "string" - }, - "payload": {}, - "correlationId": { - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/2.5.0/Reference.json" - }, - { - "$ref": "http://asyncapi.com/definitions/2.5.0/correlationId.json" - } - ] - }, - "tags": { - "type": "array", - "items": { - "$ref": "http://asyncapi.com/definitions/2.5.0/tag.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." - }, - "externalDocs": { - "$ref": "http://asyncapi.com/definitions/2.5.0/externalDocs.json" - }, - "deprecated": { - "type": "boolean", - "default": false - }, - "examples": { - "type": "array", - "items": { - "type": "object", - "additionalProperties": false, - "anyOf": [ - { - "required": [ - "payload" - ] - }, - { - "required": [ - "headers" - ] - } - ], - "properties": { - "name": { - "type": "string", - "description": "Machine readable name of the message example." - }, - "summary": { - "type": "string", - "description": "A brief summary of the message example." - }, - "headers": { - "type": "object" - }, - "payload": {} - } - } - }, - "bindings": { - "$ref": "http://asyncapi.com/definitions/2.5.0/bindingsObject.json" - }, - "traits": { - "type": "array", - "items": { - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/2.5.0/Reference.json" - }, - { - "$ref": "http://asyncapi.com/definitions/2.5.0/messageTrait.json" - } - ] - } - } - }, - "allOf": [ - { - "if": { - "not": { - "required": [ - "schemaFormat" - ] - } - }, - "then": { - "properties": { - "payload": { - "$ref": "http://asyncapi.com/definitions/2.5.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" - ] - } - } - }, - "then": { - "properties": { - "payload": { - "$ref": "http://asyncapi.com/definitions/2.5.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/2.5.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/2.5.0/avroSchema_v1.json" - } - } - } - } - ] - } - ] - } - ] - }, - "http://asyncapi.com/definitions/2.5.0/correlationId.json": { - "$id": "http://asyncapi.com/definitions/2.5.0/correlationId.json", - "type": "object", - "required": [ - "location" - ], - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "http://asyncapi.com/definitions/2.5.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/2.5.0/messageTrait.json": { - "$id": "http://asyncapi.com/definitions/2.5.0/messageTrait.json", - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "http://asyncapi.com/definitions/2.5.0/specificationExtension.json" - } - }, - "properties": { - "schemaFormat": { - "type": "string" - }, - "contentType": { - "type": "string" - }, - "headers": { - "allOf": [ - { - "$ref": "http://asyncapi.com/definitions/2.5.0/schema.json" - }, - { - "properties": { - "type": { - "const": "object" - } - } - } - ] - }, - "messageId": { - "type": "string" - }, - "correlationId": { - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/2.5.0/Reference.json" - }, - { - "$ref": "http://asyncapi.com/definitions/2.5.0/correlationId.json" - } - ] - }, - "tags": { - "type": "array", - "items": { - "$ref": "http://asyncapi.com/definitions/2.5.0/tag.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." - }, - "externalDocs": { - "$ref": "http://asyncapi.com/definitions/2.5.0/externalDocs.json" - }, - "deprecated": { - "type": "boolean", - "default": false - }, - "examples": { - "type": "array", - "items": { - "type": "object" - } - }, - "bindings": { - "$ref": "http://asyncapi.com/definitions/2.5.0/bindingsObject.json" - } - } - }, - "http://asyncapi.com/definitions/2.5.0/openapiSchema_3_0.json": { - "$id": "http://asyncapi.com/definitions/2.5.0/openapiSchema_3_0.json", - "type": "object", - "definitions": { - "ExternalDocumentation": { - "type": "object", - "required": [ - "url" - ], - "properties": { - "description": { - "type": "string" - }, - "url": { - "type": "string", - "format": "uri-reference" - } - }, - "patternProperties": { - "^x-": {} - }, - "additionalProperties": false - }, - "Discriminator": { - "type": "object", - "required": [ - "propertyName" - ], - "properties": { - "propertyName": { - "type": "string" - }, - "mapping": { + "$ref": "http://asyncapi.com/definitions/2.5.0/correlationId.json" + } + ] + }, + "tags": { + "type": "array", + "items": { + "$ref": "http://asyncapi.com/definitions/2.5.0/tag.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." + }, + "externalDocs": { + "$ref": "http://asyncapi.com/definitions/2.5.0/externalDocs.json" + }, + "deprecated": { + "type": "boolean", + "default": false + }, + "examples": { + "type": "array", + "items": { + "type": "object" + } + }, + "bindings": { + "$ref": "http://asyncapi.com/definitions/2.5.0/bindingsObject.json" + } + } + }, + "openapiSchema_3_0.json": { + "$id": "openapiSchema_3_0.json", + "type": "object", + "definitions": { + "ExternalDocumentation": { + "type": "object", + "required": [ + "url" + ], + "properties": { + "description": { + "type": "string" + }, + "url": { + "type": "string", + "format": "uri-reference" + } + }, + "patternProperties": { + "^x-": {} + }, + "additionalProperties": false + }, + "Discriminator": { + "type": "object", + "required": [ + "propertyName" + ], + "properties": { + "propertyName": { + "type": "string" + }, + "mapping": { "type": "object", "additionalProperties": { "type": "string" @@ -1559,8 +1172,8 @@ }, "additionalProperties": false }, - "http://asyncapi.com/definitions/2.5.0/avroSchema_v1.json": { - "$id": "http://asyncapi.com/definitions/2.5.0/avroSchema_v1.json", + "avroSchema_v1.json": { + "$id": "avroSchema_v1.json", "definitions": { "avroSchema": { "title": "Avro Schema", @@ -1851,34 +1464,308 @@ "size": { "type": "number" } - }, - "required": [ - "type", - "name", - "size" + }, + "required": [ + "type", + "name", + "size" + ] + }, + "name": { + "type": "string", + "pattern": "^[A-Za-z_][A-Za-z0-9_]*$" + }, + "namespace": { + "type": "string", + "pattern": "^([A-Za-z_][A-Za-z0-9_]*(\\.[A-Za-z_][A-Za-z0-9_]*)*)*$" + } + }, + "description": "Json-Schema definition for Avro AVSC files.", + "oneOf": [ + { + "$ref": "#/definitions/avroSchema" + } + ], + "title": "Avro Schema Definition" + }, + "message.json": { + "$id": "message.json", + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.5.0/Reference.json" + }, + { + "oneOf": [ + { + "type": "object", + "required": [ + "oneOf" + ], + "additionalProperties": false, + "properties": { + "oneOf": { + "type": "array", + "items": { + "$ref": "http://asyncapi.com/definitions/2.5.0/message.json" + } + } + } + }, + { + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.5.0/specificationExtension.json" + } + }, + "properties": { + "schemaFormat": { + "type": "string" + }, + "contentType": { + "type": "string" + }, + "headers": { + "allOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.5.0/schema.json" + }, + { + "properties": { + "type": { + "const": "object" + } + } + } + ] + }, + "messageId": { + "type": "string" + }, + "payload": {}, + "correlationId": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.5.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.5.0/correlationId.json" + } + ] + }, + "tags": { + "type": "array", + "items": { + "$ref": "http://asyncapi.com/definitions/2.5.0/tag.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." + }, + "externalDocs": { + "$ref": "http://asyncapi.com/definitions/2.5.0/externalDocs.json" + }, + "deprecated": { + "type": "boolean", + "default": false + }, + "examples": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "anyOf": [ + { + "required": [ + "payload" + ] + }, + { + "required": [ + "headers" + ] + } + ], + "properties": { + "name": { + "type": "string", + "description": "Machine readable name of the message example." + }, + "summary": { + "type": "string", + "description": "A brief summary of the message example." + }, + "headers": { + "type": "object" + }, + "payload": {} + } + } + }, + "bindings": { + "$ref": "http://asyncapi.com/definitions/2.5.0/bindingsObject.json" + }, + "traits": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.5.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.5.0/messageTrait.json" + } + ] + } + } + }, + "allOf": [ + { + "if": { + "not": { + "required": [ + "schemaFormat" + ] + } + }, + "then": { + "properties": { + "payload": { + "$ref": "http://asyncapi.com/definitions/2.5.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" + ] + } + } + }, + "then": { + "properties": { + "payload": { + "$ref": "http://asyncapi.com/definitions/2.5.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/2.5.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/2.5.0/avroSchema_v1.json" + } + } + } + } + ] + } ] - }, - "name": { - "type": "string", - "pattern": "^[A-Za-z_][A-Za-z0-9_]*$" - }, - "namespace": { - "type": "string", - "pattern": "^([A-Za-z_][A-Za-z0-9_]*(\\.[A-Za-z_][A-Za-z0-9_]*)*)*$" - } - }, - "description": "Json-Schema definition for Avro AVSC files.", - "oneOf": [ - { - "$ref": "#/definitions/avroSchema" } - ], - "title": "Avro Schema Definition" + ] }, - "http://asyncapi.com/definitions/2.5.0/components.json": { - "$id": "http://asyncapi.com/definitions/2.5.0/components.json", + "operation.json": { + "$id": "operation.json", "type": "object", - "description": "An object to hold a set of reusable objects for different aspects of the AsyncAPI Specification.", "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { @@ -1886,142 +1773,125 @@ } }, "properties": { - "schemas": { - "$ref": "http://asyncapi.com/definitions/2.5.0/schemas.json" - }, - "servers": { - "$ref": "http://asyncapi.com/definitions/2.5.0/servers.json" - }, - "channels": { - "$ref": "http://asyncapi.com/definitions/2.5.0/channels.json" - }, - "serverVariables": { - "$ref": "http://asyncapi.com/definitions/2.5.0/serverVariables.json" - }, - "messages": { - "$ref": "http://asyncapi.com/definitions/2.5.0/messages.json" - }, - "securitySchemes": { - "type": "object", - "patternProperties": { - "^[\\w\\d\\.\\-_]+$": { - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/2.5.0/Reference.json" - }, - { - "$ref": "http://asyncapi.com/definitions/2.5.0/SecurityScheme.json" - } - ] - } + "traits": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.5.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.5.0/operationTrait.json" + } + ] } }, - "parameters": { - "$ref": "http://asyncapi.com/definitions/2.5.0/parameters.json" + "summary": { + "type": "string" }, - "correlationIds": { - "type": "object", - "patternProperties": { - "^[\\w\\d\\.\\-_]+$": { - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/2.5.0/Reference.json" - }, - { - "$ref": "http://asyncapi.com/definitions/2.5.0/correlationId.json" - } - ] - } - } + "description": { + "type": "string" }, - "operationTraits": { - "type": "object", - "additionalProperties": { - "$ref": "http://asyncapi.com/definitions/2.5.0/operationTrait.json" + "security": { + "type": "array", + "items": { + "$ref": "http://asyncapi.com/definitions/2.5.0/SecurityRequirement.json" } }, - "messageTraits": { - "type": "object", - "additionalProperties": { - "$ref": "http://asyncapi.com/definitions/2.5.0/messageTrait.json" - } + "tags": { + "type": "array", + "items": { + "$ref": "http://asyncapi.com/definitions/2.5.0/tag.json" + }, + "uniqueItems": true }, - "serverBindings": { - "type": "object", - "additionalProperties": { - "$ref": "http://asyncapi.com/definitions/2.5.0/bindingsObject.json" - } + "externalDocs": { + "$ref": "http://asyncapi.com/definitions/2.5.0/externalDocs.json" }, - "channelBindings": { - "type": "object", - "additionalProperties": { - "$ref": "http://asyncapi.com/definitions/2.5.0/bindingsObject.json" - } + "operationId": { + "type": "string" }, - "operationBindings": { - "type": "object", - "additionalProperties": { - "$ref": "http://asyncapi.com/definitions/2.5.0/bindingsObject.json" - } + "bindings": { + "$ref": "http://asyncapi.com/definitions/2.5.0/bindingsObject.json" }, - "messageBindings": { - "type": "object", - "additionalProperties": { - "$ref": "http://asyncapi.com/definitions/2.5.0/bindingsObject.json" - } + "message": { + "$ref": "http://asyncapi.com/definitions/2.5.0/message.json" } } }, - "http://asyncapi.com/definitions/2.5.0/schemas.json": { - "$id": "http://asyncapi.com/definitions/2.5.0/schemas.json", - "type": "object", - "additionalProperties": { - "$ref": "http://asyncapi.com/definitions/2.5.0/schema.json" - }, - "description": "JSON objects describing schemas the API uses." - }, - "http://asyncapi.com/definitions/2.5.0/messages.json": { - "$id": "http://asyncapi.com/definitions/2.5.0/messages.json", + "channelItem.json": { + "$id": "channelItem.json", "type": "object", - "additionalProperties": { - "$ref": "http://asyncapi.com/definitions/2.5.0/message.json" + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.5.0/specificationExtension.json" + } }, - "description": "JSON objects describing the messages being consumed and produced by the API." - }, - "http://asyncapi.com/definitions/2.5.0/SecurityScheme.json": { - "$id": "http://asyncapi.com/definitions/2.5.0/SecurityScheme.json", - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/2.5.0/userPassword.json" - }, - { - "$ref": "http://asyncapi.com/definitions/2.5.0/apiKey.json" + "properties": { + "$ref": { + "$ref": "http://asyncapi.com/definitions/2.5.0/ReferenceObject.json" }, - { - "$ref": "http://asyncapi.com/definitions/2.5.0/X509.json" + "parameters": { + "$ref": "http://asyncapi.com/definitions/2.5.0/parameters.json" }, - { - "$ref": "http://asyncapi.com/definitions/2.5.0/symmetricEncryption.json" + "description": { + "type": "string", + "description": "A description of the channel." }, - { - "$ref": "http://asyncapi.com/definitions/2.5.0/asymmetricEncryption.json" + "servers": { + "type": "array", + "description": "The names of the servers on which this channel is available. If absent or empty then this channel must be available on all servers.", + "items": { + "type": "string" + }, + "uniqueItems": true }, - { - "$ref": "http://asyncapi.com/definitions/2.5.0/HTTPSecurityScheme.json" + "publish": { + "$ref": "http://asyncapi.com/definitions/2.5.0/operation.json" }, - { - "$ref": "http://asyncapi.com/definitions/2.5.0/oauth2Flows.json" + "subscribe": { + "$ref": "http://asyncapi.com/definitions/2.5.0/operation.json" }, - { - "$ref": "http://asyncapi.com/definitions/2.5.0/openIdConnect.json" + "deprecated": { + "type": "boolean", + "default": false }, - { - "$ref": "http://asyncapi.com/definitions/2.5.0/SaslSecurityScheme.json" + "bindings": { + "$ref": "http://asyncapi.com/definitions/2.5.0/bindingsObject.json" } - ] + } }, - "http://asyncapi.com/definitions/2.5.0/userPassword.json": { - "$id": "http://asyncapi.com/definitions/2.5.0/userPassword.json", + "channels.json": { + "$id": "channels.json", + "type": "object", + "propertyNames": { + "type": "string", + "format": "uri-template", + "minLength": 1 + }, + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/2.5.0/channelItem.json" + } + }, + "schemas.json": { + "$id": "schemas.json", + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/2.5.0/schema.json" + }, + "description": "JSON objects describing schemas the API uses." + }, + "messages.json": { + "$id": "messages.json", + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/2.5.0/message.json" + }, + "description": "JSON objects describing the messages being consumed and produced by the API." + }, + "userPassword.json": { + "$id": "userPassword.json", "type": "object", "required": [ "type" @@ -2044,8 +1914,8 @@ }, "additionalProperties": false }, - "http://asyncapi.com/definitions/2.5.0/apiKey.json": { - "$id": "http://asyncapi.com/definitions/2.5.0/apiKey.json", + "apiKey.json": { + "$id": "apiKey.json", "type": "object", "required": [ "type", @@ -2076,8 +1946,8 @@ }, "additionalProperties": false }, - "http://asyncapi.com/definitions/2.5.0/X509.json": { - "$id": "http://asyncapi.com/definitions/2.5.0/X509.json", + "X509.json": { + "$id": "X509.json", "type": "object", "required": [ "type" @@ -2100,8 +1970,8 @@ }, "additionalProperties": false }, - "http://asyncapi.com/definitions/2.5.0/symmetricEncryption.json": { - "$id": "http://asyncapi.com/definitions/2.5.0/symmetricEncryption.json", + "symmetricEncryption.json": { + "$id": "symmetricEncryption.json", "type": "object", "required": [ "type" @@ -2124,8 +1994,8 @@ }, "additionalProperties": false }, - "http://asyncapi.com/definitions/2.5.0/asymmetricEncryption.json": { - "$id": "http://asyncapi.com/definitions/2.5.0/asymmetricEncryption.json", + "asymmetricEncryption.json": { + "$id": "asymmetricEncryption.json", "type": "object", "required": [ "type" @@ -2148,22 +2018,8 @@ }, "additionalProperties": false }, - "http://asyncapi.com/definitions/2.5.0/HTTPSecurityScheme.json": { - "$id": "http://asyncapi.com/definitions/2.5.0/HTTPSecurityScheme.json", - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/2.5.0/NonBearerHTTPSecurityScheme.json" - }, - { - "$ref": "http://asyncapi.com/definitions/2.5.0/BearerHTTPSecurityScheme.json" - }, - { - "$ref": "http://asyncapi.com/definitions/2.5.0/APIKeyHTTPSecurityScheme.json" - } - ] - }, - "http://asyncapi.com/definitions/2.5.0/NonBearerHTTPSecurityScheme.json": { - "$id": "http://asyncapi.com/definitions/2.5.0/NonBearerHTTPSecurityScheme.json", + "NonBearerHTTPSecurityScheme.json": { + "$id": "NonBearerHTTPSecurityScheme.json", "not": { "type": "object", "properties": { @@ -2201,8 +2057,8 @@ }, "additionalProperties": false }, - "http://asyncapi.com/definitions/2.5.0/BearerHTTPSecurityScheme.json": { - "$id": "http://asyncapi.com/definitions/2.5.0/BearerHTTPSecurityScheme.json", + "BearerHTTPSecurityScheme.json": { + "$id": "BearerHTTPSecurityScheme.json", "type": "object", "required": [ "type", @@ -2235,8 +2091,8 @@ }, "additionalProperties": false }, - "http://asyncapi.com/definitions/2.5.0/APIKeyHTTPSecurityScheme.json": { - "$id": "http://asyncapi.com/definitions/2.5.0/APIKeyHTTPSecurityScheme.json", + "APIKeyHTTPSecurityScheme.json": { + "$id": "APIKeyHTTPSecurityScheme.json", "type": "object", "required": [ "type", @@ -2272,8 +2128,56 @@ }, "additionalProperties": false }, - "http://asyncapi.com/definitions/2.5.0/oauth2Flows.json": { - "$id": "http://asyncapi.com/definitions/2.5.0/oauth2Flows.json", + "HTTPSecurityScheme.json": { + "$id": "HTTPSecurityScheme.json", + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.5.0/NonBearerHTTPSecurityScheme.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.5.0/BearerHTTPSecurityScheme.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.5.0/APIKeyHTTPSecurityScheme.json" + } + ] + }, + "oauth2Scopes.json": { + "$id": "oauth2Scopes.json", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "oauth2Flow.json": { + "$id": "oauth2Flow.json", + "type": "object", + "properties": { + "authorizationUrl": { + "type": "string", + "format": "uri" + }, + "tokenUrl": { + "type": "string", + "format": "uri" + }, + "refreshUrl": { + "type": "string", + "format": "uri" + }, + "scopes": { + "$ref": "http://asyncapi.com/definitions/2.5.0/oauth2Scopes.json" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.5.0/specificationExtension.json" + } + }, + "additionalProperties": false + }, + "oauth2Flows.json": { + "$id": "oauth2Flows.json", "type": "object", "required": [ "type", @@ -2376,42 +2280,8 @@ } } }, - "http://asyncapi.com/definitions/2.5.0/oauth2Flow.json": { - "$id": "http://asyncapi.com/definitions/2.5.0/oauth2Flow.json", - "type": "object", - "properties": { - "authorizationUrl": { - "type": "string", - "format": "uri" - }, - "tokenUrl": { - "type": "string", - "format": "uri" - }, - "refreshUrl": { - "type": "string", - "format": "uri" - }, - "scopes": { - "$ref": "http://asyncapi.com/definitions/2.5.0/oauth2Scopes.json" - } - }, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "http://asyncapi.com/definitions/2.5.0/specificationExtension.json" - } - }, - "additionalProperties": false - }, - "http://asyncapi.com/definitions/2.5.0/oauth2Scopes.json": { - "$id": "http://asyncapi.com/definitions/2.5.0/oauth2Scopes.json", - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "http://asyncapi.com/definitions/2.5.0/openIdConnect.json": { - "$id": "http://asyncapi.com/definitions/2.5.0/openIdConnect.json", + "openIdConnect.json": { + "$id": "openIdConnect.json", "type": "object", "required": [ "type", @@ -2439,22 +2309,8 @@ }, "additionalProperties": false }, - "http://asyncapi.com/definitions/2.5.0/SaslSecurityScheme.json": { - "$id": "http://asyncapi.com/definitions/2.5.0/SaslSecurityScheme.json", - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/2.5.0/SaslPlainSecurityScheme.json" - }, - { - "$ref": "http://asyncapi.com/definitions/2.5.0/SaslScramSecurityScheme.json" - }, - { - "$ref": "http://asyncapi.com/definitions/2.5.0/SaslGssapiSecurityScheme.json" - } - ] - }, - "http://asyncapi.com/definitions/2.5.0/SaslPlainSecurityScheme.json": { - "$id": "http://asyncapi.com/definitions/2.5.0/SaslPlainSecurityScheme.json", + "SaslPlainSecurityScheme.json": { + "$id": "SaslPlainSecurityScheme.json", "type": "object", "required": [ "type" @@ -2477,8 +2333,8 @@ }, "additionalProperties": false }, - "http://asyncapi.com/definitions/2.5.0/SaslScramSecurityScheme.json": { - "$id": "http://asyncapi.com/definitions/2.5.0/SaslScramSecurityScheme.json", + "SaslScramSecurityScheme.json": { + "$id": "SaslScramSecurityScheme.json", "type": "object", "required": [ "type" @@ -2502,8 +2358,8 @@ }, "additionalProperties": false }, - "http://asyncapi.com/definitions/2.5.0/SaslGssapiSecurityScheme.json": { - "$id": "http://asyncapi.com/definitions/2.5.0/SaslGssapiSecurityScheme.json", + "SaslGssapiSecurityScheme.json": { + "$id": "SaslGssapiSecurityScheme.json", "type": "object", "required": [ "type" @@ -2525,7 +2381,151 @@ } }, "additionalProperties": false + }, + "SaslSecurityScheme.json": { + "$id": "SaslSecurityScheme.json", + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.5.0/SaslPlainSecurityScheme.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.5.0/SaslScramSecurityScheme.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.5.0/SaslGssapiSecurityScheme.json" + } + ] + }, + "SecurityScheme.json": { + "$id": "SecurityScheme.json", + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.5.0/userPassword.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.5.0/apiKey.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.5.0/X509.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.5.0/symmetricEncryption.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.5.0/asymmetricEncryption.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.5.0/HTTPSecurityScheme.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.5.0/oauth2Flows.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.5.0/openIdConnect.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.5.0/SaslSecurityScheme.json" + } + ] + }, + "components.json": { + "$id": "components.json", + "type": "object", + "description": "An object to hold a set of reusable objects for different aspects of the AsyncAPI Specification.", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.5.0/specificationExtension.json" + } + }, + "properties": { + "schemas": { + "$ref": "http://asyncapi.com/definitions/2.5.0/schemas.json" + }, + "servers": { + "$ref": "http://asyncapi.com/definitions/2.5.0/servers.json" + }, + "channels": { + "$ref": "http://asyncapi.com/definitions/2.5.0/channels.json" + }, + "serverVariables": { + "$ref": "http://asyncapi.com/definitions/2.5.0/serverVariables.json" + }, + "messages": { + "$ref": "http://asyncapi.com/definitions/2.5.0/messages.json" + }, + "securitySchemes": { + "type": "object", + "patternProperties": { + "^[\\w\\d\\.\\-_]+$": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.5.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.5.0/SecurityScheme.json" + } + ] + } + } + }, + "parameters": { + "$ref": "http://asyncapi.com/definitions/2.5.0/parameters.json" + }, + "correlationIds": { + "type": "object", + "patternProperties": { + "^[\\w\\d\\.\\-_]+$": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.5.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.5.0/correlationId.json" + } + ] + } + } + }, + "operationTraits": { + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/2.5.0/operationTrait.json" + } + }, + "messageTraits": { + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/2.5.0/messageTrait.json" + } + }, + "serverBindings": { + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/2.5.0/bindingsObject.json" + } + }, + "channelBindings": { + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/2.5.0/bindingsObject.json" + } + }, + "operationBindings": { + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/2.5.0/bindingsObject.json" + } + }, + "messageBindings": { + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/2.5.0/bindingsObject.json" + } + } + } } }, + "$id": "http://asyncapi.com/definitions/2.5.0/asyncapi.json", "description": "!!Auto generated!! \n Do not manually edit. " } \ No newline at end of file diff --git a/schemas/2.6.0-without-$id.json b/schemas/2.6.0-without-$id.json index 6c79b5cc..00179ed6 100644 --- a/schemas/2.6.0-without-$id.json +++ b/schemas/2.6.0-without-$id.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema", + "$schema": "http://json-schema.org/draft-07/schema#", "title": "AsyncAPI 2.6.0 schema.", "type": "object", "required": [ @@ -58,61 +58,6 @@ "additionalProperties": true, "additionalItems": true }, - "info": { - "type": "object", - "description": "The object provides metadata about the API. The metadata can be used by the clients if needed.", - "required": [ - "version", - "title" - ], - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "properties": { - "title": { - "type": "string", - "description": "A unique and precise title of the API." - }, - "version": { - "type": "string", - "description": "A semantic version number of the API." - }, - "description": { - "type": "string", - "description": "A longer description of the API. Should be different from the title. CommonMark is allowed." - }, - "termsOfService": { - "type": "string", - "description": "A URL to the Terms of Service for the API. MUST be in the format of a URL.", - "format": "uri" - }, - "contact": { - "$ref": "#/definitions/contact" - }, - "license": { - "$ref": "#/definitions/license" - } - }, - "examples": [ - { - "title": "AsyncAPI Sample App", - "description": "This is a sample server.", - "termsOfService": "https://asyncapi.org/terms/", - "contact": { - "name": "API Support", - "url": "https://www.example.com/support", - "email": "support@example.com" - }, - "license": { - "name": "Apache 2.0", - "url": "https://www.apache.org/licenses/LICENSE-2.0.html" - } - } - ] - }, "contact": { "type": "object", "description": "Contact information for the exposed API.", @@ -176,87 +121,12 @@ } ] }, - "servers": { - "description": "The Servers Object is a map of Server Objects.", - "type": "object", - "additionalProperties": { - "oneOf": [ - { - "$ref": "#/definitions/Reference" - }, - { - "$ref": "#/definitions/server" - } - ] - }, - "examples": [ - { - "development": { - "url": "development.gigantic-server.com", - "description": "Development server", - "protocol": "amqp", - "protocolVersion": "0.9.1", - "tags": [ - { - "name": "env:development", - "description": "This environment is meant for developers to run their own tests" - } - ] - }, - "staging": { - "url": "staging.gigantic-server.com", - "description": "Staging server", - "protocol": "amqp", - "protocolVersion": "0.9.1", - "tags": [ - { - "name": "env:staging", - "description": "This environment is a replica of the production environment" - } - ] - }, - "production": { - "url": "api.gigantic-server.com", - "description": "Production server", - "protocol": "amqp", - "protocolVersion": "0.9.1", - "tags": [ - { - "name": "env:production", - "description": "This environment is the live environment available for final users" - } - ] - } - } - ] - }, - "Reference": { - "type": "object", - "required": [ - "$ref" - ], - "properties": { - "$ref": { - "$ref": "#/definitions/ReferenceObject" - } - } - }, - "ReferenceObject": { - "type": "string", - "description": "A simple object to allow referencing other components in the specification, internally and externally.", - "format": "uri-reference", - "examples": [ - { - "$ref": "#/components/schemas/Pet" - } - ] - }, - "server": { + "info": { "type": "object", - "description": "An object representing a message broker, a server or any other kind of computer program capable of sending and/or receiving data", + "description": "The object provides metadata about the API. The metadata can be used by the clients if needed.", "required": [ - "url", - "protocol" + "version", + "title" ], "additionalProperties": false, "patternProperties": { @@ -265,67 +135,66 @@ } }, "properties": { - "url": { + "title": { "type": "string", - "description": "A URL to the target host. This URL supports Server Variables and MAY be relative, to indicate that the host location is relative to the location where the AsyncAPI document is being served." + "description": "A unique and precise title of the API." }, - "description": { + "version": { "type": "string", - "description": "An optional string describing the host designated by the URL. CommonMark syntax MAY be used for rich text representation." + "description": "A semantic version number of the API." }, - "protocol": { + "description": { "type": "string", - "description": "The protocol this URL supports for connection. Supported protocol include, but are not limited to: amqp, amqps, http, https, ibmmq, jms, kafka, kafka-secure, anypointmq, mqtt, secure-mqtt, solace, stomp, stomps, ws, wss, mercure, googlepubsub." + "description": "A longer description of the API. Should be different from the title. CommonMark is allowed." }, - "protocolVersion": { + "termsOfService": { "type": "string", - "description": "The version of the protocol used for connection. For instance: AMQP 0.9.1, HTTP 2.0, Kafka 1.0.0, etc." - }, - "variables": { - "description": "A map between a variable name and its value. The value is used for substitution in the server's URL template.", - "$ref": "#/definitions/serverVariables" - }, - "security": { - "type": "array", - "description": "A declaration of which security mechanisms can be used with this server. The list of values includes alternative security requirement objects that can be used. ", - "items": { - "$ref": "#/definitions/SecurityRequirement" - } + "description": "A URL to the Terms of Service for the API. MUST be in the format of a URL.", + "format": "uri" }, - "bindings": { - "description": "A map where the keys describe the name of the protocol and the values describe protocol-specific definitions for the server.", - "$ref": "#/definitions/bindingsObject" + "contact": { + "$ref": "#/definitions/contact" }, - "tags": { - "type": "array", - "description": "A list of tags for logical grouping and categorization of servers.", - "items": { - "$ref": "#/definitions/tag" - }, - "uniqueItems": true + "license": { + "$ref": "#/definitions/license" } }, "examples": [ { - "url": "development.gigantic-server.com", - "description": "Development server", - "protocol": "kafka", - "protocolVersion": "1.0.0" + "title": "AsyncAPI Sample App", + "description": "This is a sample server.", + "termsOfService": "https://asyncapi.org/terms/", + "contact": { + "name": "API Support", + "url": "https://www.example.com/support", + "email": "support@example.com" + }, + "license": { + "name": "Apache 2.0", + "url": "https://www.apache.org/licenses/LICENSE-2.0.html" + } } ] }, - "serverVariables": { + "ReferenceObject": { + "type": "string", + "description": "A simple object to allow referencing other components in the specification, internally and externally.", + "format": "uri-reference", + "examples": [ + { + "$ref": "#/components/schemas/Pet" + } + ] + }, + "Reference": { "type": "object", - "description": "A map between a variable name and its value. The value is used for substitution in the server's URL template.", - "additionalProperties": { - "oneOf": [ - { - "$ref": "#/definitions/Reference" - }, - { - "$ref": "#/definitions/serverVariable" - } - ] + "required": [ + "$ref" + ], + "properties": { + "$ref": { + "$ref": "#/definitions/ReferenceObject" + } } }, "serverVariable": { @@ -363,6 +232,20 @@ } } }, + "serverVariables": { + "type": "object", + "description": "A map between a variable name and its value. The value is used for substitution in the server's URL template.", + "additionalProperties": { + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/serverVariable" + } + ] + } + }, "SecurityRequirement": { "type": "object", "description": "Lists of the required security schemes that can be used to execute an operation", @@ -407,25 +290,22 @@ "pulsar": {} } }, - "tag": { + "externalDocs": { "type": "object", - "description": "Allows adding meta data to a single tag.", "additionalProperties": false, + "description": "Allows referencing an external resource for extended documentation.", "required": [ - "name" + "url" ], "properties": { - "name": { - "type": "string", - "description": "The name of the tag." - }, "description": { "type": "string", - "description": "A short description for the tag." + "description": "A short description of the target documentation." }, - "externalDocs": { - "description": "Additional external documentation for this tag.", - "$ref": "#/definitions/externalDocs" + "url": { + "type": "string", + "format": "uri", + "description": "The URL for the target documentation. This MUST be in the form of an absolute URL." } }, "patternProperties": { @@ -435,27 +315,29 @@ }, "examples": [ { - "name": "user", - "description": "User-related messages" + "description": "Find more info here", + "url": "https://example.com" } ] }, - "externalDocs": { + "tag": { "type": "object", + "description": "Allows adding meta data to a single tag.", "additionalProperties": false, - "description": "Allows referencing an external resource for extended documentation.", "required": [ - "url" + "name" ], "properties": { - "description": { + "name": { "type": "string", - "description": "A short description of the target documentation." + "description": "The name of the tag." }, - "url": { + "description": { "type": "string", - "format": "uri", - "description": "The URL for the target documentation. This MUST be in the form of an absolute URL." + "description": "A short description for the tag." + }, + "externalDocs": { + "$ref": "#/definitions/externalDocs" } }, "patternProperties": { @@ -465,37 +347,18 @@ }, "examples": [ { - "description": "Find more info here", - "url": "https://example.com" - } - ] - }, - "channels": { - "type": "object", - "description": "Holds the relative paths to the individual channel and their operations. Channel paths are relative to servers.", - "propertyNames": { - "type": "string", - "format": "uri-template", - "minLength": 1 - }, - "additionalProperties": { - "$ref": "#/definitions/channelItem" - }, - "examples": [ - { - "user/signedup": { - "subscribe": { - "message": { - "$ref": "#/components/messages/userSignedUp" - } - } - } + "name": "user", + "description": "User-related messages" } ] }, - "channelItem": { + "server": { "type": "object", - "description": "Describes the operations available on a single channel.", + "description": "An object representing a message broker, a server or any other kind of computer program capable of sending and/or receiving data", + "required": [ + "url", + "protocol" + ], "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { @@ -503,314 +366,120 @@ } }, "properties": { - "$ref": { - "$ref": "#/definitions/ReferenceObject" - }, - "parameters": { - "$ref": "#/definitions/parameters" + "url": { + "type": "string", + "description": "A URL to the target host. This URL supports Server Variables and MAY be relative, to indicate that the host location is relative to the location where the AsyncAPI document is being served." }, "description": { "type": "string", - "description": "A description of the channel." + "description": "An optional string describing the host designated by the URL. CommonMark syntax MAY be used for rich text representation." }, - "servers": { - "type": "array", - "description": "The names of the servers on which this channel is available. If absent or empty then this channel must be available on all servers.", - "items": { - "type": "string" - }, - "uniqueItems": true + "protocol": { + "type": "string", + "description": "The protocol this URL supports for connection. Supported protocol include, but are not limited to: amqp, amqps, http, https, ibmmq, jms, kafka, kafka-secure, anypointmq, mqtt, secure-mqtt, solace, stomp, stomps, ws, wss, mercure, googlepubsub." }, - "publish": { - "$ref": "#/definitions/operation" + "protocolVersion": { + "type": "string", + "description": "The version of the protocol used for connection. For instance: AMQP 0.9.1, HTTP 2.0, Kafka 1.0.0, etc." }, - "subscribe": { - "$ref": "#/definitions/operation" + "variables": { + "$ref": "#/definitions/serverVariables" }, - "deprecated": { - "type": "boolean", - "default": false + "security": { + "type": "array", + "description": "A declaration of which security mechanisms can be used with this server. The list of values includes alternative security requirement objects that can be used. ", + "items": { + "$ref": "#/definitions/SecurityRequirement" + } }, "bindings": { "$ref": "#/definitions/bindingsObject" + }, + "tags": { + "type": "array", + "description": "A list of tags for logical grouping and categorization of servers.", + "items": { + "$ref": "#/definitions/tag" + }, + "uniqueItems": true } }, "examples": [ { - "description": "This channel is used to exchange messages about users signing up", - "subscribe": { - "summary": "A user signed up.", - "message": { - "description": "A longer description of the message", - "payload": { - "type": "object", - "properties": { - "user": { - "$ref": "#/components/schemas/user" - }, - "signup": { - "$ref": "#/components/schemas/signup" - } - } - } - } - }, - "bindings": { - "amqp": { - "is": "queue", - "queue": { - "exclusive": true - } - } - } - }, - { - "subscribe": { - "message": { - "oneOf": [ - { - "$ref": "#/components/messages/signup" - }, - { - "$ref": "#/components/messages/login" - } - ] - } - } - }, - { - "description": "This application publishes WebUICommand messages to an AMQP queue on RabbitMQ brokers in the Staging and Production environments.", - "servers": [ - "rabbitmqBrokerInProd", - "rabbitmqBrokerInStaging" - ], - "subscribe": { - "message": { - "$ref": "#/components/messages/WebUICommand" - } - }, - "bindings": { - "amqp": { - "is": "queue" - } - } + "url": "development.gigantic-server.com", + "description": "Development server", + "protocol": "kafka", + "protocolVersion": "1.0.0" } ] }, - "parameters": { + "servers": { + "description": "The Servers Object is a map of Server Objects.", "type": "object", - "description": "JSON objects describing reusable channel parameters.", "additionalProperties": { "oneOf": [ { "$ref": "#/definitions/Reference" }, { - "$ref": "#/definitions/parameter" + "$ref": "#/definitions/server" } ] }, "examples": [ { - "user/{userId}/signup": { - "parameters": { - "userId": { - "description": "Id of the user.", - "schema": { - "type": "string" - } + "development": { + "url": "development.gigantic-server.com", + "description": "Development server", + "protocol": "amqp", + "protocolVersion": "0.9.1", + "tags": [ + { + "name": "env:development", + "description": "This environment is meant for developers to run their own tests" } - }, - "subscribe": { - "message": { - "$ref": "#/components/messages/userSignedUp" + ] + }, + "staging": { + "url": "staging.gigantic-server.com", + "description": "Staging server", + "protocol": "amqp", + "protocolVersion": "0.9.1", + "tags": [ + { + "name": "env:staging", + "description": "This environment is a replica of the production environment" } - } + ] + }, + "production": { + "url": "api.gigantic-server.com", + "description": "Production server", + "protocol": "amqp", + "protocolVersion": "0.9.1", + "tags": [ + { + "name": "env:production", + "description": "This environment is the live environment available for final users" + } + ] } } ] }, - "parameter": { - "description": "Describes a parameter included in a channel name.", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "properties": { - "description": { - "type": "string", - "description": "A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed." + "json-schema-draft-07-schema": { + "title": "Core schema meta-schema", + "definitions": { + "schemaArray": { + "type": "array", + "minItems": 1, + "items": { + "$ref": "#/definitions/json-schema-draft-07-schema" + } }, - "schema": { - "$ref": "#/definitions/schema" - }, - "location": { - "type": "string", - "description": "A runtime expression that specifies the location of the parameter value", - "pattern": "^\\$message\\.(header|payload)#(\\/(([^\\/~])|(~[01]))*)*" - } - }, - "examples": [ - { - "user/{userId}/signup": { - "parameters": { - "userId": { - "description": "Id of the user.", - "schema": { - "type": "string" - }, - "location": "$message.payload#/user/id" - } - }, - "subscribe": { - "message": { - "$ref": "#/components/messages/userSignedUp" - } - } - } - } - ] - }, - "schema": { - "description": "The Schema Object allows the definition of input and output data types. These types can be objects, but also primitives and arrays.", - "allOf": [ - { - "$ref": "#/definitions/json-schema-draft-07-schema" - }, - { - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "properties": { - "additionalProperties": { - "anyOf": [ - { - "$ref": "#/definitions/schema" - }, - { - "type": "boolean" - } - ], - "default": {} - }, - "items": { - "anyOf": [ - { - "$ref": "#/definitions/schema" - }, - { - "type": "array", - "minItems": 1, - "items": { - "$ref": "#/definitions/schema" - } - } - ], - "default": {} - }, - "allOf": { - "type": "array", - "minItems": 1, - "items": { - "$ref": "#/definitions/schema" - } - }, - "oneOf": { - "type": "array", - "minItems": 1, - "items": { - "$ref": "#/definitions/schema" - } - }, - "anyOf": { - "type": "array", - "minItems": 1, - "items": { - "$ref": "#/definitions/schema" - } - }, - "not": { - "$ref": "#/definitions/schema" - }, - "properties": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/schema" - }, - "default": {} - }, - "patternProperties": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/schema" - }, - "default": {} - }, - "propertyNames": { - "$ref": "#/definitions/schema" - }, - "contains": { - "$ref": "#/definitions/schema" - }, - "discriminator": { - "type": "string", - "description": "Adds support for polymorphism. The discriminator is the schema property name that is used to differentiate between other schema that inherit this schema. " - }, - "externalDocs": { - "description": "Additional external documentation for this schema.", - "$ref": "#/definitions/externalDocs" - }, - "deprecated": { - "type": "boolean", - "default": false, - "description": "Specifies that a schema is deprecated and SHOULD be transitioned out of usage" - } - } - } - ], - "examples": [ - { - "type": "string", - "format": "email" - }, - { - "type": "object", - "required": [ - "name" - ], - "properties": { - "name": { - "type": "string" - }, - "address": { - "$ref": "#/components/schemas/Address" - }, - "age": { - "type": "integer", - "format": "int32", - "minimum": 0 - } - } - } - ] - }, - "json-schema-draft-07-schema": { - "title": "Core schema meta-schema", - "definitions": { - "schemaArray": { - "type": "array", - "minItems": 1, - "items": { - "$ref": "#/definitions/json-schema-draft-07-schema" - } - }, - "nonNegativeInteger": { - "type": "integer", - "minimum": 0 + "nonNegativeInteger": { + "type": "integer", + "minimum": 0 }, "nonNegativeIntegerDefault0": { "allOf": [ @@ -1041,109 +710,237 @@ }, "default": true }, - "operation": { - "type": "object", - "description": "Describes a publish or a subscribe operation. This provides a place to document how and why messages are sent and received.", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "properties": { - "traits": { - "type": "array", - "description": "A list of traits to apply to the operation object.", - "items": { - "oneOf": [ - { - "$ref": "#/definitions/Reference" - }, - { - "$ref": "#/definitions/operationTrait" - } - ] - } - }, - "summary": { - "type": "string", - "description": "A short summary of what the operation is about." - }, - "description": { - "type": "string", - "description": "A verbose explanation of the operation." - }, - "security": { - "type": "array", - "description": "A declaration of which security mechanisms are associated with this operation.", - "items": { - "$ref": "#/definitions/SecurityRequirement" - } - }, - "tags": { - "type": "array", - "description": "A list of tags for logical grouping and categorization of operations.", - "items": { - "$ref": "#/definitions/tag" - }, - "uniqueItems": true - }, - "externalDocs": { - "$ref": "#/definitions/externalDocs" - }, - "operationId": { - "type": "string" - }, - "bindings": { - "$ref": "#/definitions/bindingsObject" + "schema": { + "description": "The Schema Object allows the definition of input and output data types. These types can be objects, but also primitives and arrays.", + "allOf": [ + { + "$ref": "#/definitions/json-schema-draft-07-schema" }, - "message": { - "$ref": "#/definitions/message" - } - }, - "examples": [ { - "user/signedup": { - "subscribe": { - "message": { - "$ref": "#/components/messages/userSignedUp" - } + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" } - } - } - ] - }, - "operationTrait": { - "type": "object", - "description": "Describes a trait that MAY be applied to an Operation Object.", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "properties": { - "summary": { - "type": "string", - "description": "A short summary of what the operation is about." - }, - "description": { - "type": "string", - "description": "A verbose explanation of the operation." - }, - "tags": { - "type": "array", - "description": "A list of tags for logical grouping and categorization of operations.", - "items": { - "$ref": "#/definitions/tag" }, - "uniqueItems": true - }, - "externalDocs": { - "$ref": "#/definitions/externalDocs" - }, - "operationId": { - "type": "string", + "properties": { + "additionalProperties": { + "anyOf": [ + { + "$ref": "#/definitions/schema" + }, + { + "type": "boolean" + } + ], + "default": {} + }, + "items": { + "anyOf": [ + { + "$ref": "#/definitions/schema" + }, + { + "type": "array", + "minItems": 1, + "items": { + "$ref": "#/definitions/schema" + } + } + ], + "default": {} + }, + "allOf": { + "type": "array", + "minItems": 1, + "items": { + "$ref": "#/definitions/schema" + } + }, + "oneOf": { + "type": "array", + "minItems": 1, + "items": { + "$ref": "#/definitions/schema" + } + }, + "anyOf": { + "type": "array", + "minItems": 1, + "items": { + "$ref": "#/definitions/schema" + } + }, + "not": { + "$ref": "#/definitions/schema" + }, + "properties": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/schema" + }, + "default": {} + }, + "patternProperties": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/schema" + }, + "default": {} + }, + "propertyNames": { + "$ref": "#/definitions/schema" + }, + "contains": { + "$ref": "#/definitions/schema" + }, + "discriminator": { + "type": "string", + "description": "Adds support for polymorphism. The discriminator is the schema property name that is used to differentiate between other schema that inherit this schema. " + }, + "externalDocs": { + "$ref": "#/definitions/externalDocs" + }, + "deprecated": { + "type": "boolean", + "default": false, + "description": "Specifies that a schema is deprecated and SHOULD be transitioned out of usage" + } + } + } + ], + "examples": [ + { + "type": "string", + "format": "email" + }, + { + "type": "object", + "required": [ + "name" + ], + "properties": { + "name": { + "type": "string" + }, + "address": { + "$ref": "#/components/schemas/Address" + }, + "age": { + "type": "integer", + "format": "int32", + "minimum": 0 + } + } + } + ] + }, + "parameter": { + "description": "Describes a parameter included in a channel name.", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, + "properties": { + "description": { + "type": "string", + "description": "A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed." + }, + "schema": { + "$ref": "#/definitions/schema" + }, + "location": { + "type": "string", + "description": "A runtime expression that specifies the location of the parameter value", + "pattern": "^\\$message\\.(header|payload)#(\\/(([^\\/~])|(~[01]))*)*" + } + }, + "examples": [ + { + "user/{userId}/signup": { + "parameters": { + "userId": { + "description": "Id of the user.", + "schema": { + "type": "string" + }, + "location": "$message.payload#/user/id" + } + }, + "subscribe": { + "message": { + "$ref": "#/components/messages/userSignedUp" + } + } + } + } + ] + }, + "parameters": { + "type": "object", + "description": "JSON objects describing reusable channel parameters.", + "additionalProperties": { + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/parameter" + } + ] + }, + "examples": [ + { + "user/{userId}/signup": { + "parameters": { + "userId": { + "description": "Id of the user.", + "schema": { + "type": "string" + } + } + }, + "subscribe": { + "message": { + "$ref": "#/components/messages/userSignedUp" + } + } + } + } + ] + }, + "operationTrait": { + "type": "object", + "description": "Describes a trait that MAY be applied to an Operation Object.", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, + "properties": { + "summary": { + "type": "string", + "description": "A short summary of what the operation is about." + }, + "description": { + "type": "string", + "description": "A verbose explanation of the operation." + }, + "tags": { + "type": "array", + "description": "A list of tags for logical grouping and categorization of operations.", + "items": { + "$ref": "#/definitions/tag" + }, + "uniqueItems": true + }, + "externalDocs": { + "$ref": "#/definitions/externalDocs" + }, + "operationId": { + "type": "string", "description": "Unique string used to identify the operation. The id MUST be unique among all operations described in the API." }, "security": { @@ -1167,406 +964,30 @@ } ] }, - "message": { - "description": "Describes a message received on a given channel and operation.", - "oneOf": [ - { - "$ref": "#/definitions/Reference" + "correlationId": { + "type": "object", + "description": "An object that specifies an identifier at design time that can used for message tracing and correlation.", + "required": [ + "location" + ], + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, + "properties": { + "description": { + "type": "string", + "description": "A optional description of the correlation ID. GitHub Flavored Markdown is allowed." }, - { - "oneOf": [ - { - "type": "object", - "required": [ - "oneOf" - ], - "additionalProperties": false, - "properties": { - "oneOf": { - "type": "array", - "items": { - "$ref": "#/definitions/message" - } - } - } - }, - { - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "properties": { - "schemaFormat": { - "type": "string" - }, - "contentType": { - "type": "string" - }, - "headers": { - "allOf": [ - { - "$ref": "#/definitions/schema" - }, - { - "properties": { - "type": { - "const": "object" - } - } - } - ] - }, - "messageId": { - "type": "string" - }, - "payload": {}, - "correlationId": { - "oneOf": [ - { - "$ref": "#/definitions/Reference" - }, - { - "$ref": "#/definitions/correlationId" - } - ] - }, - "tags": { - "type": "array", - "items": { - "$ref": "#/definitions/tag" - }, - "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." - }, - "externalDocs": { - "$ref": "#/definitions/externalDocs" - }, - "deprecated": { - "type": "boolean", - "default": false - }, - "examples": { - "type": "array", - "description": "List of examples.", - "items": { - "type": "object", - "additionalProperties": false, - "anyOf": [ - { - "required": [ - "payload" - ] - }, - { - "required": [ - "headers" - ] - } - ], - "properties": { - "name": { - "type": "string", - "description": "Machine readable name of the message example." - }, - "summary": { - "type": "string", - "description": "A brief summary of the message example." - }, - "headers": { - "type": "object", - "description": "Schema definition of the application headers." - }, - "payload": { - "description": "Definition of the message payload. It can be of any type" - } - } - } - }, - "bindings": { - "$ref": "#/definitions/bindingsObject" - }, - "traits": { - "type": "array", - "items": { - "oneOf": [ - { - "$ref": "#/definitions/Reference" - }, - { - "$ref": "#/definitions/messageTrait" - } - ] - } - } - }, - "allOf": [ - { - "if": { - "not": { - "required": [ - "schemaFormat" - ] - } - }, - "then": { - "properties": { - "payload": { - "$ref": "#/definitions/schema" - } - } - } - }, - { - "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" - ] - } - } - }, - "then": { - "properties": { - "payload": { - "$ref": "#/definitions/schema" - } - } - } - }, - { - "if": { - "required": [ - "schemaFormat" - ], - "properties": { - "schemaFormat": { - "enum": [ - "application/schema+json;version=draft-07", - "application/schema+yaml;version=draft-07" - ] - } - } - }, - "then": { - "properties": { - "payload": { - "$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": { - "payload": { - "$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": { - "payload": { - "$ref": "#/definitions/avroSchema_v1" - } - } - } - } - ] - } - ] - } - ], - "examples": [ - { - "messageId": "userSignup", - "name": "UserSignup", - "title": "User signup", - "summary": "Action to sign a user up.", - "description": "A longer description", - "contentType": "application/json", - "tags": [ - { - "name": "user" - }, - { - "name": "signup" - }, - { - "name": "register" - } - ], - "headers": { - "type": "object", - "properties": { - "correlationId": { - "description": "Correlation ID set by application", - "type": "string" - }, - "applicationInstanceId": { - "description": "Unique identifier for a given instance of the publishing application", - "type": "string" - } - } - }, - "payload": { - "type": "object", - "properties": { - "user": { - "$ref": "#/components/schemas/userCreate" - }, - "signup": { - "$ref": "#/components/schemas/signup" - } - } - }, - "correlationId": { - "description": "Default Correlation ID", - "location": "$message.header#/correlationId" - }, - "traits": [ - { - "$ref": "#/components/messageTraits/commonHeaders" - } - ], - "examples": [ - { - "name": "SimpleSignup", - "summary": "A simple UserSignup example message", - "headers": { - "correlationId": "my-correlation-id", - "applicationInstanceId": "myInstanceId" - }, - "payload": { - "user": { - "someUserKey": "someUserValue" - }, - "signup": { - "someSignupKey": "someSignupValue" - } - } - } - ] - }, - { - "messageId": "userSignup", - "name": "UserSignup", - "title": "User signup", - "summary": "Action to sign a user up.", - "description": "A longer description", - "tags": [ - { - "name": "user" - }, - { - "name": "signup" - }, - { - "name": "register" - } - ], - "schemaFormat": "application/vnd.apache.avro+json;version=1.9.0", - "payload": { - "$ref": "path/to/user-create.avsc#/UserCreate" - } - } - ] - }, - "correlationId": { - "type": "object", - "description": "An object that specifies an identifier at design time that can used for message tracing and correlation.", - "required": [ - "location" - ], - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "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]))*)*" - } - }, - "examples": [ + "location": { + "type": "string", + "description": "A runtime expression that specifies the location of the correlation ID", + "pattern": "^\\$message\\.(header|payload)#(\\/(([^\\/~])|(~[01]))*)*" + } + }, + "examples": [ { "description": "Default Correlation ID", "location": "$message.header#/correlationId" @@ -2301,285 +1722,595 @@ ], "title": "Avro Schema Definition" }, - "components": { - "type": "object", - "description": "Holds a set of reusable objects for different aspects of the AsyncAPI specification. All objects defined within the components object will have no effect on the API unless they are explicitly referenced from properties outside the components object.", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "properties": { - "schemas": { - "$ref": "#/definitions/schemas" - }, - "servers": { - "$ref": "#/definitions/servers" - }, - "channels": { - "$ref": "#/definitions/channels" - }, - "serverVariables": { - "$ref": "#/definitions/serverVariables" - }, - "messages": { - "$ref": "#/definitions/messages" + "message": { + "description": "Describes a message received on a given channel and operation.", + "oneOf": [ + { + "$ref": "#/definitions/Reference" }, - "securitySchemes": { - "type": "object", - "patternProperties": { - "^[\\w\\d\\.\\-_]+$": { - "oneOf": [ + { + "oneOf": [ + { + "type": "object", + "required": [ + "oneOf" + ], + "additionalProperties": false, + "properties": { + "oneOf": { + "type": "array", + "items": { + "$ref": "#/definitions/message" + } + } + } + }, + { + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, + "properties": { + "schemaFormat": { + "type": "string" + }, + "contentType": { + "type": "string" + }, + "headers": { + "allOf": [ + { + "$ref": "#/definitions/schema" + }, + { + "properties": { + "type": { + "const": "object" + } + } + } + ] + }, + "messageId": { + "type": "string" + }, + "payload": {}, + "correlationId": { + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/correlationId" + } + ] + }, + "tags": { + "type": "array", + "items": { + "$ref": "#/definitions/tag" + }, + "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." + }, + "externalDocs": { + "$ref": "#/definitions/externalDocs" + }, + "deprecated": { + "type": "boolean", + "default": false + }, + "examples": { + "type": "array", + "description": "List of examples.", + "items": { + "type": "object", + "additionalProperties": false, + "anyOf": [ + { + "required": [ + "payload" + ] + }, + { + "required": [ + "headers" + ] + } + ], + "properties": { + "name": { + "type": "string", + "description": "Machine readable name of the message example." + }, + "summary": { + "type": "string", + "description": "A brief summary of the message example." + }, + "headers": { + "type": "object", + "description": "Schema definition of the application headers." + }, + "payload": { + "description": "Definition of the message payload. It can be of any type" + } + } + } + }, + "bindings": { + "$ref": "#/definitions/bindingsObject" + }, + "traits": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/messageTrait" + } + ] + } + } + }, + "allOf": [ { - "$ref": "#/definitions/Reference" + "if": { + "not": { + "required": [ + "schemaFormat" + ] + } + }, + "then": { + "properties": { + "payload": { + "$ref": "#/definitions/schema" + } + } + } + }, + { + "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" + ] + } + } + }, + "then": { + "properties": { + "payload": { + "$ref": "#/definitions/schema" + } + } + } }, { - "$ref": "#/definitions/SecurityScheme" - } - ] - } - } - }, - "parameters": { - "$ref": "#/definitions/parameters" - }, - "correlationIds": { - "type": "object", - "patternProperties": { - "^[\\w\\d\\.\\-_]+$": { - "oneOf": [ + "if": { + "required": [ + "schemaFormat" + ], + "properties": { + "schemaFormat": { + "enum": [ + "application/schema+json;version=draft-07", + "application/schema+yaml;version=draft-07" + ] + } + } + }, + "then": { + "properties": { + "payload": { + "$ref": "#/definitions/json-schema-draft-07-schema" + } + } + } + }, { - "$ref": "#/definitions/Reference" + "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": "#/definitions/openapiSchema_3_0" + } + } + } }, { - "$ref": "#/definitions/correlationId" + "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": "#/definitions/avroSchema_v1" + } + } + } } ] } - } - }, - "operationTraits": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/operationTrait" - } - }, - "messageTraits": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/messageTrait" - } - }, - "serverBindings": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/bindingsObject" - } - }, - "channelBindings": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/bindingsObject" - } - }, - "operationBindings": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/bindingsObject" - } - }, - "messageBindings": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/bindingsObject" - } + ] } - }, + ], "examples": [ { - "components": { - "schemas": { - "Category": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int64" - }, - "name": { - "type": "string" - } - } - }, - "Tag": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int64" - }, - "name": { - "type": "string" - } - } - } + "messageId": "userSignup", + "name": "UserSignup", + "title": "User signup", + "summary": "Action to sign a user up.", + "description": "A longer description", + "contentType": "application/json", + "tags": [ + { + "name": "user" }, - "servers": { - "development": { - "url": "{stage}.gigantic-server.com:{port}", - "description": "Development server", - "protocol": "amqp", - "protocolVersion": "0.9.1", - "variables": { - "stage": { - "$ref": "#/components/serverVariables/stage" - }, - "port": { - "$ref": "#/components/serverVariables/port" - } - } - } + { + "name": "signup" }, - "serverVariables": { - "stage": { - "default": "demo", - "description": "This value is assigned by the service provider, in this example `gigantic-server.com`" + { + "name": "register" + } + ], + "headers": { + "type": "object", + "properties": { + "correlationId": { + "description": "Correlation ID set by application", + "type": "string" }, - "port": { - "enum": [ - "8883", - "8884" - ], - "default": "8883" + "applicationInstanceId": { + "description": "Unique identifier for a given instance of the publishing application", + "type": "string" } - }, - "channels": { - "user/signedup": { - "subscribe": { - "message": { - "$ref": "#/components/messages/userSignUp" - } - } + } + }, + "payload": { + "type": "object", + "properties": { + "user": { + "$ref": "#/components/schemas/userCreate" + }, + "signup": { + "$ref": "#/components/schemas/signup" } - }, - "messages": { - "userSignUp": { - "summary": "Action to sign a user up.", - "description": "Multiline description of what this action does.\nHere you have another line.\n", - "tags": [ - { - "name": "user" - }, - { - "name": "signup" - } - ], - "headers": { - "type": "object", - "properties": { - "applicationInstanceId": { - "description": "Unique identifier for a given instance of the publishing application", - "type": "string" - } - } + } + }, + "correlationId": { + "description": "Default Correlation ID", + "location": "$message.header#/correlationId" + }, + "traits": [ + { + "$ref": "#/components/messageTraits/commonHeaders" + } + ], + "examples": [ + { + "name": "SimpleSignup", + "summary": "A simple UserSignup example message", + "headers": { + "correlationId": "my-correlation-id", + "applicationInstanceId": "myInstanceId" + }, + "payload": { + "user": { + "someUserKey": "someUserValue" }, - "payload": { - "type": "object", - "properties": { - "user": { - "$ref": "#/components/schemas/userCreate" - }, - "signup": { - "$ref": "#/components/schemas/signup" - } - } - } - } - }, - "parameters": { - "userId": { - "description": "Id of the user.", - "schema": { - "type": "string" + "signup": { + "someSignupKey": "someSignupValue" } } + } + ] + }, + { + "messageId": "userSignup", + "name": "UserSignup", + "title": "User signup", + "summary": "Action to sign a user up.", + "description": "A longer description", + "tags": [ + { + "name": "user" }, - "correlationIds": { - "default": { - "description": "Default Correlation ID", - "location": "$message.header#/correlationId" - } + { + "name": "signup" }, - "messageTraits": { - "commonHeaders": { - "headers": { - "type": "object", - "properties": { - "my-app-header": { - "type": "integer", - "minimum": 0, - "maximum": 100 - } - } - } - } + { + "name": "register" } + ], + "schemaFormat": "application/vnd.apache.avro+json;version=1.9.0", + "payload": { + "$ref": "path/to/user-create.avsc#/UserCreate" } } ] }, - "schemas": { + "operation": { "type": "object", - "additionalProperties": { - "$ref": "#/definitions/schema" + "description": "Describes a publish or a subscribe operation. This provides a place to document how and why messages are sent and received.", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } }, - "description": "JSON objects describing schemas the API uses." + "properties": { + "traits": { + "type": "array", + "description": "A list of traits to apply to the operation object.", + "items": { + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/operationTrait" + } + ] + } + }, + "summary": { + "type": "string", + "description": "A short summary of what the operation is about." + }, + "description": { + "type": "string", + "description": "A verbose explanation of the operation." + }, + "security": { + "type": "array", + "description": "A declaration of which security mechanisms are associated with this operation.", + "items": { + "$ref": "#/definitions/SecurityRequirement" + } + }, + "tags": { + "type": "array", + "description": "A list of tags for logical grouping and categorization of operations.", + "items": { + "$ref": "#/definitions/tag" + }, + "uniqueItems": true + }, + "externalDocs": { + "$ref": "#/definitions/externalDocs" + }, + "operationId": { + "type": "string" + }, + "bindings": { + "$ref": "#/definitions/bindingsObject" + }, + "message": { + "$ref": "#/definitions/message" + } + }, + "examples": [ + { + "user/signedup": { + "subscribe": { + "message": { + "$ref": "#/components/messages/userSignedUp" + } + } + } + } + ] }, - "messages": { + "channelItem": { "type": "object", - "additionalProperties": { - "$ref": "#/definitions/message" + "description": "Describes the operations available on a single channel.", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } }, - "description": "JSON objects describing the messages being consumed and produced by the API." - }, - "SecurityScheme": { - "description": "Defines a security scheme that can be used by the operations.", - "oneOf": [ - { - "$ref": "#/definitions/userPassword" + "properties": { + "$ref": { + "$ref": "#/definitions/ReferenceObject" }, - { - "$ref": "#/definitions/apiKey" + "parameters": { + "$ref": "#/definitions/parameters" }, - { - "$ref": "#/definitions/X509" + "description": { + "type": "string", + "description": "A description of the channel." }, - { - "$ref": "#/definitions/symmetricEncryption" + "servers": { + "type": "array", + "description": "The names of the servers on which this channel is available. If absent or empty then this channel must be available on all servers.", + "items": { + "type": "string" + }, + "uniqueItems": true }, - { - "$ref": "#/definitions/asymmetricEncryption" + "publish": { + "$ref": "#/definitions/operation" }, - { - "$ref": "#/definitions/HTTPSecurityScheme" + "subscribe": { + "$ref": "#/definitions/operation" + }, + "deprecated": { + "type": "boolean", + "default": false }, + "bindings": { + "$ref": "#/definitions/bindingsObject" + } + }, + "examples": [ { - "$ref": "#/definitions/oauth2Flows" + "description": "This channel is used to exchange messages about users signing up", + "subscribe": { + "summary": "A user signed up.", + "message": { + "description": "A longer description of the message", + "payload": { + "type": "object", + "properties": { + "user": { + "$ref": "#/components/schemas/user" + }, + "signup": { + "$ref": "#/components/schemas/signup" + } + } + } + } + }, + "bindings": { + "amqp": { + "is": "queue", + "queue": { + "exclusive": true + } + } + } }, { - "$ref": "#/definitions/openIdConnect" + "subscribe": { + "message": { + "oneOf": [ + { + "$ref": "#/components/messages/signup" + }, + { + "$ref": "#/components/messages/login" + } + ] + } + } }, { - "$ref": "#/definitions/SaslSecurityScheme" + "description": "This application publishes WebUICommand messages to an AMQP queue on RabbitMQ brokers in the Staging and Production environments.", + "servers": [ + "rabbitmqBrokerInProd", + "rabbitmqBrokerInStaging" + ], + "subscribe": { + "message": { + "$ref": "#/components/messages/WebUICommand" + } + }, + "bindings": { + "amqp": { + "is": "queue" + } + } } - ], + ] + }, + "channels": { + "type": "object", + "description": "Holds the relative paths to the individual channel and their operations. Channel paths are relative to servers.", + "propertyNames": { + "type": "string", + "format": "uri-template", + "minLength": 1 + }, + "additionalProperties": { + "$ref": "#/definitions/channelItem" + }, "examples": [ { - "type": "userPassword" + "user/signedup": { + "subscribe": { + "message": { + "$ref": "#/components/messages/userSignedUp" + } + } + } } ] }, + "schemas": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/schema" + }, + "description": "JSON objects describing schemas the API uses." + }, + "messages": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/message" + }, + "description": "JSON objects describing the messages being consumed and produced by the API." + }, "userPassword": { "type": "object", "required": [ @@ -2735,19 +2466,6 @@ }, "additionalProperties": false }, - "HTTPSecurityScheme": { - "oneOf": [ - { - "$ref": "#/definitions/NonBearerHTTPSecurityScheme" - }, - { - "$ref": "#/definitions/BearerHTTPSecurityScheme" - }, - { - "$ref": "#/definitions/APIKeyHTTPSecurityScheme" - } - ] - }, "NonBearerHTTPSecurityScheme": { "not": { "type": "object", @@ -2874,6 +2592,77 @@ } ] }, + "HTTPSecurityScheme": { + "oneOf": [ + { + "$ref": "#/definitions/NonBearerHTTPSecurityScheme" + }, + { + "$ref": "#/definitions/BearerHTTPSecurityScheme" + }, + { + "$ref": "#/definitions/APIKeyHTTPSecurityScheme" + } + ] + }, + "oauth2Scopes": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "oauth2Flow": { + "type": "object", + "description": "Configuration details for a supported OAuth Flow", + "properties": { + "authorizationUrl": { + "type": "string", + "format": "uri", + "description": "The authorization URL to be used for this flow. This MUST be in the form of an absolute URL." + }, + "tokenUrl": { + "type": "string", + "format": "uri", + "description": "The token URL to be used for this flow. This MUST be in the form of an absolute URL." + }, + "refreshUrl": { + "type": "string", + "format": "uri", + "description": "The URL to be used for obtaining refresh tokens. This MUST be in the form of an absolute URL." + }, + "scopes": { + "$ref": "#/definitions/oauth2Scopes" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, + "additionalProperties": false, + "examples": [ + { + "type": "oauth2", + "flows": { + "implicit": { + "authorizationUrl": "https://example.com/api/oauth/dialog", + "scopes": { + "write:pets": "modify pets in your account", + "read:pets": "read your pets" + } + }, + "authorizationCode": { + "authorizationUrl": "https://example.com/api/oauth/dialog", + "tokenUrl": "https://example.com/api/oauth/token", + "scopes": { + "write:pets": "modify pets in your account", + "read:pets": "read your pets" + } + } + } + } + ] + }, "oauth2Flows": { "type": "object", "description": "Allows configuration of the supported OAuth Flows.", @@ -2984,28 +2773,25 @@ } } }, - "oauth2Flow": { + "openIdConnect": { "type": "object", - "description": "Configuration details for a supported OAuth Flow", + "required": [ + "type", + "openIdConnectUrl" + ], "properties": { - "authorizationUrl": { + "type": { "type": "string", - "format": "uri", - "description": "The authorization URL to be used for this flow. This MUST be in the form of an absolute URL." + "enum": [ + "openIdConnect" + ] }, - "tokenUrl": { - "type": "string", - "format": "uri", - "description": "The token URL to be used for this flow. This MUST be in the form of an absolute URL." + "description": { + "type": "string" }, - "refreshUrl": { + "openIdConnectUrl": { "type": "string", - "format": "uri", - "description": "The URL to be used for obtaining refresh tokens. This MUST be in the form of an absolute URL." - }, - "scopes": { - "description": "The available scopes for the OAuth2 security scheme. A map between the scope name and a short description for it.", - "$ref": "#/definitions/oauth2Scopes" + "format": "uri" } }, "patternProperties": { @@ -3013,55 +2799,24 @@ "$ref": "#/definitions/specificationExtension" } }, - "additionalProperties": false, - "examples": [ - { - "type": "oauth2", - "flows": { - "implicit": { - "authorizationUrl": "https://example.com/api/oauth/dialog", - "scopes": { - "write:pets": "modify pets in your account", - "read:pets": "read your pets" - } - }, - "authorizationCode": { - "authorizationUrl": "https://example.com/api/oauth/dialog", - "tokenUrl": "https://example.com/api/oauth/token", - "scopes": { - "write:pets": "modify pets in your account", - "read:pets": "read your pets" - } - } - } - } - ] - }, - "oauth2Scopes": { - "type": "object", - "additionalProperties": { - "type": "string" - } + "additionalProperties": false }, - "openIdConnect": { + "SaslPlainSecurityScheme": { "type": "object", "required": [ - "type", - "openIdConnectUrl" + "type" ], "properties": { "type": { "type": "string", + "description": "The type of the security scheme. Valid values", "enum": [ - "openIdConnect" + "plain" ] }, "description": { - "type": "string" - }, - "openIdConnectUrl": { "type": "string", - "format": "uri" + "description": "A short description for security scheme." } }, "patternProperties": { @@ -3069,22 +2824,14 @@ "$ref": "#/definitions/specificationExtension" } }, - "additionalProperties": false - }, - "SaslSecurityScheme": { - "oneOf": [ - { - "$ref": "#/definitions/SaslPlainSecurityScheme" - }, - { - "$ref": "#/definitions/SaslScramSecurityScheme" - }, + "additionalProperties": false, + "examples": [ { - "$ref": "#/definitions/SaslGssapiSecurityScheme" + "type": "scramSha512" } ] }, - "SaslPlainSecurityScheme": { + "SaslScramSecurityScheme": { "type": "object", "required": [ "type" @@ -3092,9 +2839,10 @@ "properties": { "type": { "type": "string", - "description": "The type of the security scheme. Valid values", + "description": "The type of the security scheme.", "enum": [ - "plain" + "scramSha256", + "scramSha512" ] }, "description": { @@ -3114,7 +2862,7 @@ } ] }, - "SaslScramSecurityScheme": { + "SaslGssapiSecurityScheme": { "type": "object", "required": [ "type" @@ -3124,54 +2872,301 @@ "type": "string", "description": "The type of the security scheme.", "enum": [ - "scramSha256", - "scramSha512" + "gssapi" ] }, - "description": { - "type": "string", - "description": "A short description for security scheme." - } - }, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" + "description": { + "type": "string", + "description": "A short description for security scheme." + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, + "additionalProperties": false, + "examples": [ + { + "type": "scramSha512" + } + ] + }, + "SaslSecurityScheme": { + "oneOf": [ + { + "$ref": "#/definitions/SaslPlainSecurityScheme" + }, + { + "$ref": "#/definitions/SaslScramSecurityScheme" + }, + { + "$ref": "#/definitions/SaslGssapiSecurityScheme" + } + ] + }, + "SecurityScheme": { + "description": "Defines a security scheme that can be used by the operations.", + "oneOf": [ + { + "$ref": "#/definitions/userPassword" + }, + { + "$ref": "#/definitions/apiKey" + }, + { + "$ref": "#/definitions/X509" + }, + { + "$ref": "#/definitions/symmetricEncryption" + }, + { + "$ref": "#/definitions/asymmetricEncryption" + }, + { + "$ref": "#/definitions/HTTPSecurityScheme" + }, + { + "$ref": "#/definitions/oauth2Flows" + }, + { + "$ref": "#/definitions/openIdConnect" + }, + { + "$ref": "#/definitions/SaslSecurityScheme" } - }, - "additionalProperties": false, + ], "examples": [ { - "type": "scramSha512" + "type": "userPassword" } ] }, - "SaslGssapiSecurityScheme": { + "components": { "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "description": "The type of the security scheme.", - "enum": [ - "gssapi" - ] - }, - "description": { - "type": "string", - "description": "A short description for security scheme." - } - }, + "description": "Holds a set of reusable objects for different aspects of the AsyncAPI specification. All objects defined within the components object will have no effect on the API unless they are explicitly referenced from properties outside the components object.", + "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { "$ref": "#/definitions/specificationExtension" } }, - "additionalProperties": false, + "properties": { + "schemas": { + "$ref": "#/definitions/schemas" + }, + "servers": { + "$ref": "#/definitions/servers" + }, + "channels": { + "$ref": "#/definitions/channels" + }, + "serverVariables": { + "$ref": "#/definitions/serverVariables" + }, + "messages": { + "$ref": "#/definitions/messages" + }, + "securitySchemes": { + "type": "object", + "patternProperties": { + "^[\\w\\d\\.\\-_]+$": { + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/SecurityScheme" + } + ] + } + } + }, + "parameters": { + "$ref": "#/definitions/parameters" + }, + "correlationIds": { + "type": "object", + "patternProperties": { + "^[\\w\\d\\.\\-_]+$": { + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/correlationId" + } + ] + } + } + }, + "operationTraits": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/operationTrait" + } + }, + "messageTraits": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/messageTrait" + } + }, + "serverBindings": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/bindingsObject" + } + }, + "channelBindings": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/bindingsObject" + } + }, + "operationBindings": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/bindingsObject" + } + }, + "messageBindings": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/bindingsObject" + } + } + }, "examples": [ { - "type": "scramSha512" + "components": { + "schemas": { + "Category": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int64" + }, + "name": { + "type": "string" + } + } + }, + "Tag": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int64" + }, + "name": { + "type": "string" + } + } + } + }, + "servers": { + "development": { + "url": "{stage}.gigantic-server.com:{port}", + "description": "Development server", + "protocol": "amqp", + "protocolVersion": "0.9.1", + "variables": { + "stage": { + "$ref": "#/components/serverVariables/stage" + }, + "port": { + "$ref": "#/components/serverVariables/port" + } + } + } + }, + "serverVariables": { + "stage": { + "default": "demo", + "description": "This value is assigned by the service provider, in this example `gigantic-server.com`" + }, + "port": { + "enum": [ + "8883", + "8884" + ], + "default": "8883" + } + }, + "channels": { + "user/signedup": { + "subscribe": { + "message": { + "$ref": "#/components/messages/userSignUp" + } + } + } + }, + "messages": { + "userSignUp": { + "summary": "Action to sign a user up.", + "description": "Multiline description of what this action does.\nHere you have another line.\n", + "tags": [ + { + "name": "user" + }, + { + "name": "signup" + } + ], + "headers": { + "type": "object", + "properties": { + "applicationInstanceId": { + "description": "Unique identifier for a given instance of the publishing application", + "type": "string" + } + } + }, + "payload": { + "type": "object", + "properties": { + "user": { + "$ref": "#/components/schemas/userCreate" + }, + "signup": { + "$ref": "#/components/schemas/signup" + } + } + } + } + }, + "parameters": { + "userId": { + "description": "Id of the user.", + "schema": { + "type": "string" + } + } + }, + "correlationIds": { + "default": { + "description": "Default Correlation ID", + "location": "$message.header#/correlationId" + } + }, + "messageTraits": { + "commonHeaders": { + "headers": { + "type": "object", + "properties": { + "my-app-header": { + "type": "integer", + "minimum": 0, + "maximum": 100 + } + } + } + } + } + } } ] } diff --git a/schemas/2.6.0.json b/schemas/2.6.0.json index cf0eefe0..ccd716cb 100644 --- a/schemas/2.6.0.json +++ b/schemas/2.6.0.json @@ -1,6 +1,5 @@ { - "$id": "http://asyncapi.com/definitions/2.6.0/asyncapi.json", - "$schema": "http://json-schema.org/draft-07/schema", + "$schema": "http://json-schema.org/draft-07/schema#", "title": "AsyncAPI 2.6.0 schema.", "type": "object", "required": [ @@ -54,70 +53,14 @@ } }, "definitions": { - "http://asyncapi.com/definitions/2.6.0/specificationExtension.json": { - "$id": "http://asyncapi.com/definitions/2.6.0/specificationExtension.json", + "specificationExtension.json": { + "$id": "specificationExtension.json", "description": "Any property starting with x- is valid.", "additionalProperties": true, "additionalItems": true }, - "http://asyncapi.com/definitions/2.6.0/info.json": { - "$id": "http://asyncapi.com/definitions/2.6.0/info.json", - "type": "object", - "description": "The object provides metadata about the API. The metadata can be used by the clients if needed.", - "required": [ - "version", - "title" - ], - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "http://asyncapi.com/definitions/2.6.0/specificationExtension.json" - } - }, - "properties": { - "title": { - "type": "string", - "description": "A unique and precise title of the API." - }, - "version": { - "type": "string", - "description": "A semantic version number of the API." - }, - "description": { - "type": "string", - "description": "A longer description of the API. Should be different from the title. CommonMark is allowed." - }, - "termsOfService": { - "type": "string", - "description": "A URL to the Terms of Service for the API. MUST be in the format of a URL.", - "format": "uri" - }, - "contact": { - "$ref": "http://asyncapi.com/definitions/2.6.0/contact.json" - }, - "license": { - "$ref": "http://asyncapi.com/definitions/2.6.0/license.json" - } - }, - "examples": [ - { - "title": "AsyncAPI Sample App", - "description": "This is a sample server.", - "termsOfService": "https://asyncapi.org/terms/", - "contact": { - "name": "API Support", - "url": "https://www.example.com/support", - "email": "support@example.com" - }, - "license": { - "name": "Apache 2.0", - "url": "https://www.apache.org/licenses/LICENSE-2.0.html" - } - } - ] - }, - "http://asyncapi.com/definitions/2.6.0/contact.json": { - "$id": "http://asyncapi.com/definitions/2.6.0/contact.json", + "contact.json": { + "$id": "contact.json", "type": "object", "description": "Contact information for the exposed API.", "additionalProperties": false, @@ -150,8 +93,8 @@ } ] }, - "http://asyncapi.com/definitions/2.6.0/license.json": { - "$id": "http://asyncapi.com/definitions/2.6.0/license.json", + "license.json": { + "$id": "license.json", "type": "object", "required": [ "name" @@ -181,91 +124,13 @@ } ] }, - "http://asyncapi.com/definitions/2.6.0/servers.json": { - "$id": "http://asyncapi.com/definitions/2.6.0/servers.json", - "description": "The Servers Object is a map of Server Objects.", - "type": "object", - "additionalProperties": { - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/2.6.0/Reference.json" - }, - { - "$ref": "http://asyncapi.com/definitions/2.6.0/server.json" - } - ] - }, - "examples": [ - { - "development": { - "url": "development.gigantic-server.com", - "description": "Development server", - "protocol": "amqp", - "protocolVersion": "0.9.1", - "tags": [ - { - "name": "env:development", - "description": "This environment is meant for developers to run their own tests" - } - ] - }, - "staging": { - "url": "staging.gigantic-server.com", - "description": "Staging server", - "protocol": "amqp", - "protocolVersion": "0.9.1", - "tags": [ - { - "name": "env:staging", - "description": "This environment is a replica of the production environment" - } - ] - }, - "production": { - "url": "api.gigantic-server.com", - "description": "Production server", - "protocol": "amqp", - "protocolVersion": "0.9.1", - "tags": [ - { - "name": "env:production", - "description": "This environment is the live environment available for final users" - } - ] - } - } - ] - }, - "http://asyncapi.com/definitions/2.6.0/Reference.json": { - "$id": "http://asyncapi.com/definitions/2.6.0/Reference.json", - "type": "object", - "required": [ - "$ref" - ], - "properties": { - "$ref": { - "$ref": "http://asyncapi.com/definitions/2.6.0/ReferenceObject.json" - } - } - }, - "http://asyncapi.com/definitions/2.6.0/ReferenceObject.json": { - "$id": "http://asyncapi.com/definitions/2.6.0/ReferenceObject.json", - "type": "string", - "description": "A simple object to allow referencing other components in the specification, internally and externally.", - "format": "uri-reference", - "examples": [ - { - "$ref": "#/components/schemas/Pet" - } - ] - }, - "http://asyncapi.com/definitions/2.6.0/server.json": { - "$id": "http://asyncapi.com/definitions/2.6.0/server.json", + "info.json": { + "$id": "info.json", "type": "object", - "description": "An object representing a message broker, a server or any other kind of computer program capable of sending and/or receiving data", + "description": "The object provides metadata about the API. The metadata can be used by the clients if needed.", "required": [ - "url", - "protocol" + "version", + "title" ], "additionalProperties": false, "patternProperties": { @@ -274,72 +139,72 @@ } }, "properties": { - "url": { + "title": { "type": "string", - "description": "A URL to the target host. This URL supports Server Variables and MAY be relative, to indicate that the host location is relative to the location where the AsyncAPI document is being served." + "description": "A unique and precise title of the API." }, - "description": { + "version": { "type": "string", - "description": "An optional string describing the host designated by the URL. CommonMark syntax MAY be used for rich text representation." + "description": "A semantic version number of the API." }, - "protocol": { + "description": { "type": "string", - "description": "The protocol this URL supports for connection. Supported protocol include, but are not limited to: amqp, amqps, http, https, ibmmq, jms, kafka, kafka-secure, anypointmq, mqtt, secure-mqtt, solace, stomp, stomps, ws, wss, mercure, googlepubsub." + "description": "A longer description of the API. Should be different from the title. CommonMark is allowed." }, - "protocolVersion": { + "termsOfService": { "type": "string", - "description": "The version of the protocol used for connection. For instance: AMQP 0.9.1, HTTP 2.0, Kafka 1.0.0, etc." - }, - "variables": { - "description": "A map between a variable name and its value. The value is used for substitution in the server's URL template.", - "$ref": "http://asyncapi.com/definitions/2.6.0/serverVariables.json" - }, - "security": { - "type": "array", - "description": "A declaration of which security mechanisms can be used with this server. The list of values includes alternative security requirement objects that can be used. ", - "items": { - "$ref": "http://asyncapi.com/definitions/2.6.0/SecurityRequirement.json" - } + "description": "A URL to the Terms of Service for the API. MUST be in the format of a URL.", + "format": "uri" }, - "bindings": { - "description": "A map where the keys describe the name of the protocol and the values describe protocol-specific definitions for the server.", - "$ref": "http://asyncapi.com/definitions/2.6.0/bindingsObject.json" + "contact": { + "$ref": "http://asyncapi.com/definitions/2.6.0/contact.json" }, - "tags": { - "type": "array", - "description": "A list of tags for logical grouping and categorization of servers.", - "items": { - "$ref": "http://asyncapi.com/definitions/2.6.0/tag.json" - }, - "uniqueItems": true + "license": { + "$ref": "http://asyncapi.com/definitions/2.6.0/license.json" } }, "examples": [ { - "url": "development.gigantic-server.com", - "description": "Development server", - "protocol": "kafka", - "protocolVersion": "1.0.0" + "title": "AsyncAPI Sample App", + "description": "This is a sample server.", + "termsOfService": "https://asyncapi.org/terms/", + "contact": { + "name": "API Support", + "url": "https://www.example.com/support", + "email": "support@example.com" + }, + "license": { + "name": "Apache 2.0", + "url": "https://www.apache.org/licenses/LICENSE-2.0.html" + } + } + ] + }, + "ReferenceObject.json": { + "$id": "ReferenceObject.json", + "type": "string", + "description": "A simple object to allow referencing other components in the specification, internally and externally.", + "format": "uri-reference", + "examples": [ + { + "$ref": "#/components/schemas/Pet" } ] }, - "http://asyncapi.com/definitions/2.6.0/serverVariables.json": { - "$id": "http://asyncapi.com/definitions/2.6.0/serverVariables.json", + "Reference.json": { + "$id": "Reference.json", "type": "object", - "description": "A map between a variable name and its value. The value is used for substitution in the server's URL template.", - "additionalProperties": { - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/2.6.0/Reference.json" - }, - { - "$ref": "http://asyncapi.com/definitions/2.6.0/serverVariable.json" - } - ] + "required": [ + "$ref" + ], + "properties": { + "$ref": { + "$ref": "http://asyncapi.com/definitions/2.6.0/ReferenceObject.json" + } } }, - "http://asyncapi.com/definitions/2.6.0/serverVariable.json": { - "$id": "http://asyncapi.com/definitions/2.6.0/serverVariable.json", + "serverVariable.json": { + "$id": "serverVariable.json", "type": "object", "description": "An object representing a Server Variable for server URL template substitution.", "additionalProperties": false, @@ -374,8 +239,23 @@ } } }, - "http://asyncapi.com/definitions/2.6.0/SecurityRequirement.json": { - "$id": "http://asyncapi.com/definitions/2.6.0/SecurityRequirement.json", + "serverVariables.json": { + "$id": "serverVariables.json", + "type": "object", + "description": "A map between a variable name and its value. The value is used for substitution in the server's URL template.", + "additionalProperties": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.6.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.6.0/serverVariable.json" + } + ] + } + }, + "SecurityRequirement.json": { + "$id": "SecurityRequirement.json", "type": "object", "description": "Lists of the required security schemes that can be used to execute an operation", "additionalProperties": { @@ -394,8 +274,8 @@ } ] }, - "http://asyncapi.com/definitions/2.6.0/bindingsObject.json": { - "$id": "http://asyncapi.com/definitions/2.6.0/bindingsObject.json", + "bindingsObject.json": { + "$id": "bindingsObject.json", "type": "object", "description": "Map describing protocol-specific definitions for a server.", "additionalProperties": true, @@ -420,26 +300,23 @@ "pulsar": {} } }, - "http://asyncapi.com/definitions/2.6.0/tag.json": { - "$id": "http://asyncapi.com/definitions/2.6.0/tag.json", + "externalDocs.json": { + "$id": "externalDocs.json", "type": "object", - "description": "Allows adding meta data to a single tag.", "additionalProperties": false, + "description": "Allows referencing an external resource for extended documentation.", "required": [ - "name" + "url" ], "properties": { - "name": { - "type": "string", - "description": "The name of the tag." - }, "description": { "type": "string", - "description": "A short description for the tag." + "description": "A short description of the target documentation." }, - "externalDocs": { - "description": "Additional external documentation for this tag.", - "$ref": "http://asyncapi.com/definitions/2.6.0/externalDocs.json" + "url": { + "type": "string", + "format": "uri", + "description": "The URL for the target documentation. This MUST be in the form of an absolute URL." } }, "patternProperties": { @@ -449,28 +326,30 @@ }, "examples": [ { - "name": "user", - "description": "User-related messages" + "description": "Find more info here", + "url": "https://example.com" } ] }, - "http://asyncapi.com/definitions/2.6.0/externalDocs.json": { - "$id": "http://asyncapi.com/definitions/2.6.0/externalDocs.json", + "tag.json": { + "$id": "tag.json", "type": "object", + "description": "Allows adding meta data to a single tag.", "additionalProperties": false, - "description": "Allows referencing an external resource for extended documentation.", "required": [ - "url" + "name" ], "properties": { - "description": { + "name": { "type": "string", - "description": "A short description of the target documentation." + "description": "The name of the tag." }, - "url": { + "description": { "type": "string", - "format": "uri", - "description": "The URL for the target documentation. This MUST be in the form of an absolute URL." + "description": "A short description for the tag." + }, + "externalDocs": { + "$ref": "http://asyncapi.com/definitions/2.6.0/externalDocs.json" } }, "patternProperties": { @@ -480,39 +359,19 @@ }, "examples": [ { - "description": "Find more info here", - "url": "https://example.com" - } - ] - }, - "http://asyncapi.com/definitions/2.6.0/channels.json": { - "$id": "http://asyncapi.com/definitions/2.6.0/channels.json", - "type": "object", - "description": "Holds the relative paths to the individual channel and their operations. Channel paths are relative to servers.", - "propertyNames": { - "type": "string", - "format": "uri-template", - "minLength": 1 - }, - "additionalProperties": { - "$ref": "http://asyncapi.com/definitions/2.6.0/channelItem.json" - }, - "examples": [ - { - "user/signedup": { - "subscribe": { - "message": { - "$ref": "#/components/messages/userSignedUp" - } - } - } + "name": "user", + "description": "User-related messages" } ] }, - "http://asyncapi.com/definitions/2.6.0/channelItem.json": { - "$id": "http://asyncapi.com/definitions/2.6.0/channelItem.json", + "server.json": { + "$id": "server.json", "type": "object", - "description": "Describes the operations available on a single channel.", + "description": "An object representing a message broker, a server or any other kind of computer program capable of sending and/or receiving data", + "required": [ + "url", + "protocol" + ], "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { @@ -520,357 +379,161 @@ } }, "properties": { - "$ref": { - "$ref": "http://asyncapi.com/definitions/2.6.0/ReferenceObject.json" - }, - "parameters": { - "$ref": "http://asyncapi.com/definitions/2.6.0/parameters.json" + "url": { + "type": "string", + "description": "A URL to the target host. This URL supports Server Variables and MAY be relative, to indicate that the host location is relative to the location where the AsyncAPI document is being served." }, "description": { "type": "string", - "description": "A description of the channel." + "description": "An optional string describing the host designated by the URL. CommonMark syntax MAY be used for rich text representation." }, - "servers": { - "type": "array", - "description": "The names of the servers on which this channel is available. If absent or empty then this channel must be available on all servers.", - "items": { - "type": "string" - }, - "uniqueItems": true + "protocol": { + "type": "string", + "description": "The protocol this URL supports for connection. Supported protocol include, but are not limited to: amqp, amqps, http, https, ibmmq, jms, kafka, kafka-secure, anypointmq, mqtt, secure-mqtt, solace, stomp, stomps, ws, wss, mercure, googlepubsub." }, - "publish": { - "$ref": "http://asyncapi.com/definitions/2.6.0/operation.json" + "protocolVersion": { + "type": "string", + "description": "The version of the protocol used for connection. For instance: AMQP 0.9.1, HTTP 2.0, Kafka 1.0.0, etc." }, - "subscribe": { - "$ref": "http://asyncapi.com/definitions/2.6.0/operation.json" + "variables": { + "$ref": "http://asyncapi.com/definitions/2.6.0/serverVariables.json" }, - "deprecated": { - "type": "boolean", - "default": false + "security": { + "type": "array", + "description": "A declaration of which security mechanisms can be used with this server. The list of values includes alternative security requirement objects that can be used. ", + "items": { + "$ref": "http://asyncapi.com/definitions/2.6.0/SecurityRequirement.json" + } }, "bindings": { "$ref": "http://asyncapi.com/definitions/2.6.0/bindingsObject.json" + }, + "tags": { + "type": "array", + "description": "A list of tags for logical grouping and categorization of servers.", + "items": { + "$ref": "http://asyncapi.com/definitions/2.6.0/tag.json" + }, + "uniqueItems": true } }, "examples": [ { - "description": "This channel is used to exchange messages about users signing up", - "subscribe": { - "summary": "A user signed up.", - "message": { - "description": "A longer description of the message", - "payload": { - "type": "object", - "properties": { - "user": { - "$ref": "#/components/schemas/user" - }, - "signup": { - "$ref": "#/components/schemas/signup" - } - } - } - } - }, - "bindings": { - "amqp": { - "is": "queue", - "queue": { - "exclusive": true - } - } - } - }, - { - "subscribe": { - "message": { - "oneOf": [ - { - "$ref": "#/components/messages/signup" - }, - { - "$ref": "#/components/messages/login" - } - ] - } - } - }, - { - "description": "This application publishes WebUICommand messages to an AMQP queue on RabbitMQ brokers in the Staging and Production environments.", - "servers": [ - "rabbitmqBrokerInProd", - "rabbitmqBrokerInStaging" - ], - "subscribe": { - "message": { - "$ref": "#/components/messages/WebUICommand" - } - }, - "bindings": { - "amqp": { - "is": "queue" - } - } + "url": "development.gigantic-server.com", + "description": "Development server", + "protocol": "kafka", + "protocolVersion": "1.0.0" } ] }, - "http://asyncapi.com/definitions/2.6.0/parameters.json": { - "$id": "http://asyncapi.com/definitions/2.6.0/parameters.json", + "servers.json": { + "$id": "servers.json", + "description": "The Servers Object is a map of Server Objects.", "type": "object", - "description": "JSON objects describing reusable channel parameters.", "additionalProperties": { "oneOf": [ { "$ref": "http://asyncapi.com/definitions/2.6.0/Reference.json" }, { - "$ref": "http://asyncapi.com/definitions/2.6.0/parameter.json" + "$ref": "http://asyncapi.com/definitions/2.6.0/server.json" } ] }, "examples": [ { - "user/{userId}/signup": { - "parameters": { - "userId": { - "description": "Id of the user.", - "schema": { - "type": "string" - } + "development": { + "url": "development.gigantic-server.com", + "description": "Development server", + "protocol": "amqp", + "protocolVersion": "0.9.1", + "tags": [ + { + "name": "env:development", + "description": "This environment is meant for developers to run their own tests" } - }, - "subscribe": { - "message": { - "$ref": "#/components/messages/userSignedUp" + ] + }, + "staging": { + "url": "staging.gigantic-server.com", + "description": "Staging server", + "protocol": "amqp", + "protocolVersion": "0.9.1", + "tags": [ + { + "name": "env:staging", + "description": "This environment is a replica of the production environment" } - } + ] + }, + "production": { + "url": "api.gigantic-server.com", + "description": "Production server", + "protocol": "amqp", + "protocolVersion": "0.9.1", + "tags": [ + { + "name": "env:production", + "description": "This environment is the live environment available for final users" + } + ] } } ] }, - "http://asyncapi.com/definitions/2.6.0/parameter.json": { - "$id": "http://asyncapi.com/definitions/2.6.0/parameter.json", - "description": "Describes a parameter included in a channel name.", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "http://asyncapi.com/definitions/2.6.0/specificationExtension.json" + "http://json-schema.org/draft-07/schema": { + "$id": "http://json-schema.org/draft-07/schema", + "title": "Core schema meta-schema", + "definitions": { + "schemaArray": { + "type": "array", + "minItems": 1, + "items": { + "$ref": "#" + } + }, + "nonNegativeInteger": { + "type": "integer", + "minimum": 0 + }, + "nonNegativeIntegerDefault0": { + "allOf": [ + { + "$ref": "#/definitions/nonNegativeInteger" + }, + { + "default": 0 + } + ] + }, + "simpleTypes": { + "enum": [ + "array", + "boolean", + "integer", + "null", + "number", + "object", + "string" + ] + }, + "stringArray": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true, + "default": [] } }, + "type": [ + "object", + "boolean" + ], "properties": { - "description": { + "$id": { "type": "string", - "description": "A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed." - }, - "schema": { - "$ref": "http://asyncapi.com/definitions/2.6.0/schema.json" - }, - "location": { - "type": "string", - "description": "A runtime expression that specifies the location of the parameter value", - "pattern": "^\\$message\\.(header|payload)#(\\/(([^\\/~])|(~[01]))*)*" - } - }, - "examples": [ - { - "user/{userId}/signup": { - "parameters": { - "userId": { - "description": "Id of the user.", - "schema": { - "type": "string" - }, - "location": "$message.payload#/user/id" - } - }, - "subscribe": { - "message": { - "$ref": "#/components/messages/userSignedUp" - } - } - } - } - ] - }, - "http://asyncapi.com/definitions/2.6.0/schema.json": { - "$id": "http://asyncapi.com/definitions/2.6.0/schema.json", - "description": "The Schema Object allows the definition of input and output data types. These types can be objects, but also primitives and arrays.", - "allOf": [ - { - "$ref": "http://json-schema.org/draft-07/schema#" - }, - { - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "http://asyncapi.com/definitions/2.6.0/specificationExtension.json" - } - }, - "properties": { - "additionalProperties": { - "anyOf": [ - { - "$ref": "http://asyncapi.com/definitions/2.6.0/schema.json" - }, - { - "type": "boolean" - } - ], - "default": {} - }, - "items": { - "anyOf": [ - { - "$ref": "http://asyncapi.com/definitions/2.6.0/schema.json" - }, - { - "type": "array", - "minItems": 1, - "items": { - "$ref": "http://asyncapi.com/definitions/2.6.0/schema.json" - } - } - ], - "default": {} - }, - "allOf": { - "type": "array", - "minItems": 1, - "items": { - "$ref": "http://asyncapi.com/definitions/2.6.0/schema.json" - } - }, - "oneOf": { - "type": "array", - "minItems": 1, - "items": { - "$ref": "http://asyncapi.com/definitions/2.6.0/schema.json" - } - }, - "anyOf": { - "type": "array", - "minItems": 1, - "items": { - "$ref": "http://asyncapi.com/definitions/2.6.0/schema.json" - } - }, - "not": { - "$ref": "http://asyncapi.com/definitions/2.6.0/schema.json" - }, - "properties": { - "type": "object", - "additionalProperties": { - "$ref": "http://asyncapi.com/definitions/2.6.0/schema.json" - }, - "default": {} - }, - "patternProperties": { - "type": "object", - "additionalProperties": { - "$ref": "http://asyncapi.com/definitions/2.6.0/schema.json" - }, - "default": {} - }, - "propertyNames": { - "$ref": "http://asyncapi.com/definitions/2.6.0/schema.json" - }, - "contains": { - "$ref": "http://asyncapi.com/definitions/2.6.0/schema.json" - }, - "discriminator": { - "type": "string", - "description": "Adds support for polymorphism. The discriminator is the schema property name that is used to differentiate between other schema that inherit this schema. " - }, - "externalDocs": { - "description": "Additional external documentation for this schema.", - "$ref": "http://asyncapi.com/definitions/2.6.0/externalDocs.json" - }, - "deprecated": { - "type": "boolean", - "default": false, - "description": "Specifies that a schema is deprecated and SHOULD be transitioned out of usage" - } - } - } - ], - "examples": [ - { - "type": "string", - "format": "email" - }, - { - "type": "object", - "required": [ - "name" - ], - "properties": { - "name": { - "type": "string" - }, - "address": { - "$ref": "#/components/schemas/Address" - }, - "age": { - "type": "integer", - "format": "int32", - "minimum": 0 - } - } - } - ] - }, - "http://json-schema.org/draft-07/schema": { - "$id": "http://json-schema.org/draft-07/schema", - "title": "Core schema meta-schema", - "definitions": { - "schemaArray": { - "type": "array", - "minItems": 1, - "items": { - "$ref": "#" - } - }, - "nonNegativeInteger": { - "type": "integer", - "minimum": 0 - }, - "nonNegativeIntegerDefault0": { - "allOf": [ - { - "$ref": "#/definitions/nonNegativeInteger" - }, - { - "default": 0 - } - ] - }, - "simpleTypes": { - "enum": [ - "array", - "boolean", - "integer", - "null", - "number", - "object", - "string" - ] - }, - "stringArray": { - "type": "array", - "items": { - "type": "string" - }, - "uniqueItems": true, - "default": [] - } - }, - "type": [ - "object", - "boolean" - ], - "properties": { - "$id": { - "type": "string", - "format": "uri-reference" + "format": "uri-reference" }, "$schema": { "type": "string", @@ -1062,70 +725,200 @@ }, "default": true }, - "http://asyncapi.com/definitions/2.6.0/operation.json": { - "$id": "http://asyncapi.com/definitions/2.6.0/operation.json", - "type": "object", - "description": "Describes a publish or a subscribe operation. This provides a place to document how and why messages are sent and received.", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "http://asyncapi.com/definitions/2.6.0/specificationExtension.json" - } - }, - "properties": { - "traits": { - "type": "array", - "description": "A list of traits to apply to the operation object.", - "items": { - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/2.6.0/Reference.json" - }, - { - "$ref": "http://asyncapi.com/definitions/2.6.0/operationTrait.json" - } - ] - } - }, - "summary": { - "type": "string", - "description": "A short summary of what the operation is about." - }, - "description": { - "type": "string", - "description": "A verbose explanation of the operation." - }, - "security": { - "type": "array", - "description": "A declaration of which security mechanisms are associated with this operation.", - "items": { - "$ref": "http://asyncapi.com/definitions/2.6.0/SecurityRequirement.json" - } + "schema.json": { + "$id": "schema.json", + "description": "The Schema Object allows the definition of input and output data types. These types can be objects, but also primitives and arrays.", + "allOf": [ + { + "$ref": "http://json-schema.org/draft-07/schema#" }, - "tags": { - "type": "array", - "description": "A list of tags for logical grouping and categorization of operations.", - "items": { - "$ref": "http://asyncapi.com/definitions/2.6.0/tag.json" + { + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.6.0/specificationExtension.json" + } }, - "uniqueItems": true - }, - "externalDocs": { - "$ref": "http://asyncapi.com/definitions/2.6.0/externalDocs.json" + "properties": { + "additionalProperties": { + "anyOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.6.0/schema.json" + }, + { + "type": "boolean" + } + ], + "default": {} + }, + "items": { + "anyOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.6.0/schema.json" + }, + { + "type": "array", + "minItems": 1, + "items": { + "$ref": "http://asyncapi.com/definitions/2.6.0/schema.json" + } + } + ], + "default": {} + }, + "allOf": { + "type": "array", + "minItems": 1, + "items": { + "$ref": "http://asyncapi.com/definitions/2.6.0/schema.json" + } + }, + "oneOf": { + "type": "array", + "minItems": 1, + "items": { + "$ref": "http://asyncapi.com/definitions/2.6.0/schema.json" + } + }, + "anyOf": { + "type": "array", + "minItems": 1, + "items": { + "$ref": "http://asyncapi.com/definitions/2.6.0/schema.json" + } + }, + "not": { + "$ref": "http://asyncapi.com/definitions/2.6.0/schema.json" + }, + "properties": { + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/2.6.0/schema.json" + }, + "default": {} + }, + "patternProperties": { + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/2.6.0/schema.json" + }, + "default": {} + }, + "propertyNames": { + "$ref": "http://asyncapi.com/definitions/2.6.0/schema.json" + }, + "contains": { + "$ref": "http://asyncapi.com/definitions/2.6.0/schema.json" + }, + "discriminator": { + "type": "string", + "description": "Adds support for polymorphism. The discriminator is the schema property name that is used to differentiate between other schema that inherit this schema. " + }, + "externalDocs": { + "$ref": "http://asyncapi.com/definitions/2.6.0/externalDocs.json" + }, + "deprecated": { + "type": "boolean", + "default": false, + "description": "Specifies that a schema is deprecated and SHOULD be transitioned out of usage" + } + } + } + ], + "examples": [ + { + "type": "string", + "format": "email" }, - "operationId": { - "type": "string" + { + "type": "object", + "required": [ + "name" + ], + "properties": { + "name": { + "type": "string" + }, + "address": { + "$ref": "#/components/schemas/Address" + }, + "age": { + "type": "integer", + "format": "int32", + "minimum": 0 + } + } + } + ] + }, + "parameter.json": { + "$id": "parameter.json", + "description": "Describes a parameter included in a channel name.", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.6.0/specificationExtension.json" + } + }, + "properties": { + "description": { + "type": "string", + "description": "A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed." }, - "bindings": { - "$ref": "http://asyncapi.com/definitions/2.6.0/bindingsObject.json" + "schema": { + "$ref": "http://asyncapi.com/definitions/2.6.0/schema.json" }, - "message": { - "$ref": "http://asyncapi.com/definitions/2.6.0/message.json" + "location": { + "type": "string", + "description": "A runtime expression that specifies the location of the parameter value", + "pattern": "^\\$message\\.(header|payload)#(\\/(([^\\/~])|(~[01]))*)*" } }, "examples": [ { - "user/signedup": { + "user/{userId}/signup": { + "parameters": { + "userId": { + "description": "Id of the user.", + "schema": { + "type": "string" + }, + "location": "$message.payload#/user/id" + } + }, + "subscribe": { + "message": { + "$ref": "#/components/messages/userSignedUp" + } + } + } + } + ] + }, + "parameters.json": { + "$id": "parameters.json", + "type": "object", + "description": "JSON objects describing reusable channel parameters.", + "additionalProperties": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.6.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.6.0/parameter.json" + } + ] + }, + "examples": [ + { + "user/{userId}/signup": { + "parameters": { + "userId": { + "description": "Id of the user.", + "schema": { + "type": "string" + } + } + }, "subscribe": { "message": { "$ref": "#/components/messages/userSignedUp" @@ -1135,8 +928,8 @@ } ] }, - "http://asyncapi.com/definitions/2.6.0/operationTrait.json": { - "$id": "http://asyncapi.com/definitions/2.6.0/operationTrait.json", + "operationTrait.json": { + "$id": "operationTrait.json", "type": "object", "description": "Describes a trait that MAY be applied to an Operation Object.", "additionalProperties": false, @@ -1190,445 +983,68 @@ } ] }, - "http://asyncapi.com/definitions/2.6.0/message.json": { - "$id": "http://asyncapi.com/definitions/2.6.0/message.json", - "description": "Describes a message received on a given channel and operation.", - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/2.6.0/Reference.json" + "correlationId.json": { + "$id": "correlationId.json", + "type": "object", + "description": "An object that specifies an identifier at design time that can used for message tracing and correlation.", + "required": [ + "location" + ], + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.6.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]))*)*" + } + }, + "examples": [ { - "oneOf": [ + "description": "Default Correlation ID", + "location": "$message.header#/correlationId" + } + ] + }, + "messageTrait.json": { + "$id": "messageTrait.json", + "type": "object", + "description": "Describes a trait that MAY be applied to a Message Object.", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.6.0/specificationExtension.json" + } + }, + "properties": { + "schemaFormat": { + "type": "string", + "description": "A string containing the name of the schema format/language used to define the message payload." + }, + "contentType": { + "type": "string", + "description": "The content type to use when encoding/decoding a message's payload." + }, + "headers": { + "description": "Schema definition of the application headers.", + "allOf": [ { - "type": "object", - "required": [ - "oneOf" - ], - "additionalProperties": false, - "properties": { - "oneOf": { - "type": "array", - "items": { - "$ref": "http://asyncapi.com/definitions/2.6.0/message.json" - } - } - } + "$ref": "http://asyncapi.com/definitions/2.6.0/schema.json" }, { - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "http://asyncapi.com/definitions/2.6.0/specificationExtension.json" - } - }, "properties": { - "schemaFormat": { - "type": "string" - }, - "contentType": { - "type": "string" - }, - "headers": { - "allOf": [ - { - "$ref": "http://asyncapi.com/definitions/2.6.0/schema.json" - }, - { - "properties": { - "type": { - "const": "object" - } - } - } - ] - }, - "messageId": { - "type": "string" - }, - "payload": {}, - "correlationId": { - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/2.6.0/Reference.json" - }, - { - "$ref": "http://asyncapi.com/definitions/2.6.0/correlationId.json" - } - ] - }, - "tags": { - "type": "array", - "items": { - "$ref": "http://asyncapi.com/definitions/2.6.0/tag.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." - }, - "externalDocs": { - "$ref": "http://asyncapi.com/definitions/2.6.0/externalDocs.json" - }, - "deprecated": { - "type": "boolean", - "default": false - }, - "examples": { - "type": "array", - "description": "List of examples.", - "items": { - "type": "object", - "additionalProperties": false, - "anyOf": [ - { - "required": [ - "payload" - ] - }, - { - "required": [ - "headers" - ] - } - ], - "properties": { - "name": { - "type": "string", - "description": "Machine readable name of the message example." - }, - "summary": { - "type": "string", - "description": "A brief summary of the message example." - }, - "headers": { - "type": "object", - "description": "Schema definition of the application headers." - }, - "payload": { - "description": "Definition of the message payload. It can be of any type" - } - } - } - }, - "bindings": { - "$ref": "http://asyncapi.com/definitions/2.6.0/bindingsObject.json" - }, - "traits": { - "type": "array", - "items": { - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/2.6.0/Reference.json" - }, - { - "$ref": "http://asyncapi.com/definitions/2.6.0/messageTrait.json" - } - ] - } - } - }, - "allOf": [ - { - "if": { - "not": { - "required": [ - "schemaFormat" - ] - } - }, - "then": { - "properties": { - "payload": { - "$ref": "http://asyncapi.com/definitions/2.6.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" - ] - } - } - }, - "then": { - "properties": { - "payload": { - "$ref": "http://asyncapi.com/definitions/2.6.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/2.6.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/2.6.0/avroSchema_v1.json" - } - } - } + "type": { + "const": "object" } - ] - } - ] - } - ], - "examples": [ - { - "messageId": "userSignup", - "name": "UserSignup", - "title": "User signup", - "summary": "Action to sign a user up.", - "description": "A longer description", - "contentType": "application/json", - "tags": [ - { - "name": "user" - }, - { - "name": "signup" - }, - { - "name": "register" - } - ], - "headers": { - "type": "object", - "properties": { - "correlationId": { - "description": "Correlation ID set by application", - "type": "string" - }, - "applicationInstanceId": { - "description": "Unique identifier for a given instance of the publishing application", - "type": "string" - } - } - }, - "payload": { - "type": "object", - "properties": { - "user": { - "$ref": "#/components/schemas/userCreate" - }, - "signup": { - "$ref": "#/components/schemas/signup" - } - } - }, - "correlationId": { - "description": "Default Correlation ID", - "location": "$message.header#/correlationId" - }, - "traits": [ - { - "$ref": "#/components/messageTraits/commonHeaders" - } - ], - "examples": [ - { - "name": "SimpleSignup", - "summary": "A simple UserSignup example message", - "headers": { - "correlationId": "my-correlation-id", - "applicationInstanceId": "myInstanceId" - }, - "payload": { - "user": { - "someUserKey": "someUserValue" - }, - "signup": { - "someSignupKey": "someSignupValue" - } - } - } - ] - }, - { - "messageId": "userSignup", - "name": "UserSignup", - "title": "User signup", - "summary": "Action to sign a user up.", - "description": "A longer description", - "tags": [ - { - "name": "user" - }, - { - "name": "signup" - }, - { - "name": "register" - } - ], - "schemaFormat": "application/vnd.apache.avro+json;version=1.9.0", - "payload": { - "$ref": "path/to/user-create.avsc#/UserCreate" - } - } - ] - }, - "http://asyncapi.com/definitions/2.6.0/correlationId.json": { - "$id": "http://asyncapi.com/definitions/2.6.0/correlationId.json", - "type": "object", - "description": "An object that specifies an identifier at design time that can used for message tracing and correlation.", - "required": [ - "location" - ], - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "http://asyncapi.com/definitions/2.6.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]))*)*" - } - }, - "examples": [ - { - "description": "Default Correlation ID", - "location": "$message.header#/correlationId" - } - ] - }, - "http://asyncapi.com/definitions/2.6.0/messageTrait.json": { - "$id": "http://asyncapi.com/definitions/2.6.0/messageTrait.json", - "type": "object", - "description": "Describes a trait that MAY be applied to a Message Object.", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "http://asyncapi.com/definitions/2.6.0/specificationExtension.json" - } - }, - "properties": { - "schemaFormat": { - "type": "string", - "description": "A string containing the name of the schema format/language used to define the message payload." - }, - "contentType": { - "type": "string", - "description": "The content type to use when encoding/decoding a message's payload." - }, - "headers": { - "description": "Schema definition of the application headers.", - "allOf": [ - { - "$ref": "http://asyncapi.com/definitions/2.6.0/schema.json" - }, - { - "properties": { - "type": { - "const": "object" - } - } + } } ] }, @@ -1726,8 +1142,8 @@ } ] }, - "http://asyncapi.com/definitions/2.6.0/openapiSchema_3_0.json": { - "$id": "http://asyncapi.com/definitions/2.6.0/openapiSchema_3_0.json", + "openapiSchema_3_0.json": { + "$id": "openapiSchema_3_0.json", "type": "object", "definitions": { "ExternalDocumentation": { @@ -2013,8 +1429,8 @@ }, "additionalProperties": false }, - "http://asyncapi.com/definitions/2.6.0/avroSchema_v1.json": { - "$id": "http://asyncapi.com/definitions/2.6.0/avroSchema_v1.json", + "avroSchema_v1.json": { + "$id": "avroSchema_v1.json", "definitions": { "avroSchema": { "title": "Avro Schema", @@ -2239,100 +1655,477 @@ "items": { "$ref": "#/definitions/types" } - }, - "required": [ - "type", - "items" + }, + "required": [ + "type", + "items" + ] + }, + "avroMap": { + "title": "Map", + "description": "A map of values", + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "map" + }, + "name": { + "$ref": "#/definitions/name" + }, + "namespace": { + "$ref": "#/definitions/namespace" + }, + "doc": { + "type": "string" + }, + "aliases": { + "type": "array", + "items": { + "$ref": "#/definitions/name" + } + }, + "values": { + "$ref": "#/definitions/types" + } + }, + "required": [ + "type", + "values" + ] + }, + "avroFixed": { + "title": "Fixed", + "description": "A fixed sized array of bytes", + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "fixed" + }, + "name": { + "$ref": "#/definitions/name" + }, + "namespace": { + "$ref": "#/definitions/namespace" + }, + "doc": { + "type": "string" + }, + "aliases": { + "type": "array", + "items": { + "$ref": "#/definitions/name" + } + }, + "size": { + "type": "number" + } + }, + "required": [ + "type", + "name", + "size" + ] + }, + "name": { + "type": "string", + "pattern": "^[A-Za-z_][A-Za-z0-9_]*$" + }, + "namespace": { + "type": "string", + "pattern": "^([A-Za-z_][A-Za-z0-9_]*(\\.[A-Za-z_][A-Za-z0-9_]*)*)*$" + } + }, + "description": "Json-Schema definition for Avro AVSC files.", + "oneOf": [ + { + "$ref": "#/definitions/avroSchema" + } + ], + "title": "Avro Schema Definition" + }, + "message.json": { + "$id": "message.json", + "description": "Describes a message received on a given channel and operation.", + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.6.0/Reference.json" + }, + { + "oneOf": [ + { + "type": "object", + "required": [ + "oneOf" + ], + "additionalProperties": false, + "properties": { + "oneOf": { + "type": "array", + "items": { + "$ref": "http://asyncapi.com/definitions/2.6.0/message.json" + } + } + } + }, + { + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.6.0/specificationExtension.json" + } + }, + "properties": { + "schemaFormat": { + "type": "string" + }, + "contentType": { + "type": "string" + }, + "headers": { + "allOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.6.0/schema.json" + }, + { + "properties": { + "type": { + "const": "object" + } + } + } + ] + }, + "messageId": { + "type": "string" + }, + "payload": {}, + "correlationId": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.6.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.6.0/correlationId.json" + } + ] + }, + "tags": { + "type": "array", + "items": { + "$ref": "http://asyncapi.com/definitions/2.6.0/tag.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." + }, + "externalDocs": { + "$ref": "http://asyncapi.com/definitions/2.6.0/externalDocs.json" + }, + "deprecated": { + "type": "boolean", + "default": false + }, + "examples": { + "type": "array", + "description": "List of examples.", + "items": { + "type": "object", + "additionalProperties": false, + "anyOf": [ + { + "required": [ + "payload" + ] + }, + { + "required": [ + "headers" + ] + } + ], + "properties": { + "name": { + "type": "string", + "description": "Machine readable name of the message example." + }, + "summary": { + "type": "string", + "description": "A brief summary of the message example." + }, + "headers": { + "type": "object", + "description": "Schema definition of the application headers." + }, + "payload": { + "description": "Definition of the message payload. It can be of any type" + } + } + } + }, + "bindings": { + "$ref": "http://asyncapi.com/definitions/2.6.0/bindingsObject.json" + }, + "traits": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.6.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.6.0/messageTrait.json" + } + ] + } + } + }, + "allOf": [ + { + "if": { + "not": { + "required": [ + "schemaFormat" + ] + } + }, + "then": { + "properties": { + "payload": { + "$ref": "http://asyncapi.com/definitions/2.6.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" + ] + } + } + }, + "then": { + "properties": { + "payload": { + "$ref": "http://asyncapi.com/definitions/2.6.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/2.6.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/2.6.0/avroSchema_v1.json" + } + } + } + } + ] + } ] - }, - "avroMap": { - "title": "Map", - "description": "A map of values", - "type": "object", - "properties": { - "type": { - "type": "string", - "const": "map" - }, - "name": { - "$ref": "#/definitions/name" - }, - "namespace": { - "$ref": "#/definitions/namespace" + } + ], + "examples": [ + { + "messageId": "userSignup", + "name": "UserSignup", + "title": "User signup", + "summary": "Action to sign a user up.", + "description": "A longer description", + "contentType": "application/json", + "tags": [ + { + "name": "user" }, - "doc": { - "type": "string" + { + "name": "signup" }, - "aliases": { - "type": "array", - "items": { - "$ref": "#/definitions/name" + { + "name": "register" + } + ], + "headers": { + "type": "object", + "properties": { + "correlationId": { + "description": "Correlation ID set by application", + "type": "string" + }, + "applicationInstanceId": { + "description": "Unique identifier for a given instance of the publishing application", + "type": "string" } - }, - "values": { - "$ref": "#/definitions/types" } }, - "required": [ - "type", - "values" - ] - }, - "avroFixed": { - "title": "Fixed", - "description": "A fixed sized array of bytes", - "type": "object", - "properties": { - "type": { - "type": "string", - "const": "fixed" - }, - "name": { - "$ref": "#/definitions/name" - }, - "namespace": { - "$ref": "#/definitions/namespace" - }, - "doc": { - "type": "string" - }, - "aliases": { - "type": "array", - "items": { - "$ref": "#/definitions/name" + "payload": { + "type": "object", + "properties": { + "user": { + "$ref": "#/components/schemas/userCreate" + }, + "signup": { + "$ref": "#/components/schemas/signup" } - }, - "size": { - "type": "number" } }, - "required": [ - "type", - "name", - "size" + "correlationId": { + "description": "Default Correlation ID", + "location": "$message.header#/correlationId" + }, + "traits": [ + { + "$ref": "#/components/messageTraits/commonHeaders" + } + ], + "examples": [ + { + "name": "SimpleSignup", + "summary": "A simple UserSignup example message", + "headers": { + "correlationId": "my-correlation-id", + "applicationInstanceId": "myInstanceId" + }, + "payload": { + "user": { + "someUserKey": "someUserValue" + }, + "signup": { + "someSignupKey": "someSignupValue" + } + } + } ] }, - "name": { - "type": "string", - "pattern": "^[A-Za-z_][A-Za-z0-9_]*$" - }, - "namespace": { - "type": "string", - "pattern": "^([A-Za-z_][A-Za-z0-9_]*(\\.[A-Za-z_][A-Za-z0-9_]*)*)*$" - } - }, - "description": "Json-Schema definition for Avro AVSC files.", - "oneOf": [ { - "$ref": "#/definitions/avroSchema" + "messageId": "userSignup", + "name": "UserSignup", + "title": "User signup", + "summary": "Action to sign a user up.", + "description": "A longer description", + "tags": [ + { + "name": "user" + }, + { + "name": "signup" + }, + { + "name": "register" + } + ], + "schemaFormat": "application/vnd.apache.avro+json;version=1.9.0", + "payload": { + "$ref": "path/to/user-create.avsc#/UserCreate" + } } - ], - "title": "Avro Schema Definition" + ] }, - "http://asyncapi.com/definitions/2.6.0/components.json": { - "$id": "http://asyncapi.com/definitions/2.6.0/components.json", + "operation.json": { + "$id": "operation.json", "type": "object", - "description": "Holds a set of reusable objects for different aspects of the AsyncAPI specification. All objects defined within the components object will have no effect on the API unless they are explicitly referenced from properties outside the components object.", + "description": "Describes a publish or a subscribe operation. This provides a place to document how and why messages are sent and received.", "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { @@ -2340,280 +2133,215 @@ } }, "properties": { - "schemas": { - "$ref": "http://asyncapi.com/definitions/2.6.0/schemas.json" + "traits": { + "type": "array", + "description": "A list of traits to apply to the operation object.", + "items": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.6.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.6.0/operationTrait.json" + } + ] + } }, - "servers": { - "$ref": "http://asyncapi.com/definitions/2.6.0/servers.json" + "summary": { + "type": "string", + "description": "A short summary of what the operation is about." }, - "channels": { - "$ref": "http://asyncapi.com/definitions/2.6.0/channels.json" + "description": { + "type": "string", + "description": "A verbose explanation of the operation." }, - "serverVariables": { - "$ref": "http://asyncapi.com/definitions/2.6.0/serverVariables.json" + "security": { + "type": "array", + "description": "A declaration of which security mechanisms are associated with this operation.", + "items": { + "$ref": "http://asyncapi.com/definitions/2.6.0/SecurityRequirement.json" + } }, - "messages": { - "$ref": "http://asyncapi.com/definitions/2.6.0/messages.json" + "tags": { + "type": "array", + "description": "A list of tags for logical grouping and categorization of operations.", + "items": { + "$ref": "http://asyncapi.com/definitions/2.6.0/tag.json" + }, + "uniqueItems": true }, - "securitySchemes": { - "type": "object", - "patternProperties": { - "^[\\w\\d\\.\\-_]+$": { - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/2.6.0/Reference.json" - }, - { - "$ref": "http://asyncapi.com/definitions/2.6.0/SecurityScheme.json" - } - ] + "externalDocs": { + "$ref": "http://asyncapi.com/definitions/2.6.0/externalDocs.json" + }, + "operationId": { + "type": "string" + }, + "bindings": { + "$ref": "http://asyncapi.com/definitions/2.6.0/bindingsObject.json" + }, + "message": { + "$ref": "http://asyncapi.com/definitions/2.6.0/message.json" + } + }, + "examples": [ + { + "user/signedup": { + "subscribe": { + "message": { + "$ref": "#/components/messages/userSignedUp" + } } } + } + ] + }, + "channelItem.json": { + "$id": "channelItem.json", + "type": "object", + "description": "Describes the operations available on a single channel.", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.6.0/specificationExtension.json" + } + }, + "properties": { + "$ref": { + "$ref": "http://asyncapi.com/definitions/2.6.0/ReferenceObject.json" }, "parameters": { "$ref": "http://asyncapi.com/definitions/2.6.0/parameters.json" }, - "correlationIds": { - "type": "object", - "patternProperties": { - "^[\\w\\d\\.\\-_]+$": { - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/2.6.0/Reference.json" - }, - { - "$ref": "http://asyncapi.com/definitions/2.6.0/correlationId.json" - } - ] - } - } - }, - "operationTraits": { - "type": "object", - "additionalProperties": { - "$ref": "http://asyncapi.com/definitions/2.6.0/operationTrait.json" - } + "description": { + "type": "string", + "description": "A description of the channel." }, - "messageTraits": { - "type": "object", - "additionalProperties": { - "$ref": "http://asyncapi.com/definitions/2.6.0/messageTrait.json" - } + "servers": { + "type": "array", + "description": "The names of the servers on which this channel is available. If absent or empty then this channel must be available on all servers.", + "items": { + "type": "string" + }, + "uniqueItems": true }, - "serverBindings": { - "type": "object", - "additionalProperties": { - "$ref": "http://asyncapi.com/definitions/2.6.0/bindingsObject.json" - } + "publish": { + "$ref": "http://asyncapi.com/definitions/2.6.0/operation.json" }, - "channelBindings": { - "type": "object", - "additionalProperties": { - "$ref": "http://asyncapi.com/definitions/2.6.0/bindingsObject.json" - } + "subscribe": { + "$ref": "http://asyncapi.com/definitions/2.6.0/operation.json" }, - "operationBindings": { - "type": "object", - "additionalProperties": { - "$ref": "http://asyncapi.com/definitions/2.6.0/bindingsObject.json" - } + "deprecated": { + "type": "boolean", + "default": false }, - "messageBindings": { - "type": "object", - "additionalProperties": { - "$ref": "http://asyncapi.com/definitions/2.6.0/bindingsObject.json" - } + "bindings": { + "$ref": "http://asyncapi.com/definitions/2.6.0/bindingsObject.json" } }, "examples": [ { - "components": { - "schemas": { - "Category": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int64" - }, - "name": { - "type": "string" - } - } - }, - "Tag": { + "description": "This channel is used to exchange messages about users signing up", + "subscribe": { + "summary": "A user signed up.", + "message": { + "description": "A longer description of the message", + "payload": { "type": "object", "properties": { - "id": { - "type": "integer", - "format": "int64" - }, - "name": { - "type": "string" - } - } - } - }, - "servers": { - "development": { - "url": "{stage}.gigantic-server.com:{port}", - "description": "Development server", - "protocol": "amqp", - "protocolVersion": "0.9.1", - "variables": { - "stage": { - "$ref": "#/components/serverVariables/stage" + "user": { + "$ref": "#/components/schemas/user" }, - "port": { - "$ref": "#/components/serverVariables/port" + "signup": { + "$ref": "#/components/schemas/signup" } } } - }, - "serverVariables": { - "stage": { - "default": "demo", - "description": "This value is assigned by the service provider, in this example `gigantic-server.com`" - }, - "port": { - "enum": [ - "8883", - "8884" - ], - "default": "8883" - } - }, - "channels": { - "user/signedup": { - "subscribe": { - "message": { - "$ref": "#/components/messages/userSignUp" - } - } + } + }, + "bindings": { + "amqp": { + "is": "queue", + "queue": { + "exclusive": true } - }, - "messages": { - "userSignUp": { - "summary": "Action to sign a user up.", - "description": "Multiline description of what this action does.\nHere you have another line.\n", - "tags": [ - { - "name": "user" - }, - { - "name": "signup" - } - ], - "headers": { - "type": "object", - "properties": { - "applicationInstanceId": { - "description": "Unique identifier for a given instance of the publishing application", - "type": "string" - } - } + } + } + }, + { + "subscribe": { + "message": { + "oneOf": [ + { + "$ref": "#/components/messages/signup" }, - "payload": { - "type": "object", - "properties": { - "user": { - "$ref": "#/components/schemas/userCreate" - }, - "signup": { - "$ref": "#/components/schemas/signup" - } - } - } - } - }, - "parameters": { - "userId": { - "description": "Id of the user.", - "schema": { - "type": "string" - } - } - }, - "correlationIds": { - "default": { - "description": "Default Correlation ID", - "location": "$message.header#/correlationId" - } - }, - "messageTraits": { - "commonHeaders": { - "headers": { - "type": "object", - "properties": { - "my-app-header": { - "type": "integer", - "minimum": 0, - "maximum": 100 - } - } + { + "$ref": "#/components/messages/login" } + ] + } + } + }, + { + "description": "This application publishes WebUICommand messages to an AMQP queue on RabbitMQ brokers in the Staging and Production environments.", + "servers": [ + "rabbitmqBrokerInProd", + "rabbitmqBrokerInStaging" + ], + "subscribe": { + "message": { + "$ref": "#/components/messages/WebUICommand" + } + }, + "bindings": { + "amqp": { + "is": "queue" + } + } + } + ] + }, + "channels.json": { + "$id": "channels.json", + "type": "object", + "description": "Holds the relative paths to the individual channel and their operations. Channel paths are relative to servers.", + "propertyNames": { + "type": "string", + "format": "uri-template", + "minLength": 1 + }, + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/2.6.0/channelItem.json" + }, + "examples": [ + { + "user/signedup": { + "subscribe": { + "message": { + "$ref": "#/components/messages/userSignedUp" } } } } ] }, - "http://asyncapi.com/definitions/2.6.0/schemas.json": { - "$id": "http://asyncapi.com/definitions/2.6.0/schemas.json", + "schemas.json": { + "$id": "schemas.json", "type": "object", "additionalProperties": { "$ref": "http://asyncapi.com/definitions/2.6.0/schema.json" }, "description": "JSON objects describing schemas the API uses." }, - "http://asyncapi.com/definitions/2.6.0/messages.json": { - "$id": "http://asyncapi.com/definitions/2.6.0/messages.json", + "messages.json": { + "$id": "messages.json", "type": "object", "additionalProperties": { "$ref": "http://asyncapi.com/definitions/2.6.0/message.json" }, "description": "JSON objects describing the messages being consumed and produced by the API." }, - "http://asyncapi.com/definitions/2.6.0/SecurityScheme.json": { - "$id": "http://asyncapi.com/definitions/2.6.0/SecurityScheme.json", - "description": "Defines a security scheme that can be used by the operations.", - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/2.6.0/userPassword.json" - }, - { - "$ref": "http://asyncapi.com/definitions/2.6.0/apiKey.json" - }, - { - "$ref": "http://asyncapi.com/definitions/2.6.0/X509.json" - }, - { - "$ref": "http://asyncapi.com/definitions/2.6.0/symmetricEncryption.json" - }, - { - "$ref": "http://asyncapi.com/definitions/2.6.0/asymmetricEncryption.json" - }, - { - "$ref": "http://asyncapi.com/definitions/2.6.0/HTTPSecurityScheme.json" - }, - { - "$ref": "http://asyncapi.com/definitions/2.6.0/oauth2Flows.json" - }, - { - "$ref": "http://asyncapi.com/definitions/2.6.0/openIdConnect.json" - }, - { - "$ref": "http://asyncapi.com/definitions/2.6.0/SaslSecurityScheme.json" - } - ], - "examples": [ - { - "type": "userPassword" - } - ] - }, - "http://asyncapi.com/definitions/2.6.0/userPassword.json": { - "$id": "http://asyncapi.com/definitions/2.6.0/userPassword.json", + "userPassword.json": { + "$id": "userPassword.json", "type": "object", "required": [ "type" @@ -2643,8 +2371,8 @@ } ] }, - "http://asyncapi.com/definitions/2.6.0/apiKey.json": { - "$id": "http://asyncapi.com/definitions/2.6.0/apiKey.json", + "apiKey.json": { + "$id": "apiKey.json", "type": "object", "required": [ "type", @@ -2684,8 +2412,8 @@ } ] }, - "http://asyncapi.com/definitions/2.6.0/X509.json": { - "$id": "http://asyncapi.com/definitions/2.6.0/X509.json", + "X509.json": { + "$id": "X509.json", "type": "object", "required": [ "type" @@ -2715,8 +2443,8 @@ } ] }, - "http://asyncapi.com/definitions/2.6.0/symmetricEncryption.json": { - "$id": "http://asyncapi.com/definitions/2.6.0/symmetricEncryption.json", + "symmetricEncryption.json": { + "$id": "symmetricEncryption.json", "type": "object", "required": [ "type" @@ -2746,8 +2474,8 @@ } ] }, - "http://asyncapi.com/definitions/2.6.0/asymmetricEncryption.json": { - "$id": "http://asyncapi.com/definitions/2.6.0/asymmetricEncryption.json", + "asymmetricEncryption.json": { + "$id": "asymmetricEncryption.json", "type": "object", "required": [ "type" @@ -2772,22 +2500,8 @@ }, "additionalProperties": false }, - "http://asyncapi.com/definitions/2.6.0/HTTPSecurityScheme.json": { - "$id": "http://asyncapi.com/definitions/2.6.0/HTTPSecurityScheme.json", - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/2.6.0/NonBearerHTTPSecurityScheme.json" - }, - { - "$ref": "http://asyncapi.com/definitions/2.6.0/BearerHTTPSecurityScheme.json" - }, - { - "$ref": "http://asyncapi.com/definitions/2.6.0/APIKeyHTTPSecurityScheme.json" - } - ] - }, - "http://asyncapi.com/definitions/2.6.0/NonBearerHTTPSecurityScheme.json": { - "$id": "http://asyncapi.com/definitions/2.6.0/NonBearerHTTPSecurityScheme.json", + "NonBearerHTTPSecurityScheme.json": { + "$id": "NonBearerHTTPSecurityScheme.json", "not": { "type": "object", "properties": { @@ -2829,8 +2543,8 @@ }, "additionalProperties": false }, - "http://asyncapi.com/definitions/2.6.0/BearerHTTPSecurityScheme.json": { - "$id": "http://asyncapi.com/definitions/2.6.0/BearerHTTPSecurityScheme.json", + "BearerHTTPSecurityScheme.json": { + "$id": "BearerHTTPSecurityScheme.json", "type": "object", "required": [ "type", @@ -2867,8 +2581,8 @@ }, "additionalProperties": false }, - "http://asyncapi.com/definitions/2.6.0/APIKeyHTTPSecurityScheme.json": { - "$id": "http://asyncapi.com/definitions/2.6.0/APIKeyHTTPSecurityScheme.json", + "APIKeyHTTPSecurityScheme.json": { + "$id": "APIKeyHTTPSecurityScheme.json", "type": "object", "required": [ "type", @@ -2915,8 +2629,82 @@ } ] }, - "http://asyncapi.com/definitions/2.6.0/oauth2Flows.json": { - "$id": "http://asyncapi.com/definitions/2.6.0/oauth2Flows.json", + "HTTPSecurityScheme.json": { + "$id": "HTTPSecurityScheme.json", + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.6.0/NonBearerHTTPSecurityScheme.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.6.0/BearerHTTPSecurityScheme.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.6.0/APIKeyHTTPSecurityScheme.json" + } + ] + }, + "oauth2Scopes.json": { + "$id": "oauth2Scopes.json", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "oauth2Flow.json": { + "$id": "oauth2Flow.json", + "type": "object", + "description": "Configuration details for a supported OAuth Flow", + "properties": { + "authorizationUrl": { + "type": "string", + "format": "uri", + "description": "The authorization URL to be used for this flow. This MUST be in the form of an absolute URL." + }, + "tokenUrl": { + "type": "string", + "format": "uri", + "description": "The token URL to be used for this flow. This MUST be in the form of an absolute URL." + }, + "refreshUrl": { + "type": "string", + "format": "uri", + "description": "The URL to be used for obtaining refresh tokens. This MUST be in the form of an absolute URL." + }, + "scopes": { + "$ref": "http://asyncapi.com/definitions/2.6.0/oauth2Scopes.json" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.6.0/specificationExtension.json" + } + }, + "additionalProperties": false, + "examples": [ + { + "type": "oauth2", + "flows": { + "implicit": { + "authorizationUrl": "https://example.com/api/oauth/dialog", + "scopes": { + "write:pets": "modify pets in your account", + "read:pets": "read your pets" + } + }, + "authorizationCode": { + "authorizationUrl": "https://example.com/api/oauth/dialog", + "tokenUrl": "https://example.com/api/oauth/token", + "scopes": { + "write:pets": "modify pets in your account", + "read:pets": "read your pets" + } + } + } + } + ] + }, + "oauth2Flows.json": { + "$id": "oauth2Flows.json", "type": "object", "description": "Allows configuration of the supported OAuth Flows.", "required": [ @@ -3026,29 +2814,26 @@ } } }, - "http://asyncapi.com/definitions/2.6.0/oauth2Flow.json": { - "$id": "http://asyncapi.com/definitions/2.6.0/oauth2Flow.json", + "openIdConnect.json": { + "$id": "openIdConnect.json", "type": "object", - "description": "Configuration details for a supported OAuth Flow", + "required": [ + "type", + "openIdConnectUrl" + ], "properties": { - "authorizationUrl": { + "type": { "type": "string", - "format": "uri", - "description": "The authorization URL to be used for this flow. This MUST be in the form of an absolute URL." + "enum": [ + "openIdConnect" + ] }, - "tokenUrl": { - "type": "string", - "format": "uri", - "description": "The token URL to be used for this flow. This MUST be in the form of an absolute URL." + "description": { + "type": "string" }, - "refreshUrl": { + "openIdConnectUrl": { "type": "string", - "format": "uri", - "description": "The URL to be used for obtaining refresh tokens. This MUST be in the form of an absolute URL." - }, - "scopes": { - "description": "The available scopes for the OAuth2 security scheme. A map between the scope name and a short description for it.", - "$ref": "http://asyncapi.com/definitions/2.6.0/oauth2Scopes.json" + "format": "uri" } }, "patternProperties": { @@ -3056,57 +2841,25 @@ "$ref": "http://asyncapi.com/definitions/2.6.0/specificationExtension.json" } }, - "additionalProperties": false, - "examples": [ - { - "type": "oauth2", - "flows": { - "implicit": { - "authorizationUrl": "https://example.com/api/oauth/dialog", - "scopes": { - "write:pets": "modify pets in your account", - "read:pets": "read your pets" - } - }, - "authorizationCode": { - "authorizationUrl": "https://example.com/api/oauth/dialog", - "tokenUrl": "https://example.com/api/oauth/token", - "scopes": { - "write:pets": "modify pets in your account", - "read:pets": "read your pets" - } - } - } - } - ] - }, - "http://asyncapi.com/definitions/2.6.0/oauth2Scopes.json": { - "$id": "http://asyncapi.com/definitions/2.6.0/oauth2Scopes.json", - "type": "object", - "additionalProperties": { - "type": "string" - } + "additionalProperties": false }, - "http://asyncapi.com/definitions/2.6.0/openIdConnect.json": { - "$id": "http://asyncapi.com/definitions/2.6.0/openIdConnect.json", + "SaslPlainSecurityScheme.json": { + "$id": "SaslPlainSecurityScheme.json", "type": "object", "required": [ - "type", - "openIdConnectUrl" + "type" ], "properties": { "type": { "type": "string", + "description": "The type of the security scheme. Valid values", "enum": [ - "openIdConnect" + "plain" ] }, "description": { - "type": "string" - }, - "openIdConnectUrl": { "type": "string", - "format": "uri" + "description": "A short description for security scheme." } }, "patternProperties": { @@ -3114,24 +2867,15 @@ "$ref": "http://asyncapi.com/definitions/2.6.0/specificationExtension.json" } }, - "additionalProperties": false - }, - "http://asyncapi.com/definitions/2.6.0/SaslSecurityScheme.json": { - "$id": "http://asyncapi.com/definitions/2.6.0/SaslSecurityScheme.json", - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/2.6.0/SaslPlainSecurityScheme.json" - }, - { - "$ref": "http://asyncapi.com/definitions/2.6.0/SaslScramSecurityScheme.json" - }, + "additionalProperties": false, + "examples": [ { - "$ref": "http://asyncapi.com/definitions/2.6.0/SaslGssapiSecurityScheme.json" + "type": "scramSha512" } ] }, - "http://asyncapi.com/definitions/2.6.0/SaslPlainSecurityScheme.json": { - "$id": "http://asyncapi.com/definitions/2.6.0/SaslPlainSecurityScheme.json", + "SaslScramSecurityScheme.json": { + "$id": "SaslScramSecurityScheme.json", "type": "object", "required": [ "type" @@ -3139,9 +2883,10 @@ "properties": { "type": { "type": "string", - "description": "The type of the security scheme. Valid values", + "description": "The type of the security scheme.", "enum": [ - "plain" + "scramSha256", + "scramSha512" ] }, "description": { @@ -3161,8 +2906,8 @@ } ] }, - "http://asyncapi.com/definitions/2.6.0/SaslScramSecurityScheme.json": { - "$id": "http://asyncapi.com/definitions/2.6.0/SaslScramSecurityScheme.json", + "SaslGssapiSecurityScheme.json": { + "$id": "SaslGssapiSecurityScheme.json", "type": "object", "required": [ "type" @@ -3172,58 +2917,308 @@ "type": "string", "description": "The type of the security scheme.", "enum": [ - "scramSha256", - "scramSha512" + "gssapi" ] }, - "description": { - "type": "string", - "description": "A short description for security scheme." - } - }, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "http://asyncapi.com/definitions/2.6.0/specificationExtension.json" + "description": { + "type": "string", + "description": "A short description for security scheme." + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.6.0/specificationExtension.json" + } + }, + "additionalProperties": false, + "examples": [ + { + "type": "scramSha512" + } + ] + }, + "SaslSecurityScheme.json": { + "$id": "SaslSecurityScheme.json", + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.6.0/SaslPlainSecurityScheme.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.6.0/SaslScramSecurityScheme.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.6.0/SaslGssapiSecurityScheme.json" + } + ] + }, + "SecurityScheme.json": { + "$id": "SecurityScheme.json", + "description": "Defines a security scheme that can be used by the operations.", + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.6.0/userPassword.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.6.0/apiKey.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.6.0/X509.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.6.0/symmetricEncryption.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.6.0/asymmetricEncryption.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.6.0/HTTPSecurityScheme.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.6.0/oauth2Flows.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.6.0/openIdConnect.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.6.0/SaslSecurityScheme.json" } - }, - "additionalProperties": false, + ], "examples": [ { - "type": "scramSha512" + "type": "userPassword" } ] }, - "http://asyncapi.com/definitions/2.6.0/SaslGssapiSecurityScheme.json": { - "$id": "http://asyncapi.com/definitions/2.6.0/SaslGssapiSecurityScheme.json", + "components.json": { + "$id": "components.json", "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "description": "The type of the security scheme.", - "enum": [ - "gssapi" - ] - }, - "description": { - "type": "string", - "description": "A short description for security scheme." - } - }, + "description": "Holds a set of reusable objects for different aspects of the AsyncAPI specification. All objects defined within the components object will have no effect on the API unless they are explicitly referenced from properties outside the components object.", + "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { "$ref": "http://asyncapi.com/definitions/2.6.0/specificationExtension.json" } }, - "additionalProperties": false, + "properties": { + "schemas": { + "$ref": "http://asyncapi.com/definitions/2.6.0/schemas.json" + }, + "servers": { + "$ref": "http://asyncapi.com/definitions/2.6.0/servers.json" + }, + "channels": { + "$ref": "http://asyncapi.com/definitions/2.6.0/channels.json" + }, + "serverVariables": { + "$ref": "http://asyncapi.com/definitions/2.6.0/serverVariables.json" + }, + "messages": { + "$ref": "http://asyncapi.com/definitions/2.6.0/messages.json" + }, + "securitySchemes": { + "type": "object", + "patternProperties": { + "^[\\w\\d\\.\\-_]+$": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.6.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.6.0/SecurityScheme.json" + } + ] + } + } + }, + "parameters": { + "$ref": "http://asyncapi.com/definitions/2.6.0/parameters.json" + }, + "correlationIds": { + "type": "object", + "patternProperties": { + "^[\\w\\d\\.\\-_]+$": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.6.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.6.0/correlationId.json" + } + ] + } + } + }, + "operationTraits": { + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/2.6.0/operationTrait.json" + } + }, + "messageTraits": { + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/2.6.0/messageTrait.json" + } + }, + "serverBindings": { + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/2.6.0/bindingsObject.json" + } + }, + "channelBindings": { + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/2.6.0/bindingsObject.json" + } + }, + "operationBindings": { + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/2.6.0/bindingsObject.json" + } + }, + "messageBindings": { + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/2.6.0/bindingsObject.json" + } + } + }, "examples": [ { - "type": "scramSha512" + "components": { + "schemas": { + "Category": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int64" + }, + "name": { + "type": "string" + } + } + }, + "Tag": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int64" + }, + "name": { + "type": "string" + } + } + } + }, + "servers": { + "development": { + "url": "{stage}.gigantic-server.com:{port}", + "description": "Development server", + "protocol": "amqp", + "protocolVersion": "0.9.1", + "variables": { + "stage": { + "$ref": "#/components/serverVariables/stage" + }, + "port": { + "$ref": "#/components/serverVariables/port" + } + } + } + }, + "serverVariables": { + "stage": { + "default": "demo", + "description": "This value is assigned by the service provider, in this example `gigantic-server.com`" + }, + "port": { + "enum": [ + "8883", + "8884" + ], + "default": "8883" + } + }, + "channels": { + "user/signedup": { + "subscribe": { + "message": { + "$ref": "#/components/messages/userSignUp" + } + } + } + }, + "messages": { + "userSignUp": { + "summary": "Action to sign a user up.", + "description": "Multiline description of what this action does.\nHere you have another line.\n", + "tags": [ + { + "name": "user" + }, + { + "name": "signup" + } + ], + "headers": { + "type": "object", + "properties": { + "applicationInstanceId": { + "description": "Unique identifier for a given instance of the publishing application", + "type": "string" + } + } + }, + "payload": { + "type": "object", + "properties": { + "user": { + "$ref": "#/components/schemas/userCreate" + }, + "signup": { + "$ref": "#/components/schemas/signup" + } + } + } + } + }, + "parameters": { + "userId": { + "description": "Id of the user.", + "schema": { + "type": "string" + } + } + }, + "correlationIds": { + "default": { + "description": "Default Correlation ID", + "location": "$message.header#/correlationId" + } + }, + "messageTraits": { + "commonHeaders": { + "headers": { + "type": "object", + "properties": { + "my-app-header": { + "type": "integer", + "minimum": 0, + "maximum": 100 + } + } + } + } + } + } } ] } }, + "$id": "http://asyncapi.com/definitions/2.6.0/asyncapi.json", "description": "!!Auto generated!! \n Do not manually edit. " } \ No newline at end of file diff --git a/schemas/3.0.0-without-$id.json b/schemas/3.0.0-without-$id.json index 3a8ce1ef..e0c94d7d 100644 --- a/schemas/3.0.0-without-$id.json +++ b/schemas/3.0.0-without-$id.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema", + "$schema": "http://json-schema.org/draft-07/schema#", "title": "AsyncAPI 3.0.0 schema.", "type": "object", "required": [ @@ -49,103 +49,6 @@ "additionalProperties": true, "additionalItems": true }, - "info": { - "description": "The object provides metadata about the API. The metadata can be used by the clients if needed.", - "allOf": [ - { - "type": "object", - "required": [ - "version", - "title" - ], - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "properties": { - "title": { - "type": "string", - "description": "A unique and precise title of the API." - }, - "version": { - "type": "string", - "description": "A semantic version number of the API." - }, - "description": { - "type": "string", - "description": "A longer description of the API. Should be different from the title. CommonMark is allowed." - }, - "termsOfService": { - "type": "string", - "description": "A URL to the Terms of Service for the API. MUST be in the format of a URL.", - "format": "uri" - }, - "contact": { - "$ref": "#/definitions/contact" - }, - "license": { - "$ref": "#/definitions/license" - }, - "tags": { - "type": "array", - "description": "A list of tags for application API documentation control. Tags can be used for logical grouping of applications.", - "items": { - "oneOf": [ - { - "$ref": "#/definitions/Reference" - }, - { - "$ref": "#/definitions/tag" - } - ] - }, - "uniqueItems": true - }, - "externalDocs": { - "oneOf": [ - { - "$ref": "#/definitions/Reference" - }, - { - "$ref": "#/definitions/externalDocs" - } - ] - } - } - }, - { - "$ref": "#/definitions/infoExtensions" - } - ], - "examples": [ - { - "title": "AsyncAPI Sample App", - "version": "1.0.1", - "description": "This is a sample app.", - "termsOfService": "https://asyncapi.org/terms/", - "contact": { - "name": "API Support", - "url": "https://www.asyncapi.org/support", - "email": "support@asyncapi.org" - }, - "license": { - "name": "Apache 2.0", - "url": "https://www.apache.org/licenses/LICENSE-2.0.html" - }, - "externalDocs": { - "description": "Find more info here", - "url": "https://www.asyncapi.org" - }, - "tags": [ - { - "name": "e-commerce" - } - ] - } - ] - }, "contact": { "type": "object", "description": "Contact information for the exposed API.", @@ -208,6 +111,10 @@ } ] }, + "ReferenceObject": { + "type": "string", + "format": "uri-reference" + }, "Reference": { "type": "object", "description": "A simple object to allow referencing other components in the specification, internally and externally.", @@ -216,7 +123,6 @@ ], "properties": { "$ref": { - "description": "The reference string.", "$ref": "#/definitions/ReferenceObject" } }, @@ -226,9 +132,35 @@ } ] }, - "ReferenceObject": { - "type": "string", - "format": "uri-reference" + "externalDocs": { + "type": "object", + "additionalProperties": false, + "description": "Allows referencing an external resource for extended documentation.", + "required": [ + "url" + ], + "properties": { + "description": { + "type": "string", + "description": "A short description of the target documentation. CommonMark syntax can be used for rich text representation." + }, + "url": { + "type": "string", + "description": "The URL for the target documentation. This MUST be in the form of an absolute URL.", + "format": "uri" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, + "examples": [ + { + "description": "Find more info here", + "url": "https://example.com" + } + ] }, "tag": { "type": "object", @@ -269,126 +201,224 @@ } ] }, - "externalDocs": { - "type": "object", - "additionalProperties": false, - "description": "Allows referencing an external resource for extended documentation.", - "required": [ - "url" - ], - "properties": { - "description": { - "type": "string", - "description": "A short description of the target documentation. CommonMark syntax can be used for rich text representation." - }, - "url": { - "type": "string", - "description": "The URL for the target documentation. This MUST be in the form of an absolute URL.", - "format": "uri" - } - }, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "examples": [ + "schema": { + "description": "The Schema Object allows the definition of input and output data types. These types can be objects, but also primitives and arrays. This object is a superset of the JSON Schema Specification Draft 07. The empty schema (which allows any instance to validate) MAY be represented by the boolean value true and a schema which allows no instance to validate MAY be represented by the boolean value false.", + "allOf": [ { - "description": "Find more info here", - "url": "https://example.com" - } - ] - }, - "infoExtensions": { - "type": "object", - "description": "The object that lists all the extensions of Info", - "properties": { - "x-x": { - "$ref": "#/definitions/extensions-x-0.1.0-schema" + "$ref": "#/definitions/json-schema-draft-07-schema" }, - "x-linkedin": { - "$ref": "#/definitions/extensions-linkedin-0.1.0-schema" - } - } - }, - "extensions-x-0.1.0-schema": { - "type": "string", - "description": "This extension allows you to provide the Twitter username of the account representing the team/company of the API.", - "example": [ - "sambhavgupta75", - "AsyncAPISpec" - ] - }, - "extensions-linkedin-0.1.0-schema": { - "type": "string", - "pattern": "^http(s)?://(www\\.)?linkedin\\.com.*$", - "description": "This extension allows you to provide the Linkedin profile URL of the account representing the team/company of the API.", - "example": [ - "https://www.linkedin.com/company/asyncapi/", - "https://www.linkedin.com/in/sambhavgupta0705/" - ] - }, - "servers": { - "description": "An object representing multiple servers.", - "type": "object", - "additionalProperties": { - "oneOf": [ - { - "$ref": "#/definitions/Reference" - }, - { - "$ref": "#/definitions/server" - } - ] - }, - "examples": [ { - "development": { - "host": "localhost:5672", - "description": "Development AMQP broker.", - "protocol": "amqp", - "protocolVersion": "0-9-1", - "tags": [ - { - "name": "env:development", - "description": "This environment is meant for developers to run their own tests." - } - ] + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } }, - "staging": { - "host": "rabbitmq-staging.in.mycompany.com:5672", - "description": "RabbitMQ broker for the staging environment.", - "protocol": "amqp", - "protocolVersion": "0-9-1", - "tags": [ - { - "name": "env:staging", - "description": "This environment is a replica of the production environment." + "properties": { + "additionalProperties": { + "anyOf": [ + { + "$ref": "#/definitions/schema" + }, + { + "type": "boolean" + } + ], + "default": {} + }, + "items": { + "anyOf": [ + { + "$ref": "#/definitions/schema" + }, + { + "type": "array", + "minItems": 1, + "items": { + "$ref": "#/definitions/schema" + } + } + ], + "default": {} + }, + "allOf": { + "type": "array", + "minItems": 1, + "items": { + "$ref": "#/definitions/schema" } - ] - }, - "production": { - "host": "rabbitmq.in.mycompany.com:5672", - "description": "RabbitMQ broker for the production environment.", - "protocol": "amqp", - "protocolVersion": "0-9-1", - "tags": [ - { - "name": "env:production", - "description": "This environment is the live environment available for final users." + }, + "oneOf": { + "type": "array", + "minItems": 1, + "items": { + "$ref": "#/definitions/schema" } - ] + }, + "anyOf": { + "type": "array", + "minItems": 1, + "items": { + "$ref": "#/definitions/schema" + } + }, + "not": { + "$ref": "#/definitions/schema" + }, + "properties": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/schema" + }, + "default": {} + }, + "patternProperties": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/schema" + }, + "default": {} + }, + "propertyNames": { + "$ref": "#/definitions/schema" + }, + "contains": { + "$ref": "#/definitions/schema" + }, + "discriminator": { + "type": "string", + "description": "Adds support for polymorphism. The discriminator is the schema property name that is used to differentiate between other schema that inherit this schema. The property name used MUST be defined at this schema and it MUST be in the required property list. When used, the value MUST be the name of this schema or any schema that inherits it. See Composition and Inheritance for more details." + }, + "externalDocs": { + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/externalDocs" + } + ] + }, + "deprecated": { + "type": "boolean", + "description": "Specifies that a schema is deprecated and SHOULD be transitioned out of usage. Default value is false.", + "default": false + } } } ] }, - "server": { + "infoExtensions": { "type": "object", - "description": "An object representing a message broker, a server or any other kind of computer program capable of sending and/or receiving data.", - "required": [ - "host", - "protocol" + "description": "The object that lists all the extensions of Info", + "properties": { + "x-x": { + "$ref": "#/definitions/extensions-x-0.1.0-schema" + }, + "x-linkedin": { + "$ref": "#/definitions/extensions-linkedin-0.1.0-schema" + } + } + }, + "info": { + "description": "The object provides metadata about the API. The metadata can be used by the clients if needed.", + "allOf": [ + { + "type": "object", + "required": [ + "version", + "title" + ], + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, + "properties": { + "title": { + "type": "string", + "description": "A unique and precise title of the API." + }, + "version": { + "type": "string", + "description": "A semantic version number of the API." + }, + "description": { + "type": "string", + "description": "A longer description of the API. Should be different from the title. CommonMark is allowed." + }, + "termsOfService": { + "type": "string", + "description": "A URL to the Terms of Service for the API. MUST be in the format of a URL.", + "format": "uri" + }, + "contact": { + "$ref": "#/definitions/contact" + }, + "license": { + "$ref": "#/definitions/license" + }, + "tags": { + "type": "array", + "description": "A list of tags for application API documentation control. Tags can be used for logical grouping of applications.", + "items": { + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/tag" + } + ] + }, + "uniqueItems": true + }, + "externalDocs": { + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/externalDocs" + } + ] + } + } + }, + { + "$ref": "#/definitions/infoExtensions" + } ], + "examples": [ + { + "title": "AsyncAPI Sample App", + "version": "1.0.1", + "description": "This is a sample app.", + "termsOfService": "https://asyncapi.org/terms/", + "contact": { + "name": "API Support", + "url": "https://www.asyncapi.org/support", + "email": "support@asyncapi.org" + }, + "license": { + "name": "Apache 2.0", + "url": "https://www.apache.org/licenses/LICENSE-2.0.html" + }, + "externalDocs": { + "description": "Find more info here", + "url": "https://www.asyncapi.org" + }, + "tags": [ + { + "name": "e-commerce" + } + ] + } + ] + }, + "serverVariable": { + "type": "object", + "description": "An object representing a Server Variable for server URL template substitution.", "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { @@ -396,135 +426,28 @@ } }, "properties": { - "host": { - "type": "string", - "description": "The server host name. It MAY include the port. This field supports Server Variables. Variable substitutions will be made when a variable is named in {braces}." - }, - "pathname": { - "type": "string", - "description": "The path to a resource in the host. This field supports Server Variables. Variable substitutions will be made when a variable is named in {braces}." - }, - "title": { - "type": "string", - "description": "A human-friendly title for the server." + "enum": { + "type": "array", + "description": "An enumeration of string values to be used if the substitution options are from a limited set.", + "items": { + "type": "string" + }, + "uniqueItems": true }, - "summary": { + "default": { "type": "string", - "description": "A brief summary of the server." + "description": "The default value to use for substitution, and to send, if an alternate value is not supplied." }, "description": { "type": "string", - "description": "A longer description of the server. CommonMark is allowed." - }, - "protocol": { - "type": "string", - "description": "The protocol this server supports for connection." - }, - "protocolVersion": { - "type": "string", - "description": "An optional string describing the server. CommonMark syntax MAY be used for rich text representation." - }, - "variables": { - "$ref": "#/definitions/serverVariables" - }, - "security": { - "$ref": "#/definitions/securityRequirements" + "description": "An optional description for the server variable. CommonMark syntax MAY be used for rich text representation." }, - "tags": { + "examples": { "type": "array", + "description": "An array of examples of the server variable.", "items": { - "oneOf": [ - { - "$ref": "#/definitions/Reference" - }, - { - "$ref": "#/definitions/tag" - } - ] - }, - "uniqueItems": true - }, - "externalDocs": { - "oneOf": [ - { - "$ref": "#/definitions/Reference" - }, - { - "$ref": "#/definitions/externalDocs" - } - ] - }, - "bindings": { - "oneOf": [ - { - "$ref": "#/definitions/Reference" - }, - { - "$ref": "#/definitions/serverBindingsObject" - } - ] - } - }, - "examples": [ - { - "host": "kafka.in.mycompany.com:9092", - "description": "Production Kafka broker.", - "protocol": "kafka", - "protocolVersion": "3.2" - }, - { - "host": "rabbitmq.in.mycompany.com:5672", - "pathname": "/production", - "protocol": "amqp", - "description": "Production RabbitMQ broker (uses the `production` vhost)." - } - ] - }, - "serverVariables": { - "type": "object", - "additionalProperties": { - "oneOf": [ - { - "$ref": "#/definitions/Reference" - }, - { - "$ref": "#/definitions/serverVariable" - } - ] - } - }, - "serverVariable": { - "type": "object", - "description": "An object representing a Server Variable for server URL template substitution.", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "properties": { - "enum": { - "type": "array", - "description": "An enumeration of string values to be used if the substitution options are from a limited set.", - "items": { - "type": "string" - }, - "uniqueItems": true - }, - "default": { - "type": "string", - "description": "The default value to use for substitution, and to send, if an alternate value is not supplied." - }, - "description": { - "type": "string", - "description": "An optional description for the server variable. CommonMark syntax MAY be used for rich text representation." - }, - "examples": { - "type": "array", - "description": "An array of examples of the server variable.", - "items": { - "type": "string" - } + "type": "string" + } } }, "examples": [ @@ -545,57 +468,19 @@ } ] }, - "securityRequirements": { - "description": "An array representing security requirements.", - "type": "array", - "items": { + "serverVariables": { + "type": "object", + "additionalProperties": { "oneOf": [ { "$ref": "#/definitions/Reference" }, { - "$ref": "#/definitions/SecurityScheme" + "$ref": "#/definitions/serverVariable" } ] } }, - "SecurityScheme": { - "description": "Defines a security scheme that can be used by the operations.", - "oneOf": [ - { - "$ref": "#/definitions/userPassword" - }, - { - "$ref": "#/definitions/apiKey" - }, - { - "$ref": "#/definitions/X509" - }, - { - "$ref": "#/definitions/symmetricEncryption" - }, - { - "$ref": "#/definitions/asymmetricEncryption" - }, - { - "$ref": "#/definitions/HTTPSecurityScheme" - }, - { - "$ref": "#/definitions/oauth2Flows" - }, - { - "$ref": "#/definitions/openIdConnect" - }, - { - "$ref": "#/definitions/SaslSecurityScheme" - } - ], - "examples": [ - { - "type": "userPassword" - } - ] - }, "userPassword": { "type": "object", "required": [ @@ -745,19 +630,6 @@ }, "additionalProperties": false }, - "HTTPSecurityScheme": { - "oneOf": [ - { - "$ref": "#/definitions/NonBearerHTTPSecurityScheme" - }, - { - "$ref": "#/definitions/BearerHTTPSecurityScheme" - }, - { - "$ref": "#/definitions/APIKeyHTTPSecurityScheme" - } - ] - }, "NonBearerHTTPSecurityScheme": { "not": { "type": "object", @@ -884,6 +756,65 @@ } ] }, + "HTTPSecurityScheme": { + "oneOf": [ + { + "$ref": "#/definitions/NonBearerHTTPSecurityScheme" + }, + { + "$ref": "#/definitions/BearerHTTPSecurityScheme" + }, + { + "$ref": "#/definitions/APIKeyHTTPSecurityScheme" + } + ] + }, + "oauth2Scopes": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "oauth2Flow": { + "type": "object", + "description": "Configuration details for a supported OAuth Flow", + "properties": { + "authorizationUrl": { + "type": "string", + "format": "uri", + "description": "The authorization URL to be used for this flow. This MUST be in the form of an absolute URL." + }, + "tokenUrl": { + "type": "string", + "format": "uri", + "description": "The token URL to be used for this flow. This MUST be in the form of an absolute URL." + }, + "refreshUrl": { + "type": "string", + "format": "uri", + "description": "The URL to be used for obtaining refresh tokens. This MUST be in the form of an absolute URL." + }, + "availableScopes": { + "$ref": "#/definitions/oauth2Scopes" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, + "additionalProperties": false, + "examples": [ + { + "authorizationUrl": "https://example.com/api/oauth/dialog", + "tokenUrl": "https://example.com/api/oauth/token", + "availableScopes": { + "write:pets": "modify pets in your account", + "read:pets": "read your pets" + } + } + ] + }, "oauth2Flows": { "type": "object", "description": "Allows configuration of the supported OAuth Flows.", @@ -1001,53 +932,6 @@ } } }, - "oauth2Flow": { - "type": "object", - "description": "Configuration details for a supported OAuth Flow", - "properties": { - "authorizationUrl": { - "type": "string", - "format": "uri", - "description": "The authorization URL to be used for this flow. This MUST be in the form of an absolute URL." - }, - "tokenUrl": { - "type": "string", - "format": "uri", - "description": "The token URL to be used for this flow. This MUST be in the form of an absolute URL." - }, - "refreshUrl": { - "type": "string", - "format": "uri", - "description": "The URL to be used for obtaining refresh tokens. This MUST be in the form of an absolute URL." - }, - "availableScopes": { - "$ref": "#/definitions/oauth2Scopes", - "description": "The available scopes for the OAuth2 security scheme. A map between the scope name and a short description for it." - } - }, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "additionalProperties": false, - "examples": [ - { - "authorizationUrl": "https://example.com/api/oauth/dialog", - "tokenUrl": "https://example.com/api/oauth/token", - "availableScopes": { - "write:pets": "modify pets in your account", - "read:pets": "read your pets" - } - } - ] - }, - "oauth2Scopes": { - "type": "object", - "additionalProperties": { - "type": "string" - } - }, "openIdConnect": { "type": "object", "required": [ @@ -1086,19 +970,6 @@ }, "additionalProperties": false }, - "SaslSecurityScheme": { - "oneOf": [ - { - "$ref": "#/definitions/SaslPlainSecurityScheme" - }, - { - "$ref": "#/definitions/SaslScramSecurityScheme" - }, - { - "$ref": "#/definitions/SaslGssapiSecurityScheme" - } - ] - }, "SaslPlainSecurityScheme": { "type": "object", "required": [ @@ -1190,3373 +1061,320 @@ } ] }, - "serverBindingsObject": { - "type": "object", - "description": "Map describing protocol-specific definitions for a server.", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" + "SaslSecurityScheme": { + "oneOf": [ + { + "$ref": "#/definitions/SaslPlainSecurityScheme" + }, + { + "$ref": "#/definitions/SaslScramSecurityScheme" + }, + { + "$ref": "#/definitions/SaslGssapiSecurityScheme" } - }, - "properties": { - "http": {}, - "ws": {}, - "amqp": {}, - "amqp1": {}, - "mqtt": { - "properties": { - "bindingVersion": { - "enum": [ - "0.2.0" - ] - } - }, - "allOf": [ - { - "description": "If no bindingVersion specified, use the latest binding", - "if": { - "not": { - "required": [ - "bindingVersion" - ] - } - }, - "then": { - "$ref": "#/definitions/bindings-mqtt-0.2.0-server" - } - }, - { - "if": { - "required": [ - "bindingVersion" - ], - "properties": { - "bindingVersion": { - "const": "0.2.0" - } - } - }, - "then": { - "$ref": "#/definitions/bindings-mqtt-0.2.0-server" - } - } - ] - }, - "kafka": { - "properties": { - "bindingVersion": { - "enum": [ - "0.5.0", - "0.4.0", - "0.3.0" - ] - } - }, - "allOf": [ - { - "description": "If no bindingVersion specified, use the latest binding", - "if": { - "not": { - "required": [ - "bindingVersion" - ] - } - }, - "then": { - "$ref": "#/definitions/bindings-kafka-0.5.0-server" - } - }, - { - "if": { - "required": [ - "bindingVersion" - ], - "properties": { - "bindingVersion": { - "const": "0.5.0" - } - } - }, - "then": { - "$ref": "#/definitions/bindings-kafka-0.5.0-server" - } - }, - { - "if": { - "required": [ - "bindingVersion" - ], - "properties": { - "bindingVersion": { - "const": "0.4.0" - } - } - }, - "then": { - "$ref": "#/definitions/bindings-kafka-0.4.0-server" - } - }, - { - "if": { - "required": [ - "bindingVersion" - ], - "properties": { - "bindingVersion": { - "const": "0.3.0" - } - } - }, - "then": { - "$ref": "#/definitions/bindings-kafka-0.3.0-server" - } - } - ] - }, - "anypointmq": {}, - "nats": {}, - "jms": { - "properties": { - "bindingVersion": { - "enum": [ - "0.0.1" - ] - } - }, - "allOf": [ - { - "description": "If no bindingVersion specified, use the latest binding", - "if": { - "not": { - "required": [ - "bindingVersion" - ] - } - }, - "then": { - "$ref": "#/definitions/bindings-jms-0.0.1-server" - } - }, - { - "if": { - "required": [ - "bindingVersion" - ], - "properties": { - "bindingVersion": { - "const": "0.0.1" - } - } - }, - "then": { - "$ref": "#/definitions/bindings-jms-0.0.1-server" - } - } - ] - }, - "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" - ] - } - }, - "then": { - "$ref": "#/definitions/bindings-ibmmq-0.1.0-server" - } - }, - { - "if": { - "required": [ - "bindingVersion" - ], - "properties": { - "bindingVersion": { - "const": "0.1.0" - } - } - }, - "then": { - "$ref": "#/definitions/bindings-ibmmq-0.1.0-server" - } - } - ] - }, - "solace": { - "properties": { - "bindingVersion": { - "enum": [ - "0.4.0", - "0.3.0", - "0.2.0" - ] - } - }, - "allOf": [ - { - "description": "If no bindingVersion specified, use the latest binding", - "if": { - "not": { - "required": [ - "bindingVersion" - ] - } - }, - "then": { - "$ref": "#/definitions/bindings-solace-0.4.0-server" - } - }, - { - "if": { - "required": [ - "bindingVersion" - ], - "properties": { - "bindingVersion": { - "const": "0.4.0" - } - } - }, - "then": { - "$ref": "#/definitions/bindings-solace-0.4.0-server" - } - }, - { - "if": { - "required": [ - "bindingVersion" - ], - "properties": { - "bindingVersion": { - "const": "0.3.0" - } - } - }, - "then": { - "$ref": "#/definitions/bindings-solace-0.3.0-server" - } - }, - { - "if": { - "required": [ - "bindingVersion" - ], - "properties": { - "bindingVersion": { - "const": "0.2.0" - } - } - }, - "then": { - "$ref": "#/definitions/bindings-solace-0.2.0-server" - } - } - ] - }, - "googlepubsub": {}, - "pulsar": { - "properties": { - "bindingVersion": { - "enum": [ - "0.1.0" - ] - } - }, - "allOf": [ - { - "description": "If no bindingVersion specified, use the latest binding", - "if": { - "not": { - "required": [ - "bindingVersion" - ] - } - }, - "then": { - "$ref": "#/definitions/bindings-pulsar-0.1.0-server" - } - }, - { - "if": { - "required": [ - "bindingVersion" - ], - "properties": { - "bindingVersion": { - "const": "0.1.0" - } - } - }, - "then": { - "$ref": "#/definitions/bindings-pulsar-0.1.0-server" - } - } - ] - } - } - }, - "bindings-mqtt-0.2.0-server": { - "title": "Server Schema", - "description": "This object contains information about the server representation in MQTT.", - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "properties": { - "clientId": { - "type": "string", - "description": "The client identifier." - }, - "cleanSession": { - "type": "boolean", - "description": "Whether to create a persistent connection or not. When 'false', the connection will be persistent. This is called clean start in MQTTv5." - }, - "lastWill": { - "type": "object", - "description": "Last Will and Testament configuration.", - "properties": { - "topic": { - "type": "string", - "description": "The topic where the Last Will and Testament message will be sent." - }, - "qos": { - "type": "integer", - "enum": [ - 0, - 1, - 2 - ], - "description": "Defines how hard the broker/client will try to ensure that the Last Will and Testament message is received. Its value MUST be either 0, 1 or 2." - }, - "message": { - "type": "string", - "description": "Last Will message." - }, - "retain": { - "type": "boolean", - "description": "Whether the broker should retain the Last Will and Testament message or not." - } - } - }, - "keepAlive": { - "type": "integer", - "description": "Interval in seconds of the longest period of time the broker and the client can endure without sending a message." - }, - "sessionExpiryInterval": { - "oneOf": [ - { - "type": "integer", - "minimum": 0 - }, - { - "$ref": "#/definitions/schema" - }, - { - "$ref": "#/definitions/Reference" - } - ], - "description": "Interval time in seconds or a Schema Object containing the definition of the interval. The broker maintains a session for a disconnected client until this interval expires." - }, - "maximumPacketSize": { - "oneOf": [ - { - "type": "integer", - "minimum": 1, - "maximum": 4294967295 - }, - { - "$ref": "#/definitions/schema" - }, - { - "$ref": "#/definitions/Reference" - } - ], - "description": "Number of bytes or a Schema Object representing the Maximum Packet Size the Client is willing to accept." - }, - "bindingVersion": { - "type": "string", - "enum": [ - "0.2.0" - ], - "description": "The version of this binding. If omitted, 'latest' MUST be assumed." - } - }, - "examples": [ - { - "clientId": "guest", - "cleanSession": true, - "lastWill": { - "topic": "/last-wills", - "qos": 2, - "message": "Guest gone offline.", - "retain": false - }, - "keepAlive": 60, - "sessionExpiryInterval": 120, - "maximumPacketSize": 1024, - "bindingVersion": "0.2.0" - } - ] - }, - "schema": { - "description": "The Schema Object allows the definition of input and output data types. These types can be objects, but also primitives and arrays. This object is a superset of the JSON Schema Specification Draft 07. The empty schema (which allows any instance to validate) MAY be represented by the boolean value true and a schema which allows no instance to validate MAY be represented by the boolean value false.", - "allOf": [ - { - "$ref": "#/definitions/json-schema-draft-07-schema" - }, - { - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "properties": { - "additionalProperties": { - "anyOf": [ - { - "$ref": "#/definitions/schema" - }, - { - "type": "boolean" - } - ], - "default": {} - }, - "items": { - "anyOf": [ - { - "$ref": "#/definitions/schema" - }, - { - "type": "array", - "minItems": 1, - "items": { - "$ref": "#/definitions/schema" - } - } - ], - "default": {} - }, - "allOf": { - "type": "array", - "minItems": 1, - "items": { - "$ref": "#/definitions/schema" - } - }, - "oneOf": { - "type": "array", - "minItems": 1, - "items": { - "$ref": "#/definitions/schema" - } - }, - "anyOf": { - "type": "array", - "minItems": 1, - "items": { - "$ref": "#/definitions/schema" - } - }, - "not": { - "$ref": "#/definitions/schema" - }, - "properties": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/schema" - }, - "default": {} - }, - "patternProperties": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/schema" - }, - "default": {} - }, - "propertyNames": { - "$ref": "#/definitions/schema" - }, - "contains": { - "$ref": "#/definitions/schema" - }, - "discriminator": { - "type": "string", - "description": "Adds support for polymorphism. The discriminator is the schema property name that is used to differentiate between other schema that inherit this schema. The property name used MUST be defined at this schema and it MUST be in the required property list. When used, the value MUST be the name of this schema or any schema that inherits it. See Composition and Inheritance for more details." - }, - "externalDocs": { - "oneOf": [ - { - "$ref": "#/definitions/Reference" - }, - { - "$ref": "#/definitions/externalDocs" - } - ] - }, - "deprecated": { - "type": "boolean", - "description": "Specifies that a schema is deprecated and SHOULD be transitioned out of usage. Default value is false.", - "default": false - } - } - } - ] - }, - "json-schema-draft-07-schema": { - "title": "Core schema meta-schema", - "definitions": { - "schemaArray": { - "type": "array", - "minItems": 1, - "items": { - "$ref": "#/definitions/json-schema-draft-07-schema" - } - }, - "nonNegativeInteger": { - "type": "integer", - "minimum": 0 - }, - "nonNegativeIntegerDefault0": { - "allOf": [ - { - "$ref": "#/definitions/json-schema-draft-07-schema/definitions/nonNegativeInteger" - }, - { - "default": 0 - } - ] - }, - "simpleTypes": { - "enum": [ - "array", - "boolean", - "integer", - "null", - "number", - "object", - "string" - ] - }, - "stringArray": { - "type": "array", - "items": { - "type": "string" - }, - "uniqueItems": true, - "default": [] - } - }, - "type": [ - "object", - "boolean" - ], - "properties": { - "$id": { - "type": "string", - "format": "uri-reference" - }, - "$schema": { - "type": "string", - "format": "uri" - }, - "$ref": { - "type": "string", - "format": "uri-reference" - }, - "$comment": { - "type": "string" - }, - "title": { - "type": "string" - }, - "description": { - "type": "string" - }, - "default": true, - "readOnly": { - "type": "boolean", - "default": false - }, - "writeOnly": { - "type": "boolean", - "default": false - }, - "examples": { - "type": "array", - "items": true - }, - "multipleOf": { - "type": "number", - "exclusiveMinimum": 0 - }, - "maximum": { - "type": "number" - }, - "exclusiveMaximum": { - "type": "number" - }, - "minimum": { - "type": "number" - }, - "exclusiveMinimum": { - "type": "number" - }, - "maxLength": { - "$ref": "#/definitions/json-schema-draft-07-schema/definitions/nonNegativeInteger" - }, - "minLength": { - "$ref": "#/definitions/json-schema-draft-07-schema/definitions/nonNegativeIntegerDefault0" - }, - "pattern": { - "type": "string", - "format": "regex" - }, - "additionalItems": { - "$ref": "#/definitions/json-schema-draft-07-schema" - }, - "items": { - "anyOf": [ - { - "$ref": "#/definitions/json-schema-draft-07-schema" - }, - { - "$ref": "#/definitions/json-schema-draft-07-schema/definitions/schemaArray" - } - ], - "default": true - }, - "maxItems": { - "$ref": "#/definitions/json-schema-draft-07-schema/definitions/nonNegativeInteger" - }, - "minItems": { - "$ref": "#/definitions/json-schema-draft-07-schema/definitions/nonNegativeIntegerDefault0" - }, - "uniqueItems": { - "type": "boolean", - "default": false - }, - "contains": { - "$ref": "#/definitions/json-schema-draft-07-schema" - }, - "maxProperties": { - "$ref": "#/definitions/json-schema-draft-07-schema/definitions/nonNegativeInteger" - }, - "minProperties": { - "$ref": "#/definitions/json-schema-draft-07-schema/definitions/nonNegativeIntegerDefault0" - }, - "required": { - "$ref": "#/definitions/json-schema-draft-07-schema/definitions/stringArray" - }, - "additionalProperties": { - "$ref": "#/definitions/json-schema-draft-07-schema" - }, - "definitions": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/json-schema-draft-07-schema" - }, - "default": {} - }, - "properties": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/json-schema-draft-07-schema" - }, - "default": {} - }, - "patternProperties": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/json-schema-draft-07-schema" - }, - "propertyNames": { - "format": "regex" - }, - "default": {} - }, - "dependencies": { - "type": "object", - "additionalProperties": { - "anyOf": [ - { - "$ref": "#/definitions/json-schema-draft-07-schema" - }, - { - "$ref": "#/definitions/json-schema-draft-07-schema/definitions/stringArray" - } - ] - } - }, - "propertyNames": { - "$ref": "#/definitions/json-schema-draft-07-schema" - }, - "const": true, - "enum": { - "type": "array", - "items": true, - "minItems": 1, - "uniqueItems": true - }, - "type": { - "anyOf": [ - { - "$ref": "#/definitions/json-schema-draft-07-schema/definitions/simpleTypes" - }, - { - "type": "array", - "items": { - "$ref": "#/definitions/json-schema-draft-07-schema/definitions/simpleTypes" - }, - "minItems": 1, - "uniqueItems": true - } - ] - }, - "format": { - "type": "string" - }, - "contentMediaType": { - "type": "string" - }, - "contentEncoding": { - "type": "string" - }, - "if": { - "$ref": "#/definitions/json-schema-draft-07-schema" - }, - "then": { - "$ref": "#/definitions/json-schema-draft-07-schema" - }, - "else": { - "$ref": "#/definitions/json-schema-draft-07-schema" - }, - "allOf": { - "$ref": "#/definitions/json-schema-draft-07-schema/definitions/schemaArray" - }, - "anyOf": { - "$ref": "#/definitions/json-schema-draft-07-schema/definitions/schemaArray" - }, - "oneOf": { - "$ref": "#/definitions/json-schema-draft-07-schema/definitions/schemaArray" - }, - "not": { - "$ref": "#/definitions/json-schema-draft-07-schema" - } - }, - "default": true - }, - "bindings-kafka-0.5.0-server": { - "title": "Server Schema", - "description": "This object contains server connection information to a Kafka broker. This object contains additional information not possible to represent within the core AsyncAPI specification.", - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "properties": { - "schemaRegistryUrl": { - "type": "string", - "description": "API URL for the Schema Registry used when producing Kafka messages (if a Schema Registry was used)." - }, - "schemaRegistryVendor": { - "type": "string", - "description": "The vendor of the Schema Registry and Kafka serdes library that should be used." - }, - "bindingVersion": { - "type": "string", - "enum": [ - "0.5.0" - ], - "description": "The version of this binding." - } - }, - "examples": [ - { - "schemaRegistryUrl": "https://my-schema-registry.com", - "schemaRegistryVendor": "confluent", - "bindingVersion": "0.5.0" - } - ] - }, - "bindings-kafka-0.4.0-server": { - "title": "Server Schema", - "description": "This object contains server connection information to a Kafka broker. This object contains additional information not possible to represent within the core AsyncAPI specification.", - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "properties": { - "schemaRegistryUrl": { - "type": "string", - "description": "API URL for the Schema Registry used when producing Kafka messages (if a Schema Registry was used)." - }, - "schemaRegistryVendor": { - "type": "string", - "description": "The vendor of the Schema Registry and Kafka serdes library that should be used." - }, - "bindingVersion": { - "type": "string", - "enum": [ - "0.4.0" - ], - "description": "The version of this binding." - } - }, - "examples": [ - { - "schemaRegistryUrl": "https://my-schema-registry.com", - "schemaRegistryVendor": "confluent", - "bindingVersion": "0.4.0" - } - ] - }, - "bindings-kafka-0.3.0-server": { - "title": "Server Schema", - "description": "This object contains server connection information to a Kafka broker. This object contains additional information not possible to represent within the core AsyncAPI specification.", - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "properties": { - "schemaRegistryUrl": { - "type": "string", - "description": "API URL for the Schema Registry used when producing Kafka messages (if a Schema Registry was used)." - }, - "schemaRegistryVendor": { - "type": "string", - "description": "The vendor of the Schema Registry and Kafka serdes library that should be used." - }, - "bindingVersion": { - "type": "string", - "enum": [ - "0.3.0" - ], - "description": "The version of this binding." - } - }, - "examples": [ - { - "schemaRegistryUrl": "https://my-schema-registry.com", - "schemaRegistryVendor": "confluent", - "bindingVersion": "0.3.0" - } - ] - }, - "bindings-jms-0.0.1-server": { - "title": "Server Schema", - "description": "This object contains configuration for describing a JMS broker as an AsyncAPI server. This objects only contains configuration that can not be provided in the AsyncAPI standard server object.", - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "required": [ - "jmsConnectionFactory" - ], - "properties": { - "jmsConnectionFactory": { - "type": "string", - "description": "The classname of the ConnectionFactory implementation for the JMS Provider." - }, - "properties": { - "type": "array", - "items": { - "$ref": "#/definitions/bindings-jms-0.0.1-server/definitions/property" - }, - "description": "Additional properties to set on the JMS ConnectionFactory implementation for the JMS Provider." - }, - "clientID": { - "type": "string", - "description": "A client identifier for applications that use this JMS connection factory. If the Client ID Policy is set to 'Restricted' (the default), then configuring a Client ID on the ConnectionFactory prevents more than one JMS client from using a connection from this factory." - }, - "bindingVersion": { - "type": "string", - "enum": [ - "0.0.1" - ], - "description": "The version of this binding. If omitted, 'latest' MUST be assumed." - } - }, - "definitions": { - "property": { - "type": "object", - "required": [ - "name", - "value" - ], - "properties": { - "name": { - "type": "string", - "description": "The name of a property" - }, - "value": { - "type": [ - "string", - "boolean", - "number", - "null" - ], - "description": "The name of a property" - } - } - } - }, - "examples": [ - { - "jmsConnectionFactory": "org.apache.activemq.ActiveMQConnectionFactory", - "properties": [ - { - "name": "disableTimeStampsByDefault", - "value": false - } - ], - "clientID": "my-application-1", - "bindingVersion": "0.0.1" - } - ] - }, - "bindings-ibmmq-0.1.0-server": { - "title": "IBM MQ server bindings object", - "description": "This object contains server connection information about the IBM MQ server, referred to as an IBM MQ queue manager. This object contains additional connectivity information not possible to represent within the core AsyncAPI specification.", - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "properties": { - "groupId": { - "type": "string", - "description": "Defines a logical group of IBM MQ server objects. This is necessary to specify multi-endpoint configurations used in high availability deployments. If omitted, the server object is not part of a group." - }, - "ccdtQueueManagerName": { - "type": "string", - "default": "*", - "description": "The name of the IBM MQ queue manager to bind to in the CCDT file." - }, - "cipherSpec": { - "type": "string", - "description": "The recommended cipher specification used to establish a TLS connection between the client and the IBM MQ queue manager. More information on SSL/TLS cipher specifications supported by IBM MQ can be found on this page in the IBM MQ Knowledge Center." - }, - "multiEndpointServer": { - "type": "boolean", - "default": false, - "description": "If 'multiEndpointServer' is 'true' then multiple connections can be workload balanced and applications should not make assumptions as to where messages are processed. Where message ordering, or affinity to specific message resources is necessary, a single endpoint ('multiEndpointServer' = 'false') may be required." - }, - "heartBeatInterval": { - "type": "integer", - "minimum": 0, - "maximum": 999999, - "default": 300, - "description": "The recommended value (in seconds) for the heartbeat sent to the queue manager during periods of inactivity. A value of zero means that no heart beats are sent. A value of 1 means that the client will use the value defined by the queue manager. More information on heart beat interval can be found on this page in the IBM MQ Knowledge Center." - }, - "bindingVersion": { - "type": "string", - "enum": [ - "0.1.0" - ], - "description": "The version of this binding." - } - }, - "examples": [ - { - "groupId": "PRODCLSTR1", - "cipherSpec": "ANY_TLS12_OR_HIGHER", - "bindingVersion": "0.1.0" - }, - { - "groupId": "PRODCLSTR1", - "bindingVersion": "0.1.0" - } - ] - }, - "bindings-solace-0.4.0-server": { - "title": "Solace server bindings object", - "description": "This object contains server connection information about the Solace broker. This object contains additional connectivity information not possible to represent within the core AsyncAPI specification.", - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "properties": { - "msgVpn": { - "type": "string", - "description": "The name of the Virtual Private Network to connect to on the Solace broker." - }, - "clientName": { - "type": "string", - "minLength": 1, - "maxLength": 160, - "description": "A unique client name to use to register to the appliance. If specified, it must be a valid Topic name, and a maximum of 160 bytes in length when encoded as UTF-8." - }, - "bindingVersion": { - "type": "string", - "enum": [ - "0.4.0" - ], - "description": "The version of this binding." - } - }, - "examples": [ - { - "msgVpn": "ProdVPN", - "bindingVersion": "0.4.0" - } - ] - }, - "bindings-solace-0.3.0-server": { - "title": "Solace server bindings object", - "description": "This object contains server connection information about the Solace broker. This object contains additional connectivity information not possible to represent within the core AsyncAPI specification.", - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "properties": { - "msgVpn": { - "type": "string", - "description": "The name of the Virtual Private Network to connect to on the Solace broker." - }, - "bindingVersion": { - "type": "string", - "enum": [ - "0.3.0" - ], - "description": "The version of this binding." - } - }, - "examples": [ - { - "msgVpn": "ProdVPN", - "bindingVersion": "0.3.0" - } - ] - }, - "bindings-solace-0.2.0-server": { - "title": "Solace server bindings object", - "description": "This object contains server connection information about the Solace broker. This object contains additional connectivity information not possible to represent within the core AsyncAPI specification.", - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "properties": { - "msvVpn": { - "type": "string", - "description": "The name of the Virtual Private Network to connect to on the Solace broker." - }, - "bindingVersion": { - "type": "string", - "enum": [ - "0.2.0" - ], - "description": "The version of this binding." - } - }, - "examples": [ - { - "msgVpn": "ProdVPN", - "bindingVersion": "0.2.0" - } - ] - }, - "bindings-pulsar-0.1.0-server": { - "title": "Server Schema", - "description": "This object contains server information of Pulsar broker, which covers cluster and tenant admin configuration. This object contains additional information not possible to represent within the core AsyncAPI specification.", - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "properties": { - "tenant": { - "type": "string", - "description": "The pulsar tenant. If omitted, 'public' MUST be assumed." - }, - "bindingVersion": { - "type": "string", - "enum": [ - "0.1.0" - ], - "description": "The version of this binding. If omitted, 'latest' MUST be assumed." - } - }, - "examples": [ - { - "tenant": "contoso", - "bindingVersion": "0.1.0" - } - ] - }, - "channels": { - "type": "object", - "description": "An object containing all the Channel Object definitions the Application MUST use during runtime.", - "additionalProperties": { - "oneOf": [ - { - "$ref": "#/definitions/Reference" - }, - { - "$ref": "#/definitions/channel" - } - ] - }, - "examples": [ - { - "userSignedUp": { - "address": "user.signedup", - "messages": { - "userSignedUp": { - "$ref": "#/components/messages/userSignedUp" - } - } - } - } - ] - }, - "channel": { - "type": "object", - "description": "Describes a shared communication channel.", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "properties": { - "address": { - "type": [ - "string", - "null" - ], - "description": "An optional string representation of this channel's address. The address is typically the \"topic name\", \"routing key\", \"event type\", or \"path\". When `null` or absent, it MUST be interpreted as unknown. This is useful when the address is generated dynamically at runtime or can't be known upfront. It MAY contain Channel Address Expressions." - }, - "messages": { - "$ref": "#/definitions/channelMessages" - }, - "parameters": { - "$ref": "#/definitions/parameters" - }, - "title": { - "type": "string", - "description": "A human-friendly title for the channel." - }, - "summary": { - "type": "string", - "description": "A brief summary of the channel." - }, - "description": { - "type": "string", - "description": "A longer description of the channel. CommonMark is allowed." - }, - "servers": { - "type": "array", - "description": "The references of the servers on which this channel is available. If absent or empty then this channel must be available on all servers.", - "items": { - "$ref": "#/definitions/Reference" - }, - "uniqueItems": true - }, - "tags": { - "type": "array", - "description": "A list of tags for logical grouping of channels.", - "items": { - "oneOf": [ - { - "$ref": "#/definitions/Reference" - }, - { - "$ref": "#/definitions/tag" - } - ] - }, - "uniqueItems": true - }, - "externalDocs": { - "oneOf": [ - { - "$ref": "#/definitions/Reference" - }, - { - "$ref": "#/definitions/externalDocs" - } - ] - }, - "bindings": { - "oneOf": [ - { - "$ref": "#/definitions/Reference" - }, - { - "$ref": "#/definitions/channelBindingsObject" - } - ] - } - }, - "examples": [ - { - "address": "users.{userId}", - "title": "Users channel", - "description": "This channel is used to exchange messages about user events.", - "messages": { - "userSignedUp": { - "$ref": "#/components/messages/userSignedUp" - }, - "userCompletedOrder": { - "$ref": "#/components/messages/userCompletedOrder" - } - }, - "parameters": { - "userId": { - "$ref": "#/components/parameters/userId" - } - }, - "servers": [ - { - "$ref": "#/servers/rabbitmqInProd" - }, - { - "$ref": "#/servers/rabbitmqInStaging" - } - ], - "bindings": { - "amqp": { - "is": "queue", - "queue": { - "exclusive": true - } - } - }, - "tags": [ - { - "name": "user", - "description": "User-related messages" - } - ], - "externalDocs": { - "description": "Find more info here", - "url": "https://example.com" - } - } - ] - }, - "channelMessages": { - "type": "object", - "additionalProperties": { - "oneOf": [ - { - "$ref": "#/definitions/Reference" - }, - { - "$ref": "#/definitions/messageObject" - } - ] - }, - "description": "A map of the messages that will be sent to this channel by any application at any time. **Every message sent to this channel MUST be valid against one, and only one, of the message objects defined in this map.**" - }, - "messageObject": { - "type": "object", - "description": "Describes a message received on a given channel and operation.", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "properties": { - "contentType": { - "type": "string", - "description": "The content type to use when encoding/decoding a message's payload. The value MUST be a specific media type (e.g. application/json). When omitted, the value MUST be the one specified on the defaultContentType field." - }, - "headers": { - "$ref": "#/definitions/anySchema" - }, - "payload": { - "$ref": "#/definitions/anySchema" - }, - "correlationId": { - "oneOf": [ - { - "$ref": "#/definitions/Reference" - }, - { - "$ref": "#/definitions/correlationId" - } - ] - }, - "tags": { - "type": "array", - "items": { - "oneOf": [ - { - "$ref": "#/definitions/Reference" - }, - { - "$ref": "#/definitions/tag" - } - ] - }, - "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." - }, - "externalDocs": { - "oneOf": [ - { - "$ref": "#/definitions/Reference" - }, - { - "$ref": "#/definitions/externalDocs" - } - ] - }, - "deprecated": { - "type": "boolean", - "default": false - }, - "examples": { - "type": "array", - "description": "List of examples.", - "items": { - "type": "object", - "additionalProperties": false, - "anyOf": [ - { - "required": [ - "payload" - ] - }, - { - "required": [ - "headers" - ] - } - ], - "properties": { - "name": { - "type": "string", - "description": "Machine readable name of the message example." - }, - "summary": { - "type": "string", - "description": "A brief summary of the message example." - }, - "headers": { - "type": "object", - "description": "Example of the application headers. It can be of any type." - }, - "payload": { - "description": "Example of the message payload. It can be of any type." - } - } - } - }, - "bindings": { - "oneOf": [ - { - "$ref": "#/definitions/Reference" - }, - { - "$ref": "#/definitions/messageBindingsObject" - } - ] - }, - "traits": { - "type": "array", - "description": "A list of traits to apply to the message object. Traits MUST be merged using traits merge mechanism. The resulting object MUST be a valid Message Object.", - "items": { - "oneOf": [ - { - "$ref": "#/definitions/Reference" - }, - { - "$ref": "#/definitions/messageTrait" - }, - { - "type": "array", - "items": [ - { - "oneOf": [ - { - "$ref": "#/definitions/Reference" - }, - { - "$ref": "#/definitions/messageTrait" - } - ] - }, - { - "type": "object", - "additionalItems": true - } - ] - } - ] - } - } - }, - "examples": [ - { - "messageId": "userSignup", - "name": "UserSignup", - "title": "User signup", - "summary": "Action to sign a user up.", - "description": "A longer description", - "contentType": "application/json", - "tags": [ - { - "name": "user" - }, - { - "name": "signup" - }, - { - "name": "register" - } - ], - "headers": { - "type": "object", - "properties": { - "correlationId": { - "description": "Correlation ID set by application", - "type": "string" - }, - "applicationInstanceId": { - "description": "Unique identifier for a given instance of the publishing application", - "type": "string" - } - } - }, - "payload": { - "type": "object", - "properties": { - "user": { - "$ref": "#/components/schemas/userCreate" - }, - "signup": { - "$ref": "#/components/schemas/signup" - } - } - }, - "correlationId": { - "description": "Default Correlation ID", - "location": "$message.header#/correlationId" - }, - "traits": [ - { - "$ref": "#/components/messageTraits/commonHeaders" - } - ], - "examples": [ - { - "name": "SimpleSignup", - "summary": "A simple UserSignup example message", - "headers": { - "correlationId": "my-correlation-id", - "applicationInstanceId": "myInstanceId" - }, - "payload": { - "user": { - "someUserKey": "someUserValue" - }, - "signup": { - "someSignupKey": "someSignupValue" - } - } - } - ] - } - ] - }, - "anySchema": { - "if": { - "required": [ - "schema" - ] - }, - "then": { - "$ref": "#/definitions/multiFormatSchema" - }, - "else": { - "$ref": "#/definitions/schema" - }, - "description": "An object representing either a schema or a multiFormatSchema based on the existence of the 'schema' property. If the property 'schema' is present, use the multi-format schema. Use the default AsyncAPI Schema otherwise." - }, - "multiFormatSchema": { - "description": "The Multi Format Schema Object represents a schema definition. It differs from the Schema Object in that it supports multiple schema formats or languages (e.g., JSON Schema, Avro, etc.).", - "type": "object", - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "if": { - "not": { - "type": "object" - } - }, - "then": { - "$ref": "#/definitions/schema" - }, - "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", - "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" - ] - } - ] - } - }, - "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": { - "type": "object", - "definitions": { - "ExternalDocumentation": { - "type": "object", - "required": [ - "url" - ], - "properties": { - "description": { - "type": "string" - }, - "url": { - "type": "string", - "format": "uri-reference" - } - }, - "patternProperties": { - "^x-": {} - }, - "additionalProperties": false - }, - "Discriminator": { - "type": "object", - "required": [ - "propertyName" - ], - "properties": { - "propertyName": { - "type": "string" - }, - "mapping": { - "type": "object", - "additionalProperties": { - "type": "string" - } - } - } - }, - "Reference": { - "type": "object", - "required": [ - "$ref" - ], - "patternProperties": { - "^\\$ref$": { - "type": "string", - "format": "uri-reference" - } - } - }, - "XML": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "namespace": { - "type": "string", - "format": "uri" - }, - "prefix": { - "type": "string" - }, - "attribute": { - "type": "boolean", - "default": false - }, - "wrapped": { - "type": "boolean", - "default": false - } - }, - "patternProperties": { - "^x-": {} - }, - "additionalProperties": false - } - }, - "properties": { - "title": { - "type": "string" - }, - "multipleOf": { - "type": "number", - "exclusiveMinimum": 0 - }, - "maximum": { - "type": "number" - }, - "exclusiveMaximum": { - "type": "boolean", - "default": false - }, - "minimum": { - "type": "number" - }, - "exclusiveMinimum": { - "type": "boolean", - "default": false - }, - "maxLength": { - "type": "integer", - "minimum": 0 - }, - "minLength": { - "type": "integer", - "minimum": 0, - "default": 0 - }, - "pattern": { - "type": "string", - "format": "regex" - }, - "maxItems": { - "type": "integer", - "minimum": 0 - }, - "minItems": { - "type": "integer", - "minimum": 0, - "default": 0 - }, - "uniqueItems": { - "type": "boolean", - "default": false - }, - "maxProperties": { - "type": "integer", - "minimum": 0 - }, - "minProperties": { - "type": "integer", - "minimum": 0, - "default": 0 - }, - "required": { - "type": "array", - "items": { - "type": "string" - }, - "minItems": 1, - "uniqueItems": true - }, - "enum": { - "type": "array", - "items": true, - "minItems": 1, - "uniqueItems": false - }, - "type": { - "type": "string", - "enum": [ - "array", - "boolean", - "integer", - "number", - "object", - "string" - ] - }, - "not": { - "oneOf": [ - { - "$ref": "#/definitions/openapiSchema_3_0" - }, - { - "$ref": "#/definitions/openapiSchema_3_0/definitions/Reference" - } - ] - }, - "allOf": { - "type": "array", - "items": { - "oneOf": [ - { - "$ref": "#/definitions/openapiSchema_3_0" - }, - { - "$ref": "#/definitions/openapiSchema_3_0/definitions/Reference" - } - ] - } - }, - "oneOf": { - "type": "array", - "items": { - "oneOf": [ - { - "$ref": "#/definitions/openapiSchema_3_0" - }, - { - "$ref": "#/definitions/openapiSchema_3_0/definitions/Reference" - } - ] - } - }, - "anyOf": { - "type": "array", - "items": { - "oneOf": [ - { - "$ref": "#/definitions/openapiSchema_3_0" - }, - { - "$ref": "#/definitions/openapiSchema_3_0/definitions/Reference" - } - ] - } - }, - "items": { - "oneOf": [ - { - "$ref": "#/definitions/openapiSchema_3_0" - }, - { - "$ref": "#/definitions/openapiSchema_3_0/definitions/Reference" - } - ] - }, - "properties": { - "type": "object", - "additionalProperties": { - "oneOf": [ - { - "$ref": "#/definitions/openapiSchema_3_0" - }, - { - "$ref": "#/definitions/openapiSchema_3_0/definitions/Reference" - } - ] - } - }, - "additionalProperties": { - "oneOf": [ - { - "$ref": "#/definitions/openapiSchema_3_0" - }, - { - "$ref": "#/definitions/openapiSchema_3_0/definitions/Reference" - }, - { - "type": "boolean" - } - ], - "default": true - }, - "description": { - "type": "string" - }, - "format": { - "type": "string" - }, - "default": true, - "nullable": { - "type": "boolean", - "default": false - }, - "discriminator": { - "$ref": "#/definitions/openapiSchema_3_0/definitions/Discriminator" - }, - "readOnly": { - "type": "boolean", - "default": false - }, - "writeOnly": { - "type": "boolean", - "default": false - }, - "example": true, - "externalDocs": { - "$ref": "#/definitions/openapiSchema_3_0/definitions/ExternalDocumentation" - }, - "deprecated": { - "type": "boolean", - "default": false - }, - "xml": { - "$ref": "#/definitions/openapiSchema_3_0/definitions/XML" - } - }, - "patternProperties": { - "^x-": true - }, - "additionalProperties": false - }, - "avroSchema_v1": { - "definitions": { - "avroSchema": { - "title": "Avro Schema", - "description": "Root Schema", - "oneOf": [ - { - "$ref": "#/definitions/avroSchema_v1/definitions/types" - } - ] - }, - "types": { - "title": "Avro Types", - "description": "Allowed Avro types", - "oneOf": [ - { - "$ref": "#/definitions/avroSchema_v1/definitions/primitiveType" - }, - { - "$ref": "#/definitions/avroSchema_v1/definitions/primitiveTypeWithMetadata" - }, - { - "$ref": "#/definitions/avroSchema_v1/definitions/customTypeReference" - }, - { - "$ref": "#/definitions/avroSchema_v1/definitions/avroRecord" - }, - { - "$ref": "#/definitions/avroSchema_v1/definitions/avroEnum" - }, - { - "$ref": "#/definitions/avroSchema_v1/definitions/avroArray" - }, - { - "$ref": "#/definitions/avroSchema_v1/definitions/avroMap" - }, - { - "$ref": "#/definitions/avroSchema_v1/definitions/avroFixed" - }, - { - "$ref": "#/definitions/avroSchema_v1/definitions/avroUnion" - } - ] - }, - "primitiveType": { - "title": "Primitive Type", - "description": "Basic type primitives.", - "type": "string", - "enum": [ - "null", - "boolean", - "int", - "long", - "float", - "double", - "bytes", - "string" - ] - }, - "primitiveTypeWithMetadata": { - "title": "Primitive Type With Metadata", - "description": "A primitive type with metadata attached.", - "type": "object", - "properties": { - "type": { - "$ref": "#/definitions/avroSchema_v1/definitions/primitiveType" - } - }, - "required": [ - "type" - ] - }, - "customTypeReference": { - "title": "Custom Type", - "description": "Reference to a ComplexType", - "not": { - "$ref": "#/definitions/avroSchema_v1/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_v1/definitions/avroSchema" - }, - "minItems": 1 - }, - "avroField": { - "title": "Field", - "description": "A field within a Record", - "type": "object", - "properties": { - "name": { - "$ref": "#/definitions/avroSchema_v1/definitions/name" - }, - "type": { - "$ref": "#/definitions/avroSchema_v1/definitions/types" - }, - "doc": { - "type": "string" - }, - "default": true, - "order": { - "enum": [ - "ascending", - "descending", - "ignore" - ] - }, - "aliases": { - "type": "array", - "items": { - "$ref": "#/definitions/avroSchema_v1/definitions/name" - } - } - }, - "required": [ - "name", - "type" - ] - }, - "avroRecord": { - "title": "Record", - "description": "A Record", - "type": "object", - "properties": { - "type": { - "type": "string", - "const": "record" - }, - "name": { - "$ref": "#/definitions/avroSchema_v1/definitions/name" - }, - "namespace": { - "$ref": "#/definitions/avroSchema_v1/definitions/namespace" - }, - "doc": { - "type": "string" - }, - "aliases": { - "type": "array", - "items": { - "$ref": "#/definitions/avroSchema_v1/definitions/name" - } - }, - "fields": { - "type": "array", - "items": { - "$ref": "#/definitions/avroSchema_v1/definitions/avroField" - } - } - }, - "required": [ - "type", - "name", - "fields" - ] - }, - "avroEnum": { - "title": "Enum", - "description": "An enumeration", - "type": "object", - "properties": { - "type": { - "type": "string", - "const": "enum" - }, - "name": { - "$ref": "#/definitions/avroSchema_v1/definitions/name" - }, - "namespace": { - "$ref": "#/definitions/avroSchema_v1/definitions/namespace" - }, - "doc": { - "type": "string" - }, - "aliases": { - "type": "array", - "items": { - "$ref": "#/definitions/avroSchema_v1/definitions/name" - } - }, - "symbols": { - "type": "array", - "items": { - "$ref": "#/definitions/avroSchema_v1/definitions/name" - } - } - }, - "required": [ - "type", - "name", - "symbols" - ] - }, - "avroArray": { - "title": "Array", - "description": "An array", - "type": "object", - "properties": { - "type": { - "type": "string", - "const": "array" - }, - "name": { - "$ref": "#/definitions/avroSchema_v1/definitions/name" - }, - "namespace": { - "$ref": "#/definitions/avroSchema_v1/definitions/namespace" - }, - "doc": { - "type": "string" - }, - "aliases": { - "type": "array", - "items": { - "$ref": "#/definitions/avroSchema_v1/definitions/name" - } - }, - "items": { - "$ref": "#/definitions/avroSchema_v1/definitions/types" - } - }, - "required": [ - "type", - "items" - ] - }, - "avroMap": { - "title": "Map", - "description": "A map of values", - "type": "object", - "properties": { - "type": { - "type": "string", - "const": "map" - }, - "name": { - "$ref": "#/definitions/avroSchema_v1/definitions/name" - }, - "namespace": { - "$ref": "#/definitions/avroSchema_v1/definitions/namespace" - }, - "doc": { - "type": "string" - }, - "aliases": { - "type": "array", - "items": { - "$ref": "#/definitions/avroSchema_v1/definitions/name" - } - }, - "values": { - "$ref": "#/definitions/avroSchema_v1/definitions/types" - } - }, - "required": [ - "type", - "values" - ] - }, - "avroFixed": { - "title": "Fixed", - "description": "A fixed sized array of bytes", - "type": "object", - "properties": { - "type": { - "type": "string", - "const": "fixed" - }, - "name": { - "$ref": "#/definitions/avroSchema_v1/definitions/name" - }, - "namespace": { - "$ref": "#/definitions/avroSchema_v1/definitions/namespace" - }, - "doc": { - "type": "string" - }, - "aliases": { - "type": "array", - "items": { - "$ref": "#/definitions/avroSchema_v1/definitions/name" - } - }, - "size": { - "type": "number" - } - }, - "required": [ - "type", - "name", - "size" - ] - }, - "name": { - "type": "string", - "pattern": "^[A-Za-z_][A-Za-z0-9_]*$" - }, - "namespace": { - "type": "string", - "pattern": "^([A-Za-z_][A-Za-z0-9_]*(\\.[A-Za-z_][A-Za-z0-9_]*)*)*$" - } - }, - "description": "Json-Schema definition for Avro AVSC files.", - "oneOf": [ - { - "$ref": "#/definitions/avroSchema_v1/definitions/avroSchema" - } - ], - "title": "Avro Schema Definition" - }, - "correlationId": { - "type": "object", - "description": "An object that specifies an identifier at design time that can used for message tracing and correlation.", - "required": [ - "location" - ], - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "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]))*)*" - } - }, - "examples": [ - { - "description": "Default Correlation ID", - "location": "$message.header#/correlationId" - } - ] - }, - "messageBindingsObject": { - "type": "object", - "description": "Map describing protocol-specific definitions for a message.", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "properties": { - "http": { - "properties": { - "bindingVersion": { - "enum": [ - "0.2.0", - "0.3.0" - ] - } - }, - "allOf": [ - { - "description": "If no bindingVersion specified, use the latest binding", - "if": { - "not": { - "required": [ - "bindingVersion" - ] - } - }, - "then": { - "$ref": "#/definitions/bindings-http-0.3.0-message" - } - }, - { - "if": { - "required": [ - "bindingVersion" - ], - "properties": { - "bindingVersion": { - "const": "0.2.0" - } - } - }, - "then": { - "$ref": "#/definitions/bindings-http-0.2.0-message" - } - }, - { - "if": { - "required": [ - "bindingVersion" - ], - "properties": { - "bindingVersion": { - "const": "0.3.0" - } - } - }, - "then": { - "$ref": "#/definitions/bindings-http-0.3.0-message" - } - } - ] - }, - "ws": {}, - "amqp": { - "properties": { - "bindingVersion": { - "enum": [ - "0.3.0" - ] - } - }, - "allOf": [ - { - "description": "If no bindingVersion specified, use the latest binding", - "if": { - "not": { - "required": [ - "bindingVersion" - ] - } - }, - "then": { - "$ref": "#/definitions/bindings-amqp-0.3.0-message" - } - }, - { - "if": { - "required": [ - "bindingVersion" - ], - "properties": { - "bindingVersion": { - "const": "0.3.0" - } - } - }, - "then": { - "$ref": "#/definitions/bindings-amqp-0.3.0-message" - } - } - ] - }, - "amqp1": {}, - "mqtt": { - "properties": { - "bindingVersion": { - "enum": [ - "0.2.0" - ] - } - }, - "allOf": [ - { - "description": "If no bindingVersion specified, use the latest binding", - "if": { - "not": { - "required": [ - "bindingVersion" - ] - } - }, - "then": { - "$ref": "#/definitions/bindings-mqtt-0.2.0-message" - } - }, - { - "if": { - "required": [ - "bindingVersion" - ], - "properties": { - "bindingVersion": { - "const": "0.2.0" - } - } - }, - "then": { - "$ref": "#/definitions/bindings-mqtt-0.2.0-message" - } - } - ] - }, - "kafka": { - "properties": { - "bindingVersion": { - "enum": [ - "0.5.0", - "0.4.0", - "0.3.0" - ] - } - }, - "allOf": [ - { - "description": "If no bindingVersion specified, use the latest binding", - "if": { - "not": { - "required": [ - "bindingVersion" - ] - } - }, - "then": { - "$ref": "#/definitions/bindings-kafka-0.5.0-message" - } - }, - { - "if": { - "required": [ - "bindingVersion" - ], - "properties": { - "bindingVersion": { - "const": "0.5.0" - } - } - }, - "then": { - "$ref": "#/definitions/bindings-kafka-0.5.0-message" - } - }, - { - "if": { - "required": [ - "bindingVersion" - ], - "properties": { - "bindingVersion": { - "const": "0.4.0" - } - } - }, - "then": { - "$ref": "#/definitions/bindings-kafka-0.4.0-message" - } - }, - { - "if": { - "required": [ - "bindingVersion" - ], - "properties": { - "bindingVersion": { - "const": "0.3.0" - } - } - }, - "then": { - "$ref": "#/definitions/bindings-kafka-0.3.0-message" - } - } - ] - }, - "anypointmq": { - "properties": { - "bindingVersion": { - "enum": [ - "0.0.1" - ] - } - }, - "allOf": [ - { - "description": "If no bindingVersion specified, use the latest binding", - "if": { - "not": { - "required": [ - "bindingVersion" - ] - } - }, - "then": { - "$ref": "#/definitions/bindings-anypointmq-0.0.1-message" - } - }, - { - "if": { - "required": [ - "bindingVersion" - ], - "properties": { - "bindingVersion": { - "const": "0.0.1" - } - } - }, - "then": { - "$ref": "#/definitions/bindings-anypointmq-0.0.1-message" - } - } - ] - }, - "nats": {}, - "jms": { - "properties": { - "bindingVersion": { - "enum": [ - "0.0.1" - ] - } - }, - "allOf": [ - { - "description": "If no bindingVersion specified, use the latest binding", - "if": { - "not": { - "required": [ - "bindingVersion" - ] - } - }, - "then": { - "$ref": "#/definitions/bindings-jms-0.0.1-message" - } - }, - { - "if": { - "required": [ - "bindingVersion" - ], - "properties": { - "bindingVersion": { - "const": "0.0.1" - } - } - }, - "then": { - "$ref": "#/definitions/bindings-jms-0.0.1-message" - } - } - ] - }, - "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" - ] - } - }, - "then": { - "$ref": "#/definitions/bindings-ibmmq-0.1.0-message" - } - }, - { - "if": { - "required": [ - "bindingVersion" - ], - "properties": { - "bindingVersion": { - "const": "0.1.0" - } - } - }, - "then": { - "$ref": "#/definitions/bindings-ibmmq-0.1.0-message" - } - } - ] - }, - "solace": {}, - "googlepubsub": { - "properties": { - "bindingVersion": { - "enum": [ - "0.2.0" - ] - } - }, - "allOf": [ - { - "description": "If no bindingVersion specified, use the latest binding", - "if": { - "not": { - "required": [ - "bindingVersion" - ] - } - }, - "then": { - "$ref": "#/definitions/bindings-googlepubsub-0.2.0-message" - } - }, - { - "if": { - "required": [ - "bindingVersion" - ], - "properties": { - "bindingVersion": { - "const": "0.2.0" - } - } - }, - "then": { - "$ref": "#/definitions/bindings-googlepubsub-0.2.0-message" - } - } - ] - } - } + ] }, - "bindings-http-0.3.0-message": { - "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": "#/definitions/specificationExtension" - } - }, - "properties": { - "headers": { - "$ref": "#/definitions/schema", - "description": "\tA Schema object containing the definitions for HTTP-specific headers. This schema MUST be of type 'object' and have a 'properties' key." + "SecurityScheme": { + "description": "Defines a security scheme that can be used by the operations.", + "oneOf": [ + { + "$ref": "#/definitions/userPassword" }, - "statusCode": { - "type": "number", - "description": "The HTTP response status code according to [RFC 9110](https://httpwg.org/specs/rfc9110.html#overview.of.status.codes). `statusCode` is only relevant for messages referenced by the [Operation Reply Object](https://www.asyncapi.com/docs/reference/specification/v3.0.0#operationReplyObject), as it defines the status code for the response. In all other cases, this value can be safely ignored." + { + "$ref": "#/definitions/apiKey" }, - "bindingVersion": { - "type": "string", - "enum": [ - "0.3.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" - ] - } - } - }, - "bindingVersion": "0.3.0" - } - ] - }, - "bindings-http-0.2.0-message": { - "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": "#/definitions/specificationExtension" - } - }, - "properties": { - "headers": { - "$ref": "#/definitions/schema", - "description": "\tA Schema object containing the definitions for HTTP-specific headers. This schema MUST be of type 'object' and have a 'properties' key." + "$ref": "#/definitions/X509" + }, + { + "$ref": "#/definitions/symmetricEncryption" + }, + { + "$ref": "#/definitions/asymmetricEncryption" }, - "bindingVersion": { - "type": "string", - "enum": [ - "0.2.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" - ] - } - } - }, - "bindingVersion": "0.2.0" - } - ] - }, - "bindings-amqp-0.3.0-message": { - "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": "#/definitions/specificationExtension" - } - }, - "properties": { - "contentEncoding": { - "type": "string", - "description": "A MIME encoding for the message content." + "$ref": "#/definitions/HTTPSecurityScheme" }, - "messageType": { - "type": "string", - "description": "Application-specific message type." + { + "$ref": "#/definitions/oauth2Flows" }, - "bindingVersion": { - "type": "string", - "enum": [ - "0.3.0" - ], - "description": "The version of this binding. If omitted, \"latest\" MUST be assumed." + { + "$ref": "#/definitions/openIdConnect" + }, + { + "$ref": "#/definitions/SaslSecurityScheme" } - }, + ], "examples": [ { - "contentEncoding": "gzip", - "messageType": "user.signup", - "bindingVersion": "0.3.0" + "type": "userPassword" } ] }, - "bindings-mqtt-0.2.0-message": { - "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": "#/definitions/specificationExtension" - } - }, - "properties": { - "payloadFormatIndicator": { - "type": "integer", - "enum": [ - 0, - 1 - ], - "description": "1 indicates that the payload is UTF-8 encoded character data. 0 indicates that the payload format is unspecified.", - "default": 0 - }, - "correlationData": { - "oneOf": [ - { - "$ref": "#/definitions/schema" - }, - { - "$ref": "#/definitions/Reference" - } - ], - "description": "Correlation Data is used by the sender of the request message to identify which request the response message is for when it is received." + "securityRequirements": { + "description": "An array representing security requirements.", + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/SecurityScheme" + } + ] + } + }, + "json-schema-draft-07-schema": { + "title": "Core schema meta-schema", + "definitions": { + "schemaArray": { + "type": "array", + "minItems": 1, + "items": { + "$ref": "#/definitions/json-schema-draft-07-schema" + } }, - "contentType": { - "type": "string", - "description": "String describing the content type of the message payload. This should not conflict with the contentType field of the associated AsyncAPI Message object." + "nonNegativeInteger": { + "type": "integer", + "minimum": 0 }, - "responseTopic": { - "oneOf": [ - { - "type": "string", - "format": "uri-template", - "minLength": 1 - }, + "nonNegativeIntegerDefault0": { + "allOf": [ { - "$ref": "#/definitions/schema" + "$ref": "#/definitions/json-schema-draft-07-schema/definitions/nonNegativeInteger" }, { - "$ref": "#/definitions/Reference" + "default": 0 } - ], - "description": "The topic (channel URI) to be used for a response message." + ] }, - "bindingVersion": { - "type": "string", + "simpleTypes": { "enum": [ - "0.2.0" - ], - "description": "The version of this binding. If omitted, 'latest' MUST be assumed." - } - }, - "examples": [ - { - "bindingVersion": "0.2.0" + "array", + "boolean", + "integer", + "null", + "number", + "object", + "string" + ] }, - { - "contentType": "application/json", - "correlationData": { - "type": "string", - "format": "uuid" + "stringArray": { + "type": "array", + "items": { + "type": "string" }, - "responseTopic": "application/responses", - "bindingVersion": "0.2.0" - } - ] - }, - "bindings-kafka-0.5.0-message": { - "title": "Message Schema", - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" + "uniqueItems": true, + "default": [] } }, + "type": [ + "object", + "boolean" + ], "properties": { - "key": { - "oneOf": [ - { - "$ref": "#/definitions/Reference" - }, - { - "$ref": "#/definitions/schema" - } - ], - "description": "The message key." - }, - "schemaIdLocation": { + "$id": { "type": "string", - "description": "If a Schema Registry is used when performing this operation, tells where the id of schema is stored.", - "enum": [ - "header", - "payload" - ] + "format": "uri-reference" }, - "schemaIdPayloadEncoding": { + "$schema": { "type": "string", - "description": "Number of bytes or vendor specific values when schema id is encoded in payload." + "format": "uri" }, - "schemaLookupStrategy": { + "$ref": { "type": "string", - "description": "Freeform string for any naming strategy class to use. Clients should default to the vendor default if not supplied." + "format": "uri-reference" }, - "bindingVersion": { + "$comment": { + "type": "string" + }, + "title": { + "type": "string" + }, + "description": { + "type": "string" + }, + "default": true, + "readOnly": { + "type": "boolean", + "default": false + }, + "writeOnly": { + "type": "boolean", + "default": false + }, + "examples": { + "type": "array", + "items": true + }, + "multipleOf": { + "type": "number", + "exclusiveMinimum": 0 + }, + "maximum": { + "type": "number" + }, + "exclusiveMaximum": { + "type": "number" + }, + "minimum": { + "type": "number" + }, + "exclusiveMinimum": { + "type": "number" + }, + "maxLength": { + "$ref": "#/definitions/json-schema-draft-07-schema/definitions/nonNegativeInteger" + }, + "minLength": { + "$ref": "#/definitions/json-schema-draft-07-schema/definitions/nonNegativeIntegerDefault0" + }, + "pattern": { "type": "string", - "enum": [ - "0.5.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.5.0" + "format": "regex" }, - { - "key": { - "$ref": "path/to/user-create.avsc#/UserCreate" - }, - "schemaIdLocation": "payload", - "schemaIdPayloadEncoding": "4", - "bindingVersion": "0.5.0" - } - ] - }, - "bindings-kafka-0.4.0-message": { - "title": "Message Schema", - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "properties": { - "key": { + "additionalItems": { + "$ref": "#/definitions/json-schema-draft-07-schema" + }, + "items": { "anyOf": [ { - "$ref": "#/definitions/Reference" - }, - { - "$ref": "#/definitions/schema" + "$ref": "#/definitions/json-schema-draft-07-schema" }, { - "$ref": "#/definitions/avroSchema_v1" + "$ref": "#/definitions/json-schema-draft-07-schema/definitions/schemaArray" } ], - "description": "The message key." + "default": true }, - "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" - ] + "maxItems": { + "$ref": "#/definitions/json-schema-draft-07-schema/definitions/nonNegativeInteger" + }, + "minItems": { + "$ref": "#/definitions/json-schema-draft-07-schema/definitions/nonNegativeIntegerDefault0" + }, + "uniqueItems": { + "type": "boolean", + "default": false + }, + "contains": { + "$ref": "#/definitions/json-schema-draft-07-schema" + }, + "maxProperties": { + "$ref": "#/definitions/json-schema-draft-07-schema/definitions/nonNegativeInteger" }, - "schemaIdPayloadEncoding": { - "type": "string", - "description": "Number of bytes or vendor specific values when schema id is encoded in payload." + "minProperties": { + "$ref": "#/definitions/json-schema-draft-07-schema/definitions/nonNegativeIntegerDefault0" }, - "schemaLookupStrategy": { - "type": "string", - "description": "Freeform string for any naming strategy class to use. Clients should default to the vendor default if not supplied." + "required": { + "$ref": "#/definitions/json-schema-draft-07-schema/definitions/stringArray" }, - "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" - ] + "additionalProperties": { + "$ref": "#/definitions/json-schema-draft-07-schema" + }, + "definitions": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/json-schema-draft-07-schema" }, - "schemaIdLocation": "payload", - "schemaIdPayloadEncoding": "apicurio-new", - "schemaLookupStrategy": "TopicIdStrategy", - "bindingVersion": "0.4.0" + "default": {} }, - { - "key": { - "$ref": "path/to/user-create.avsc#/UserCreate" + "properties": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/json-schema-draft-07-schema" }, - "schemaIdLocation": "payload", - "schemaIdPayloadEncoding": "4", - "bindingVersion": "0.4.0" - } - ] - }, - "bindings-kafka-0.3.0-message": { - "title": "Message Schema", - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "properties": { - "key": { - "$ref": "#/definitions/schema", - "description": "The message key." + "default": {} }, - "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" - ] + "patternProperties": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/json-schema-draft-07-schema" + }, + "propertyNames": { + "format": "regex" + }, + "default": {} }, - "schemaIdPayloadEncoding": { - "type": "string", - "description": "Number of bytes or vendor specific values when schema id is encoded in payload." + "dependencies": { + "type": "object", + "additionalProperties": { + "anyOf": [ + { + "$ref": "#/definitions/json-schema-draft-07-schema" + }, + { + "$ref": "#/definitions/json-schema-draft-07-schema/definitions/stringArray" + } + ] + } }, - "schemaLookupStrategy": { - "type": "string", - "description": "Freeform string for any naming strategy class to use. Clients should default to the vendor default if not supplied." + "propertyNames": { + "$ref": "#/definitions/json-schema-draft-07-schema" }, - "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" + "const": true, + "enum": { + "type": "array", + "items": true, + "minItems": 1, + "uniqueItems": true }, - { - "key": { - "$ref": "path/to/user-create.avsc#/UserCreate" - }, - "schemaIdLocation": "payload", - "schemaIdPayloadEncoding": "4", - "bindingVersion": "0.3.0" - } - ] - }, - "bindings-anypointmq-0.0.1-message": { - "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": "#/definitions/specificationExtension" - } - }, - "properties": { - "headers": { - "oneOf": [ + "type": { + "anyOf": [ { - "$ref": "#/definitions/schema" + "$ref": "#/definitions/json-schema-draft-07-schema/definitions/simpleTypes" }, { - "$ref": "#/definitions/Reference" + "type": "array", + "items": { + "$ref": "#/definitions/json-schema-draft-07-schema/definitions/simpleTypes" + }, + "minItems": 1, + "uniqueItems": true } - ], - "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'." + ] }, - "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" - } - ] - }, - "bindings-jms-0.0.1-message": { - "title": "Message Schema", - "description": "This object contains configuration for describing a JMS 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": "#/definitions/specificationExtension" - } - }, - "properties": { - "headers": { - "$ref": "#/definitions/schema", - "description": "A Schema object containing the definitions for JMS headers (protocol headers). This schema MUST be of type 'object' and have a 'properties' key. Examples of JMS protocol headers are 'JMSMessageID', 'JMSTimestamp', and 'JMSCorrelationID'." + "format": { + "type": "string" }, - "bindingVersion": { - "type": "string", - "enum": [ - "0.0.1" - ], - "description": "The version of this binding. If omitted, 'latest' MUST be assumed." - } - }, - "examples": [ - { - "headers": { - "type": "object", - "required": [ - "JMSMessageID" - ], - "properties": { - "JMSMessageID": { - "type": [ - "string", - "null" - ], - "description": "A unique message identifier. This may be set by your JMS Provider on your behalf." - }, - "JMSTimestamp": { - "type": "integer", - "description": "The time the message was sent. This may be set by your JMS Provider on your behalf. The time the message was sent. The value of the timestamp is the amount of time, measured in milliseconds, that has elapsed since midnight, January 1, 1970, UTC." - }, - "JMSDeliveryMode": { - "type": "string", - "enum": [ - "PERSISTENT", - "NON_PERSISTENT" - ], - "default": "PERSISTENT", - "description": "Denotes the delivery mode for the message. This may be set by your JMS Provider on your behalf." - }, - "JMSPriority": { - "type": "integer", - "default": 4, - "description": "The priority of the message. This may be set by your JMS Provider on your behalf." - }, - "JMSExpires": { - "type": "integer", - "description": "The time at which the message expires. This may be set by your JMS Provider on your behalf. A value of zero means that the message does not expire. Any non-zero value is the amount of time, measured in milliseconds, that has elapsed since midnight, January 1, 1970, UTC, at which the message will expire." - }, - "JMSType": { - "type": [ - "string", - "null" - ], - "description": "The type of message. Some JMS providers use a message repository that contains the definitions of messages sent by applications. The 'JMSType' header field may reference a message's definition in the provider's repository. The JMS API does not define a standard message definition repository, nor does it define a naming policy for the definitions it contains. Some messaging systems require that a message type definition for each application message be created and that each message specify its type. In order to work with such JMS providers, JMS clients should assign a value to 'JMSType', whether the application makes use of it or not. This ensures that the field is properly set for those providers that require it." - }, - "JMSCorrelationID": { - "type": [ - "string", - "null" - ], - "description": "The correlation identifier of the message. A client can use the 'JMSCorrelationID' header field to link one message with another. A typical use is to link a response message with its request message. Since each message sent by a JMS provider is assigned a message ID value, it is convenient to link messages via message ID, such message ID values must start with the 'ID:' prefix. Conversely, application-specified values must not start with the 'ID:' prefix; this is reserved for provider-generated message ID values." - }, - "JMSReplyTo": { - "type": "string", - "description": "The queue or topic that the message sender expects replies to." - } - } - }, - "bindingVersion": "0.0.1" - } - ] - }, - "bindings-ibmmq-0.1.0-message": { - "title": "IBM MQ message bindings object", - "description": "This object contains information about the message representation in IBM MQ.", - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "properties": { - "type": { - "type": "string", - "enum": [ - "string", - "jms", - "binary" - ], - "default": "string", - "description": "The type of the message." + "contentMediaType": { + "type": "string" }, - "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." + "contentEncoding": { + "type": "string" }, - "description": { - "type": "string", - "description": "Provides additional information for application developers: describes the message type or format." + "if": { + "$ref": "#/definitions/json-schema-draft-07-schema" }, - "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." + "then": { + "$ref": "#/definitions/json-schema-draft-07-schema" }, - "bindingVersion": { - "type": "string", - "enum": [ - "0.1.0" - ], - "description": "The version of this binding." - } - }, - "oneOf": [ - { - "properties": { - "type": { - "const": "binary" - } - } + "else": { + "$ref": "#/definitions/json-schema-draft-07-schema" }, - { - "properties": { - "type": { - "const": "jms" - } - }, - "not": { - "required": [ - "headers" - ] - } + "allOf": { + "$ref": "#/definitions/json-schema-draft-07-schema/definitions/schemaArray" }, - { - "properties": { - "type": { - "const": "string" - } - }, - "not": { - "required": [ - "headers" - ] - } - } - ], - "examples": [ - { - "type": "string", - "bindingVersion": "0.1.0" + "anyOf": { + "$ref": "#/definitions/json-schema-draft-07-schema/definitions/schemaArray" }, - { - "type": "jms", - "description": "JMS stream message", - "bindingVersion": "0.1.0" + "oneOf": { + "$ref": "#/definitions/json-schema-draft-07-schema/definitions/schemaArray" + }, + "not": { + "$ref": "#/definitions/json-schema-draft-07-schema" } - ] + }, + "default": true }, - "bindings-googlepubsub-0.2.0-message": { - "title": "Cloud Pub/Sub Channel Schema", - "description": "This object contains information about the message representation for Google Cloud Pub/Sub.", + "server": { "type": "object", + "description": "An object representing a message broker, a server or any other kind of computer program capable of sending and/or receiving data.", + "required": [ + "host", + "protocol" + ], "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { @@ -4564,71 +1382,39 @@ } }, "properties": { - "bindingVersion": { + "host": { "type": "string", - "enum": [ - "0.2.0" - ], - "description": "The version of this binding." + "description": "The server host name. It MAY include the port. This field supports Server Variables. Variable substitutions will be made when a variable is named in {braces}." }, - "attributes": { - "type": "object" + "pathname": { + "type": "string", + "description": "The path to a resource in the host. This field supports Server Variables. Variable substitutions will be made when a variable is named in {braces}." }, - "orderingKey": { - "type": "string" + "title": { + "type": "string", + "description": "A human-friendly title for the server." }, - "schema": { - "type": "object", - "additionalItems": false, - "properties": { - "name": { - "type": "string" - } - }, - "required": [ - "name" - ] - } - }, - "examples": [ - { - "schema": { - "name": "projects/your-project-id/schemas/your-avro-schema-id" - } + "summary": { + "type": "string", + "description": "A brief summary of the server." }, - { - "schema": { - "name": "projects/your-project-id/schemas/your-protobuf-schema-id" - } - } - ] - }, - "messageTrait": { - "type": "object", - "description": "Describes a trait that MAY be applied to a Message Object. This object MAY contain any property from the Message Object, except payload and traits.", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "properties": { - "contentType": { + "description": { "type": "string", - "description": "The content type to use when encoding/decoding a message's payload. The value MUST be a specific media type (e.g. application/json). When omitted, the value MUST be the one specified on the defaultContentType field." + "description": "A longer description of the server. CommonMark is allowed." }, - "headers": { - "$ref": "#/definitions/anySchema" + "protocol": { + "type": "string", + "description": "The protocol this server supports for connection." }, - "correlationId": { - "oneOf": [ - { - "$ref": "#/definitions/Reference" - }, - { - "$ref": "#/definitions/correlationId" - } - ] + "protocolVersion": { + "type": "string", + "description": "An optional string describing the server. CommonMark syntax MAY be used for rich text representation." + }, + "variables": { + "$ref": "#/definitions/serverVariables" + }, + "security": { + "$ref": "#/definitions/securityRequirements" }, "tags": { "type": "array", @@ -4644,22 +1430,6 @@ }, "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." - }, "externalDocs": { "oneOf": [ { @@ -4670,162 +1440,51 @@ } ] }, - "deprecated": { - "type": "boolean", - "default": false - }, - "examples": { - "type": "array", - "description": "List of examples.", - "items": { - "type": "object" - } - }, "bindings": { "oneOf": [ { "$ref": "#/definitions/Reference" }, { - "$ref": "#/definitions/messageBindingsObject" + "$ref": "#/definitions/serverBindingsObject" } ] } }, "examples": [ { - "contentType": "application/json" - } - ] - }, - "parameters": { - "type": "object", - "additionalProperties": { - "oneOf": [ - { - "$ref": "#/definitions/Reference" - }, - { - "$ref": "#/definitions/parameter" - } - ] - }, - "description": "JSON objects describing re-usable channel parameters.", - "examples": [ - { - "address": "user/{userId}/signedup", - "parameters": { - "userId": { - "description": "Id of the user." - } - } - } - ] - }, - "parameter": { - "description": "Describes a parameter included in a channel address.", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "properties": { - "description": { - "type": "string", - "description": "A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed." - }, - "enum": { - "description": "An enumeration of string values to be used if the substitution options are from a limited set.", - "type": "array", - "items": { - "type": "string" - } - }, - "default": { - "description": "The default value to use for substitution, and to send, if an alternate value is not supplied.", - "type": "string" - }, - "examples": { - "description": "An array of examples of the parameter value.", - "type": "array", - "items": { - "type": "string" - } + "host": "kafka.in.mycompany.com:9092", + "description": "Production Kafka broker.", + "protocol": "kafka", + "protocolVersion": "3.2" }, - "location": { - "type": "string", - "description": "A runtime expression that specifies the location of the parameter value", - "pattern": "^\\$message\\.(header|payload)#(\\/(([^\\/~])|(~[01]))*)*" - } - }, - "examples": [ { - "address": "user/{userId}/signedup", - "parameters": { - "userId": { - "description": "Id of the user.", - "location": "$message.payload#/user/id" - } - } - } - ] - }, - "channelBindingsObject": { - "type": "object", - "description": "Map describing protocol-specific definitions for a channel.", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "properties": { - "http": {}, - "ws": { - "properties": { - "bindingVersion": { - "enum": [ - "0.1.0" - ] - } - }, - "allOf": [ - { - "description": "If no bindingVersion specified, use the latest binding", - "if": { - "not": { - "required": [ - "bindingVersion" - ] - } - }, - "then": { - "$ref": "#/definitions/bindings-websockets-0.1.0-channel" - } - }, - { - "if": { - "required": [ - "bindingVersion" - ], - "properties": { - "bindingVersion": { - "const": "0.1.0" - } - } - }, - "then": { - "$ref": "#/definitions/bindings-websockets-0.1.0-channel" - } - } - ] - }, - "amqp": { + "host": "rabbitmq.in.mycompany.com:5672", + "pathname": "/production", + "protocol": "amqp", + "description": "Production RabbitMQ broker (uses the `production` vhost)." + } + ] + }, + "serverBindingsObject": { + "type": "object", + "description": "Map describing protocol-specific definitions for a server.", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, + "properties": { + "http": {}, + "ws": {}, + "amqp": {}, + "amqp1": {}, + "mqtt": { "properties": { "bindingVersion": { "enum": [ - "0.3.0" + "0.2.0" ] } }, @@ -4840,7 +1499,7 @@ } }, "then": { - "$ref": "#/definitions/bindings-amqp-0.3.0-channel" + "$ref": "#/definitions/bindings-mqtt-0.2.0-server" } }, { @@ -4850,18 +1509,16 @@ ], "properties": { "bindingVersion": { - "const": "0.3.0" + "const": "0.2.0" } } }, "then": { - "$ref": "#/definitions/bindings-amqp-0.3.0-channel" + "$ref": "#/definitions/bindings-mqtt-0.2.0-server" } } ] }, - "amqp1": {}, - "mqtt": {}, "kafka": { "properties": { "bindingVersion": { @@ -4883,7 +1540,7 @@ } }, "then": { - "$ref": "#/definitions/bindings-kafka-0.5.0-channel" + "$ref": "#/definitions/bindings-kafka-0.5.0-server" } }, { @@ -4898,7 +1555,7 @@ } }, "then": { - "$ref": "#/definitions/bindings-kafka-0.5.0-channel" + "$ref": "#/definitions/bindings-kafka-0.5.0-server" } }, { @@ -4913,7 +1570,7 @@ } }, "then": { - "$ref": "#/definitions/bindings-kafka-0.4.0-channel" + "$ref": "#/definitions/bindings-kafka-0.4.0-server" } }, { @@ -4928,50 +1585,12 @@ } }, "then": { - "$ref": "#/definitions/bindings-kafka-0.3.0-channel" - } - } - ] - }, - "anypointmq": { - "properties": { - "bindingVersion": { - "enum": [ - "0.0.1" - ] - } - }, - "allOf": [ - { - "description": "If no bindingVersion specified, use the latest binding", - "if": { - "not": { - "required": [ - "bindingVersion" - ] - } - }, - "then": { - "$ref": "#/definitions/bindings-anypointmq-0.0.1-channel" - } - }, - { - "if": { - "required": [ - "bindingVersion" - ], - "properties": { - "bindingVersion": { - "const": "0.0.1" - } - } - }, - "then": { - "$ref": "#/definitions/bindings-anypointmq-0.0.1-channel" + "$ref": "#/definitions/bindings-kafka-0.3.0-server" } } ] }, + "anypointmq": {}, "nats": {}, "jms": { "properties": { @@ -4992,7 +1611,7 @@ } }, "then": { - "$ref": "#/definitions/bindings-jms-0.0.1-channel" + "$ref": "#/definitions/bindings-jms-0.0.1-server" } }, { @@ -5007,12 +1626,16 @@ } }, "then": { - "$ref": "#/definitions/bindings-jms-0.0.1-channel" + "$ref": "#/definitions/bindings-jms-0.0.1-server" } } ] }, - "sns": { + "sns": {}, + "sqs": {}, + "stomp": {}, + "redis": {}, + "ibmmq": { "properties": { "bindingVersion": { "enum": [ @@ -5031,7 +1654,7 @@ } }, "then": { - "$ref": "#/definitions/bindings-sns-0.1.0-channel" + "$ref": "#/definitions/bindings-ibmmq-0.1.0-server" } }, { @@ -5046,15 +1669,17 @@ } }, "then": { - "$ref": "#/definitions/bindings-sns-0.1.0-channel" + "$ref": "#/definitions/bindings-ibmmq-0.1.0-server" } } ] }, - "sqs": { + "solace": { "properties": { "bindingVersion": { "enum": [ + "0.4.0", + "0.3.0", "0.2.0" ] } @@ -5070,7 +1695,7 @@ } }, "then": { - "$ref": "#/definitions/bindings-sqs-0.2.0-channel" + "$ref": "#/definitions/bindings-solace-0.4.0-server" } }, { @@ -5080,38 +1705,12 @@ ], "properties": { "bindingVersion": { - "const": "0.2.0" + "const": "0.4.0" } } }, "then": { - "$ref": "#/definitions/bindings-sqs-0.2.0-channel" - } - } - ] - }, - "stomp": {}, - "redis": {}, - "ibmmq": { - "properties": { - "bindingVersion": { - "enum": [ - "0.1.0" - ] - } - }, - "allOf": [ - { - "description": "If no bindingVersion specified, use the latest binding", - "if": { - "not": { - "required": [ - "bindingVersion" - ] - } - }, - "then": { - "$ref": "#/definitions/bindings-ibmmq-0.1.0-channel" + "$ref": "#/definitions/bindings-solace-0.4.0-server" } }, { @@ -5121,37 +1720,12 @@ ], "properties": { "bindingVersion": { - "const": "0.1.0" + "const": "0.3.0" } } }, "then": { - "$ref": "#/definitions/bindings-ibmmq-0.1.0-channel" - } - } - ] - }, - "solace": {}, - "googlepubsub": { - "properties": { - "bindingVersion": { - "enum": [ - "0.2.0" - ] - } - }, - "allOf": [ - { - "description": "If no bindingVersion specified, use the latest binding", - "if": { - "not": { - "required": [ - "bindingVersion" - ] - } - }, - "then": { - "$ref": "#/definitions/bindings-googlepubsub-0.2.0-channel" + "$ref": "#/definitions/bindings-solace-0.3.0-server" } }, { @@ -5166,11 +1740,12 @@ } }, "then": { - "$ref": "#/definitions/bindings-googlepubsub-0.2.0-channel" + "$ref": "#/definitions/bindings-solace-0.2.0-server" } } ] }, + "googlepubsub": {}, "pulsar": { "properties": { "bindingVersion": { @@ -5190,7 +1765,7 @@ } }, "then": { - "$ref": "#/definitions/bindings-pulsar-0.1.0-channel" + "$ref": "#/definitions/bindings-pulsar-0.1.0-server" } }, { @@ -5205,935 +1780,892 @@ } }, "then": { - "$ref": "#/definitions/bindings-pulsar-0.1.0-channel" + "$ref": "#/definitions/bindings-pulsar-0.1.0-server" } } ] } } }, - "bindings-websockets-0.1.0-channel": { - "title": "WebSockets channel bindings object", - "description": "When using WebSockets, the channel represents the connection. Unlike other protocols that support multiple virtual channels (topics, routing keys, etc.) per connection, WebSockets doesn't support virtual channels or, put it another way, there's only one channel and its characteristics are strongly related to the protocol used for the handshake, i.e., HTTP.", + "servers": { + "description": "An object representing multiple servers.", "type": "object", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "properties": { - "method": { - "type": "string", - "enum": [ - "GET", - "POST" - ], - "description": "The HTTP method to use when establishing the connection. Its value MUST be either 'GET' or 'POST'." - }, - "query": { - "oneOf": [ - { - "$ref": "#/definitions/schema" - }, - { - "$ref": "#/definitions/Reference" - } - ], - "description": "A Schema object containing the definitions for each query parameter. This schema MUST be of type 'object' and have a 'properties' key." - }, - "headers": { - "oneOf": [ - { - "$ref": "#/definitions/schema" - }, - { - "$ref": "#/definitions/Reference" - } - ], - "description": "A Schema object containing the definitions of the HTTP headers to use when establishing the connection. 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." - } + "additionalProperties": { + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/server" + } + ] }, "examples": [ { - "method": "POST", - "bindingVersion": "0.1.0" - } - ] - }, - "bindings-amqp-0.3.0-channel": { - "title": "AMQP channel bindings object", - "description": "This object contains information about the channel representation in AMQP.", - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "properties": { - "is": { - "type": "string", - "enum": [ - "queue", - "routingKey" - ], - "description": "Defines what type of channel is it. Can be either 'queue' or 'routingKey' (default)." - }, - "exchange": { + "development": { + "host": "localhost:5672", + "description": "Development AMQP broker.", + "protocol": "amqp", + "protocolVersion": "0-9-1", + "tags": [ + { + "name": "env:development", + "description": "This environment is meant for developers to run their own tests." + } + ] + }, + "staging": { + "host": "rabbitmq-staging.in.mycompany.com:5672", + "description": "RabbitMQ broker for the staging environment.", + "protocol": "amqp", + "protocolVersion": "0-9-1", + "tags": [ + { + "name": "env:staging", + "description": "This environment is a replica of the production environment." + } + ] + }, + "production": { + "host": "rabbitmq.in.mycompany.com:5672", + "description": "RabbitMQ broker for the production environment.", + "protocol": "amqp", + "protocolVersion": "0-9-1", + "tags": [ + { + "name": "env:production", + "description": "This environment is the live environment available for final users." + } + ] + } + } + ] + }, + "openapiSchema_3_0": { + "type": "object", + "definitions": { + "ExternalDocumentation": { "type": "object", + "required": [ + "url" + ], "properties": { - "name": { - "type": "string", - "maxLength": 255, - "description": "The name of the exchange. It MUST NOT exceed 255 characters long." - }, - "type": { - "type": "string", - "enum": [ - "topic", - "direct", - "fanout", - "default", - "headers" - ], - "description": "The type of the exchange. Can be either 'topic', 'direct', 'fanout', 'default' or 'headers'." - }, - "durable": { - "type": "boolean", - "description": "Whether the exchange should survive broker restarts or not." - }, - "autoDelete": { - "type": "boolean", - "description": "Whether the exchange should be deleted when the last queue is unbound from it." + "description": { + "type": "string" }, - "vhost": { + "url": { "type": "string", - "default": "/", - "description": "The virtual host of the exchange. Defaults to '/'." + "format": "uri-reference" } }, - "description": "When is=routingKey, this object defines the exchange properties." + "patternProperties": { + "^x-": {} + }, + "additionalProperties": false }, - "queue": { + "Discriminator": { "type": "object", + "required": [ + "propertyName" + ], "properties": { - "name": { - "type": "string", - "maxLength": 255, - "description": "The name of the queue. It MUST NOT exceed 255 characters long." - }, - "durable": { - "type": "boolean", - "description": "Whether the queue should survive broker restarts or not." - }, - "exclusive": { - "type": "boolean", - "description": "Whether the queue should be used only by one connection or not." - }, - "autoDelete": { - "type": "boolean", - "description": "Whether the queue should be deleted when the last consumer unsubscribes." + "propertyName": { + "type": "string" }, - "vhost": { - "type": "string", - "default": "/", - "description": "The virtual host of the queue. Defaults to '/'." + "mapping": { + "type": "object", + "additionalProperties": { + "type": "string" + } } - }, - "description": "When is=queue, this object defines the queue properties." + } }, - "bindingVersion": { - "type": "string", - "enum": [ - "0.3.0" - ], - "description": "The version of this binding. If omitted, 'latest' MUST be assumed." - } - }, - "oneOf": [ - { - "properties": { - "is": { - "const": "routingKey" - } - }, + "Reference": { + "type": "object", "required": [ - "exchange" + "$ref" ], - "not": { - "required": [ - "queue" - ] + "patternProperties": { + "^\\$ref$": { + "type": "string", + "format": "uri-reference" + } } }, - { + "XML": { + "type": "object", "properties": { - "is": { - "const": "queue" + "name": { + "type": "string" + }, + "namespace": { + "type": "string", + "format": "uri" + }, + "prefix": { + "type": "string" + }, + "attribute": { + "type": "boolean", + "default": false + }, + "wrapped": { + "type": "boolean", + "default": false } }, - "required": [ - "queue" - ], - "not": { - "required": [ - "exchange" - ] - } - } - ], - "examples": [ - { - "is": "routingKey", - "exchange": { - "name": "myExchange", - "type": "topic", - "durable": true, - "autoDelete": false, - "vhost": "/" - }, - "bindingVersion": "0.3.0" - }, - { - "is": "queue", - "queue": { - "name": "my-queue-name", - "durable": true, - "exclusive": true, - "autoDelete": false, - "vhost": "/" + "patternProperties": { + "^x-": {} }, - "bindingVersion": "0.3.0" - } - ] - }, - "bindings-kafka-0.5.0-channel": { - "title": "Channel Schema", - "description": "This object contains information about the channel representation in Kafka.", - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" + "additionalProperties": false } }, "properties": { - "topic": { + "title": { + "type": "string" + }, + "multipleOf": { + "type": "number", + "exclusiveMinimum": 0 + }, + "maximum": { + "type": "number" + }, + "exclusiveMaximum": { + "type": "boolean", + "default": false + }, + "minimum": { + "type": "number" + }, + "exclusiveMinimum": { + "type": "boolean", + "default": false + }, + "maxLength": { + "type": "integer", + "minimum": 0 + }, + "minLength": { + "type": "integer", + "minimum": 0, + "default": 0 + }, + "pattern": { "type": "string", - "description": "Kafka topic name if different from channel name." + "format": "regex" }, - "partitions": { + "maxItems": { "type": "integer", - "minimum": 1, - "description": "Number of partitions configured on this topic." + "minimum": 0 }, - "replicas": { + "minItems": { "type": "integer", - "minimum": 1, - "description": "Number of replicas configured on this topic." + "minimum": 0, + "default": 0 }, - "topicConfiguration": { - "description": "Topic configuration properties that are relevant for the API.", - "type": "object", - "additionalProperties": true, - "properties": { - "cleanup.policy": { - "description": "The [`cleanup.policy`](https://kafka.apache.org/documentation/#topicconfigs_cleanup.policy) configuration option.", - "type": "array", - "items": { - "type": "string", - "enum": [ - "compact", - "delete" - ] - } - }, - "retention.ms": { - "description": "The [`retention.ms`](https://kafka.apache.org/documentation/#topicconfigs_retention.ms) configuration option.", - "type": "integer", - "minimum": -1 - }, - "retention.bytes": { - "description": "The [`retention.bytes`](https://kafka.apache.org/documentation/#topicconfigs_retention.bytes) configuration option.", - "type": "integer", - "minimum": -1 - }, - "delete.retention.ms": { - "description": "The [`delete.retention.ms`](https://kafka.apache.org/documentation/#topicconfigs_delete.retention.ms) configuration option.", - "type": "integer", - "minimum": 0 + "uniqueItems": { + "type": "boolean", + "default": false + }, + "maxProperties": { + "type": "integer", + "minimum": 0 + }, + "minProperties": { + "type": "integer", + "minimum": 0, + "default": 0 + }, + "required": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 1, + "uniqueItems": true + }, + "enum": { + "type": "array", + "items": true, + "minItems": 1, + "uniqueItems": false + }, + "type": { + "type": "string", + "enum": [ + "array", + "boolean", + "integer", + "number", + "object", + "string" + ] + }, + "not": { + "oneOf": [ + { + "$ref": "#/definitions/openapiSchema_3_0" }, - "max.message.bytes": { - "description": "The [`max.message.bytes`](https://kafka.apache.org/documentation/#topicconfigs_max.message.bytes) configuration option.", - "type": "integer", - "minimum": 0 + { + "$ref": "#/definitions/openapiSchema_3_0/definitions/Reference" + } + ] + }, + "allOf": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/definitions/openapiSchema_3_0" + }, + { + "$ref": "#/definitions/openapiSchema_3_0/definitions/Reference" + } + ] + } + }, + "oneOf": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/definitions/openapiSchema_3_0" + }, + { + "$ref": "#/definitions/openapiSchema_3_0/definitions/Reference" + } + ] + } + }, + "anyOf": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/definitions/openapiSchema_3_0" + }, + { + "$ref": "#/definitions/openapiSchema_3_0/definitions/Reference" + } + ] + } + }, + "items": { + "oneOf": [ + { + "$ref": "#/definitions/openapiSchema_3_0" }, - "confluent.key.schema.validation": { - "description": "It shows whether the schema validation for the message key is enabled. Vendor specific config. For more details: (https://docs.confluent.io/platform/current/installation/configuration/topic-configs.html#confluent-key-schema-validation)", - "type": "boolean" + { + "$ref": "#/definitions/openapiSchema_3_0/definitions/Reference" + } + ] + }, + "properties": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "$ref": "#/definitions/openapiSchema_3_0" + }, + { + "$ref": "#/definitions/openapiSchema_3_0/definitions/Reference" + } + ] + } + }, + "additionalProperties": { + "oneOf": [ + { + "$ref": "#/definitions/openapiSchema_3_0" }, - "confluent.key.subject.name.strategy": { - "description": "The name of the schema lookup strategy for the message key. Vendor specific config. For more details: (https://docs.confluent.io/platform/current/installation/configuration/topic-configs.html#confluent-key-subject-name-strategy)", - "type": "string" + { + "$ref": "#/definitions/openapiSchema_3_0/definitions/Reference" }, - "confluent.value.schema.validation": { - "description": "It shows whether the schema validation for the message value is enabled. Vendor specific config. For more details: (https://docs.confluent.io/platform/current/installation/configuration/topic-configs.html#confluent-value-schema-validation)", + { "type": "boolean" - }, - "confluent.value.subject.name.strategy": { - "description": "The name of the schema lookup strategy for the message value. Vendor specific config. For more details: (https://docs.confluent.io/platform/current/installation/configuration/topic-configs.html#confluent-value-subject-name-strategy)", - "type": "string" } - } - }, - "bindingVersion": { - "type": "string", - "enum": [ - "0.5.0" ], - "description": "The version of this binding. If omitted, 'latest' MUST be assumed." - } - }, - "examples": [ - { - "topic": "my-specific-topic", - "partitions": 20, - "replicas": 3, - "bindingVersion": "0.5.0" - } - ] - }, - "bindings-kafka-0.4.0-channel": { - "title": "Channel Schema", - "description": "This object contains information about the channel representation in Kafka.", - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "properties": { - "topic": { - "type": "string", - "description": "Kafka topic name if different from channel name." + "default": true }, - "partitions": { - "type": "integer", - "minimum": 1, - "description": "Number of partitions configured on this topic." + "description": { + "type": "string" }, - "replicas": { - "type": "integer", - "minimum": 1, - "description": "Number of replicas configured on this topic." + "format": { + "type": "string" }, - "topicConfiguration": { - "description": "Topic configuration properties that are relevant for the API.", - "type": "object", - "additionalProperties": false, - "properties": { - "cleanup.policy": { - "description": "The [`cleanup.policy`](https://kafka.apache.org/documentation/#topicconfigs_cleanup.policy) configuration option.", - "type": "array", - "items": { - "type": "string", - "enum": [ - "compact", - "delete" - ] - } - }, - "retention.ms": { - "description": "The [`retention.ms`](https://kafka.apache.org/documentation/#topicconfigs_retention.ms) configuration option.", - "type": "integer", - "minimum": -1 - }, - "retention.bytes": { - "description": "The [`retention.bytes`](https://kafka.apache.org/documentation/#topicconfigs_retention.bytes) configuration option.", - "type": "integer", - "minimum": -1 - }, - "delete.retention.ms": { - "description": "The [`delete.retention.ms`](https://kafka.apache.org/documentation/#topicconfigs_delete.retention.ms) configuration option.", - "type": "integer", - "minimum": 0 - }, - "max.message.bytes": { - "description": "The [`max.message.bytes`](https://kafka.apache.org/documentation/#topicconfigs_max.message.bytes) configuration option.", - "type": "integer", - "minimum": 0 - } - } + "default": true, + "nullable": { + "type": "boolean", + "default": false }, - "bindingVersion": { - "type": "string", - "enum": [ - "0.4.0" - ], - "description": "The version of this binding. If omitted, 'latest' MUST be assumed." - } - }, - "examples": [ - { - "topic": "my-specific-topic", - "partitions": 20, - "replicas": 3, - "bindingVersion": "0.4.0" - } - ] - }, - "bindings-kafka-0.3.0-channel": { - "title": "Channel Schema", - "description": "This object contains information about the channel representation in Kafka.", - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "properties": { - "topic": { - "type": "string", - "description": "Kafka topic name if different from channel name." + "discriminator": { + "$ref": "#/definitions/openapiSchema_3_0/definitions/Discriminator" }, - "partitions": { - "type": "integer", - "minimum": 1, - "description": "Number of partitions configured on this topic." + "readOnly": { + "type": "boolean", + "default": false }, - "replicas": { - "type": "integer", - "minimum": 1, - "description": "Number of replicas configured on this topic." + "writeOnly": { + "type": "boolean", + "default": false }, - "bindingVersion": { - "type": "string", - "enum": [ - "0.3.0" - ], - "description": "The version of this binding. If omitted, 'latest' MUST be assumed." - } - }, - "examples": [ - { - "topic": "my-specific-topic", - "partitions": 20, - "replicas": 3, - "bindingVersion": "0.3.0" - } - ] - }, - "bindings-anypointmq-0.0.1-channel": { - "title": "Anypoint MQ channel bindings object", - "description": "This object contains configuration for describing an Anypoint MQ exchange, queue, or FIFO queue as an AsyncAPI channel. This objects only contains configuration that can not be provided in the AsyncAPI standard channel object.", - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "properties": { - "destination": { - "type": "string", - "description": "The destination (queue or exchange) name for this channel. SHOULD only be specified if the channel name differs from the actual destination name, such as when the channel name is not a valid destination name in Anypoint MQ. Defaults to the channel name." + "example": true, + "externalDocs": { + "$ref": "#/definitions/openapiSchema_3_0/definitions/ExternalDocumentation" }, - "destinationType": { - "type": "string", - "enum": [ - "exchange", - "queue", - "fifo-queue" - ], - "default": "queue", - "description": "The type of destination. SHOULD be specified to document the messaging model (publish/subscribe, point-to-point, strict message ordering) supported by this channel." + "deprecated": { + "type": "boolean", + "default": false }, - "bindingVersion": { - "type": "string", - "enum": [ - "0.0.1" - ], - "description": "The version of this binding. If omitted, 'latest' MUST be assumed." + "xml": { + "$ref": "#/definitions/openapiSchema_3_0/definitions/XML" } }, - "examples": [ - { - "destination": "user-signup-exchg", - "destinationType": "exchange", - "bindingVersion": "0.0.1" - } - ] - }, - "bindings-jms-0.0.1-channel": { - "title": "Channel Schema", - "description": "This object contains configuration for describing a JMS queue, or FIFO queue as an AsyncAPI channel. This objects only contains configuration that can not be provided in the AsyncAPI standard channel object.", - "type": "object", - "additionalProperties": false, "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } + "^x-": true }, - "properties": { - "destination": { - "type": "string", - "description": "The destination (queue) name for this channel. SHOULD only be specified if the channel name differs from the actual destination name, such as when the channel name is not a valid destination name according to the JMS Provider. Defaults to the channel name." + "additionalProperties": false + }, + "avroSchema_v1": { + "definitions": { + "avroSchema": { + "title": "Avro Schema", + "description": "Root Schema", + "oneOf": [ + { + "$ref": "#/definitions/avroSchema_v1/definitions/types" + } + ] }, - "destinationType": { - "type": "string", - "enum": [ - "queue", - "fifo-queue" - ], - "default": "queue", - "description": "The type of destination. SHOULD be specified to document the messaging model (point-to-point, or strict message ordering) supported by this channel." + "types": { + "title": "Avro Types", + "description": "Allowed Avro types", + "oneOf": [ + { + "$ref": "#/definitions/avroSchema_v1/definitions/primitiveType" + }, + { + "$ref": "#/definitions/avroSchema_v1/definitions/primitiveTypeWithMetadata" + }, + { + "$ref": "#/definitions/avroSchema_v1/definitions/customTypeReference" + }, + { + "$ref": "#/definitions/avroSchema_v1/definitions/avroRecord" + }, + { + "$ref": "#/definitions/avroSchema_v1/definitions/avroEnum" + }, + { + "$ref": "#/definitions/avroSchema_v1/definitions/avroArray" + }, + { + "$ref": "#/definitions/avroSchema_v1/definitions/avroMap" + }, + { + "$ref": "#/definitions/avroSchema_v1/definitions/avroFixed" + }, + { + "$ref": "#/definitions/avroSchema_v1/definitions/avroUnion" + } + ] }, - "bindingVersion": { + "primitiveType": { + "title": "Primitive Type", + "description": "Basic type primitives.", "type": "string", "enum": [ - "0.0.1" - ], - "description": "The version of this binding. If omitted, 'latest' MUST be assumed." - } - }, - "examples": [ - { - "destination": "user-signed-up", - "destinationType": "fifo-queue", - "bindingVersion": "0.0.1" - } - ] - }, - "bindings-sns-0.1.0-channel": { - "title": "Channel Schema", - "description": "This object contains information about the channel representation in SNS.", - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "properties": { - "name": { - "type": "string", - "description": "The name of the topic. Can be different from the channel name to allow flexibility around AWS resource naming limitations." + "null", + "boolean", + "int", + "long", + "float", + "double", + "bytes", + "string" + ] }, - "ordering": { - "$ref": "#/definitions/bindings-sns-0.1.0-channel/definitions/ordering" + "primitiveTypeWithMetadata": { + "title": "Primitive Type With Metadata", + "description": "A primitive type with metadata attached.", + "type": "object", + "properties": { + "type": { + "$ref": "#/definitions/avroSchema_v1/definitions/primitiveType" + } + }, + "required": [ + "type" + ] }, - "policy": { - "$ref": "#/definitions/bindings-sns-0.1.0-channel/definitions/policy" + "customTypeReference": { + "title": "Custom Type", + "description": "Reference to a ComplexType", + "not": { + "$ref": "#/definitions/avroSchema_v1/definitions/primitiveType" + }, + "type": "string", + "pattern": "^[A-Za-z_][A-Za-z0-9_]*(\\.[A-Za-z_][A-Za-z0-9_]*)*$" }, - "tags": { - "type": "object", - "description": "Key-value pairs that represent AWS tags on the topic." + "avroUnion": { + "title": "Union", + "description": "A Union of types", + "type": "array", + "items": { + "$ref": "#/definitions/avroSchema_v1/definitions/avroSchema" + }, + "minItems": 1 }, - "bindingVersion": { - "type": "string", - "description": "The version of this binding.", - "default": "latest" - } - }, - "required": [ - "name" - ], - "definitions": { - "ordering": { + "avroField": { + "title": "Field", + "description": "A field within a Record", "type": "object", - "description": "By default, we assume an unordered SNS topic. This field allows configuration of a FIFO SNS Topic.", - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, "properties": { + "name": { + "$ref": "#/definitions/avroSchema_v1/definitions/name" + }, "type": { - "type": "string", - "description": "Defines the type of SNS Topic.", + "$ref": "#/definitions/avroSchema_v1/definitions/types" + }, + "doc": { + "type": "string" + }, + "default": true, + "order": { "enum": [ - "standard", - "FIFO" + "ascending", + "descending", + "ignore" ] }, - "contentBasedDeduplication": { - "type": "boolean", - "description": "True to turn on de-duplication of messages for a channel." + "aliases": { + "type": "array", + "items": { + "$ref": "#/definitions/avroSchema_v1/definitions/name" + } } }, "required": [ + "name", "type" ] }, - "policy": { + "avroRecord": { + "title": "Record", + "description": "A Record", "type": "object", - "description": "The security policy for the SNS Topic.", - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" + "properties": { + "type": { + "type": "string", + "const": "record" + }, + "name": { + "$ref": "#/definitions/avroSchema_v1/definitions/name" + }, + "namespace": { + "$ref": "#/definitions/avroSchema_v1/definitions/namespace" + }, + "doc": { + "type": "string" + }, + "aliases": { + "type": "array", + "items": { + "$ref": "#/definitions/avroSchema_v1/definitions/name" + } + }, + "fields": { + "type": "array", + "items": { + "$ref": "#/definitions/avroSchema_v1/definitions/avroField" + } } }, + "required": [ + "type", + "name", + "fields" + ] + }, + "avroEnum": { + "title": "Enum", + "description": "An enumeration", + "type": "object", "properties": { - "statements": { + "type": { + "type": "string", + "const": "enum" + }, + "name": { + "$ref": "#/definitions/avroSchema_v1/definitions/name" + }, + "namespace": { + "$ref": "#/definitions/avroSchema_v1/definitions/namespace" + }, + "doc": { + "type": "string" + }, + "aliases": { + "type": "array", + "items": { + "$ref": "#/definitions/avroSchema_v1/definitions/name" + } + }, + "symbols": { "type": "array", - "description": "An array of statement objects, each of which controls a permission for this topic", "items": { - "$ref": "#/definitions/bindings-sns-0.1.0-channel/definitions/statement" + "$ref": "#/definitions/avroSchema_v1/definitions/name" } } }, "required": [ - "statements" + "type", + "name", + "symbols" ] }, - "statement": { + "avroArray": { + "title": "Array", + "description": "An array", "type": "object", - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" + "properties": { + "type": { + "type": "string", + "const": "array" + }, + "name": { + "$ref": "#/definitions/avroSchema_v1/definitions/name" + }, + "namespace": { + "$ref": "#/definitions/avroSchema_v1/definitions/namespace" + }, + "doc": { + "type": "string" + }, + "aliases": { + "type": "array", + "items": { + "$ref": "#/definitions/avroSchema_v1/definitions/name" + } + }, + "items": { + "$ref": "#/definitions/avroSchema_v1/definitions/types" } }, + "required": [ + "type", + "items" + ] + }, + "avroMap": { + "title": "Map", + "description": "A map of values", + "type": "object", "properties": { - "effect": { + "type": { "type": "string", - "enum": [ - "Allow", - "Deny" - ] + "const": "map" }, - "principal": { - "description": "The AWS account or resource ARN that this statement applies to.", - "oneOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "type": "string" - } - } - ] + "name": { + "$ref": "#/definitions/avroSchema_v1/definitions/name" }, - "action": { - "description": "The SNS permission being allowed or denied e.g. sns:Publish", - "oneOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "type": "string" - } - } - ] + "namespace": { + "$ref": "#/definitions/avroSchema_v1/definitions/namespace" + }, + "doc": { + "type": "string" + }, + "aliases": { + "type": "array", + "items": { + "$ref": "#/definitions/avroSchema_v1/definitions/name" + } + }, + "values": { + "$ref": "#/definitions/avroSchema_v1/definitions/types" + } + }, + "required": [ + "type", + "values" + ] + }, + "avroFixed": { + "title": "Fixed", + "description": "A fixed sized array of bytes", + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "fixed" + }, + "name": { + "$ref": "#/definitions/avroSchema_v1/definitions/name" + }, + "namespace": { + "$ref": "#/definitions/avroSchema_v1/definitions/namespace" + }, + "doc": { + "type": "string" + }, + "aliases": { + "type": "array", + "items": { + "$ref": "#/definitions/avroSchema_v1/definitions/name" + } + }, + "size": { + "type": "number" } }, "required": [ - "effect", - "principal", - "action" + "type", + "name", + "size" ] + }, + "name": { + "type": "string", + "pattern": "^[A-Za-z_][A-Za-z0-9_]*$" + }, + "namespace": { + "type": "string", + "pattern": "^([A-Za-z_][A-Za-z0-9_]*(\\.[A-Za-z_][A-Za-z0-9_]*)*)*$" } }, - "examples": [ + "description": "Json-Schema definition for Avro AVSC files.", + "oneOf": [ { - "name": "my-sns-topic", - "policy": { - "statements": [ - { - "effect": "Allow", - "principal": "*", - "action": "SNS:Publish" - } - ] - } + "$ref": "#/definitions/avroSchema_v1/definitions/avroSchema" } - ] + ], + "title": "Avro Schema Definition" }, - "bindings-sqs-0.2.0-channel": { - "title": "Channel Schema", - "description": "This object contains information about the channel representation in SQS.", + "multiFormatSchema": { + "description": "The Multi Format Schema Object represents a schema definition. It differs from the Schema Object in that it supports multiple schema formats or languages (e.g., JSON Schema, Avro, etc.).", "type": "object", - "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { "$ref": "#/definitions/specificationExtension" } }, - "properties": { - "queue": { - "description": "A definition of the queue that will be used as the channel.", - "$ref": "#/definitions/bindings-sqs-0.2.0-channel/definitions/queue" + "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" + ] + } + ] + } + }, + "allOf": [ + { + "$ref": "#/definitions/default_message" }, - "deadLetterQueue": { - "description": "A definition of the queue that will be used for un-processable messages.", - "$ref": "#/definitions/bindings-sqs-0.2.0-channel/definitions/queue" + { + "$ref": "#/definitions/asyncapi_schema_message" }, - "bindingVersion": { - "type": "string", - "enum": [ - "0.1.0", - "0.2.0" - ], - "description": "The version of this binding. If omitted, 'latest' MUST be assumed.", - "default": "latest" + { + "$ref": "#/definitions/json_schema_draft_7_message" + }, + { + "$ref": "#/definitions/openapi_message" + }, + { + "$ref": "#/definitions/avro_message" } - }, - "required": [ - "queue" ], "definitions": { - "queue": { - "type": "object", - "description": "A definition of a queue.", - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" + "default_message": { + "if": { + "not": { + "description": "If no schemaFormat has been defined, default to schema or reference", + "required": [ + "schemaFormat" + ] } }, - "properties": { - "name": { - "type": "string", - "description": "The name of the queue. When an SNS Operation Binding Object references an SQS queue by name, the identifier should be the one in this field." - }, - "fifoQueue": { - "type": "boolean", - "description": "Is this a FIFO queue?", - "default": false - }, - "deduplicationScope": { - "type": "string", - "enum": [ - "queue", - "messageGroup" - ], - "description": "Specifies whether message deduplication occurs at the message group or queue level. Valid values are messageGroup and queue (default).", - "default": "queue" - }, - "fifoThroughputLimit": { - "type": "string", - "enum": [ - "perQueue", - "perMessageGroupId" - ], - "description": "Specifies whether the FIFO queue throughput quota applies to the entire queue or per message group. Valid values are perQueue (default) and perMessageGroupId.", - "default": "perQueue" - }, - "deliveryDelay": { - "type": "integer", - "description": "The number of seconds to delay before a message sent to the queue can be received. used to create a delay queue.", - "minimum": 0, - "maximum": 15, - "default": 0 - }, - "visibilityTimeout": { - "type": "integer", - "description": "The length of time, in seconds, that a consumer locks a message - hiding it from reads - before it is unlocked and can be read again.", - "minimum": 0, - "maximum": 43200, - "default": 30 - }, - "receiveMessageWaitTime": { - "type": "integer", - "description": "Determines if the queue uses short polling or long polling. Set to zero the queue reads available messages and returns immediately. Set to a non-zero integer, long polling waits the specified number of seconds for messages to arrive before returning.", - "default": 0 - }, - "messageRetentionPeriod": { - "type": "integer", - "description": "How long to retain a message on the queue in seconds, unless deleted.", - "minimum": 60, - "maximum": 1209600, - "default": 345600 - }, - "redrivePolicy": { - "$ref": "#/definitions/bindings-sqs-0.2.0-channel/definitions/redrivePolicy" - }, - "policy": { - "$ref": "#/definitions/bindings-sqs-0.2.0-channel/definitions/policy" - }, - "tags": { - "type": "object", - "description": "Key-value pairs that represent AWS tags on the queue." + "then": { + "properties": { + "schema": { + "$ref": "#/definitions/schema" + } } - }, - "required": [ - "name", - "fifoQueue" - ] + } }, - "redrivePolicy": { - "type": "object", - "description": "Prevent poison pill messages by moving un-processable messages to an SQS dead letter queue.", - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" + "asyncapi_schema_message": { + "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" + ] + } } }, - "properties": { - "deadLetterQueue": { - "$ref": "#/definitions/bindings-sqs-0.2.0-channel/definitions/identifier" - }, - "maxReceiveCount": { - "type": "integer", - "description": "The number of times a message is delivered to the source queue before being moved to the dead-letter queue.", - "default": 10 + "then": { + "properties": { + "schema": { + "$ref": "#/definitions/schema" + } } - }, - "required": [ - "deadLetterQueue" - ] + } }, - "identifier": { - "type": "object", - "description": "The SQS queue to use as a dead letter queue (DLQ).", - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" + "json_schema_draft_7_message": { + "if": { + "required": [ + "schemaFormat" + ], + "properties": { + "schemaFormat": { + "enum": [ + "application/schema+json;version=draft-07", + "application/schema+yaml;version=draft-07" + ] + } } }, - "properties": { - "arn": { - "type": "string", - "description": "The target is an ARN. For example, for SQS, the identifier may be an ARN, which will be of the form: arn:aws:sqs:{region}:{account-id}:{queueName}" - }, - "name": { - "type": "string", - "description": "The endpoint is identified by a name, which corresponds to an identifying field called 'name' of a binding for that protocol on this publish Operation Object. For example, if the protocol is 'sqs' then the name refers to the name field sqs binding." + "then": { + "properties": { + "schema": { + "$ref": "#/definitions/json-schema-draft-07-schema" + } } } }, - "policy": { - "type": "object", - "description": "The security policy for the SQS Queue", - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" + "openapi_message": { + "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" + ] + } } }, - "properties": { - "statements": { - "type": "array", - "description": "An array of statement objects, each of which controls a permission for this queue.", - "items": { - "$ref": "#/definitions/bindings-sqs-0.2.0-channel/definitions/statement" + "then": { + "properties": { + "schema": { + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/openapiSchema_3_0" + } + ] } } - }, - "required": [ - "statements" - ] + } }, - "statement": { - "type": "object", - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" + "avro_message": { + "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" + ] + } } }, - "properties": { - "effect": { - "type": "string", - "enum": [ - "Allow", - "Deny" - ] - }, - "principal": { - "description": "The AWS account or resource ARN that this statement applies to.", - "oneOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "type": "string" - } - } - ] - }, - "action": { - "description": "The SQS permission being allowed or denied e.g. sqs:ReceiveMessage", - "oneOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "type": "string" + "then": { + "properties": { + "schema": { + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/avroSchema_v1" } - } - ] - } - }, - "required": [ - "effect", - "principal", - "action" - ] - } - }, - "examples": [ - { - "queue": { - "name": "myQueue", - "fifoQueue": true, - "deduplicationScope": "messageGroup", - "fifoThroughputLimit": "perMessageGroupId", - "deliveryDelay": 15, - "visibilityTimeout": 60, - "receiveMessageWaitTime": 0, - "messageRetentionPeriod": 86400, - "redrivePolicy": { - "deadLetterQueue": { - "arn": "arn:aws:SQS:eu-west-1:0000000:123456789" - }, - "maxReceiveCount": 15 - }, - "policy": { - "statements": [ - { - "effect": "Deny", - "principal": "arn:aws:iam::123456789012:user/dec.kolakowski", - "action": [ - "sqs:SendMessage", - "sqs:ReceiveMessage" - ] - } - ] - }, - "tags": { - "owner": "AsyncAPI.NET", - "platform": "AsyncAPIOrg" + ] + } } - }, - "deadLetterQueue": { - "name": "myQueue_error", - "deliveryDelay": 0, - "visibilityTimeout": 0, - "receiveMessageWaitTime": 0, - "messageRetentionPeriod": 604800 } } - ] + } + }, + "anySchema": { + "if": { + "required": [ + "schema" + ] + }, + "then": { + "$ref": "#/definitions/multiFormatSchema" + }, + "else": { + "$ref": "#/definitions/schema" + }, + "description": "An object representing either a schema or a multiFormatSchema based on the existence of the 'schema' property. If the property 'schema' is present, use the multi-format schema. Use the default AsyncAPI Schema otherwise." }, - "bindings-ibmmq-0.1.0-channel": { - "title": "IBM MQ channel bindings object", - "description": "This object contains information about the channel representation in IBM MQ. Each channel corresponds to a Queue or Topic within IBM MQ.", + "correlationId": { "type": "object", + "description": "An object that specifies an identifier at design time that can used for message tracing and correlation.", + "required": [ + "location" + ], "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { @@ -6141,130 +2673,76 @@ } }, "properties": { - "destinationType": { + "description": { "type": "string", - "enum": [ - "topic", - "queue" - ], - "default": "topic", - "description": "Defines the type of AsyncAPI channel." - }, - "queue": { - "type": "object", - "description": "Defines the properties of a queue.", - "properties": { - "objectName": { - "type": "string", - "maxLength": 48, - "description": "Defines the name of the IBM MQ queue associated with the channel." - }, - "isPartitioned": { - "type": "boolean", - "default": false, - "description": "Defines if the queue is a cluster queue and therefore partitioned. If 'true', a binding option MAY be specified when accessing the queue. More information on binding options can be found on this page in the IBM MQ Knowledge Center." - }, - "exclusive": { - "type": "boolean", - "default": false, - "description": "Specifies if it is recommended to open the queue exclusively." - } - }, - "required": [ - "objectName" - ] - }, - "topic": { - "type": "object", - "description": "Defines the properties of a topic.", - "properties": { - "string": { - "type": "string", - "maxLength": 10240, - "description": "The value of the IBM MQ topic string to be used." - }, - "objectName": { - "type": "string", - "maxLength": 48, - "description": "The name of the IBM MQ topic object." - }, - "durablePermitted": { - "type": "boolean", - "default": true, - "description": "Defines if the subscription may be durable." - }, - "lastMsgRetained": { - "type": "boolean", - "default": false, - "description": "Defines if the last message published will be made available to new subscriptions." - } - } - }, - "maxMsgLength": { - "type": "integer", - "minimum": 0, - "maximum": 104857600, - "description": "The maximum length of the physical message (in bytes) accepted by the Topic or Queue. Messages produced that are greater in size than this value may fail to be delivered. More information on the maximum message length can be found on this [page](https://www.ibm.com/support/knowledgecenter/SSFKSJ_latest/com.ibm.mq.ref.dev.doc/q097520_.html) in the IBM MQ Knowledge Center." + "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]))*)*" + } + }, + "examples": [ + { + "description": "Default Correlation ID", + "location": "$message.header#/correlationId" + } + ] + }, + "message": { + "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": "#/definitions/specificationExtension" + } + }, + "properties": { "bindingVersion": { "type": "string", "enum": [ - "0.1.0" + "0.2.0" ], "description": "The version of this binding." - } - }, - "oneOf": [ - { - "properties": { - "destinationType": { - "const": "topic" - } - }, - "not": { - "required": [ - "queue" - ] - } }, - { + "attributes": { + "type": "object" + }, + "orderingKey": { + "type": "string" + }, + "schema": { + "type": "object", + "additionalItems": false, "properties": { - "destinationType": { - "const": "queue" + "name": { + "type": "string" } }, "required": [ - "queue" - ], - "not": { - "required": [ - "topic" - ] - } + "name" + ] } - ], + }, "examples": [ { - "destinationType": "topic", - "topic": { - "objectName": "myTopicName" - }, - "bindingVersion": "0.1.0" + "schema": { + "name": "projects/your-project-id/schemas/your-avro-schema-id" + } }, { - "destinationType": "queue", - "queue": { - "objectName": "myQueueName", - "exclusive": true - }, - "bindingVersion": "0.1.0" + "schema": { + "name": "projects/your-project-id/schemas/your-protobuf-schema-id" + } } ] }, - "bindings-googlepubsub-0.2.0-channel": { - "title": "Cloud Pub/Sub Channel Schema", - "description": "This object contains information about the channel representation for Google Cloud Pub/Sub.", + "messageBindingsObject": { "type": "object", + "description": "Map describing protocol-specific definitions for a message.", "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { @@ -6272,289 +2750,503 @@ } }, "properties": { - "bindingVersion": { - "type": "string", - "enum": [ - "0.2.0" - ], - "description": "The version of this binding." + "http": { + "properties": { + "bindingVersion": { + "enum": [ + "0.2.0", + "0.3.0" + ] + } + }, + "allOf": [ + { + "description": "If no bindingVersion specified, use the latest binding", + "if": { + "not": { + "required": [ + "bindingVersion" + ] + } + }, + "then": { + "$ref": "#/definitions/bindings-http-0.3.0-message" + } + }, + { + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.2.0" + } + } + }, + "then": { + "$ref": "#/definitions/bindings-http-0.2.0-message" + } + }, + { + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.3.0" + } + } + }, + "then": { + "$ref": "#/definitions/bindings-http-0.3.0-message" + } + } + ] }, - "labels": { - "type": "object" + "ws": {}, + "amqp": { + "properties": { + "bindingVersion": { + "enum": [ + "0.3.0" + ] + } + }, + "allOf": [ + { + "description": "If no bindingVersion specified, use the latest binding", + "if": { + "not": { + "required": [ + "bindingVersion" + ] + } + }, + "then": { + "$ref": "#/definitions/bindings-amqp-0.3.0-message" + } + }, + { + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.3.0" + } + } + }, + "then": { + "$ref": "#/definitions/bindings-amqp-0.3.0-message" + } + } + ] }, - "messageRetentionDuration": { - "type": "string" + "amqp1": {}, + "mqtt": { + "properties": { + "bindingVersion": { + "enum": [ + "0.2.0" + ] + } + }, + "allOf": [ + { + "description": "If no bindingVersion specified, use the latest binding", + "if": { + "not": { + "required": [ + "bindingVersion" + ] + } + }, + "then": { + "$ref": "#/definitions/bindings-mqtt-0.2.0-message" + } + }, + { + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.2.0" + } + } + }, + "then": { + "$ref": "#/definitions/bindings-mqtt-0.2.0-message" + } + } + ] }, - "messageStoragePolicy": { - "type": "object", - "additionalProperties": false, + "kafka": { "properties": { - "allowedPersistenceRegions": { - "type": "array", - "items": { - "type": "string" + "bindingVersion": { + "enum": [ + "0.5.0", + "0.4.0", + "0.3.0" + ] + } + }, + "allOf": [ + { + "description": "If no bindingVersion specified, use the latest binding", + "if": { + "not": { + "required": [ + "bindingVersion" + ] + } + }, + "then": { + "$ref": "#/definitions/bindings-kafka-0.5.0-message" + } + }, + { + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.5.0" + } + } + }, + "then": { + "$ref": "#/definitions/bindings-kafka-0.5.0-message" + } + }, + { + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.4.0" + } + } + }, + "then": { + "$ref": "#/definitions/bindings-kafka-0.4.0-message" + } + }, + { + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.3.0" + } + } + }, + "then": { + "$ref": "#/definitions/bindings-kafka-0.3.0-message" } } - } + ] }, - "schemaSettings": { - "type": "object", - "additionalItems": false, + "anypointmq": { "properties": { - "encoding": { - "type": "string" - }, - "firstRevisionId": { - "type": "string" - }, - "lastRevisionId": { - "type": "string" - }, - "name": { - "type": "string" + "bindingVersion": { + "enum": [ + "0.0.1" + ] } }, - "required": [ - "encoding", - "name" + "allOf": [ + { + "description": "If no bindingVersion specified, use the latest binding", + "if": { + "not": { + "required": [ + "bindingVersion" + ] + } + }, + "then": { + "$ref": "#/definitions/bindings-anypointmq-0.0.1-message" + } + }, + { + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.0.1" + } + } + }, + "then": { + "$ref": "#/definitions/bindings-anypointmq-0.0.1-message" + } + } ] - } - }, - "required": [ - "schemaSettings" - ], - "examples": [ - { - "labels": { - "label1": "value1", - "label2": "value2" - }, - "messageRetentionDuration": "86400s", - "messageStoragePolicy": { - "allowedPersistenceRegions": [ - "us-central1", - "us-east1" - ] - }, - "schemaSettings": { - "encoding": "json", - "name": "projects/your-project-id/schemas/your-schema" - } - } - ] - }, - "bindings-pulsar-0.1.0-channel": { - "title": "Channel Schema", - "description": "This object contains information about the channel representation in Pulsar, which covers namespace and topic level admin configuration. This object contains additional information not possible to represent within the core AsyncAPI specification.", - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "required": [ - "namespace", - "persistence" - ], - "properties": { - "namespace": { - "type": "string", - "description": "The namespace, the channel is associated with." - }, - "persistence": { - "type": "string", - "enum": [ - "persistent", - "non-persistent" - ], - "description": "persistence of the topic in Pulsar." - }, - "compaction": { - "type": "integer", - "minimum": 0, - "description": "Topic compaction threshold given in MB" - }, - "geo-replication": { - "type": "array", - "description": "A list of clusters the topic is replicated to.", - "items": { - "type": "string" - } }, - "retention": { - "type": "object", - "additionalProperties": false, + "nats": {}, + "jms": { "properties": { - "time": { - "type": "integer", - "minimum": 0, - "description": "Time given in Minutes. `0` = Disable message retention." + "bindingVersion": { + "enum": [ + "0.0.1" + ] + } + }, + "allOf": [ + { + "description": "If no bindingVersion specified, use the latest binding", + "if": { + "not": { + "required": [ + "bindingVersion" + ] + } + }, + "then": { + "$ref": "#/definitions/bindings-jms-0.0.1-message" + } }, - "size": { - "type": "integer", - "minimum": 0, - "description": "Size given in MegaBytes. `0` = Disable message retention." + { + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.0.1" + } + } + }, + "then": { + "$ref": "#/definitions/bindings-jms-0.0.1-message" + } } - } - }, - "ttl": { - "type": "integer", - "description": "TTL in seconds for the specified topic" - }, - "deduplication": { - "type": "boolean", - "description": "Whether deduplication of events is enabled or not." + ] }, - "bindingVersion": { - "type": "string", - "enum": [ - "0.1.0" - ], - "description": "The version of this binding. If omitted, 'latest' MUST be assumed." - } - }, - "examples": [ - { - "namespace": "ns1", - "persistence": "persistent", - "compaction": 1000, - "retention": { - "time": 15, - "size": 1000 - }, - "ttl": 360, - "geo-replication": [ - "us-west", - "us-east" - ], - "deduplication": true, - "bindingVersion": "0.1.0" - } - ] - }, - "operations": { - "type": "object", - "description": "Holds a dictionary with all the operations this application MUST implement.", - "additionalProperties": { - "oneOf": [ - { - "$ref": "#/definitions/Reference" + "sns": {}, + "sqs": {}, + "stomp": {}, + "redis": {}, + "ibmmq": { + "properties": { + "bindingVersion": { + "enum": [ + "0.1.0" + ] + } }, - { - "$ref": "#/definitions/operation" - } - ] - }, - "examples": [ - { - "onUserSignUp": { - "title": "User sign up", - "summary": "Action to sign a user up.", - "description": "A longer description", - "channel": { - "$ref": "#/channels/userSignup" - }, - "action": "send", - "tags": [ - { - "name": "user" + "allOf": [ + { + "description": "If no bindingVersion specified, use the latest binding", + "if": { + "not": { + "required": [ + "bindingVersion" + ] + } }, - { - "name": "signup" + "then": { + "$ref": "#/definitions/bindings-ibmmq-0.1.0-message" + } + }, + { + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.1.0" + } + } }, - { - "name": "register" + "then": { + "$ref": "#/definitions/bindings-ibmmq-0.1.0-message" } - ], - "bindings": { - "amqp": { - "ack": false + } + ] + }, + "solace": {}, + "googlepubsub": { + "properties": { + "bindingVersion": { + "enum": [ + "0.2.0" + ] + } + }, + "allOf": [ + { + "description": "If no bindingVersion specified, use the latest binding", + "if": { + "not": { + "required": [ + "bindingVersion" + ] + } + }, + "then": { + "$ref": "#/definitions/bindings-googlepubsub-0.2.0-message" } }, - "traits": [ - { - "$ref": "#/components/operationTraits/kafka" + { + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.2.0" + } + } + }, + "then": { + "$ref": "#/definitions/bindings-googlepubsub-0.2.0-message" } - ] - } + } + ] } - ] + } }, - "operation": { + "messageTrait": { "type": "object", - "description": "Describes a specific operation.", + "description": "Describes a trait that MAY be applied to a Message Object. This object MAY contain any property from the Message Object, except payload and traits.", "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { "$ref": "#/definitions/specificationExtension" } }, - "required": [ - "action", - "channel" - ], "properties": { - "action": { + "contentType": { "type": "string", - "description": "Allowed values are send and receive. Use send when it's expected that the application will send a message to the given channel, and receive when the application should expect receiving messages from the given channel.", - "enum": [ - "send", - "receive" - ] - }, - "channel": { - "$ref": "#/definitions/Reference" + "description": "The content type to use when encoding/decoding a message's payload. The value MUST be a specific media type (e.g. application/json). When omitted, the value MUST be the one specified on the defaultContentType field." }, - "messages": { - "type": "array", - "description": "A list of $ref pointers pointing to the supported Message Objects that can be processed by this operation. It MUST contain a subset of the messages defined in the channel referenced in this operation. Every message processed by this operation MUST be valid against one, and only one, of the message objects referenced in this list. Please note the messages property value MUST be a list of Reference Objects and, therefore, MUST NOT contain Message Objects. However, it is RECOMMENDED that parsers (or other software) dereference this property for a better development experience.", - "items": { - "$ref": "#/definitions/Reference" - } + "headers": { + "$ref": "#/definitions/anySchema" }, - "reply": { + "correlationId": { "oneOf": [ { "$ref": "#/definitions/Reference" }, { - "$ref": "#/definitions/operationReply" + "$ref": "#/definitions/correlationId" } ] }, - "traits": { + "tags": { "type": "array", - "description": "A list of traits to apply to the operation object. Traits MUST be merged using traits merge mechanism. The resulting object MUST be a valid Operation Object.", "items": { "oneOf": [ { "$ref": "#/definitions/Reference" }, { - "$ref": "#/definitions/operationTrait" + "$ref": "#/definitions/tag" } ] - } + }, + "uniqueItems": true }, - "title": { + "summary": { + "type": "string", + "description": "A brief summary of the message." + }, + "name": { "type": "string", - "description": "A human-friendly title for the operation." + "description": "Name of the message." }, - "summary": { + "title": { "type": "string", - "description": "A brief summary of the operation." + "description": "A human-friendly title for the message." }, "description": { "type": "string", - "description": "A longer description of the operation. CommonMark is allowed." + "description": "A longer description of the message. CommonMark is allowed." }, - "security": { - "$ref": "#/definitions/securityRequirements" + "externalDocs": { + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/externalDocs" + } + ] + }, + "deprecated": { + "type": "boolean", + "default": false + }, + "examples": { + "type": "array", + "description": "List of examples.", + "items": { + "type": "object" + } + }, + "bindings": { + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/messageBindingsObject" + } + ] + } + }, + "examples": [ + { + "contentType": "application/json" + } + ] + }, + "messageObject": { + "type": "object", + "description": "Describes a message received on a given channel and operation.", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, + "properties": { + "contentType": { + "type": "string", + "description": "The content type to use when encoding/decoding a message's payload. The value MUST be a specific media type (e.g. application/json). When omitted, the value MUST be the one specified on the defaultContentType field." + }, + "headers": { + "$ref": "#/definitions/anySchema" + }, + "payload": { + "$ref": "#/definitions/anySchema" + }, + "correlationId": { + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/correlationId" + } + ] }, "tags": { "type": "array", - "description": "A list of tags for logical grouping and categorization of operations.", "items": { "oneOf": [ { @@ -6567,6 +3259,22 @@ }, "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." + }, "externalDocs": { "oneOf": [ { @@ -6577,34 +3285,99 @@ } ] }, + "deprecated": { + "type": "boolean", + "default": false + }, + "examples": { + "type": "array", + "description": "List of examples.", + "items": { + "type": "object", + "additionalProperties": false, + "anyOf": [ + { + "required": [ + "payload" + ] + }, + { + "required": [ + "headers" + ] + } + ], + "properties": { + "name": { + "type": "string", + "description": "Machine readable name of the message example." + }, + "summary": { + "type": "string", + "description": "A brief summary of the message example." + }, + "headers": { + "type": "object", + "description": "Example of the application headers. It can be of any type." + }, + "payload": { + "description": "Example of the message payload. It can be of any type." + } + } + } + }, "bindings": { "oneOf": [ { "$ref": "#/definitions/Reference" }, { - "$ref": "#/definitions/operationBindingsObject" + "$ref": "#/definitions/messageBindingsObject" } ] + }, + "traits": { + "type": "array", + "description": "A list of traits to apply to the message object. Traits MUST be merged using traits merge mechanism. The resulting object MUST be a valid Message Object.", + "items": { + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/messageTrait" + }, + { + "type": "array", + "items": [ + { + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/messageTrait" + } + ] + }, + { + "type": "object", + "additionalItems": true + } + ] + } + ] + } } }, "examples": [ { - "title": "User sign up", + "messageId": "userSignup", + "name": "UserSignup", + "title": "User signup", "summary": "Action to sign a user up.", "description": "A longer description", - "channel": { - "$ref": "#/channels/userSignup" - }, - "action": "send", - "security": [ - { - "petstore_auth": [ - "write:pets", - "read:pets" - ] - } - ], + "contentType": "application/json", "tags": [ { "name": "user" @@ -6616,40 +3389,76 @@ "name": "register" } ], - "bindings": { - "amqp": { - "ack": false + "headers": { + "type": "object", + "properties": { + "correlationId": { + "description": "Correlation ID set by application", + "type": "string" + }, + "applicationInstanceId": { + "description": "Unique identifier for a given instance of the publishing application", + "type": "string" + } } }, - "traits": [ - { - "$ref": "#/components/operationTraits/kafka" + "payload": { + "type": "object", + "properties": { + "user": { + "$ref": "#/components/schemas/userCreate" + }, + "signup": { + "$ref": "#/components/schemas/signup" + } } - ], - "messages": [ + }, + "correlationId": { + "description": "Default Correlation ID", + "location": "$message.header#/correlationId" + }, + "traits": [ { - "$ref": "/components/messages/userSignedUp" - } - ], - "reply": { - "address": { - "location": "$message.header#/replyTo" - }, - "channel": { - "$ref": "#/channels/userSignupReply" - }, - "messages": [ - { - "$ref": "/components/messages/userSignedUpReply" + "$ref": "#/components/messageTraits/commonHeaders" + } + ], + "examples": [ + { + "name": "SimpleSignup", + "summary": "A simple UserSignup example message", + "headers": { + "correlationId": "my-correlation-id", + "applicationInstanceId": "myInstanceId" + }, + "payload": { + "user": { + "someUserKey": "someUserValue" + }, + "signup": { + "someSignupKey": "someSignupValue" + } } - ] - } + } + ] } ] }, - "operationReply": { + "channelMessages": { "type": "object", - "description": "Describes the reply part that MAY be applied to an Operation Object. If an operation implements the request/reply pattern, the reply object represents the response message.", + "additionalProperties": { + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/messageObject" + } + ] + }, + "description": "A map of the messages that will be sent to this channel by any application at any time. **Every message sent to this channel MUST be valid against one, and only one, of the message objects defined in this map.**" + }, + "parameter": { + "description": "Describes a parameter included in a channel address.", "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { @@ -6657,61 +3466,73 @@ } }, "properties": { - "address": { - "oneOf": [ - { - "$ref": "#/definitions/Reference" - }, - { - "$ref": "#/definitions/operationReplyAddress" - } - ] + "description": { + "type": "string", + "description": "A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed." }, - "channel": { - "$ref": "#/definitions/Reference" + "enum": { + "description": "An enumeration of string values to be used if the substitution options are from a limited set.", + "type": "array", + "items": { + "type": "string" + } }, - "messages": { + "default": { + "description": "The default value to use for substitution, and to send, if an alternate value is not supplied.", + "type": "string" + }, + "examples": { + "description": "An array of examples of the parameter value.", "type": "array", - "description": "A list of $ref pointers pointing to the supported Message Objects that can be processed by this operation as reply. It MUST contain a subset of the messages defined in the channel referenced in this operation reply. Every message processed by this operation MUST be valid against one, and only one, of the message objects referenced in this list. Please note the messages property value MUST be a list of Reference Objects and, therefore, MUST NOT contain Message Objects. However, it is RECOMMENDED that parsers (or other software) dereference this property for a better development experience.", "items": { - "$ref": "#/definitions/Reference" + "type": "string" } - } - } - }, - "operationReplyAddress": { - "type": "object", - "description": "An object that specifies where an operation has to send the reply", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "required": [ - "location" - ], - "properties": { + }, "location": { "type": "string", - "description": "A runtime expression that specifies the location of the reply address.", + "description": "A runtime expression that specifies the location of the parameter value", "pattern": "^\\$message\\.(header|payload)#(\\/(([^\\/~])|(~[01]))*)*" - }, - "description": { - "type": "string", - "description": "An optional description of the address. CommonMark is allowed." } }, "examples": [ { - "description": "Consumer inbox", - "location": "$message.header#/replyTo" + "address": "user/{userId}/signedup", + "parameters": { + "userId": { + "description": "Id of the user.", + "location": "$message.payload#/user/id" + } + } } ] }, - "operationTrait": { + "parameters": { "type": "object", - "description": "Describes a trait that MAY be applied to an Operation Object. This object MAY contain any property from the Operation Object, except the action, channel and traits ones.", + "additionalProperties": { + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/parameter" + } + ] + }, + "description": "JSON objects describing re-usable channel parameters.", + "examples": [ + { + "address": "user/{userId}/signedup", + "parameters": { + "userId": { + "description": "Id of the user." + } + } + } + ] + }, + "channel": { + "type": "object", + "description": "Describes a shared communication channel.", "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { @@ -6719,123 +3540,138 @@ } }, "properties": { + "address": { + "type": [ + "string", + "null" + ], + "description": "An optional string representation of this channel's address. The address is typically the \"topic name\", \"routing key\", \"event type\", or \"path\". When `null` or absent, it MUST be interpreted as unknown. This is useful when the address is generated dynamically at runtime or can't be known upfront. It MAY contain Channel Address Expressions." + }, + "messages": { + "$ref": "#/definitions/channelMessages" + }, + "parameters": { + "$ref": "#/definitions/parameters" + }, "title": { - "description": "A human-friendly title for the operation.", - "$ref": "#/definitions/operation/properties/title" + "type": "string", + "description": "A human-friendly title for the channel." }, "summary": { - "description": "A short summary of what the operation is about.", - "$ref": "#/definitions/operation/properties/summary" + "type": "string", + "description": "A brief summary of the channel." }, "description": { - "description": "A verbose explanation of the operation. CommonMark syntax can be used for rich text representation.", - "$ref": "#/definitions/operation/properties/description" + "type": "string", + "description": "A longer description of the channel. CommonMark is allowed." }, - "security": { - "description": "A declaration of which security schemes are associated with this operation. Only one of the security scheme objects MUST be satisfied to authorize an operation. In cases where Server Security also applies, it MUST also be satisfied.", - "$ref": "#/definitions/operation/properties/security" + "servers": { + "type": "array", + "description": "The references of the servers on which this channel is available. If absent or empty then this channel must be available on all servers.", + "items": { + "$ref": "#/definitions/Reference" + }, + "uniqueItems": true }, "tags": { - "description": "A list of tags for logical grouping and categorization of operations.", - "$ref": "#/definitions/operation/properties/tags" + "type": "array", + "description": "A list of tags for logical grouping of channels.", + "items": { + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/tag" + } + ] + }, + "uniqueItems": true }, "externalDocs": { - "description": "Additional external documentation for this operation.", - "$ref": "#/definitions/operation/properties/externalDocs" + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/externalDocs" + } + ] }, "bindings": { - "description": "A map where the keys describe the name of the protocol and the values describe protocol-specific definitions for the operation.", "oneOf": [ { "$ref": "#/definitions/Reference" }, { - "$ref": "#/definitions/operationBindingsObject" + "$ref": "#/definitions/channelBindingsObject" } ] } }, "examples": [ { - "bindings": { - "amqp": { - "ack": false + "address": "users.{userId}", + "title": "Users channel", + "description": "This channel is used to exchange messages about user events.", + "messages": { + "userSignedUp": { + "$ref": "#/components/messages/userSignedUp" + }, + "userCompletedOrder": { + "$ref": "#/components/messages/userCompletedOrder" } - } - } - ] - }, - "operationBindingsObject": { - "type": "object", - "description": "Map describing protocol-specific definitions for an operation.", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "properties": { - "http": { - "properties": { - "bindingVersion": { - "enum": [ - "0.2.0", - "0.3.0" - ] + }, + "parameters": { + "userId": { + "$ref": "#/components/parameters/userId" } }, - "allOf": [ + "servers": [ { - "description": "If no bindingVersion specified, use the latest binding", - "if": { - "not": { - "required": [ - "bindingVersion" - ] - } - }, - "then": { - "$ref": "#/definitions/bindings-http-0.3.0-operation" - } + "$ref": "#/servers/rabbitmqInProd" }, { - "if": { - "required": [ - "bindingVersion" - ], - "properties": { - "bindingVersion": { - "const": "0.2.0" - } - } - }, - "then": { - "$ref": "#/definitions/bindings-http-0.2.0-operation" + "$ref": "#/servers/rabbitmqInStaging" + } + ], + "bindings": { + "amqp": { + "is": "queue", + "queue": { + "exclusive": true } - }, + } + }, + "tags": [ { - "if": { - "required": [ - "bindingVersion" - ], - "properties": { - "bindingVersion": { - "const": "0.3.0" - } - } - }, - "then": { - "$ref": "#/definitions/bindings-http-0.3.0-operation" - } + "name": "user", + "description": "User-related messages" } - ] - }, - "ws": {}, - "amqp": { + ], + "externalDocs": { + "description": "Find more info here", + "url": "https://example.com" + } + } + ] + }, + "channelBindingsObject": { + "type": "object", + "description": "Map describing protocol-specific definitions for a channel.", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, + "properties": { + "http": {}, + "ws": { "properties": { "bindingVersion": { "enum": [ - "0.3.0" + "0.1.0" ] } }, @@ -6850,7 +3686,7 @@ } }, "then": { - "$ref": "#/definitions/bindings-amqp-0.3.0-operation" + "$ref": "#/definitions/bindings-websockets-0.1.0-channel" } }, { @@ -6860,22 +3696,21 @@ ], "properties": { "bindingVersion": { - "const": "0.3.0" + "const": "0.1.0" } } }, "then": { - "$ref": "#/definitions/bindings-amqp-0.3.0-operation" + "$ref": "#/definitions/bindings-websockets-0.1.0-channel" } } ] }, - "amqp1": {}, - "mqtt": { + "amqp": { "properties": { "bindingVersion": { "enum": [ - "0.2.0" + "0.3.0" ] } }, @@ -6890,7 +3725,7 @@ } }, "then": { - "$ref": "#/definitions/bindings-mqtt-0.2.0-operation" + "$ref": "#/definitions/bindings-amqp-0.3.0-channel" } }, { @@ -6900,16 +3735,18 @@ ], "properties": { "bindingVersion": { - "const": "0.2.0" + "const": "0.3.0" } } }, "then": { - "$ref": "#/definitions/bindings-mqtt-0.2.0-operation" + "$ref": "#/definitions/bindings-amqp-0.3.0-channel" } } ] }, + "amqp1": {}, + "mqtt": {}, "kafka": { "properties": { "bindingVersion": { @@ -6931,7 +3768,7 @@ } }, "then": { - "$ref": "#/definitions/bindings-kafka-0.5.0-operation" + "$ref": "#/definitions/bindings-kafka-0.5.0-channel" } }, { @@ -6946,7 +3783,7 @@ } }, "then": { - "$ref": "#/definitions/bindings-kafka-0.5.0-operation" + "$ref": "#/definitions/bindings-kafka-0.5.0-channel" } }, { @@ -6961,7 +3798,7 @@ } }, "then": { - "$ref": "#/definitions/bindings-kafka-0.4.0-operation" + "$ref": "#/definitions/bindings-kafka-0.4.0-channel" } }, { @@ -6976,17 +3813,16 @@ } }, "then": { - "$ref": "#/definitions/bindings-kafka-0.3.0-operation" + "$ref": "#/definitions/bindings-kafka-0.3.0-channel" } } ] }, - "anypointmq": {}, - "nats": { + "anypointmq": { "properties": { "bindingVersion": { "enum": [ - "0.1.0" + "0.0.1" ] } }, @@ -7001,7 +3837,7 @@ } }, "then": { - "$ref": "#/definitions/bindings-nats-0.1.0-operation" + "$ref": "#/definitions/bindings-anypointmq-0.0.1-channel" } }, { @@ -7011,22 +3847,22 @@ ], "properties": { "bindingVersion": { - "const": "0.1.0" + "const": "0.0.1" } } }, "then": { - "$ref": "#/definitions/bindings-nats-0.1.0-operation" + "$ref": "#/definitions/bindings-anypointmq-0.0.1-channel" } } ] }, - "jms": {}, - "sns": { + "nats": {}, + "jms": { "properties": { "bindingVersion": { "enum": [ - "0.1.0" + "0.0.1" ] } }, @@ -7041,7 +3877,7 @@ } }, "then": { - "$ref": "#/definitions/bindings-sns-0.1.0-operation" + "$ref": "#/definitions/bindings-jms-0.0.1-channel" } }, { @@ -7051,21 +3887,21 @@ ], "properties": { "bindingVersion": { - "const": "0.1.0" + "const": "0.0.1" } } }, "then": { - "$ref": "#/definitions/bindings-sns-0.1.0-operation" + "$ref": "#/definitions/bindings-jms-0.0.1-channel" } } ] }, - "sqs": { + "sns": { "properties": { "bindingVersion": { "enum": [ - "0.2.0" + "0.1.0" ] } }, @@ -7080,7 +3916,7 @@ } }, "then": { - "$ref": "#/definitions/bindings-sqs-0.2.0-operation" + "$ref": "#/definitions/bindings-sns-0.1.0-channel" } }, { @@ -7090,25 +3926,20 @@ ], "properties": { "bindingVersion": { - "const": "0.2.0" + "const": "0.1.0" } } }, "then": { - "$ref": "#/definitions/bindings-sqs-0.2.0-operation" + "$ref": "#/definitions/bindings-sns-0.1.0-channel" } } ] }, - "stomp": {}, - "redis": {}, - "ibmmq": {}, - "solace": { + "sqs": { "properties": { "bindingVersion": { "enum": [ - "0.4.0", - "0.3.0", "0.2.0" ] } @@ -7124,37 +3955,7 @@ } }, "then": { - "$ref": "#/definitions/bindings-solace-0.4.0-operation" - } - }, - { - "if": { - "required": [ - "bindingVersion" - ], - "properties": { - "bindingVersion": { - "const": "0.4.0" - } - } - }, - "then": { - "$ref": "#/definitions/bindings-solace-0.4.0-operation" - } - }, - { - "if": { - "required": [ - "bindingVersion" - ], - "properties": { - "bindingVersion": { - "const": "0.3.0" - } - } - }, - "then": { - "$ref": "#/definitions/bindings-solace-0.3.0-operation" + "$ref": "#/definitions/bindings-sqs-0.2.0-channel" } }, { @@ -7169,447 +3970,192 @@ } }, "then": { - "$ref": "#/definitions/bindings-solace-0.2.0-operation" + "$ref": "#/definitions/bindings-sqs-0.2.0-channel" } } ] }, - "googlepubsub": {} - } - }, - "bindings-http-0.3.0-operation": { - "title": "HTTP operation bindings object", - "description": "This object contains information about the operation representation in HTTP.", - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "properties": { - "method": { - "type": "string", - "enum": [ - "GET", - "PUT", - "POST", - "PATCH", - "DELETE", - "HEAD", - "OPTIONS", - "CONNECT", - "TRACE" - ], - "description": "When 'type' is 'request', this is the HTTP method, otherwise it MUST be ignored. Its value MUST be one of 'GET', 'POST', 'PUT', 'PATCH', 'DELETE', 'HEAD', 'OPTIONS', 'CONNECT', and 'TRACE'." - }, - "query": { - "$ref": "#/definitions/schema", - "description": "A Schema object containing the definitions for each query parameter. This schema MUST be of type 'object' and have a properties key." - }, - "bindingVersion": { - "type": "string", - "enum": [ - "0.3.0" - ], - "description": "The version of this binding. If omitted, 'latest' MUST be assumed." - } - }, - "examples": [ - { - "query": { - "type": "object", - "required": [ - "companyId" - ], - "properties": { - "companyId": { - "type": "number", - "minimum": 1, - "description": "The Id of the company." - } - }, - "additionalProperties": false - }, - "bindingVersion": "0.3.0" - }, - { - "method": "GET", - "query": { - "type": "object", - "required": [ - "companyId" - ], - "properties": { - "companyId": { - "type": "number", - "minimum": 1, - "description": "The Id of the company." - } - }, - "additionalProperties": false - }, - "bindingVersion": "0.3.0" - } - ] - }, - "bindings-http-0.2.0-operation": { - "title": "HTTP operation bindings object", - "description": "This object contains information about the operation representation in HTTP.", - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "properties": { - "method": { - "type": "string", - "enum": [ - "GET", - "PUT", - "POST", - "PATCH", - "DELETE", - "HEAD", - "OPTIONS", - "CONNECT", - "TRACE" - ], - "description": "When 'type' is 'request', this is the HTTP method, otherwise it MUST be ignored. Its value MUST be one of 'GET', 'POST', 'PUT', 'PATCH', 'DELETE', 'HEAD', 'OPTIONS', 'CONNECT', and 'TRACE'." - }, - "query": { - "$ref": "#/definitions/schema", - "description": "A Schema object containing the definitions for each query parameter. This schema MUST be of type 'object' and have a properties key." - }, - "bindingVersion": { - "type": "string", - "enum": [ - "0.2.0" - ], - "description": "The version of this binding. If omitted, 'latest' MUST be assumed." - } - }, - "examples": [ - { - "query": { - "type": "object", - "required": [ - "companyId" - ], - "properties": { - "companyId": { - "type": "number", - "minimum": 1, - "description": "The Id of the company." - } - }, - "additionalProperties": false - }, - "bindingVersion": "0.2.0" - }, - { - "method": "GET", - "query": { - "type": "object", - "required": [ - "companyId" - ], - "properties": { - "companyId": { - "type": "number", - "minimum": 1, - "description": "The Id of the company." - } - }, - "additionalProperties": false - }, - "bindingVersion": "0.2.0" - } - ] - }, - "bindings-amqp-0.3.0-operation": { - "title": "AMQP operation bindings object", - "description": "This object contains information about the operation representation in AMQP.", - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "properties": { - "expiration": { - "type": "integer", - "minimum": 0, - "description": "TTL (Time-To-Live) for the message. It MUST be greater than or equal to zero." - }, - "userId": { - "type": "string", - "description": "Identifies the user who has sent the message." - }, - "cc": { - "type": "array", - "items": { - "type": "string" + "stomp": {}, + "redis": {}, + "ibmmq": { + "properties": { + "bindingVersion": { + "enum": [ + "0.1.0" + ] + } }, - "description": "The routing keys the message should be routed to at the time of publishing." - }, - "priority": { - "type": "integer", - "description": "A priority for the message." - }, - "deliveryMode": { - "type": "integer", - "enum": [ - 1, - 2 - ], - "description": "Delivery mode of the message. Its value MUST be either 1 (transient) or 2 (persistent)." - }, - "mandatory": { - "type": "boolean", - "description": "Whether the message is mandatory or not." + "allOf": [ + { + "description": "If no bindingVersion specified, use the latest binding", + "if": { + "not": { + "required": [ + "bindingVersion" + ] + } + }, + "then": { + "$ref": "#/definitions/bindings-ibmmq-0.1.0-channel" + } + }, + { + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.1.0" + } + } + }, + "then": { + "$ref": "#/definitions/bindings-ibmmq-0.1.0-channel" + } + } + ] }, - "bcc": { - "type": "array", - "items": { - "type": "string" + "solace": {}, + "googlepubsub": { + "properties": { + "bindingVersion": { + "enum": [ + "0.2.0" + ] + } }, - "description": "Like cc but consumers will not receive this information." - }, - "timestamp": { - "type": "boolean", - "description": "Whether the message should include a timestamp or not." - }, - "ack": { - "type": "boolean", - "description": "Whether the consumer should ack the message or not." - }, - "bindingVersion": { - "type": "string", - "enum": [ - "0.3.0" - ], - "description": "The version of this binding. If omitted, \"latest\" MUST be assumed." - } - }, - "examples": [ - { - "expiration": 100000, - "userId": "guest", - "cc": [ - "user.logs" - ], - "priority": 10, - "deliveryMode": 2, - "mandatory": false, - "bcc": [ - "external.audit" - ], - "timestamp": true, - "ack": false, - "bindingVersion": "0.3.0" - } - ] - }, - "bindings-mqtt-0.2.0-operation": { - "title": "MQTT operation bindings object", - "description": "This object contains information about the operation representation in MQTT.", - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "properties": { - "qos": { - "type": "integer", - "enum": [ - 0, - 1, - 2 - ], - "description": "Defines the Quality of Service (QoS) levels for the message flow between client and server. Its value MUST be either 0 (At most once delivery), 1 (At least once delivery), or 2 (Exactly once delivery)." - }, - "retain": { - "type": "boolean", - "description": "Whether the broker should retain the message or not." - }, - "messageExpiryInterval": { - "oneOf": [ + "allOf": [ { - "type": "integer", - "minimum": 0, - "maximum": 4294967295 + "description": "If no bindingVersion specified, use the latest binding", + "if": { + "not": { + "required": [ + "bindingVersion" + ] + } + }, + "then": { + "$ref": "#/definitions/bindings-googlepubsub-0.2.0-channel" + } }, { - "$ref": "#/definitions/schema" + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.2.0" + } + } + }, + "then": { + "$ref": "#/definitions/bindings-googlepubsub-0.2.0-channel" + } + } + ] + }, + "pulsar": { + "properties": { + "bindingVersion": { + "enum": [ + "0.1.0" + ] + } + }, + "allOf": [ + { + "description": "If no bindingVersion specified, use the latest binding", + "if": { + "not": { + "required": [ + "bindingVersion" + ] + } + }, + "then": { + "$ref": "#/definitions/bindings-pulsar-0.1.0-channel" + } }, { - "$ref": "#/definitions/Reference" + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.1.0" + } + } + }, + "then": { + "$ref": "#/definitions/bindings-pulsar-0.1.0-channel" + } } - ], - "description": "Lifetime of the message in seconds" - }, - "bindingVersion": { - "type": "string", - "enum": [ - "0.2.0" - ], - "description": "The version of this binding. If omitted, 'latest' MUST be assumed." - } - }, - "examples": [ - { - "qos": 2, - "retain": true, - "messageExpiryInterval": 60, - "bindingVersion": "0.2.0" + ] } - ] + } }, - "bindings-kafka-0.5.0-operation": { - "title": "Operation Schema", - "description": "This object contains information about the operation representation in Kafka.", + "channels": { "type": "object", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "properties": { - "groupId": { - "$ref": "#/definitions/schema", - "description": "Id of the consumer group." - }, - "clientId": { - "$ref": "#/definitions/schema", - "description": "Id of the consumer inside a consumer group." - }, - "bindingVersion": { - "type": "string", - "enum": [ - "0.5.0" - ], - "description": "The version of this binding. If omitted, 'latest' MUST be assumed." - } - }, - "examples": [ - { - "groupId": { - "type": "string", - "enum": [ - "myGroupId" - ] - }, - "clientId": { - "type": "string", - "enum": [ - "myClientId" - ] + "description": "An object containing all the Channel Object definitions the Application MUST use during runtime.", + "additionalProperties": { + "oneOf": [ + { + "$ref": "#/definitions/Reference" }, - "bindingVersion": "0.5.0" - } - ] - }, - "bindings-kafka-0.4.0-operation": { - "title": "Operation Schema", - "description": "This object contains information about the operation representation in Kafka.", - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "properties": { - "groupId": { - "$ref": "#/definitions/schema", - "description": "Id of the consumer group." - }, - "clientId": { - "$ref": "#/definitions/schema", - "description": "Id of the consumer inside a consumer group." - }, - "bindingVersion": { - "type": "string", - "enum": [ - "0.4.0" - ], - "description": "The version of this binding. If omitted, 'latest' MUST be assumed." - } + { + "$ref": "#/definitions/channel" + } + ] }, "examples": [ { - "groupId": { - "type": "string", - "enum": [ - "myGroupId" - ] - }, - "clientId": { - "type": "string", - "enum": [ - "myClientId" - ] - }, - "bindingVersion": "0.4.0" + "userSignedUp": { + "address": "user.signedup", + "messages": { + "userSignedUp": { + "$ref": "#/components/messages/userSignedUp" + } + } + } } ] }, - "bindings-kafka-0.3.0-operation": { - "title": "Operation Schema", - "description": "This object contains information about the operation representation in Kafka.", + "operationReplyAddress": { "type": "object", + "description": "An object that specifies where an operation has to send the reply", "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { "$ref": "#/definitions/specificationExtension" } }, + "required": [ + "location" + ], "properties": { - "groupId": { - "$ref": "#/definitions/schema", - "description": "Id of the consumer group." - }, - "clientId": { - "$ref": "#/definitions/schema", - "description": "Id of the consumer inside a consumer group." + "location": { + "type": "string", + "description": "A runtime expression that specifies the location of the reply address.", + "pattern": "^\\$message\\.(header|payload)#(\\/(([^\\/~])|(~[01]))*)*" }, - "bindingVersion": { + "description": { "type": "string", - "enum": [ - "0.3.0" - ], - "description": "The version of this binding. If omitted, 'latest' MUST be assumed." + "description": "An optional description of the address. CommonMark is allowed." } }, "examples": [ { - "groupId": { - "type": "string", - "enum": [ - "myGroupId" - ] - }, - "clientId": { - "type": "string", - "enum": [ - "myClientId" - ] - }, - "bindingVersion": "0.3.0" + "description": "Consumer inbox", + "location": "$message.header#/replyTo" } ] }, - "bindings-nats-0.1.0-operation": { - "title": "NATS operation bindings object", - "description": "This object contains information about the operation representation in NATS.", + "operationReply": { "type": "object", + "description": "Describes the reply part that MAY be applied to an Operation Object. If an operation implements the request/reply pattern, the reply object represents the response message.", "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { @@ -7617,30 +4163,135 @@ } }, "properties": { - "queue": { - "type": "string", - "description": "Defines the name of the queue to use. It MUST NOT exceed 255 characters.", - "maxLength": 255 + "address": { + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/operationReplyAddress" + } + ] + }, + "channel": { + "$ref": "#/definitions/Reference" + }, + "messages": { + "type": "array", + "description": "A list of $ref pointers pointing to the supported Message Objects that can be processed by this operation as reply. It MUST contain a subset of the messages defined in the channel referenced in this operation reply. Every message processed by this operation MUST be valid against one, and only one, of the message objects referenced in this list. Please note the messages property value MUST be a list of Reference Objects and, therefore, MUST NOT contain Message Objects. However, it is RECOMMENDED that parsers (or other software) dereference this property for a better development experience.", + "items": { + "$ref": "#/definitions/Reference" + } + } + } + }, + "operation": { + "title": "Solace operation bindings object", + "description": "This object contains information about the operation representation in Solace.", + "type": "object", + "additionalProperties": false, + "properties": { + "destinations": { + "description": "The list of Solace destinations referenced in the operation.", + "type": "array", + "items": { + "type": "object", + "properties": { + "deliveryMode": { + "type": "string", + "enum": [ + "direct", + "persistent" + ] + } + }, + "oneOf": [ + { + "properties": { + "destinationType": { + "type": "string", + "const": "queue", + "description": "If the type is queue, then the subscriber can bind to the queue. The queue subscribes to the given topicSubscriptions. If no topicSubscriptions are provied, the queue will subscribe to the topic as represented by the channel name." + }, + "queue": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The name of the queue" + }, + "topicSubscriptions": { + "type": "array", + "description": "The list of topics that the queue subscribes to.", + "items": { + "type": "string" + } + }, + "accessType": { + "type": "string", + "enum": [ + "exclusive", + "nonexclusive" + ] + } + } + } + } + }, + { + "properties": { + "destinationType": { + "type": "string", + "const": "topic", + "description": "If the type is topic, then the subscriber subscribes to the given topicSubscriptions. If no topicSubscriptions are provided, the client will subscribe to the topic as represented by the channel name." + }, + "topicSubscriptions": { + "type": "array", + "description": "The list of topics that the client subscribes to.", + "items": { + "type": "string" + } + } + } + } + ] + } }, "bindingVersion": { "type": "string", "enum": [ - "0.1.0" + "0.2.0" ], - "description": "The version of this binding. If omitted, 'latest' MUST be assumed." + "description": "The version of this binding. If omitted, \"latest\" MUST be assumed." } }, "examples": [ { - "queue": "MyCustomQueue", - "bindingVersion": "0.1.0" + "bindingVersion": "0.2.0", + "destinations": [ + { + "destinationType": "queue", + "queue": { + "name": "sampleQueue", + "topicSubscriptions": [ + "samples/*" + ], + "accessType": "nonexclusive" + } + }, + { + "destinationType": "topic", + "topicSubscriptions": [ + "samples/*" + ] + } + ] } ] }, - "bindings-sns-0.1.0-operation": { - "title": "Operation Schema", - "description": "This object contains information about the operation representation in SNS.", + "operationBindingsObject": { "type": "object", + "description": "Map describing protocol-specific definitions for an operation.", "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { @@ -7648,867 +4299,503 @@ } }, "properties": { - "topic": { - "$ref": "#/definitions/bindings-sns-0.1.0-operation/definitions/identifier", - "description": "Often we can assume that the SNS Topic is the channel name-we provide this field in case the you need to supply the ARN, or the Topic name is not the channel name in the AsyncAPI document." - }, - "consumers": { - "type": "array", - "description": "The protocols that listen to this topic and their endpoints.", - "items": { - "$ref": "#/definitions/bindings-sns-0.1.0-operation/definitions/consumer" - }, - "minItems": 1 - }, - "deliveryPolicy": { - "$ref": "#/definitions/bindings-sns-0.1.0-operation/definitions/deliveryPolicy", - "description": "Policy for retries to HTTP. The field is the default for HTTP receivers of the SNS Topic which may be overridden by a specific consumer." - }, - "bindingVersion": { - "type": "string", - "description": "The version of this binding.", - "default": "latest" - } - }, - "required": [ - "consumers" - ], - "definitions": { - "identifier": { - "type": "object", - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" + "http": { + "properties": { + "bindingVersion": { + "enum": [ + "0.2.0", + "0.3.0" + ] } }, - "properties": { - "url": { - "type": "string", - "description": "The endpoint is a URL." - }, - "email": { - "type": "string", - "description": "The endpoint is an email address." - }, - "phone": { - "type": "string", - "description": "The endpoint is a phone number." + "allOf": [ + { + "description": "If no bindingVersion specified, use the latest binding", + "if": { + "not": { + "required": [ + "bindingVersion" + ] + } + }, + "then": { + "$ref": "#/definitions/bindings-http-0.3.0-operation" + } }, - "arn": { - "type": "string", - "description": "The target is an ARN. For example, for SQS, the identifier may be an ARN, which will be of the form: arn:aws:sqs:{region}:{account-id}:{queueName}" + { + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.2.0" + } + } + }, + "then": { + "$ref": "#/definitions/bindings-http-0.2.0-operation" + } }, - "name": { - "type": "string", - "description": "The endpoint is identified by a name, which corresponds to an identifying field called 'name' of a binding for that protocol on this publish Operation Object. For example, if the protocol is 'sqs' then the name refers to the name field sqs binding. We don't use $ref because we are referring, not including." + { + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.3.0" + } + } + }, + "then": { + "$ref": "#/definitions/bindings-http-0.3.0-operation" + } } - } + ] }, - "consumer": { - "type": "object", - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, + "ws": {}, + "amqp": { "properties": { - "protocol": { - "description": "The protocol that this endpoint receives messages by.", - "type": "string", + "bindingVersion": { "enum": [ - "http", - "https", - "email", - "email-json", - "sms", - "sqs", - "application", - "lambda", - "firehose" + "0.3.0" ] - }, - "endpoint": { - "description": "The endpoint messages are delivered to.", - "$ref": "#/definitions/bindings-sns-0.1.0-operation/definitions/identifier" - }, - "filterPolicy": { - "type": "object", - "description": "Only receive a subset of messages from the channel, determined by this policy. Depending on the FilterPolicyScope, a map of either a message attribute or message body to an array of possible matches. The match may be a simple string for an exact match, but it may also be an object that represents a constraint and values for that constraint.", - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" + } + }, + "allOf": [ + { + "description": "If no bindingVersion specified, use the latest binding", + "if": { + "not": { + "required": [ + "bindingVersion" + ] } }, - "additionalProperties": { - "oneOf": [ - { - "type": "array", - "items": { - "type": "string" - } - }, - { - "type": "string" - }, - { - "type": "object" - } - ] + "then": { + "$ref": "#/definitions/bindings-amqp-0.3.0-operation" } }, - "filterPolicyScope": { - "type": "string", - "description": "Determines whether the FilterPolicy applies to MessageAttributes or MessageBody.", - "enum": [ - "MessageAttributes", - "MessageBody" - ], - "default": "MessageAttributes" - }, - "rawMessageDelivery": { - "type": "boolean", - "description": "If true AWS SNS attributes are removed from the body, and for SQS, SNS message attributes are copied to SQS message attributes. If false the SNS attributes are included in the body." - }, - "redrivePolicy": { - "$ref": "#/definitions/bindings-sns-0.1.0-operation/definitions/redrivePolicy" - }, - "deliveryPolicy": { - "$ref": "#/definitions/bindings-sns-0.1.0-operation/definitions/deliveryPolicy", - "description": "Policy for retries to HTTP. The parameter is for that SNS Subscription and overrides any policy on the SNS Topic." - }, - "displayName": { - "type": "string", - "description": "The display name to use with an SNS subscription" + { + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.3.0" + } + } + }, + "then": { + "$ref": "#/definitions/bindings-amqp-0.3.0-operation" + } } - }, - "required": [ - "protocol", - "endpoint", - "rawMessageDelivery" ] }, - "deliveryPolicy": { - "type": "object", - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, + "amqp1": {}, + "mqtt": { "properties": { - "minDelayTarget": { - "type": "integer", - "description": "The minimum delay for a retry in seconds." - }, - "maxDelayTarget": { - "type": "integer", - "description": "The maximum delay for a retry in seconds." - }, - "numRetries": { - "type": "integer", - "description": "The total number of retries, including immediate, pre-backoff, backoff, and post-backoff retries." - }, - "numNoDelayRetries": { - "type": "integer", - "description": "The number of immediate retries (with no delay)." - }, - "numMinDelayRetries": { - "type": "integer", - "description": "The number of immediate retries (with delay)." - }, - "numMaxDelayRetries": { - "type": "integer", - "description": "The number of post-backoff phase retries, with the maximum delay between retries." - }, - "backoffFunction": { - "type": "string", - "description": "The algorithm for backoff between retries.", + "bindingVersion": { "enum": [ - "arithmetic", - "exponential", - "geometric", - "linear" + "0.2.0" ] - }, - "maxReceivesPerSecond": { - "type": "integer", - "description": "The maximum number of deliveries per second, per subscription." - } - } - }, - "redrivePolicy": { - "type": "object", - "description": "Prevent poison pill messages by moving un-processable messages to an SQS dead letter queue.", - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "properties": { - "deadLetterQueue": { - "$ref": "#/definitions/bindings-sns-0.1.0-operation/definitions/identifier", - "description": "The SQS queue to use as a dead letter queue (DLQ)." - }, - "maxReceiveCount": { - "type": "integer", - "description": "The number of times a message is delivered to the source queue before being moved to the dead-letter queue.", - "default": 10 } }, - "required": [ - "deadLetterQueue" - ] - } - }, - "examples": [ - { - "topic": { - "name": "someTopic" - }, - "consumers": [ + "allOf": [ { - "protocol": "sqs", - "endpoint": { - "name": "someQueue" + "description": "If no bindingVersion specified, use the latest binding", + "if": { + "not": { + "required": [ + "bindingVersion" + ] + } }, - "filterPolicy": { - "store": [ - "asyncapi_corp" + "then": { + "$ref": "#/definitions/bindings-mqtt-0.2.0-operation" + } + }, + { + "if": { + "required": [ + "bindingVersion" ], - "event": [ - { - "anything-but": "order_cancelled" + "properties": { + "bindingVersion": { + "const": "0.2.0" } - ], - "customer_interests": [ - "rugby", - "football", - "baseball" - ] - }, - "filterPolicyScope": "MessageAttributes", - "rawMessageDelivery": false, - "redrivePolicy": { - "deadLetterQueue": { - "arn": "arn:aws:SQS:eu-west-1:0000000:123456789" - }, - "maxReceiveCount": 25 + } }, - "deliveryPolicy": { - "minDelayTarget": 10, - "maxDelayTarget": 100, - "numRetries": 5, - "numNoDelayRetries": 2, - "numMinDelayRetries": 3, - "numMaxDelayRetries": 5, - "backoffFunction": "linear", - "maxReceivesPerSecond": 2 + "then": { + "$ref": "#/definitions/bindings-mqtt-0.2.0-operation" } } ] - } - ] - }, - "bindings-sqs-0.2.0-operation": { - "title": "Operation Schema", - "description": "This object contains information about the operation representation in SQS.", - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "properties": { - "queues": { - "type": "array", - "description": "Queue objects that are either the endpoint for an SNS Operation Binding Object, or the deadLetterQueue of the SQS Operation Binding Object.", - "items": { - "$ref": "#/definitions/bindings-sqs-0.2.0-operation/definitions/queue" - } }, - "bindingVersion": { - "type": "string", - "enum": [ - "0.1.0", - "0.2.0" - ], - "description": "The version of this binding. If omitted, 'latest' MUST be assumed.", - "default": "latest" - } - }, - "required": [ - "queues" - ], - "definitions": { - "queue": { - "type": "object", - "description": "A definition of a queue.", - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, + "kafka": { "properties": { - "$ref": { - "type": "string", - "description": "Allows for an external definition of a queue. The referenced structure MUST be in the format of a Queue. If there are conflicts between the referenced definition and this Queue's definition, the behavior is undefined." - }, - "name": { - "type": "string", - "description": "The name of the queue. When an SNS Operation Binding Object references an SQS queue by name, the identifier should be the one in this field." - }, - "fifoQueue": { - "type": "boolean", - "description": "Is this a FIFO queue?", - "default": false - }, - "deduplicationScope": { - "type": "string", - "enum": [ - "queue", - "messageGroup" - ], - "description": "Specifies whether message deduplication occurs at the message group or queue level. Valid values are messageGroup and queue (default).", - "default": "queue" - }, - "fifoThroughputLimit": { - "type": "string", + "bindingVersion": { "enum": [ - "perQueue", - "perMessageGroupId" - ], - "description": "Specifies whether the FIFO queue throughput quota applies to the entire queue or per message group. Valid values are perQueue (default) and perMessageGroupId.", - "default": "perQueue" - }, - "deliveryDelay": { - "type": "integer", - "description": "The number of seconds to delay before a message sent to the queue can be received. Used to create a delay queue.", - "minimum": 0, - "maximum": 15, - "default": 0 - }, - "visibilityTimeout": { - "type": "integer", - "description": "The length of time, in seconds, that a consumer locks a message - hiding it from reads - before it is unlocked and can be read again.", - "minimum": 0, - "maximum": 43200, - "default": 30 - }, - "receiveMessageWaitTime": { - "type": "integer", - "description": "Determines if the queue uses short polling or long polling. Set to zero the queue reads available messages and returns immediately. Set to a non-zero integer, long polling waits the specified number of seconds for messages to arrive before returning.", - "default": 0 - }, - "messageRetentionPeriod": { - "type": "integer", - "description": "How long to retain a message on the queue in seconds, unless deleted.", - "minimum": 60, - "maximum": 1209600, - "default": 345600 - }, - "redrivePolicy": { - "$ref": "#/definitions/bindings-sqs-0.2.0-operation/definitions/redrivePolicy" - }, - "policy": { - "$ref": "#/definitions/bindings-sqs-0.2.0-operation/definitions/policy" - }, - "tags": { - "type": "object", - "description": "Key-value pairs that represent AWS tags on the queue." - } - }, - "required": [ - "name" - ] - }, - "redrivePolicy": { - "type": "object", - "description": "Prevent poison pill messages by moving un-processable messages to an SQS dead letter queue.", - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" + "0.5.0", + "0.4.0", + "0.3.0" + ] } }, - "properties": { - "deadLetterQueue": { - "$ref": "#/definitions/bindings-sqs-0.2.0-operation/definitions/identifier" + "allOf": [ + { + "description": "If no bindingVersion specified, use the latest binding", + "if": { + "not": { + "required": [ + "bindingVersion" + ] + } + }, + "then": { + "$ref": "#/definitions/bindings-kafka-0.5.0-operation" + } }, - "maxReceiveCount": { - "type": "integer", - "description": "The number of times a message is delivered to the source queue before being moved to the dead-letter queue.", - "default": 10 - } - }, - "required": [ - "deadLetterQueue" - ] - }, - "identifier": { - "type": "object", - "description": "The SQS queue to use as a dead letter queue (DLQ).", - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "properties": { - "arn": { - "type": "string", - "description": "The target is an ARN. For example, for SQS, the identifier may be an ARN, which will be of the form: arn:aws:sqs:{region}:{account-id}:{queueName}" + { + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.5.0" + } + } + }, + "then": { + "$ref": "#/definitions/bindings-kafka-0.5.0-operation" + } }, - "name": { - "type": "string", - "description": "The endpoint is identified by a name, which corresponds to an identifying field called 'name' of a binding for that protocol on this publish Operation Object. For example, if the protocol is 'sqs' then the name refers to the name field sqs binding." - } - } - }, - "policy": { - "type": "object", - "description": "The security policy for the SQS Queue", - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "properties": { - "statements": { - "type": "array", - "description": "An array of statement objects, each of which controls a permission for this queue.", - "items": { - "$ref": "#/definitions/bindings-sqs-0.2.0-operation/definitions/statement" + { + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.4.0" + } + } + }, + "then": { + "$ref": "#/definitions/bindings-kafka-0.4.0-operation" + } + }, + { + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.3.0" + } + } + }, + "then": { + "$ref": "#/definitions/bindings-kafka-0.3.0-operation" } } - }, - "required": [ - "statements" ] }, - "statement": { - "type": "object", - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, + "anypointmq": {}, + "nats": { "properties": { - "effect": { - "type": "string", + "bindingVersion": { "enum": [ - "Allow", - "Deny" + "0.1.0" ] - }, - "principal": { - "description": "The AWS account or resource ARN that this statement applies to.", - "oneOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "type": "string" - } + } + }, + "allOf": [ + { + "description": "If no bindingVersion specified, use the latest binding", + "if": { + "not": { + "required": [ + "bindingVersion" + ] } - ] + }, + "then": { + "$ref": "#/definitions/bindings-nats-0.1.0-operation" + } }, - "action": { - "description": "The SQS permission being allowed or denied e.g. sqs:ReceiveMessage", - "oneOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "type": "string" + { + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.1.0" } } + }, + "then": { + "$ref": "#/definitions/bindings-nats-0.1.0-operation" + } + } + ] + }, + "jms": {}, + "sns": { + "properties": { + "bindingVersion": { + "enum": [ + "0.1.0" ] } }, - "required": [ - "effect", - "principal", - "action" - ] - } - }, - "examples": [ - { - "queues": [ - { - "name": "myQueue", - "fifoQueue": true, - "deduplicationScope": "messageGroup", - "fifoThroughputLimit": "perMessageGroupId", - "deliveryDelay": 10, - "redrivePolicy": { - "deadLetterQueue": { - "name": "myQueue_error" - }, - "maxReceiveCount": 15 + "allOf": [ + { + "description": "If no bindingVersion specified, use the latest binding", + "if": { + "not": { + "required": [ + "bindingVersion" + ] + } }, - "policy": { - "statements": [ - { - "effect": "Deny", - "principal": "arn:aws:iam::123456789012:user/dec.kolakowski", - "action": [ - "sqs:SendMessage", - "sqs:ReceiveMessage" - ] - } - ] + "then": { + "$ref": "#/definitions/bindings-sns-0.1.0-operation" } }, { - "name": "myQueue_error", - "deliveryDelay": 10 + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.1.0" + } + } + }, + "then": { + "$ref": "#/definitions/bindings-sns-0.1.0-operation" + } } ] - } - ] - }, - "bindings-solace-0.4.0-operation": { - "title": "Solace operation bindings object", - "description": "This object contains information about the operation representation in Solace.", - "type": "object", - "additionalProperties": false, - "properties": { - "bindingVersion": { - "type": "string", - "enum": [ - "0.4.0" - ], - "description": "The version of this binding. If omitted, \"latest\" MUST be assumed." }, - "destinations": { - "description": "The list of Solace destinations referenced in the operation.", - "type": "array", - "items": { - "type": "object", - "properties": { - "deliveryMode": { - "type": "string", - "enum": [ - "direct", - "persistent" - ] + "sqs": { + "properties": { + "bindingVersion": { + "enum": [ + "0.2.0" + ] + } + }, + "allOf": [ + { + "description": "If no bindingVersion specified, use the latest binding", + "if": { + "not": { + "required": [ + "bindingVersion" + ] + } + }, + "then": { + "$ref": "#/definitions/bindings-sqs-0.2.0-operation" } }, - "oneOf": [ - { + { + "if": { + "required": [ + "bindingVersion" + ], "properties": { - "destinationType": { - "type": "string", - "const": "queue", - "description": "If the type is queue, then the subscriber can bind to the queue. The queue subscribes to the given topicSubscriptions. If no topicSubscriptions are provied, the queue will subscribe to the topic as represented by the channel name." - }, - "queue": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "The name of the queue" - }, - "topicSubscriptions": { - "type": "array", - "description": "The list of topics that the queue subscribes to.", - "items": { - "type": "string" - } - }, - "accessType": { - "type": "string", - "enum": [ - "exclusive", - "nonexclusive" - ] - }, - "maxTtl": { - "type": "string", - "description": "The maximum TTL to apply to messages to be spooled." - }, - "maxMsgSpoolUsage": { - "type": "string", - "description": "The maximum amount of message spool that the given queue may use" - } - } + "bindingVersion": { + "const": "0.2.0" } } }, - { - "properties": { - "destinationType": { - "type": "string", - "const": "topic", - "description": "If the type is topic, then the subscriber subscribes to the given topicSubscriptions. If no topicSubscriptions are provided, the client will subscribe to the topic as represented by the channel name." - }, - "topicSubscriptions": { - "type": "array", - "description": "The list of topics that the client subscribes to.", - "items": { - "type": "string" - } - } - } + "then": { + "$ref": "#/definitions/bindings-sqs-0.2.0-operation" } - ] - } - }, - "timeToLive": { - "type": "integer", - "description": "Interval in milliseconds or a Schema Object containing the definition of the lifetime of the message." - }, - "priority": { - "type": "integer", - "minimum": 0, - "maximum": 255, - "description": "The valid priority value range is 0-255 with 0 as the lowest priority and 255 as the highest or a Schema Object containing the definition of the priority." + } + ] }, - "dmqEligible": { - "type": "boolean", - "description": "Set the message to be eligible to be moved to a Dead Message Queue. The default value is false." - } - }, - "examples": [ - { - "bindingVersion": "0.4.0", - "destinations": [ + "stomp": {}, + "redis": {}, + "ibmmq": {}, + "solace": { + "properties": { + "bindingVersion": { + "enum": [ + "0.4.0", + "0.3.0", + "0.2.0" + ] + } + }, + "allOf": [ { - "destinationType": "queue", - "queue": { - "name": "sampleQueue", - "topicSubscriptions": [ - "samples/*" - ], - "accessType": "nonexclusive" + "description": "If no bindingVersion specified, use the latest binding", + "if": { + "not": { + "required": [ + "bindingVersion" + ] + } + }, + "then": { + "$ref": "#/definitions/bindings-solace-0.4.0-operation" } }, { - "destinationType": "topic", - "topicSubscriptions": [ - "samples/*" - ] - } - ] - } - ] - }, - "bindings-solace-0.3.0-operation": { - "title": "Solace operation bindings object", - "description": "This object contains information about the operation representation in Solace.", - "type": "object", - "additionalProperties": false, - "properties": { - "destinations": { - "description": "The list of Solace destinations referenced in the operation.", - "type": "array", - "items": { - "type": "object", - "properties": { - "deliveryMode": { - "type": "string", - "enum": [ - "direct", - "persistent" - ] + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.4.0" + } + } + }, + "then": { + "$ref": "#/definitions/bindings-solace-0.4.0-operation" } }, - "oneOf": [ - { + { + "if": { + "required": [ + "bindingVersion" + ], "properties": { - "destinationType": { - "type": "string", - "const": "queue", - "description": "If the type is queue, then the subscriber can bind to the queue. The queue subscribes to the given topicSubscriptions. If no topicSubscriptions are provied, the queue will subscribe to the topic as represented by the channel name." - }, - "queue": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "The name of the queue" - }, - "topicSubscriptions": { - "type": "array", - "description": "The list of topics that the queue subscribes to.", - "items": { - "type": "string" - } - }, - "accessType": { - "type": "string", - "enum": [ - "exclusive", - "nonexclusive" - ] - }, - "maxTtl": { - "type": "string", - "description": "The maximum TTL to apply to messages to be spooled." - }, - "maxMsgSpoolUsage": { - "type": "string", - "description": "The maximum amount of message spool that the given queue may use" - } - } + "bindingVersion": { + "const": "0.3.0" } } }, - { + "then": { + "$ref": "#/definitions/bindings-solace-0.3.0-operation" + } + }, + { + "if": { + "required": [ + "bindingVersion" + ], "properties": { - "destinationType": { - "type": "string", - "const": "topic", - "description": "If the type is topic, then the subscriber subscribes to the given topicSubscriptions. If no topicSubscriptions are provided, the client will subscribe to the topic as represented by the channel name." - }, - "topicSubscriptions": { - "type": "array", - "description": "The list of topics that the client subscribes to.", - "items": { - "type": "string" - } + "bindingVersion": { + "const": "0.2.0" } } + }, + "then": { + "$ref": "#/definitions/bindings-solace-0.2.0-operation" } - ] - } + } + ] }, - "bindingVersion": { - "type": "string", - "enum": [ - "0.3.0" - ], - "description": "The version of this binding. If omitted, \"latest\" MUST be assumed." + "googlepubsub": {} + } + }, + "operationTrait": { + "type": "object", + "description": "Describes a trait that MAY be applied to an Operation Object. This object MAY contain any property from the Operation Object, except the action, channel and traits ones.", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" } }, - "examples": [ - { - "bindingVersion": "0.3.0", - "destinations": [ + "properties": { + "title": { + "$ref": "#/definitions/operation/properties/title" + }, + "summary": { + "$ref": "#/definitions/operation/properties/summary" + }, + "description": { + "$ref": "#/definitions/operation/properties/description" + }, + "security": { + "$ref": "#/definitions/operation/properties/security" + }, + "tags": { + "$ref": "#/definitions/operation/properties/tags" + }, + "externalDocs": { + "$ref": "#/definitions/operation/properties/externalDocs" + }, + "bindings": { + "description": "A map where the keys describe the name of the protocol and the values describe protocol-specific definitions for the operation.", + "oneOf": [ { - "destinationType": "queue", - "queue": { - "name": "sampleQueue", - "topicSubscriptions": [ - "samples/*" - ], - "accessType": "nonexclusive" - } + "$ref": "#/definitions/Reference" }, { - "destinationType": "topic", - "topicSubscriptions": [ - "samples/*" - ] + "$ref": "#/definitions/operationBindingsObject" } ] } + }, + "examples": [ + { + "bindings": { + "amqp": { + "ack": false + } + } + } ] }, - "bindings-solace-0.2.0-operation": { - "title": "Solace operation bindings object", - "description": "This object contains information about the operation representation in Solace.", + "operations": { "type": "object", - "additionalProperties": false, - "properties": { - "destinations": { - "description": "The list of Solace destinations referenced in the operation.", - "type": "array", - "items": { - "type": "object", - "properties": { - "deliveryMode": { - "type": "string", - "enum": [ - "direct", - "persistent" - ] - } + "description": "Holds a dictionary with all the operations this application MUST implement.", + "additionalProperties": { + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/operation" + } + ] + }, + "examples": [ + { + "onUserSignUp": { + "title": "User sign up", + "summary": "Action to sign a user up.", + "description": "A longer description", + "channel": { + "$ref": "#/channels/userSignup" }, - "oneOf": [ + "action": "send", + "tags": [ { - "properties": { - "destinationType": { - "type": "string", - "const": "queue", - "description": "If the type is queue, then the subscriber can bind to the queue. The queue subscribes to the given topicSubscriptions. If no topicSubscriptions are provied, the queue will subscribe to the topic as represented by the channel name." - }, - "queue": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "The name of the queue" - }, - "topicSubscriptions": { - "type": "array", - "description": "The list of topics that the queue subscribes to.", - "items": { - "type": "string" - } - }, - "accessType": { - "type": "string", - "enum": [ - "exclusive", - "nonexclusive" - ] - } - } - } - } + "name": "user" }, { - "properties": { - "destinationType": { - "type": "string", - "const": "topic", - "description": "If the type is topic, then the subscriber subscribes to the given topicSubscriptions. If no topicSubscriptions are provided, the client will subscribe to the topic as represented by the channel name." - }, - "topicSubscriptions": { - "type": "array", - "description": "The list of topics that the client subscribes to.", - "items": { - "type": "string" - } - } - } + "name": "signup" + }, + { + "name": "register" } - ] - } - }, - "bindingVersion": { - "type": "string", - "enum": [ - "0.2.0" - ], - "description": "The version of this binding. If omitted, \"latest\" MUST be assumed." - } - }, - "examples": [ - { - "bindingVersion": "0.2.0", - "destinations": [ - { - "destinationType": "queue", - "queue": { - "name": "sampleQueue", - "topicSubscriptions": [ - "samples/*" - ], - "accessType": "nonexclusive" + ], + "bindings": { + "amqp": { + "ack": false } }, - { - "destinationType": "topic", - "topicSubscriptions": [ - "samples/*" - ] - } - ] + "traits": [ + { + "$ref": "#/components/operationTraits/kafka" + } + ] + } } ] }, diff --git a/schemas/3.0.0.json b/schemas/3.0.0.json index 889d975f..014c46e9 100644 --- a/schemas/3.0.0.json +++ b/schemas/3.0.0.json @@ -1,6 +1,5 @@ { - "$id": "http://asyncapi.com/definitions/3.0.0/asyncapi.json", - "$schema": "http://json-schema.org/draft-07/schema", + "$schema": "http://json-schema.org/draft-07/schema#", "title": "AsyncAPI 3.0.0 schema.", "type": "object", "required": [ @@ -45,112 +44,14 @@ } }, "definitions": { - "http://asyncapi.com/definitions/3.0.0/specificationExtension.json": { - "$id": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json", + "specificationExtension.json": { + "$id": "specificationExtension.json", "description": "Any property starting with x- is valid.", "additionalProperties": true, "additionalItems": true }, - "http://asyncapi.com/definitions/3.0.0/info.json": { - "$id": "http://asyncapi.com/definitions/3.0.0/info.json", - "description": "The object provides metadata about the API. The metadata can be used by the clients if needed.", - "allOf": [ - { - "type": "object", - "required": [ - "version", - "title" - ], - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" - } - }, - "properties": { - "title": { - "type": "string", - "description": "A unique and precise title of the API." - }, - "version": { - "type": "string", - "description": "A semantic version number of the API." - }, - "description": { - "type": "string", - "description": "A longer description of the API. Should be different from the title. CommonMark is allowed." - }, - "termsOfService": { - "type": "string", - "description": "A URL to the Terms of Service for the API. MUST be in the format of a URL.", - "format": "uri" - }, - "contact": { - "$ref": "http://asyncapi.com/definitions/3.0.0/contact.json" - }, - "license": { - "$ref": "http://asyncapi.com/definitions/3.0.0/license.json" - }, - "tags": { - "type": "array", - "description": "A list of tags for application API documentation control. Tags can be used for logical grouping of applications.", - "items": { - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" - }, - { - "$ref": "http://asyncapi.com/definitions/3.0.0/tag.json" - } - ] - }, - "uniqueItems": true - }, - "externalDocs": { - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" - }, - { - "$ref": "http://asyncapi.com/definitions/3.0.0/externalDocs.json" - } - ] - } - } - }, - { - "$ref": "http://asyncapi.com/definitions/3.0.0/infoExtensions.json" - } - ], - "examples": [ - { - "title": "AsyncAPI Sample App", - "version": "1.0.1", - "description": "This is a sample app.", - "termsOfService": "https://asyncapi.org/terms/", - "contact": { - "name": "API Support", - "url": "https://www.asyncapi.org/support", - "email": "support@asyncapi.org" - }, - "license": { - "name": "Apache 2.0", - "url": "https://www.apache.org/licenses/LICENSE-2.0.html" - }, - "externalDocs": { - "description": "Find more info here", - "url": "https://www.asyncapi.org" - }, - "tags": [ - { - "name": "e-commerce" - } - ] - } - ] - }, - "http://asyncapi.com/definitions/3.0.0/contact.json": { - "$id": "http://asyncapi.com/definitions/3.0.0/contact.json", + "contact.json": { + "$id": "contact.json", "type": "object", "description": "Contact information for the exposed API.", "additionalProperties": false, @@ -183,8 +84,8 @@ } ] }, - "http://asyncapi.com/definitions/3.0.0/license.json": { - "$id": "http://asyncapi.com/definitions/3.0.0/license.json", + "license.json": { + "$id": "license.json", "type": "object", "required": [ "name" @@ -213,8 +114,13 @@ } ] }, - "http://asyncapi.com/definitions/3.0.0/Reference.json": { - "$id": "http://asyncapi.com/definitions/3.0.0/Reference.json", + "ReferenceObject.json": { + "$id": "ReferenceObject.json", + "type": "string", + "format": "uri-reference" + }, + "Reference.json": { + "$id": "Reference.json", "type": "object", "description": "A simple object to allow referencing other components in the specification, internally and externally.", "required": [ @@ -222,7 +128,6 @@ ], "properties": { "$ref": { - "description": "The reference string.", "$ref": "http://asyncapi.com/definitions/3.0.0/ReferenceObject.json" } }, @@ -232,37 +137,23 @@ } ] }, - "http://asyncapi.com/definitions/3.0.0/ReferenceObject.json": { - "$id": "http://asyncapi.com/definitions/3.0.0/ReferenceObject.json", - "type": "string", - "format": "uri-reference" - }, - "http://asyncapi.com/definitions/3.0.0/tag.json": { - "$id": "http://asyncapi.com/definitions/3.0.0/tag.json", + "externalDocs.json": { + "$id": "externalDocs.json", "type": "object", - "description": "Allows adding metadata to a single tag.", "additionalProperties": false, + "description": "Allows referencing an external resource for extended documentation.", "required": [ - "name" + "url" ], "properties": { - "name": { - "type": "string", - "description": "The name of the tag." - }, "description": { "type": "string", - "description": "A short description for the tag. CommonMark syntax can be used for rich text representation." + "description": "A short description of the target documentation. CommonMark syntax can be used for rich text representation." }, - "externalDocs": { - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" - }, - { - "$ref": "http://asyncapi.com/definitions/3.0.0/externalDocs.json" - } - ] + "url": { + "type": "string", + "description": "The URL for the target documentation. This MUST be in the form of an absolute URL.", + "format": "uri" } }, "patternProperties": { @@ -272,28 +163,37 @@ }, "examples": [ { - "name": "user", - "description": "User-related messages" + "description": "Find more info here", + "url": "https://example.com" } ] }, - "http://asyncapi.com/definitions/3.0.0/externalDocs.json": { - "$id": "http://asyncapi.com/definitions/3.0.0/externalDocs.json", + "tag.json": { + "$id": "tag.json", "type": "object", + "description": "Allows adding metadata to a single tag.", "additionalProperties": false, - "description": "Allows referencing an external resource for extended documentation.", "required": [ - "url" + "name" ], "properties": { - "description": { + "name": { "type": "string", - "description": "A short description of the target documentation. CommonMark syntax can be used for rich text representation." + "description": "The name of the tag." }, - "url": { + "description": { "type": "string", - "description": "The URL for the target documentation. This MUST be in the form of an absolute URL.", - "format": "uri" + "description": "A short description for the tag. CommonMark syntax can be used for rich text representation." + }, + "externalDocs": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/externalDocs.json" + } + ] } }, "patternProperties": { @@ -303,26 +203,13 @@ }, "examples": [ { - "description": "Find more info here", - "url": "https://example.com" + "name": "user", + "description": "User-related messages" } ] }, - "http://asyncapi.com/definitions/3.0.0/infoExtensions.json": { - "$id": "http://asyncapi.com/definitions/3.0.0/infoExtensions.json", - "type": "object", - "description": "The object that lists all the extensions of Info", - "properties": { - "x-x": { - "$ref": "http://asyncapi.com/extensions/x/0.1.0/schema.json" - }, - "x-linkedin": { - "$ref": "http://asyncapi.com/extensions/linkedin/0.1.0/schema.json" - } - } - }, - "http://asyncapi.com/extensions/x/0.1.0/schema.json": { - "$id": "http://asyncapi.com/extensions/x/0.1.0/schema.json", + "../../extensions/x/0.1.0/schema.json": { + "$id": "../../extensions/x/0.1.0/schema.json", "type": "string", "description": "This extension allows you to provide the Twitter username of the account representing the team/company of the API.", "example": [ @@ -330,8 +217,8 @@ "AsyncAPISpec" ] }, - "http://asyncapi.com/extensions/linkedin/0.1.0/schema.json": { - "$id": "http://asyncapi.com/extensions/linkedin/0.1.0/schema.json", + "../../extensions/linkedin/0.1.0/schema.json": { + "$id": "../../extensions/linkedin/0.1.0/schema.json", "type": "string", "pattern": "^http(s)?://(www\\.)?linkedin\\.com.*$", "description": "This extension allows you to provide the Linkedin profile URL of the account representing the team/company of the API.", @@ -340,176 +227,119 @@ "https://www.linkedin.com/in/sambhavgupta0705/" ] }, - "http://asyncapi.com/definitions/3.0.0/servers.json": { - "$id": "http://asyncapi.com/definitions/3.0.0/servers.json", - "description": "An object representing multiple servers.", + "infoExtensions.json": { + "$id": "infoExtensions.json", "type": "object", - "additionalProperties": { - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + "description": "The object that lists all the extensions of Info", + "properties": { + "x-x": { + "$ref": "http://asyncapi.com/extensions/x/0.1.0/schema.json" + }, + "x-linkedin": { + "$ref": "http://asyncapi.com/extensions/linkedin/0.1.0/schema.json" + } + } + }, + "info.json": { + "$id": "info.json", + "description": "The object provides metadata about the API. The metadata can be used by the clients if needed.", + "allOf": [ + { + "type": "object", + "required": [ + "version", + "title" + ], + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } }, - { - "$ref": "http://asyncapi.com/definitions/3.0.0/server.json" + "properties": { + "title": { + "type": "string", + "description": "A unique and precise title of the API." + }, + "version": { + "type": "string", + "description": "A semantic version number of the API." + }, + "description": { + "type": "string", + "description": "A longer description of the API. Should be different from the title. CommonMark is allowed." + }, + "termsOfService": { + "type": "string", + "description": "A URL to the Terms of Service for the API. MUST be in the format of a URL.", + "format": "uri" + }, + "contact": { + "$ref": "http://asyncapi.com/definitions/3.0.0/contact.json" + }, + "license": { + "$ref": "http://asyncapi.com/definitions/3.0.0/license.json" + }, + "tags": { + "type": "array", + "description": "A list of tags for application API documentation control. Tags can be used for logical grouping of applications.", + "items": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/tag.json" + } + ] + }, + "uniqueItems": true + }, + "externalDocs": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/externalDocs.json" + } + ] + } } - ] - }, + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/infoExtensions.json" + } + ], "examples": [ { - "development": { - "host": "localhost:5672", - "description": "Development AMQP broker.", - "protocol": "amqp", - "protocolVersion": "0-9-1", - "tags": [ - { - "name": "env:development", - "description": "This environment is meant for developers to run their own tests." - } - ] + "title": "AsyncAPI Sample App", + "version": "1.0.1", + "description": "This is a sample app.", + "termsOfService": "https://asyncapi.org/terms/", + "contact": { + "name": "API Support", + "url": "https://www.asyncapi.org/support", + "email": "support@asyncapi.org" }, - "staging": { - "host": "rabbitmq-staging.in.mycompany.com:5672", - "description": "RabbitMQ broker for the staging environment.", - "protocol": "amqp", - "protocolVersion": "0-9-1", - "tags": [ - { - "name": "env:staging", - "description": "This environment is a replica of the production environment." - } - ] + "license": { + "name": "Apache 2.0", + "url": "https://www.apache.org/licenses/LICENSE-2.0.html" }, - "production": { - "host": "rabbitmq.in.mycompany.com:5672", - "description": "RabbitMQ broker for the production environment.", - "protocol": "amqp", - "protocolVersion": "0-9-1", - "tags": [ - { - "name": "env:production", - "description": "This environment is the live environment available for final users." - } - ] - } - } - ] - }, - "http://asyncapi.com/definitions/3.0.0/server.json": { - "$id": "http://asyncapi.com/definitions/3.0.0/server.json", - "type": "object", - "description": "An object representing a message broker, a server or any other kind of computer program capable of sending and/or receiving data.", - "required": [ - "host", - "protocol" - ], - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" - } - }, - "properties": { - "host": { - "type": "string", - "description": "The server host name. It MAY include the port. This field supports Server Variables. Variable substitutions will be made when a variable is named in {braces}." - }, - "pathname": { - "type": "string", - "description": "The path to a resource in the host. This field supports Server Variables. Variable substitutions will be made when a variable is named in {braces}." - }, - "title": { - "type": "string", - "description": "A human-friendly title for the server." - }, - "summary": { - "type": "string", - "description": "A brief summary of the server." - }, - "description": { - "type": "string", - "description": "A longer description of the server. CommonMark is allowed." - }, - "protocol": { - "type": "string", - "description": "The protocol this server supports for connection." - }, - "protocolVersion": { - "type": "string", - "description": "An optional string describing the server. CommonMark syntax MAY be used for rich text representation." - }, - "variables": { - "$ref": "http://asyncapi.com/definitions/3.0.0/serverVariables.json" - }, - "security": { - "$ref": "http://asyncapi.com/definitions/3.0.0/securityRequirements.json" - }, - "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" - } - ] + "externalDocs": { + "description": "Find more info here", + "url": "https://www.asyncapi.org" }, - "uniqueItems": true - }, - "externalDocs": { - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" - }, - { - "$ref": "http://asyncapi.com/definitions/3.0.0/externalDocs.json" - } - ] - }, - "bindings": { - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" - }, + "tags": [ { - "$ref": "http://asyncapi.com/definitions/3.0.0/serverBindingsObject.json" + "name": "e-commerce" } ] } - }, - "examples": [ - { - "host": "kafka.in.mycompany.com:9092", - "description": "Production Kafka broker.", - "protocol": "kafka", - "protocolVersion": "3.2" - }, - { - "host": "rabbitmq.in.mycompany.com:5672", - "pathname": "/production", - "protocol": "amqp", - "description": "Production RabbitMQ broker (uses the `production` vhost)." - } ] }, - "http://asyncapi.com/definitions/3.0.0/serverVariables.json": { - "$id": "http://asyncapi.com/definitions/3.0.0/serverVariables.json", - "type": "object", - "additionalProperties": { - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" - }, - { - "$ref": "http://asyncapi.com/definitions/3.0.0/serverVariable.json" - } - ] - } - }, - "http://asyncapi.com/definitions/3.0.0/serverVariable.json": { - "$id": "http://asyncapi.com/definitions/3.0.0/serverVariable.json", + "serverVariable.json": { + "$id": "serverVariable.json", "type": "object", "description": "An object representing a Server Variable for server URL template substitution.", "additionalProperties": false, @@ -561,61 +391,22 @@ } ] }, - "http://asyncapi.com/definitions/3.0.0/securityRequirements.json": { - "$id": "http://asyncapi.com/definitions/3.0.0/securityRequirements.json", - "description": "An array representing security requirements.", - "type": "array", - "items": { + "serverVariables.json": { + "$id": "serverVariables.json", + "type": "object", + "additionalProperties": { "oneOf": [ { "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" }, { - "$ref": "http://asyncapi.com/definitions/3.0.0/SecurityScheme.json" + "$ref": "http://asyncapi.com/definitions/3.0.0/serverVariable.json" } ] } }, - "http://asyncapi.com/definitions/3.0.0/SecurityScheme.json": { - "$id": "http://asyncapi.com/definitions/3.0.0/SecurityScheme.json", - "description": "Defines a security scheme that can be used by the operations.", - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/3.0.0/userPassword.json" - }, - { - "$ref": "http://asyncapi.com/definitions/3.0.0/apiKey.json" - }, - { - "$ref": "http://asyncapi.com/definitions/3.0.0/X509.json" - }, - { - "$ref": "http://asyncapi.com/definitions/3.0.0/symmetricEncryption.json" - }, - { - "$ref": "http://asyncapi.com/definitions/3.0.0/asymmetricEncryption.json" - }, - { - "$ref": "http://asyncapi.com/definitions/3.0.0/HTTPSecurityScheme.json" - }, - { - "$ref": "http://asyncapi.com/definitions/3.0.0/oauth2Flows.json" - }, - { - "$ref": "http://asyncapi.com/definitions/3.0.0/openIdConnect.json" - }, - { - "$ref": "http://asyncapi.com/definitions/3.0.0/SaslSecurityScheme.json" - } - ], - "examples": [ - { - "type": "userPassword" - } - ] - }, - "http://asyncapi.com/definitions/3.0.0/userPassword.json": { - "$id": "http://asyncapi.com/definitions/3.0.0/userPassword.json", + "userPassword.json": { + "$id": "userPassword.json", "type": "object", "required": [ "type" @@ -643,8 +434,8 @@ } ] }, - "http://asyncapi.com/definitions/3.0.0/apiKey.json": { - "$id": "http://asyncapi.com/definitions/3.0.0/apiKey.json", + "apiKey.json": { + "$id": "apiKey.json", "type": "object", "required": [ "type", @@ -684,8 +475,8 @@ } ] }, - "http://asyncapi.com/definitions/3.0.0/X509.json": { - "$id": "http://asyncapi.com/definitions/3.0.0/X509.json", + "X509.json": { + "$id": "X509.json", "type": "object", "required": [ "type" @@ -713,8 +504,8 @@ } ] }, - "http://asyncapi.com/definitions/3.0.0/symmetricEncryption.json": { - "$id": "http://asyncapi.com/definitions/3.0.0/symmetricEncryption.json", + "symmetricEncryption.json": { + "$id": "symmetricEncryption.json", "type": "object", "required": [ "type" @@ -742,8 +533,8 @@ } ] }, - "http://asyncapi.com/definitions/3.0.0/asymmetricEncryption.json": { - "$id": "http://asyncapi.com/definitions/3.0.0/asymmetricEncryption.json", + "asymmetricEncryption.json": { + "$id": "asymmetricEncryption.json", "type": "object", "required": [ "type" @@ -768,22 +559,8 @@ }, "additionalProperties": false }, - "http://asyncapi.com/definitions/3.0.0/HTTPSecurityScheme.json": { - "$id": "http://asyncapi.com/definitions/3.0.0/HTTPSecurityScheme.json", - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/3.0.0/NonBearerHTTPSecurityScheme.json" - }, - { - "$ref": "http://asyncapi.com/definitions/3.0.0/BearerHTTPSecurityScheme.json" - }, - { - "$ref": "http://asyncapi.com/definitions/3.0.0/APIKeyHTTPSecurityScheme.json" - } - ] - }, - "http://asyncapi.com/definitions/3.0.0/NonBearerHTTPSecurityScheme.json": { - "$id": "http://asyncapi.com/definitions/3.0.0/NonBearerHTTPSecurityScheme.json", + "NonBearerHTTPSecurityScheme.json": { + "$id": "NonBearerHTTPSecurityScheme.json", "not": { "type": "object", "properties": { @@ -825,8 +602,8 @@ }, "additionalProperties": false }, - "http://asyncapi.com/definitions/3.0.0/BearerHTTPSecurityScheme.json": { - "$id": "http://asyncapi.com/definitions/3.0.0/BearerHTTPSecurityScheme.json", + "BearerHTTPSecurityScheme.json": { + "$id": "BearerHTTPSecurityScheme.json", "type": "object", "required": [ "type", @@ -863,8 +640,8 @@ }, "additionalProperties": false }, - "http://asyncapi.com/definitions/3.0.0/APIKeyHTTPSecurityScheme.json": { - "$id": "http://asyncapi.com/definitions/3.0.0/APIKeyHTTPSecurityScheme.json", + "APIKeyHTTPSecurityScheme.json": { + "$id": "APIKeyHTTPSecurityScheme.json", "type": "object", "required": [ "type", @@ -911,38 +688,100 @@ } ] }, - "http://asyncapi.com/definitions/3.0.0/oauth2Flows.json": { - "$id": "http://asyncapi.com/definitions/3.0.0/oauth2Flows.json", + "HTTPSecurityScheme.json": { + "$id": "HTTPSecurityScheme.json", + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/NonBearerHTTPSecurityScheme.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/BearerHTTPSecurityScheme.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/APIKeyHTTPSecurityScheme.json" + } + ] + }, + "oauth2Scopes.json": { + "$id": "oauth2Scopes.json", "type": "object", - "description": "Allows configuration of the supported OAuth Flows.", - "required": [ - "type", - "flows" - ], + "additionalProperties": { + "type": "string" + } + }, + "oauth2Flow.json": { + "$id": "oauth2Flow.json", + "type": "object", + "description": "Configuration details for a supported OAuth Flow", "properties": { - "type": { + "authorizationUrl": { "type": "string", - "description": "The type of the security scheme.", - "enum": [ - "oauth2" - ] + "format": "uri", + "description": "The authorization URL to be used for this flow. This MUST be in the form of an absolute URL." }, - "description": { + "tokenUrl": { "type": "string", - "description": "A short description for security scheme." + "format": "uri", + "description": "The token URL to be used for this flow. This MUST be in the form of an absolute URL." }, - "flows": { - "type": "object", - "properties": { - "implicit": { - "description": "Configuration for the OAuth Implicit flow.", - "allOf": [ - { - "$ref": "http://asyncapi.com/definitions/3.0.0/oauth2Flow.json" - }, - { - "required": [ - "authorizationUrl", + "refreshUrl": { + "type": "string", + "format": "uri", + "description": "The URL to be used for obtaining refresh tokens. This MUST be in the form of an absolute URL." + }, + "availableScopes": { + "$ref": "http://asyncapi.com/definitions/3.0.0/oauth2Scopes.json" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "additionalProperties": false, + "examples": [ + { + "authorizationUrl": "https://example.com/api/oauth/dialog", + "tokenUrl": "https://example.com/api/oauth/token", + "availableScopes": { + "write:pets": "modify pets in your account", + "read:pets": "read your pets" + } + } + ] + }, + "oauth2Flows.json": { + "$id": "oauth2Flows.json", + "type": "object", + "description": "Allows configuration of the supported OAuth Flows.", + "required": [ + "type", + "flows" + ], + "properties": { + "type": { + "type": "string", + "description": "The type of the security scheme.", + "enum": [ + "oauth2" + ] + }, + "description": { + "type": "string", + "description": "A short description for security scheme." + }, + "flows": { + "type": "object", + "properties": { + "implicit": { + "description": "Configuration for the OAuth Implicit flow.", + "allOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/oauth2Flow.json" + }, + { + "required": [ + "authorizationUrl", "availableScopes" ] }, @@ -1029,57 +868,8 @@ } } }, - "http://asyncapi.com/definitions/3.0.0/oauth2Flow.json": { - "$id": "http://asyncapi.com/definitions/3.0.0/oauth2Flow.json", - "type": "object", - "description": "Configuration details for a supported OAuth Flow", - "properties": { - "authorizationUrl": { - "type": "string", - "format": "uri", - "description": "The authorization URL to be used for this flow. This MUST be in the form of an absolute URL." - }, - "tokenUrl": { - "type": "string", - "format": "uri", - "description": "The token URL to be used for this flow. This MUST be in the form of an absolute URL." - }, - "refreshUrl": { - "type": "string", - "format": "uri", - "description": "The URL to be used for obtaining refresh tokens. This MUST be in the form of an absolute URL." - }, - "availableScopes": { - "$ref": "http://asyncapi.com/definitions/3.0.0/oauth2Scopes.json", - "description": "The available scopes for the OAuth2 security scheme. A map between the scope name and a short description for it." - } - }, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" - } - }, - "additionalProperties": false, - "examples": [ - { - "authorizationUrl": "https://example.com/api/oauth/dialog", - "tokenUrl": "https://example.com/api/oauth/token", - "availableScopes": { - "write:pets": "modify pets in your account", - "read:pets": "read your pets" - } - } - ] - }, - "http://asyncapi.com/definitions/3.0.0/oauth2Scopes.json": { - "$id": "http://asyncapi.com/definitions/3.0.0/oauth2Scopes.json", - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "http://asyncapi.com/definitions/3.0.0/openIdConnect.json": { - "$id": "http://asyncapi.com/definitions/3.0.0/openIdConnect.json", + "openIdConnect.json": { + "$id": "openIdConnect.json", "type": "object", "required": [ "type", @@ -1117,22 +907,8 @@ }, "additionalProperties": false }, - "http://asyncapi.com/definitions/3.0.0/SaslSecurityScheme.json": { - "$id": "http://asyncapi.com/definitions/3.0.0/SaslSecurityScheme.json", - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/3.0.0/SaslPlainSecurityScheme.json" - }, - { - "$ref": "http://asyncapi.com/definitions/3.0.0/SaslScramSecurityScheme.json" - }, - { - "$ref": "http://asyncapi.com/definitions/3.0.0/SaslGssapiSecurityScheme.json" - } - ] - }, - "http://asyncapi.com/definitions/3.0.0/SaslPlainSecurityScheme.json": { - "$id": "http://asyncapi.com/definitions/3.0.0/SaslPlainSecurityScheme.json", + "SaslPlainSecurityScheme.json": { + "$id": "SaslPlainSecurityScheme.json", "type": "object", "required": [ "type" @@ -1162,8 +938,8 @@ } ] }, - "http://asyncapi.com/definitions/3.0.0/SaslScramSecurityScheme.json": { - "$id": "http://asyncapi.com/definitions/3.0.0/SaslScramSecurityScheme.json", + "SaslScramSecurityScheme.json": { + "$id": "SaslScramSecurityScheme.json", "type": "object", "required": [ "type" @@ -1194,8 +970,8 @@ } ] }, - "http://asyncapi.com/definitions/3.0.0/SaslGssapiSecurityScheme.json": { - "$id": "http://asyncapi.com/definitions/3.0.0/SaslGssapiSecurityScheme.json", + "SaslGssapiSecurityScheme.json": { + "$id": "SaslGssapiSecurityScheme.json", "type": "object", "required": [ "type" @@ -1225,330 +1001,426 @@ } ] }, - "http://asyncapi.com/definitions/3.0.0/serverBindingsObject.json": { - "$id": "http://asyncapi.com/definitions/3.0.0/serverBindingsObject.json", - "type": "object", - "description": "Map describing protocol-specific definitions for a server.", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + "SaslSecurityScheme.json": { + "$id": "SaslSecurityScheme.json", + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/SaslPlainSecurityScheme.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/SaslScramSecurityScheme.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/SaslGssapiSecurityScheme.json" } - }, - "properties": { - "http": {}, - "ws": {}, - "amqp": {}, - "amqp1": {}, - "mqtt": { - "properties": { - "bindingVersion": { - "enum": [ - "0.2.0" - ] - } + ] + }, + "SecurityScheme.json": { + "$id": "SecurityScheme.json", + "description": "Defines a security scheme that can be used by the operations.", + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/userPassword.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/apiKey.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/X509.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/symmetricEncryption.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/asymmetricEncryption.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/HTTPSecurityScheme.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/oauth2Flows.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/openIdConnect.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/SaslSecurityScheme.json" + } + ], + "examples": [ + { + "type": "userPassword" + } + ] + }, + "securityRequirements.json": { + "$id": "securityRequirements.json", + "description": "An array representing security requirements.", + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/SecurityScheme.json" + } + ] + } + }, + "http://json-schema.org/draft-07/schema": { + "$id": "http://json-schema.org/draft-07/schema", + "title": "Core schema meta-schema", + "definitions": { + "schemaArray": { + "type": "array", + "minItems": 1, + "items": { + "$ref": "#" + } + }, + "nonNegativeInteger": { + "type": "integer", + "minimum": 0 + }, + "nonNegativeIntegerDefault0": { "allOf": [ { - "description": "If no bindingVersion specified, use the latest binding", - "if": { - "not": { - "required": [ - "bindingVersion" - ] - } - }, - "then": { - "$ref": "http://asyncapi.com/bindings/mqtt/0.2.0/server.json" - } + "$ref": "#/definitions/nonNegativeInteger" }, { - "if": { - "required": [ - "bindingVersion" - ], - "properties": { - "bindingVersion": { - "const": "0.2.0" - } - } - }, - "then": { - "$ref": "http://asyncapi.com/bindings/mqtt/0.2.0/server.json" - } + "default": 0 } ] }, - "kafka": { - "properties": { - "bindingVersion": { - "enum": [ - "0.5.0", - "0.4.0", - "0.3.0" - ] - } + "simpleTypes": { + "enum": [ + "array", + "boolean", + "integer", + "null", + "number", + "object", + "string" + ] + }, + "stringArray": { + "type": "array", + "items": { + "type": "string" }, - "allOf": [ - { - "description": "If no bindingVersion specified, use the latest binding", - "if": { - "not": { - "required": [ - "bindingVersion" - ] - } - }, - "then": { - "$ref": "http://asyncapi.com/bindings/kafka/0.5.0/server.json" - } - }, - { - "if": { - "required": [ - "bindingVersion" - ], - "properties": { - "bindingVersion": { - "const": "0.5.0" - } - } - }, - "then": { - "$ref": "http://asyncapi.com/bindings/kafka/0.5.0/server.json" - } - }, + "uniqueItems": true, + "default": [] + } + }, + "type": [ + "object", + "boolean" + ], + "properties": { + "$id": { + "type": "string", + "format": "uri-reference" + }, + "$schema": { + "type": "string", + "format": "uri" + }, + "$ref": { + "type": "string", + "format": "uri-reference" + }, + "$comment": { + "type": "string" + }, + "title": { + "type": "string" + }, + "description": { + "type": "string" + }, + "default": true, + "readOnly": { + "type": "boolean", + "default": false + }, + "writeOnly": { + "type": "boolean", + "default": false + }, + "examples": { + "type": "array", + "items": true + }, + "multipleOf": { + "type": "number", + "exclusiveMinimum": 0 + }, + "maximum": { + "type": "number" + }, + "exclusiveMaximum": { + "type": "number" + }, + "minimum": { + "type": "number" + }, + "exclusiveMinimum": { + "type": "number" + }, + "maxLength": { + "$ref": "#/definitions/nonNegativeInteger" + }, + "minLength": { + "$ref": "#/definitions/nonNegativeIntegerDefault0" + }, + "pattern": { + "type": "string", + "format": "regex" + }, + "additionalItems": { + "$ref": "#" + }, + "items": { + "anyOf": [ { - "if": { - "required": [ - "bindingVersion" - ], - "properties": { - "bindingVersion": { - "const": "0.4.0" - } - } - }, - "then": { - "$ref": "http://asyncapi.com/bindings/kafka/0.4.0/server.json" - } + "$ref": "#" }, { - "if": { - "required": [ - "bindingVersion" - ], - "properties": { - "bindingVersion": { - "const": "0.3.0" - } - } - }, - "then": { - "$ref": "http://asyncapi.com/bindings/kafka/0.3.0/server.json" - } + "$ref": "#/definitions/schemaArray" } - ] + ], + "default": true }, - "anypointmq": {}, - "nats": {}, - "jms": { - "properties": { - "bindingVersion": { - "enum": [ - "0.0.1" - ] - } + "maxItems": { + "$ref": "#/definitions/nonNegativeInteger" + }, + "minItems": { + "$ref": "#/definitions/nonNegativeIntegerDefault0" + }, + "uniqueItems": { + "type": "boolean", + "default": false + }, + "contains": { + "$ref": "#" + }, + "maxProperties": { + "$ref": "#/definitions/nonNegativeInteger" + }, + "minProperties": { + "$ref": "#/definitions/nonNegativeIntegerDefault0" + }, + "required": { + "$ref": "#/definitions/stringArray" + }, + "additionalProperties": { + "$ref": "#" + }, + "definitions": { + "type": "object", + "additionalProperties": { + "$ref": "#" }, - "allOf": [ - { - "description": "If no bindingVersion specified, use the latest binding", - "if": { - "not": { - "required": [ - "bindingVersion" - ] - } + "default": {} + }, + "properties": { + "type": "object", + "additionalProperties": { + "$ref": "#" + }, + "default": {} + }, + "patternProperties": { + "type": "object", + "additionalProperties": { + "$ref": "#" + }, + "propertyNames": { + "format": "regex" + }, + "default": {} + }, + "dependencies": { + "type": "object", + "additionalProperties": { + "anyOf": [ + { + "$ref": "#" }, - "then": { - "$ref": "http://asyncapi.com/bindings/jms/0.0.1/server.json" + { + "$ref": "#/definitions/stringArray" } + ] + } + }, + "propertyNames": { + "$ref": "#" + }, + "const": true, + "enum": { + "type": "array", + "items": true, + "minItems": 1, + "uniqueItems": true + }, + "type": { + "anyOf": [ + { + "$ref": "#/definitions/simpleTypes" }, { - "if": { - "required": [ - "bindingVersion" - ], - "properties": { - "bindingVersion": { - "const": "0.0.1" - } - } + "type": "array", + "items": { + "$ref": "#/definitions/simpleTypes" }, - "then": { - "$ref": "http://asyncapi.com/bindings/jms/0.0.1/server.json" - } + "minItems": 1, + "uniqueItems": true } ] }, - "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" - ] - } - }, - "then": { - "$ref": "http://asyncapi.com/bindings/ibmmq/0.1.0/server.json" - } - }, - { - "if": { - "required": [ - "bindingVersion" - ], - "properties": { - "bindingVersion": { - "const": "0.1.0" - } - } - }, - "then": { - "$ref": "http://asyncapi.com/bindings/ibmmq/0.1.0/server.json" - } - } - ] + "format": { + "type": "string" }, - "solace": { - "properties": { - "bindingVersion": { - "enum": [ - "0.4.0", - "0.3.0", - "0.2.0" - ] + "contentMediaType": { + "type": "string" + }, + "contentEncoding": { + "type": "string" + }, + "if": { + "$ref": "#" + }, + "then": { + "$ref": "#" + }, + "else": { + "$ref": "#" + }, + "allOf": { + "$ref": "#/definitions/schemaArray" + }, + "anyOf": { + "$ref": "#/definitions/schemaArray" + }, + "oneOf": { + "$ref": "#/definitions/schemaArray" + }, + "not": { + "$ref": "#" + } + }, + "default": true + }, + "schema.json": { + "$id": "schema.json", + "description": "The Schema Object allows the definition of input and output data types. These types can be objects, but also primitives and arrays. This object is a superset of the JSON Schema Specification Draft 07. The empty schema (which allows any instance to validate) MAY be represented by the boolean value true and a schema which allows no instance to validate MAY be represented by the boolean value false.", + "allOf": [ + { + "$ref": "http://json-schema.org/draft-07/schema#" + }, + { + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" } }, - "allOf": [ - { - "description": "If no bindingVersion specified, use the latest binding", - "if": { - "not": { - "required": [ - "bindingVersion" - ] + "properties": { + "additionalProperties": { + "anyOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" + }, + { + "type": "boolean" } - }, - "then": { - "$ref": "http://asyncapi.com/bindings/solace/0.4.0/server.json" - } + ], + "default": {} }, - { - "if": { - "required": [ - "bindingVersion" - ], - "properties": { - "bindingVersion": { - "const": "0.4.0" + "items": { + "anyOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" + }, + { + "type": "array", + "minItems": 1, + "items": { + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" } } - }, - "then": { - "$ref": "http://asyncapi.com/bindings/solace/0.4.0/server.json" + ], + "default": {} + }, + "allOf": { + "type": "array", + "minItems": 1, + "items": { + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" } }, - { - "if": { - "required": [ - "bindingVersion" - ], - "properties": { - "bindingVersion": { - "const": "0.3.0" - } - } - }, - "then": { - "$ref": "http://asyncapi.com/bindings/solace/0.3.0/server.json" + "oneOf": { + "type": "array", + "minItems": 1, + "items": { + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" } }, - { - "if": { - "required": [ - "bindingVersion" - ], - "properties": { - "bindingVersion": { - "const": "0.2.0" - } - } - }, - "then": { - "$ref": "http://asyncapi.com/bindings/solace/0.2.0/server.json" + "anyOf": { + "type": "array", + "minItems": 1, + "items": { + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" } - } - ] - }, - "googlepubsub": {}, - "pulsar": { - "properties": { - "bindingVersion": { - "enum": [ - "0.1.0" - ] - } - }, - "allOf": [ - { - "description": "If no bindingVersion specified, use the latest binding", - "if": { - "not": { - "required": [ - "bindingVersion" - ] - } + }, + "not": { + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" + }, + "properties": { + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" }, - "then": { - "$ref": "http://asyncapi.com/bindings/pulsar/0.1.0/server.json" - } + "default": {} }, - { - "if": { - "required": [ - "bindingVersion" - ], - "properties": { - "bindingVersion": { - "const": "0.1.0" - } - } + "patternProperties": { + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" }, - "then": { - "$ref": "http://asyncapi.com/bindings/pulsar/0.1.0/server.json" - } + "default": {} + }, + "propertyNames": { + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" + }, + "contains": { + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" + }, + "discriminator": { + "type": "string", + "description": "Adds support for polymorphism. The discriminator is the schema property name that is used to differentiate between other schema that inherit this schema. The property name used MUST be defined at this schema and it MUST be in the required property list. When used, the value MUST be the name of this schema or any schema that inherits it. See Composition and Inheritance for more details." + }, + "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", + "description": "Specifies that a schema is deprecated and SHOULD be transitioned out of usage. Default value is false.", + "default": false } - ] + } } - } + ] }, - "http://asyncapi.com/bindings/mqtt/0.2.0/server.json": { - "$id": "http://asyncapi.com/bindings/mqtt/0.2.0/server.json", + "../../bindings/mqtt/0.2.0/server.json": { + "$id": "../../bindings/mqtt/0.2.0/server.json", "title": "Server Schema", "description": "This object contains information about the server representation in MQTT.", "type": "object", @@ -1654,361 +1526,194 @@ } ] }, - "http://asyncapi.com/definitions/3.0.0/schema.json": { - "$id": "http://asyncapi.com/definitions/3.0.0/schema.json", - "description": "The Schema Object allows the definition of input and output data types. These types can be objects, but also primitives and arrays. This object is a superset of the JSON Schema Specification Draft 07. The empty schema (which allows any instance to validate) MAY be represented by the boolean value true and a schema which allows no instance to validate MAY be represented by the boolean value false.", - "allOf": [ - { - "$ref": "http://json-schema.org/draft-07/schema#" - }, - { - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" - } - }, - "properties": { - "additionalProperties": { - "anyOf": [ - { - "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" - }, - { - "type": "boolean" - } - ], - "default": {} - }, - "items": { - "anyOf": [ - { - "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" - }, - { - "type": "array", - "minItems": 1, - "items": { - "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" - } - } - ], - "default": {} - }, - "allOf": { - "type": "array", - "minItems": 1, - "items": { - "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" - } - }, - "oneOf": { - "type": "array", - "minItems": 1, - "items": { - "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" - } - }, - "anyOf": { - "type": "array", - "minItems": 1, - "items": { - "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" - } - }, - "not": { - "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" - }, - "properties": { - "type": "object", - "additionalProperties": { - "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" - }, - "default": {} - }, - "patternProperties": { - "type": "object", - "additionalProperties": { - "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" - }, - "default": {} - }, - "propertyNames": { - "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" - }, - "contains": { - "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" - }, - "discriminator": { - "type": "string", - "description": "Adds support for polymorphism. The discriminator is the schema property name that is used to differentiate between other schema that inherit this schema. The property name used MUST be defined at this schema and it MUST be in the required property list. When used, the value MUST be the name of this schema or any schema that inherits it. See Composition and Inheritance for more details." - }, - "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", - "description": "Specifies that a schema is deprecated and SHOULD be transitioned out of usage. Default value is false.", - "default": false - } - } + "../../bindings/kafka/0.5.0/server.json": { + "$id": "../../bindings/kafka/0.5.0/server.json", + "title": "Server Schema", + "description": "This object contains server connection information to a Kafka broker. This object contains additional information not possible to represent within the core AsyncAPI specification.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "properties": { + "schemaRegistryUrl": { + "type": "string", + "description": "API URL for the Schema Registry used when producing Kafka messages (if a Schema Registry was used)." + }, + "schemaRegistryVendor": { + "type": "string", + "description": "The vendor of the Schema Registry and Kafka serdes library that should be used." + }, + "bindingVersion": { + "type": "string", + "enum": [ + "0.5.0" + ], + "description": "The version of this binding." + } + }, + "examples": [ + { + "schemaRegistryUrl": "https://my-schema-registry.com", + "schemaRegistryVendor": "confluent", + "bindingVersion": "0.5.0" } ] }, - "http://json-schema.org/draft-07/schema": { - "$id": "http://json-schema.org/draft-07/schema", - "title": "Core schema meta-schema", - "definitions": { - "schemaArray": { - "type": "array", - "minItems": 1, - "items": { - "$ref": "#" - } - }, - "nonNegativeInteger": { - "type": "integer", - "minimum": 0 + "../../bindings/kafka/0.4.0/server.json": { + "$id": "../../bindings/kafka/0.4.0/server.json", + "title": "Server Schema", + "description": "This object contains server connection information to a Kafka broker. This object contains additional information not possible to represent within the core AsyncAPI specification.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "properties": { + "schemaRegistryUrl": { + "type": "string", + "description": "API URL for the Schema Registry used when producing Kafka messages (if a Schema Registry was used)." }, - "nonNegativeIntegerDefault0": { - "allOf": [ - { - "$ref": "#/definitions/nonNegativeInteger" - }, - { - "default": 0 - } - ] + "schemaRegistryVendor": { + "type": "string", + "description": "The vendor of the Schema Registry and Kafka serdes library that should be used." }, - "simpleTypes": { + "bindingVersion": { + "type": "string", "enum": [ - "array", - "boolean", - "integer", - "null", - "number", - "object", - "string" - ] - }, - "stringArray": { - "type": "array", - "items": { - "type": "string" - }, - "uniqueItems": true, - "default": [] + "0.4.0" + ], + "description": "The version of this binding." + } + }, + "examples": [ + { + "schemaRegistryUrl": "https://my-schema-registry.com", + "schemaRegistryVendor": "confluent", + "bindingVersion": "0.4.0" + } + ] + }, + "../../bindings/kafka/0.3.0/server.json": { + "$id": "../../bindings/kafka/0.3.0/server.json", + "title": "Server Schema", + "description": "This object contains server connection information to a Kafka broker. This object contains additional information not possible to represent within the core AsyncAPI specification.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" } }, - "type": [ - "object", - "boolean" - ], "properties": { - "$id": { + "schemaRegistryUrl": { "type": "string", - "format": "uri-reference" + "description": "API URL for the Schema Registry used when producing Kafka messages (if a Schema Registry was used)." }, - "$schema": { + "schemaRegistryVendor": { "type": "string", - "format": "uri" + "description": "The vendor of the Schema Registry and Kafka serdes library that should be used." }, - "$ref": { + "bindingVersion": { "type": "string", - "format": "uri-reference" - }, - "$comment": { - "type": "string" + "enum": [ + "0.3.0" + ], + "description": "The version of this binding." + } + }, + "examples": [ + { + "schemaRegistryUrl": "https://my-schema-registry.com", + "schemaRegistryVendor": "confluent", + "bindingVersion": "0.3.0" + } + ] + }, + "../../bindings/jms/0.0.1/server.json": { + "$id": "../../bindings/jms/0.0.1/server.json", + "title": "Server Schema", + "description": "This object contains configuration for describing a JMS broker as an AsyncAPI server. This objects only contains configuration that can not be provided in the AsyncAPI standard server object.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "required": [ + "jmsConnectionFactory" + ], + "properties": { + "jmsConnectionFactory": { + "type": "string", + "description": "The classname of the ConnectionFactory implementation for the JMS Provider." }, - "title": { - "type": "string" + "properties": { + "type": "array", + "items": { + "$ref": "http://asyncapi.com/bindings/jms/0.0.1/server.json#/definitions/property" + }, + "description": "Additional properties to set on the JMS ConnectionFactory implementation for the JMS Provider." }, - "description": { - "type": "string" - }, - "default": true, - "readOnly": { - "type": "boolean", - "default": false - }, - "writeOnly": { - "type": "boolean", - "default": false - }, - "examples": { - "type": "array", - "items": true - }, - "multipleOf": { - "type": "number", - "exclusiveMinimum": 0 - }, - "maximum": { - "type": "number" - }, - "exclusiveMaximum": { - "type": "number" - }, - "minimum": { - "type": "number" - }, - "exclusiveMinimum": { - "type": "number" - }, - "maxLength": { - "$ref": "#/definitions/nonNegativeInteger" - }, - "minLength": { - "$ref": "#/definitions/nonNegativeIntegerDefault0" - }, - "pattern": { + "clientID": { "type": "string", - "format": "regex" - }, - "additionalItems": { - "$ref": "#" + "description": "A client identifier for applications that use this JMS connection factory. If the Client ID Policy is set to 'Restricted' (the default), then configuring a Client ID on the ConnectionFactory prevents more than one JMS client from using a connection from this factory." }, - "items": { - "anyOf": [ - { - "$ref": "#" - }, - { - "$ref": "#/definitions/schemaArray" - } + "bindingVersion": { + "type": "string", + "enum": [ + "0.0.1" ], - "default": true - }, - "maxItems": { - "$ref": "#/definitions/nonNegativeInteger" - }, - "minItems": { - "$ref": "#/definitions/nonNegativeIntegerDefault0" - }, - "uniqueItems": { - "type": "boolean", - "default": false - }, - "contains": { - "$ref": "#" - }, - "maxProperties": { - "$ref": "#/definitions/nonNegativeInteger" - }, - "minProperties": { - "$ref": "#/definitions/nonNegativeIntegerDefault0" - }, - "required": { - "$ref": "#/definitions/stringArray" - }, - "additionalProperties": { - "$ref": "#" - }, - "definitions": { - "type": "object", - "additionalProperties": { - "$ref": "#" - }, - "default": {} - }, - "properties": { - "type": "object", - "additionalProperties": { - "$ref": "#" - }, - "default": {} - }, - "patternProperties": { - "type": "object", - "additionalProperties": { - "$ref": "#" - }, - "propertyNames": { - "format": "regex" - }, - "default": {} - }, - "dependencies": { + "description": "The version of this binding. If omitted, 'latest' MUST be assumed." + } + }, + "definitions": { + "property": { "type": "object", - "additionalProperties": { - "anyOf": [ - { - "$ref": "#" - }, - { - "$ref": "#/definitions/stringArray" - } - ] - } - }, - "propertyNames": { - "$ref": "#" - }, - "const": true, - "enum": { - "type": "array", - "items": true, - "minItems": 1, - "uniqueItems": true - }, - "type": { - "anyOf": [ - { - "$ref": "#/definitions/simpleTypes" + "required": [ + "name", + "value" + ], + "properties": { + "name": { + "type": "string", + "description": "The name of a property" }, - { - "type": "array", - "items": { - "$ref": "#/definitions/simpleTypes" - }, - "minItems": 1, - "uniqueItems": true + "value": { + "type": [ + "string", + "boolean", + "number", + "null" + ], + "description": "The name of a property" } - ] - }, - "format": { - "type": "string" - }, - "contentMediaType": { - "type": "string" - }, - "contentEncoding": { - "type": "string" - }, - "if": { - "$ref": "#" - }, - "then": { - "$ref": "#" - }, - "else": { - "$ref": "#" - }, - "allOf": { - "$ref": "#/definitions/schemaArray" - }, - "anyOf": { - "$ref": "#/definitions/schemaArray" - }, - "oneOf": { - "$ref": "#/definitions/schemaArray" - }, - "not": { - "$ref": "#" + } } }, - "default": true + "examples": [ + { + "jmsConnectionFactory": "org.apache.activemq.ActiveMQConnectionFactory", + "properties": [ + { + "name": "disableTimeStampsByDefault", + "value": false + } + ], + "clientID": "my-application-1", + "bindingVersion": "0.0.1" + } + ] }, - "http://asyncapi.com/bindings/kafka/0.5.0/server.json": { - "$id": "http://asyncapi.com/bindings/kafka/0.5.0/server.json", - "title": "Server Schema", - "description": "This object contains server connection information to a Kafka broker. This object contains additional information not possible to represent within the core AsyncAPI specification.", + "../../bindings/ibmmq/0.1.0/server.json": { + "$id": "../../bindings/ibmmq/0.1.0/server.json", + "title": "IBM MQ server bindings object", + "description": "This object contains server connection information about the IBM MQ server, referred to as an IBM MQ queue manager. This object contains additional connectivity information not possible to represent within the core AsyncAPI specification.", "type": "object", "additionalProperties": false, "patternProperties": { @@ -2017,34 +1722,55 @@ } }, "properties": { - "schemaRegistryUrl": { + "groupId": { "type": "string", - "description": "API URL for the Schema Registry used when producing Kafka messages (if a Schema Registry was used)." + "description": "Defines a logical group of IBM MQ server objects. This is necessary to specify multi-endpoint configurations used in high availability deployments. If omitted, the server object is not part of a group." }, - "schemaRegistryVendor": { + "ccdtQueueManagerName": { "type": "string", - "description": "The vendor of the Schema Registry and Kafka serdes library that should be used." + "default": "*", + "description": "The name of the IBM MQ queue manager to bind to in the CCDT file." + }, + "cipherSpec": { + "type": "string", + "description": "The recommended cipher specification used to establish a TLS connection between the client and the IBM MQ queue manager. More information on SSL/TLS cipher specifications supported by IBM MQ can be found on this page in the IBM MQ Knowledge Center." + }, + "multiEndpointServer": { + "type": "boolean", + "default": false, + "description": "If 'multiEndpointServer' is 'true' then multiple connections can be workload balanced and applications should not make assumptions as to where messages are processed. Where message ordering, or affinity to specific message resources is necessary, a single endpoint ('multiEndpointServer' = 'false') may be required." + }, + "heartBeatInterval": { + "type": "integer", + "minimum": 0, + "maximum": 999999, + "default": 300, + "description": "The recommended value (in seconds) for the heartbeat sent to the queue manager during periods of inactivity. A value of zero means that no heart beats are sent. A value of 1 means that the client will use the value defined by the queue manager. More information on heart beat interval can be found on this page in the IBM MQ Knowledge Center." }, "bindingVersion": { "type": "string", "enum": [ - "0.5.0" + "0.1.0" ], "description": "The version of this binding." } }, "examples": [ { - "schemaRegistryUrl": "https://my-schema-registry.com", - "schemaRegistryVendor": "confluent", - "bindingVersion": "0.5.0" + "groupId": "PRODCLSTR1", + "cipherSpec": "ANY_TLS12_OR_HIGHER", + "bindingVersion": "0.1.0" + }, + { + "groupId": "PRODCLSTR1", + "bindingVersion": "0.1.0" } ] }, - "http://asyncapi.com/bindings/kafka/0.4.0/server.json": { - "$id": "http://asyncapi.com/bindings/kafka/0.4.0/server.json", - "title": "Server Schema", - "description": "This object contains server connection information to a Kafka broker. This object contains additional information not possible to represent within the core AsyncAPI specification.", + "../../bindings/solace/0.4.0/server.json": { + "$id": "../../bindings/solace/0.4.0/server.json", + "title": "Solace server bindings object", + "description": "This object contains server connection information about the Solace broker. This object contains additional connectivity information not possible to represent within the core AsyncAPI specification.", "type": "object", "additionalProperties": false, "patternProperties": { @@ -2053,214 +1779,9 @@ } }, "properties": { - "schemaRegistryUrl": { + "msgVpn": { "type": "string", - "description": "API URL for the Schema Registry used when producing Kafka messages (if a Schema Registry was used)." - }, - "schemaRegistryVendor": { - "type": "string", - "description": "The vendor of the Schema Registry and Kafka serdes library that should be used." - }, - "bindingVersion": { - "type": "string", - "enum": [ - "0.4.0" - ], - "description": "The version of this binding." - } - }, - "examples": [ - { - "schemaRegistryUrl": "https://my-schema-registry.com", - "schemaRegistryVendor": "confluent", - "bindingVersion": "0.4.0" - } - ] - }, - "http://asyncapi.com/bindings/kafka/0.3.0/server.json": { - "$id": "http://asyncapi.com/bindings/kafka/0.3.0/server.json", - "title": "Server Schema", - "description": "This object contains server connection information to a Kafka broker. This object contains additional information not possible to represent within the core AsyncAPI specification.", - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" - } - }, - "properties": { - "schemaRegistryUrl": { - "type": "string", - "description": "API URL for the Schema Registry used when producing Kafka messages (if a Schema Registry was used)." - }, - "schemaRegistryVendor": { - "type": "string", - "description": "The vendor of the Schema Registry and Kafka serdes library that should be used." - }, - "bindingVersion": { - "type": "string", - "enum": [ - "0.3.0" - ], - "description": "The version of this binding." - } - }, - "examples": [ - { - "schemaRegistryUrl": "https://my-schema-registry.com", - "schemaRegistryVendor": "confluent", - "bindingVersion": "0.3.0" - } - ] - }, - "http://asyncapi.com/bindings/jms/0.0.1/server.json": { - "$id": "http://asyncapi.com/bindings/jms/0.0.1/server.json", - "title": "Server Schema", - "description": "This object contains configuration for describing a JMS broker as an AsyncAPI server. This objects only contains configuration that can not be provided in the AsyncAPI standard server object.", - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" - } - }, - "required": [ - "jmsConnectionFactory" - ], - "properties": { - "jmsConnectionFactory": { - "type": "string", - "description": "The classname of the ConnectionFactory implementation for the JMS Provider." - }, - "properties": { - "type": "array", - "items": { - "$ref": "http://asyncapi.com/bindings/jms/0.0.1/server.json#/definitions/property" - }, - "description": "Additional properties to set on the JMS ConnectionFactory implementation for the JMS Provider." - }, - "clientID": { - "type": "string", - "description": "A client identifier for applications that use this JMS connection factory. If the Client ID Policy is set to 'Restricted' (the default), then configuring a Client ID on the ConnectionFactory prevents more than one JMS client from using a connection from this factory." - }, - "bindingVersion": { - "type": "string", - "enum": [ - "0.0.1" - ], - "description": "The version of this binding. If omitted, 'latest' MUST be assumed." - } - }, - "definitions": { - "property": { - "type": "object", - "required": [ - "name", - "value" - ], - "properties": { - "name": { - "type": "string", - "description": "The name of a property" - }, - "value": { - "type": [ - "string", - "boolean", - "number", - "null" - ], - "description": "The name of a property" - } - } - } - }, - "examples": [ - { - "jmsConnectionFactory": "org.apache.activemq.ActiveMQConnectionFactory", - "properties": [ - { - "name": "disableTimeStampsByDefault", - "value": false - } - ], - "clientID": "my-application-1", - "bindingVersion": "0.0.1" - } - ] - }, - "http://asyncapi.com/bindings/ibmmq/0.1.0/server.json": { - "$id": "http://asyncapi.com/bindings/ibmmq/0.1.0/server.json", - "title": "IBM MQ server bindings object", - "description": "This object contains server connection information about the IBM MQ server, referred to as an IBM MQ queue manager. This object contains additional connectivity information not possible to represent within the core AsyncAPI specification.", - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" - } - }, - "properties": { - "groupId": { - "type": "string", - "description": "Defines a logical group of IBM MQ server objects. This is necessary to specify multi-endpoint configurations used in high availability deployments. If omitted, the server object is not part of a group." - }, - "ccdtQueueManagerName": { - "type": "string", - "default": "*", - "description": "The name of the IBM MQ queue manager to bind to in the CCDT file." - }, - "cipherSpec": { - "type": "string", - "description": "The recommended cipher specification used to establish a TLS connection between the client and the IBM MQ queue manager. More information on SSL/TLS cipher specifications supported by IBM MQ can be found on this page in the IBM MQ Knowledge Center." - }, - "multiEndpointServer": { - "type": "boolean", - "default": false, - "description": "If 'multiEndpointServer' is 'true' then multiple connections can be workload balanced and applications should not make assumptions as to where messages are processed. Where message ordering, or affinity to specific message resources is necessary, a single endpoint ('multiEndpointServer' = 'false') may be required." - }, - "heartBeatInterval": { - "type": "integer", - "minimum": 0, - "maximum": 999999, - "default": 300, - "description": "The recommended value (in seconds) for the heartbeat sent to the queue manager during periods of inactivity. A value of zero means that no heart beats are sent. A value of 1 means that the client will use the value defined by the queue manager. More information on heart beat interval can be found on this page in the IBM MQ Knowledge Center." - }, - "bindingVersion": { - "type": "string", - "enum": [ - "0.1.0" - ], - "description": "The version of this binding." - } - }, - "examples": [ - { - "groupId": "PRODCLSTR1", - "cipherSpec": "ANY_TLS12_OR_HIGHER", - "bindingVersion": "0.1.0" - }, - { - "groupId": "PRODCLSTR1", - "bindingVersion": "0.1.0" - } - ] - }, - "http://asyncapi.com/bindings/solace/0.4.0/server.json": { - "$id": "http://asyncapi.com/bindings/solace/0.4.0/server.json", - "title": "Solace server bindings object", - "description": "This object contains server connection information about the Solace broker. This object contains additional connectivity information not possible to represent within the core AsyncAPI specification.", - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" - } - }, - "properties": { - "msgVpn": { - "type": "string", - "description": "The name of the Virtual Private Network to connect to on the Solace broker." + "description": "The name of the Virtual Private Network to connect to on the Solace broker." }, "clientName": { "type": "string", @@ -2283,8 +1804,8 @@ } ] }, - "http://asyncapi.com/bindings/solace/0.3.0/server.json": { - "$id": "http://asyncapi.com/bindings/solace/0.3.0/server.json", + "../../bindings/solace/0.3.0/server.json": { + "$id": "../../bindings/solace/0.3.0/server.json", "title": "Solace server bindings object", "description": "This object contains server connection information about the Solace broker. This object contains additional connectivity information not possible to represent within the core AsyncAPI specification.", "type": "object", @@ -2314,8 +1835,8 @@ } ] }, - "http://asyncapi.com/bindings/solace/0.2.0/server.json": { - "$id": "http://asyncapi.com/bindings/solace/0.2.0/server.json", + "../../bindings/solace/0.2.0/server.json": { + "$id": "../../bindings/solace/0.2.0/server.json", "title": "Solace server bindings object", "description": "This object contains server connection information about the Solace broker. This object contains additional connectivity information not possible to represent within the core AsyncAPI specification.", "type": "object", @@ -2345,8 +1866,8 @@ } ] }, - "http://asyncapi.com/bindings/pulsar/0.1.0/server.json": { - "$id": "http://asyncapi.com/bindings/pulsar/0.1.0/server.json", + "../../bindings/pulsar/0.1.0/server.json": { + "$id": "../../bindings/pulsar/0.1.0/server.json", "title": "Server Schema", "description": "This object contains server information of Pulsar broker, which covers cluster and tenant admin configuration. This object contains additional information not possible to represent within the core AsyncAPI specification.", "type": "object", @@ -2376,37 +1897,10 @@ } ] }, - "http://asyncapi.com/definitions/3.0.0/channels.json": { - "$id": "http://asyncapi.com/definitions/3.0.0/channels.json", - "type": "object", - "description": "An object containing all the Channel Object definitions the Application MUST use during runtime.", - "additionalProperties": { - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" - }, - { - "$ref": "http://asyncapi.com/definitions/3.0.0/channel.json" - } - ] - }, - "examples": [ - { - "userSignedUp": { - "address": "user.signedup", - "messages": { - "userSignedUp": { - "$ref": "#/components/messages/userSignedUp" - } - } - } - } - ] - }, - "http://asyncapi.com/definitions/3.0.0/channel.json": { - "$id": "http://asyncapi.com/definitions/3.0.0/channel.json", + "serverBindingsObject.json": { + "$id": "serverBindingsObject.json", "type": "object", - "description": "Describes a shared communication channel.", + "description": "Map describing protocol-specific definitions for a server.", "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { @@ -2414,248 +1908,389 @@ } }, "properties": { - "address": { - "type": [ - "string", - "null" - ], - "description": "An optional string representation of this channel's address. The address is typically the \"topic name\", \"routing key\", \"event type\", or \"path\". When `null` or absent, it MUST be interpreted as unknown. This is useful when the address is generated dynamically at runtime or can't be known upfront. It MAY contain Channel Address Expressions." - }, - "messages": { - "$ref": "http://asyncapi.com/definitions/3.0.0/channelMessages.json" - }, - "parameters": { - "$ref": "http://asyncapi.com/definitions/3.0.0/parameters.json" - }, - "title": { - "type": "string", - "description": "A human-friendly title for the channel." - }, - "summary": { - "type": "string", - "description": "A brief summary of the channel." - }, - "description": { - "type": "string", - "description": "A longer description of the channel. CommonMark is allowed." - }, - "servers": { - "type": "array", - "description": "The references of the servers on which this channel is available. If absent or empty then this channel must be available on all servers.", - "items": { - "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" - }, - "uniqueItems": true - }, - "tags": { - "type": "array", - "description": "A list of tags for logical grouping of channels.", - "items": { - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" - }, - { - "$ref": "http://asyncapi.com/definitions/3.0.0/tag.json" - } - ] + "http": {}, + "ws": {}, + "amqp": {}, + "amqp1": {}, + "mqtt": { + "properties": { + "bindingVersion": { + "enum": [ + "0.2.0" + ] + } }, - "uniqueItems": true - }, - "externalDocs": { - "oneOf": [ + "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/mqtt/0.2.0/server.json" + } }, { - "$ref": "http://asyncapi.com/definitions/3.0.0/externalDocs.json" + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.2.0" + } + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/mqtt/0.2.0/server.json" + } } ] }, - "bindings": { - "oneOf": [ + "kafka": { + "properties": { + "bindingVersion": { + "enum": [ + "0.5.0", + "0.4.0", + "0.3.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/kafka/0.5.0/server.json" + } }, { - "$ref": "http://asyncapi.com/definitions/3.0.0/channelBindingsObject.json" - } - ] - } - }, - "examples": [ - { - "address": "users.{userId}", - "title": "Users channel", - "description": "This channel is used to exchange messages about user events.", - "messages": { - "userSignedUp": { - "$ref": "#/components/messages/userSignedUp" + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.5.0" + } + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/kafka/0.5.0/server.json" + } }, - "userCompletedOrder": { - "$ref": "#/components/messages/userCompletedOrder" - } - }, - "parameters": { - "userId": { - "$ref": "#/components/parameters/userId" - } - }, - "servers": [ { - "$ref": "#/servers/rabbitmqInProd" + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.4.0" + } + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/kafka/0.4.0/server.json" + } }, { - "$ref": "#/servers/rabbitmqInStaging" - } - ], - "bindings": { - "amqp": { - "is": "queue", - "queue": { - "exclusive": true + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.3.0" + } + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/kafka/0.3.0/server.json" } } - }, - "tags": [ - { - "name": "user", - "description": "User-related messages" + ] + }, + "anypointmq": {}, + "nats": {}, + "jms": { + "properties": { + "bindingVersion": { + "enum": [ + "0.0.1" + ] } - ], - "externalDocs": { - "description": "Find more info here", - "url": "https://example.com" - } - } - ] - }, - "http://asyncapi.com/definitions/3.0.0/channelMessages.json": { - "$id": "http://asyncapi.com/definitions/3.0.0/channelMessages.json", - "type": "object", - "additionalProperties": { - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" }, - { - "$ref": "http://asyncapi.com/definitions/3.0.0/messageObject.json" - } - ] - }, - "description": "A map of the messages that will be sent to this channel by any application at any time. **Every message sent to this channel MUST be valid against one, and only one, of the message objects defined in this map.**" - }, - "http://asyncapi.com/definitions/3.0.0/messageObject.json": { - "$id": "http://asyncapi.com/definitions/3.0.0/messageObject.json", - "type": "object", - "description": "Describes a message received on a given channel and operation.", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" - } - }, - "properties": { - "contentType": { - "type": "string", - "description": "The content type to use when encoding/decoding a message's payload. The value MUST be a specific media type (e.g. application/json). When omitted, the value MUST be the one specified on the defaultContentType field." - }, - "headers": { - "$ref": "http://asyncapi.com/definitions/3.0.0/anySchema.json" - }, - "payload": { - "$ref": "http://asyncapi.com/definitions/3.0.0/anySchema.json" - }, - "correlationId": { - "oneOf": [ + "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/jms/0.0.1/server.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/jms/0.0.1/server.json" + } } ] }, - "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" - } - ] + "sns": {}, + "sqs": {}, + "stomp": {}, + "redis": {}, + "ibmmq": { + "properties": { + "bindingVersion": { + "enum": [ + "0.1.0" + ] + } }, - "uniqueItems": true + "allOf": [ + { + "description": "If no bindingVersion specified, use the latest binding", + "if": { + "not": { + "required": [ + "bindingVersion" + ] + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/ibmmq/0.1.0/server.json" + } + }, + { + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.1.0" + } + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/ibmmq/0.1.0/server.json" + } + } + ] }, - "summary": { + "solace": { + "properties": { + "bindingVersion": { + "enum": [ + "0.4.0", + "0.3.0", + "0.2.0" + ] + } + }, + "allOf": [ + { + "description": "If no bindingVersion specified, use the latest binding", + "if": { + "not": { + "required": [ + "bindingVersion" + ] + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/solace/0.4.0/server.json" + } + }, + { + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.4.0" + } + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/solace/0.4.0/server.json" + } + }, + { + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.3.0" + } + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/solace/0.3.0/server.json" + } + }, + { + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.2.0" + } + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/solace/0.2.0/server.json" + } + } + ] + }, + "googlepubsub": {}, + "pulsar": { + "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/pulsar/0.1.0/server.json" + } + }, + { + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.1.0" + } + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/pulsar/0.1.0/server.json" + } + } + ] + } + } + }, + "server.json": { + "$id": "server.json", + "type": "object", + "description": "An object representing a message broker, a server or any other kind of computer program capable of sending and/or receiving data.", + "required": [ + "host", + "protocol" + ], + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "properties": { + "host": { "type": "string", - "description": "A brief summary of the message." + "description": "The server host name. It MAY include the port. This field supports Server Variables. Variable substitutions will be made when a variable is named in {braces}." }, - "name": { + "pathname": { "type": "string", - "description": "Name of the message." + "description": "The path to a resource in the host. This field supports Server Variables. Variable substitutions will be made when a variable is named in {braces}." }, "title": { "type": "string", - "description": "A human-friendly title for the message." + "description": "A human-friendly title for the server." + }, + "summary": { + "type": "string", + "description": "A brief summary of the server." }, "description": { "type": "string", - "description": "A longer description of the message. CommonMark is allowed." + "description": "A longer description of the server. 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" - } - ] + "protocol": { + "type": "string", + "description": "The protocol this server supports for connection." }, - "deprecated": { - "type": "boolean", - "default": false + "protocolVersion": { + "type": "string", + "description": "An optional string describing the server. CommonMark syntax MAY be used for rich text representation." }, - "examples": { + "variables": { + "$ref": "http://asyncapi.com/definitions/3.0.0/serverVariables.json" + }, + "security": { + "$ref": "http://asyncapi.com/definitions/3.0.0/securityRequirements.json" + }, + "tags": { "type": "array", - "description": "List of examples.", "items": { - "type": "object", - "additionalProperties": false, - "anyOf": [ + "oneOf": [ { - "required": [ - "payload" - ] + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" }, { - "required": [ - "headers" - ] - } - ], - "properties": { - "name": { - "type": "string", - "description": "Machine readable name of the message example." - }, - "summary": { - "type": "string", - "description": "A brief summary of the message example." - }, - "headers": { - "type": "object", - "description": "Example of the application headers. It can be of any type." - }, - "payload": { - "description": "Example of the message payload. It can be of any type." + "$ref": "http://asyncapi.com/definitions/3.0.0/tag.json" } + ] + }, + "uniqueItems": true + }, + "externalDocs": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/externalDocs.json" } - } + ] }, "bindings": { "oneOf": [ @@ -2663,366 +2298,117 @@ "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" }, { - "$ref": "http://asyncapi.com/definitions/3.0.0/messageBindingsObject.json" + "$ref": "http://asyncapi.com/definitions/3.0.0/serverBindingsObject.json" } ] + } + }, + "examples": [ + { + "host": "kafka.in.mycompany.com:9092", + "description": "Production Kafka broker.", + "protocol": "kafka", + "protocolVersion": "3.2" }, - "traits": { - "type": "array", - "description": "A list of traits to apply to the message object. Traits MUST be merged using traits merge mechanism. The resulting object MUST be a valid Message Object.", - "items": { - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" - }, - { - "$ref": "http://asyncapi.com/definitions/3.0.0/messageTrait.json" - }, - { - "type": "array", - "items": [ - { - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" - }, - { - "$ref": "http://asyncapi.com/definitions/3.0.0/messageTrait.json" - } - ] - }, - { - "type": "object", - "additionalItems": true - } - ] - } - ] - } + { + "host": "rabbitmq.in.mycompany.com:5672", + "pathname": "/production", + "protocol": "amqp", + "description": "Production RabbitMQ broker (uses the `production` vhost)." } + ] + }, + "servers.json": { + "$id": "servers.json", + "description": "An object representing multiple servers.", + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/server.json" + } + ] }, "examples": [ { - "messageId": "userSignup", - "name": "UserSignup", - "title": "User signup", - "summary": "Action to sign a user up.", - "description": "A longer description", - "contentType": "application/json", - "tags": [ - { - "name": "user" - }, - { - "name": "signup" - }, - { - "name": "register" - } - ], - "headers": { - "type": "object", - "properties": { - "correlationId": { - "description": "Correlation ID set by application", - "type": "string" - }, - "applicationInstanceId": { - "description": "Unique identifier for a given instance of the publishing application", - "type": "string" + "development": { + "host": "localhost:5672", + "description": "Development AMQP broker.", + "protocol": "amqp", + "protocolVersion": "0-9-1", + "tags": [ + { + "name": "env:development", + "description": "This environment is meant for developers to run their own tests." } - } + ] }, - "payload": { - "type": "object", - "properties": { - "user": { - "$ref": "#/components/schemas/userCreate" - }, - "signup": { - "$ref": "#/components/schemas/signup" + "staging": { + "host": "rabbitmq-staging.in.mycompany.com:5672", + "description": "RabbitMQ broker for the staging environment.", + "protocol": "amqp", + "protocolVersion": "0-9-1", + "tags": [ + { + "name": "env:staging", + "description": "This environment is a replica of the production environment." } - } - }, - "correlationId": { - "description": "Default Correlation ID", - "location": "$message.header#/correlationId" + ] }, - "traits": [ - { - "$ref": "#/components/messageTraits/commonHeaders" - } - ], - "examples": [ - { - "name": "SimpleSignup", - "summary": "A simple UserSignup example message", - "headers": { - "correlationId": "my-correlation-id", - "applicationInstanceId": "myInstanceId" - }, - "payload": { - "user": { - "someUserKey": "someUserValue" - }, - "signup": { - "someSignupKey": "someSignupValue" - } + "production": { + "host": "rabbitmq.in.mycompany.com:5672", + "description": "RabbitMQ broker for the production environment.", + "protocol": "amqp", + "protocolVersion": "0-9-1", + "tags": [ + { + "name": "env:production", + "description": "This environment is the live environment available for final users." } - } - ] + ] + } } ] }, - "http://asyncapi.com/definitions/3.0.0/anySchema.json": { - "$id": "http://asyncapi.com/definitions/3.0.0/anySchema.json", - "if": { - "required": [ - "schema" - ] - }, - "then": { - "$ref": "http://asyncapi.com/definitions/3.0.0/multiFormatSchema.json" - }, - "else": { - "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" - }, - "description": "An object representing either a schema or a multiFormatSchema based on the existence of the 'schema' property. If the property 'schema' is present, use the multi-format schema. Use the default AsyncAPI Schema otherwise." - }, - "http://asyncapi.com/definitions/3.0.0/multiFormatSchema.json": { - "$id": "http://asyncapi.com/definitions/3.0.0/multiFormatSchema.json", - "description": "The Multi Format Schema Object represents a schema definition. It differs from the Schema Object in that it supports multiple schema formats or languages (e.g., JSON Schema, Avro, etc.).", + "openapiSchema_3_0.json": { + "$id": "openapiSchema_3_0.json", "type": "object", - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$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", - "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" - ] - } - ] - } - }, - "allOf": [ - { - "if": { - "not": { - "description": "If no schemaFormat has been defined, default to schema or reference", - "required": [ - "schemaFormat" - ] - } + "definitions": { + "ExternalDocumentation": { + "type": "object", + "required": [ + "url" + ], + "properties": { + "description": { + "type": "string" }, - "then": { - "properties": { - "schema": { - "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" - } - } + "url": { + "type": "string", + "format": "uri-reference" } }, - { - "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" - } - } - } + "patternProperties": { + "^x-": {} }, - { - "if": { - "required": [ - "schemaFormat" - ], - "properties": { - "schemaFormat": { - "enum": [ - "application/schema+json;version=draft-07", - "application/schema+yaml;version=draft-07" - ] - } - } + "additionalProperties": false + }, + "Discriminator": { + "type": "object", + "required": [ + "propertyName" + ], + "properties": { + "propertyName": { + "type": "string" }, - "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/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": { - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" - }, - { - "$ref": "http://asyncapi.com/definitions/3.0.0/avroSchema_v1.json" - } - ] - } - } - } - } - ] - } - }, - "http://asyncapi.com/definitions/3.0.0/openapiSchema_3_0.json": { - "$id": "http://asyncapi.com/definitions/3.0.0/openapiSchema_3_0.json", - "type": "object", - "definitions": { - "ExternalDocumentation": { - "type": "object", - "required": [ - "url" - ], - "properties": { - "description": { - "type": "string" - }, - "url": { - "type": "string", - "format": "uri-reference" - } - }, - "patternProperties": { - "^x-": {} - }, - "additionalProperties": false - }, - "Discriminator": { - "type": "object", - "required": [ - "propertyName" - ], - "properties": { - "propertyName": { - "type": "string" - }, - "mapping": { - "type": "object", - "additionalProperties": { - "type": "string" + "mapping": { + "type": "object", + "additionalProperties": { + "type": "string" } } } @@ -3274,8 +2660,8 @@ }, "additionalProperties": false }, - "http://asyncapi.com/definitions/3.0.0/avroSchema_v1.json": { - "$id": "http://asyncapi.com/definitions/3.0.0/avroSchema_v1.json", + "avroSchema_v1.json": { + "$id": "avroSchema_v1.json", "definitions": { "avroSchema": { "title": "Avro Schema", @@ -3590,8 +2976,228 @@ ], "title": "Avro Schema Definition" }, - "http://asyncapi.com/definitions/3.0.0/correlationId.json": { - "$id": "http://asyncapi.com/definitions/3.0.0/correlationId.json", + "multiFormatSchema.json": { + "$id": "multiFormatSchema.json", + "description": "The Multi Format Schema Object represents a schema definition. It differs from the Schema Object in that it supports multiple schema formats or languages (e.g., JSON Schema, Avro, etc.).", + "type": "object", + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "properties": { + "schemaFormat": { + "description": "A string containing the name of the schema format that is used to define the information. If schemaFormat is missing, it MUST default to application/vnd.aai.asyncapi+json;version={{asyncapi}} where {{asyncapi}} matches the AsyncAPI Version String. In such a case, this would make the Multi Format Schema Object equivalent to the Schema Object. When using Reference Object within the schema, the schemaFormat of the resource being referenced MUST match the schemaFormat of the schema that contains the initial reference. For example, if you reference Avro schema, then schemaFormat of referencing resource and the resource being reference MUST match.", + "anyOf": [ + { + "type": "string" + }, + { + "description": "All the schema formats tooling MUST support", + "enum": [ + "application/schema+json;version=draft-07", + "application/schema+yaml;version=draft-07", + "application/vnd.aai.asyncapi;version=3.0.0", + "application/vnd.aai.asyncapi+json;version=3.0.0", + "application/vnd.aai.asyncapi+yaml;version=3.0.0" + ] + }, + { + "description": "All the schema formats tools are RECOMMENDED to support", + "enum": [ + "application/vnd.oai.openapi;version=3.0.0", + "application/vnd.oai.openapi+json;version=3.0.0", + "application/vnd.oai.openapi+yaml;version=3.0.0", + "application/vnd.apache.avro;version=1.9.0", + "application/vnd.apache.avro+json;version=1.9.0", + "application/vnd.apache.avro+yaml;version=1.9.0", + "application/raml+yaml;version=1.0" + ] + } + ] + } + }, + "allOf": [ + { + "$ref": "#/definitions/default_message" + }, + { + "$ref": "#/definitions/asyncapi_schema_message" + }, + { + "$ref": "#/definitions/json_schema_draft_7_message" + }, + { + "$ref": "#/definitions/openapi_message" + }, + { + "$ref": "#/definitions/avro_message" + } + ], + "definitions": { + "default_message": { + "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" + } + } + } + }, + "asyncapi_schema_message": { + "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" + } + } + } + }, + "json_schema_draft_7_message": { + "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" + } + } + } + }, + "openapi_message": { + "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" + } + ] + } + } + } + }, + "avro_message": { + "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" + } + ] + } + } + } + } + } + }, + "anySchema.json": { + "$id": "anySchema.json", + "if": { + "required": [ + "schema" + ] + }, + "then": { + "$ref": "http://asyncapi.com/definitions/3.0.0/multiFormatSchema.json" + }, + "else": { + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" + }, + "description": "An object representing either a schema or a multiFormatSchema based on the existence of the 'schema' property. If the property 'schema' is present, use the multi-format schema. Use the default AsyncAPI Schema otherwise." + }, + "correlationId.json": { + "$id": "correlationId.json", "type": "object", "description": "An object that specifies an identifier at design time that can used for message tracing and correlation.", "required": [ @@ -3621,10 +3227,11 @@ } ] }, - "http://asyncapi.com/definitions/3.0.0/messageBindingsObject.json": { - "$id": "http://asyncapi.com/definitions/3.0.0/messageBindingsObject.json", + "../../bindings/http/0.3.0/message.json": { + "$id": "../../bindings/http/0.3.0/message.json", + "title": "HTTP message bindings object", + "description": "This object contains information about the message representation in HTTP.", "type": "object", - "description": "Map describing protocol-specific definitions for a message.", "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { @@ -3632,380 +3239,395 @@ } }, "properties": { - "http": { - "properties": { - "bindingVersion": { - "enum": [ - "0.2.0", - "0.3.0" - ] + "headers": { + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" + }, + "statusCode": { + "type": "number", + "description": "The HTTP response status code according to [RFC 9110](https://httpwg.org/specs/rfc9110.html#overview.of.status.codes). `statusCode` is only relevant for messages referenced by the [Operation Reply Object](https://www.asyncapi.com/docs/reference/specification/v3.0.0#operationReplyObject), as it defines the status code for the response. In all other cases, this value can be safely ignored." + }, + "bindingVersion": { + "type": "string", + "enum": [ + "0.3.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" + ] + } } }, - "allOf": [ - { - "description": "If no bindingVersion specified, use the latest binding", - "if": { - "not": { - "required": [ - "bindingVersion" - ] - } - }, - "then": { - "$ref": "http://asyncapi.com/bindings/http/0.3.0/message.json" - } - }, - { - "if": { - "required": [ - "bindingVersion" - ], - "properties": { - "bindingVersion": { - "const": "0.2.0" - } - } - }, - "then": { - "$ref": "http://asyncapi.com/bindings/http/0.2.0/message.json" + "bindingVersion": "0.3.0" + } + ] + }, + "../../bindings/http/0.2.0/message.json": { + "$id": "../../bindings/http/0.2.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" + }, + "bindingVersion": { + "type": "string", + "enum": [ + "0.2.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" + ] } + } + }, + "bindingVersion": "0.2.0" + } + ] + }, + "../../bindings/amqp/0.3.0/message.json": { + "$id": "../../bindings/amqp/0.3.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." + }, + "messageType": { + "type": "string", + "description": "Application-specific message type." + }, + "bindingVersion": { + "type": "string", + "enum": [ + "0.3.0" + ], + "description": "The version of this binding. If omitted, \"latest\" MUST be assumed." + } + }, + "examples": [ + { + "contentEncoding": "gzip", + "messageType": "user.signup", + "bindingVersion": "0.3.0" + } + ] + }, + "../../bindings/mqtt/0.2.0/message.json": { + "$id": "../../bindings/mqtt/0.2.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": { + "payloadFormatIndicator": { + "type": "integer", + "enum": [ + 0, + 1 + ], + "description": "1 indicates that the payload is UTF-8 encoded character data. 0 indicates that the payload format is unspecified.", + "default": 0 + }, + "correlationData": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" }, { - "if": { - "required": [ - "bindingVersion" - ], - "properties": { - "bindingVersion": { - "const": "0.3.0" - } - } - }, - "then": { - "$ref": "http://asyncapi.com/bindings/http/0.3.0/message.json" - } + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" } - ] + ], + "description": "Correlation Data is used by the sender of the request message to identify which request the response message is for when it is received." }, - "ws": {}, - "amqp": { - "properties": { - "bindingVersion": { - "enum": [ - "0.3.0" - ] - } - }, - "allOf": [ + "contentType": { + "type": "string", + "description": "String describing the content type of the message payload. This should not conflict with the contentType field of the associated AsyncAPI Message object." + }, + "responseTopic": { + "oneOf": [ { - "description": "If no bindingVersion specified, use the latest binding", - "if": { - "not": { - "required": [ - "bindingVersion" - ] - } - }, - "then": { - "$ref": "http://asyncapi.com/bindings/amqp/0.3.0/message.json" - } + "type": "string", + "format": "uri-template", + "minLength": 1 }, { - "if": { - "required": [ - "bindingVersion" - ], - "properties": { - "bindingVersion": { - "const": "0.3.0" - } - } - }, - "then": { - "$ref": "http://asyncapi.com/bindings/amqp/0.3.0/message.json" - } + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" } - ] + ], + "description": "The topic (channel URI) to be used for a response message." }, - "amqp1": {}, - "mqtt": { - "properties": { - "bindingVersion": { - "enum": [ - "0.2.0" - ] - } + "bindingVersion": { + "type": "string", + "enum": [ + "0.2.0" + ], + "description": "The version of this binding. If omitted, 'latest' MUST be assumed." + } + }, + "examples": [ + { + "bindingVersion": "0.2.0" + }, + { + "contentType": "application/json", + "correlationData": { + "type": "string", + "format": "uuid" }, - "allOf": [ + "responseTopic": "application/responses", + "bindingVersion": "0.2.0" + } + ] + }, + "../../bindings/kafka/0.5.0/message.json": { + "$id": "../../bindings/kafka/0.5.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": { + "oneOf": [ { - "description": "If no bindingVersion specified, use the latest binding", - "if": { - "not": { - "required": [ - "bindingVersion" - ] - } - }, - "then": { - "$ref": "http://asyncapi.com/bindings/mqtt/0.2.0/message.json" - } + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" }, { - "if": { - "required": [ - "bindingVersion" - ], - "properties": { - "bindingVersion": { - "const": "0.2.0" - } - } - }, - "then": { - "$ref": "http://asyncapi.com/bindings/mqtt/0.2.0/message.json" - } + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" } + ], + "description": "The message key." + }, + "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" ] }, - "kafka": { - "properties": { - "bindingVersion": { - "enum": [ - "0.5.0", - "0.4.0", - "0.3.0" - ] - } + "schemaIdPayloadEncoding": { + "type": "string", + "description": "Number of bytes or vendor specific values when schema id is encoded in payload." + }, + "schemaLookupStrategy": { + "type": "string", + "description": "Freeform string for any naming strategy class to use. Clients should default to the vendor default if not supplied." + }, + "bindingVersion": { + "type": "string", + "enum": [ + "0.5.0" + ], + "description": "The version of this binding. If omitted, 'latest' MUST be assumed." + } + }, + "examples": [ + { + "key": { + "type": "string", + "enum": [ + "myKey" + ] }, - "allOf": [ - { - "description": "If no bindingVersion specified, use the latest binding", - "if": { - "not": { - "required": [ - "bindingVersion" - ] - } - }, - "then": { - "$ref": "http://asyncapi.com/bindings/kafka/0.5.0/message.json" - } - }, + "schemaIdLocation": "payload", + "schemaIdPayloadEncoding": "apicurio-new", + "schemaLookupStrategy": "TopicIdStrategy", + "bindingVersion": "0.5.0" + }, + { + "key": { + "$ref": "path/to/user-create.avsc#/UserCreate" + }, + "schemaIdLocation": "payload", + "schemaIdPayloadEncoding": "4", + "bindingVersion": "0.5.0" + } + ] + }, + "../../bindings/kafka/0.4.0/message.json": { + "$id": "../../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": { + "anyOf": [ { - "if": { - "required": [ - "bindingVersion" - ], - "properties": { - "bindingVersion": { - "const": "0.5.0" - } - } - }, - "then": { - "$ref": "http://asyncapi.com/bindings/kafka/0.5.0/message.json" - } + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" }, { - "if": { - "required": [ - "bindingVersion" - ], - "properties": { - "bindingVersion": { - "const": "0.4.0" - } - } - }, - "then": { - "$ref": "http://asyncapi.com/bindings/kafka/0.4.0/message.json" - } + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" }, { - "if": { - "required": [ - "bindingVersion" - ], - "properties": { - "bindingVersion": { - "const": "0.3.0" - } - } - }, - "then": { - "$ref": "http://asyncapi.com/bindings/kafka/0.3.0/message.json" - } + "$ref": "http://asyncapi.com/definitions/3.0.0/avroSchema_v1.json" } + ], + "description": "The message key." + }, + "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" ] }, - "anypointmq": { - "properties": { - "bindingVersion": { - "enum": [ - "0.0.1" - ] - } + "schemaIdPayloadEncoding": { + "type": "string", + "description": "Number of bytes or vendor specific values when schema id is encoded in payload." + }, + "schemaLookupStrategy": { + "type": "string", + "description": "Freeform string for any naming strategy class to use. Clients should default to the vendor default if not supplied." + }, + "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" + ] }, - "allOf": [ - { - "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" - } - }, - { - "if": { - "required": [ - "bindingVersion" - ], - "properties": { - "bindingVersion": { - "const": "0.0.1" - } - } - }, - "then": { - "$ref": "http://asyncapi.com/bindings/anypointmq/0.0.1/message.json" - } - } - ] + "schemaIdLocation": "payload", + "schemaIdPayloadEncoding": "apicurio-new", + "schemaLookupStrategy": "TopicIdStrategy", + "bindingVersion": "0.4.0" }, - "nats": {}, - "jms": { - "properties": { - "bindingVersion": { - "enum": [ - "0.0.1" - ] - } + { + "key": { + "$ref": "path/to/user-create.avsc#/UserCreate" }, - "allOf": [ - { - "description": "If no bindingVersion specified, use the latest binding", - "if": { - "not": { - "required": [ - "bindingVersion" - ] - } - }, - "then": { - "$ref": "http://asyncapi.com/bindings/jms/0.0.1/message.json" - } - }, - { - "if": { - "required": [ - "bindingVersion" - ], - "properties": { - "bindingVersion": { - "const": "0.0.1" - } - } - }, - "then": { - "$ref": "http://asyncapi.com/bindings/jms/0.0.1/message.json" - } - } + "schemaIdLocation": "payload", + "schemaIdPayloadEncoding": "4", + "bindingVersion": "0.4.0" + } + ] + }, + "../../bindings/kafka/0.3.0/message.json": { + "$id": "../../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" + }, + "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" ] }, - "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" - ] - } - }, - "then": { - "$ref": "http://asyncapi.com/bindings/ibmmq/0.1.0/message.json" - } - }, - { - "if": { - "required": [ - "bindingVersion" - ], - "properties": { - "bindingVersion": { - "const": "0.1.0" - } - } - }, - "then": { - "$ref": "http://asyncapi.com/bindings/ibmmq/0.1.0/message.json" - } - } - ] + "schemaIdPayloadEncoding": { + "type": "string", + "description": "Number of bytes or vendor specific values when schema id is encoded in payload." }, - "solace": {}, - "googlepubsub": { - "properties": { - "bindingVersion": { - "enum": [ - "0.2.0" - ] - } + "schemaLookupStrategy": { + "type": "string", + "description": "Freeform string for any naming strategy class to use. Clients should default to the vendor default if not supplied." + }, + "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" + ] }, - "allOf": [ - { - "description": "If no bindingVersion specified, use the latest binding", - "if": { - "not": { - "required": [ - "bindingVersion" - ] - } - }, - "then": { - "$ref": "http://asyncapi.com/bindings/googlepubsub/0.2.0/message.json" - } - }, - { - "if": { - "required": [ - "bindingVersion" - ], - "properties": { - "bindingVersion": { - "const": "0.2.0" - } - } - }, - "then": { - "$ref": "http://asyncapi.com/bindings/googlepubsub/0.2.0/message.json" - } - } - ] + "schemaIdLocation": "payload", + "schemaIdPayloadEncoding": "apicurio-new", + "schemaLookupStrategy": "TopicIdStrategy", + "bindingVersion": "0.3.0" + }, + { + "key": { + "$ref": "path/to/user-create.avsc#/UserCreate" + }, + "schemaIdLocation": "payload", + "schemaIdPayloadEncoding": "4", + "bindingVersion": "0.3.0" } - } + ] }, - "http://asyncapi.com/bindings/http/0.3.0/message.json": { - "$id": "http://asyncapi.com/bindings/http/0.3.0/message.json", - "title": "HTTP message bindings object", - "description": "This object contains information about the message representation in HTTP.", + "../../bindings/anypointmq/0.0.1/message.json": { + "$id": "../../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": { @@ -4015,19 +3637,22 @@ }, "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." - }, - "statusCode": { - "type": "number", - "description": "The HTTP response status code according to [RFC 9110](https://httpwg.org/specs/rfc9110.html#overview.of.status.codes). `statusCode` is only relevant for messages referenced by the [Operation Reply Object](https://www.asyncapi.com/docs/reference/specification/v3.0.0#operationReplyObject), as it defines the status code for the response. In all other cases, this value can be safely ignored." + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.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'." }, "bindingVersion": { "type": "string", "enum": [ - "0.3.0" + "0.0.1" ], - "description": "The version of this binding. If omitted, \"latest\" MUST be assumed." + "description": "The version of this binding. If omitted, 'latest' MUST be assumed." } }, "examples": [ @@ -4035,22 +3660,19 @@ "headers": { "type": "object", "properties": { - "Content-Type": { - "type": "string", - "enum": [ - "application/json" - ] + "messageId": { + "type": "string" } } }, - "bindingVersion": "0.3.0" + "bindingVersion": "0.0.1" } ] }, - "http://asyncapi.com/bindings/http/0.2.0/message.json": { - "$id": "http://asyncapi.com/bindings/http/0.2.0/message.json", - "title": "HTTP message bindings object", - "description": "This object contains information about the message representation in HTTP.", + "../../bindings/jms/0.0.1/message.json": { + "$id": "../../bindings/jms/0.0.1/message.json", + "title": "Message Schema", + "description": "This object contains configuration for describing a JMS 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": { @@ -4060,38 +3682,81 @@ }, "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." + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" }, "bindingVersion": { "type": "string", "enum": [ - "0.2.0" + "0.0.1" ], - "description": "The version of this binding. If omitted, \"latest\" MUST be assumed." + "description": "The version of this binding. If omitted, 'latest' MUST be assumed." } }, "examples": [ { "headers": { "type": "object", + "required": [ + "JMSMessageID" + ], "properties": { - "Content-Type": { + "JMSMessageID": { + "type": [ + "string", + "null" + ], + "description": "A unique message identifier. This may be set by your JMS Provider on your behalf." + }, + "JMSTimestamp": { + "type": "integer", + "description": "The time the message was sent. This may be set by your JMS Provider on your behalf. The time the message was sent. The value of the timestamp is the amount of time, measured in milliseconds, that has elapsed since midnight, January 1, 1970, UTC." + }, + "JMSDeliveryMode": { "type": "string", "enum": [ - "application/json" - ] + "PERSISTENT", + "NON_PERSISTENT" + ], + "default": "PERSISTENT", + "description": "Denotes the delivery mode for the message. This may be set by your JMS Provider on your behalf." + }, + "JMSPriority": { + "type": "integer", + "default": 4, + "description": "The priority of the message. This may be set by your JMS Provider on your behalf." + }, + "JMSExpires": { + "type": "integer", + "description": "The time at which the message expires. This may be set by your JMS Provider on your behalf. A value of zero means that the message does not expire. Any non-zero value is the amount of time, measured in milliseconds, that has elapsed since midnight, January 1, 1970, UTC, at which the message will expire." + }, + "JMSType": { + "type": [ + "string", + "null" + ], + "description": "The type of message. Some JMS providers use a message repository that contains the definitions of messages sent by applications. The 'JMSType' header field may reference a message's definition in the provider's repository. The JMS API does not define a standard message definition repository, nor does it define a naming policy for the definitions it contains. Some messaging systems require that a message type definition for each application message be created and that each message specify its type. In order to work with such JMS providers, JMS clients should assign a value to 'JMSType', whether the application makes use of it or not. This ensures that the field is properly set for those providers that require it." + }, + "JMSCorrelationID": { + "type": [ + "string", + "null" + ], + "description": "The correlation identifier of the message. A client can use the 'JMSCorrelationID' header field to link one message with another. A typical use is to link a response message with its request message. Since each message sent by a JMS provider is assigned a message ID value, it is convenient to link messages via message ID, such message ID values must start with the 'ID:' prefix. Conversely, application-specified values must not start with the 'ID:' prefix; this is reserved for provider-generated message ID values." + }, + "JMSReplyTo": { + "type": "string", + "description": "The queue or topic that the message sender expects replies to." } } }, - "bindingVersion": "0.2.0" + "bindingVersion": "0.0.1" } ] }, - "http://asyncapi.com/bindings/amqp/0.3.0/message.json": { - "$id": "http://asyncapi.com/bindings/amqp/0.3.0/message.json", - "title": "AMQP message bindings object", - "description": "This object contains information about the message representation in AMQP.", + "../../bindings/ibmmq/0.1.0/message.json": { + "$id": "../../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": { @@ -4100,108 +3765,87 @@ } }, "properties": { - "contentEncoding": { + "type": { "type": "string", - "description": "A MIME encoding for the message content." + "enum": [ + "string", + "jms", + "binary" + ], + "default": "string", + "description": "The type of the message." }, - "messageType": { + "headers": { "type": "string", - "description": "Application-specific message type." + "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.3.0" + "0.1.0" ], - "description": "The version of this binding. If omitted, \"latest\" MUST be assumed." + "description": "The version of this binding." } }, - "examples": [ + "oneOf": [ { - "contentEncoding": "gzip", - "messageType": "user.signup", - "bindingVersion": "0.3.0" - } - ] - }, - "http://asyncapi.com/bindings/mqtt/0.2.0/message.json": { - "$id": "http://asyncapi.com/bindings/mqtt/0.2.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": { - "payloadFormatIndicator": { - "type": "integer", - "enum": [ - 0, - 1 - ], - "description": "1 indicates that the payload is UTF-8 encoded character data. 0 indicates that the payload format is unspecified.", - "default": 0 - }, - "correlationData": { - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" - }, - { - "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + "properties": { + "type": { + "const": "binary" } - ], - "description": "Correlation Data is used by the sender of the request message to identify which request the response message is for when it is received." - }, - "contentType": { - "type": "string", - "description": "String describing the content type of the message payload. This should not conflict with the contentType field of the associated AsyncAPI Message object." + } }, - "responseTopic": { - "oneOf": [ - { - "type": "string", - "format": "uri-template", - "minLength": 1 - }, - { - "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" - }, - { - "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + { + "properties": { + "type": { + "const": "jms" } - ], - "description": "The topic (channel URI) to be used for a response message." + }, + "not": { + "required": [ + "headers" + ] + } }, - "bindingVersion": { - "type": "string", - "enum": [ - "0.2.0" - ], - "description": "The version of this binding. If omitted, 'latest' MUST be assumed." + { + "properties": { + "type": { + "const": "string" + } + }, + "not": { + "required": [ + "headers" + ] + } } - }, + ], "examples": [ { - "bindingVersion": "0.2.0" + "type": "string", + "bindingVersion": "0.1.0" }, { - "contentType": "application/json", - "correlationData": { - "type": "string", - "format": "uuid" - }, - "responseTopic": "application/responses", - "bindingVersion": "0.2.0" + "type": "jms", + "description": "JMS stream message", + "bindingVersion": "0.1.0" } ] }, - "http://asyncapi.com/bindings/kafka/0.5.0/message.json": { - "$id": "http://asyncapi.com/bindings/kafka/0.5.0/message.json", - "title": "Message Schema", + "../../bindings/googlepubsub/0.2.0/message.json": { + "$id": "../../bindings/googlepubsub/0.2.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": { @@ -4210,68 +3854,49 @@ } }, "properties": { - "key": { - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" - }, - { - "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" - } - ], - "description": "The message key." - }, - "schemaIdLocation": { + "bindingVersion": { "type": "string", - "description": "If a Schema Registry is used when performing this operation, tells where the id of schema is stored.", "enum": [ - "header", - "payload" - ] + "0.2.0" + ], + "description": "The version of this binding." }, - "schemaIdPayloadEncoding": { - "type": "string", - "description": "Number of bytes or vendor specific values when schema id is encoded in payload." + "attributes": { + "type": "object" }, - "schemaLookupStrategy": { - "type": "string", - "description": "Freeform string for any naming strategy class to use. Clients should default to the vendor default if not supplied." + "orderingKey": { + "type": "string" }, - "bindingVersion": { - "type": "string", - "enum": [ - "0.5.0" - ], - "description": "The version of this binding. If omitted, 'latest' MUST be assumed." + "schema": { + "type": "object", + "additionalItems": false, + "properties": { + "name": { + "type": "string" + } + }, + "required": [ + "name" + ] } }, "examples": [ { - "key": { - "type": "string", - "enum": [ - "myKey" - ] - }, - "schemaIdLocation": "payload", - "schemaIdPayloadEncoding": "apicurio-new", - "schemaLookupStrategy": "TopicIdStrategy", - "bindingVersion": "0.5.0" + "schema": { + "name": "projects/your-project-id/schemas/your-avro-schema-id" + } }, { - "key": { - "$ref": "path/to/user-create.avsc#/UserCreate" - }, - "schemaIdLocation": "payload", - "schemaIdPayloadEncoding": "4", - "bindingVersion": "0.5.0" + "schema": { + "name": "projects/your-project-id/schemas/your-protobuf-schema-id" + } } ] }, - "http://asyncapi.com/bindings/kafka/0.4.0/message.json": { - "$id": "http://asyncapi.com/bindings/kafka/0.4.0/message.json", - "title": "Message Schema", + "messageBindingsObject.json": { + "$id": "messageBindingsObject.json", "type": "object", + "description": "Map describing protocol-specific definitions for a message.", "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { @@ -4279,353 +3904,380 @@ } }, "properties": { - "key": { - "anyOf": [ + "http": { + "properties": { + "bindingVersion": { + "enum": [ + "0.2.0", + "0.3.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/http/0.3.0/message.json" + } }, { - "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.2.0" + } + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/http/0.2.0/message.json" + } }, { - "$ref": "http://asyncapi.com/definitions/3.0.0/avroSchema_v1.json" + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.3.0" + } + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/http/0.3.0/message.json" + } } - ], - "description": "The message key." - }, - "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" ] }, - "schemaIdPayloadEncoding": { - "type": "string", - "description": "Number of bytes or vendor specific values when schema id is encoded in payload." - }, - "schemaLookupStrategy": { - "type": "string", - "description": "Freeform string for any naming strategy class to use. Clients should default to the vendor default if not supplied." - }, - "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" - }, - { - "key": { - "$ref": "path/to/user-create.avsc#/UserCreate" + "ws": {}, + "amqp": { + "properties": { + "bindingVersion": { + "enum": [ + "0.3.0" + ] + } }, - "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." - }, - "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" + "allOf": [ + { + "description": "If no bindingVersion specified, use the latest binding", + "if": { + "not": { + "required": [ + "bindingVersion" + ] + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/amqp/0.3.0/message.json" + } + }, + { + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.3.0" + } + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/amqp/0.3.0/message.json" + } + } ] }, - "schemaIdPayloadEncoding": { - "type": "string", - "description": "Number of bytes or vendor specific values when schema id is encoded in payload." - }, - "schemaLookupStrategy": { - "type": "string", - "description": "Freeform string for any naming strategy class to use. Clients should default to the vendor default if not supplied." - }, - "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" - }, - { - "key": { - "$ref": "path/to/user-create.avsc#/UserCreate" + "amqp1": {}, + "mqtt": { + "properties": { + "bindingVersion": { + "enum": [ + "0.2.0" + ] + } }, - "schemaIdLocation": "payload", - "schemaIdPayloadEncoding": "4", - "bindingVersion": "0.3.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": { - "oneOf": [ + "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/mqtt/0.2.0/message.json" + } }, { - "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.2.0" + } + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/mqtt/0.2.0/message.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'." + ] }, - "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" - } + "kafka": { + "properties": { + "bindingVersion": { + "enum": [ + "0.5.0", + "0.4.0", + "0.3.0" + ] } }, - "bindingVersion": "0.0.1" - } - ] - }, - "http://asyncapi.com/bindings/jms/0.0.1/message.json": { - "$id": "http://asyncapi.com/bindings/jms/0.0.1/message.json", - "title": "Message Schema", - "description": "This object contains configuration for describing a JMS 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 JMS headers (protocol headers). This schema MUST be of type 'object' and have a 'properties' key. Examples of JMS protocol headers are 'JMSMessageID', 'JMSTimestamp', and 'JMSCorrelationID'." - }, - "bindingVersion": { - "type": "string", - "enum": [ - "0.0.1" - ], - "description": "The version of this binding. If omitted, 'latest' MUST be assumed." - } - }, - "examples": [ - { - "headers": { - "type": "object", - "required": [ - "JMSMessageID" - ], - "properties": { - "JMSMessageID": { - "type": [ - "string", - "null" - ], - "description": "A unique message identifier. This may be set by your JMS Provider on your behalf." - }, - "JMSTimestamp": { - "type": "integer", - "description": "The time the message was sent. This may be set by your JMS Provider on your behalf. The time the message was sent. The value of the timestamp is the amount of time, measured in milliseconds, that has elapsed since midnight, January 1, 1970, UTC." + "allOf": [ + { + "description": "If no bindingVersion specified, use the latest binding", + "if": { + "not": { + "required": [ + "bindingVersion" + ] + } }, - "JMSDeliveryMode": { - "type": "string", - "enum": [ - "PERSISTENT", - "NON_PERSISTENT" + "then": { + "$ref": "http://asyncapi.com/bindings/kafka/0.5.0/message.json" + } + }, + { + "if": { + "required": [ + "bindingVersion" ], - "default": "PERSISTENT", - "description": "Denotes the delivery mode for the message. This may be set by your JMS Provider on your behalf." - }, - "JMSPriority": { - "type": "integer", - "default": 4, - "description": "The priority of the message. This may be set by your JMS Provider on your behalf." - }, - "JMSExpires": { - "type": "integer", - "description": "The time at which the message expires. This may be set by your JMS Provider on your behalf. A value of zero means that the message does not expire. Any non-zero value is the amount of time, measured in milliseconds, that has elapsed since midnight, January 1, 1970, UTC, at which the message will expire." + "properties": { + "bindingVersion": { + "const": "0.5.0" + } + } }, - "JMSType": { - "type": [ - "string", - "null" + "then": { + "$ref": "http://asyncapi.com/bindings/kafka/0.5.0/message.json" + } + }, + { + "if": { + "required": [ + "bindingVersion" ], - "description": "The type of message. Some JMS providers use a message repository that contains the definitions of messages sent by applications. The 'JMSType' header field may reference a message's definition in the provider's repository. The JMS API does not define a standard message definition repository, nor does it define a naming policy for the definitions it contains. Some messaging systems require that a message type definition for each application message be created and that each message specify its type. In order to work with such JMS providers, JMS clients should assign a value to 'JMSType', whether the application makes use of it or not. This ensures that the field is properly set for those providers that require it." + "properties": { + "bindingVersion": { + "const": "0.4.0" + } + } }, - "JMSCorrelationID": { - "type": [ - "string", - "null" + "then": { + "$ref": "http://asyncapi.com/bindings/kafka/0.4.0/message.json" + } + }, + { + "if": { + "required": [ + "bindingVersion" ], - "description": "The correlation identifier of the message. A client can use the 'JMSCorrelationID' header field to link one message with another. A typical use is to link a response message with its request message. Since each message sent by a JMS provider is assigned a message ID value, it is convenient to link messages via message ID, such message ID values must start with the 'ID:' prefix. Conversely, application-specified values must not start with the 'ID:' prefix; this is reserved for provider-generated message ID values." + "properties": { + "bindingVersion": { + "const": "0.3.0" + } + } }, - "JMSReplyTo": { - "type": "string", - "description": "The queue or topic that the message sender expects replies to." + "then": { + "$ref": "http://asyncapi.com/bindings/kafka/0.3.0/message.json" } } - }, - "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-[\\w\\d\\.\\x2d_]+$": { - "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" - } - }, - "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": [ - { + "anypointmq": { "properties": { - "type": { - "const": "binary" + "bindingVersion": { + "enum": [ + "0.0.1" + ] } - } + }, + "allOf": [ + { + "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" + } + }, + { + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.0.1" + } + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/anypointmq/0.0.1/message.json" + } + } + ] }, - { + "nats": {}, + "jms": { "properties": { - "type": { - "const": "jms" + "bindingVersion": { + "enum": [ + "0.0.1" + ] } }, - "not": { - "required": [ - "headers" - ] - } + "allOf": [ + { + "description": "If no bindingVersion specified, use the latest binding", + "if": { + "not": { + "required": [ + "bindingVersion" + ] + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/jms/0.0.1/message.json" + } + }, + { + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.0.1" + } + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/jms/0.0.1/message.json" + } + } + ] }, - { + "sns": {}, + "sqs": {}, + "stomp": {}, + "redis": {}, + "ibmmq": { "properties": { - "type": { - "const": "string" + "bindingVersion": { + "enum": [ + "0.1.0" + ] } }, - "not": { - "required": [ - "headers" - ] - } - } - ], - "examples": [ - { - "type": "string", - "bindingVersion": "0.1.0" + "allOf": [ + { + "description": "If no bindingVersion specified, use the latest binding", + "if": { + "not": { + "required": [ + "bindingVersion" + ] + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/ibmmq/0.1.0/message.json" + } + }, + { + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.1.0" + } + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/ibmmq/0.1.0/message.json" + } + } + ] }, - { - "type": "jms", - "description": "JMS stream message", - "bindingVersion": "0.1.0" + "solace": {}, + "googlepubsub": { + "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/googlepubsub/0.2.0/message.json" + } + }, + { + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.2.0" + } + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/googlepubsub/0.2.0/message.json" + } + } + ] } - ] + } }, - "http://asyncapi.com/bindings/googlepubsub/0.2.0/message.json": { - "$id": "http://asyncapi.com/bindings/googlepubsub/0.2.0/message.json", - "title": "Cloud Pub/Sub Channel Schema", - "description": "This object contains information about the message representation for Google Cloud Pub/Sub.", + "messageTrait.json": { + "$id": "messageTrait.json", "type": "object", + "description": "Describes a trait that MAY be applied to a Message Object. This object MAY contain any property from the Message Object, except payload and traits.", "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { @@ -4633,49 +4285,95 @@ } }, "properties": { - "bindingVersion": { + "contentType": { "type": "string", - "enum": [ - "0.2.0" - ], - "description": "The version of this binding." - }, - "attributes": { - "type": "object" + "description": "The content type to use when encoding/decoding a message's payload. The value MUST be a specific media type (e.g. application/json). When omitted, the value MUST be the one specified on the defaultContentType field." }, - "orderingKey": { - "type": "string" + "headers": { + "$ref": "http://asyncapi.com/definitions/3.0.0/anySchema.json" }, - "schema": { - "type": "object", - "additionalItems": false, - "properties": { - "name": { - "type": "string" + "correlationId": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/correlationId.json" } + ] + }, + "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" + } + ] }, - "required": [ - "name" + "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." + }, + "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", + "description": "List of examples.", + "items": { + "type": "object" + } + }, + "bindings": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/messageBindingsObject.json" + } ] } }, "examples": [ { - "schema": { - "name": "projects/your-project-id/schemas/your-avro-schema-id" - } - }, - { - "schema": { - "name": "projects/your-project-id/schemas/your-protobuf-schema-id" - } + "contentType": "application/json" } ] }, - "http://asyncapi.com/definitions/3.0.0/messageTrait.json": { - "$id": "http://asyncapi.com/definitions/3.0.0/messageTrait.json", + "messageObject.json": { + "$id": "messageObject.json", "type": "object", - "description": "Describes a trait that MAY be applied to a Message Object. This object MAY contain any property from the Message Object, except payload and traits.", + "description": "Describes a message received on a given channel and operation.", "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { @@ -4690,6 +4388,9 @@ "headers": { "$ref": "http://asyncapi.com/definitions/3.0.0/anySchema.json" }, + "payload": { + "$ref": "http://asyncapi.com/definitions/3.0.0/anySchema.json" + }, "correlationId": { "oneOf": [ { @@ -4748,7 +4449,37 @@ "type": "array", "description": "List of examples.", "items": { - "type": "object" + "type": "object", + "additionalProperties": false, + "anyOf": [ + { + "required": [ + "payload" + ] + }, + { + "required": [ + "headers" + ] + } + ], + "properties": { + "name": { + "type": "string", + "description": "Machine readable name of the message example." + }, + "summary": { + "type": "string", + "description": "A brief summary of the message example." + }, + "headers": { + "type": "object", + "description": "Example of the application headers. It can be of any type." + }, + "payload": { + "description": "Example of the message payload. It can be of any type." + } + } } }, "bindings": { @@ -4760,16 +4491,116 @@ "$ref": "http://asyncapi.com/definitions/3.0.0/messageBindingsObject.json" } ] + }, + "traits": { + "type": "array", + "description": "A list of traits to apply to the message object. Traits MUST be merged using traits merge mechanism. The resulting object MUST be a valid Message Object.", + "items": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/messageTrait.json" + }, + { + "type": "array", + "items": [ + { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/messageTrait.json" + } + ] + }, + { + "type": "object", + "additionalItems": true + } + ] + } + ] + } } }, "examples": [ { - "contentType": "application/json" + "messageId": "userSignup", + "name": "UserSignup", + "title": "User signup", + "summary": "Action to sign a user up.", + "description": "A longer description", + "contentType": "application/json", + "tags": [ + { + "name": "user" + }, + { + "name": "signup" + }, + { + "name": "register" + } + ], + "headers": { + "type": "object", + "properties": { + "correlationId": { + "description": "Correlation ID set by application", + "type": "string" + }, + "applicationInstanceId": { + "description": "Unique identifier for a given instance of the publishing application", + "type": "string" + } + } + }, + "payload": { + "type": "object", + "properties": { + "user": { + "$ref": "#/components/schemas/userCreate" + }, + "signup": { + "$ref": "#/components/schemas/signup" + } + } + }, + "correlationId": { + "description": "Default Correlation ID", + "location": "$message.header#/correlationId" + }, + "traits": [ + { + "$ref": "#/components/messageTraits/commonHeaders" + } + ], + "examples": [ + { + "name": "SimpleSignup", + "summary": "A simple UserSignup example message", + "headers": { + "correlationId": "my-correlation-id", + "applicationInstanceId": "myInstanceId" + }, + "payload": { + "user": { + "someUserKey": "someUserValue" + }, + "signup": { + "someSignupKey": "someSignupValue" + } + } + } + ] } ] }, - "http://asyncapi.com/definitions/3.0.0/parameters.json": { - "$id": "http://asyncapi.com/definitions/3.0.0/parameters.json", + "channelMessages.json": { + "$id": "channelMessages.json", "type": "object", "additionalProperties": { "oneOf": [ @@ -4777,24 +4608,14 @@ "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" }, { - "$ref": "http://asyncapi.com/definitions/3.0.0/parameter.json" + "$ref": "http://asyncapi.com/definitions/3.0.0/messageObject.json" } ] }, - "description": "JSON objects describing re-usable channel parameters.", - "examples": [ - { - "address": "user/{userId}/signedup", - "parameters": { - "userId": { - "description": "Id of the user." - } - } - } - ] + "description": "A map of the messages that will be sent to this channel by any application at any time. **Every message sent to this channel MUST be valid against one, and only one, of the message objects defined in this map.**" }, - "http://asyncapi.com/definitions/3.0.0/parameter.json": { - "$id": "http://asyncapi.com/definitions/3.0.0/parameter.json", + "parameter.json": { + "$id": "parameter.json", "description": "Describes a parameter included in a channel address.", "additionalProperties": false, "patternProperties": { @@ -4843,452 +4664,240 @@ } ] }, - "http://asyncapi.com/definitions/3.0.0/channelBindingsObject.json": { - "$id": "http://asyncapi.com/definitions/3.0.0/channelBindingsObject.json", + "parameters.json": { + "$id": "parameters.json", "type": "object", - "description": "Map describing protocol-specific definitions for a channel.", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" - } - }, - "properties": { - "http": {}, - "ws": { - "properties": { - "bindingVersion": { - "enum": [ - "0.1.0" - ] - } + "additionalProperties": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" }, - "allOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/parameter.json" + } + ] + }, + "description": "JSON objects describing re-usable channel parameters.", + "examples": [ + { + "address": "user/{userId}/signedup", + "parameters": { + "userId": { + "description": "Id of the user." + } + } + } + ] + }, + "../../bindings/websockets/0.1.0/channel.json": { + "$id": "../../bindings/websockets/0.1.0/channel.json", + "title": "WebSockets channel bindings object", + "description": "When using WebSockets, the channel represents the connection. Unlike other protocols that support multiple virtual channels (topics, routing keys, etc.) per connection, WebSockets doesn't support virtual channels or, put it another way, there's only one channel and its characteristics are strongly related to the protocol used for the handshake, i.e., HTTP.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "properties": { + "method": { + "type": "string", + "enum": [ + "GET", + "POST" + ], + "description": "The HTTP method to use when establishing the connection. Its value MUST be either 'GET' or 'POST'." + }, + "query": { + "oneOf": [ { - "description": "If no bindingVersion specified, use the latest binding", - "if": { - "not": { - "required": [ - "bindingVersion" - ] - } - }, - "then": { - "$ref": "http://asyncapi.com/bindings/websockets/0.1.0/channel.json" - } + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" }, { - "if": { - "required": [ - "bindingVersion" - ], - "properties": { - "bindingVersion": { - "const": "0.1.0" - } - } - }, - "then": { - "$ref": "http://asyncapi.com/bindings/websockets/0.1.0/channel.json" - } + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" } - ] + ], + "description": "A Schema object containing the definitions for each query parameter. This schema MUST be of type 'object' and have a 'properties' key." }, - "amqp": { - "properties": { - "bindingVersion": { - "enum": [ - "0.3.0" - ] - } - }, - "allOf": [ + "headers": { + "oneOf": [ { - "description": "If no bindingVersion specified, use the latest binding", - "if": { - "not": { - "required": [ - "bindingVersion" - ] - } - }, - "then": { - "$ref": "http://asyncapi.com/bindings/amqp/0.3.0/channel.json" - } + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" }, { - "if": { - "required": [ - "bindingVersion" - ], - "properties": { - "bindingVersion": { - "const": "0.3.0" - } - } - }, - "then": { - "$ref": "http://asyncapi.com/bindings/amqp/0.3.0/channel.json" - } + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" } - ] + ], + "description": "A Schema object containing the definitions of the HTTP headers to use when establishing the connection. This schema MUST be of type 'object' and have a 'properties' key." }, - "amqp1": {}, - "mqtt": {}, - "kafka": { + "bindingVersion": { + "type": "string", + "enum": [ + "0.1.0" + ], + "description": "The version of this binding. If omitted, 'latest' MUST be assumed." + } + }, + "examples": [ + { + "method": "POST", + "bindingVersion": "0.1.0" + } + ] + }, + "../../bindings/amqp/0.3.0/channel.json": { + "$id": "../../bindings/amqp/0.3.0/channel.json", + "title": "AMQP channel bindings object", + "description": "This object contains information about the channel representation in AMQP.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "properties": { + "is": { + "type": "string", + "enum": [ + "queue", + "routingKey" + ], + "description": "Defines what type of channel is it. Can be either 'queue' or 'routingKey' (default)." + }, + "exchange": { + "type": "object", "properties": { - "bindingVersion": { + "name": { + "type": "string", + "maxLength": 255, + "description": "The name of the exchange. It MUST NOT exceed 255 characters long." + }, + "type": { + "type": "string", "enum": [ - "0.5.0", - "0.4.0", - "0.3.0" - ] - } - }, - "allOf": [ - { - "description": "If no bindingVersion specified, use the latest binding", - "if": { - "not": { - "required": [ - "bindingVersion" - ] - } - }, - "then": { - "$ref": "http://asyncapi.com/bindings/kafka/0.5.0/channel.json" - } + "topic", + "direct", + "fanout", + "default", + "headers" + ], + "description": "The type of the exchange. Can be either 'topic', 'direct', 'fanout', 'default' or 'headers'." }, - { - "if": { - "required": [ - "bindingVersion" - ], - "properties": { - "bindingVersion": { - "const": "0.5.0" - } - } - }, - "then": { - "$ref": "http://asyncapi.com/bindings/kafka/0.5.0/channel.json" - } + "durable": { + "type": "boolean", + "description": "Whether the exchange should survive broker restarts or not." }, - { - "if": { - "required": [ - "bindingVersion" - ], - "properties": { - "bindingVersion": { - "const": "0.4.0" - } - } - }, - "then": { - "$ref": "http://asyncapi.com/bindings/kafka/0.4.0/channel.json" - } + "autoDelete": { + "type": "boolean", + "description": "Whether the exchange should be deleted when the last queue is unbound from it." }, - { - "if": { - "required": [ - "bindingVersion" - ], - "properties": { - "bindingVersion": { - "const": "0.3.0" - } - } - }, - "then": { - "$ref": "http://asyncapi.com/bindings/kafka/0.3.0/channel.json" - } + "vhost": { + "type": "string", + "default": "/", + "description": "The virtual host of the exchange. Defaults to '/'." } - ] + }, + "description": "When is=routingKey, this object defines the exchange properties." }, - "anypointmq": { + "queue": { + "type": "object", "properties": { - "bindingVersion": { - "enum": [ - "0.0.1" - ] - } - }, - "allOf": [ - { - "description": "If no bindingVersion specified, use the latest binding", - "if": { - "not": { - "required": [ - "bindingVersion" - ] - } - }, - "then": { - "$ref": "http://asyncapi.com/bindings/anypointmq/0.0.1/channel.json" - } + "name": { + "type": "string", + "maxLength": 255, + "description": "The name of the queue. It MUST NOT exceed 255 characters long." }, - { - "if": { - "required": [ - "bindingVersion" - ], - "properties": { - "bindingVersion": { - "const": "0.0.1" - } - } - }, - "then": { - "$ref": "http://asyncapi.com/bindings/anypointmq/0.0.1/channel.json" - } - } - ] - }, - "nats": {}, - "jms": { - "properties": { - "bindingVersion": { - "enum": [ - "0.0.1" - ] - } - }, - "allOf": [ - { - "description": "If no bindingVersion specified, use the latest binding", - "if": { - "not": { - "required": [ - "bindingVersion" - ] - } - }, - "then": { - "$ref": "http://asyncapi.com/bindings/jms/0.0.1/channel.json" - } + "durable": { + "type": "boolean", + "description": "Whether the queue should survive broker restarts or not." }, - { - "if": { - "required": [ - "bindingVersion" - ], - "properties": { - "bindingVersion": { - "const": "0.0.1" - } - } - }, - "then": { - "$ref": "http://asyncapi.com/bindings/jms/0.0.1/channel.json" - } - } - ] - }, - "sns": { - "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/sns/0.1.0/channel.json" - } + "exclusive": { + "type": "boolean", + "description": "Whether the queue should be used only by one connection or not." }, - { - "if": { - "required": [ - "bindingVersion" - ], - "properties": { - "bindingVersion": { - "const": "0.1.0" - } - } - }, - "then": { - "$ref": "http://asyncapi.com/bindings/sns/0.1.0/channel.json" - } + "autoDelete": { + "type": "boolean", + "description": "Whether the queue should be deleted when the last consumer unsubscribes." + }, + "vhost": { + "type": "string", + "default": "/", + "description": "The virtual host of the queue. Defaults to '/'." } - ] + }, + "description": "When is=queue, this object defines the queue properties." }, - "sqs": { + "bindingVersion": { + "type": "string", + "enum": [ + "0.3.0" + ], + "description": "The version of this binding. If omitted, 'latest' MUST be assumed." + } + }, + "oneOf": [ + { "properties": { - "bindingVersion": { - "enum": [ - "0.2.0" - ] + "is": { + "const": "routingKey" } }, - "allOf": [ - { - "description": "If no bindingVersion specified, use the latest binding", - "if": { - "not": { - "required": [ - "bindingVersion" - ] - } - }, - "then": { - "$ref": "http://asyncapi.com/bindings/sqs/0.2.0/channel.json" - } - }, - { - "if": { - "required": [ - "bindingVersion" - ], - "properties": { - "bindingVersion": { - "const": "0.2.0" - } - } - }, - "then": { - "$ref": "http://asyncapi.com/bindings/sqs/0.2.0/channel.json" - } - } - ] + "required": [ + "exchange" + ], + "not": { + "required": [ + "queue" + ] + } }, - "stomp": {}, - "redis": {}, - "ibmmq": { + { "properties": { - "bindingVersion": { - "enum": [ - "0.1.0" - ] + "is": { + "const": "queue" } }, - "allOf": [ - { - "description": "If no bindingVersion specified, use the latest binding", - "if": { - "not": { - "required": [ - "bindingVersion" - ] - } - }, - "then": { - "$ref": "http://asyncapi.com/bindings/ibmmq/0.1.0/channel.json" - } - }, - { - "if": { - "required": [ - "bindingVersion" - ], - "properties": { - "bindingVersion": { - "const": "0.1.0" - } - } - }, - "then": { - "$ref": "http://asyncapi.com/bindings/ibmmq/0.1.0/channel.json" - } - } - ] + "required": [ + "queue" + ], + "not": { + "required": [ + "exchange" + ] + } + } + ], + "examples": [ + { + "is": "routingKey", + "exchange": { + "name": "myExchange", + "type": "topic", + "durable": true, + "autoDelete": false, + "vhost": "/" + }, + "bindingVersion": "0.3.0" }, - "solace": {}, - "googlepubsub": { - "properties": { - "bindingVersion": { - "enum": [ - "0.2.0" - ] - } + { + "is": "queue", + "queue": { + "name": "my-queue-name", + "durable": true, + "exclusive": true, + "autoDelete": false, + "vhost": "/" }, - "allOf": [ - { - "description": "If no bindingVersion specified, use the latest binding", - "if": { - "not": { - "required": [ - "bindingVersion" - ] - } - }, - "then": { - "$ref": "http://asyncapi.com/bindings/googlepubsub/0.2.0/channel.json" - } - }, - { - "if": { - "required": [ - "bindingVersion" - ], - "properties": { - "bindingVersion": { - "const": "0.2.0" - } - } - }, - "then": { - "$ref": "http://asyncapi.com/bindings/googlepubsub/0.2.0/channel.json" - } - } - ] - }, - "pulsar": { - "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/pulsar/0.1.0/channel.json" - } - }, - { - "if": { - "required": [ - "bindingVersion" - ], - "properties": { - "bindingVersion": { - "const": "0.1.0" - } - } - }, - "then": { - "$ref": "http://asyncapi.com/bindings/pulsar/0.1.0/channel.json" - } - } - ] + "bindingVersion": "0.3.0" } - } + ] }, - "http://asyncapi.com/bindings/websockets/0.1.0/channel.json": { - "$id": "http://asyncapi.com/bindings/websockets/0.1.0/channel.json", - "title": "WebSockets channel bindings object", - "description": "When using WebSockets, the channel represents the connection. Unlike other protocols that support multiple virtual channels (topics, routing keys, etc.) per connection, WebSockets doesn't support virtual channels or, put it another way, there's only one channel and its characteristics are strongly related to the protocol used for the handshake, i.e., HTTP.", + "../../bindings/kafka/0.5.0/channel.json": { + "$id": "../../bindings/kafka/0.5.0/channel.json", + "title": "Channel Schema", + "description": "This object contains information about the channel representation in Kafka.", "type": "object", "additionalProperties": false, "patternProperties": { @@ -5297,55 +4906,95 @@ } }, "properties": { - "method": { + "topic": { "type": "string", - "enum": [ - "GET", - "POST" - ], - "description": "The HTTP method to use when establishing the connection. Its value MUST be either 'GET' or 'POST'." + "description": "Kafka topic name if different from channel name." }, - "query": { - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" - }, - { - "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" - } - ], - "description": "A Schema object containing the definitions for each query parameter. This schema MUST be of type 'object' and have a 'properties' key." + "partitions": { + "type": "integer", + "minimum": 1, + "description": "Number of partitions configured on this topic." }, - "headers": { - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" + "replicas": { + "type": "integer", + "minimum": 1, + "description": "Number of replicas configured on this topic." + }, + "topicConfiguration": { + "description": "Topic configuration properties that are relevant for the API.", + "type": "object", + "additionalProperties": true, + "properties": { + "cleanup.policy": { + "description": "The [`cleanup.policy`](https://kafka.apache.org/documentation/#topicconfigs_cleanup.policy) configuration option.", + "type": "array", + "items": { + "type": "string", + "enum": [ + "compact", + "delete" + ] + } }, - { - "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + "retention.ms": { + "description": "The [`retention.ms`](https://kafka.apache.org/documentation/#topicconfigs_retention.ms) configuration option.", + "type": "integer", + "minimum": -1 + }, + "retention.bytes": { + "description": "The [`retention.bytes`](https://kafka.apache.org/documentation/#topicconfigs_retention.bytes) configuration option.", + "type": "integer", + "minimum": -1 + }, + "delete.retention.ms": { + "description": "The [`delete.retention.ms`](https://kafka.apache.org/documentation/#topicconfigs_delete.retention.ms) configuration option.", + "type": "integer", + "minimum": 0 + }, + "max.message.bytes": { + "description": "The [`max.message.bytes`](https://kafka.apache.org/documentation/#topicconfigs_max.message.bytes) configuration option.", + "type": "integer", + "minimum": 0 + }, + "confluent.key.schema.validation": { + "description": "It shows whether the schema validation for the message key is enabled. Vendor specific config. For more details: (https://docs.confluent.io/platform/current/installation/configuration/topic-configs.html#confluent-key-schema-validation)", + "type": "boolean" + }, + "confluent.key.subject.name.strategy": { + "description": "The name of the schema lookup strategy for the message key. Vendor specific config. For more details: (https://docs.confluent.io/platform/current/installation/configuration/topic-configs.html#confluent-key-subject-name-strategy)", + "type": "string" + }, + "confluent.value.schema.validation": { + "description": "It shows whether the schema validation for the message value is enabled. Vendor specific config. For more details: (https://docs.confluent.io/platform/current/installation/configuration/topic-configs.html#confluent-value-schema-validation)", + "type": "boolean" + }, + "confluent.value.subject.name.strategy": { + "description": "The name of the schema lookup strategy for the message value. Vendor specific config. For more details: (https://docs.confluent.io/platform/current/installation/configuration/topic-configs.html#confluent-value-subject-name-strategy)", + "type": "string" } - ], - "description": "A Schema object containing the definitions of the HTTP headers to use when establishing the connection. This schema MUST be of type 'object' and have a 'properties' key." + } }, "bindingVersion": { "type": "string", "enum": [ - "0.1.0" + "0.5.0" ], "description": "The version of this binding. If omitted, 'latest' MUST be assumed." } }, "examples": [ { - "method": "POST", - "bindingVersion": "0.1.0" + "topic": "my-specific-topic", + "partitions": 20, + "replicas": 3, + "bindingVersion": "0.5.0" } ] }, - "http://asyncapi.com/bindings/amqp/0.3.0/channel.json": { - "$id": "http://asyncapi.com/bindings/amqp/0.3.0/channel.json", - "title": "AMQP channel bindings object", - "description": "This object contains information about the channel representation in AMQP.", + "../../bindings/kafka/0.4.0/channel.json": { + "$id": "../../bindings/kafka/0.4.0/channel.json", + "title": "Channel Schema", + "description": "This object contains information about the channel representation in Kafka.", "type": "object", "additionalProperties": false, "patternProperties": { @@ -5354,302 +5003,57 @@ } }, "properties": { - "is": { + "topic": { "type": "string", - "enum": [ - "queue", - "routingKey" - ], - "description": "Defines what type of channel is it. Can be either 'queue' or 'routingKey' (default)." + "description": "Kafka topic name if different from channel name." }, - "exchange": { + "partitions": { + "type": "integer", + "minimum": 1, + "description": "Number of partitions configured on this topic." + }, + "replicas": { + "type": "integer", + "minimum": 1, + "description": "Number of replicas configured on this topic." + }, + "topicConfiguration": { + "description": "Topic configuration properties that are relevant for the API.", "type": "object", + "additionalProperties": false, "properties": { - "name": { - "type": "string", - "maxLength": 255, - "description": "The name of the exchange. It MUST NOT exceed 255 characters long." + "cleanup.policy": { + "description": "The [`cleanup.policy`](https://kafka.apache.org/documentation/#topicconfigs_cleanup.policy) configuration option.", + "type": "array", + "items": { + "type": "string", + "enum": [ + "compact", + "delete" + ] + } }, - "type": { - "type": "string", - "enum": [ - "topic", - "direct", - "fanout", - "default", - "headers" - ], - "description": "The type of the exchange. Can be either 'topic', 'direct', 'fanout', 'default' or 'headers'." + "retention.ms": { + "description": "The [`retention.ms`](https://kafka.apache.org/documentation/#topicconfigs_retention.ms) configuration option.", + "type": "integer", + "minimum": -1 }, - "durable": { - "type": "boolean", - "description": "Whether the exchange should survive broker restarts or not." + "retention.bytes": { + "description": "The [`retention.bytes`](https://kafka.apache.org/documentation/#topicconfigs_retention.bytes) configuration option.", + "type": "integer", + "minimum": -1 }, - "autoDelete": { - "type": "boolean", - "description": "Whether the exchange should be deleted when the last queue is unbound from it." + "delete.retention.ms": { + "description": "The [`delete.retention.ms`](https://kafka.apache.org/documentation/#topicconfigs_delete.retention.ms) configuration option.", + "type": "integer", + "minimum": 0 }, - "vhost": { - "type": "string", - "default": "/", - "description": "The virtual host of the exchange. Defaults to '/'." + "max.message.bytes": { + "description": "The [`max.message.bytes`](https://kafka.apache.org/documentation/#topicconfigs_max.message.bytes) configuration option.", + "type": "integer", + "minimum": 0 } - }, - "description": "When is=routingKey, this object defines the exchange properties." - }, - "queue": { - "type": "object", - "properties": { - "name": { - "type": "string", - "maxLength": 255, - "description": "The name of the queue. It MUST NOT exceed 255 characters long." - }, - "durable": { - "type": "boolean", - "description": "Whether the queue should survive broker restarts or not." - }, - "exclusive": { - "type": "boolean", - "description": "Whether the queue should be used only by one connection or not." - }, - "autoDelete": { - "type": "boolean", - "description": "Whether the queue should be deleted when the last consumer unsubscribes." - }, - "vhost": { - "type": "string", - "default": "/", - "description": "The virtual host of the queue. Defaults to '/'." - } - }, - "description": "When is=queue, this object defines the queue properties." - }, - "bindingVersion": { - "type": "string", - "enum": [ - "0.3.0" - ], - "description": "The version of this binding. If omitted, 'latest' MUST be assumed." - } - }, - "oneOf": [ - { - "properties": { - "is": { - "const": "routingKey" - } - }, - "required": [ - "exchange" - ], - "not": { - "required": [ - "queue" - ] - } - }, - { - "properties": { - "is": { - "const": "queue" - } - }, - "required": [ - "queue" - ], - "not": { - "required": [ - "exchange" - ] - } - } - ], - "examples": [ - { - "is": "routingKey", - "exchange": { - "name": "myExchange", - "type": "topic", - "durable": true, - "autoDelete": false, - "vhost": "/" - }, - "bindingVersion": "0.3.0" - }, - { - "is": "queue", - "queue": { - "name": "my-queue-name", - "durable": true, - "exclusive": true, - "autoDelete": false, - "vhost": "/" - }, - "bindingVersion": "0.3.0" - } - ] - }, - "http://asyncapi.com/bindings/kafka/0.5.0/channel.json": { - "$id": "http://asyncapi.com/bindings/kafka/0.5.0/channel.json", - "title": "Channel Schema", - "description": "This object contains information about the channel representation in Kafka.", - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" - } - }, - "properties": { - "topic": { - "type": "string", - "description": "Kafka topic name if different from channel name." - }, - "partitions": { - "type": "integer", - "minimum": 1, - "description": "Number of partitions configured on this topic." - }, - "replicas": { - "type": "integer", - "minimum": 1, - "description": "Number of replicas configured on this topic." - }, - "topicConfiguration": { - "description": "Topic configuration properties that are relevant for the API.", - "type": "object", - "additionalProperties": true, - "properties": { - "cleanup.policy": { - "description": "The [`cleanup.policy`](https://kafka.apache.org/documentation/#topicconfigs_cleanup.policy) configuration option.", - "type": "array", - "items": { - "type": "string", - "enum": [ - "compact", - "delete" - ] - } - }, - "retention.ms": { - "description": "The [`retention.ms`](https://kafka.apache.org/documentation/#topicconfigs_retention.ms) configuration option.", - "type": "integer", - "minimum": -1 - }, - "retention.bytes": { - "description": "The [`retention.bytes`](https://kafka.apache.org/documentation/#topicconfigs_retention.bytes) configuration option.", - "type": "integer", - "minimum": -1 - }, - "delete.retention.ms": { - "description": "The [`delete.retention.ms`](https://kafka.apache.org/documentation/#topicconfigs_delete.retention.ms) configuration option.", - "type": "integer", - "minimum": 0 - }, - "max.message.bytes": { - "description": "The [`max.message.bytes`](https://kafka.apache.org/documentation/#topicconfigs_max.message.bytes) configuration option.", - "type": "integer", - "minimum": 0 - }, - "confluent.key.schema.validation": { - "description": "It shows whether the schema validation for the message key is enabled. Vendor specific config. For more details: (https://docs.confluent.io/platform/current/installation/configuration/topic-configs.html#confluent-key-schema-validation)", - "type": "boolean" - }, - "confluent.key.subject.name.strategy": { - "description": "The name of the schema lookup strategy for the message key. Vendor specific config. For more details: (https://docs.confluent.io/platform/current/installation/configuration/topic-configs.html#confluent-key-subject-name-strategy)", - "type": "string" - }, - "confluent.value.schema.validation": { - "description": "It shows whether the schema validation for the message value is enabled. Vendor specific config. For more details: (https://docs.confluent.io/platform/current/installation/configuration/topic-configs.html#confluent-value-schema-validation)", - "type": "boolean" - }, - "confluent.value.subject.name.strategy": { - "description": "The name of the schema lookup strategy for the message value. Vendor specific config. For more details: (https://docs.confluent.io/platform/current/installation/configuration/topic-configs.html#confluent-value-subject-name-strategy)", - "type": "string" - } - } - }, - "bindingVersion": { - "type": "string", - "enum": [ - "0.5.0" - ], - "description": "The version of this binding. If omitted, 'latest' MUST be assumed." - } - }, - "examples": [ - { - "topic": "my-specific-topic", - "partitions": 20, - "replicas": 3, - "bindingVersion": "0.5.0" - } - ] - }, - "http://asyncapi.com/bindings/kafka/0.4.0/channel.json": { - "$id": "http://asyncapi.com/bindings/kafka/0.4.0/channel.json", - "title": "Channel Schema", - "description": "This object contains information about the channel representation in Kafka.", - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" - } - }, - "properties": { - "topic": { - "type": "string", - "description": "Kafka topic name if different from channel name." - }, - "partitions": { - "type": "integer", - "minimum": 1, - "description": "Number of partitions configured on this topic." - }, - "replicas": { - "type": "integer", - "minimum": 1, - "description": "Number of replicas configured on this topic." - }, - "topicConfiguration": { - "description": "Topic configuration properties that are relevant for the API.", - "type": "object", - "additionalProperties": false, - "properties": { - "cleanup.policy": { - "description": "The [`cleanup.policy`](https://kafka.apache.org/documentation/#topicconfigs_cleanup.policy) configuration option.", - "type": "array", - "items": { - "type": "string", - "enum": [ - "compact", - "delete" - ] - } - }, - "retention.ms": { - "description": "The [`retention.ms`](https://kafka.apache.org/documentation/#topicconfigs_retention.ms) configuration option.", - "type": "integer", - "minimum": -1 - }, - "retention.bytes": { - "description": "The [`retention.bytes`](https://kafka.apache.org/documentation/#topicconfigs_retention.bytes) configuration option.", - "type": "integer", - "minimum": -1 - }, - "delete.retention.ms": { - "description": "The [`delete.retention.ms`](https://kafka.apache.org/documentation/#topicconfigs_delete.retention.ms) configuration option.", - "type": "integer", - "minimum": 0 - }, - "max.message.bytes": { - "description": "The [`max.message.bytes`](https://kafka.apache.org/documentation/#topicconfigs_max.message.bytes) configuration option.", - "type": "integer", - "minimum": 0 - } - } + } }, "bindingVersion": { "type": "string", @@ -5668,8 +5072,8 @@ } ] }, - "http://asyncapi.com/bindings/kafka/0.3.0/channel.json": { - "$id": "http://asyncapi.com/bindings/kafka/0.3.0/channel.json", + "../../bindings/kafka/0.3.0/channel.json": { + "$id": "../../bindings/kafka/0.3.0/channel.json", "title": "Channel Schema", "description": "This object contains information about the channel representation in Kafka.", "type": "object", @@ -5711,8 +5115,8 @@ } ] }, - "http://asyncapi.com/bindings/anypointmq/0.0.1/channel.json": { - "$id": "http://asyncapi.com/bindings/anypointmq/0.0.1/channel.json", + "../../bindings/anypointmq/0.0.1/channel.json": { + "$id": "../../bindings/anypointmq/0.0.1/channel.json", "title": "Anypoint MQ channel bindings object", "description": "This object contains configuration for describing an Anypoint MQ exchange, queue, or FIFO queue as an AsyncAPI channel. This objects only contains configuration that can not be provided in the AsyncAPI standard channel object.", "type": "object", @@ -5753,8 +5157,8 @@ } ] }, - "http://asyncapi.com/bindings/jms/0.0.1/channel.json": { - "$id": "http://asyncapi.com/bindings/jms/0.0.1/channel.json", + "../../bindings/jms/0.0.1/channel.json": { + "$id": "../../bindings/jms/0.0.1/channel.json", "title": "Channel Schema", "description": "This object contains configuration for describing a JMS queue, or FIFO queue as an AsyncAPI channel. This objects only contains configuration that can not be provided in the AsyncAPI standard channel object.", "type": "object", @@ -5794,8 +5198,8 @@ } ] }, - "http://asyncapi.com/bindings/sns/0.1.0/channel.json": { - "$id": "http://asyncapi.com/bindings/sns/0.1.0/channel.json", + "../../bindings/sns/0.1.0/channel.json": { + "$id": "../../bindings/sns/0.1.0/channel.json", "title": "Channel Schema", "description": "This object contains information about the channel representation in SNS.", "type": "object", @@ -5943,8 +5347,8 @@ } ] }, - "http://asyncapi.com/bindings/sqs/0.2.0/channel.json": { - "$id": "http://asyncapi.com/bindings/sqs/0.2.0/channel.json", + "../../bindings/sqs/0.2.0/channel.json": { + "$id": "../../bindings/sqs/0.2.0/channel.json", "title": "Channel Schema", "description": "This object contains information about the channel representation in SQS.", "type": "object", @@ -5956,11 +5360,9 @@ }, "properties": { "queue": { - "description": "A definition of the queue that will be used as the channel.", "$ref": "http://asyncapi.com/bindings/sqs/0.2.0/channel.json#/definitions/queue" }, "deadLetterQueue": { - "description": "A definition of the queue that will be used for un-processable messages.", "$ref": "http://asyncapi.com/bindings/sqs/0.2.0/channel.json#/definitions/queue" }, "bindingVersion": { @@ -6212,8 +5614,8 @@ } ] }, - "http://asyncapi.com/bindings/ibmmq/0.1.0/channel.json": { - "$id": "http://asyncapi.com/bindings/ibmmq/0.1.0/channel.json", + "../../bindings/ibmmq/0.1.0/channel.json": { + "$id": "../../bindings/ibmmq/0.1.0/channel.json", "title": "IBM MQ channel bindings object", "description": "This object contains information about the channel representation in IBM MQ. Each channel corresponds to a Queue or Topic within IBM MQ.", "type": "object", @@ -6344,8 +5746,8 @@ } ] }, - "http://asyncapi.com/bindings/googlepubsub/0.2.0/channel.json": { - "$id": "http://asyncapi.com/bindings/googlepubsub/0.2.0/channel.json", + "../../bindings/googlepubsub/0.2.0/channel.json": { + "$id": "../../bindings/googlepubsub/0.2.0/channel.json", "title": "Cloud Pub/Sub Channel Schema", "description": "This object contains information about the channel representation for Google Cloud Pub/Sub.", "type": "object", @@ -6427,8 +5829,8 @@ } ] }, - "http://asyncapi.com/bindings/pulsar/0.1.0/channel.json": { - "$id": "http://asyncapi.com/bindings/pulsar/0.1.0/channel.json", + "../../bindings/pulsar/0.1.0/channel.json": { + "$id": "../../bindings/pulsar/0.1.0/channel.json", "title": "Channel Schema", "description": "This object contains information about the channel representation in Pulsar, which covers namespace and topic level admin configuration. This object contains additional information not possible to represent within the core AsyncAPI specification.", "type": "object", @@ -6518,130 +5920,495 @@ } ] }, - "http://asyncapi.com/definitions/3.0.0/operations.json": { - "$id": "http://asyncapi.com/definitions/3.0.0/operations.json", + "channelBindingsObject.json": { + "$id": "channelBindingsObject.json", "type": "object", - "description": "Holds a dictionary with all the operations this application MUST implement.", - "additionalProperties": { - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" - }, - { - "$ref": "http://asyncapi.com/definitions/3.0.0/operation.json" - } - ] - }, - "examples": [ - { - "onUserSignUp": { - "title": "User sign up", - "summary": "Action to sign a user up.", - "description": "A longer description", - "channel": { - "$ref": "#/channels/userSignup" + "description": "Map describing protocol-specific definitions for a channel.", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "properties": { + "http": {}, + "ws": { + "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/websockets/0.1.0/channel.json" + } }, - "action": "send", - "tags": [ - { - "name": "user" + { + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.1.0" + } + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/websockets/0.1.0/channel.json" + } + } + ] + }, + "amqp": { + "properties": { + "bindingVersion": { + "enum": [ + "0.3.0" + ] + } + }, + "allOf": [ + { + "description": "If no bindingVersion specified, use the latest binding", + "if": { + "not": { + "required": [ + "bindingVersion" + ] + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/amqp/0.3.0/channel.json" + } + }, + { + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.3.0" + } + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/amqp/0.3.0/channel.json" + } + } + ] + }, + "amqp1": {}, + "mqtt": {}, + "kafka": { + "properties": { + "bindingVersion": { + "enum": [ + "0.5.0", + "0.4.0", + "0.3.0" + ] + } + }, + "allOf": [ + { + "description": "If no bindingVersion specified, use the latest binding", + "if": { + "not": { + "required": [ + "bindingVersion" + ] + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/kafka/0.5.0/channel.json" + } + }, + { + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.5.0" + } + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/kafka/0.5.0/channel.json" + } + }, + { + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.4.0" + } + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/kafka/0.4.0/channel.json" + } + }, + { + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.3.0" + } + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/kafka/0.3.0/channel.json" + } + } + ] + }, + "anypointmq": { + "properties": { + "bindingVersion": { + "enum": [ + "0.0.1" + ] + } + }, + "allOf": [ + { + "description": "If no bindingVersion specified, use the latest binding", + "if": { + "not": { + "required": [ + "bindingVersion" + ] + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/anypointmq/0.0.1/channel.json" + } + }, + { + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.0.1" + } + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/anypointmq/0.0.1/channel.json" + } + } + ] + }, + "nats": {}, + "jms": { + "properties": { + "bindingVersion": { + "enum": [ + "0.0.1" + ] + } + }, + "allOf": [ + { + "description": "If no bindingVersion specified, use the latest binding", + "if": { + "not": { + "required": [ + "bindingVersion" + ] + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/jms/0.0.1/channel.json" + } + }, + { + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.0.1" + } + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/jms/0.0.1/channel.json" + } + } + ] + }, + "sns": { + "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/sns/0.1.0/channel.json" + } + }, + { + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.1.0" + } + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/sns/0.1.0/channel.json" + } + } + ] + }, + "sqs": { + "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/sqs/0.2.0/channel.json" + } + }, + { + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.2.0" + } + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/sqs/0.2.0/channel.json" + } + } + ] + }, + "stomp": {}, + "redis": {}, + "ibmmq": { + "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/ibmmq/0.1.0/channel.json" + } + }, + { + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.1.0" + } + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/ibmmq/0.1.0/channel.json" + } + } + ] + }, + "solace": {}, + "googlepubsub": { + "properties": { + "bindingVersion": { + "enum": [ + "0.2.0" + ] + } + }, + "allOf": [ + { + "description": "If no bindingVersion specified, use the latest binding", + "if": { + "not": { + "required": [ + "bindingVersion" + ] + } }, - { - "name": "signup" + "then": { + "$ref": "http://asyncapi.com/bindings/googlepubsub/0.2.0/channel.json" + } + }, + { + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.2.0" + } + } }, - { - "name": "register" + "then": { + "$ref": "http://asyncapi.com/bindings/googlepubsub/0.2.0/channel.json" } - ], - "bindings": { - "amqp": { - "ack": false + } + ] + }, + "pulsar": { + "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/pulsar/0.1.0/channel.json" } }, - "traits": [ - { - "$ref": "#/components/operationTraits/kafka" + { + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.1.0" + } + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/pulsar/0.1.0/channel.json" } - ] - } + } + ] } - ] + } }, - "http://asyncapi.com/definitions/3.0.0/operation.json": { - "$id": "http://asyncapi.com/definitions/3.0.0/operation.json", + "channel.json": { + "$id": "channel.json", "type": "object", - "description": "Describes a specific operation.", + "description": "Describes a shared communication channel.", "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" } }, - "required": [ - "action", - "channel" - ], "properties": { - "action": { - "type": "string", - "description": "Allowed values are send and receive. Use send when it's expected that the application will send a message to the given channel, and receive when the application should expect receiving messages from the given channel.", - "enum": [ - "send", - "receive" - ] - }, - "channel": { - "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + "address": { + "type": [ + "string", + "null" + ], + "description": "An optional string representation of this channel's address. The address is typically the \"topic name\", \"routing key\", \"event type\", or \"path\". When `null` or absent, it MUST be interpreted as unknown. This is useful when the address is generated dynamically at runtime or can't be known upfront. It MAY contain Channel Address Expressions." }, "messages": { - "type": "array", - "description": "A list of $ref pointers pointing to the supported Message Objects that can be processed by this operation. It MUST contain a subset of the messages defined in the channel referenced in this operation. Every message processed by this operation MUST be valid against one, and only one, of the message objects referenced in this list. Please note the messages property value MUST be a list of Reference Objects and, therefore, MUST NOT contain Message Objects. However, it is RECOMMENDED that parsers (or other software) dereference this property for a better development experience.", - "items": { - "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" - } - }, - "reply": { - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" - }, - { - "$ref": "http://asyncapi.com/definitions/3.0.0/operationReply.json" - } - ] + "$ref": "http://asyncapi.com/definitions/3.0.0/channelMessages.json" }, - "traits": { - "type": "array", - "description": "A list of traits to apply to the operation object. Traits MUST be merged using traits merge mechanism. The resulting object MUST be a valid Operation Object.", - "items": { - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" - }, - { - "$ref": "http://asyncapi.com/definitions/3.0.0/operationTrait.json" - } - ] - } + "parameters": { + "$ref": "http://asyncapi.com/definitions/3.0.0/parameters.json" }, "title": { "type": "string", - "description": "A human-friendly title for the operation." + "description": "A human-friendly title for the channel." }, "summary": { "type": "string", - "description": "A brief summary of the operation." + "description": "A brief summary of the channel." }, "description": { "type": "string", - "description": "A longer description of the operation. CommonMark is allowed." + "description": "A longer description of the channel. CommonMark is allowed." }, - "security": { - "$ref": "http://asyncapi.com/definitions/3.0.0/securityRequirements.json" + "servers": { + "type": "array", + "description": "The references of the servers on which this channel is available. If absent or empty then this channel must be available on all servers.", + "items": { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + "uniqueItems": true }, "tags": { "type": "array", - "description": "A list of tags for logical grouping and categorization of operations.", + "description": "A list of tags for logical grouping of channels.", "items": { "oneOf": [ { @@ -6670,105 +6437,87 @@ "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" }, { - "$ref": "http://asyncapi.com/definitions/3.0.0/operationBindingsObject.json" + "$ref": "http://asyncapi.com/definitions/3.0.0/channelBindingsObject.json" } ] } }, "examples": [ { - "title": "User sign up", - "summary": "Action to sign a user up.", - "description": "A longer description", - "channel": { - "$ref": "#/channels/userSignup" + "address": "users.{userId}", + "title": "Users channel", + "description": "This channel is used to exchange messages about user events.", + "messages": { + "userSignedUp": { + "$ref": "#/components/messages/userSignedUp" + }, + "userCompletedOrder": { + "$ref": "#/components/messages/userCompletedOrder" + } }, - "action": "send", - "security": [ - { - "petstore_auth": [ - "write:pets", - "read:pets" - ] + "parameters": { + "userId": { + "$ref": "#/components/parameters/userId" } - ], - "tags": [ - { - "name": "user" - }, + }, + "servers": [ { - "name": "signup" + "$ref": "#/servers/rabbitmqInProd" }, { - "name": "register" + "$ref": "#/servers/rabbitmqInStaging" } ], "bindings": { "amqp": { - "ack": false + "is": "queue", + "queue": { + "exclusive": true + } } }, - "traits": [ - { - "$ref": "#/components/operationTraits/kafka" - } - ], - "messages": [ + "tags": [ { - "$ref": "/components/messages/userSignedUp" + "name": "user", + "description": "User-related messages" } ], - "reply": { - "address": { - "location": "$message.header#/replyTo" - }, - "channel": { - "$ref": "#/channels/userSignupReply" - }, - "messages": [ - { - "$ref": "/components/messages/userSignedUpReply" - } - ] + "externalDocs": { + "description": "Find more info here", + "url": "https://example.com" } } ] }, - "http://asyncapi.com/definitions/3.0.0/operationReply.json": { - "$id": "http://asyncapi.com/definitions/3.0.0/operationReply.json", + "channels.json": { + "$id": "channels.json", "type": "object", - "description": "Describes the reply part that MAY be applied to an Operation Object. If an operation implements the request/reply pattern, the reply object represents the response message.", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" - } - }, - "properties": { - "address": { - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" - }, - { - "$ref": "http://asyncapi.com/definitions/3.0.0/operationReplyAddress.json" - } - ] - }, - "channel": { - "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" - }, - "messages": { - "type": "array", - "description": "A list of $ref pointers pointing to the supported Message Objects that can be processed by this operation as reply. It MUST contain a subset of the messages defined in the channel referenced in this operation reply. Every message processed by this operation MUST be valid against one, and only one, of the message objects referenced in this list. Please note the messages property value MUST be a list of Reference Objects and, therefore, MUST NOT contain Message Objects. However, it is RECOMMENDED that parsers (or other software) dereference this property for a better development experience.", - "items": { + "description": "An object containing all the Channel Object definitions the Application MUST use during runtime.", + "additionalProperties": { + "oneOf": [ + { "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/channel.json" + } + ] + }, + "examples": [ + { + "userSignedUp": { + "address": "user.signedup", + "messages": { + "userSignedUp": { + "$ref": "#/components/messages/userSignedUp" + } + } } } - } + ] }, - "http://asyncapi.com/definitions/3.0.0/operationReplyAddress.json": { - "$id": "http://asyncapi.com/definitions/3.0.0/operationReplyAddress.json", + "operationReplyAddress.json": { + "$id": "operationReplyAddress.json", "type": "object", "description": "An object that specifies where an operation has to send the reply", "additionalProperties": false, @@ -6798,10 +6547,10 @@ } ] }, - "http://asyncapi.com/definitions/3.0.0/operationTrait.json": { - "$id": "http://asyncapi.com/definitions/3.0.0/operationTrait.json", + "operationReply.json": { + "$id": "operationReply.json", "type": "object", - "description": "Describes a trait that MAY be applied to an Operation Object. This object MAY contain any property from the Operation Object, except the action, channel and traits ones.", + "description": "Describes the reply part that MAY be applied to an Operation Object. If an operation implements the request/reply pattern, the reply object represents the response message.", "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { @@ -6809,467 +6558,197 @@ } }, "properties": { - "title": { - "description": "A human-friendly title for the operation.", - "$ref": "http://asyncapi.com/definitions/3.0.0/operation.json#/properties/title" - }, - "summary": { - "description": "A short summary of what the operation is about.", - "$ref": "http://asyncapi.com/definitions/3.0.0/operation.json#/properties/summary" - }, - "description": { - "description": "A verbose explanation of the operation. CommonMark syntax can be used for rich text representation.", - "$ref": "http://asyncapi.com/definitions/3.0.0/operation.json#/properties/description" - }, - "security": { - "description": "A declaration of which security schemes are associated with this operation. Only one of the security scheme objects MUST be satisfied to authorize an operation. In cases where Server Security also applies, it MUST also be satisfied.", - "$ref": "http://asyncapi.com/definitions/3.0.0/operation.json#/properties/security" - }, - "tags": { - "description": "A list of tags for logical grouping and categorization of operations.", - "$ref": "http://asyncapi.com/definitions/3.0.0/operation.json#/properties/tags" - }, - "externalDocs": { - "description": "Additional external documentation for this operation.", - "$ref": "http://asyncapi.com/definitions/3.0.0/operation.json#/properties/externalDocs" - }, - "bindings": { - "description": "A map where the keys describe the name of the protocol and the values describe protocol-specific definitions for the operation.", + "address": { "oneOf": [ { "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" }, { - "$ref": "http://asyncapi.com/definitions/3.0.0/operationBindingsObject.json" + "$ref": "http://asyncapi.com/definitions/3.0.0/operationReplyAddress.json" } ] - } - }, - "examples": [ - { - "bindings": { - "amqp": { - "ack": false - } + }, + "channel": { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + "messages": { + "type": "array", + "description": "A list of $ref pointers pointing to the supported Message Objects that can be processed by this operation as reply. It MUST contain a subset of the messages defined in the channel referenced in this operation reply. Every message processed by this operation MUST be valid against one, and only one, of the message objects referenced in this list. Please note the messages property value MUST be a list of Reference Objects and, therefore, MUST NOT contain Message Objects. However, it is RECOMMENDED that parsers (or other software) dereference this property for a better development experience.", + "items": { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" } } - ] + } }, - "http://asyncapi.com/definitions/3.0.0/operationBindingsObject.json": { - "$id": "http://asyncapi.com/definitions/3.0.0/operationBindingsObject.json", + "operation.json": { + "$id": "operation.json", "type": "object", - "description": "Map describing protocol-specific definitions for an operation.", + "description": "Describes a specific operation.", "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" } }, + "required": [ + "action", + "channel" + ], "properties": { - "http": { - "properties": { - "bindingVersion": { - "enum": [ - "0.2.0", - "0.3.0" - ] - } - }, - "allOf": [ - { - "description": "If no bindingVersion specified, use the latest binding", - "if": { - "not": { - "required": [ - "bindingVersion" - ] - } - }, - "then": { - "$ref": "http://asyncapi.com/bindings/http/0.3.0/operation.json" - } - }, - { - "if": { - "required": [ - "bindingVersion" - ], - "properties": { - "bindingVersion": { - "const": "0.2.0" - } - } - }, - "then": { - "$ref": "http://asyncapi.com/bindings/http/0.2.0/operation.json" - } - }, - { - "if": { - "required": [ - "bindingVersion" - ], - "properties": { - "bindingVersion": { - "const": "0.3.0" - } - } - }, - "then": { - "$ref": "http://asyncapi.com/bindings/http/0.3.0/operation.json" - } - } + "action": { + "type": "string", + "description": "Allowed values are send and receive. Use send when it's expected that the application will send a message to the given channel, and receive when the application should expect receiving messages from the given channel.", + "enum": [ + "send", + "receive" ] }, - "ws": {}, - "amqp": { - "properties": { - "bindingVersion": { - "enum": [ - "0.3.0" - ] - } - }, - "allOf": [ - { - "description": "If no bindingVersion specified, use the latest binding", - "if": { - "not": { - "required": [ - "bindingVersion" - ] - } - }, - "then": { - "$ref": "http://asyncapi.com/bindings/amqp/0.3.0/operation.json" - } - }, - { - "if": { - "required": [ - "bindingVersion" - ], - "properties": { - "bindingVersion": { - "const": "0.3.0" - } - } - }, - "then": { - "$ref": "http://asyncapi.com/bindings/amqp/0.3.0/operation.json" - } - } - ] + "channel": { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" }, - "amqp1": {}, - "mqtt": { - "properties": { - "bindingVersion": { - "enum": [ - "0.2.0" - ] - } - }, - "allOf": [ + "messages": { + "type": "array", + "description": "A list of $ref pointers pointing to the supported Message Objects that can be processed by this operation. It MUST contain a subset of the messages defined in the channel referenced in this operation. Every message processed by this operation MUST be valid against one, and only one, of the message objects referenced in this list. Please note the messages property value MUST be a list of Reference Objects and, therefore, MUST NOT contain Message Objects. However, it is RECOMMENDED that parsers (or other software) dereference this property for a better development experience.", + "items": { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + } + }, + "reply": { + "oneOf": [ { - "description": "If no bindingVersion specified, use the latest binding", - "if": { - "not": { - "required": [ - "bindingVersion" - ] - } - }, - "then": { - "$ref": "http://asyncapi.com/bindings/mqtt/0.2.0/operation.json" - } + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" }, { - "if": { - "required": [ - "bindingVersion" - ], - "properties": { - "bindingVersion": { - "const": "0.2.0" - } - } - }, - "then": { - "$ref": "http://asyncapi.com/bindings/mqtt/0.2.0/operation.json" - } + "$ref": "http://asyncapi.com/definitions/3.0.0/operationReply.json" } ] }, - "kafka": { - "properties": { - "bindingVersion": { - "enum": [ - "0.5.0", - "0.4.0", - "0.3.0" - ] - } - }, - "allOf": [ - { - "description": "If no bindingVersion specified, use the latest binding", - "if": { - "not": { - "required": [ - "bindingVersion" - ] - } - }, - "then": { - "$ref": "http://asyncapi.com/bindings/kafka/0.5.0/operation.json" - } - }, - { - "if": { - "required": [ - "bindingVersion" - ], - "properties": { - "bindingVersion": { - "const": "0.5.0" - } - } - }, - "then": { - "$ref": "http://asyncapi.com/bindings/kafka/0.5.0/operation.json" - } - }, - { - "if": { - "required": [ - "bindingVersion" - ], - "properties": { - "bindingVersion": { - "const": "0.4.0" - } - } + "traits": { + "type": "array", + "description": "A list of traits to apply to the operation object. Traits MUST be merged using traits merge mechanism. The resulting object MUST be a valid Operation Object.", + "items": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" }, - "then": { - "$ref": "http://asyncapi.com/bindings/kafka/0.4.0/operation.json" + { + "$ref": "http://asyncapi.com/definitions/3.0.0/operationTrait.json" } - }, - { - "if": { - "required": [ - "bindingVersion" - ], - "properties": { - "bindingVersion": { - "const": "0.3.0" - } - } + ] + } + }, + "title": { + "type": "string", + "description": "A human-friendly title for the operation." + }, + "summary": { + "type": "string", + "description": "A brief summary of the operation." + }, + "description": { + "type": "string", + "description": "A longer description of the operation. CommonMark is allowed." + }, + "security": { + "$ref": "http://asyncapi.com/definitions/3.0.0/securityRequirements.json" + }, + "tags": { + "type": "array", + "description": "A list of tags for logical grouping and categorization of operations.", + "items": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" }, - "then": { - "$ref": "http://asyncapi.com/bindings/kafka/0.3.0/operation.json" + { + "$ref": "http://asyncapi.com/definitions/3.0.0/tag.json" } - } - ] - }, - "anypointmq": {}, - "nats": { - "properties": { - "bindingVersion": { - "enum": [ - "0.1.0" - ] - } + ] }, - "allOf": [ + "uniqueItems": true + }, + "externalDocs": { + "oneOf": [ { - "description": "If no bindingVersion specified, use the latest binding", - "if": { - "not": { - "required": [ - "bindingVersion" - ] - } - }, - "then": { - "$ref": "http://asyncapi.com/bindings/nats/0.1.0/operation.json" - } + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" }, { - "if": { - "required": [ - "bindingVersion" - ], - "properties": { - "bindingVersion": { - "const": "0.1.0" - } - } - }, - "then": { - "$ref": "http://asyncapi.com/bindings/nats/0.1.0/operation.json" - } + "$ref": "http://asyncapi.com/definitions/3.0.0/externalDocs.json" } ] }, - "jms": {}, - "sns": { - "properties": { - "bindingVersion": { - "enum": [ - "0.1.0" - ] - } - }, - "allOf": [ + "bindings": { + "oneOf": [ { - "description": "If no bindingVersion specified, use the latest binding", - "if": { - "not": { - "required": [ - "bindingVersion" - ] - } - }, - "then": { - "$ref": "http://asyncapi.com/bindings/sns/0.1.0/operation.json" - } + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" }, { - "if": { - "required": [ - "bindingVersion" - ], - "properties": { - "bindingVersion": { - "const": "0.1.0" - } - } - }, - "then": { - "$ref": "http://asyncapi.com/bindings/sns/0.1.0/operation.json" - } + "$ref": "http://asyncapi.com/definitions/3.0.0/operationBindingsObject.json" } ] - }, - "sqs": { - "properties": { - "bindingVersion": { - "enum": [ - "0.2.0" + } + }, + "examples": [ + { + "title": "User sign up", + "summary": "Action to sign a user up.", + "description": "A longer description", + "channel": { + "$ref": "#/channels/userSignup" + }, + "action": "send", + "security": [ + { + "petstore_auth": [ + "write:pets", + "read:pets" ] } - }, - "allOf": [ + ], + "tags": [ { - "description": "If no bindingVersion specified, use the latest binding", - "if": { - "not": { - "required": [ - "bindingVersion" - ] - } - }, - "then": { - "$ref": "http://asyncapi.com/bindings/sqs/0.2.0/operation.json" - } + "name": "user" }, { - "if": { - "required": [ - "bindingVersion" - ], - "properties": { - "bindingVersion": { - "const": "0.2.0" - } - } - }, - "then": { - "$ref": "http://asyncapi.com/bindings/sqs/0.2.0/operation.json" - } + "name": "signup" + }, + { + "name": "register" } - ] - }, - "stomp": {}, - "redis": {}, - "ibmmq": {}, - "solace": { - "properties": { - "bindingVersion": { - "enum": [ - "0.4.0", - "0.3.0", - "0.2.0" - ] + ], + "bindings": { + "amqp": { + "ack": false } }, - "allOf": [ + "traits": [ { - "description": "If no bindingVersion specified, use the latest binding", - "if": { - "not": { - "required": [ - "bindingVersion" - ] - } - }, - "then": { - "$ref": "http://asyncapi.com/bindings/solace/0.4.0/operation.json" - } - }, + "$ref": "#/components/operationTraits/kafka" + } + ], + "messages": [ { - "if": { - "required": [ - "bindingVersion" - ], - "properties": { - "bindingVersion": { - "const": "0.4.0" - } - } - }, - "then": { - "$ref": "http://asyncapi.com/bindings/solace/0.4.0/operation.json" - } + "$ref": "/components/messages/userSignedUp" + } + ], + "reply": { + "address": { + "location": "$message.header#/replyTo" }, - { - "if": { - "required": [ - "bindingVersion" - ], - "properties": { - "bindingVersion": { - "const": "0.3.0" - } - } - }, - "then": { - "$ref": "http://asyncapi.com/bindings/solace/0.3.0/operation.json" - } + "channel": { + "$ref": "#/channels/userSignupReply" }, - { - "if": { - "required": [ - "bindingVersion" - ], - "properties": { - "bindingVersion": { - "const": "0.2.0" - } - } - }, - "then": { - "$ref": "http://asyncapi.com/bindings/solace/0.2.0/operation.json" + "messages": [ + { + "$ref": "/components/messages/userSignedUpReply" } - } - ] - }, - "googlepubsub": {} - } + ] + } + } + ] }, - "http://asyncapi.com/bindings/http/0.3.0/operation.json": { - "$id": "http://asyncapi.com/bindings/http/0.3.0/operation.json", + "../../bindings/http/0.3.0/operation.json": { + "$id": "../../bindings/http/0.3.0/operation.json", "title": "HTTP operation bindings object", "description": "This object contains information about the operation representation in HTTP.", "type": "object", @@ -7296,8 +6775,7 @@ "description": "When 'type' is 'request', this is the HTTP method, otherwise it MUST be ignored. Its value MUST be one of 'GET', 'POST', 'PUT', 'PATCH', 'DELETE', 'HEAD', 'OPTIONS', 'CONNECT', and 'TRACE'." }, "query": { - "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json", - "description": "A Schema object containing the definitions for each query parameter. This schema MUST be of type 'object' and have a properties key." + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" }, "bindingVersion": { "type": "string", @@ -7345,8 +6823,8 @@ } ] }, - "http://asyncapi.com/bindings/http/0.2.0/operation.json": { - "$id": "http://asyncapi.com/bindings/http/0.2.0/operation.json", + "../../bindings/http/0.2.0/operation.json": { + "$id": "../../bindings/http/0.2.0/operation.json", "title": "HTTP operation bindings object", "description": "This object contains information about the operation representation in HTTP.", "type": "object", @@ -7373,8 +6851,7 @@ "description": "When 'type' is 'request', this is the HTTP method, otherwise it MUST be ignored. Its value MUST be one of 'GET', 'POST', 'PUT', 'PATCH', 'DELETE', 'HEAD', 'OPTIONS', 'CONNECT', and 'TRACE'." }, "query": { - "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json", - "description": "A Schema object containing the definitions for each query parameter. This schema MUST be of type 'object' and have a properties key." + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" }, "bindingVersion": { "type": "string", @@ -7422,8 +6899,8 @@ } ] }, - "http://asyncapi.com/bindings/amqp/0.3.0/operation.json": { - "$id": "http://asyncapi.com/bindings/amqp/0.3.0/operation.json", + "../../bindings/amqp/0.3.0/operation.json": { + "$id": "../../bindings/amqp/0.3.0/operation.json", "title": "AMQP operation bindings object", "description": "This object contains information about the operation representation in AMQP.", "type": "object", @@ -7508,8 +6985,8 @@ } ] }, - "http://asyncapi.com/bindings/mqtt/0.2.0/operation.json": { - "$id": "http://asyncapi.com/bindings/mqtt/0.2.0/operation.json", + "../../bindings/mqtt/0.2.0/operation.json": { + "$id": "../../bindings/mqtt/0.2.0/operation.json", "title": "MQTT operation bindings object", "description": "This object contains information about the operation representation in MQTT.", "type": "object", @@ -7566,8 +7043,8 @@ } ] }, - "http://asyncapi.com/bindings/kafka/0.5.0/operation.json": { - "$id": "http://asyncapi.com/bindings/kafka/0.5.0/operation.json", + "../../bindings/kafka/0.5.0/operation.json": { + "$id": "../../bindings/kafka/0.5.0/operation.json", "title": "Operation Schema", "description": "This object contains information about the operation representation in Kafka.", "type": "object", @@ -7579,12 +7056,10 @@ }, "properties": { "groupId": { - "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json", - "description": "Id of the consumer group." + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" }, "clientId": { - "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json", - "description": "Id of the consumer inside a consumer group." + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" }, "bindingVersion": { "type": "string", @@ -7612,8 +7087,8 @@ } ] }, - "http://asyncapi.com/bindings/kafka/0.4.0/operation.json": { - "$id": "http://asyncapi.com/bindings/kafka/0.4.0/operation.json", + "../../bindings/kafka/0.4.0/operation.json": { + "$id": "../../bindings/kafka/0.4.0/operation.json", "title": "Operation Schema", "description": "This object contains information about the operation representation in Kafka.", "type": "object", @@ -7625,12 +7100,10 @@ }, "properties": { "groupId": { - "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json", - "description": "Id of the consumer group." + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" }, "clientId": { - "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json", - "description": "Id of the consumer inside a consumer group." + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" }, "bindingVersion": { "type": "string", @@ -7658,8 +7131,8 @@ } ] }, - "http://asyncapi.com/bindings/kafka/0.3.0/operation.json": { - "$id": "http://asyncapi.com/bindings/kafka/0.3.0/operation.json", + "../../bindings/kafka/0.3.0/operation.json": { + "$id": "../../bindings/kafka/0.3.0/operation.json", "title": "Operation Schema", "description": "This object contains information about the operation representation in Kafka.", "type": "object", @@ -7671,12 +7144,10 @@ }, "properties": { "groupId": { - "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json", - "description": "Id of the consumer group." + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" }, "clientId": { - "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json", - "description": "Id of the consumer inside a consumer group." + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" }, "bindingVersion": { "type": "string", @@ -7704,8 +7175,8 @@ } ] }, - "http://asyncapi.com/bindings/nats/0.1.0/operation.json": { - "$id": "http://asyncapi.com/bindings/nats/0.1.0/operation.json", + "../../bindings/nats/0.1.0/operation.json": { + "$id": "../../bindings/nats/0.1.0/operation.json", "title": "NATS operation bindings object", "description": "This object contains information about the operation representation in NATS.", "type": "object", @@ -7736,8 +7207,8 @@ } ] }, - "http://asyncapi.com/bindings/sns/0.1.0/operation.json": { - "$id": "http://asyncapi.com/bindings/sns/0.1.0/operation.json", + "../../bindings/sns/0.1.0/operation.json": { + "$id": "../../bindings/sns/0.1.0/operation.json", "title": "Operation Schema", "description": "This object contains information about the operation representation in SNS.", "type": "object", @@ -7749,8 +7220,7 @@ }, "properties": { "topic": { - "$ref": "http://asyncapi.com/bindings/sns/0.1.0/operation.json#/definitions/identifier", - "description": "Often we can assume that the SNS Topic is the channel name-we provide this field in case the you need to supply the ARN, or the Topic name is not the channel name in the AsyncAPI document." + "$ref": "http://asyncapi.com/bindings/sns/0.1.0/operation.json#/definitions/identifier" }, "consumers": { "type": "array", @@ -7761,8 +7231,7 @@ "minItems": 1 }, "deliveryPolicy": { - "$ref": "http://asyncapi.com/bindings/sns/0.1.0/operation.json#/definitions/deliveryPolicy", - "description": "Policy for retries to HTTP. The field is the default for HTTP receivers of the SNS Topic which may be overridden by a specific consumer." + "$ref": "http://asyncapi.com/bindings/sns/0.1.0/operation.json#/definitions/deliveryPolicy" }, "bindingVersion": { "type": "string", @@ -7828,7 +7297,6 @@ ] }, "endpoint": { - "description": "The endpoint messages are delivered to.", "$ref": "http://asyncapi.com/bindings/sns/0.1.0/operation.json#/definitions/identifier" }, "filterPolicy": { @@ -7873,8 +7341,7 @@ "$ref": "http://asyncapi.com/bindings/sns/0.1.0/operation.json#/definitions/redrivePolicy" }, "deliveryPolicy": { - "$ref": "http://asyncapi.com/bindings/sns/0.1.0/operation.json#/definitions/deliveryPolicy", - "description": "Policy for retries to HTTP. The parameter is for that SNS Subscription and overrides any policy on the SNS Topic." + "$ref": "http://asyncapi.com/bindings/sns/0.1.0/operation.json#/definitions/deliveryPolicy" }, "displayName": { "type": "string", @@ -7945,8 +7412,7 @@ }, "properties": { "deadLetterQueue": { - "$ref": "http://asyncapi.com/bindings/sns/0.1.0/operation.json#/definitions/identifier", - "description": "The SQS queue to use as a dead letter queue (DLQ)." + "$ref": "http://asyncapi.com/bindings/sns/0.1.0/operation.json#/definitions/identifier" }, "maxReceiveCount": { "type": "integer", @@ -8008,8 +7474,8 @@ } ] }, - "http://asyncapi.com/bindings/sqs/0.2.0/operation.json": { - "$id": "http://asyncapi.com/bindings/sqs/0.2.0/operation.json", + "../../bindings/sqs/0.2.0/operation.json": { + "$id": "../../bindings/sqs/0.2.0/operation.json", "title": "Operation Schema", "description": "This object contains information about the operation representation in SQS.", "type": "object", @@ -8264,27 +7730,260 @@ } }, { - "name": "myQueue_error", - "deliveryDelay": 10 + "name": "myQueue_error", + "deliveryDelay": 10 + } + ] + } + ] + }, + "../../bindings/solace/0.4.0/operation.json": { + "$id": "../../bindings/solace/0.4.0/operation.json", + "title": "Solace operation bindings object", + "description": "This object contains information about the operation representation in Solace.", + "type": "object", + "additionalProperties": false, + "properties": { + "bindingVersion": { + "type": "string", + "enum": [ + "0.4.0" + ], + "description": "The version of this binding. If omitted, \"latest\" MUST be assumed." + }, + "destinations": { + "description": "The list of Solace destinations referenced in the operation.", + "type": "array", + "items": { + "type": "object", + "properties": { + "deliveryMode": { + "type": "string", + "enum": [ + "direct", + "persistent" + ] + } + }, + "oneOf": [ + { + "properties": { + "destinationType": { + "type": "string", + "const": "queue", + "description": "If the type is queue, then the subscriber can bind to the queue. The queue subscribes to the given topicSubscriptions. If no topicSubscriptions are provied, the queue will subscribe to the topic as represented by the channel name." + }, + "queue": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The name of the queue" + }, + "topicSubscriptions": { + "type": "array", + "description": "The list of topics that the queue subscribes to.", + "items": { + "type": "string" + } + }, + "accessType": { + "type": "string", + "enum": [ + "exclusive", + "nonexclusive" + ] + }, + "maxTtl": { + "type": "string", + "description": "The maximum TTL to apply to messages to be spooled." + }, + "maxMsgSpoolUsage": { + "type": "string", + "description": "The maximum amount of message spool that the given queue may use" + } + } + } + } + }, + { + "properties": { + "destinationType": { + "type": "string", + "const": "topic", + "description": "If the type is topic, then the subscriber subscribes to the given topicSubscriptions. If no topicSubscriptions are provided, the client will subscribe to the topic as represented by the channel name." + }, + "topicSubscriptions": { + "type": "array", + "description": "The list of topics that the client subscribes to.", + "items": { + "type": "string" + } + } + } + } + ] + } + }, + "timeToLive": { + "type": "integer", + "description": "Interval in milliseconds or a Schema Object containing the definition of the lifetime of the message." + }, + "priority": { + "type": "integer", + "minimum": 0, + "maximum": 255, + "description": "The valid priority value range is 0-255 with 0 as the lowest priority and 255 as the highest or a Schema Object containing the definition of the priority." + }, + "dmqEligible": { + "type": "boolean", + "description": "Set the message to be eligible to be moved to a Dead Message Queue. The default value is false." + } + }, + "examples": [ + { + "bindingVersion": "0.4.0", + "destinations": [ + { + "destinationType": "queue", + "queue": { + "name": "sampleQueue", + "topicSubscriptions": [ + "samples/*" + ], + "accessType": "nonexclusive" + } + }, + { + "destinationType": "topic", + "topicSubscriptions": [ + "samples/*" + ] + } + ] + } + ] + }, + "../../bindings/solace/0.3.0/operation.json": { + "$id": "../../bindings/solace/0.3.0/operation.json", + "title": "Solace operation bindings object", + "description": "This object contains information about the operation representation in Solace.", + "type": "object", + "additionalProperties": false, + "properties": { + "destinations": { + "description": "The list of Solace destinations referenced in the operation.", + "type": "array", + "items": { + "type": "object", + "properties": { + "deliveryMode": { + "type": "string", + "enum": [ + "direct", + "persistent" + ] + } + }, + "oneOf": [ + { + "properties": { + "destinationType": { + "type": "string", + "const": "queue", + "description": "If the type is queue, then the subscriber can bind to the queue. The queue subscribes to the given topicSubscriptions. If no topicSubscriptions are provied, the queue will subscribe to the topic as represented by the channel name." + }, + "queue": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The name of the queue" + }, + "topicSubscriptions": { + "type": "array", + "description": "The list of topics that the queue subscribes to.", + "items": { + "type": "string" + } + }, + "accessType": { + "type": "string", + "enum": [ + "exclusive", + "nonexclusive" + ] + }, + "maxTtl": { + "type": "string", + "description": "The maximum TTL to apply to messages to be spooled." + }, + "maxMsgSpoolUsage": { + "type": "string", + "description": "The maximum amount of message spool that the given queue may use" + } + } + } + } + }, + { + "properties": { + "destinationType": { + "type": "string", + "const": "topic", + "description": "If the type is topic, then the subscriber subscribes to the given topicSubscriptions. If no topicSubscriptions are provided, the client will subscribe to the topic as represented by the channel name." + }, + "topicSubscriptions": { + "type": "array", + "description": "The list of topics that the client subscribes to.", + "items": { + "type": "string" + } + } + } + } + ] + } + }, + "bindingVersion": { + "type": "string", + "enum": [ + "0.3.0" + ], + "description": "The version of this binding. If omitted, \"latest\" MUST be assumed." + } + }, + "examples": [ + { + "bindingVersion": "0.3.0", + "destinations": [ + { + "destinationType": "queue", + "queue": { + "name": "sampleQueue", + "topicSubscriptions": [ + "samples/*" + ], + "accessType": "nonexclusive" + } + }, + { + "destinationType": "topic", + "topicSubscriptions": [ + "samples/*" + ] } ] } ] }, - "http://asyncapi.com/bindings/solace/0.4.0/operation.json": { - "$id": "http://asyncapi.com/bindings/solace/0.4.0/operation.json", + "../../bindings/solace/0.2.0/operation.json": { + "$id": "../../bindings/solace/0.2.0/operation.json", "title": "Solace operation bindings object", "description": "This object contains information about the operation representation in Solace.", "type": "object", "additionalProperties": false, "properties": { - "bindingVersion": { - "type": "string", - "enum": [ - "0.4.0" - ], - "description": "The version of this binding. If omitted, \"latest\" MUST be assumed." - }, "destinations": { "description": "The list of Solace destinations referenced in the operation.", "type": "array", @@ -8327,297 +8026,577 @@ "exclusive", "nonexclusive" ] - }, - "maxTtl": { - "type": "string", - "description": "The maximum TTL to apply to messages to be spooled." - }, - "maxMsgSpoolUsage": { - "type": "string", - "description": "The maximum amount of message spool that the given queue may use" } } } } }, - { + { + "properties": { + "destinationType": { + "type": "string", + "const": "topic", + "description": "If the type is topic, then the subscriber subscribes to the given topicSubscriptions. If no topicSubscriptions are provided, the client will subscribe to the topic as represented by the channel name." + }, + "topicSubscriptions": { + "type": "array", + "description": "The list of topics that the client subscribes to.", + "items": { + "type": "string" + } + } + } + } + ] + } + }, + "bindingVersion": { + "type": "string", + "enum": [ + "0.2.0" + ], + "description": "The version of this binding. If omitted, \"latest\" MUST be assumed." + } + }, + "examples": [ + { + "bindingVersion": "0.2.0", + "destinations": [ + { + "destinationType": "queue", + "queue": { + "name": "sampleQueue", + "topicSubscriptions": [ + "samples/*" + ], + "accessType": "nonexclusive" + } + }, + { + "destinationType": "topic", + "topicSubscriptions": [ + "samples/*" + ] + } + ] + } + ] + }, + "operationBindingsObject.json": { + "$id": "operationBindingsObject.json", + "type": "object", + "description": "Map describing protocol-specific definitions for an operation.", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "properties": { + "http": { + "properties": { + "bindingVersion": { + "enum": [ + "0.2.0", + "0.3.0" + ] + } + }, + "allOf": [ + { + "description": "If no bindingVersion specified, use the latest binding", + "if": { + "not": { + "required": [ + "bindingVersion" + ] + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/http/0.3.0/operation.json" + } + }, + { + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.2.0" + } + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/http/0.2.0/operation.json" + } + }, + { + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.3.0" + } + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/http/0.3.0/operation.json" + } + } + ] + }, + "ws": {}, + "amqp": { + "properties": { + "bindingVersion": { + "enum": [ + "0.3.0" + ] + } + }, + "allOf": [ + { + "description": "If no bindingVersion specified, use the latest binding", + "if": { + "not": { + "required": [ + "bindingVersion" + ] + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/amqp/0.3.0/operation.json" + } + }, + { + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.3.0" + } + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/amqp/0.3.0/operation.json" + } + } + ] + }, + "amqp1": {}, + "mqtt": { + "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/mqtt/0.2.0/operation.json" + } + }, + { + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.2.0" + } + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/mqtt/0.2.0/operation.json" + } + } + ] + }, + "kafka": { + "properties": { + "bindingVersion": { + "enum": [ + "0.5.0", + "0.4.0", + "0.3.0" + ] + } + }, + "allOf": [ + { + "description": "If no bindingVersion specified, use the latest binding", + "if": { + "not": { + "required": [ + "bindingVersion" + ] + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/kafka/0.5.0/operation.json" + } + }, + { + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.5.0" + } + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/kafka/0.5.0/operation.json" + } + }, + { + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.4.0" + } + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/kafka/0.4.0/operation.json" + } + }, + { + "if": { + "required": [ + "bindingVersion" + ], "properties": { - "destinationType": { - "type": "string", - "const": "topic", - "description": "If the type is topic, then the subscriber subscribes to the given topicSubscriptions. If no topicSubscriptions are provided, the client will subscribe to the topic as represented by the channel name." - }, - "topicSubscriptions": { - "type": "array", - "description": "The list of topics that the client subscribes to.", - "items": { - "type": "string" - } + "bindingVersion": { + "const": "0.3.0" } } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/kafka/0.3.0/operation.json" } - ] - } - }, - "timeToLive": { - "type": "integer", - "description": "Interval in milliseconds or a Schema Object containing the definition of the lifetime of the message." - }, - "priority": { - "type": "integer", - "minimum": 0, - "maximum": 255, - "description": "The valid priority value range is 0-255 with 0 as the lowest priority and 255 as the highest or a Schema Object containing the definition of the priority." + } + ] }, - "dmqEligible": { - "type": "boolean", - "description": "Set the message to be eligible to be moved to a Dead Message Queue. The default value is false." - } - }, - "examples": [ - { - "bindingVersion": "0.4.0", - "destinations": [ + "anypointmq": {}, + "nats": { + "properties": { + "bindingVersion": { + "enum": [ + "0.1.0" + ] + } + }, + "allOf": [ { - "destinationType": "queue", - "queue": { - "name": "sampleQueue", - "topicSubscriptions": [ - "samples/*" - ], - "accessType": "nonexclusive" + "description": "If no bindingVersion specified, use the latest binding", + "if": { + "not": { + "required": [ + "bindingVersion" + ] + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/nats/0.1.0/operation.json" } }, { - "destinationType": "topic", - "topicSubscriptions": [ - "samples/*" + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.1.0" + } + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/nats/0.1.0/operation.json" + } + } + ] + }, + "jms": {}, + "sns": { + "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/sns/0.1.0/operation.json" + } + }, + { + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.1.0" + } + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/sns/0.1.0/operation.json" + } + } ] - } - ] - }, - "http://asyncapi.com/bindings/solace/0.3.0/operation.json": { - "$id": "http://asyncapi.com/bindings/solace/0.3.0/operation.json", - "title": "Solace operation bindings object", - "description": "This object contains information about the operation representation in Solace.", - "type": "object", - "additionalProperties": false, - "properties": { - "destinations": { - "description": "The list of Solace destinations referenced in the operation.", - "type": "array", - "items": { - "type": "object", - "properties": { - "deliveryMode": { - "type": "string", - "enum": [ - "direct", - "persistent" - ] + }, + "sqs": { + "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/sqs/0.2.0/operation.json" } }, - "oneOf": [ - { + { + "if": { + "required": [ + "bindingVersion" + ], "properties": { - "destinationType": { - "type": "string", - "const": "queue", - "description": "If the type is queue, then the subscriber can bind to the queue. The queue subscribes to the given topicSubscriptions. If no topicSubscriptions are provied, the queue will subscribe to the topic as represented by the channel name." - }, - "queue": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "The name of the queue" - }, - "topicSubscriptions": { - "type": "array", - "description": "The list of topics that the queue subscribes to.", - "items": { - "type": "string" - } - }, - "accessType": { - "type": "string", - "enum": [ - "exclusive", - "nonexclusive" - ] - }, - "maxTtl": { - "type": "string", - "description": "The maximum TTL to apply to messages to be spooled." - }, - "maxMsgSpoolUsage": { - "type": "string", - "description": "The maximum amount of message spool that the given queue may use" - } - } + "bindingVersion": { + "const": "0.2.0" + } + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/sqs/0.2.0/operation.json" + } + } + ] + }, + "stomp": {}, + "redis": {}, + "ibmmq": {}, + "solace": { + "properties": { + "bindingVersion": { + "enum": [ + "0.4.0", + "0.3.0", + "0.2.0" + ] + } + }, + "allOf": [ + { + "description": "If no bindingVersion specified, use the latest binding", + "if": { + "not": { + "required": [ + "bindingVersion" + ] + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/solace/0.4.0/operation.json" + } + }, + { + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.4.0" } } }, - { + "then": { + "$ref": "http://asyncapi.com/bindings/solace/0.4.0/operation.json" + } + }, + { + "if": { + "required": [ + "bindingVersion" + ], "properties": { - "destinationType": { - "type": "string", - "const": "topic", - "description": "If the type is topic, then the subscriber subscribes to the given topicSubscriptions. If no topicSubscriptions are provided, the client will subscribe to the topic as represented by the channel name." - }, - "topicSubscriptions": { - "type": "array", - "description": "The list of topics that the client subscribes to.", - "items": { - "type": "string" - } + "bindingVersion": { + "const": "0.3.0" } } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/solace/0.3.0/operation.json" } - ] - } + }, + { + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.2.0" + } + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/solace/0.2.0/operation.json" + } + } + ] }, - "bindingVersion": { - "type": "string", - "enum": [ - "0.3.0" - ], - "description": "The version of this binding. If omitted, \"latest\" MUST be assumed." + "googlepubsub": {} + } + }, + "operationTrait.json": { + "$id": "operationTrait.json", + "type": "object", + "description": "Describes a trait that MAY be applied to an Operation Object. This object MAY contain any property from the Operation Object, except the action, channel and traits ones.", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" } }, - "examples": [ - { - "bindingVersion": "0.3.0", - "destinations": [ + "properties": { + "title": { + "$ref": "http://asyncapi.com/definitions/3.0.0/operation.json#/properties/title" + }, + "summary": { + "$ref": "http://asyncapi.com/definitions/3.0.0/operation.json#/properties/summary" + }, + "description": { + "$ref": "http://asyncapi.com/definitions/3.0.0/operation.json#/properties/description" + }, + "security": { + "$ref": "http://asyncapi.com/definitions/3.0.0/operation.json#/properties/security" + }, + "tags": { + "$ref": "http://asyncapi.com/definitions/3.0.0/operation.json#/properties/tags" + }, + "externalDocs": { + "$ref": "http://asyncapi.com/definitions/3.0.0/operation.json#/properties/externalDocs" + }, + "bindings": { + "description": "A map where the keys describe the name of the protocol and the values describe protocol-specific definitions for the operation.", + "oneOf": [ { - "destinationType": "queue", - "queue": { - "name": "sampleQueue", - "topicSubscriptions": [ - "samples/*" - ], - "accessType": "nonexclusive" - } + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" }, { - "destinationType": "topic", - "topicSubscriptions": [ - "samples/*" - ] + "$ref": "http://asyncapi.com/definitions/3.0.0/operationBindingsObject.json" } ] } + }, + "examples": [ + { + "bindings": { + "amqp": { + "ack": false + } + } + } ] }, - "http://asyncapi.com/bindings/solace/0.2.0/operation.json": { - "$id": "http://asyncapi.com/bindings/solace/0.2.0/operation.json", - "title": "Solace operation bindings object", - "description": "This object contains information about the operation representation in Solace.", + "operations.json": { + "$id": "operations.json", "type": "object", - "additionalProperties": false, - "properties": { - "destinations": { - "description": "The list of Solace destinations referenced in the operation.", - "type": "array", - "items": { - "type": "object", - "properties": { - "deliveryMode": { - "type": "string", - "enum": [ - "direct", - "persistent" - ] - } + "description": "Holds a dictionary with all the operations this application MUST implement.", + "additionalProperties": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/operation.json" + } + ] + }, + "examples": [ + { + "onUserSignUp": { + "title": "User sign up", + "summary": "Action to sign a user up.", + "description": "A longer description", + "channel": { + "$ref": "#/channels/userSignup" }, - "oneOf": [ + "action": "send", + "tags": [ { - "properties": { - "destinationType": { - "type": "string", - "const": "queue", - "description": "If the type is queue, then the subscriber can bind to the queue. The queue subscribes to the given topicSubscriptions. If no topicSubscriptions are provied, the queue will subscribe to the topic as represented by the channel name." - }, - "queue": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "The name of the queue" - }, - "topicSubscriptions": { - "type": "array", - "description": "The list of topics that the queue subscribes to.", - "items": { - "type": "string" - } - }, - "accessType": { - "type": "string", - "enum": [ - "exclusive", - "nonexclusive" - ] - } - } - } - } + "name": "user" }, { - "properties": { - "destinationType": { - "type": "string", - "const": "topic", - "description": "If the type is topic, then the subscriber subscribes to the given topicSubscriptions. If no topicSubscriptions are provided, the client will subscribe to the topic as represented by the channel name." - }, - "topicSubscriptions": { - "type": "array", - "description": "The list of topics that the client subscribes to.", - "items": { - "type": "string" - } - } - } + "name": "signup" + }, + { + "name": "register" } - ] - } - }, - "bindingVersion": { - "type": "string", - "enum": [ - "0.2.0" - ], - "description": "The version of this binding. If omitted, \"latest\" MUST be assumed." - } - }, - "examples": [ - { - "bindingVersion": "0.2.0", - "destinations": [ - { - "destinationType": "queue", - "queue": { - "name": "sampleQueue", - "topicSubscriptions": [ - "samples/*" - ], - "accessType": "nonexclusive" + ], + "bindings": { + "amqp": { + "ack": false } }, - { - "destinationType": "topic", - "topicSubscriptions": [ - "samples/*" - ] - } - ] + "traits": [ + { + "$ref": "#/components/operationTraits/kafka" + } + ] + } } ] }, - "http://asyncapi.com/definitions/3.0.0/components.json": { - "$id": "http://asyncapi.com/definitions/3.0.0/components.json", + "components.json": { + "$id": "components.json", "type": "object", "description": "An object to hold a set of reusable objects for different aspects of the AsyncAPI specification. All objects defined within the components object will have no effect on the API unless they are explicitly referenced from properties outside the components object.", "additionalProperties": false, @@ -9061,5 +9040,6 @@ ] } }, + "$id": "http://asyncapi.com/definitions/3.0.0/asyncapi.json", "description": "!!Auto generated!! \n Do not manually edit. " } \ No newline at end of file diff --git a/test/schemas.js b/test/schemas.js index 787490cf..94226bbd 100644 --- a/test/schemas.js +++ b/test/schemas.js @@ -13,6 +13,7 @@ describe('Should be able to validate', function () { const asyncapi = require('..'); for (const versionToTest of versionsToTest) { const version = versionToTest.version; + console.log(`Testing validation of ${version}`); const schemasToTest = [asyncapi.schemas[version], asyncapi.schemasWithoutId[version]]; for (const schema of schemasToTest) { delete schema.definitions['http://json-schema.org/draft-07/schema']; diff --git a/tools/bundler/.eslintrc.json b/tools/bundler/.eslintrc.json new file mode 100644 index 00000000..38617933 --- /dev/null +++ b/tools/bundler/.eslintrc.json @@ -0,0 +1,6 @@ +{ + "extends": "../../.eslintrc.yml", + "parserOptions": { + "sourceType": "module" + } +} diff --git a/tools/bundler/index.js b/tools/bundler/index.js index 44bf731a..fb0d7a36 100644 --- a/tools/bundler/index.js +++ b/tools/bundler/index.js @@ -1,6 +1,13 @@ -const path = require('path'); -const fs = require('fs'); -const traverse = require('json-schema-traverse'); + +import path from 'path'; +import fs from 'fs'; +import { fileURLToPath } from 'url'; +import { bundle } from '@hyperjump/json-schema/bundle'; +import { registerSchema, unregisterSchema, } from '@hyperjump/json-schema/draft-07'; +import { registerSchema as registerSchema_draft_4, unregisterSchema as unregisterSchema_draft_4 } from '@hyperjump/json-schema/draft-04'; +import traverse from 'json-schema-traverse'; +const __filename = fileURLToPath(import.meta.url); // get the resolved path to the file +const __dirname = path.dirname(__filename); // get the name of the directory const definitionsDirectory = path.resolve(__dirname, '../../definitions'); const commonSchemasDirectory = path.resolve(__dirname, '../../common'); const bindingsDirectory = path.resolve(__dirname, '../../bindings'); @@ -11,7 +18,7 @@ console.log(`Looking for separate definitions in the following directory: ${defi console.log(`Looking for binding version schemas in the following directory: ${bindingsDirectory}`); console.log(`Looking for extension version schemas in the following directory: ${extensionsDirectory}`); console.log(`Using the following output directory: ${outputDirectory}`); - +const registeredSchemas = []; // definitionsRegex is used to transform the name of a definition into a valid one to be used in the -without-$id.json files. const definitionsRegex = /http:\/\/asyncapi\.com\/definitions\/[^/]*\/(.+)\.json#?(.*)/i; @@ -32,24 +39,26 @@ const extensionsRegex = /http:\/\/asyncapi\.com\/(extensions\/[^/]+)\/([^/]+)\/( } console.log(`The following versions have separate definitions: ${versions.join(',')}`); for (const version of versions) { - const Bundler = require('@hyperjump/json-schema-bundle'); + registeredSchemas.forEach((value) => { + unregisterSchema(value); + unregisterSchema_draft_4(value); + }) try { console.log(`Bundling the following version together: ${version}`); const outputFileWithId = path.resolve(outputDirectory, `${version}.json`); const outputFileWithoutId = path.resolve(outputDirectory, `${version}-without-$id.json`); const versionDir = path.resolve(definitionsDirectory, version); - await loadDefinitions(Bundler, versionDir); - await loadCommonSchemas(Bundler); - await loadSchemas(Bundler, 'bindings'); - await loadSchemas(Bundler, 'extensions'); - - const filePathToBundle = `file://${versionDir}/asyncapi.json`; - const fileToBundle = await Bundler.get(filePathToBundle); - - /** - * bundling schemas into one file with $id - */ - const bundledSchemaWithId = await Bundler.bundle(fileToBundle); + await loadDefinitions(versionDir, version); + await loadCommonSchemas(); + await loadSchemas('bindings'); + await loadSchemas('extensions'); + + const bundledSchemaWithId = await bundle(`http://asyncapi.com/definitions/${version}/asyncapi.json`, {definitionNamingStrategy: 'uri'}); + if(version.split('.')[0] === '1') { + bundledSchemaWithId.id = `http://asyncapi.com/definitions/${version}/asyncapi.json`; + } else { + bundledSchemaWithId.$id = `http://asyncapi.com/definitions/${version}/asyncapi.json`; + } bundledSchemaWithId.description = `!!Auto generated!! \n Do not manually edit. ${ bundledSchemaWithId.description !== undefined && bundledSchemaWithId.description !== null @@ -74,14 +83,11 @@ const extensionsRegex = /http:\/\/asyncapi\.com\/(extensions\/[^/]+)\/([^/]+)\/( })(); /** - * Function to load all the core AsyncAPI spec definition (except the root asyncapi schema, as that will be loaded later) into the bundler. + * Function to load all the core AsyncAPI spec definition into the bundler. */ -async function loadDefinitions(bundler, versionDir) { +async function loadDefinitions(versionDir, version) { const definitions = await fs.promises.readdir(versionDir); const definitionFiles = definitions - .filter((value) => { - return !value.includes('asyncapi'); - }) .map((file) => fs.readFileSync(path.resolve(versionDir, file))); const definitionJson = definitionFiles.map((file) => JSON.parse(file)); @@ -94,9 +100,13 @@ async function loadDefinitions(bundler, versionDir) { // So replacing it when bundling is the goto solution. jsonFile.examples = examples; delete jsonFile.example; - bundler.add(jsonFile); + } + if(version.split('.')[0] === '1') { + registeredSchemas.push(jsonFile.id) + registerSchema_draft_4(jsonFile, jsonFile.id) } else { - bundler.add(jsonFile); + registeredSchemas.push(jsonFile.$id) + registerSchema(jsonFile, jsonFile.$id); } } } @@ -104,7 +114,7 @@ async function loadDefinitions(bundler, versionDir) { /** * Function to load all schemas into bundler, by "type" you specify if these are "bindings" or "extensions" */ -async function loadSchemas(bundler, type) { +async function loadSchemas(type) { let directory; switch (type) { @@ -136,22 +146,29 @@ async function loadSchemas(bundler, type) { .filter((file) => path.extname(file) === '.json') .map((file) => path.resolve(directory, nestedDir, versionDir, file)); for (const filteredFile of filesFiltered) { - const fileContent = require(filteredFile); - bundler.add(fileContent); + const fileContent = await readJson(filteredFile); + registeredSchemas.push(fileContent.$id) + registerSchema(fileContent, fileContent.$id); } } } } - -async function loadCommonSchemas(bundler) { +async function readJson(fileLocation) { + return JSON.parse( + await fs.promises.readFile(fileLocation) + ); +} +async function loadCommonSchemas() { // Add common schemas to all versions const commonSchemas = await fs.promises.readdir(commonSchemasDirectory); const commonSchemaFiles = commonSchemas.map((file) => path.resolve(commonSchemasDirectory, file) ); for (const commonSchemaFile of commonSchemaFiles) { - const commonSchemaFileContent = require(commonSchemaFile); - bundler.add(commonSchemaFileContent); + const commonSchemaFileContent = await readJson(commonSchemaFile); + + registeredSchemas.push(commonSchemaFileContent.$id) + registerSchema(commonSchemaFileContent, commonSchemaFileContent.$id); } } @@ -165,8 +182,7 @@ async function loadRefProperties(filePath) { const versionPath = schemaPath.split('examples')[1]; // we append the extracted file path to the examples dir to read the file try { - const data = await fs.promises.readFile(`../../examples${versionPath}`); - return JSON.parse(data); + return await readJson(`../../examples${versionPath}`); } catch (e) { throw new Error(e); } diff --git a/tools/bundler/package-lock.json b/tools/bundler/package-lock.json index 9fbfd63d..01b0504e 100644 --- a/tools/bundler/package-lock.json +++ b/tools/bundler/package-lock.json @@ -9,268 +9,190 @@ "version": "1.0.0", "license": "Apache-2.0", "dependencies": { - "@hyperjump/json-schema-bundle": "0.1.3", + "@hyperjump/json-schema": "^1.9.2", "json-schema-traverse": "^1.0.0" } }, - "node_modules/@hyperjump/json-pointer": { - "version": "0.9.1", - "resolved": "https://registry.npmjs.org/@hyperjump/json-pointer/-/json-pointer-0.9.1.tgz", - "integrity": "sha512-tiDl/9MOkkiUQ5t+wq4PhtPghgWmFyBwU9Q6xRkXksg2s/6GNxNPcO/MzOjJoDAeCY1XXajNUIkco7wvhNmlOA==", + "node_modules/@hyperjump/browser": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/@hyperjump/browser/-/browser-1.1.4.tgz", + "integrity": "sha512-85rfa3B79MssMOxNChvXJhfgvIXqA2FEzwrxKe9iMpCKZVQIxQe54w210VeFM0D33pVOeNskg7TyptSjenY2+w==", + "peer": true, "dependencies": { - "just-curry-it": "^3.2.1" + "@hyperjump/json-pointer": "^1.1.0", + "@hyperjump/uri": "^1.2.0", + "content-type": "^1.0.5", + "just-curry-it": "^5.3.0" + }, + "engines": { + "node": ">=18.0.0" }, "funding": { "type": "github", "url": "https://github.com/sponsors/jdesrosiers" } }, - "node_modules/@hyperjump/json-schema": { - "version": "0.18.3", - "resolved": "https://registry.npmjs.org/@hyperjump/json-schema/-/json-schema-0.18.3.tgz", - "integrity": "sha512-HKrrsuJOlYdqpHEr/eRU99LCiAe8ZH4LUkQOQOMa/P8pNSgs4FQHMKy3sgkmgLSgdmQbRX2/hA+yn2Ts/gS0lA==", - "dependencies": { - "@hyperjump/json-schema-core": "^0.23.4", - "fastest-stable-stringify": "^2.0.2" - }, + "node_modules/@hyperjump/json-pointer": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@hyperjump/json-pointer/-/json-pointer-1.1.0.tgz", + "integrity": "sha512-tFCKxMKDKK3VEdtUA3EBOS9GmSOS4mbrTjh9v3RnK10BphDMOb6+bxTh++/ae1AyfHyWb6R54O/iaoAtPMZPCg==", "funding": { "type": "github", "url": "https://github.com/sponsors/jdesrosiers" } }, - "node_modules/@hyperjump/json-schema-bundle": { - "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", + "node_modules/@hyperjump/json-schema": { + "version": "1.9.2", + "resolved": "https://registry.npmjs.org/@hyperjump/json-schema/-/json-schema-1.9.2.tgz", + "integrity": "sha512-aE2C3phUTvvMXDZ6w6gXdPYohqM3e8Yxcq8unbyx93JnrJUNWiwWdlEwus97SRdO6hWAfiHjhL5imJvhkdUyYg==", "dependencies": { - "@hyperjump/json-schema": "^0.18.3", - "uuid": "^8.3.2" + "@hyperjump/json-pointer": "^1.1.0", + "@hyperjump/pact": "^1.2.0", + "@hyperjump/uri": "^1.2.0", + "content-type": "^1.0.4", + "json-stringify-deterministic": "^1.0.12", + "just-curry-it": "^5.3.0", + "uuid": "^9.0.0" }, "funding": { "type": "github", "url": "https://github.com/sponsors/jdesrosiers" + }, + "peerDependencies": { + "@hyperjump/browser": "^1.1.0" + } + }, + "node_modules/@hyperjump/json-schema/node_modules/uuid": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", + "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==", + "funding": [ + "https://github.com/sponsors/broofa", + "https://github.com/sponsors/ctavan" + ], + "bin": { + "uuid": "dist/bin/uuid" } }, - "node_modules/@hyperjump/json-schema-core": { - "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", + "node_modules/@hyperjump/pact": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@hyperjump/pact/-/pact-1.3.0.tgz", + "integrity": "sha512-/UIKatOtyZ3kN4A7AQmqZKzg/6es9jKyeWbfrenb2rDb3I9W4ZrVZT8q1zDrI/G+849I6Eq0ybzV1mmEC9zoDg==", "dependencies": { - "@hyperjump/json-pointer": "^0.9.1", - "@hyperjump/pact": "^0.2.0", - "content-type": "^1.0.4", - "node-fetch": "^2.6.5", - "pubsub-js": "^1.9.1", - "url-resolve-browser": "^1.2.0" + "just-curry-it": "^5.3.0" }, "funding": { "type": "github", "url": "https://github.com/sponsors/jdesrosiers" } }, - "node_modules/@hyperjump/pact": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/@hyperjump/pact/-/pact-0.2.0.tgz", - "integrity": "sha512-RHt0XRFsADXbqopurGZfCUNL7mPc0695TD2HNDqs4RCK5Db/1lDU2Bhk9EsyFmCBE9N1/boyvdKWjT1UYHIebg==", - "dependencies": { - "just-curry-it": "^3.1.0" - }, + "node_modules/@hyperjump/uri": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/@hyperjump/uri/-/uri-1.2.2.tgz", + "integrity": "sha512-Zn8AZb/j54KKUCckmcOzKCSCKpIpMVBc60zYaajD8Dq/1g4UN6TfAFi+uDa5o/6rf+I+5xDZjZpdzwfuhlC0xQ==", "funding": { "type": "github", "url": "https://github.com/sponsors/jdesrosiers" } }, "node_modules/content-type": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz", - "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==", + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz", + "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==", "engines": { "node": ">= 0.6" } }, - "node_modules/fastest-stable-stringify": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/fastest-stable-stringify/-/fastest-stable-stringify-2.0.2.tgz", - "integrity": "sha512-bijHueCGd0LqqNK9b5oCMHc0MluJAx0cwqASgbWMvkO01lCYgIhacVRLcaDz3QnyYIRNJRDwMb41VuT6pHJ91Q==" - }, "node_modules/json-schema-traverse": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==" }, - "node_modules/just-curry-it": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/just-curry-it/-/just-curry-it-3.2.1.tgz", - "integrity": "sha512-Q8206k8pTY7krW32cdmPsP+DqqLgWx/hYPSj9/+7SYqSqz7UuwPbfSe07lQtvuuaVyiSJveXk0E5RydOuWwsEg==" - }, - "node_modules/node-fetch": { - "version": "2.6.7", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", - "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==", - "dependencies": { - "whatwg-url": "^5.0.0" - }, + "node_modules/json-stringify-deterministic": { + "version": "1.0.12", + "resolved": "https://registry.npmjs.org/json-stringify-deterministic/-/json-stringify-deterministic-1.0.12.tgz", + "integrity": "sha512-q3PN0lbUdv0pmurkBNdJH3pfFvOTL/Zp0lquqpvcjfKzt6Y0j49EPHAmVHCAS4Ceq/Y+PejWTzyiVpoY71+D6g==", "engines": { - "node": "4.x || >=6.0.0" - }, - "peerDependencies": { - "encoding": "^0.1.0" - }, - "peerDependenciesMeta": { - "encoding": { - "optional": true - } - } - }, - "node_modules/pubsub-js": { - "version": "1.9.4", - "resolved": "https://registry.npmjs.org/pubsub-js/-/pubsub-js-1.9.4.tgz", - "integrity": "sha512-hJYpaDvPH4w8ZX/0Fdf9ma1AwRgU353GfbaVfPjfJQf1KxZ2iHaHl3fAUw1qlJIR5dr4F3RzjGaWohYUEyoh7A==" - }, - "node_modules/tr46": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", - "integrity": "sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o=" - }, - "node_modules/url-resolve-browser": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/url-resolve-browser/-/url-resolve-browser-1.2.0.tgz", - "integrity": "sha512-L9PBPnlKNDFzt9ElK4br8I8Tufdm1xgv1GhMeiP7ZC87x0b7mr+4vSh13kmPq5km80JKX+UD2BeEFTCrFZ6xDA==" - }, - "node_modules/uuid": { - "version": "8.3.2", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", - "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", - "bin": { - "uuid": "dist/bin/uuid" + "node": ">= 4" } }, - "node_modules/webidl-conversions": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", - "integrity": "sha1-JFNCdeKnvGvnvIZhHMFq4KVlSHE=" - }, - "node_modules/whatwg-url": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", - "integrity": "sha1-lmRU6HZUYuN2RNNib2dCzotwll0=", - "dependencies": { - "tr46": "~0.0.3", - "webidl-conversions": "^3.0.0" - } + "node_modules/just-curry-it": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/just-curry-it/-/just-curry-it-5.3.0.tgz", + "integrity": "sha512-silMIRiFjUWlfaDhkgSzpuAyQ6EX/o09Eu8ZBfmFwQMbax7+LQzeIU2CBrICT6Ne4l86ITCGvUCBpCubWYy0Yw==" } }, "dependencies": { - "@hyperjump/json-pointer": { - "version": "0.9.1", - "resolved": "https://registry.npmjs.org/@hyperjump/json-pointer/-/json-pointer-0.9.1.tgz", - "integrity": "sha512-tiDl/9MOkkiUQ5t+wq4PhtPghgWmFyBwU9Q6xRkXksg2s/6GNxNPcO/MzOjJoDAeCY1XXajNUIkco7wvhNmlOA==", + "@hyperjump/browser": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/@hyperjump/browser/-/browser-1.1.4.tgz", + "integrity": "sha512-85rfa3B79MssMOxNChvXJhfgvIXqA2FEzwrxKe9iMpCKZVQIxQe54w210VeFM0D33pVOeNskg7TyptSjenY2+w==", + "peer": true, "requires": { - "just-curry-it": "^3.2.1" + "@hyperjump/json-pointer": "^1.1.0", + "@hyperjump/uri": "^1.2.0", + "content-type": "^1.0.5", + "just-curry-it": "^5.3.0" } }, - "@hyperjump/json-schema": { - "version": "0.18.3", - "resolved": "https://registry.npmjs.org/@hyperjump/json-schema/-/json-schema-0.18.3.tgz", - "integrity": "sha512-HKrrsuJOlYdqpHEr/eRU99LCiAe8ZH4LUkQOQOMa/P8pNSgs4FQHMKy3sgkmgLSgdmQbRX2/hA+yn2Ts/gS0lA==", - "requires": { - "@hyperjump/json-schema-core": "^0.23.4", - "fastest-stable-stringify": "^2.0.2" - } - }, - "@hyperjump/json-schema-bundle": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/@hyperjump/json-schema-bundle/-/json-schema-bundle-0.1.3.tgz", - "integrity": "sha512-UjmmtyIgaMXRXKmkJDQhvGAQFSfaPYBRue4tk3qeISrD468vziCWI2Km0RgfeXVxgy5xgqEPyi9DLXUqD4KWDQ==", - "requires": { - "@hyperjump/json-schema": "^0.18.3", - "uuid": "^8.3.2" - } + "@hyperjump/json-pointer": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@hyperjump/json-pointer/-/json-pointer-1.1.0.tgz", + "integrity": "sha512-tFCKxMKDKK3VEdtUA3EBOS9GmSOS4mbrTjh9v3RnK10BphDMOb6+bxTh++/ae1AyfHyWb6R54O/iaoAtPMZPCg==" }, - "@hyperjump/json-schema-core": { - "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==", + "@hyperjump/json-schema": { + "version": "1.9.2", + "resolved": "https://registry.npmjs.org/@hyperjump/json-schema/-/json-schema-1.9.2.tgz", + "integrity": "sha512-aE2C3phUTvvMXDZ6w6gXdPYohqM3e8Yxcq8unbyx93JnrJUNWiwWdlEwus97SRdO6hWAfiHjhL5imJvhkdUyYg==", "requires": { - "@hyperjump/json-pointer": "^0.9.1", - "@hyperjump/pact": "^0.2.0", + "@hyperjump/json-pointer": "^1.1.0", + "@hyperjump/pact": "^1.2.0", + "@hyperjump/uri": "^1.2.0", "content-type": "^1.0.4", - "node-fetch": "^2.6.5", - "pubsub-js": "^1.9.1", - "url-resolve-browser": "^1.2.0" + "json-stringify-deterministic": "^1.0.12", + "just-curry-it": "^5.3.0", + "uuid": "^9.0.0" + }, + "dependencies": { + "uuid": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", + "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==" + } } }, "@hyperjump/pact": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/@hyperjump/pact/-/pact-0.2.0.tgz", - "integrity": "sha512-RHt0XRFsADXbqopurGZfCUNL7mPc0695TD2HNDqs4RCK5Db/1lDU2Bhk9EsyFmCBE9N1/boyvdKWjT1UYHIebg==", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@hyperjump/pact/-/pact-1.3.0.tgz", + "integrity": "sha512-/UIKatOtyZ3kN4A7AQmqZKzg/6es9jKyeWbfrenb2rDb3I9W4ZrVZT8q1zDrI/G+849I6Eq0ybzV1mmEC9zoDg==", "requires": { - "just-curry-it": "^3.1.0" + "just-curry-it": "^5.3.0" } }, - "content-type": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz", - "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==" + "@hyperjump/uri": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/@hyperjump/uri/-/uri-1.2.2.tgz", + "integrity": "sha512-Zn8AZb/j54KKUCckmcOzKCSCKpIpMVBc60zYaajD8Dq/1g4UN6TfAFi+uDa5o/6rf+I+5xDZjZpdzwfuhlC0xQ==" }, - "fastest-stable-stringify": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/fastest-stable-stringify/-/fastest-stable-stringify-2.0.2.tgz", - "integrity": "sha512-bijHueCGd0LqqNK9b5oCMHc0MluJAx0cwqASgbWMvkO01lCYgIhacVRLcaDz3QnyYIRNJRDwMb41VuT6pHJ91Q==" + "content-type": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz", + "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==" }, "json-schema-traverse": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==" }, - "just-curry-it": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/just-curry-it/-/just-curry-it-3.2.1.tgz", - "integrity": "sha512-Q8206k8pTY7krW32cdmPsP+DqqLgWx/hYPSj9/+7SYqSqz7UuwPbfSe07lQtvuuaVyiSJveXk0E5RydOuWwsEg==" - }, - "node-fetch": { - "version": "2.6.7", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", - "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==", - "requires": { - "whatwg-url": "^5.0.0" - } - }, - "pubsub-js": { - "version": "1.9.4", - "resolved": "https://registry.npmjs.org/pubsub-js/-/pubsub-js-1.9.4.tgz", - "integrity": "sha512-hJYpaDvPH4w8ZX/0Fdf9ma1AwRgU353GfbaVfPjfJQf1KxZ2iHaHl3fAUw1qlJIR5dr4F3RzjGaWohYUEyoh7A==" - }, - "tr46": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", - "integrity": "sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o=" - }, - "url-resolve-browser": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/url-resolve-browser/-/url-resolve-browser-1.2.0.tgz", - "integrity": "sha512-L9PBPnlKNDFzt9ElK4br8I8Tufdm1xgv1GhMeiP7ZC87x0b7mr+4vSh13kmPq5km80JKX+UD2BeEFTCrFZ6xDA==" - }, - "uuid": { - "version": "8.3.2", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", - "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==" + "json-stringify-deterministic": { + "version": "1.0.12", + "resolved": "https://registry.npmjs.org/json-stringify-deterministic/-/json-stringify-deterministic-1.0.12.tgz", + "integrity": "sha512-q3PN0lbUdv0pmurkBNdJH3pfFvOTL/Zp0lquqpvcjfKzt6Y0j49EPHAmVHCAS4Ceq/Y+PejWTzyiVpoY71+D6g==" }, - "webidl-conversions": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", - "integrity": "sha1-JFNCdeKnvGvnvIZhHMFq4KVlSHE=" - }, - "whatwg-url": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", - "integrity": "sha1-lmRU6HZUYuN2RNNib2dCzotwll0=", - "requires": { - "tr46": "~0.0.3", - "webidl-conversions": "^3.0.0" - } + "just-curry-it": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/just-curry-it/-/just-curry-it-5.3.0.tgz", + "integrity": "sha512-silMIRiFjUWlfaDhkgSzpuAyQ6EX/o09Eu8ZBfmFwQMbax7+LQzeIU2CBrICT6Ne4l86ITCGvUCBpCubWYy0Yw==" } } } diff --git a/tools/bundler/package.json b/tools/bundler/package.json index c20001ce..fb93440e 100644 --- a/tools/bundler/package.json +++ b/tools/bundler/package.json @@ -2,12 +2,12 @@ "name": "bundler", "version": "1.0.0", "description": "Bundles all definitions together to provide the complete schema document", - "main": "index.js", "scripts": { "bundle": "node index" }, + "type": "module", "dependencies": { - "@hyperjump/json-schema-bundle": "0.1.3", + "@hyperjump/json-schema": "^1.9.2", "json-schema-traverse": "^1.0.0" }, "author": "Jonas Lagoni (jonas-lt@live.dk)", From 6683cd324dbf4a8a8d39ebc295e580e15e80d680 Mon Sep 17 00:00:00 2001 From: Jonas Lagoni Date: Mon, 13 May 2024 11:34:00 +0200 Subject: [PATCH 2/2] revert multi format --- definitions/3.0.0/multiFormatSchema.json | 341 +++++++++++------------ 1 file changed, 167 insertions(+), 174 deletions(-) diff --git a/definitions/3.0.0/multiFormatSchema.json b/definitions/3.0.0/multiFormatSchema.json index 2d73bf1c..077cdcf6 100644 --- a/definitions/3.0.0/multiFormatSchema.json +++ b/definitions/3.0.0/multiFormatSchema.json @@ -6,204 +6,197 @@ "$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" - ] - } - ] + "if": { + "not": { + "type": "object" } }, - "allOf": [ - { - "$ref": "#/definitions/default_message" - }, - { - "$ref": "#/definitions/asyncapi_schema_message" - }, - { - "$ref": "#/definitions/json_schema_draft_7_message" - }, - { - "$ref": "#/definitions/openapi_message" - }, - { - "$ref": "#/definitions/avro_message" - } - ], - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "http://asyncapi.com/definitions/3.0.0/multiFormatSchema.json", - "definitions": { - "default_message": { - "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" - } - } - } - }, - "asyncapi_schema_message": { - "if": { - "description": "If schemaFormat has been defined check if it's one of the AsyncAPI Schema Object formats", - "required": [ - "schemaFormat" - ], - "properties": { - "schemaFormat": { + "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/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/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" + ] } - } - }, - "then": { - "properties": { - "schema": { - "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" - } - } + ] } }, - "json_schema_draft_7_message": { - "if": { - "required": [ - "schemaFormat" - ], - "properties": { - "schemaFormat": { - "enum": [ - "application/schema+json;version=draft-07", - "application/schema+yaml;version=draft-07" + "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" + } + } } }, - "then": { - "properties": { - "schema": { - "$ref": "http://json-schema.org/draft-07/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" + ] + } } - } - } - }, - "openapi_message": { - "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/schema.json" + } } } }, - "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" - } - ] + { + "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" + } } } - } - }, - "avro_message": { - "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" - ] + }, + { + "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" + } + ] + } } } }, - "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" - } - ] + { + "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/multiFormatSchema.json" } \ No newline at end of file