From 3039448a0c9c72ae0c1649ba7998dda585e3b015 Mon Sep 17 00:00:00 2001 From: Jonas Lagoni Date: Mon, 14 Mar 2022 12:53:28 +0100 Subject: [PATCH] feat!: split out definitions (#128) --- .gitignore | 2 +- README.md | 28 +- .../1.0.0/APIKeyHTTPSecurityScheme.json | 36 + .../1.0.0/BearerHTTPSecurityScheme.json | 33 + definitions/1.0.0/HTTPSecurityScheme.json | 15 + .../1.0.0/NonBearerHTTPSecurityScheme.json | 38 + definitions/1.0.0/Reference.json | 14 + definitions/1.0.0/SecurityRequirement.json | 11 + definitions/1.0.0/SecurityScheme.json | 24 + definitions/1.0.0/X509.json | 23 + definitions/1.0.0/apiKey.json | 31 + definitions/1.0.0/asymmetricEncryption.json | 23 + definitions/1.0.0/asyncapi.json | 64 + definitions/1.0.0/components.json | 30 + definitions/1.0.0/contact.json | 28 + definitions/1.0.0/externalDocs.json | 24 + definitions/1.0.0/info.json | 41 + definitions/1.0.0/license.json | 25 + definitions/1.0.0/message.json | 45 + definitions/1.0.0/messages.json | 9 + definitions/1.0.0/schema.json | 131 + definitions/1.0.0/schemas.json | 9 + definitions/1.0.0/server.json | 47 + definitions/1.0.0/serverVariable.json | 28 + definitions/1.0.0/serverVariables.json | 8 + definitions/1.0.0/symmetricEncryption.json | 23 + definitions/1.0.0/tag.json | 25 + definitions/1.0.0/topicItem.json | 27 + definitions/1.0.0/topics.json | 15 + definitions/1.0.0/userPassword.json | 23 + definitions/1.0.0/vendorExtension.json | 7 + definitions/1.0.0/xml.json | 25 + .../1.1.0/APIKeyHTTPSecurityScheme.json | 36 + .../1.1.0/BearerHTTPSecurityScheme.json | 33 + definitions/1.1.0/HTTPSecurityScheme.json | 15 + .../1.1.0/NonBearerHTTPSecurityScheme.json | 38 + definitions/1.1.0/Reference.json | 14 + definitions/1.1.0/SecurityRequirement.json | 11 + definitions/1.1.0/SecurityScheme.json | 24 + definitions/1.1.0/X509.json | 23 + definitions/1.1.0/apiKey.json | 31 + definitions/1.1.0/asymmetricEncryption.json | 23 + definitions/1.1.0/asyncapi.json | 65 + definitions/1.1.0/components.json | 30 + definitions/1.1.0/contact.json | 28 + definitions/1.1.0/externalDocs.json | 24 + definitions/1.1.0/info.json | 41 + definitions/1.1.0/license.json | 25 + definitions/1.1.0/message.json | 45 + definitions/1.1.0/messages.json | 9 + definitions/1.1.0/operation.json | 30 + definitions/1.1.0/parameter.json | 23 + definitions/1.1.0/schema.json | 148 + definitions/1.1.0/schemas.json | 9 + definitions/1.1.0/server.json | 48 + definitions/1.1.0/serverVariable.json | 28 + definitions/1.1.0/serverVariables.json | 8 + definitions/1.1.0/symmetricEncryption.json | 23 + definitions/1.1.0/tag.json | 25 + definitions/1.1.0/topicItem.json | 35 + definitions/1.1.0/topics.json | 15 + definitions/1.1.0/userPassword.json | 23 + definitions/1.1.0/vendorExtension.json | 7 + definitions/1.1.0/xml.json | 25 + .../1.2.0/APIKeyHTTPSecurityScheme.json | 36 + .../1.2.0/BearerHTTPSecurityScheme.json | 33 + definitions/1.2.0/HTTPSecurityScheme.json | 15 + .../1.2.0/NonBearerHTTPSecurityScheme.json | 38 + definitions/1.2.0/Reference.json | 14 + definitions/1.2.0/SecurityRequirement.json | 11 + definitions/1.2.0/SecurityScheme.json | 24 + definitions/1.2.0/X509.json | 23 + definitions/1.2.0/apiKey.json | 31 + definitions/1.2.0/asymmetricEncryption.json | 23 + definitions/1.2.0/asyncapi.json | 90 + definitions/1.2.0/components.json | 33 + definitions/1.2.0/contact.json | 28 + definitions/1.2.0/events.json | 45 + definitions/1.2.0/externalDocs.json | 24 + definitions/1.2.0/info.json | 41 + definitions/1.2.0/license.json | 25 + definitions/1.2.0/message.json | 45 + definitions/1.2.0/messages.json | 9 + definitions/1.2.0/operation.json | 30 + definitions/1.2.0/parameter.json | 26 + definitions/1.2.0/parameters.json | 9 + definitions/1.2.0/schema.json | 148 + definitions/1.2.0/schemas.json | 9 + definitions/1.2.0/server.json | 50 + definitions/1.2.0/serverVariable.json | 28 + definitions/1.2.0/serverVariables.json | 8 + definitions/1.2.0/stream.json | 82 + definitions/1.2.0/symmetricEncryption.json | 23 + definitions/1.2.0/tag.json | 25 + definitions/1.2.0/topicItem.json | 35 + definitions/1.2.0/topics.json | 15 + definitions/1.2.0/userPassword.json | 23 + definitions/1.2.0/vendorExtension.json | 7 + definitions/1.2.0/xml.json | 25 + .../2.0.0-rc1/APIKeyHTTPSecurityScheme.json | 38 + .../2.0.0-rc1/BearerHTTPSecurityScheme.json | 35 + definitions/2.0.0-rc1/HTTPSecurityScheme.json | 15 + .../NonBearerHTTPSecurityScheme.json | 40 + definitions/2.0.0-rc1/Reference.json | 13 + definitions/2.0.0-rc1/ReferenceObject.json | 6 + .../2.0.0-rc1/SecurityRequirement.json | 12 + definitions/2.0.0-rc1/SecurityScheme.json | 30 + definitions/2.0.0-rc1/X509.json | 25 + definitions/2.0.0-rc1/apiKey.json | 33 + .../2.0.0-rc1/asymmetricEncryption.json | 25 + definitions/2.0.0-rc1/asyncapi.json | 61 + definitions/2.0.0-rc1/channelItem.json | 41 + definitions/2.0.0-rc1/channels.json | 13 + definitions/2.0.0-rc1/components.json | 51 + definitions/2.0.0-rc1/contact.json | 28 + definitions/2.0.0-rc1/correlationId.json | 25 + definitions/2.0.0-rc1/externalDocs.json | 24 + definitions/2.0.0-rc1/info.json | 41 + definitions/2.0.0-rc1/license.json | 25 + definitions/2.0.0-rc1/message.json | 117 + definitions/2.0.0-rc1/messageTrait.json | 84 + definitions/2.0.0-rc1/messages.json | 9 + definitions/2.0.0-rc1/oauth2Flow.json | 28 + definitions/2.0.0-rc1/oauth2Flows.json | 106 + definitions/2.0.0-rc1/oauth2Scopes.json | 8 + definitions/2.0.0-rc1/openIdConnect.json | 30 + definitions/2.0.0-rc1/operation.json | 98 + definitions/2.0.0-rc1/operationTrait.json | 38 + definitions/2.0.0-rc1/parameter.json | 26 + definitions/2.0.0-rc1/parameters.json | 9 + definitions/2.0.0-rc1/schema.json | 156 + definitions/2.0.0-rc1/schemas.json | 9 + definitions/2.0.0-rc1/server.json | 44 + definitions/2.0.0-rc1/serverVariable.json | 34 + definitions/2.0.0-rc1/serverVariables.json | 8 + .../2.0.0-rc1/specificationExtension.json | 7 + .../2.0.0-rc1/symmetricEncryption.json | 25 + definitions/2.0.0-rc1/tag.json | 25 + definitions/2.0.0-rc1/traits.json | 15 + definitions/2.0.0-rc1/userPassword.json | 25 + definitions/2.0.0-rc1/xml.json | 25 + .../2.0.0-rc2/APIKeyHTTPSecurityScheme.json | 38 + .../2.0.0-rc2/BearerHTTPSecurityScheme.json | 35 + definitions/2.0.0-rc2/HTTPSecurityScheme.json | 15 + .../NonBearerHTTPSecurityScheme.json | 40 + definitions/2.0.0-rc2/Reference.json | 13 + definitions/2.0.0-rc2/ReferenceObject.json | 6 + .../2.0.0-rc2/SecurityRequirement.json | 12 + definitions/2.0.0-rc2/SecurityScheme.json | 30 + definitions/2.0.0-rc2/X509.json | 25 + definitions/2.0.0-rc2/apiKey.json | 33 + .../2.0.0-rc2/asymmetricEncryption.json | 25 + definitions/2.0.0-rc2/asyncapi.json | 59 + definitions/2.0.0-rc2/bindingsObject.json | 21 + definitions/2.0.0-rc2/channelItem.json | 40 + definitions/2.0.0-rc2/channels.json | 13 + definitions/2.0.0-rc2/components.json | 84 + definitions/2.0.0-rc2/contact.json | 28 + definitions/2.0.0-rc2/correlationId.json | 25 + definitions/2.0.0-rc2/externalDocs.json | 24 + definitions/2.0.0-rc2/info.json | 41 + definitions/2.0.0-rc2/license.json | 25 + definitions/2.0.0-rc2/message.json | 130 + definitions/2.0.0-rc2/messageTrait.json | 78 + definitions/2.0.0-rc2/messages.json | 9 + definitions/2.0.0-rc2/oauth2Flow.json | 28 + definitions/2.0.0-rc2/oauth2Flows.json | 106 + definitions/2.0.0-rc2/oauth2Scopes.json | 8 + definitions/2.0.0-rc2/openIdConnect.json | 30 + definitions/2.0.0-rc2/operation.json | 70 + definitions/2.0.0-rc2/operationTrait.json | 35 + definitions/2.0.0-rc2/parameter.json | 27 + definitions/2.0.0-rc2/parameters.json | 9 + definitions/2.0.0-rc2/schema.json | 91 + definitions/2.0.0-rc2/schemas.json | 9 + definitions/2.0.0-rc2/server.json | 43 + definitions/2.0.0-rc2/serverVariable.json | 34 + definitions/2.0.0-rc2/serverVariables.json | 8 + .../2.0.0-rc2/specificationExtension.json | 7 + .../2.0.0-rc2/symmetricEncryption.json | 25 + definitions/2.0.0-rc2/tag.json | 25 + definitions/2.0.0-rc2/userPassword.json | 25 + .../2.0.0/APIKeyHTTPSecurityScheme.json | 38 + .../2.0.0/BearerHTTPSecurityScheme.json | 35 + definitions/2.0.0/HTTPSecurityScheme.json | 15 + .../2.0.0/NonBearerHTTPSecurityScheme.json | 40 + definitions/2.0.0/Reference.json | 13 + definitions/2.0.0/ReferenceObject.json | 6 + definitions/2.0.0/SecurityRequirement.json | 12 + definitions/2.0.0/SecurityScheme.json | 30 + definitions/2.0.0/X509.json | 25 + definitions/2.0.0/apiKey.json | 33 + definitions/2.0.0/asymmetricEncryption.json | 25 + definitions/2.0.0/asyncapi.json | 59 + definitions/2.0.0/bindingsObject.json | 21 + definitions/2.0.0/channelItem.json | 39 + definitions/2.0.0/channels.json | 13 + definitions/2.0.0/components.json | 89 + definitions/2.0.0/contact.json | 28 + definitions/2.0.0/correlationId.json | 25 + definitions/2.0.0/externalDocs.json | 24 + definitions/2.0.0/info.json | 41 + definitions/2.0.0/license.json | 25 + definitions/2.0.0/message.json | 148 + definitions/2.0.0/messageTrait.json | 78 + definitions/2.0.0/messages.json | 9 + definitions/2.0.0/oauth2Flow.json | 28 + definitions/2.0.0/oauth2Flows.json | 105 + definitions/2.0.0/oauth2Scopes.json | 8 + definitions/2.0.0/openIdConnect.json | 30 + definitions/2.0.0/operation.json | 70 + definitions/2.0.0/operationTrait.json | 35 + definitions/2.0.0/parameter.json | 27 + definitions/2.0.0/parameters.json | 9 + definitions/2.0.0/schema.json | 98 + definitions/2.0.0/schemas.json | 9 + definitions/2.0.0/server.json | 43 + definitions/2.0.0/serverVariable.json | 33 + definitions/2.0.0/serverVariables.json | 8 + definitions/2.0.0/specificationExtension.json | 7 + definitions/2.0.0/symmetricEncryption.json | 25 + definitions/2.0.0/tag.json | 25 + definitions/2.0.0/userPassword.json | 25 + .../2.1.0/APIKeyHTTPSecurityScheme.json | 38 + .../2.1.0/BearerHTTPSecurityScheme.json | 35 + definitions/2.1.0/HTTPSecurityScheme.json | 15 + .../2.1.0/NonBearerHTTPSecurityScheme.json | 40 + definitions/2.1.0/Reference.json | 13 + definitions/2.1.0/ReferenceObject.json | 6 + .../2.1.0/SaslGssapiSecurityScheme.json | 25 + .../2.1.0/SaslPlainSecurityScheme.json | 25 + .../2.1.0/SaslScramSecurityScheme.json | 26 + definitions/2.1.0/SaslSecurityScheme.json | 15 + definitions/2.1.0/SecurityRequirement.json | 12 + definitions/2.1.0/SecurityScheme.json | 33 + definitions/2.1.0/X509.json | 25 + definitions/2.1.0/apiKey.json | 33 + definitions/2.1.0/asymmetricEncryption.json | 25 + definitions/2.1.0/asyncapi.json | 59 + definitions/2.1.0/bindingsObject.json | 22 + definitions/2.1.0/channelItem.json | 39 + definitions/2.1.0/channels.json | 13 + definitions/2.1.0/components.json | 89 + definitions/2.1.0/contact.json | 28 + definitions/2.1.0/correlationId.json | 25 + definitions/2.1.0/externalDocs.json | 24 + definitions/2.1.0/info.json | 41 + definitions/2.1.0/license.json | 25 + definitions/2.1.0/message.json | 168 + definitions/2.1.0/messageTrait.json | 105 + definitions/2.1.0/messages.json | 9 + definitions/2.1.0/oauth2Flow.json | 28 + definitions/2.1.0/oauth2Flows.json | 105 + definitions/2.1.0/oauth2Scopes.json | 8 + definitions/2.1.0/openIdConnect.json | 30 + definitions/2.1.0/operation.json | 70 + definitions/2.1.0/operationTrait.json | 35 + definitions/2.1.0/parameter.json | 27 + definitions/2.1.0/parameters.json | 9 + definitions/2.1.0/schema.json | 98 + definitions/2.1.0/schemas.json | 9 + definitions/2.1.0/server.json | 43 + definitions/2.1.0/serverVariable.json | 33 + definitions/2.1.0/serverVariables.json | 8 + definitions/2.1.0/specificationExtension.json | 7 + definitions/2.1.0/symmetricEncryption.json | 25 + definitions/2.1.0/tag.json | 25 + definitions/2.1.0/userPassword.json | 25 + .../2.2.0/APIKeyHTTPSecurityScheme.json | 38 + .../2.2.0/BearerHTTPSecurityScheme.json | 35 + definitions/2.2.0/HTTPSecurityScheme.json | 15 + .../2.2.0/NonBearerHTTPSecurityScheme.json | 40 + definitions/2.2.0/Reference.json | 13 + definitions/2.2.0/ReferenceObject.json | 6 + .../2.2.0/SaslGssapiSecurityScheme.json | 25 + .../2.2.0/SaslPlainSecurityScheme.json | 25 + .../2.2.0/SaslScramSecurityScheme.json | 26 + definitions/2.2.0/SaslSecurityScheme.json | 15 + definitions/2.2.0/SecurityRequirement.json | 12 + definitions/2.2.0/SecurityScheme.json | 33 + definitions/2.2.0/X509.json | 25 + definitions/2.2.0/apiKey.json | 33 + definitions/2.2.0/asymmetricEncryption.json | 25 + definitions/2.2.0/asyncapi.json | 59 + definitions/2.2.0/bindingsObject.json | 23 + definitions/2.2.0/channelItem.json | 47 + definitions/2.2.0/channels.json | 13 + definitions/2.2.0/components.json | 89 + definitions/2.2.0/contact.json | 28 + definitions/2.2.0/correlationId.json | 25 + definitions/2.2.0/external.json | 5 + definitions/2.2.0/externalDocs.json | 24 + definitions/2.2.0/info.json | 41 + definitions/2.2.0/license.json | 25 + definitions/2.2.0/message.json | 168 + definitions/2.2.0/messageTrait.json | 78 + definitions/2.2.0/messages.json | 9 + definitions/2.2.0/oauth2Flow.json | 28 + definitions/2.2.0/oauth2Flows.json | 105 + definitions/2.2.0/oauth2Scopes.json | 8 + definitions/2.2.0/openIdConnect.json | 30 + definitions/2.2.0/operation.json | 70 + definitions/2.2.0/operationTrait.json | 35 + definitions/2.2.0/parameter.json | 27 + definitions/2.2.0/parameters.json | 9 + definitions/2.2.0/schema.json | 98 + definitions/2.2.0/schemas.json | 9 + definitions/2.2.0/server.json | 43 + definitions/2.2.0/serverVariable.json | 33 + definitions/2.2.0/serverVariables.json | 8 + definitions/2.2.0/specificationExtension.json | 7 + definitions/2.2.0/symmetricEncryption.json | 25 + definitions/2.2.0/tag.json | 25 + definitions/2.2.0/userPassword.json | 25 + .../2.3.0/APIKeyHTTPSecurityScheme.json | 38 + .../2.3.0/BearerHTTPSecurityScheme.json | 35 + definitions/2.3.0/HTTPSecurityScheme.json | 15 + .../2.3.0/NonBearerHTTPSecurityScheme.json | 40 + definitions/2.3.0/Reference.json | 13 + definitions/2.3.0/ReferenceObject.json | 6 + .../2.3.0/SaslGssapiSecurityScheme.json | 25 + .../2.3.0/SaslPlainSecurityScheme.json | 25 + .../2.3.0/SaslScramSecurityScheme.json | 26 + definitions/2.3.0/SaslSecurityScheme.json | 15 + definitions/2.3.0/SecurityRequirement.json | 12 + definitions/2.3.0/SecurityScheme.json | 33 + definitions/2.3.0/X509.json | 25 + definitions/2.3.0/apiKey.json | 33 + definitions/2.3.0/asymmetricEncryption.json | 25 + definitions/2.3.0/asyncapi.json | 56 + definitions/2.3.0/bindingsObject.json | 24 + definitions/2.3.0/channelItem.json | 47 + definitions/2.3.0/channels.json | 13 + definitions/2.3.0/components.json | 89 + definitions/2.3.0/contact.json | 28 + definitions/2.3.0/correlationId.json | 25 + definitions/2.3.0/external.json | 5 + definitions/2.3.0/externalDocs.json | 24 + definitions/2.3.0/info.json | 41 + definitions/2.3.0/license.json | 25 + definitions/2.3.0/message.json | 168 + definitions/2.3.0/messageTrait.json | 82 + definitions/2.3.0/messages.json | 9 + definitions/2.3.0/oauth2Flow.json | 28 + definitions/2.3.0/oauth2Flows.json | 105 + definitions/2.3.0/oauth2Scopes.json | 8 + definitions/2.3.0/openIdConnect.json | 30 + definitions/2.3.0/operation.json | 70 + definitions/2.3.0/operationTrait.json | 35 + definitions/2.3.0/parameter.json | 27 + definitions/2.3.0/parameters.json | 9 + definitions/2.3.0/schema.json | 98 + definitions/2.3.0/schemas.json | 9 + definitions/2.3.0/server.json | 43 + definitions/2.3.0/serverVariable.json | 33 + definitions/2.3.0/serverVariables.json | 8 + definitions/2.3.0/servers.json | 16 + definitions/2.3.0/specificationExtension.json | 7 + definitions/2.3.0/symmetricEncryption.json | 25 + definitions/2.3.0/tag.json | 25 + definitions/2.3.0/userPassword.json | 25 + index.js | 2 +- migrations/Migrate to version 3.md | 35 + package.json | 10 +- schemas/1.0.0.json | 1864 +++++----- schemas/1.1.0.json | 2008 ++++++----- schemas/1.2.0.json | 2297 ++++++------ schemas/2.0.0-rc1.json | 2906 +++++++++------- schemas/2.0.0-rc2.json | 2778 ++++++++------- schemas/2.0.0.json | 2818 ++++++++------- schemas/2.1.0.json | 3080 ++++++++-------- schemas/2.2.0.json | 3046 ++++++++-------- schemas/2.3.0.json | 3094 +++++++++-------- test/index.js | 3 +- tools/bundler/index.js | 42 + tools/bundler/package-lock.json | 112 + tools/bundler/package.json | 14 + 377 files changed, 25597 insertions(+), 10695 deletions(-) create mode 100644 definitions/1.0.0/APIKeyHTTPSecurityScheme.json create mode 100644 definitions/1.0.0/BearerHTTPSecurityScheme.json create mode 100644 definitions/1.0.0/HTTPSecurityScheme.json create mode 100644 definitions/1.0.0/NonBearerHTTPSecurityScheme.json create mode 100644 definitions/1.0.0/Reference.json create mode 100644 definitions/1.0.0/SecurityRequirement.json create mode 100644 definitions/1.0.0/SecurityScheme.json create mode 100644 definitions/1.0.0/X509.json create mode 100644 definitions/1.0.0/apiKey.json create mode 100644 definitions/1.0.0/asymmetricEncryption.json create mode 100644 definitions/1.0.0/asyncapi.json create mode 100644 definitions/1.0.0/components.json create mode 100644 definitions/1.0.0/contact.json create mode 100644 definitions/1.0.0/externalDocs.json create mode 100644 definitions/1.0.0/info.json create mode 100644 definitions/1.0.0/license.json create mode 100644 definitions/1.0.0/message.json create mode 100644 definitions/1.0.0/messages.json create mode 100644 definitions/1.0.0/schema.json create mode 100644 definitions/1.0.0/schemas.json create mode 100644 definitions/1.0.0/server.json create mode 100644 definitions/1.0.0/serverVariable.json create mode 100644 definitions/1.0.0/serverVariables.json create mode 100644 definitions/1.0.0/symmetricEncryption.json create mode 100644 definitions/1.0.0/tag.json create mode 100644 definitions/1.0.0/topicItem.json create mode 100644 definitions/1.0.0/topics.json create mode 100644 definitions/1.0.0/userPassword.json create mode 100644 definitions/1.0.0/vendorExtension.json create mode 100644 definitions/1.0.0/xml.json create mode 100644 definitions/1.1.0/APIKeyHTTPSecurityScheme.json create mode 100644 definitions/1.1.0/BearerHTTPSecurityScheme.json create mode 100644 definitions/1.1.0/HTTPSecurityScheme.json create mode 100644 definitions/1.1.0/NonBearerHTTPSecurityScheme.json create mode 100644 definitions/1.1.0/Reference.json create mode 100644 definitions/1.1.0/SecurityRequirement.json create mode 100644 definitions/1.1.0/SecurityScheme.json create mode 100644 definitions/1.1.0/X509.json create mode 100644 definitions/1.1.0/apiKey.json create mode 100644 definitions/1.1.0/asymmetricEncryption.json create mode 100644 definitions/1.1.0/asyncapi.json create mode 100644 definitions/1.1.0/components.json create mode 100644 definitions/1.1.0/contact.json create mode 100644 definitions/1.1.0/externalDocs.json create mode 100644 definitions/1.1.0/info.json create mode 100644 definitions/1.1.0/license.json create mode 100644 definitions/1.1.0/message.json create mode 100644 definitions/1.1.0/messages.json create mode 100644 definitions/1.1.0/operation.json create mode 100644 definitions/1.1.0/parameter.json create mode 100644 definitions/1.1.0/schema.json create mode 100644 definitions/1.1.0/schemas.json create mode 100644 definitions/1.1.0/server.json create mode 100644 definitions/1.1.0/serverVariable.json create mode 100644 definitions/1.1.0/serverVariables.json create mode 100644 definitions/1.1.0/symmetricEncryption.json create mode 100644 definitions/1.1.0/tag.json create mode 100644 definitions/1.1.0/topicItem.json create mode 100644 definitions/1.1.0/topics.json create mode 100644 definitions/1.1.0/userPassword.json create mode 100644 definitions/1.1.0/vendorExtension.json create mode 100644 definitions/1.1.0/xml.json create mode 100644 definitions/1.2.0/APIKeyHTTPSecurityScheme.json create mode 100644 definitions/1.2.0/BearerHTTPSecurityScheme.json create mode 100644 definitions/1.2.0/HTTPSecurityScheme.json create mode 100644 definitions/1.2.0/NonBearerHTTPSecurityScheme.json create mode 100644 definitions/1.2.0/Reference.json create mode 100644 definitions/1.2.0/SecurityRequirement.json create mode 100644 definitions/1.2.0/SecurityScheme.json create mode 100644 definitions/1.2.0/X509.json create mode 100644 definitions/1.2.0/apiKey.json create mode 100644 definitions/1.2.0/asymmetricEncryption.json create mode 100644 definitions/1.2.0/asyncapi.json create mode 100644 definitions/1.2.0/components.json create mode 100644 definitions/1.2.0/contact.json create mode 100644 definitions/1.2.0/events.json create mode 100644 definitions/1.2.0/externalDocs.json create mode 100644 definitions/1.2.0/info.json create mode 100644 definitions/1.2.0/license.json create mode 100644 definitions/1.2.0/message.json create mode 100644 definitions/1.2.0/messages.json create mode 100644 definitions/1.2.0/operation.json create mode 100644 definitions/1.2.0/parameter.json create mode 100644 definitions/1.2.0/parameters.json create mode 100644 definitions/1.2.0/schema.json create mode 100644 definitions/1.2.0/schemas.json create mode 100644 definitions/1.2.0/server.json create mode 100644 definitions/1.2.0/serverVariable.json create mode 100644 definitions/1.2.0/serverVariables.json create mode 100644 definitions/1.2.0/stream.json create mode 100644 definitions/1.2.0/symmetricEncryption.json create mode 100644 definitions/1.2.0/tag.json create mode 100644 definitions/1.2.0/topicItem.json create mode 100644 definitions/1.2.0/topics.json create mode 100644 definitions/1.2.0/userPassword.json create mode 100644 definitions/1.2.0/vendorExtension.json create mode 100644 definitions/1.2.0/xml.json create mode 100644 definitions/2.0.0-rc1/APIKeyHTTPSecurityScheme.json create mode 100644 definitions/2.0.0-rc1/BearerHTTPSecurityScheme.json create mode 100644 definitions/2.0.0-rc1/HTTPSecurityScheme.json create mode 100644 definitions/2.0.0-rc1/NonBearerHTTPSecurityScheme.json create mode 100644 definitions/2.0.0-rc1/Reference.json create mode 100644 definitions/2.0.0-rc1/ReferenceObject.json create mode 100644 definitions/2.0.0-rc1/SecurityRequirement.json create mode 100644 definitions/2.0.0-rc1/SecurityScheme.json create mode 100644 definitions/2.0.0-rc1/X509.json create mode 100644 definitions/2.0.0-rc1/apiKey.json create mode 100644 definitions/2.0.0-rc1/asymmetricEncryption.json create mode 100644 definitions/2.0.0-rc1/asyncapi.json create mode 100644 definitions/2.0.0-rc1/channelItem.json create mode 100644 definitions/2.0.0-rc1/channels.json create mode 100644 definitions/2.0.0-rc1/components.json create mode 100644 definitions/2.0.0-rc1/contact.json create mode 100644 definitions/2.0.0-rc1/correlationId.json create mode 100644 definitions/2.0.0-rc1/externalDocs.json create mode 100644 definitions/2.0.0-rc1/info.json create mode 100644 definitions/2.0.0-rc1/license.json create mode 100644 definitions/2.0.0-rc1/message.json create mode 100644 definitions/2.0.0-rc1/messageTrait.json create mode 100644 definitions/2.0.0-rc1/messages.json create mode 100644 definitions/2.0.0-rc1/oauth2Flow.json create mode 100644 definitions/2.0.0-rc1/oauth2Flows.json create mode 100644 definitions/2.0.0-rc1/oauth2Scopes.json create mode 100644 definitions/2.0.0-rc1/openIdConnect.json create mode 100644 definitions/2.0.0-rc1/operation.json create mode 100644 definitions/2.0.0-rc1/operationTrait.json create mode 100644 definitions/2.0.0-rc1/parameter.json create mode 100644 definitions/2.0.0-rc1/parameters.json create mode 100644 definitions/2.0.0-rc1/schema.json create mode 100644 definitions/2.0.0-rc1/schemas.json create mode 100644 definitions/2.0.0-rc1/server.json create mode 100644 definitions/2.0.0-rc1/serverVariable.json create mode 100644 definitions/2.0.0-rc1/serverVariables.json create mode 100644 definitions/2.0.0-rc1/specificationExtension.json create mode 100644 definitions/2.0.0-rc1/symmetricEncryption.json create mode 100644 definitions/2.0.0-rc1/tag.json create mode 100644 definitions/2.0.0-rc1/traits.json create mode 100644 definitions/2.0.0-rc1/userPassword.json create mode 100644 definitions/2.0.0-rc1/xml.json create mode 100644 definitions/2.0.0-rc2/APIKeyHTTPSecurityScheme.json create mode 100644 definitions/2.0.0-rc2/BearerHTTPSecurityScheme.json create mode 100644 definitions/2.0.0-rc2/HTTPSecurityScheme.json create mode 100644 definitions/2.0.0-rc2/NonBearerHTTPSecurityScheme.json create mode 100644 definitions/2.0.0-rc2/Reference.json create mode 100644 definitions/2.0.0-rc2/ReferenceObject.json create mode 100644 definitions/2.0.0-rc2/SecurityRequirement.json create mode 100644 definitions/2.0.0-rc2/SecurityScheme.json create mode 100644 definitions/2.0.0-rc2/X509.json create mode 100644 definitions/2.0.0-rc2/apiKey.json create mode 100644 definitions/2.0.0-rc2/asymmetricEncryption.json create mode 100644 definitions/2.0.0-rc2/asyncapi.json create mode 100644 definitions/2.0.0-rc2/bindingsObject.json create mode 100644 definitions/2.0.0-rc2/channelItem.json create mode 100644 definitions/2.0.0-rc2/channels.json create mode 100644 definitions/2.0.0-rc2/components.json create mode 100644 definitions/2.0.0-rc2/contact.json create mode 100644 definitions/2.0.0-rc2/correlationId.json create mode 100644 definitions/2.0.0-rc2/externalDocs.json create mode 100644 definitions/2.0.0-rc2/info.json create mode 100644 definitions/2.0.0-rc2/license.json create mode 100644 definitions/2.0.0-rc2/message.json create mode 100644 definitions/2.0.0-rc2/messageTrait.json create mode 100644 definitions/2.0.0-rc2/messages.json create mode 100644 definitions/2.0.0-rc2/oauth2Flow.json create mode 100644 definitions/2.0.0-rc2/oauth2Flows.json create mode 100644 definitions/2.0.0-rc2/oauth2Scopes.json create mode 100644 definitions/2.0.0-rc2/openIdConnect.json create mode 100644 definitions/2.0.0-rc2/operation.json create mode 100644 definitions/2.0.0-rc2/operationTrait.json create mode 100644 definitions/2.0.0-rc2/parameter.json create mode 100644 definitions/2.0.0-rc2/parameters.json create mode 100644 definitions/2.0.0-rc2/schema.json create mode 100644 definitions/2.0.0-rc2/schemas.json create mode 100644 definitions/2.0.0-rc2/server.json create mode 100644 definitions/2.0.0-rc2/serverVariable.json create mode 100644 definitions/2.0.0-rc2/serverVariables.json create mode 100644 definitions/2.0.0-rc2/specificationExtension.json create mode 100644 definitions/2.0.0-rc2/symmetricEncryption.json create mode 100644 definitions/2.0.0-rc2/tag.json create mode 100644 definitions/2.0.0-rc2/userPassword.json create mode 100644 definitions/2.0.0/APIKeyHTTPSecurityScheme.json create mode 100644 definitions/2.0.0/BearerHTTPSecurityScheme.json create mode 100644 definitions/2.0.0/HTTPSecurityScheme.json create mode 100644 definitions/2.0.0/NonBearerHTTPSecurityScheme.json create mode 100644 definitions/2.0.0/Reference.json create mode 100644 definitions/2.0.0/ReferenceObject.json create mode 100644 definitions/2.0.0/SecurityRequirement.json create mode 100644 definitions/2.0.0/SecurityScheme.json create mode 100644 definitions/2.0.0/X509.json create mode 100644 definitions/2.0.0/apiKey.json create mode 100644 definitions/2.0.0/asymmetricEncryption.json create mode 100644 definitions/2.0.0/asyncapi.json create mode 100644 definitions/2.0.0/bindingsObject.json create mode 100644 definitions/2.0.0/channelItem.json create mode 100644 definitions/2.0.0/channels.json create mode 100644 definitions/2.0.0/components.json create mode 100644 definitions/2.0.0/contact.json create mode 100644 definitions/2.0.0/correlationId.json create mode 100644 definitions/2.0.0/externalDocs.json create mode 100644 definitions/2.0.0/info.json create mode 100644 definitions/2.0.0/license.json create mode 100644 definitions/2.0.0/message.json create mode 100644 definitions/2.0.0/messageTrait.json create mode 100644 definitions/2.0.0/messages.json create mode 100644 definitions/2.0.0/oauth2Flow.json create mode 100644 definitions/2.0.0/oauth2Flows.json create mode 100644 definitions/2.0.0/oauth2Scopes.json create mode 100644 definitions/2.0.0/openIdConnect.json create mode 100644 definitions/2.0.0/operation.json create mode 100644 definitions/2.0.0/operationTrait.json create mode 100644 definitions/2.0.0/parameter.json create mode 100644 definitions/2.0.0/parameters.json create mode 100644 definitions/2.0.0/schema.json create mode 100644 definitions/2.0.0/schemas.json create mode 100644 definitions/2.0.0/server.json create mode 100644 definitions/2.0.0/serverVariable.json create mode 100644 definitions/2.0.0/serverVariables.json create mode 100644 definitions/2.0.0/specificationExtension.json create mode 100644 definitions/2.0.0/symmetricEncryption.json create mode 100644 definitions/2.0.0/tag.json create mode 100644 definitions/2.0.0/userPassword.json create mode 100644 definitions/2.1.0/APIKeyHTTPSecurityScheme.json create mode 100644 definitions/2.1.0/BearerHTTPSecurityScheme.json create mode 100644 definitions/2.1.0/HTTPSecurityScheme.json create mode 100644 definitions/2.1.0/NonBearerHTTPSecurityScheme.json create mode 100644 definitions/2.1.0/Reference.json create mode 100644 definitions/2.1.0/ReferenceObject.json create mode 100644 definitions/2.1.0/SaslGssapiSecurityScheme.json create mode 100644 definitions/2.1.0/SaslPlainSecurityScheme.json create mode 100644 definitions/2.1.0/SaslScramSecurityScheme.json create mode 100644 definitions/2.1.0/SaslSecurityScheme.json create mode 100644 definitions/2.1.0/SecurityRequirement.json create mode 100644 definitions/2.1.0/SecurityScheme.json create mode 100644 definitions/2.1.0/X509.json create mode 100644 definitions/2.1.0/apiKey.json create mode 100644 definitions/2.1.0/asymmetricEncryption.json create mode 100644 definitions/2.1.0/asyncapi.json create mode 100644 definitions/2.1.0/bindingsObject.json create mode 100644 definitions/2.1.0/channelItem.json create mode 100644 definitions/2.1.0/channels.json create mode 100644 definitions/2.1.0/components.json create mode 100644 definitions/2.1.0/contact.json create mode 100644 definitions/2.1.0/correlationId.json create mode 100644 definitions/2.1.0/externalDocs.json create mode 100644 definitions/2.1.0/info.json create mode 100644 definitions/2.1.0/license.json create mode 100644 definitions/2.1.0/message.json create mode 100644 definitions/2.1.0/messageTrait.json create mode 100644 definitions/2.1.0/messages.json create mode 100644 definitions/2.1.0/oauth2Flow.json create mode 100644 definitions/2.1.0/oauth2Flows.json create mode 100644 definitions/2.1.0/oauth2Scopes.json create mode 100644 definitions/2.1.0/openIdConnect.json create mode 100644 definitions/2.1.0/operation.json create mode 100644 definitions/2.1.0/operationTrait.json create mode 100644 definitions/2.1.0/parameter.json create mode 100644 definitions/2.1.0/parameters.json create mode 100644 definitions/2.1.0/schema.json create mode 100644 definitions/2.1.0/schemas.json create mode 100644 definitions/2.1.0/server.json create mode 100644 definitions/2.1.0/serverVariable.json create mode 100644 definitions/2.1.0/serverVariables.json create mode 100644 definitions/2.1.0/specificationExtension.json create mode 100644 definitions/2.1.0/symmetricEncryption.json create mode 100644 definitions/2.1.0/tag.json create mode 100644 definitions/2.1.0/userPassword.json create mode 100644 definitions/2.2.0/APIKeyHTTPSecurityScheme.json create mode 100644 definitions/2.2.0/BearerHTTPSecurityScheme.json create mode 100644 definitions/2.2.0/HTTPSecurityScheme.json create mode 100644 definitions/2.2.0/NonBearerHTTPSecurityScheme.json create mode 100644 definitions/2.2.0/Reference.json create mode 100644 definitions/2.2.0/ReferenceObject.json create mode 100644 definitions/2.2.0/SaslGssapiSecurityScheme.json create mode 100644 definitions/2.2.0/SaslPlainSecurityScheme.json create mode 100644 definitions/2.2.0/SaslScramSecurityScheme.json create mode 100644 definitions/2.2.0/SaslSecurityScheme.json create mode 100644 definitions/2.2.0/SecurityRequirement.json create mode 100644 definitions/2.2.0/SecurityScheme.json create mode 100644 definitions/2.2.0/X509.json create mode 100644 definitions/2.2.0/apiKey.json create mode 100644 definitions/2.2.0/asymmetricEncryption.json create mode 100644 definitions/2.2.0/asyncapi.json create mode 100644 definitions/2.2.0/bindingsObject.json create mode 100644 definitions/2.2.0/channelItem.json create mode 100644 definitions/2.2.0/channels.json create mode 100644 definitions/2.2.0/components.json create mode 100644 definitions/2.2.0/contact.json create mode 100644 definitions/2.2.0/correlationId.json create mode 100644 definitions/2.2.0/external.json create mode 100644 definitions/2.2.0/externalDocs.json create mode 100644 definitions/2.2.0/info.json create mode 100644 definitions/2.2.0/license.json create mode 100644 definitions/2.2.0/message.json create mode 100644 definitions/2.2.0/messageTrait.json create mode 100644 definitions/2.2.0/messages.json create mode 100644 definitions/2.2.0/oauth2Flow.json create mode 100644 definitions/2.2.0/oauth2Flows.json create mode 100644 definitions/2.2.0/oauth2Scopes.json create mode 100644 definitions/2.2.0/openIdConnect.json create mode 100644 definitions/2.2.0/operation.json create mode 100644 definitions/2.2.0/operationTrait.json create mode 100644 definitions/2.2.0/parameter.json create mode 100644 definitions/2.2.0/parameters.json create mode 100644 definitions/2.2.0/schema.json create mode 100644 definitions/2.2.0/schemas.json create mode 100644 definitions/2.2.0/server.json create mode 100644 definitions/2.2.0/serverVariable.json create mode 100644 definitions/2.2.0/serverVariables.json create mode 100644 definitions/2.2.0/specificationExtension.json create mode 100644 definitions/2.2.0/symmetricEncryption.json create mode 100644 definitions/2.2.0/tag.json create mode 100644 definitions/2.2.0/userPassword.json create mode 100644 definitions/2.3.0/APIKeyHTTPSecurityScheme.json create mode 100644 definitions/2.3.0/BearerHTTPSecurityScheme.json create mode 100644 definitions/2.3.0/HTTPSecurityScheme.json create mode 100644 definitions/2.3.0/NonBearerHTTPSecurityScheme.json create mode 100644 definitions/2.3.0/Reference.json create mode 100644 definitions/2.3.0/ReferenceObject.json create mode 100644 definitions/2.3.0/SaslGssapiSecurityScheme.json create mode 100644 definitions/2.3.0/SaslPlainSecurityScheme.json create mode 100644 definitions/2.3.0/SaslScramSecurityScheme.json create mode 100644 definitions/2.3.0/SaslSecurityScheme.json create mode 100644 definitions/2.3.0/SecurityRequirement.json create mode 100644 definitions/2.3.0/SecurityScheme.json create mode 100644 definitions/2.3.0/X509.json create mode 100644 definitions/2.3.0/apiKey.json create mode 100644 definitions/2.3.0/asymmetricEncryption.json create mode 100644 definitions/2.3.0/asyncapi.json create mode 100644 definitions/2.3.0/bindingsObject.json create mode 100644 definitions/2.3.0/channelItem.json create mode 100644 definitions/2.3.0/channels.json create mode 100644 definitions/2.3.0/components.json create mode 100644 definitions/2.3.0/contact.json create mode 100644 definitions/2.3.0/correlationId.json create mode 100644 definitions/2.3.0/external.json create mode 100644 definitions/2.3.0/externalDocs.json create mode 100644 definitions/2.3.0/info.json create mode 100644 definitions/2.3.0/license.json create mode 100644 definitions/2.3.0/message.json create mode 100644 definitions/2.3.0/messageTrait.json create mode 100644 definitions/2.3.0/messages.json create mode 100644 definitions/2.3.0/oauth2Flow.json create mode 100644 definitions/2.3.0/oauth2Flows.json create mode 100644 definitions/2.3.0/oauth2Scopes.json create mode 100644 definitions/2.3.0/openIdConnect.json create mode 100644 definitions/2.3.0/operation.json create mode 100644 definitions/2.3.0/operationTrait.json create mode 100644 definitions/2.3.0/parameter.json create mode 100644 definitions/2.3.0/parameters.json create mode 100644 definitions/2.3.0/schema.json create mode 100644 definitions/2.3.0/schemas.json create mode 100644 definitions/2.3.0/server.json create mode 100644 definitions/2.3.0/serverVariable.json create mode 100644 definitions/2.3.0/serverVariables.json create mode 100644 definitions/2.3.0/servers.json create mode 100644 definitions/2.3.0/specificationExtension.json create mode 100644 definitions/2.3.0/symmetricEncryption.json create mode 100644 definitions/2.3.0/tag.json create mode 100644 definitions/2.3.0/userPassword.json create mode 100644 migrations/Migrate to version 3.md create mode 100644 tools/bundler/index.js create mode 100644 tools/bundler/package-lock.json create mode 100644 tools/bundler/package.json diff --git a/.gitignore b/.gitignore index d4e62d0d..d4a20833 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ node_modules .nyc_output .vscode -coverage +coverage \ No newline at end of file diff --git a/README.md b/README.md index ec445cb3..29427307 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,9 @@ ![npm](https://img.shields.io/npm/v/@asyncapi/specs?style=for-the-badge) ![npm](https://img.shields.io/npm/dt/@asyncapi/specs?style=for-the-badge) +> If you are currently using version 2, check out [migration guideline to version 3](./migrations/Migrate%20to%20version%203.md). You might be able to update it without any change. # AsyncAPI -This package provides all the versions of the AsyncAPI schema. +This is a mono repository, which provides all the JSON Schema documents for validating AsyncAPI documents. ## Installation @@ -37,3 +38,28 @@ const asyncapi = versions['1.1.0']; // Do something with the schema. ``` + +## Repository structure +This is the current project structure explained. +- [./definitions](./definitions) - contain all the individual schemas that will automatically be bundled together to provide the schemas in [./schemas](./schemas). +- [./tools/bundler](./tools/bundler) - is the tool that bundles all the individual schemas together. +- [./schemas](./schemas) - contain all automatically bundled and complete schemas for each AsyncAPI version. These schemas should **NOT** be manually changed as they are automatically generated. Any changes should be done in [./definitions](./definitions). + +## Schema Bundling +Changes should not be done manually to the schemas in [./schemas](./schemas), but instead be done in their individual definitions located in [./definitions](./definitions). + +These definitions are automatically bundled together on new releases through the npm script `prepublishOnly`, which ensures the project is build. This is where the [bundler](./tools/bundler) is called. + +For example, for [2.2.0](./definitions/2.2.0), the [bundler](./tools/bundler/index.js) starts with the [asyncapi.json](definitions/2.2.0/asyncapi.json) file and recursively goes through all references (`$ref`) to create the [appropriate bundled version](./schemas/2.2.0.json). + +### Creating a new version +To create a new version, simply run the following command: +``` +npm run startNewVersion --new-version=x.x.x +``` +Where `x.x.x` is the new version you want to create. + +The manual process of creating a new version is to: +1. Duplicate the latest version (`y.y.y`) under definitions (so we have the correct base to make changes from). +2. Rename the folder to the new version (`x.x.x`). +3. Search and replace in the new duplicated folder for `y.y.y` and replace it with `x.x.x`. \ No newline at end of file diff --git a/definitions/1.0.0/APIKeyHTTPSecurityScheme.json b/definitions/1.0.0/APIKeyHTTPSecurityScheme.json new file mode 100644 index 00000000..20fc3540 --- /dev/null +++ b/definitions/1.0.0/APIKeyHTTPSecurityScheme.json @@ -0,0 +1,36 @@ +{ + "type": "object", + "required": [ + "type", + "name", + "in" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "httpApiKey" + ] + }, + "name": { + "type": "string" + }, + "in": { + "type": "string", + "enum": [ + "header", + "query", + "cookie" + ] + }, + "description": { + "type": "string" + } + }, + "patternProperties": { + "^x-": {} + }, + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "http://asyncapi.com/definitions/1.0.0/APIKeyHTTPSecurityScheme.json" +} \ No newline at end of file diff --git a/definitions/1.0.0/BearerHTTPSecurityScheme.json b/definitions/1.0.0/BearerHTTPSecurityScheme.json new file mode 100644 index 00000000..32d987ea --- /dev/null +++ b/definitions/1.0.0/BearerHTTPSecurityScheme.json @@ -0,0 +1,33 @@ +{ + "type": "object", + "required": [ + "type", + "scheme" + ], + "properties": { + "scheme": { + "type": "string", + "enum": [ + "bearer" + ] + }, + "bearerFormat": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "http" + ] + }, + "description": { + "type": "string" + } + }, + "patternProperties": { + "^x-": {} + }, + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "http://asyncapi.com/definitions/1.0.0/BearerHTTPSecurityScheme.json" +} \ No newline at end of file diff --git a/definitions/1.0.0/HTTPSecurityScheme.json b/definitions/1.0.0/HTTPSecurityScheme.json new file mode 100644 index 00000000..ac46c12c --- /dev/null +++ b/definitions/1.0.0/HTTPSecurityScheme.json @@ -0,0 +1,15 @@ +{ + "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" + } + ], + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "http://asyncapi.com/definitions/1.0.0/HTTPSecurityScheme.json" +} \ No newline at end of file diff --git a/definitions/1.0.0/NonBearerHTTPSecurityScheme.json b/definitions/1.0.0/NonBearerHTTPSecurityScheme.json new file mode 100644 index 00000000..147034c0 --- /dev/null +++ b/definitions/1.0.0/NonBearerHTTPSecurityScheme.json @@ -0,0 +1,38 @@ +{ + "not": { + "type": "object", + "properties": { + "scheme": { + "type": "string", + "enum": [ + "bearer" + ] + } + } + }, + "type": "object", + "required": [ + "scheme", + "type" + ], + "properties": { + "scheme": { + "type": "string" + }, + "description": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "http" + ] + } + }, + "patternProperties": { + "^x-": {} + }, + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "http://asyncapi.com/definitions/1.0.0/NonBearerHTTPSecurityScheme.json" +} \ No newline at end of file diff --git a/definitions/1.0.0/Reference.json b/definitions/1.0.0/Reference.json new file mode 100644 index 00000000..4f88fb60 --- /dev/null +++ b/definitions/1.0.0/Reference.json @@ -0,0 +1,14 @@ +{ + "type": "object", + "required": [ + "$ref" + ], + "properties": { + "$ref": { + "type": "string", + "format": "uri" + } + }, + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "http://asyncapi.com/definitions/1.0.0/Reference.json" +} \ No newline at end of file diff --git a/definitions/1.0.0/SecurityRequirement.json b/definitions/1.0.0/SecurityRequirement.json new file mode 100644 index 00000000..89d77b55 --- /dev/null +++ b/definitions/1.0.0/SecurityRequirement.json @@ -0,0 +1,11 @@ +{ + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + }, + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "http://asyncapi.com/definitions/1.0.0/SecurityRequirement.json" +} \ No newline at end of file diff --git a/definitions/1.0.0/SecurityScheme.json b/definitions/1.0.0/SecurityScheme.json new file mode 100644 index 00000000..053152bd --- /dev/null +++ b/definitions/1.0.0/SecurityScheme.json @@ -0,0 +1,24 @@ +{ + "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" + } + ], + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "http://asyncapi.com/definitions/1.0.0/SecurityScheme.json" +} \ No newline at end of file diff --git a/definitions/1.0.0/X509.json b/definitions/1.0.0/X509.json new file mode 100644 index 00000000..e3f74018 --- /dev/null +++ b/definitions/1.0.0/X509.json @@ -0,0 +1,23 @@ +{ + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "X509" + ] + }, + "description": { + "type": "string" + } + }, + "patternProperties": { + "^x-": {} + }, + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "http://asyncapi.com/definitions/1.0.0/X509.json" +} \ No newline at end of file diff --git a/definitions/1.0.0/apiKey.json b/definitions/1.0.0/apiKey.json new file mode 100644 index 00000000..99bea62e --- /dev/null +++ b/definitions/1.0.0/apiKey.json @@ -0,0 +1,31 @@ +{ + "type": "object", + "required": [ + "type", + "in" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "apiKey" + ] + }, + "in": { + "type": "string", + "enum": [ + "user", + "password" + ] + }, + "description": { + "type": "string" + } + }, + "patternProperties": { + "^x-": {} + }, + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "http://asyncapi.com/definitions/1.0.0/apiKey.json" +} \ No newline at end of file diff --git a/definitions/1.0.0/asymmetricEncryption.json b/definitions/1.0.0/asymmetricEncryption.json new file mode 100644 index 00000000..2b00561d --- /dev/null +++ b/definitions/1.0.0/asymmetricEncryption.json @@ -0,0 +1,23 @@ +{ + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "asymmetricEncryption" + ] + }, + "description": { + "type": "string" + } + }, + "patternProperties": { + "^x-": {} + }, + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "http://asyncapi.com/definitions/1.0.0/asymmetricEncryption.json" +} \ No newline at end of file diff --git a/definitions/1.0.0/asyncapi.json b/definitions/1.0.0/asyncapi.json new file mode 100644 index 00000000..c70c456c --- /dev/null +++ b/definitions/1.0.0/asyncapi.json @@ -0,0 +1,64 @@ +{ + "title": "AsyncAPI 1.0 schema.", + "id": "http://asyncapi.com/definitions/1.0.0/asyncapi.json", + "$schema": "http://json-schema.org/draft-04/schema#", + "type": "object", + "required": [ + "asyncapi", + "info", + "topics" + ], + "additionalProperties": false, + "patternProperties": { + "^x-": { + "$ref": "http://asyncapi.com/definitions/1.0.0/vendorExtension.json" + } + }, + "properties": { + "asyncapi": { + "type": "string", + "enum": [ + "1.0.0" + ], + "description": "The AsyncAPI specification version of this document." + }, + "info": { + "$ref": "http://asyncapi.com/definitions/1.0.0/info.json" + }, + "baseTopic": { + "type": "string", + "pattern": "^[^/.]", + "description": "The base topic to the API. Example: 'hitch'.", + "default": "" + }, + "servers": { + "type": "array", + "items": { + "$ref": "http://asyncapi.com/definitions/1.0.0/server.json" + }, + "uniqueItems": true + }, + "topics": { + "$ref": "http://asyncapi.com/definitions/1.0.0/topics.json" + }, + "components": { + "$ref": "http://asyncapi.com/definitions/1.0.0/components.json" + }, + "tags": { + "type": "array", + "items": { + "$ref": "http://asyncapi.com/definitions/1.0.0/tag.json" + }, + "uniqueItems": true + }, + "security": { + "type": "array", + "items": { + "$ref": "http://asyncapi.com/definitions/1.0.0/SecurityRequirement.json" + } + }, + "externalDocs": { + "$ref": "http://asyncapi.com/definitions/1.0.0/externalDocs.json" + } + } +} diff --git a/definitions/1.0.0/components.json b/definitions/1.0.0/components.json new file mode 100644 index 00000000..a045c7d1 --- /dev/null +++ b/definitions/1.0.0/components.json @@ -0,0 +1,30 @@ +{ + "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" + } + ] + } + } + } + }, + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "http://asyncapi.com/definitions/1.0.0/components.json" +} \ No newline at end of file diff --git a/definitions/1.0.0/contact.json b/definitions/1.0.0/contact.json new file mode 100644 index 00000000..6930f4a9 --- /dev/null +++ b/definitions/1.0.0/contact.json @@ -0,0 +1,28 @@ +{ + "type": "object", + "description": "Contact information for the owners of the API.", + "additionalProperties": false, + "properties": { + "name": { + "type": "string", + "description": "The identifying name of the contact person/organization." + }, + "url": { + "type": "string", + "description": "The URL pointing to the contact information.", + "format": "uri" + }, + "email": { + "type": "string", + "description": "The email address of the contact person/organization.", + "format": "email" + } + }, + "patternProperties": { + "^x-": { + "$ref": "http://asyncapi.com/definitions/1.0.0/vendorExtension.json" + } + }, + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "http://asyncapi.com/definitions/1.0.0/contact.json" +} \ No newline at end of file diff --git a/definitions/1.0.0/externalDocs.json b/definitions/1.0.0/externalDocs.json new file mode 100644 index 00000000..74f17880 --- /dev/null +++ b/definitions/1.0.0/externalDocs.json @@ -0,0 +1,24 @@ +{ + "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": "http://json-schema.org/draft-04/schema#", + "id": "http://asyncapi.com/definitions/1.0.0/externalDocs.json" +} \ No newline at end of file diff --git a/definitions/1.0.0/info.json b/definitions/1.0.0/info.json new file mode 100644 index 00000000..dcf512ce --- /dev/null +++ b/definitions/1.0.0/info.json @@ -0,0 +1,41 @@ +{ + "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" + } + }, + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "http://asyncapi.com/definitions/1.0.0/info.json" +} \ No newline at end of file diff --git a/definitions/1.0.0/license.json b/definitions/1.0.0/license.json new file mode 100644 index 00000000..13aa0e06 --- /dev/null +++ b/definitions/1.0.0/license.json @@ -0,0 +1,25 @@ +{ + "type": "object", + "required": [ + "name" + ], + "additionalProperties": false, + "properties": { + "name": { + "type": "string", + "description": "The name of the license type. It's encouraged to use an OSI compatible license." + }, + "url": { + "type": "string", + "description": "The URL pointing to the license.", + "format": "uri" + } + }, + "patternProperties": { + "^x-": { + "$ref": "http://asyncapi.com/definitions/1.0.0/vendorExtension.json" + } + }, + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "http://asyncapi.com/definitions/1.0.0/license.json" +} \ No newline at end of file diff --git a/definitions/1.0.0/message.json b/definitions/1.0.0/message.json new file mode 100644 index 00000000..439e6869 --- /dev/null +++ b/definitions/1.0.0/message.json @@ -0,0 +1,45 @@ +{ + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-": { + "$ref": "http://asyncapi.com/definitions/1.0.0/vendorExtension.json" + } + }, + "properties": { + "$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", + "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": {} + }, + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "http://asyncapi.com/definitions/1.0.0/message.json" +} \ No newline at end of file diff --git a/definitions/1.0.0/messages.json b/definitions/1.0.0/messages.json new file mode 100644 index 00000000..ec5f9c03 --- /dev/null +++ b/definitions/1.0.0/messages.json @@ -0,0 +1,9 @@ +{ + "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.", + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "http://asyncapi.com/definitions/1.0.0/messages.json" +} \ No newline at end of file diff --git a/definitions/1.0.0/schema.json b/definitions/1.0.0/schema.json new file mode 100644 index 00000000..22ba46c1 --- /dev/null +++ b/definitions/1.0.0/schema.json @@ -0,0 +1,131 @@ +{ + "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": {} + }, + "discriminator": { + "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, + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "http://asyncapi.com/definitions/1.0.0/schema.json" +} \ No newline at end of file diff --git a/definitions/1.0.0/schemas.json b/definitions/1.0.0/schemas.json new file mode 100644 index 00000000..fe10d55c --- /dev/null +++ b/definitions/1.0.0/schemas.json @@ -0,0 +1,9 @@ +{ + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/1.0.0/schema.json" + }, + "description": "JSON objects describing schemas the API uses.", + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "http://asyncapi.com/definitions/1.0.0/schemas.json" +} \ No newline at end of file diff --git a/definitions/1.0.0/server.json b/definitions/1.0.0/server.json new file mode 100644 index 00000000..b00f1b85 --- /dev/null +++ b/definitions/1.0.0/server.json @@ -0,0 +1,47 @@ +{ + "type": "object", + "description": "An object representing a Server.", + "required": [ + "url", + "scheme" + ], + "additionalProperties": false, + "patternProperties": { + "^x-": { + "$ref": "http://asyncapi.com/definitions/1.0.0/vendorExtension.json" + } + }, + "properties": { + "url": { + "type": "string" + }, + "description": { + "type": "string" + }, + "scheme": { + "type": "string", + "description": "The transfer protocol.", + "enum": [ + "kafka", + "kafka-secure", + "amqp", + "amqps", + "mqtt", + "mqtts", + "secure-mqtt", + "ws", + "wss", + "stomp", + "stomps" + ] + }, + "schemeVersion": { + "type": "string" + }, + "variables": { + "$ref": "http://asyncapi.com/definitions/1.0.0/serverVariables.json" + } + }, + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "http://asyncapi.com/definitions/1.0.0/server.json" +} \ No newline at end of file diff --git a/definitions/1.0.0/serverVariable.json b/definitions/1.0.0/serverVariable.json new file mode 100644 index 00000000..79115616 --- /dev/null +++ b/definitions/1.0.0/serverVariable.json @@ -0,0 +1,28 @@ +{ + "type": "object", + "description": "An object representing a Server Variable for server URL template substitution.", + "minProperties": 1, + "additionalProperties": false, + "patternProperties": { + "^x-": { + "$ref": "http://asyncapi.com/definitions/1.0.0/vendorExtension.json" + } + }, + "properties": { + "enum": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + }, + "default": { + "type": "string" + }, + "description": { + "type": "string" + } + }, + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "http://asyncapi.com/definitions/1.0.0/serverVariable.json" +} \ No newline at end of file diff --git a/definitions/1.0.0/serverVariables.json b/definitions/1.0.0/serverVariables.json new file mode 100644 index 00000000..3ce85d16 --- /dev/null +++ b/definitions/1.0.0/serverVariables.json @@ -0,0 +1,8 @@ +{ + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/1.0.0/serverVariable.json" + }, + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "http://asyncapi.com/definitions/1.0.0/serverVariables.json" +} \ No newline at end of file diff --git a/definitions/1.0.0/symmetricEncryption.json b/definitions/1.0.0/symmetricEncryption.json new file mode 100644 index 00000000..59594065 --- /dev/null +++ b/definitions/1.0.0/symmetricEncryption.json @@ -0,0 +1,23 @@ +{ + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "symmetricEncryption" + ] + }, + "description": { + "type": "string" + } + }, + "patternProperties": { + "^x-": {} + }, + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "http://asyncapi.com/definitions/1.0.0/symmetricEncryption.json" +} \ No newline at end of file diff --git a/definitions/1.0.0/tag.json b/definitions/1.0.0/tag.json new file mode 100644 index 00000000..15da82c2 --- /dev/null +++ b/definitions/1.0.0/tag.json @@ -0,0 +1,25 @@ +{ + "type": "object", + "additionalProperties": false, + "required": [ + "name" + ], + "properties": { + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "externalDocs": { + "$ref": "http://asyncapi.com/definitions/1.0.0/externalDocs.json" + } + }, + "patternProperties": { + "^x-": { + "$ref": "http://asyncapi.com/definitions/1.0.0/vendorExtension.json" + } + }, + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "http://asyncapi.com/definitions/1.0.0/tag.json" +} \ No newline at end of file diff --git a/definitions/1.0.0/topicItem.json b/definitions/1.0.0/topicItem.json new file mode 100644 index 00000000..3386f453 --- /dev/null +++ b/definitions/1.0.0/topicItem.json @@ -0,0 +1,27 @@ +{ + "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 + } + }, + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "http://asyncapi.com/definitions/1.0.0/topicItem.json" +} \ No newline at end of file diff --git a/definitions/1.0.0/topics.json b/definitions/1.0.0/topics.json new file mode 100644 index 00000000..a2049c68 --- /dev/null +++ b/definitions/1.0.0/topics.json @@ -0,0 +1,15 @@ +{ + "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, + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "http://asyncapi.com/definitions/1.0.0/topics.json" +} \ No newline at end of file diff --git a/definitions/1.0.0/userPassword.json b/definitions/1.0.0/userPassword.json new file mode 100644 index 00000000..983e2100 --- /dev/null +++ b/definitions/1.0.0/userPassword.json @@ -0,0 +1,23 @@ +{ + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "userPassword" + ] + }, + "description": { + "type": "string" + } + }, + "patternProperties": { + "^x-": {} + }, + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "http://asyncapi.com/definitions/1.0.0/userPassword.json" +} \ No newline at end of file diff --git a/definitions/1.0.0/vendorExtension.json b/definitions/1.0.0/vendorExtension.json new file mode 100644 index 00000000..9950d0f1 --- /dev/null +++ b/definitions/1.0.0/vendorExtension.json @@ -0,0 +1,7 @@ +{ + "description": "Any property starting with x- is valid.", + "additionalProperties": true, + "additionalItems": true, + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "http://asyncapi.com/definitions/1.0.0/vendorExtension.json" +} \ No newline at end of file diff --git a/definitions/1.0.0/xml.json b/definitions/1.0.0/xml.json new file mode 100644 index 00000000..2890dfea --- /dev/null +++ b/definitions/1.0.0/xml.json @@ -0,0 +1,25 @@ +{ + "type": "object", + "additionalProperties": false, + "properties": { + "name": { + "type": "string" + }, + "namespace": { + "type": "string" + }, + "prefix": { + "type": "string" + }, + "attribute": { + "type": "boolean", + "default": false + }, + "wrapped": { + "type": "boolean", + "default": false + } + }, + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "http://asyncapi.com/definitions/1.0.0/xml.json" +} \ No newline at end of file diff --git a/definitions/1.1.0/APIKeyHTTPSecurityScheme.json b/definitions/1.1.0/APIKeyHTTPSecurityScheme.json new file mode 100644 index 00000000..e3362b8e --- /dev/null +++ b/definitions/1.1.0/APIKeyHTTPSecurityScheme.json @@ -0,0 +1,36 @@ +{ + "type": "object", + "required": [ + "type", + "name", + "in" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "httpApiKey" + ] + }, + "name": { + "type": "string" + }, + "in": { + "type": "string", + "enum": [ + "header", + "query", + "cookie" + ] + }, + "description": { + "type": "string" + } + }, + "patternProperties": { + "^x-": {} + }, + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "http://asyncapi.com/definitions/1.1.0/APIKeyHTTPSecurityScheme.json" +} \ No newline at end of file diff --git a/definitions/1.1.0/BearerHTTPSecurityScheme.json b/definitions/1.1.0/BearerHTTPSecurityScheme.json new file mode 100644 index 00000000..8e70f16e --- /dev/null +++ b/definitions/1.1.0/BearerHTTPSecurityScheme.json @@ -0,0 +1,33 @@ +{ + "type": "object", + "required": [ + "type", + "scheme" + ], + "properties": { + "scheme": { + "type": "string", + "enum": [ + "bearer" + ] + }, + "bearerFormat": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "http" + ] + }, + "description": { + "type": "string" + } + }, + "patternProperties": { + "^x-": {} + }, + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "http://asyncapi.com/definitions/1.1.0/BearerHTTPSecurityScheme.json" +} \ No newline at end of file diff --git a/definitions/1.1.0/HTTPSecurityScheme.json b/definitions/1.1.0/HTTPSecurityScheme.json new file mode 100644 index 00000000..c9e596a0 --- /dev/null +++ b/definitions/1.1.0/HTTPSecurityScheme.json @@ -0,0 +1,15 @@ +{ + "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" + } + ], + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "http://asyncapi.com/definitions/1.1.0/HTTPSecurityScheme.json" +} \ No newline at end of file diff --git a/definitions/1.1.0/NonBearerHTTPSecurityScheme.json b/definitions/1.1.0/NonBearerHTTPSecurityScheme.json new file mode 100644 index 00000000..8beec801 --- /dev/null +++ b/definitions/1.1.0/NonBearerHTTPSecurityScheme.json @@ -0,0 +1,38 @@ +{ + "not": { + "type": "object", + "properties": { + "scheme": { + "type": "string", + "enum": [ + "bearer" + ] + } + } + }, + "type": "object", + "required": [ + "scheme", + "type" + ], + "properties": { + "scheme": { + "type": "string" + }, + "description": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "http" + ] + } + }, + "patternProperties": { + "^x-": {} + }, + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "http://asyncapi.com/definitions/1.1.0/NonBearerHTTPSecurityScheme.json" +} \ No newline at end of file diff --git a/definitions/1.1.0/Reference.json b/definitions/1.1.0/Reference.json new file mode 100644 index 00000000..1d0110fd --- /dev/null +++ b/definitions/1.1.0/Reference.json @@ -0,0 +1,14 @@ +{ + "type": "object", + "required": [ + "$ref" + ], + "properties": { + "$ref": { + "type": "string", + "format": "uri" + } + }, + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "http://asyncapi.com/definitions/1.1.0/Reference.json" +} \ No newline at end of file diff --git a/definitions/1.1.0/SecurityRequirement.json b/definitions/1.1.0/SecurityRequirement.json new file mode 100644 index 00000000..e4856fb4 --- /dev/null +++ b/definitions/1.1.0/SecurityRequirement.json @@ -0,0 +1,11 @@ +{ + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + }, + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "http://asyncapi.com/definitions/1.1.0/SecurityRequirement.json" +} \ No newline at end of file diff --git a/definitions/1.1.0/SecurityScheme.json b/definitions/1.1.0/SecurityScheme.json new file mode 100644 index 00000000..777ef51e --- /dev/null +++ b/definitions/1.1.0/SecurityScheme.json @@ -0,0 +1,24 @@ +{ + "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" + } + ], + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "http://asyncapi.com/definitions/1.1.0/SecurityScheme.json" +} \ No newline at end of file diff --git a/definitions/1.1.0/X509.json b/definitions/1.1.0/X509.json new file mode 100644 index 00000000..7486d9aa --- /dev/null +++ b/definitions/1.1.0/X509.json @@ -0,0 +1,23 @@ +{ + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "X509" + ] + }, + "description": { + "type": "string" + } + }, + "patternProperties": { + "^x-": {} + }, + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "http://asyncapi.com/definitions/1.1.0/X509.json" +} \ No newline at end of file diff --git a/definitions/1.1.0/apiKey.json b/definitions/1.1.0/apiKey.json new file mode 100644 index 00000000..65d51ac4 --- /dev/null +++ b/definitions/1.1.0/apiKey.json @@ -0,0 +1,31 @@ +{ + "type": "object", + "required": [ + "type", + "in" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "apiKey" + ] + }, + "in": { + "type": "string", + "enum": [ + "user", + "password" + ] + }, + "description": { + "type": "string" + } + }, + "patternProperties": { + "^x-": {} + }, + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "http://asyncapi.com/definitions/1.1.0/apiKey.json" +} \ No newline at end of file diff --git a/definitions/1.1.0/asymmetricEncryption.json b/definitions/1.1.0/asymmetricEncryption.json new file mode 100644 index 00000000..8781b30c --- /dev/null +++ b/definitions/1.1.0/asymmetricEncryption.json @@ -0,0 +1,23 @@ +{ + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "asymmetricEncryption" + ] + }, + "description": { + "type": "string" + } + }, + "patternProperties": { + "^x-": {} + }, + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "http://asyncapi.com/definitions/1.1.0/asymmetricEncryption.json" +} \ No newline at end of file diff --git a/definitions/1.1.0/asyncapi.json b/definitions/1.1.0/asyncapi.json new file mode 100644 index 00000000..566c9225 --- /dev/null +++ b/definitions/1.1.0/asyncapi.json @@ -0,0 +1,65 @@ +{ + "title": "AsyncAPI 1.1.0 schema.", + "id": "http://asyncapi.com/definitions/1.1.0/asyncapi.json", + "$schema": "http://json-schema.org/draft-04/schema#", + "type": "object", + "required": [ + "asyncapi", + "info", + "topics" + ], + "additionalProperties": false, + "patternProperties": { + "^x-": { + "$ref": "http://asyncapi.com/definitions/1.1.0/vendorExtension.json" + } + }, + "properties": { + "asyncapi": { + "type": "string", + "enum": [ + "1.0.0", + "1.1.0" + ], + "description": "The AsyncAPI specification version of this document." + }, + "info": { + "$ref": "http://asyncapi.com/definitions/1.1.0/info.json" + }, + "baseTopic": { + "type": "string", + "pattern": "^[^/.]", + "description": "The base topic to the API. Example: 'hitch'.", + "default": "" + }, + "servers": { + "type": "array", + "items": { + "$ref": "http://asyncapi.com/definitions/1.1.0/server.json" + }, + "uniqueItems": true + }, + "topics": { + "$ref": "http://asyncapi.com/definitions/1.1.0/topics.json" + }, + "components": { + "$ref": "http://asyncapi.com/definitions/1.1.0/components.json" + }, + "tags": { + "type": "array", + "items": { + "$ref": "http://asyncapi.com/definitions/1.1.0/tag.json" + }, + "uniqueItems": true + }, + "security": { + "type": "array", + "items": { + "$ref": "http://asyncapi.com/definitions/1.1.0/SecurityRequirement.json" + } + }, + "externalDocs": { + "$ref": "http://asyncapi.com/definitions/1.1.0/externalDocs.json" + } + } +} diff --git a/definitions/1.1.0/components.json b/definitions/1.1.0/components.json new file mode 100644 index 00000000..4ef4b5d7 --- /dev/null +++ b/definitions/1.1.0/components.json @@ -0,0 +1,30 @@ +{ + "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" + } + ] + } + } + } + }, + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "http://asyncapi.com/definitions/1.1.0/components.json" +} \ No newline at end of file diff --git a/definitions/1.1.0/contact.json b/definitions/1.1.0/contact.json new file mode 100644 index 00000000..75fb06b5 --- /dev/null +++ b/definitions/1.1.0/contact.json @@ -0,0 +1,28 @@ +{ + "type": "object", + "description": "Contact information for the owners of the API.", + "additionalProperties": false, + "properties": { + "name": { + "type": "string", + "description": "The identifying name of the contact person/organization." + }, + "url": { + "type": "string", + "description": "The URL pointing to the contact information.", + "format": "uri" + }, + "email": { + "type": "string", + "description": "The email address of the contact person/organization.", + "format": "email" + } + }, + "patternProperties": { + "^x-": { + "$ref": "http://asyncapi.com/definitions/1.1.0/vendorExtension.json" + } + }, + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "http://asyncapi.com/definitions/1.1.0/contact.json" +} \ No newline at end of file diff --git a/definitions/1.1.0/externalDocs.json b/definitions/1.1.0/externalDocs.json new file mode 100644 index 00000000..574e6d71 --- /dev/null +++ b/definitions/1.1.0/externalDocs.json @@ -0,0 +1,24 @@ +{ + "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": "http://json-schema.org/draft-04/schema#", + "id": "http://asyncapi.com/definitions/1.1.0/externalDocs.json" +} \ No newline at end of file diff --git a/definitions/1.1.0/info.json b/definitions/1.1.0/info.json new file mode 100644 index 00000000..38e831dd --- /dev/null +++ b/definitions/1.1.0/info.json @@ -0,0 +1,41 @@ +{ + "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" + } + }, + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "http://asyncapi.com/definitions/1.1.0/info.json" +} \ No newline at end of file diff --git a/definitions/1.1.0/license.json b/definitions/1.1.0/license.json new file mode 100644 index 00000000..771459ac --- /dev/null +++ b/definitions/1.1.0/license.json @@ -0,0 +1,25 @@ +{ + "type": "object", + "required": [ + "name" + ], + "additionalProperties": false, + "properties": { + "name": { + "type": "string", + "description": "The name of the license type. It's encouraged to use an OSI compatible license." + }, + "url": { + "type": "string", + "description": "The URL pointing to the license.", + "format": "uri" + } + }, + "patternProperties": { + "^x-": { + "$ref": "http://asyncapi.com/definitions/1.1.0/vendorExtension.json" + } + }, + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "http://asyncapi.com/definitions/1.1.0/license.json" +} \ No newline at end of file diff --git a/definitions/1.1.0/message.json b/definitions/1.1.0/message.json new file mode 100644 index 00000000..4528ff9b --- /dev/null +++ b/definitions/1.1.0/message.json @@ -0,0 +1,45 @@ +{ + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-": { + "$ref": "http://asyncapi.com/definitions/1.1.0/vendorExtension.json" + } + }, + "properties": { + "$ref": { + "type": "string" + }, + "headers": { + "$ref": "http://asyncapi.com/definitions/1.1.0/schema.json" + }, + "payload": { + "$ref": "http://asyncapi.com/definitions/1.1.0/schema.json" + }, + "tags": { + "type": "array", + "items": { + "$ref": "http://asyncapi.com/definitions/1.1.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.1.0/externalDocs.json" + }, + "deprecated": { + "type": "boolean", + "default": false + }, + "example": {} + }, + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "http://asyncapi.com/definitions/1.1.0/message.json" +} \ No newline at end of file diff --git a/definitions/1.1.0/messages.json b/definitions/1.1.0/messages.json new file mode 100644 index 00000000..66efc542 --- /dev/null +++ b/definitions/1.1.0/messages.json @@ -0,0 +1,9 @@ +{ + "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.", + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "http://asyncapi.com/definitions/1.1.0/messages.json" +} \ No newline at end of file diff --git a/definitions/1.1.0/operation.json b/definitions/1.1.0/operation.json new file mode 100644 index 00000000..442b5325 --- /dev/null +++ b/definitions/1.1.0/operation.json @@ -0,0 +1,30 @@ +{ + "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" + } + } + } + } + ], + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "http://asyncapi.com/definitions/1.1.0/operation.json" +} \ No newline at end of file diff --git a/definitions/1.1.0/parameter.json b/definitions/1.1.0/parameter.json new file mode 100644 index 00000000..b4820dcf --- /dev/null +++ b/definitions/1.1.0/parameter.json @@ -0,0 +1,23 @@ +{ + "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" + } + }, + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "http://asyncapi.com/definitions/1.1.0/parameter.json" +} \ No newline at end of file diff --git a/definitions/1.1.0/schema.json b/definitions/1.1.0/schema.json new file mode 100644 index 00000000..785a302c --- /dev/null +++ b/definitions/1.1.0/schema.json @@ -0,0 +1,148 @@ +{ + "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, + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "http://asyncapi.com/definitions/1.1.0/schema.json" +} \ No newline at end of file diff --git a/definitions/1.1.0/schemas.json b/definitions/1.1.0/schemas.json new file mode 100644 index 00000000..27add999 --- /dev/null +++ b/definitions/1.1.0/schemas.json @@ -0,0 +1,9 @@ +{ + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/1.1.0/schema.json" + }, + "description": "JSON objects describing schemas the API uses.", + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "http://asyncapi.com/definitions/1.1.0/schemas.json" +} \ No newline at end of file diff --git a/definitions/1.1.0/server.json b/definitions/1.1.0/server.json new file mode 100644 index 00000000..b3594744 --- /dev/null +++ b/definitions/1.1.0/server.json @@ -0,0 +1,48 @@ +{ + "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" + } + }, + "properties": { + "url": { + "type": "string" + }, + "description": { + "type": "string" + }, + "scheme": { + "type": "string", + "description": "The transfer protocol.", + "enum": [ + "kafka", + "kafka-secure", + "amqp", + "amqps", + "mqtt", + "mqtts", + "secure-mqtt", + "ws", + "wss", + "stomp", + "stomps", + "jms" + ] + }, + "schemeVersion": { + "type": "string" + }, + "variables": { + "$ref": "http://asyncapi.com/definitions/1.1.0/serverVariables.json" + } + }, + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "http://asyncapi.com/definitions/1.1.0/server.json" +} \ No newline at end of file diff --git a/definitions/1.1.0/serverVariable.json b/definitions/1.1.0/serverVariable.json new file mode 100644 index 00000000..e1342904 --- /dev/null +++ b/definitions/1.1.0/serverVariable.json @@ -0,0 +1,28 @@ +{ + "type": "object", + "description": "An object representing a Server Variable for server URL template substitution.", + "minProperties": 1, + "additionalProperties": false, + "patternProperties": { + "^x-": { + "$ref": "http://asyncapi.com/definitions/1.1.0/vendorExtension.json" + } + }, + "properties": { + "enum": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + }, + "default": { + "type": "string" + }, + "description": { + "type": "string" + } + }, + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "http://asyncapi.com/definitions/1.1.0/serverVariable.json" +} \ No newline at end of file diff --git a/definitions/1.1.0/serverVariables.json b/definitions/1.1.0/serverVariables.json new file mode 100644 index 00000000..decc74c4 --- /dev/null +++ b/definitions/1.1.0/serverVariables.json @@ -0,0 +1,8 @@ +{ + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/1.1.0/serverVariable.json" + }, + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "http://asyncapi.com/definitions/1.1.0/serverVariables.json" +} \ No newline at end of file diff --git a/definitions/1.1.0/symmetricEncryption.json b/definitions/1.1.0/symmetricEncryption.json new file mode 100644 index 00000000..2d7bd747 --- /dev/null +++ b/definitions/1.1.0/symmetricEncryption.json @@ -0,0 +1,23 @@ +{ + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "symmetricEncryption" + ] + }, + "description": { + "type": "string" + } + }, + "patternProperties": { + "^x-": {} + }, + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "http://asyncapi.com/definitions/1.1.0/symmetricEncryption.json" +} \ No newline at end of file diff --git a/definitions/1.1.0/tag.json b/definitions/1.1.0/tag.json new file mode 100644 index 00000000..88857395 --- /dev/null +++ b/definitions/1.1.0/tag.json @@ -0,0 +1,25 @@ +{ + "type": "object", + "additionalProperties": false, + "required": [ + "name" + ], + "properties": { + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "externalDocs": { + "$ref": "http://asyncapi.com/definitions/1.1.0/externalDocs.json" + } + }, + "patternProperties": { + "^x-": { + "$ref": "http://asyncapi.com/definitions/1.1.0/vendorExtension.json" + } + }, + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "http://asyncapi.com/definitions/1.1.0/tag.json" +} \ No newline at end of file diff --git a/definitions/1.1.0/topicItem.json b/definitions/1.1.0/topicItem.json new file mode 100644 index 00000000..1c2cca70 --- /dev/null +++ b/definitions/1.1.0/topicItem.json @@ -0,0 +1,35 @@ +{ + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-": { + "$ref": "http://asyncapi.com/definitions/1.1.0/vendorExtension.json" + } + }, + "minProperties": 1, + "properties": { + "$ref": { + "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 + } + }, + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "http://asyncapi.com/definitions/1.1.0/topicItem.json" +} \ No newline at end of file diff --git a/definitions/1.1.0/topics.json b/definitions/1.1.0/topics.json new file mode 100644 index 00000000..c48c3e41 --- /dev/null +++ b/definitions/1.1.0/topics.json @@ -0,0 +1,15 @@ +{ + "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, + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "http://asyncapi.com/definitions/1.1.0/topics.json" +} \ No newline at end of file diff --git a/definitions/1.1.0/userPassword.json b/definitions/1.1.0/userPassword.json new file mode 100644 index 00000000..0330bf6c --- /dev/null +++ b/definitions/1.1.0/userPassword.json @@ -0,0 +1,23 @@ +{ + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "userPassword" + ] + }, + "description": { + "type": "string" + } + }, + "patternProperties": { + "^x-": {} + }, + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "http://asyncapi.com/definitions/1.1.0/userPassword.json" +} \ No newline at end of file diff --git a/definitions/1.1.0/vendorExtension.json b/definitions/1.1.0/vendorExtension.json new file mode 100644 index 00000000..3a0d222b --- /dev/null +++ b/definitions/1.1.0/vendorExtension.json @@ -0,0 +1,7 @@ +{ + "description": "Any property starting with x- is valid.", + "additionalProperties": true, + "additionalItems": true, + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "http://asyncapi.com/definitions/1.1.0/vendorExtension.json" +} \ No newline at end of file diff --git a/definitions/1.1.0/xml.json b/definitions/1.1.0/xml.json new file mode 100644 index 00000000..ca8c624c --- /dev/null +++ b/definitions/1.1.0/xml.json @@ -0,0 +1,25 @@ +{ + "type": "object", + "additionalProperties": false, + "properties": { + "name": { + "type": "string" + }, + "namespace": { + "type": "string" + }, + "prefix": { + "type": "string" + }, + "attribute": { + "type": "boolean", + "default": false + }, + "wrapped": { + "type": "boolean", + "default": false + } + }, + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "http://asyncapi.com/definitions/1.1.0/xml.json" +} \ No newline at end of file diff --git a/definitions/1.2.0/APIKeyHTTPSecurityScheme.json b/definitions/1.2.0/APIKeyHTTPSecurityScheme.json new file mode 100644 index 00000000..0dc709ac --- /dev/null +++ b/definitions/1.2.0/APIKeyHTTPSecurityScheme.json @@ -0,0 +1,36 @@ +{ + "type": "object", + "required": [ + "type", + "name", + "in" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "httpApiKey" + ] + }, + "name": { + "type": "string" + }, + "in": { + "type": "string", + "enum": [ + "header", + "query", + "cookie" + ] + }, + "description": { + "type": "string" + } + }, + "patternProperties": { + "^x-": {} + }, + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "http://asyncapi.com/definitions/1.2.0/APIKeyHTTPSecurityScheme.json" +} \ No newline at end of file diff --git a/definitions/1.2.0/BearerHTTPSecurityScheme.json b/definitions/1.2.0/BearerHTTPSecurityScheme.json new file mode 100644 index 00000000..e552655c --- /dev/null +++ b/definitions/1.2.0/BearerHTTPSecurityScheme.json @@ -0,0 +1,33 @@ +{ + "type": "object", + "required": [ + "type", + "scheme" + ], + "properties": { + "scheme": { + "type": "string", + "enum": [ + "bearer" + ] + }, + "bearerFormat": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "http" + ] + }, + "description": { + "type": "string" + } + }, + "patternProperties": { + "^x-": {} + }, + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "http://asyncapi.com/definitions/1.2.0/BearerHTTPSecurityScheme.json" +} \ No newline at end of file diff --git a/definitions/1.2.0/HTTPSecurityScheme.json b/definitions/1.2.0/HTTPSecurityScheme.json new file mode 100644 index 00000000..8e0d157d --- /dev/null +++ b/definitions/1.2.0/HTTPSecurityScheme.json @@ -0,0 +1,15 @@ +{ + "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" + } + ], + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "http://asyncapi.com/definitions/1.2.0/HTTPSecurityScheme.json" +} \ No newline at end of file diff --git a/definitions/1.2.0/NonBearerHTTPSecurityScheme.json b/definitions/1.2.0/NonBearerHTTPSecurityScheme.json new file mode 100644 index 00000000..4ebfdbe3 --- /dev/null +++ b/definitions/1.2.0/NonBearerHTTPSecurityScheme.json @@ -0,0 +1,38 @@ +{ + "not": { + "type": "object", + "properties": { + "scheme": { + "type": "string", + "enum": [ + "bearer" + ] + } + } + }, + "type": "object", + "required": [ + "scheme", + "type" + ], + "properties": { + "scheme": { + "type": "string" + }, + "description": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "http" + ] + } + }, + "patternProperties": { + "^x-": {} + }, + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "http://asyncapi.com/definitions/1.2.0/NonBearerHTTPSecurityScheme.json" +} \ No newline at end of file diff --git a/definitions/1.2.0/Reference.json b/definitions/1.2.0/Reference.json new file mode 100644 index 00000000..82ec3206 --- /dev/null +++ b/definitions/1.2.0/Reference.json @@ -0,0 +1,14 @@ +{ + "type": "object", + "required": [ + "$ref" + ], + "properties": { + "$ref": { + "type": "string", + "format": "uri" + } + }, + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "http://asyncapi.com/definitions/1.2.0/Reference.json" +} \ No newline at end of file diff --git a/definitions/1.2.0/SecurityRequirement.json b/definitions/1.2.0/SecurityRequirement.json new file mode 100644 index 00000000..53a6020d --- /dev/null +++ b/definitions/1.2.0/SecurityRequirement.json @@ -0,0 +1,11 @@ +{ + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + }, + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "http://asyncapi.com/definitions/1.2.0/SecurityRequirement.json" +} \ No newline at end of file diff --git a/definitions/1.2.0/SecurityScheme.json b/definitions/1.2.0/SecurityScheme.json new file mode 100644 index 00000000..c7af41bf --- /dev/null +++ b/definitions/1.2.0/SecurityScheme.json @@ -0,0 +1,24 @@ +{ + "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" + } + ], + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "http://asyncapi.com/definitions/1.2.0/SecurityScheme.json" +} \ No newline at end of file diff --git a/definitions/1.2.0/X509.json b/definitions/1.2.0/X509.json new file mode 100644 index 00000000..54cfec76 --- /dev/null +++ b/definitions/1.2.0/X509.json @@ -0,0 +1,23 @@ +{ + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "X509" + ] + }, + "description": { + "type": "string" + } + }, + "patternProperties": { + "^x-": {} + }, + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "http://asyncapi.com/definitions/1.2.0/X509.json" +} \ No newline at end of file diff --git a/definitions/1.2.0/apiKey.json b/definitions/1.2.0/apiKey.json new file mode 100644 index 00000000..b35cac48 --- /dev/null +++ b/definitions/1.2.0/apiKey.json @@ -0,0 +1,31 @@ +{ + "type": "object", + "required": [ + "type", + "in" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "apiKey" + ] + }, + "in": { + "type": "string", + "enum": [ + "user", + "password" + ] + }, + "description": { + "type": "string" + } + }, + "patternProperties": { + "^x-": {} + }, + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "http://asyncapi.com/definitions/1.2.0/apiKey.json" +} \ No newline at end of file diff --git a/definitions/1.2.0/asymmetricEncryption.json b/definitions/1.2.0/asymmetricEncryption.json new file mode 100644 index 00000000..9d9b2697 --- /dev/null +++ b/definitions/1.2.0/asymmetricEncryption.json @@ -0,0 +1,23 @@ +{ + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "asymmetricEncryption" + ] + }, + "description": { + "type": "string" + } + }, + "patternProperties": { + "^x-": {} + }, + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "http://asyncapi.com/definitions/1.2.0/asymmetricEncryption.json" +} \ No newline at end of file diff --git a/definitions/1.2.0/asyncapi.json b/definitions/1.2.0/asyncapi.json new file mode 100644 index 00000000..2c083f62 --- /dev/null +++ b/definitions/1.2.0/asyncapi.json @@ -0,0 +1,90 @@ +{ + "title": "AsyncAPI 1.2.0 schema.", + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "http://asyncapi.com/definitions/1.2.0/asyncapi.json", + "type": "object", + "required": [ + "asyncapi", + "info" + ], + "oneOf": [ + { + "required": [ + "topics" + ] + }, + { + "required": [ + "stream" + ] + }, + { + "required": [ + "events" + ] + } + ], + "additionalProperties": false, + "patternProperties": { + "^x-": { + "$ref": "http://asyncapi.com/definitions/1.2.0/vendorExtension.json" + } + }, + "properties": { + "asyncapi": { + "type": "string", + "enum": [ + "1.0.0", + "1.1.0", + "1.2.0" + ], + "description": "The AsyncAPI specification version of this document." + }, + "info": { + "$ref": "http://asyncapi.com/definitions/1.2.0/info.json" + }, + "baseTopic": { + "type": "string", + "pattern": "^[^/.]", + "description": "The base topic to the API. Example: 'hitch'.", + "default": "" + }, + "servers": { + "type": "array", + "items": { + "$ref": "http://asyncapi.com/definitions/1.2.0/server.json" + }, + "uniqueItems": true + }, + "topics": { + "$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." + }, + "events": { + "$ref": "http://asyncapi.com/definitions/1.2.0/events.json", + "description": "The list of messages an events API sends and/or receives." + }, + "components": { + "$ref": "http://asyncapi.com/definitions/1.2.0/components.json" + }, + "tags": { + "type": "array", + "items": { + "$ref": "http://asyncapi.com/definitions/1.2.0/tag.json" + }, + "uniqueItems": true + }, + "security": { + "type": "array", + "items": { + "$ref": "http://asyncapi.com/definitions/1.2.0/SecurityRequirement.json" + } + }, + "externalDocs": { + "$ref": "http://asyncapi.com/definitions/1.2.0/externalDocs.json" + } + } +} diff --git a/definitions/1.2.0/components.json b/definitions/1.2.0/components.json new file mode 100644 index 00000000..18041578 --- /dev/null +++ b/definitions/1.2.0/components.json @@ -0,0 +1,33 @@ +{ + "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" + } + }, + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "http://asyncapi.com/definitions/1.2.0/components.json" +} \ No newline at end of file diff --git a/definitions/1.2.0/contact.json b/definitions/1.2.0/contact.json new file mode 100644 index 00000000..26bdbe6c --- /dev/null +++ b/definitions/1.2.0/contact.json @@ -0,0 +1,28 @@ +{ + "type": "object", + "description": "Contact information for the owners of the API.", + "additionalProperties": false, + "properties": { + "name": { + "type": "string", + "description": "The identifying name of the contact person/organization." + }, + "url": { + "type": "string", + "description": "The URL pointing to the contact information.", + "format": "uri" + }, + "email": { + "type": "string", + "description": "The email address of the contact person/organization.", + "format": "email" + } + }, + "patternProperties": { + "^x-": { + "$ref": "http://asyncapi.com/definitions/1.2.0/vendorExtension.json" + } + }, + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "http://asyncapi.com/definitions/1.2.0/contact.json" +} \ No newline at end of file diff --git a/definitions/1.2.0/events.json b/definitions/1.2.0/events.json new file mode 100644 index 00000000..f5c2e64a --- /dev/null +++ b/definitions/1.2.0/events.json @@ -0,0 +1,45 @@ +{ + "title": "Events Object", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-": { + "$ref": "http://asyncapi.com/definitions/1.2.0/vendorExtension.json" + } + }, + "minProperties": 1, + "anyOf": [ + { + "required": [ + "receive" + ] + }, + { + "required": [ + "send" + ] + } + ], + "properties": { + "receive": { + "title": "Events Receive Object", + "type": "array", + "uniqueItems": true, + "minItems": 1, + "items": { + "$ref": "http://asyncapi.com/definitions/1.2.0/message.json" + } + }, + "send": { + "title": "Events Send Object", + "type": "array", + "uniqueItems": true, + "minItems": 1, + "items": { + "$ref": "http://asyncapi.com/definitions/1.2.0/message.json" + } + } + }, + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "http://asyncapi.com/definitions/1.2.0/events.json" +} \ No newline at end of file diff --git a/definitions/1.2.0/externalDocs.json b/definitions/1.2.0/externalDocs.json new file mode 100644 index 00000000..32637c87 --- /dev/null +++ b/definitions/1.2.0/externalDocs.json @@ -0,0 +1,24 @@ +{ + "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": "http://json-schema.org/draft-04/schema#", + "id": "http://asyncapi.com/definitions/1.2.0/externalDocs.json" +} \ No newline at end of file diff --git a/definitions/1.2.0/info.json b/definitions/1.2.0/info.json new file mode 100644 index 00000000..133a29b8 --- /dev/null +++ b/definitions/1.2.0/info.json @@ -0,0 +1,41 @@ +{ + "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" + } + }, + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "http://asyncapi.com/definitions/1.2.0/info.json" +} \ No newline at end of file diff --git a/definitions/1.2.0/license.json b/definitions/1.2.0/license.json new file mode 100644 index 00000000..2536d4ef --- /dev/null +++ b/definitions/1.2.0/license.json @@ -0,0 +1,25 @@ +{ + "type": "object", + "required": [ + "name" + ], + "additionalProperties": false, + "properties": { + "name": { + "type": "string", + "description": "The name of the license type. It's encouraged to use an OSI compatible license." + }, + "url": { + "type": "string", + "description": "The URL pointing to the license.", + "format": "uri" + } + }, + "patternProperties": { + "^x-": { + "$ref": "http://asyncapi.com/definitions/1.2.0/vendorExtension.json" + } + }, + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "http://asyncapi.com/definitions/1.2.0/license.json" +} \ No newline at end of file diff --git a/definitions/1.2.0/message.json b/definitions/1.2.0/message.json new file mode 100644 index 00000000..db45044d --- /dev/null +++ b/definitions/1.2.0/message.json @@ -0,0 +1,45 @@ +{ + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-": { + "$ref": "http://asyncapi.com/definitions/1.2.0/vendorExtension.json" + } + }, + "properties": { + "$ref": { + "type": "string" + }, + "headers": { + "$ref": "http://asyncapi.com/definitions/1.2.0/schema.json" + }, + "payload": { + "$ref": "http://asyncapi.com/definitions/1.2.0/schema.json" + }, + "tags": { + "type": "array", + "items": { + "$ref": "http://asyncapi.com/definitions/1.2.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.2.0/externalDocs.json" + }, + "deprecated": { + "type": "boolean", + "default": false + }, + "example": {} + }, + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "http://asyncapi.com/definitions/1.2.0/message.json" +} \ No newline at end of file diff --git a/definitions/1.2.0/messages.json b/definitions/1.2.0/messages.json new file mode 100644 index 00000000..c6cb8855 --- /dev/null +++ b/definitions/1.2.0/messages.json @@ -0,0 +1,9 @@ +{ + "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.", + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "http://asyncapi.com/definitions/1.2.0/messages.json" +} \ No newline at end of file diff --git a/definitions/1.2.0/operation.json b/definitions/1.2.0/operation.json new file mode 100644 index 00000000..b352e238 --- /dev/null +++ b/definitions/1.2.0/operation.json @@ -0,0 +1,30 @@ +{ + "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" + } + } + } + } + ], + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "http://asyncapi.com/definitions/1.2.0/operation.json" +} \ No newline at end of file diff --git a/definitions/1.2.0/parameter.json b/definitions/1.2.0/parameter.json new file mode 100644 index 00000000..039fc423 --- /dev/null +++ b/definitions/1.2.0/parameter.json @@ -0,0 +1,26 @@ +{ + "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." + }, + "schema": { + "$ref": "http://asyncapi.com/definitions/1.2.0/schema.json" + }, + "$ref": { + "type": "string" + } + }, + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "http://asyncapi.com/definitions/1.2.0/parameter.json" +} \ No newline at end of file diff --git a/definitions/1.2.0/parameters.json b/definitions/1.2.0/parameters.json new file mode 100644 index 00000000..a51f3032 --- /dev/null +++ b/definitions/1.2.0/parameters.json @@ -0,0 +1,9 @@ +{ + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/1.2.0/parameter.json" + }, + "description": "JSON objects describing re-usable topic parameters.", + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "http://asyncapi.com/definitions/1.2.0/parameters.json" +} \ No newline at end of file diff --git a/definitions/1.2.0/schema.json b/definitions/1.2.0/schema.json new file mode 100644 index 00000000..9061a001 --- /dev/null +++ b/definitions/1.2.0/schema.json @@ -0,0 +1,148 @@ +{ + "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, + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "http://asyncapi.com/definitions/1.2.0/schema.json" +} \ No newline at end of file diff --git a/definitions/1.2.0/schemas.json b/definitions/1.2.0/schemas.json new file mode 100644 index 00000000..184f60f5 --- /dev/null +++ b/definitions/1.2.0/schemas.json @@ -0,0 +1,9 @@ +{ + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/1.2.0/schema.json" + }, + "description": "JSON objects describing schemas the API uses.", + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "http://asyncapi.com/definitions/1.2.0/schemas.json" +} \ No newline at end of file diff --git a/definitions/1.2.0/server.json b/definitions/1.2.0/server.json new file mode 100644 index 00000000..3d50e6b3 --- /dev/null +++ b/definitions/1.2.0/server.json @@ -0,0 +1,50 @@ +{ + "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" + } + }, + "properties": { + "url": { + "type": "string" + }, + "description": { + "type": "string" + }, + "scheme": { + "type": "string", + "description": "The transfer protocol.", + "enum": [ + "kafka", + "kafka-secure", + "amqp", + "amqps", + "mqtt", + "mqtts", + "secure-mqtt", + "ws", + "wss", + "stomp", + "stomps", + "jms", + "http", + "https" + ] + }, + "schemeVersion": { + "type": "string" + }, + "variables": { + "$ref": "http://asyncapi.com/definitions/1.2.0/serverVariables.json" + } + }, + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "http://asyncapi.com/definitions/1.2.0/server.json" +} \ No newline at end of file diff --git a/definitions/1.2.0/serverVariable.json b/definitions/1.2.0/serverVariable.json new file mode 100644 index 00000000..fc4bf8cc --- /dev/null +++ b/definitions/1.2.0/serverVariable.json @@ -0,0 +1,28 @@ +{ + "type": "object", + "description": "An object representing a Server Variable for server URL template substitution.", + "minProperties": 1, + "additionalProperties": false, + "patternProperties": { + "^x-": { + "$ref": "http://asyncapi.com/definitions/1.2.0/vendorExtension.json" + } + }, + "properties": { + "enum": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + }, + "default": { + "type": "string" + }, + "description": { + "type": "string" + } + }, + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "http://asyncapi.com/definitions/1.2.0/serverVariable.json" +} \ No newline at end of file diff --git a/definitions/1.2.0/serverVariables.json b/definitions/1.2.0/serverVariables.json new file mode 100644 index 00000000..4449af60 --- /dev/null +++ b/definitions/1.2.0/serverVariables.json @@ -0,0 +1,8 @@ +{ + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/1.2.0/serverVariable.json" + }, + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "http://asyncapi.com/definitions/1.2.0/serverVariables.json" +} \ No newline at end of file diff --git a/definitions/1.2.0/stream.json b/definitions/1.2.0/stream.json new file mode 100644 index 00000000..9adf59f8 --- /dev/null +++ b/definitions/1.2.0/stream.json @@ -0,0 +1,82 @@ +{ + "title": "Stream Object", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-": { + "$ref": "http://asyncapi.com/definitions/1.2.0/vendorExtension.json" + } + }, + "minProperties": 1, + "properties": { + "framing": { + "title": "Stream Framing Object", + "type": "object", + "patternProperties": { + "^x-": { + "$ref": "http://asyncapi.com/definitions/1.2.0/vendorExtension.json" + } + }, + "minProperties": 1, + "oneOf": [ + { + "additionalProperties": false, + "properties": { + "type": { + "type": "string", + "enum": [ + "chunked" + ] + }, + "delimiter": { + "type": "string", + "enum": [ + "\\r\\n", + "\\n" + ], + "default": "\\r\\n" + } + } + }, + { + "additionalProperties": false, + "properties": { + "type": { + "type": "string", + "enum": [ + "sse" + ] + }, + "delimiter": { + "type": "string", + "enum": [ + "\\n\\n" + ], + "default": "\\n\\n" + } + } + } + ] + }, + "read": { + "title": "Stream Read Object", + "type": "array", + "uniqueItems": true, + "minItems": 1, + "items": { + "$ref": "http://asyncapi.com/definitions/1.2.0/message.json" + } + }, + "write": { + "title": "Stream Write Object", + "type": "array", + "uniqueItems": true, + "minItems": 1, + "items": { + "$ref": "http://asyncapi.com/definitions/1.2.0/message.json" + } + } + }, + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "http://asyncapi.com/definitions/1.2.0/stream.json" +} \ No newline at end of file diff --git a/definitions/1.2.0/symmetricEncryption.json b/definitions/1.2.0/symmetricEncryption.json new file mode 100644 index 00000000..ae0e8d64 --- /dev/null +++ b/definitions/1.2.0/symmetricEncryption.json @@ -0,0 +1,23 @@ +{ + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "symmetricEncryption" + ] + }, + "description": { + "type": "string" + } + }, + "patternProperties": { + "^x-": {} + }, + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "http://asyncapi.com/definitions/1.2.0/symmetricEncryption.json" +} \ No newline at end of file diff --git a/definitions/1.2.0/tag.json b/definitions/1.2.0/tag.json new file mode 100644 index 00000000..a821a884 --- /dev/null +++ b/definitions/1.2.0/tag.json @@ -0,0 +1,25 @@ +{ + "type": "object", + "additionalProperties": false, + "required": [ + "name" + ], + "properties": { + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "externalDocs": { + "$ref": "http://asyncapi.com/definitions/1.2.0/externalDocs.json" + } + }, + "patternProperties": { + "^x-": { + "$ref": "http://asyncapi.com/definitions/1.2.0/vendorExtension.json" + } + }, + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "http://asyncapi.com/definitions/1.2.0/tag.json" +} \ No newline at end of file diff --git a/definitions/1.2.0/topicItem.json b/definitions/1.2.0/topicItem.json new file mode 100644 index 00000000..7ea7dc82 --- /dev/null +++ b/definitions/1.2.0/topicItem.json @@ -0,0 +1,35 @@ +{ + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-": { + "$ref": "http://asyncapi.com/definitions/1.2.0/vendorExtension.json" + } + }, + "minProperties": 1, + "properties": { + "$ref": { + "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 + } + }, + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "http://asyncapi.com/definitions/1.2.0/topicItem.json" +} \ No newline at end of file diff --git a/definitions/1.2.0/topics.json b/definitions/1.2.0/topics.json new file mode 100644 index 00000000..8587b7ba --- /dev/null +++ b/definitions/1.2.0/topics.json @@ -0,0 +1,15 @@ +{ + "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, + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "http://asyncapi.com/definitions/1.2.0/topics.json" +} \ No newline at end of file diff --git a/definitions/1.2.0/userPassword.json b/definitions/1.2.0/userPassword.json new file mode 100644 index 00000000..ad3586e9 --- /dev/null +++ b/definitions/1.2.0/userPassword.json @@ -0,0 +1,23 @@ +{ + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "userPassword" + ] + }, + "description": { + "type": "string" + } + }, + "patternProperties": { + "^x-": {} + }, + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "http://asyncapi.com/definitions/1.2.0/userPassword.json" +} \ No newline at end of file diff --git a/definitions/1.2.0/vendorExtension.json b/definitions/1.2.0/vendorExtension.json new file mode 100644 index 00000000..eafb1bfd --- /dev/null +++ b/definitions/1.2.0/vendorExtension.json @@ -0,0 +1,7 @@ +{ + "description": "Any property starting with x- is valid.", + "additionalProperties": true, + "additionalItems": true, + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "http://asyncapi.com/definitions/1.2.0/vendorExtension.json" +} \ No newline at end of file diff --git a/definitions/1.2.0/xml.json b/definitions/1.2.0/xml.json new file mode 100644 index 00000000..aea49644 --- /dev/null +++ b/definitions/1.2.0/xml.json @@ -0,0 +1,25 @@ +{ + "type": "object", + "additionalProperties": false, + "properties": { + "name": { + "type": "string" + }, + "namespace": { + "type": "string" + }, + "prefix": { + "type": "string" + }, + "attribute": { + "type": "boolean", + "default": false + }, + "wrapped": { + "type": "boolean", + "default": false + } + }, + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "http://asyncapi.com/definitions/1.2.0/xml.json" +} \ No newline at end of file diff --git a/definitions/2.0.0-rc1/APIKeyHTTPSecurityScheme.json b/definitions/2.0.0-rc1/APIKeyHTTPSecurityScheme.json new file mode 100644 index 00000000..d425aa29 --- /dev/null +++ b/definitions/2.0.0-rc1/APIKeyHTTPSecurityScheme.json @@ -0,0 +1,38 @@ +{ + "type": "object", + "required": [ + "type", + "name", + "in" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "httpApiKey" + ] + }, + "name": { + "type": "string" + }, + "in": { + "type": "string", + "enum": [ + "header", + "query", + "cookie" + ] + }, + "description": { + "type": "string" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/specificationExtension.json" + } + }, + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.0.0-rc1/APIKeyHTTPSecurityScheme.json" +} \ No newline at end of file diff --git a/definitions/2.0.0-rc1/BearerHTTPSecurityScheme.json b/definitions/2.0.0-rc1/BearerHTTPSecurityScheme.json new file mode 100644 index 00000000..8d1cc72f --- /dev/null +++ b/definitions/2.0.0-rc1/BearerHTTPSecurityScheme.json @@ -0,0 +1,35 @@ +{ + "type": "object", + "required": [ + "type", + "scheme" + ], + "properties": { + "scheme": { + "type": "string", + "enum": [ + "bearer" + ] + }, + "bearerFormat": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "http" + ] + }, + "description": { + "type": "string" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/specificationExtension.json" + } + }, + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.0.0-rc1/BearerHTTPSecurityScheme.json" +} \ No newline at end of file diff --git a/definitions/2.0.0-rc1/HTTPSecurityScheme.json b/definitions/2.0.0-rc1/HTTPSecurityScheme.json new file mode 100644 index 00000000..67f6597b --- /dev/null +++ b/definitions/2.0.0-rc1/HTTPSecurityScheme.json @@ -0,0 +1,15 @@ +{ + "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" + } + ], + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.0.0-rc1/HTTPSecurityScheme.json" +} \ No newline at end of file diff --git a/definitions/2.0.0-rc1/NonBearerHTTPSecurityScheme.json b/definitions/2.0.0-rc1/NonBearerHTTPSecurityScheme.json new file mode 100644 index 00000000..d1e68ba6 --- /dev/null +++ b/definitions/2.0.0-rc1/NonBearerHTTPSecurityScheme.json @@ -0,0 +1,40 @@ +{ + "not": { + "type": "object", + "properties": { + "scheme": { + "type": "string", + "enum": [ + "bearer" + ] + } + } + }, + "type": "object", + "required": [ + "scheme", + "type" + ], + "properties": { + "scheme": { + "type": "string" + }, + "description": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "http" + ] + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/specificationExtension.json" + } + }, + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.0.0-rc1/NonBearerHTTPSecurityScheme.json" +} \ No newline at end of file diff --git a/definitions/2.0.0-rc1/Reference.json b/definitions/2.0.0-rc1/Reference.json new file mode 100644 index 00000000..aca06c2f --- /dev/null +++ b/definitions/2.0.0-rc1/Reference.json @@ -0,0 +1,13 @@ +{ + "type": "object", + "required": [ + "$ref" + ], + "properties": { + "$ref": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/ReferenceObject.json" + } + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.0.0-rc1/Reference.json" +} \ No newline at end of file diff --git a/definitions/2.0.0-rc1/ReferenceObject.json b/definitions/2.0.0-rc1/ReferenceObject.json new file mode 100644 index 00000000..ae779fa0 --- /dev/null +++ b/definitions/2.0.0-rc1/ReferenceObject.json @@ -0,0 +1,6 @@ +{ + "type": "string", + "format": "uri", + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.0.0-rc1/ReferenceObject.json" +} \ No newline at end of file diff --git a/definitions/2.0.0-rc1/SecurityRequirement.json b/definitions/2.0.0-rc1/SecurityRequirement.json new file mode 100644 index 00000000..9595ddce --- /dev/null +++ b/definitions/2.0.0-rc1/SecurityRequirement.json @@ -0,0 +1,12 @@ +{ + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.0.0-rc1/SecurityRequirement.json" +} \ No newline at end of file diff --git a/definitions/2.0.0-rc1/SecurityScheme.json b/definitions/2.0.0-rc1/SecurityScheme.json new file mode 100644 index 00000000..225f3659 --- /dev/null +++ b/definitions/2.0.0-rc1/SecurityScheme.json @@ -0,0 +1,30 @@ +{ + "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" + } + ], + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.0.0-rc1/SecurityScheme.json" +} \ No newline at end of file diff --git a/definitions/2.0.0-rc1/X509.json b/definitions/2.0.0-rc1/X509.json new file mode 100644 index 00000000..5f7f1a9f --- /dev/null +++ b/definitions/2.0.0-rc1/X509.json @@ -0,0 +1,25 @@ +{ + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "X509" + ] + }, + "description": { + "type": "string" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/specificationExtension.json" + } + }, + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.0.0-rc1/X509.json" +} \ No newline at end of file diff --git a/definitions/2.0.0-rc1/apiKey.json b/definitions/2.0.0-rc1/apiKey.json new file mode 100644 index 00000000..73f9d0fc --- /dev/null +++ b/definitions/2.0.0-rc1/apiKey.json @@ -0,0 +1,33 @@ +{ + "type": "object", + "required": [ + "type", + "in" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "apiKey" + ] + }, + "in": { + "type": "string", + "enum": [ + "user", + "password" + ] + }, + "description": { + "type": "string" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/specificationExtension.json" + } + }, + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.0.0-rc1/apiKey.json" +} \ No newline at end of file diff --git a/definitions/2.0.0-rc1/asymmetricEncryption.json b/definitions/2.0.0-rc1/asymmetricEncryption.json new file mode 100644 index 00000000..fc0994ed --- /dev/null +++ b/definitions/2.0.0-rc1/asymmetricEncryption.json @@ -0,0 +1,25 @@ +{ + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "asymmetricEncryption" + ] + }, + "description": { + "type": "string" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/specificationExtension.json" + } + }, + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.0.0-rc1/asymmetricEncryption.json" +} \ No newline at end of file diff --git a/definitions/2.0.0-rc1/asyncapi.json b/definitions/2.0.0-rc1/asyncapi.json new file mode 100644 index 00000000..dff177a1 --- /dev/null +++ b/definitions/2.0.0-rc1/asyncapi.json @@ -0,0 +1,61 @@ +{ + "title": "AsyncAPI 2.0.0-rc1 schema.", + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.0.0-rc1/asyncapi.json", + "type": "object", + "required": [ + "asyncapi", + "id", + "info", + "channels" + ], + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/specificationExtension.json" + } + }, + "properties": { + "asyncapi": { + "type": "string", + "enum": [ + "2.0.0-rc1" + ], + "description": "The AsyncAPI specification version of this document." + }, + "id": { + "type": "string", + "description": "A unique id representing the application.", + "format": "uri-reference" + }, + "info": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/info.json" + }, + "servers": { + "type": "array", + "items": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/server.json" + }, + "uniqueItems": true + }, + "defaultContentType": { + "type": "string" + }, + "channels": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/channels.json" + }, + "components": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/components.json" + }, + "tags": { + "type": "array", + "items": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/tag.json" + }, + "uniqueItems": true + }, + "externalDocs": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/externalDocs.json" + } + } +} diff --git a/definitions/2.0.0-rc1/channelItem.json b/definitions/2.0.0-rc1/channelItem.json new file mode 100644 index 00000000..94a67bb2 --- /dev/null +++ b/definitions/2.0.0-rc1/channelItem.json @@ -0,0 +1,41 @@ +{ + "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": { + "type": "array", + "uniqueItems": true, + "minItems": 1, + "items": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/parameter.json" + } + }, + "publish": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/operation.json" + }, + "subscribe": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/operation.json" + }, + "deprecated": { + "type": "boolean", + "default": false + }, + "protocolInfo": { + "type": "object", + "additionalProperties": { + "type": "object" + } + } + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.0.0-rc1/channelItem.json" +} \ No newline at end of file diff --git a/definitions/2.0.0-rc1/channels.json b/definitions/2.0.0-rc1/channels.json new file mode 100644 index 00000000..cc175263 --- /dev/null +++ b/definitions/2.0.0-rc1/channels.json @@ -0,0 +1,13 @@ +{ + "type": "object", + "propertyNames": { + "type": "string", + "format": "uri-template", + "minLength": 1 + }, + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/channelItem.json" + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.0.0-rc1/channels.json" +} \ No newline at end of file diff --git a/definitions/2.0.0-rc1/components.json b/definitions/2.0.0-rc1/components.json new file mode 100644 index 00000000..3d89e26f --- /dev/null +++ b/definitions/2.0.0-rc1/components.json @@ -0,0 +1,51 @@ +{ + "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" + } + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.0.0-rc1/components.json" +} \ No newline at end of file diff --git a/definitions/2.0.0-rc1/contact.json b/definitions/2.0.0-rc1/contact.json new file mode 100644 index 00000000..1366cd98 --- /dev/null +++ b/definitions/2.0.0-rc1/contact.json @@ -0,0 +1,28 @@ +{ + "type": "object", + "description": "Contact information for the owners of the API.", + "additionalProperties": false, + "properties": { + "name": { + "type": "string", + "description": "The identifying name of the contact person/organization." + }, + "url": { + "type": "string", + "description": "The URL pointing to the contact information.", + "format": "uri" + }, + "email": { + "type": "string", + "description": "The email address of the contact person/organization.", + "format": "email" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/specificationExtension.json" + } + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.0.0-rc1/contact.json" +} \ No newline at end of file diff --git a/definitions/2.0.0-rc1/correlationId.json b/definitions/2.0.0-rc1/correlationId.json new file mode 100644 index 00000000..75d9bb22 --- /dev/null +++ b/definitions/2.0.0-rc1/correlationId.json @@ -0,0 +1,25 @@ +{ + "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+)+" + } + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.0.0-rc1/correlationId.json" +} \ No newline at end of file diff --git a/definitions/2.0.0-rc1/externalDocs.json b/definitions/2.0.0-rc1/externalDocs.json new file mode 100644 index 00000000..47f29c2c --- /dev/null +++ b/definitions/2.0.0-rc1/externalDocs.json @@ -0,0 +1,24 @@ +{ + "type": "object", + "additionalProperties": false, + "description": "information about external documentation", + "required": [ + "url" + ], + "properties": { + "description": { + "type": "string" + }, + "url": { + "type": "string", + "format": "uri" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/specificationExtension.json" + } + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.0.0-rc1/externalDocs.json" +} \ No newline at end of file diff --git a/definitions/2.0.0-rc1/info.json b/definitions/2.0.0-rc1/info.json new file mode 100644 index 00000000..04c147fd --- /dev/null +++ b/definitions/2.0.0-rc1/info.json @@ -0,0 +1,41 @@ +{ + "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" + } + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.0.0-rc1/info.json" +} \ No newline at end of file diff --git a/definitions/2.0.0-rc1/license.json b/definitions/2.0.0-rc1/license.json new file mode 100644 index 00000000..5de88bf6 --- /dev/null +++ b/definitions/2.0.0-rc1/license.json @@ -0,0 +1,25 @@ +{ + "type": "object", + "required": [ + "name" + ], + "additionalProperties": false, + "properties": { + "name": { + "type": "string", + "description": "The name of the license type. It's encouraged to use an OSI compatible license." + }, + "url": { + "type": "string", + "description": "The URL pointing to the license.", + "format": "uri" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/specificationExtension.json" + } + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.0.0-rc1/license.json" +} \ No newline at end of file diff --git a/definitions/2.0.0-rc1/message.json b/definitions/2.0.0-rc1/message.json new file mode 100644 index 00000000..786a925e --- /dev/null +++ b/definitions/2.0.0-rc1/message.json @@ -0,0 +1,117 @@ +{ + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/specificationExtension.json" + } + }, + "properties": { + "schemaFormat": { + "type": "string" + }, + "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" + } + ] + } + }, + "payload": {}, + "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": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/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-rc1/externalDocs.json" + }, + "deprecated": { + "type": "boolean", + "default": false + }, + "examples": { + "type": "array", + "items": { + "type": "object" + } + }, + "protocolInfo": { + "type": "object", + "additionalProperties": { + "type": "object" + } + }, + "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/messageTrait.json" + }, + { + "type": "array", + "items": [ + { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/messageTrait.json" + } + ] + }, + { + "type": "object", + "additionalItems": true + } + ] + } + ] + } + } + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.0.0-rc1/message.json" +} \ No newline at end of file diff --git a/definitions/2.0.0-rc1/messageTrait.json b/definitions/2.0.0-rc1/messageTrait.json new file mode 100644 index 00000000..a6adc081 --- /dev/null +++ b/definitions/2.0.0-rc1/messageTrait.json @@ -0,0 +1,84 @@ +{ + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/specificationExtension.json" + } + }, + "properties": { + "schemaFormat": { + "type": "string" + }, + "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": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/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-rc1/externalDocs.json" + }, + "deprecated": { + "type": "boolean", + "default": false + }, + "examples": { + "type": "array", + "items": { + "type": "object" + } + }, + "protocolInfo": { + "type": "object", + "additionalProperties": { + "type": "object" + } + } + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.0.0-rc1/messageTrait.json" +} \ No newline at end of file diff --git a/definitions/2.0.0-rc1/messages.json b/definitions/2.0.0-rc1/messages.json new file mode 100644 index 00000000..c8b2c17e --- /dev/null +++ b/definitions/2.0.0-rc1/messages.json @@ -0,0 +1,9 @@ +{ + "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.", + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.0.0-rc1/messages.json" +} \ No newline at end of file diff --git a/definitions/2.0.0-rc1/oauth2Flow.json b/definitions/2.0.0-rc1/oauth2Flow.json new file mode 100644 index 00000000..396d0637 --- /dev/null +++ b/definitions/2.0.0-rc1/oauth2Flow.json @@ -0,0 +1,28 @@ +{ + "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, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.0.0-rc1/oauth2Flow.json" +} \ No newline at end of file diff --git a/definitions/2.0.0-rc1/oauth2Flows.json b/definitions/2.0.0-rc1/oauth2Flows.json new file mode 100644 index 00000000..730fcf3a --- /dev/null +++ b/definitions/2.0.0-rc1/oauth2Flows.json @@ -0,0 +1,106 @@ +{ + "type": "object", + "required": [ + "type", + "flows" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "oauth2" + ] + }, + "description": { + "type": "string" + }, + "flows": { + "type": "object", + "properties": { + "implicit": { + "allOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/oauth2Flow.json" + }, + { + "required": [ + "authorizationUrl", + "scopes" + ] + }, + { + "not": { + "required": [ + "tokenUrl" + ] + } + } + ] + }, + "password": { + "allOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/oauth2Flow.json" + }, + { + "required": [ + "tokenUrl", + "scopes" + ] + }, + { + "not": { + "required": [ + "authorizationUrl" + ] + } + } + ] + }, + "clientCredentials": { + "allOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/oauth2Flow.json" + }, + { + "required": [ + "tokenUrl", + "scopes" + ] + }, + { + "not": { + "required": [ + "authorizationUrl" + ] + } + } + ] + }, + "authorizationCode": { + "allOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/oauth2Flow.json" + }, + { + "required": [ + "authorizationUrl", + "tokenUrl", + "scopes" + ] + } + ] + } + }, + "additionalProperties": false, + "minProperties": 1 + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/specificationExtension.json" + } + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.0.0-rc1/oauth2Flows.json" +} \ No newline at end of file diff --git a/definitions/2.0.0-rc1/oauth2Scopes.json b/definitions/2.0.0-rc1/oauth2Scopes.json new file mode 100644 index 00000000..1e5569fa --- /dev/null +++ b/definitions/2.0.0-rc1/oauth2Scopes.json @@ -0,0 +1,8 @@ +{ + "type": "object", + "additionalProperties": { + "type": "string" + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.0.0-rc1/oauth2Scopes.json" +} \ No newline at end of file diff --git a/definitions/2.0.0-rc1/openIdConnect.json b/definitions/2.0.0-rc1/openIdConnect.json new file mode 100644 index 00000000..7bc8a4a0 --- /dev/null +++ b/definitions/2.0.0-rc1/openIdConnect.json @@ -0,0 +1,30 @@ +{ + "type": "object", + "required": [ + "type", + "openIdConnectUrl" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "openIdConnect" + ] + }, + "description": { + "type": "string" + }, + "openIdConnectUrl": { + "type": "string", + "format": "uri" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/specificationExtension.json" + } + }, + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.0.0-rc1/openIdConnect.json" +} \ No newline at end of file diff --git a/definitions/2.0.0-rc1/operation.json b/definitions/2.0.0-rc1/operation.json new file mode 100644 index 00000000..0fa6fe18 --- /dev/null +++ b/definitions/2.0.0-rc1/operation.json @@ -0,0 +1,98 @@ +{ + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/specificationExtension.json" + } + }, + "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" + }, + { + "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" + } + ] + }, + { + "type": "object", + "additionalItems": true + } + ] + } + ] + } + }, + "summary": { + "type": "string" + }, + "description": { + "type": "string" + }, + "tags": { + "type": "array", + "items": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/tag.json" + }, + "uniqueItems": true + }, + "externalDocs": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/externalDocs.json" + }, + "operationId": { + "type": "string" + }, + "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" + } + } + } + } + ] + } + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.0.0-rc1/operation.json" +} \ No newline at end of file diff --git a/definitions/2.0.0-rc1/operationTrait.json b/definitions/2.0.0-rc1/operationTrait.json new file mode 100644 index 00000000..053a6a1c --- /dev/null +++ b/definitions/2.0.0-rc1/operationTrait.json @@ -0,0 +1,38 @@ +{ + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/specificationExtension.json" + } + }, + "properties": { + "summary": { + "type": "string" + }, + "description": { + "type": "string" + }, + "tags": { + "type": "array", + "items": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/tag.json" + }, + "uniqueItems": true + }, + "externalDocs": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/externalDocs.json" + }, + "operationId": { + "type": "string" + }, + "protocolInfo": { + "type": "object", + "additionalProperties": { + "type": "object" + } + } + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.0.0-rc1/operationTrait.json" +} \ No newline at end of file diff --git a/definitions/2.0.0-rc1/parameter.json b/definitions/2.0.0-rc1/parameter.json new file mode 100644 index 00000000..97118c20 --- /dev/null +++ b/definitions/2.0.0-rc1/parameter.json @@ -0,0 +1,26 @@ +{ + "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" + } + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.0.0-rc1/parameter.json" +} \ No newline at end of file diff --git a/definitions/2.0.0-rc1/parameters.json b/definitions/2.0.0-rc1/parameters.json new file mode 100644 index 00000000..e97435ce --- /dev/null +++ b/definitions/2.0.0-rc1/parameters.json @@ -0,0 +1,9 @@ +{ + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/parameter.json" + }, + "description": "JSON objects describing re-usable channel parameters.", + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.0.0-rc1/parameters.json" +} \ No newline at end of file diff --git a/definitions/2.0.0-rc1/schema.json b/definitions/2.0.0-rc1/schema.json new file mode 100644 index 00000000..44cded50 --- /dev/null +++ b/definitions/2.0.0-rc1/schema.json @@ -0,0 +1,156 @@ +{ + "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, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.0.0-rc1/schema.json" +} \ No newline at end of file diff --git a/definitions/2.0.0-rc1/schemas.json b/definitions/2.0.0-rc1/schemas.json new file mode 100644 index 00000000..e8a37c8e --- /dev/null +++ b/definitions/2.0.0-rc1/schemas.json @@ -0,0 +1,9 @@ +{ + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/schema.json" + }, + "description": "JSON objects describing schemas the API uses.", + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.0.0-rc1/schemas.json" +} \ No newline at end of file diff --git a/definitions/2.0.0-rc1/server.json b/definitions/2.0.0-rc1/server.json new file mode 100644 index 00000000..7b58b29d --- /dev/null +++ b/definitions/2.0.0-rc1/server.json @@ -0,0 +1,44 @@ +{ + "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" + } + }, + "properties": { + "url": { + "type": "string" + }, + "description": { + "type": "string" + }, + "protocol": { + "type": "string", + "description": "The transfer protocol." + }, + "protocolVersion": { + "type": "string" + }, + "variables": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/serverVariables.json" + }, + "baseChannel": { + "type": "string", + "x-format": "uri-path" + }, + "security": { + "type": "array", + "items": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/SecurityRequirement.json" + } + } + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.0.0-rc1/server.json" +} \ No newline at end of file diff --git a/definitions/2.0.0-rc1/serverVariable.json b/definitions/2.0.0-rc1/serverVariable.json new file mode 100644 index 00000000..19ebaa99 --- /dev/null +++ b/definitions/2.0.0-rc1/serverVariable.json @@ -0,0 +1,34 @@ +{ + "type": "object", + "description": "An object representing a Server Variable for server URL template substitution.", + "minProperties": 1, + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/specificationExtension.json" + } + }, + "properties": { + "enum": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + }, + "default": { + "type": "string" + }, + "description": { + "type": "string" + }, + "examples": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.0.0-rc1/serverVariable.json" +} \ No newline at end of file diff --git a/definitions/2.0.0-rc1/serverVariables.json b/definitions/2.0.0-rc1/serverVariables.json new file mode 100644 index 00000000..f49ff468 --- /dev/null +++ b/definitions/2.0.0-rc1/serverVariables.json @@ -0,0 +1,8 @@ +{ + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/serverVariable.json" + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.0.0-rc1/serverVariables.json" +} \ No newline at end of file diff --git a/definitions/2.0.0-rc1/specificationExtension.json b/definitions/2.0.0-rc1/specificationExtension.json new file mode 100644 index 00000000..64894f22 --- /dev/null +++ b/definitions/2.0.0-rc1/specificationExtension.json @@ -0,0 +1,7 @@ +{ + "description": "Any property starting with x- is valid.", + "additionalProperties": true, + "additionalItems": true, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.0.0-rc1/specificationExtension.json" +} \ No newline at end of file diff --git a/definitions/2.0.0-rc1/symmetricEncryption.json b/definitions/2.0.0-rc1/symmetricEncryption.json new file mode 100644 index 00000000..b6364002 --- /dev/null +++ b/definitions/2.0.0-rc1/symmetricEncryption.json @@ -0,0 +1,25 @@ +{ + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "symmetricEncryption" + ] + }, + "description": { + "type": "string" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/specificationExtension.json" + } + }, + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.0.0-rc1/symmetricEncryption.json" +} \ No newline at end of file diff --git a/definitions/2.0.0-rc1/tag.json b/definitions/2.0.0-rc1/tag.json new file mode 100644 index 00000000..6cde7b2c --- /dev/null +++ b/definitions/2.0.0-rc1/tag.json @@ -0,0 +1,25 @@ +{ + "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" + } + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.0.0-rc1/tag.json" +} \ No newline at end of file diff --git a/definitions/2.0.0-rc1/traits.json b/definitions/2.0.0-rc1/traits.json new file mode 100644 index 00000000..59a7632e --- /dev/null +++ b/definitions/2.0.0-rc1/traits.json @@ -0,0 +1,15 @@ +{ + "type": "object", + "additionalProperties": { + "anyOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/operationTrait.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/messageTrait.json" + } + ] + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.0.0-rc1/traits.json" +} \ No newline at end of file diff --git a/definitions/2.0.0-rc1/userPassword.json b/definitions/2.0.0-rc1/userPassword.json new file mode 100644 index 00000000..808c7732 --- /dev/null +++ b/definitions/2.0.0-rc1/userPassword.json @@ -0,0 +1,25 @@ +{ + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "userPassword" + ] + }, + "description": { + "type": "string" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/specificationExtension.json" + } + }, + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.0.0-rc1/userPassword.json" +} \ No newline at end of file diff --git a/definitions/2.0.0-rc1/xml.json b/definitions/2.0.0-rc1/xml.json new file mode 100644 index 00000000..babc7944 --- /dev/null +++ b/definitions/2.0.0-rc1/xml.json @@ -0,0 +1,25 @@ +{ + "type": "object", + "additionalProperties": false, + "properties": { + "name": { + "type": "string" + }, + "namespace": { + "type": "string" + }, + "prefix": { + "type": "string" + }, + "attribute": { + "type": "boolean", + "default": false + }, + "wrapped": { + "type": "boolean", + "default": false + } + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.0.0-rc1/xml.json" +} \ No newline at end of file diff --git a/definitions/2.0.0-rc2/APIKeyHTTPSecurityScheme.json b/definitions/2.0.0-rc2/APIKeyHTTPSecurityScheme.json new file mode 100644 index 00000000..a3ad8e89 --- /dev/null +++ b/definitions/2.0.0-rc2/APIKeyHTTPSecurityScheme.json @@ -0,0 +1,38 @@ +{ + "type": "object", + "required": [ + "type", + "name", + "in" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "httpApiKey" + ] + }, + "name": { + "type": "string" + }, + "in": { + "type": "string", + "enum": [ + "header", + "query", + "cookie" + ] + }, + "description": { + "type": "string" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/specificationExtension.json" + } + }, + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.0.0-rc2/APIKeyHTTPSecurityScheme.json" +} \ No newline at end of file diff --git a/definitions/2.0.0-rc2/BearerHTTPSecurityScheme.json b/definitions/2.0.0-rc2/BearerHTTPSecurityScheme.json new file mode 100644 index 00000000..54cd3159 --- /dev/null +++ b/definitions/2.0.0-rc2/BearerHTTPSecurityScheme.json @@ -0,0 +1,35 @@ +{ + "type": "object", + "required": [ + "type", + "scheme" + ], + "properties": { + "scheme": { + "type": "string", + "enum": [ + "bearer" + ] + }, + "bearerFormat": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "http" + ] + }, + "description": { + "type": "string" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/specificationExtension.json" + } + }, + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.0.0-rc2/BearerHTTPSecurityScheme.json" +} \ No newline at end of file diff --git a/definitions/2.0.0-rc2/HTTPSecurityScheme.json b/definitions/2.0.0-rc2/HTTPSecurityScheme.json new file mode 100644 index 00000000..5d794713 --- /dev/null +++ b/definitions/2.0.0-rc2/HTTPSecurityScheme.json @@ -0,0 +1,15 @@ +{ + "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" + } + ], + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.0.0-rc2/HTTPSecurityScheme.json" +} \ No newline at end of file diff --git a/definitions/2.0.0-rc2/NonBearerHTTPSecurityScheme.json b/definitions/2.0.0-rc2/NonBearerHTTPSecurityScheme.json new file mode 100644 index 00000000..6363b58f --- /dev/null +++ b/definitions/2.0.0-rc2/NonBearerHTTPSecurityScheme.json @@ -0,0 +1,40 @@ +{ + "not": { + "type": "object", + "properties": { + "scheme": { + "type": "string", + "enum": [ + "bearer" + ] + } + } + }, + "type": "object", + "required": [ + "scheme", + "type" + ], + "properties": { + "scheme": { + "type": "string" + }, + "description": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "http" + ] + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/specificationExtension.json" + } + }, + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.0.0-rc2/NonBearerHTTPSecurityScheme.json" +} \ No newline at end of file diff --git a/definitions/2.0.0-rc2/Reference.json b/definitions/2.0.0-rc2/Reference.json new file mode 100644 index 00000000..3dec6738 --- /dev/null +++ b/definitions/2.0.0-rc2/Reference.json @@ -0,0 +1,13 @@ +{ + "type": "object", + "required": [ + "$ref" + ], + "properties": { + "$ref": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/ReferenceObject.json" + } + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.0.0-rc2/Reference.json" +} \ No newline at end of file diff --git a/definitions/2.0.0-rc2/ReferenceObject.json b/definitions/2.0.0-rc2/ReferenceObject.json new file mode 100644 index 00000000..58537f85 --- /dev/null +++ b/definitions/2.0.0-rc2/ReferenceObject.json @@ -0,0 +1,6 @@ +{ + "type": "string", + "format": "uri-reference", + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.0.0-rc2/ReferenceObject.json" +} \ No newline at end of file diff --git a/definitions/2.0.0-rc2/SecurityRequirement.json b/definitions/2.0.0-rc2/SecurityRequirement.json new file mode 100644 index 00000000..f016ab77 --- /dev/null +++ b/definitions/2.0.0-rc2/SecurityRequirement.json @@ -0,0 +1,12 @@ +{ + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.0.0-rc2/SecurityRequirement.json" +} \ No newline at end of file diff --git a/definitions/2.0.0-rc2/SecurityScheme.json b/definitions/2.0.0-rc2/SecurityScheme.json new file mode 100644 index 00000000..3681c7f7 --- /dev/null +++ b/definitions/2.0.0-rc2/SecurityScheme.json @@ -0,0 +1,30 @@ +{ + "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" + } + ], + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.0.0-rc2/SecurityScheme.json" +} \ No newline at end of file diff --git a/definitions/2.0.0-rc2/X509.json b/definitions/2.0.0-rc2/X509.json new file mode 100644 index 00000000..a0e54416 --- /dev/null +++ b/definitions/2.0.0-rc2/X509.json @@ -0,0 +1,25 @@ +{ + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "X509" + ] + }, + "description": { + "type": "string" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/specificationExtension.json" + } + }, + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.0.0-rc2/X509.json" +} \ No newline at end of file diff --git a/definitions/2.0.0-rc2/apiKey.json b/definitions/2.0.0-rc2/apiKey.json new file mode 100644 index 00000000..a9bd3778 --- /dev/null +++ b/definitions/2.0.0-rc2/apiKey.json @@ -0,0 +1,33 @@ +{ + "type": "object", + "required": [ + "type", + "in" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "apiKey" + ] + }, + "in": { + "type": "string", + "enum": [ + "user", + "password" + ] + }, + "description": { + "type": "string" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/specificationExtension.json" + } + }, + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.0.0-rc2/apiKey.json" +} \ No newline at end of file diff --git a/definitions/2.0.0-rc2/asymmetricEncryption.json b/definitions/2.0.0-rc2/asymmetricEncryption.json new file mode 100644 index 00000000..54f4ca27 --- /dev/null +++ b/definitions/2.0.0-rc2/asymmetricEncryption.json @@ -0,0 +1,25 @@ +{ + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "asymmetricEncryption" + ] + }, + "description": { + "type": "string" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/specificationExtension.json" + } + }, + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.0.0-rc2/asymmetricEncryption.json" +} \ No newline at end of file diff --git a/definitions/2.0.0-rc2/asyncapi.json b/definitions/2.0.0-rc2/asyncapi.json new file mode 100644 index 00000000..d228bfe3 --- /dev/null +++ b/definitions/2.0.0-rc2/asyncapi.json @@ -0,0 +1,59 @@ +{ + "title": "AsyncAPI 2.0.0-rc2 schema.", + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.0.0-rc2/asyncapi.json", + "type": "object", + "required": [ + "asyncapi", + "info", + "channels" + ], + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/specificationExtension.json" + } + }, + "properties": { + "asyncapi": { + "type": "string", + "enum": [ + "2.0.0-rc2" + ], + "description": "The AsyncAPI specification version of this document." + }, + "id": { + "type": "string", + "description": "A unique id representing the application.", + "format": "uri" + }, + "info": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/info.json" + }, + "servers": { + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/server.json" + } + }, + "defaultContentType": { + "type": "string" + }, + "channels": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/channels.json" + }, + "components": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/components.json" + }, + "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" + } + } +} \ No newline at end of file diff --git a/definitions/2.0.0-rc2/bindingsObject.json b/definitions/2.0.0-rc2/bindingsObject.json new file mode 100644 index 00000000..57ed4e7e --- /dev/null +++ b/definitions/2.0.0-rc2/bindingsObject.json @@ -0,0 +1,21 @@ +{ + "type": "object", + "additionalProperties": true, + "properties": { + "http": {}, + "ws": {}, + "amqp": {}, + "amqp1": {}, + "mqtt": {}, + "mqtt5": {}, + "kafka": {}, + "nats": {}, + "jms": {}, + "sns": {}, + "sqs": {}, + "stomp": {}, + "redis": {} + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.0.0-rc2/bindingsObject.json" +} \ No newline at end of file diff --git a/definitions/2.0.0-rc2/channelItem.json b/definitions/2.0.0-rc2/channelItem.json new file mode 100644 index 00000000..8ec400a3 --- /dev/null +++ b/definitions/2.0.0-rc2/channelItem.json @@ -0,0 +1,40 @@ +{ + "type": "object", + "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": { + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/parameter.json" + } + }, + "description": { + "type": "string", + "description": "A description of the channel." + }, + "publish": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/operation.json" + }, + "subscribe": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/operation.json" + }, + "deprecated": { + "type": "boolean", + "default": false + }, + "bindings": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/bindingsObject.json" + } + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.0.0-rc2/channelItem.json" +} \ No newline at end of file diff --git a/definitions/2.0.0-rc2/channels.json b/definitions/2.0.0-rc2/channels.json new file mode 100644 index 00000000..71287a4a --- /dev/null +++ b/definitions/2.0.0-rc2/channels.json @@ -0,0 +1,13 @@ +{ + "type": "object", + "propertyNames": { + "type": "string", + "format": "uri-template", + "minLength": 1 + }, + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/channelItem.json" + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.0.0-rc2/channels.json" +} \ No newline at end of file diff --git a/definitions/2.0.0-rc2/components.json b/definitions/2.0.0-rc2/components.json new file mode 100644 index 00000000..ce124407 --- /dev/null +++ b/definitions/2.0.0-rc2/components.json @@ -0,0 +1,84 @@ +{ + "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" + } + } + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.0.0-rc2/components.json" +} \ No newline at end of file diff --git a/definitions/2.0.0-rc2/contact.json b/definitions/2.0.0-rc2/contact.json new file mode 100644 index 00000000..a9f64d10 --- /dev/null +++ b/definitions/2.0.0-rc2/contact.json @@ -0,0 +1,28 @@ +{ + "type": "object", + "description": "Contact information for the owners of the API.", + "additionalProperties": false, + "properties": { + "name": { + "type": "string", + "description": "The identifying name of the contact person/organization." + }, + "url": { + "type": "string", + "description": "The URL pointing to the contact information.", + "format": "uri" + }, + "email": { + "type": "string", + "description": "The email address of the contact person/organization.", + "format": "email" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/specificationExtension.json" + } + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.0.0-rc2/contact.json" +} \ No newline at end of file diff --git a/definitions/2.0.0-rc2/correlationId.json b/definitions/2.0.0-rc2/correlationId.json new file mode 100644 index 00000000..357c33a3 --- /dev/null +++ b/definitions/2.0.0-rc2/correlationId.json @@ -0,0 +1,25 @@ +{ + "type": "object", + "required": [ + "location" + ], + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/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]))*)*" + } + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.0.0-rc2/correlationId.json" +} \ No newline at end of file diff --git a/definitions/2.0.0-rc2/externalDocs.json b/definitions/2.0.0-rc2/externalDocs.json new file mode 100644 index 00000000..26f913df --- /dev/null +++ b/definitions/2.0.0-rc2/externalDocs.json @@ -0,0 +1,24 @@ +{ + "type": "object", + "additionalProperties": false, + "description": "information about external documentation", + "required": [ + "url" + ], + "properties": { + "description": { + "type": "string" + }, + "url": { + "type": "string", + "format": "uri" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/specificationExtension.json" + } + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.0.0-rc2/externalDocs.json" +} \ No newline at end of file diff --git a/definitions/2.0.0-rc2/info.json b/definitions/2.0.0-rc2/info.json new file mode 100644 index 00000000..138066b5 --- /dev/null +++ b/definitions/2.0.0-rc2/info.json @@ -0,0 +1,41 @@ +{ + "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" + } + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.0.0-rc2/info.json" +} \ No newline at end of file diff --git a/definitions/2.0.0-rc2/license.json b/definitions/2.0.0-rc2/license.json new file mode 100644 index 00000000..55eef656 --- /dev/null +++ b/definitions/2.0.0-rc2/license.json @@ -0,0 +1,25 @@ +{ + "type": "object", + "required": [ + "name" + ], + "additionalProperties": false, + "properties": { + "name": { + "type": "string", + "description": "The name of the license type. It's encouraged to use an OSI compatible license." + }, + "url": { + "type": "string", + "description": "The URL pointing to the license.", + "format": "uri" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/specificationExtension.json" + } + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.0.0-rc2/license.json" +} \ No newline at end of file diff --git a/definitions/2.0.0-rc2/message.json b/definitions/2.0.0-rc2/message.json new file mode 100644 index 00000000..ffbf1722 --- /dev/null +++ b/definitions/2.0.0-rc2/message.json @@ -0,0 +1,130 @@ +{ + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/Reference.json" + }, + { + "oneOf": [ + { + "type": "object", + "required": [ + "oneOf" + ], + "additionalProperties": false, + "properties": { + "oneOf": { + "type": "array", + "items": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/message.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": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/schema.json" + }, + "payload": {}, + "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" + }, + "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/messageTrait.json" + }, + { + "type": "array", + "items": [ + { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/messageTrait.json" + } + ] + }, + { + "type": "object", + "additionalItems": true + } + ] + } + ] + } + } + } + } + ] + } + ], + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.0.0-rc2/message.json" +} \ No newline at end of file diff --git a/definitions/2.0.0-rc2/messageTrait.json b/definitions/2.0.0-rc2/messageTrait.json new file mode 100644 index 00000000..5a77ac1d --- /dev/null +++ b/definitions/2.0.0-rc2/messageTrait.json @@ -0,0 +1,78 @@ +{ + "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" + } + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.0.0-rc2/messageTrait.json" +} \ No newline at end of file diff --git a/definitions/2.0.0-rc2/messages.json b/definitions/2.0.0-rc2/messages.json new file mode 100644 index 00000000..5d842a27 --- /dev/null +++ b/definitions/2.0.0-rc2/messages.json @@ -0,0 +1,9 @@ +{ + "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.", + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.0.0-rc2/messages.json" +} \ No newline at end of file diff --git a/definitions/2.0.0-rc2/oauth2Flow.json b/definitions/2.0.0-rc2/oauth2Flow.json new file mode 100644 index 00000000..24d4880e --- /dev/null +++ b/definitions/2.0.0-rc2/oauth2Flow.json @@ -0,0 +1,28 @@ +{ + "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, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.0.0-rc2/oauth2Flow.json" +} \ No newline at end of file diff --git a/definitions/2.0.0-rc2/oauth2Flows.json b/definitions/2.0.0-rc2/oauth2Flows.json new file mode 100644 index 00000000..0d6843c9 --- /dev/null +++ b/definitions/2.0.0-rc2/oauth2Flows.json @@ -0,0 +1,106 @@ +{ + "type": "object", + "required": [ + "type", + "flows" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "oauth2" + ] + }, + "description": { + "type": "string" + }, + "flows": { + "type": "object", + "properties": { + "implicit": { + "allOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/oauth2Flow.json" + }, + { + "required": [ + "authorizationUrl", + "scopes" + ] + }, + { + "not": { + "required": [ + "tokenUrl" + ] + } + } + ] + }, + "password": { + "allOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/oauth2Flow.json" + }, + { + "required": [ + "tokenUrl", + "scopes" + ] + }, + { + "not": { + "required": [ + "authorizationUrl" + ] + } + } + ] + }, + "clientCredentials": { + "allOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/oauth2Flow.json" + }, + { + "required": [ + "tokenUrl", + "scopes" + ] + }, + { + "not": { + "required": [ + "authorizationUrl" + ] + } + } + ] + }, + "authorizationCode": { + "allOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/oauth2Flow.json" + }, + { + "required": [ + "authorizationUrl", + "tokenUrl", + "scopes" + ] + } + ] + } + }, + "additionalProperties": false, + "minProperties": 1 + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/specificationExtension.json" + } + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.0.0-rc2/oauth2Flows.json" +} \ No newline at end of file diff --git a/definitions/2.0.0-rc2/oauth2Scopes.json b/definitions/2.0.0-rc2/oauth2Scopes.json new file mode 100644 index 00000000..82edfa86 --- /dev/null +++ b/definitions/2.0.0-rc2/oauth2Scopes.json @@ -0,0 +1,8 @@ +{ + "type": "object", + "additionalProperties": { + "type": "string" + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.0.0-rc2/oauth2Scopes.json" +} \ No newline at end of file diff --git a/definitions/2.0.0-rc2/openIdConnect.json b/definitions/2.0.0-rc2/openIdConnect.json new file mode 100644 index 00000000..ebafafd6 --- /dev/null +++ b/definitions/2.0.0-rc2/openIdConnect.json @@ -0,0 +1,30 @@ +{ + "type": "object", + "required": [ + "type", + "openIdConnectUrl" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "openIdConnect" + ] + }, + "description": { + "type": "string" + }, + "openIdConnectUrl": { + "type": "string", + "format": "uri" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/specificationExtension.json" + } + }, + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.0.0-rc2/openIdConnect.json" +} \ No newline at end of file diff --git a/definitions/2.0.0-rc2/operation.json b/definitions/2.0.0-rc2/operation.json new file mode 100644 index 00000000..53f6643f --- /dev/null +++ b/definitions/2.0.0-rc2/operation.json @@ -0,0 +1,70 @@ +{ + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/specificationExtension.json" + } + }, + "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" + }, + { + "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" + } + ] + }, + { + "type": "object", + "additionalItems": true + } + ] + } + ] + } + }, + "summary": { + "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" + } + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.0.0-rc2/operation.json" +} \ No newline at end of file diff --git a/definitions/2.0.0-rc2/operationTrait.json b/definitions/2.0.0-rc2/operationTrait.json new file mode 100644 index 00000000..50079695 --- /dev/null +++ b/definitions/2.0.0-rc2/operationTrait.json @@ -0,0 +1,35 @@ +{ + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/specificationExtension.json" + } + }, + "properties": { + "summary": { + "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" + } + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.0.0-rc2/operationTrait.json" +} \ No newline at end of file diff --git a/definitions/2.0.0-rc2/parameter.json b/definitions/2.0.0-rc2/parameter.json new file mode 100644 index 00000000..13827c99 --- /dev/null +++ b/definitions/2.0.0-rc2/parameter.json @@ -0,0 +1,27 @@ +{ + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/specificationExtension.json" + } + }, + "properties": { + "description": { + "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" + }, + "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" + } + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.0.0-rc2/parameter.json" +} \ No newline at end of file diff --git a/definitions/2.0.0-rc2/parameters.json b/definitions/2.0.0-rc2/parameters.json new file mode 100644 index 00000000..d3e916c5 --- /dev/null +++ b/definitions/2.0.0-rc2/parameters.json @@ -0,0 +1,9 @@ +{ + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/parameter.json" + }, + "description": "JSON objects describing re-usable channel parameters.", + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.0.0-rc2/parameters.json" +} \ No newline at end of file diff --git a/definitions/2.0.0-rc2/schema.json b/definitions/2.0.0-rc2/schema.json new file mode 100644 index 00000000..9de8a2cf --- /dev/null +++ b/definitions/2.0.0-rc2/schema.json @@ -0,0 +1,91 @@ +{ + "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 + } + } + } + ], + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.0.0-rc2/schema.json" +} \ No newline at end of file diff --git a/definitions/2.0.0-rc2/schemas.json b/definitions/2.0.0-rc2/schemas.json new file mode 100644 index 00000000..ffacd8a0 --- /dev/null +++ b/definitions/2.0.0-rc2/schemas.json @@ -0,0 +1,9 @@ +{ + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/schema.json" + }, + "description": "JSON objects describing schemas the API uses.", + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.0.0-rc2/schemas.json" +} \ No newline at end of file diff --git a/definitions/2.0.0-rc2/server.json b/definitions/2.0.0-rc2/server.json new file mode 100644 index 00000000..e16498b4 --- /dev/null +++ b/definitions/2.0.0-rc2/server.json @@ -0,0 +1,43 @@ +{ + "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" + } + }, + "properties": { + "url": { + "type": "string" + }, + "description": { + "type": "string" + }, + "protocol": { + "type": "string", + "description": "The transfer protocol." + }, + "protocolVersion": { + "type": "string" + }, + "variables": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/serverVariables.json" + }, + "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" + } + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.0.0-rc2/server.json" +} \ No newline at end of file diff --git a/definitions/2.0.0-rc2/serverVariable.json b/definitions/2.0.0-rc2/serverVariable.json new file mode 100644 index 00000000..4dce643d --- /dev/null +++ b/definitions/2.0.0-rc2/serverVariable.json @@ -0,0 +1,34 @@ +{ + "type": "object", + "description": "An object representing a Server Variable for server URL template substitution.", + "minProperties": 1, + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/specificationExtension.json" + } + }, + "properties": { + "enum": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + }, + "default": { + "type": "string" + }, + "description": { + "type": "string" + }, + "examples": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.0.0-rc2/serverVariable.json" +} \ No newline at end of file diff --git a/definitions/2.0.0-rc2/serverVariables.json b/definitions/2.0.0-rc2/serverVariables.json new file mode 100644 index 00000000..dfbe5c8f --- /dev/null +++ b/definitions/2.0.0-rc2/serverVariables.json @@ -0,0 +1,8 @@ +{ + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/serverVariable.json" + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.0.0-rc2/serverVariables.json" +} \ No newline at end of file diff --git a/definitions/2.0.0-rc2/specificationExtension.json b/definitions/2.0.0-rc2/specificationExtension.json new file mode 100644 index 00000000..e7ebc1e9 --- /dev/null +++ b/definitions/2.0.0-rc2/specificationExtension.json @@ -0,0 +1,7 @@ +{ + "description": "Any property starting with x- is valid.", + "additionalProperties": true, + "additionalItems": true, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.0.0-rc2/specificationExtension.json" +} \ No newline at end of file diff --git a/definitions/2.0.0-rc2/symmetricEncryption.json b/definitions/2.0.0-rc2/symmetricEncryption.json new file mode 100644 index 00000000..6e965e5c --- /dev/null +++ b/definitions/2.0.0-rc2/symmetricEncryption.json @@ -0,0 +1,25 @@ +{ + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "symmetricEncryption" + ] + }, + "description": { + "type": "string" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/specificationExtension.json" + } + }, + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.0.0-rc2/symmetricEncryption.json" +} \ No newline at end of file diff --git a/definitions/2.0.0-rc2/tag.json b/definitions/2.0.0-rc2/tag.json new file mode 100644 index 00000000..3ad3bd8c --- /dev/null +++ b/definitions/2.0.0-rc2/tag.json @@ -0,0 +1,25 @@ +{ + "type": "object", + "additionalProperties": false, + "required": [ + "name" + ], + "properties": { + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "externalDocs": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/externalDocs.json" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/specificationExtension.json" + } + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.0.0-rc2/tag.json" +} \ No newline at end of file diff --git a/definitions/2.0.0-rc2/userPassword.json b/definitions/2.0.0-rc2/userPassword.json new file mode 100644 index 00000000..46dfa2e6 --- /dev/null +++ b/definitions/2.0.0-rc2/userPassword.json @@ -0,0 +1,25 @@ +{ + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "userPassword" + ] + }, + "description": { + "type": "string" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/specificationExtension.json" + } + }, + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.0.0-rc2/userPassword.json" +} \ No newline at end of file diff --git a/definitions/2.0.0/APIKeyHTTPSecurityScheme.json b/definitions/2.0.0/APIKeyHTTPSecurityScheme.json new file mode 100644 index 00000000..7628cbd2 --- /dev/null +++ b/definitions/2.0.0/APIKeyHTTPSecurityScheme.json @@ -0,0 +1,38 @@ +{ + "type": "object", + "required": [ + "type", + "name", + "in" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "httpApiKey" + ] + }, + "name": { + "type": "string" + }, + "in": { + "type": "string", + "enum": [ + "header", + "query", + "cookie" + ] + }, + "description": { + "type": "string" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.0.0/specificationExtension.json" + } + }, + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.0.0/APIKeyHTTPSecurityScheme.json" +} \ No newline at end of file diff --git a/definitions/2.0.0/BearerHTTPSecurityScheme.json b/definitions/2.0.0/BearerHTTPSecurityScheme.json new file mode 100644 index 00000000..33bfe7f1 --- /dev/null +++ b/definitions/2.0.0/BearerHTTPSecurityScheme.json @@ -0,0 +1,35 @@ +{ + "type": "object", + "required": [ + "type", + "scheme" + ], + "properties": { + "scheme": { + "type": "string", + "enum": [ + "bearer" + ] + }, + "bearerFormat": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "http" + ] + }, + "description": { + "type": "string" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.0.0/specificationExtension.json" + } + }, + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.0.0/BearerHTTPSecurityScheme.json" +} \ No newline at end of file diff --git a/definitions/2.0.0/HTTPSecurityScheme.json b/definitions/2.0.0/HTTPSecurityScheme.json new file mode 100644 index 00000000..511aee53 --- /dev/null +++ b/definitions/2.0.0/HTTPSecurityScheme.json @@ -0,0 +1,15 @@ +{ + "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" + } + ], + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.0.0/HTTPSecurityScheme.json" +} \ No newline at end of file diff --git a/definitions/2.0.0/NonBearerHTTPSecurityScheme.json b/definitions/2.0.0/NonBearerHTTPSecurityScheme.json new file mode 100644 index 00000000..66210b38 --- /dev/null +++ b/definitions/2.0.0/NonBearerHTTPSecurityScheme.json @@ -0,0 +1,40 @@ +{ + "not": { + "type": "object", + "properties": { + "scheme": { + "type": "string", + "enum": [ + "bearer" + ] + } + } + }, + "type": "object", + "required": [ + "scheme", + "type" + ], + "properties": { + "scheme": { + "type": "string" + }, + "description": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "http" + ] + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.0.0/specificationExtension.json" + } + }, + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.0.0/NonBearerHTTPSecurityScheme.json" +} \ No newline at end of file diff --git a/definitions/2.0.0/Reference.json b/definitions/2.0.0/Reference.json new file mode 100644 index 00000000..7fd1f124 --- /dev/null +++ b/definitions/2.0.0/Reference.json @@ -0,0 +1,13 @@ +{ + "type": "object", + "required": [ + "$ref" + ], + "properties": { + "$ref": { + "$ref": "http://asyncapi.com/definitions/2.0.0/ReferenceObject.json" + } + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.0.0/Reference.json" +} \ No newline at end of file diff --git a/definitions/2.0.0/ReferenceObject.json b/definitions/2.0.0/ReferenceObject.json new file mode 100644 index 00000000..7fcccba1 --- /dev/null +++ b/definitions/2.0.0/ReferenceObject.json @@ -0,0 +1,6 @@ +{ + "type": "string", + "format": "uri-reference", + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.0.0/ReferenceObject.json" +} \ No newline at end of file diff --git a/definitions/2.0.0/SecurityRequirement.json b/definitions/2.0.0/SecurityRequirement.json new file mode 100644 index 00000000..432f0c1d --- /dev/null +++ b/definitions/2.0.0/SecurityRequirement.json @@ -0,0 +1,12 @@ +{ + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.0.0/SecurityRequirement.json" +} \ No newline at end of file diff --git a/definitions/2.0.0/SecurityScheme.json b/definitions/2.0.0/SecurityScheme.json new file mode 100644 index 00000000..e6e0fbe1 --- /dev/null +++ b/definitions/2.0.0/SecurityScheme.json @@ -0,0 +1,30 @@ +{ + "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" + } + ], + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.0.0/SecurityScheme.json" +} \ No newline at end of file diff --git a/definitions/2.0.0/X509.json b/definitions/2.0.0/X509.json new file mode 100644 index 00000000..a5deac7b --- /dev/null +++ b/definitions/2.0.0/X509.json @@ -0,0 +1,25 @@ +{ + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "X509" + ] + }, + "description": { + "type": "string" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.0.0/specificationExtension.json" + } + }, + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.0.0/X509.json" +} \ No newline at end of file diff --git a/definitions/2.0.0/apiKey.json b/definitions/2.0.0/apiKey.json new file mode 100644 index 00000000..63431452 --- /dev/null +++ b/definitions/2.0.0/apiKey.json @@ -0,0 +1,33 @@ +{ + "type": "object", + "required": [ + "type", + "in" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "apiKey" + ] + }, + "in": { + "type": "string", + "enum": [ + "user", + "password" + ] + }, + "description": { + "type": "string" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.0.0/specificationExtension.json" + } + }, + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.0.0/apiKey.json" +} \ No newline at end of file diff --git a/definitions/2.0.0/asymmetricEncryption.json b/definitions/2.0.0/asymmetricEncryption.json new file mode 100644 index 00000000..e43bd148 --- /dev/null +++ b/definitions/2.0.0/asymmetricEncryption.json @@ -0,0 +1,25 @@ +{ + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "asymmetricEncryption" + ] + }, + "description": { + "type": "string" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.0.0/specificationExtension.json" + } + }, + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.0.0/asymmetricEncryption.json" +} \ No newline at end of file diff --git a/definitions/2.0.0/asyncapi.json b/definitions/2.0.0/asyncapi.json new file mode 100644 index 00000000..3776b839 --- /dev/null +++ b/definitions/2.0.0/asyncapi.json @@ -0,0 +1,59 @@ +{ + "title": "AsyncAPI 2.0.0 schema.", + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.0.0/asyncapi.json", + "type": "object", + "required": [ + "asyncapi", + "info", + "channels" + ], + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.0.0/specificationExtension.json" + } + }, + "properties": { + "asyncapi": { + "type": "string", + "enum": [ + "2.0.0" + ], + "description": "The AsyncAPI specification version of this document." + }, + "id": { + "type": "string", + "description": "A unique id representing the application.", + "format": "uri" + }, + "info": { + "$ref": "http://asyncapi.com/definitions/2.0.0/info.json" + }, + "servers": { + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/2.0.0/server.json" + } + }, + "defaultContentType": { + "type": "string" + }, + "channels": { + "$ref": "http://asyncapi.com/definitions/2.0.0/channels.json" + }, + "components": { + "$ref": "http://asyncapi.com/definitions/2.0.0/components.json" + }, + "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" + } + } +} \ No newline at end of file diff --git a/definitions/2.0.0/bindingsObject.json b/definitions/2.0.0/bindingsObject.json new file mode 100644 index 00000000..5c7a2475 --- /dev/null +++ b/definitions/2.0.0/bindingsObject.json @@ -0,0 +1,21 @@ +{ + "type": "object", + "additionalProperties": true, + "properties": { + "http": {}, + "ws": {}, + "amqp": {}, + "amqp1": {}, + "mqtt": {}, + "mqtt5": {}, + "kafka": {}, + "nats": {}, + "jms": {}, + "sns": {}, + "sqs": {}, + "stomp": {}, + "redis": {} + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.0.0/bindingsObject.json" +} \ No newline at end of file diff --git a/definitions/2.0.0/channelItem.json b/definitions/2.0.0/channelItem.json new file mode 100644 index 00000000..35ab3fb1 --- /dev/null +++ b/definitions/2.0.0/channelItem.json @@ -0,0 +1,39 @@ +{ + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.0.0/specificationExtension.json" + } + }, + "properties": { + "$ref": { + "$ref": "http://asyncapi.com/definitions/2.0.0/ReferenceObject.json" + }, + "parameters": { + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/2.0.0/parameter.json" + } + }, + "description": { + "type": "string", + "description": "A description of the channel." + }, + "publish": { + "$ref": "http://asyncapi.com/definitions/2.0.0/operation.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" + } + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.0.0/channelItem.json" +} \ No newline at end of file diff --git a/definitions/2.0.0/channels.json b/definitions/2.0.0/channels.json new file mode 100644 index 00000000..dc7b33b8 --- /dev/null +++ b/definitions/2.0.0/channels.json @@ -0,0 +1,13 @@ +{ + "type": "object", + "propertyNames": { + "type": "string", + "format": "uri-template", + "minLength": 1 + }, + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/2.0.0/channelItem.json" + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.0.0/channels.json" +} \ No newline at end of file diff --git a/definitions/2.0.0/components.json b/definitions/2.0.0/components.json new file mode 100644 index 00000000..11d05165 --- /dev/null +++ b/definitions/2.0.0/components.json @@ -0,0 +1,89 @@ +{ + "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" + } + } + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.0.0/components.json" +} \ No newline at end of file diff --git a/definitions/2.0.0/contact.json b/definitions/2.0.0/contact.json new file mode 100644 index 00000000..4d3fdcc4 --- /dev/null +++ b/definitions/2.0.0/contact.json @@ -0,0 +1,28 @@ +{ + "type": "object", + "description": "Contact information for the owners of the API.", + "additionalProperties": false, + "properties": { + "name": { + "type": "string", + "description": "The identifying name of the contact person/organization." + }, + "url": { + "type": "string", + "description": "The URL pointing to the contact information.", + "format": "uri" + }, + "email": { + "type": "string", + "description": "The email address of the contact person/organization.", + "format": "email" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.0.0/specificationExtension.json" + } + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.0.0/contact.json" +} \ No newline at end of file diff --git a/definitions/2.0.0/correlationId.json b/definitions/2.0.0/correlationId.json new file mode 100644 index 00000000..acd5df90 --- /dev/null +++ b/definitions/2.0.0/correlationId.json @@ -0,0 +1,25 @@ +{ + "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]))*)*" + } + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.0.0/correlationId.json" +} \ No newline at end of file diff --git a/definitions/2.0.0/externalDocs.json b/definitions/2.0.0/externalDocs.json new file mode 100644 index 00000000..6896803b --- /dev/null +++ b/definitions/2.0.0/externalDocs.json @@ -0,0 +1,24 @@ +{ + "type": "object", + "additionalProperties": false, + "description": "information about external documentation", + "required": [ + "url" + ], + "properties": { + "description": { + "type": "string" + }, + "url": { + "type": "string", + "format": "uri" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.0.0/specificationExtension.json" + } + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.0.0/externalDocs.json" +} \ No newline at end of file diff --git a/definitions/2.0.0/info.json b/definitions/2.0.0/info.json new file mode 100644 index 00000000..1efd672d --- /dev/null +++ b/definitions/2.0.0/info.json @@ -0,0 +1,41 @@ +{ + "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" + } + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.0.0/info.json" +} \ No newline at end of file diff --git a/definitions/2.0.0/license.json b/definitions/2.0.0/license.json new file mode 100644 index 00000000..9df7d01c --- /dev/null +++ b/definitions/2.0.0/license.json @@ -0,0 +1,25 @@ +{ + "type": "object", + "required": [ + "name" + ], + "additionalProperties": false, + "properties": { + "name": { + "type": "string", + "description": "The name of the license type. It's encouraged to use an OSI compatible license." + }, + "url": { + "type": "string", + "description": "The URL pointing to the license.", + "format": "uri" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.0.0/specificationExtension.json" + } + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.0.0/license.json" +} \ No newline at end of file diff --git a/definitions/2.0.0/message.json b/definitions/2.0.0/message.json new file mode 100644 index 00000000..2d5490f8 --- /dev/null +++ b/definitions/2.0.0/message.json @@ -0,0 +1,148 @@ +{ + "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" + }, + { + "type": "array", + "items": [ + { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.0.0/messageTrait.json" + } + ] + }, + { + "type": "object", + "additionalItems": true + } + ] + } + ] + } + } + } + } + ] + } + ], + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.0.0/message.json" +} \ No newline at end of file diff --git a/definitions/2.0.0/messageTrait.json b/definitions/2.0.0/messageTrait.json new file mode 100644 index 00000000..0b25775e --- /dev/null +++ b/definitions/2.0.0/messageTrait.json @@ -0,0 +1,78 @@ +{ + "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": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.0.0/schema.json" + } + ] + }, + "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" + } + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.0.0/messageTrait.json" +} \ No newline at end of file diff --git a/definitions/2.0.0/messages.json b/definitions/2.0.0/messages.json new file mode 100644 index 00000000..99222635 --- /dev/null +++ b/definitions/2.0.0/messages.json @@ -0,0 +1,9 @@ +{ + "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.", + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.0.0/messages.json" +} \ No newline at end of file diff --git a/definitions/2.0.0/oauth2Flow.json b/definitions/2.0.0/oauth2Flow.json new file mode 100644 index 00000000..844067ce --- /dev/null +++ b/definitions/2.0.0/oauth2Flow.json @@ -0,0 +1,28 @@ +{ + "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, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.0.0/oauth2Flow.json" +} \ No newline at end of file diff --git a/definitions/2.0.0/oauth2Flows.json b/definitions/2.0.0/oauth2Flows.json new file mode 100644 index 00000000..946a0215 --- /dev/null +++ b/definitions/2.0.0/oauth2Flows.json @@ -0,0 +1,105 @@ +{ + "type": "object", + "required": [ + "type", + "flows" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "oauth2" + ] + }, + "description": { + "type": "string" + }, + "flows": { + "type": "object", + "properties": { + "implicit": { + "allOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.0.0/oauth2Flow.json" + }, + { + "required": [ + "authorizationUrl", + "scopes" + ] + }, + { + "not": { + "required": [ + "tokenUrl" + ] + } + } + ] + }, + "password": { + "allOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.0.0/oauth2Flow.json" + }, + { + "required": [ + "tokenUrl", + "scopes" + ] + }, + { + "not": { + "required": [ + "authorizationUrl" + ] + } + } + ] + }, + "clientCredentials": { + "allOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.0.0/oauth2Flow.json" + }, + { + "required": [ + "tokenUrl", + "scopes" + ] + }, + { + "not": { + "required": [ + "authorizationUrl" + ] + } + } + ] + }, + "authorizationCode": { + "allOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.0.0/oauth2Flow.json" + }, + { + "required": [ + "authorizationUrl", + "tokenUrl", + "scopes" + ] + } + ] + } + }, + "additionalProperties": false + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.0.0/specificationExtension.json" + } + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.0.0/oauth2Flows.json" +} \ No newline at end of file diff --git a/definitions/2.0.0/oauth2Scopes.json b/definitions/2.0.0/oauth2Scopes.json new file mode 100644 index 00000000..a8f50095 --- /dev/null +++ b/definitions/2.0.0/oauth2Scopes.json @@ -0,0 +1,8 @@ +{ + "type": "object", + "additionalProperties": { + "type": "string" + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.0.0/oauth2Scopes.json" +} \ No newline at end of file diff --git a/definitions/2.0.0/openIdConnect.json b/definitions/2.0.0/openIdConnect.json new file mode 100644 index 00000000..b584746d --- /dev/null +++ b/definitions/2.0.0/openIdConnect.json @@ -0,0 +1,30 @@ +{ + "type": "object", + "required": [ + "type", + "openIdConnectUrl" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "openIdConnect" + ] + }, + "description": { + "type": "string" + }, + "openIdConnectUrl": { + "type": "string", + "format": "uri" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.0.0/specificationExtension.json" + } + }, + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.0.0/openIdConnect.json" +} \ No newline at end of file diff --git a/definitions/2.0.0/operation.json b/definitions/2.0.0/operation.json new file mode 100644 index 00000000..ce6fc7b5 --- /dev/null +++ b/definitions/2.0.0/operation.json @@ -0,0 +1,70 @@ +{ + "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" + }, + { + "type": "array", + "items": [ + { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.0.0/operationTrait.json" + } + ] + }, + { + "type": "object", + "additionalItems": true + } + ] + } + ] + } + }, + "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" + }, + "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" + } + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.0.0/operation.json" +} \ No newline at end of file diff --git a/definitions/2.0.0/operationTrait.json b/definitions/2.0.0/operationTrait.json new file mode 100644 index 00000000..445019c4 --- /dev/null +++ b/definitions/2.0.0/operationTrait.json @@ -0,0 +1,35 @@ +{ + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.0.0/specificationExtension.json" + } + }, + "properties": { + "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" + }, + "operationId": { + "type": "string" + }, + "bindings": { + "$ref": "http://asyncapi.com/definitions/2.0.0/bindingsObject.json" + } + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.0.0/operationTrait.json" +} \ No newline at end of file diff --git a/definitions/2.0.0/parameter.json b/definitions/2.0.0/parameter.json new file mode 100644 index 00000000..07520986 --- /dev/null +++ b/definitions/2.0.0/parameter.json @@ -0,0 +1,27 @@ +{ + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.0.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." + }, + "schema": { + "$ref": "http://asyncapi.com/definitions/2.0.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.0.0/ReferenceObject.json" + } + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.0.0/parameter.json" +} \ No newline at end of file diff --git a/definitions/2.0.0/parameters.json b/definitions/2.0.0/parameters.json new file mode 100644 index 00000000..db548f03 --- /dev/null +++ b/definitions/2.0.0/parameters.json @@ -0,0 +1,9 @@ +{ + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/2.0.0/parameter.json" + }, + "description": "JSON objects describing re-usable channel parameters.", + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.0.0/parameters.json" +} \ No newline at end of file diff --git a/definitions/2.0.0/schema.json b/definitions/2.0.0/schema.json new file mode 100644 index 00000000..e1eb3742 --- /dev/null +++ b/definitions/2.0.0/schema.json @@ -0,0 +1,98 @@ +{ + "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 + } + } + } + ], + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.0.0/schema.json" +} \ No newline at end of file diff --git a/definitions/2.0.0/schemas.json b/definitions/2.0.0/schemas.json new file mode 100644 index 00000000..294698e3 --- /dev/null +++ b/definitions/2.0.0/schemas.json @@ -0,0 +1,9 @@ +{ + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/2.0.0/schema.json" + }, + "description": "JSON objects describing schemas the API uses.", + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.0.0/schemas.json" +} \ No newline at end of file diff --git a/definitions/2.0.0/server.json b/definitions/2.0.0/server.json new file mode 100644 index 00000000..a867aed3 --- /dev/null +++ b/definitions/2.0.0/server.json @@ -0,0 +1,43 @@ +{ + "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/specificationExtension.json" + } + }, + "properties": { + "url": { + "type": "string" + }, + "description": { + "type": "string" + }, + "protocol": { + "type": "string", + "description": "The transfer protocol." + }, + "protocolVersion": { + "type": "string" + }, + "variables": { + "$ref": "http://asyncapi.com/definitions/2.0.0/serverVariables.json" + }, + "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" + } + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.0.0/server.json" +} \ No newline at end of file diff --git a/definitions/2.0.0/serverVariable.json b/definitions/2.0.0/serverVariable.json new file mode 100644 index 00000000..63ca2194 --- /dev/null +++ b/definitions/2.0.0/serverVariable.json @@ -0,0 +1,33 @@ +{ + "type": "object", + "description": "An object representing a Server Variable for server URL template substitution.", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.0.0/specificationExtension.json" + } + }, + "properties": { + "enum": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + }, + "default": { + "type": "string" + }, + "description": { + "type": "string" + }, + "examples": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.0.0/serverVariable.json" +} \ No newline at end of file diff --git a/definitions/2.0.0/serverVariables.json b/definitions/2.0.0/serverVariables.json new file mode 100644 index 00000000..e4c70e8a --- /dev/null +++ b/definitions/2.0.0/serverVariables.json @@ -0,0 +1,8 @@ +{ + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/2.0.0/serverVariable.json" + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.0.0/serverVariables.json" +} \ No newline at end of file diff --git a/definitions/2.0.0/specificationExtension.json b/definitions/2.0.0/specificationExtension.json new file mode 100644 index 00000000..108e1fdd --- /dev/null +++ b/definitions/2.0.0/specificationExtension.json @@ -0,0 +1,7 @@ +{ + "description": "Any property starting with x- is valid.", + "additionalProperties": true, + "additionalItems": true, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.0.0/specificationExtension.json" +} \ No newline at end of file diff --git a/definitions/2.0.0/symmetricEncryption.json b/definitions/2.0.0/symmetricEncryption.json new file mode 100644 index 00000000..da01f1b8 --- /dev/null +++ b/definitions/2.0.0/symmetricEncryption.json @@ -0,0 +1,25 @@ +{ + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "symmetricEncryption" + ] + }, + "description": { + "type": "string" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.0.0/specificationExtension.json" + } + }, + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.0.0/symmetricEncryption.json" +} \ No newline at end of file diff --git a/definitions/2.0.0/tag.json b/definitions/2.0.0/tag.json new file mode 100644 index 00000000..fc00fdfb --- /dev/null +++ b/definitions/2.0.0/tag.json @@ -0,0 +1,25 @@ +{ + "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" + } + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.0.0/tag.json" +} \ No newline at end of file diff --git a/definitions/2.0.0/userPassword.json b/definitions/2.0.0/userPassword.json new file mode 100644 index 00000000..03b7c152 --- /dev/null +++ b/definitions/2.0.0/userPassword.json @@ -0,0 +1,25 @@ +{ + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "userPassword" + ] + }, + "description": { + "type": "string" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.0.0/specificationExtension.json" + } + }, + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.0.0/userPassword.json" +} \ No newline at end of file diff --git a/definitions/2.1.0/APIKeyHTTPSecurityScheme.json b/definitions/2.1.0/APIKeyHTTPSecurityScheme.json new file mode 100644 index 00000000..30835d3c --- /dev/null +++ b/definitions/2.1.0/APIKeyHTTPSecurityScheme.json @@ -0,0 +1,38 @@ +{ + "type": "object", + "required": [ + "type", + "name", + "in" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "httpApiKey" + ] + }, + "name": { + "type": "string" + }, + "in": { + "type": "string", + "enum": [ + "header", + "query", + "cookie" + ] + }, + "description": { + "type": "string" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.1.0/specificationExtension.json" + } + }, + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.1.0/APIKeyHTTPSecurityScheme.json" +} \ No newline at end of file diff --git a/definitions/2.1.0/BearerHTTPSecurityScheme.json b/definitions/2.1.0/BearerHTTPSecurityScheme.json new file mode 100644 index 00000000..42a802ee --- /dev/null +++ b/definitions/2.1.0/BearerHTTPSecurityScheme.json @@ -0,0 +1,35 @@ +{ + "type": "object", + "required": [ + "type", + "scheme" + ], + "properties": { + "scheme": { + "type": "string", + "enum": [ + "bearer" + ] + }, + "bearerFormat": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "http" + ] + }, + "description": { + "type": "string" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.1.0/specificationExtension.json" + } + }, + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.1.0/BearerHTTPSecurityScheme.json" +} \ No newline at end of file diff --git a/definitions/2.1.0/HTTPSecurityScheme.json b/definitions/2.1.0/HTTPSecurityScheme.json new file mode 100644 index 00000000..75016117 --- /dev/null +++ b/definitions/2.1.0/HTTPSecurityScheme.json @@ -0,0 +1,15 @@ +{ + "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" + } + ], + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.1.0/HTTPSecurityScheme.json" +} \ No newline at end of file diff --git a/definitions/2.1.0/NonBearerHTTPSecurityScheme.json b/definitions/2.1.0/NonBearerHTTPSecurityScheme.json new file mode 100644 index 00000000..99ebd105 --- /dev/null +++ b/definitions/2.1.0/NonBearerHTTPSecurityScheme.json @@ -0,0 +1,40 @@ +{ + "not": { + "type": "object", + "properties": { + "scheme": { + "type": "string", + "enum": [ + "bearer" + ] + } + } + }, + "type": "object", + "required": [ + "scheme", + "type" + ], + "properties": { + "scheme": { + "type": "string" + }, + "description": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "http" + ] + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.1.0/specificationExtension.json" + } + }, + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.1.0/NonBearerHTTPSecurityScheme.json" +} \ No newline at end of file diff --git a/definitions/2.1.0/Reference.json b/definitions/2.1.0/Reference.json new file mode 100644 index 00000000..b35a1343 --- /dev/null +++ b/definitions/2.1.0/Reference.json @@ -0,0 +1,13 @@ +{ + "type": "object", + "required": [ + "$ref" + ], + "properties": { + "$ref": { + "$ref": "http://asyncapi.com/definitions/2.1.0/ReferenceObject.json" + } + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.1.0/Reference.json" +} \ No newline at end of file diff --git a/definitions/2.1.0/ReferenceObject.json b/definitions/2.1.0/ReferenceObject.json new file mode 100644 index 00000000..7f7e8c7b --- /dev/null +++ b/definitions/2.1.0/ReferenceObject.json @@ -0,0 +1,6 @@ +{ + "type": "string", + "format": "uri-reference", + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.1.0/ReferenceObject.json" +} \ No newline at end of file diff --git a/definitions/2.1.0/SaslGssapiSecurityScheme.json b/definitions/2.1.0/SaslGssapiSecurityScheme.json new file mode 100644 index 00000000..9ff04e0f --- /dev/null +++ b/definitions/2.1.0/SaslGssapiSecurityScheme.json @@ -0,0 +1,25 @@ +{ + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "gssapi" + ] + }, + "description": { + "type": "string" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.1.0/specificationExtension.json" + } + }, + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.1.0/SaslGssapiSecurityScheme.json" +} \ No newline at end of file diff --git a/definitions/2.1.0/SaslPlainSecurityScheme.json b/definitions/2.1.0/SaslPlainSecurityScheme.json new file mode 100644 index 00000000..95425d1e --- /dev/null +++ b/definitions/2.1.0/SaslPlainSecurityScheme.json @@ -0,0 +1,25 @@ +{ + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "plain" + ] + }, + "description": { + "type": "string" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.1.0/specificationExtension.json" + } + }, + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.1.0/SaslPlainSecurityScheme.json" +} \ No newline at end of file diff --git a/definitions/2.1.0/SaslScramSecurityScheme.json b/definitions/2.1.0/SaslScramSecurityScheme.json new file mode 100644 index 00000000..c0c2c745 --- /dev/null +++ b/definitions/2.1.0/SaslScramSecurityScheme.json @@ -0,0 +1,26 @@ +{ + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "scramSha256", + "scramSha512" + ] + }, + "description": { + "type": "string" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.1.0/specificationExtension.json" + } + }, + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.1.0/SaslScramSecurityScheme.json" +} \ No newline at end of file diff --git a/definitions/2.1.0/SaslSecurityScheme.json b/definitions/2.1.0/SaslSecurityScheme.json new file mode 100644 index 00000000..f2e86222 --- /dev/null +++ b/definitions/2.1.0/SaslSecurityScheme.json @@ -0,0 +1,15 @@ +{ + "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" + } + ], + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.1.0/SaslSecurityScheme.json" +} \ No newline at end of file diff --git a/definitions/2.1.0/SecurityRequirement.json b/definitions/2.1.0/SecurityRequirement.json new file mode 100644 index 00000000..c2666865 --- /dev/null +++ b/definitions/2.1.0/SecurityRequirement.json @@ -0,0 +1,12 @@ +{ + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.1.0/SecurityRequirement.json" +} \ No newline at end of file diff --git a/definitions/2.1.0/SecurityScheme.json b/definitions/2.1.0/SecurityScheme.json new file mode 100644 index 00000000..3fc7c05f --- /dev/null +++ b/definitions/2.1.0/SecurityScheme.json @@ -0,0 +1,33 @@ +{ + "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" + } + ], + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.1.0/SecurityScheme.json" +} \ No newline at end of file diff --git a/definitions/2.1.0/X509.json b/definitions/2.1.0/X509.json new file mode 100644 index 00000000..2e2cdcc5 --- /dev/null +++ b/definitions/2.1.0/X509.json @@ -0,0 +1,25 @@ +{ + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "X509" + ] + }, + "description": { + "type": "string" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.1.0/specificationExtension.json" + } + }, + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.1.0/X509.json" +} \ No newline at end of file diff --git a/definitions/2.1.0/apiKey.json b/definitions/2.1.0/apiKey.json new file mode 100644 index 00000000..de4128db --- /dev/null +++ b/definitions/2.1.0/apiKey.json @@ -0,0 +1,33 @@ +{ + "type": "object", + "required": [ + "type", + "in" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "apiKey" + ] + }, + "in": { + "type": "string", + "enum": [ + "user", + "password" + ] + }, + "description": { + "type": "string" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.1.0/specificationExtension.json" + } + }, + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.1.0/apiKey.json" +} \ No newline at end of file diff --git a/definitions/2.1.0/asymmetricEncryption.json b/definitions/2.1.0/asymmetricEncryption.json new file mode 100644 index 00000000..1af3f377 --- /dev/null +++ b/definitions/2.1.0/asymmetricEncryption.json @@ -0,0 +1,25 @@ +{ + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "asymmetricEncryption" + ] + }, + "description": { + "type": "string" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.1.0/specificationExtension.json" + } + }, + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.1.0/asymmetricEncryption.json" +} \ No newline at end of file diff --git a/definitions/2.1.0/asyncapi.json b/definitions/2.1.0/asyncapi.json new file mode 100644 index 00000000..98b66931 --- /dev/null +++ b/definitions/2.1.0/asyncapi.json @@ -0,0 +1,59 @@ +{ + "title": "AsyncAPI 2.1.0 schema.", + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.1.0/asyncapi.json", + "type": "object", + "required": [ + "asyncapi", + "info", + "channels" + ], + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.1.0/specificationExtension.json" + } + }, + "properties": { + "asyncapi": { + "type": "string", + "enum": [ + "2.1.0" + ], + "description": "The AsyncAPI specification version of this document." + }, + "id": { + "type": "string", + "description": "A unique id representing the application.", + "format": "uri" + }, + "info": { + "$ref": "http://asyncapi.com/definitions/2.1.0/info.json" + }, + "servers": { + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/2.1.0/server.json" + } + }, + "defaultContentType": { + "type": "string" + }, + "channels": { + "$ref": "http://asyncapi.com/definitions/2.1.0/channels.json" + }, + "components": { + "$ref": "http://asyncapi.com/definitions/2.1.0/components.json" + }, + "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" + } + } +} diff --git a/definitions/2.1.0/bindingsObject.json b/definitions/2.1.0/bindingsObject.json new file mode 100644 index 00000000..62a80754 --- /dev/null +++ b/definitions/2.1.0/bindingsObject.json @@ -0,0 +1,22 @@ +{ + "type": "object", + "additionalProperties": true, + "properties": { + "http": {}, + "ws": {}, + "amqp": {}, + "amqp1": {}, + "mqtt": {}, + "mqtt5": {}, + "kafka": {}, + "nats": {}, + "jms": {}, + "sns": {}, + "sqs": {}, + "stomp": {}, + "redis": {}, + "ibmmq": {} + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.1.0/bindingsObject.json" +} \ No newline at end of file diff --git a/definitions/2.1.0/channelItem.json b/definitions/2.1.0/channelItem.json new file mode 100644 index 00000000..241142c6 --- /dev/null +++ b/definitions/2.1.0/channelItem.json @@ -0,0 +1,39 @@ +{ + "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": { + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/2.1.0/parameter.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" + } + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.1.0/channelItem.json" +} \ No newline at end of file diff --git a/definitions/2.1.0/channels.json b/definitions/2.1.0/channels.json new file mode 100644 index 00000000..4f9d4c29 --- /dev/null +++ b/definitions/2.1.0/channels.json @@ -0,0 +1,13 @@ +{ + "type": "object", + "propertyNames": { + "type": "string", + "format": "uri-template", + "minLength": 1 + }, + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/2.1.0/channelItem.json" + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.1.0/channels.json" +} \ No newline at end of file diff --git a/definitions/2.1.0/components.json b/definitions/2.1.0/components.json new file mode 100644 index 00000000..aa31f7bb --- /dev/null +++ b/definitions/2.1.0/components.json @@ -0,0 +1,89 @@ +{ + "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" + } + } + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.1.0/components.json" +} \ No newline at end of file diff --git a/definitions/2.1.0/contact.json b/definitions/2.1.0/contact.json new file mode 100644 index 00000000..18a01563 --- /dev/null +++ b/definitions/2.1.0/contact.json @@ -0,0 +1,28 @@ +{ + "type": "object", + "description": "Contact information for the owners of the API.", + "additionalProperties": false, + "properties": { + "name": { + "type": "string", + "description": "The identifying name of the contact person/organization." + }, + "url": { + "type": "string", + "description": "The URL pointing to the contact information.", + "format": "uri" + }, + "email": { + "type": "string", + "description": "The email address of the contact person/organization.", + "format": "email" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.1.0/specificationExtension.json" + } + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.1.0/contact.json" +} \ No newline at end of file diff --git a/definitions/2.1.0/correlationId.json b/definitions/2.1.0/correlationId.json new file mode 100644 index 00000000..7ce1b11a --- /dev/null +++ b/definitions/2.1.0/correlationId.json @@ -0,0 +1,25 @@ +{ + "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]))*)*" + } + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.1.0/correlationId.json" +} \ No newline at end of file diff --git a/definitions/2.1.0/externalDocs.json b/definitions/2.1.0/externalDocs.json new file mode 100644 index 00000000..0e4199fe --- /dev/null +++ b/definitions/2.1.0/externalDocs.json @@ -0,0 +1,24 @@ +{ + "type": "object", + "additionalProperties": false, + "description": "information about external documentation", + "required": [ + "url" + ], + "properties": { + "description": { + "type": "string" + }, + "url": { + "type": "string", + "format": "uri" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.1.0/specificationExtension.json" + } + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.1.0/externalDocs.json" +} \ No newline at end of file diff --git a/definitions/2.1.0/info.json b/definitions/2.1.0/info.json new file mode 100644 index 00000000..becac9ac --- /dev/null +++ b/definitions/2.1.0/info.json @@ -0,0 +1,41 @@ +{ + "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" + } + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.1.0/info.json" +} \ No newline at end of file diff --git a/definitions/2.1.0/license.json b/definitions/2.1.0/license.json new file mode 100644 index 00000000..4bed4d19 --- /dev/null +++ b/definitions/2.1.0/license.json @@ -0,0 +1,25 @@ +{ + "type": "object", + "required": [ + "name" + ], + "additionalProperties": false, + "properties": { + "name": { + "type": "string", + "description": "The name of the license type. It's encouraged to use an OSI compatible license." + }, + "url": { + "type": "string", + "description": "The URL pointing to the license.", + "format": "uri" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.1.0/specificationExtension.json" + } + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.1.0/license.json" +} \ No newline at end of file diff --git a/definitions/2.1.0/message.json b/definitions/2.1.0/message.json new file mode 100644 index 00000000..3b554f66 --- /dev/null +++ b/definitions/2.1.0/message.json @@ -0,0 +1,168 @@ +{ + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.1.0/Reference.json" + }, + { + "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" + }, + { + "type": "array", + "items": [ + { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.1.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.1.0/messageTrait.json" + } + ] + }, + { + "type": "object", + "additionalItems": true + } + ] + } + ] + } + } + } + } + ] + } + ], + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.1.0/message.json" +} \ No newline at end of file diff --git a/definitions/2.1.0/messageTrait.json b/definitions/2.1.0/messageTrait.json new file mode 100644 index 00000000..4fb314e7 --- /dev/null +++ b/definitions/2.1.0/messageTrait.json @@ -0,0 +1,105 @@ +{ + "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": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.1.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.1.0/schema.json" + } + ] + }, + "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" + } + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.1.0/messageTrait.json" +} \ No newline at end of file diff --git a/definitions/2.1.0/messages.json b/definitions/2.1.0/messages.json new file mode 100644 index 00000000..223eca4b --- /dev/null +++ b/definitions/2.1.0/messages.json @@ -0,0 +1,9 @@ +{ + "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.", + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.1.0/messages.json" +} \ No newline at end of file diff --git a/definitions/2.1.0/oauth2Flow.json b/definitions/2.1.0/oauth2Flow.json new file mode 100644 index 00000000..71c32cfd --- /dev/null +++ b/definitions/2.1.0/oauth2Flow.json @@ -0,0 +1,28 @@ +{ + "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, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.1.0/oauth2Flow.json" +} \ No newline at end of file diff --git a/definitions/2.1.0/oauth2Flows.json b/definitions/2.1.0/oauth2Flows.json new file mode 100644 index 00000000..56cea128 --- /dev/null +++ b/definitions/2.1.0/oauth2Flows.json @@ -0,0 +1,105 @@ +{ + "type": "object", + "required": [ + "type", + "flows" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "oauth2" + ] + }, + "description": { + "type": "string" + }, + "flows": { + "type": "object", + "properties": { + "implicit": { + "allOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.1.0/oauth2Flow.json" + }, + { + "required": [ + "authorizationUrl", + "scopes" + ] + }, + { + "not": { + "required": [ + "tokenUrl" + ] + } + } + ] + }, + "password": { + "allOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.1.0/oauth2Flow.json" + }, + { + "required": [ + "tokenUrl", + "scopes" + ] + }, + { + "not": { + "required": [ + "authorizationUrl" + ] + } + } + ] + }, + "clientCredentials": { + "allOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.1.0/oauth2Flow.json" + }, + { + "required": [ + "tokenUrl", + "scopes" + ] + }, + { + "not": { + "required": [ + "authorizationUrl" + ] + } + } + ] + }, + "authorizationCode": { + "allOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.1.0/oauth2Flow.json" + }, + { + "required": [ + "authorizationUrl", + "tokenUrl", + "scopes" + ] + } + ] + } + }, + "additionalProperties": false + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.1.0/specificationExtension.json" + } + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.1.0/oauth2Flows.json" +} \ No newline at end of file diff --git a/definitions/2.1.0/oauth2Scopes.json b/definitions/2.1.0/oauth2Scopes.json new file mode 100644 index 00000000..da8e6e18 --- /dev/null +++ b/definitions/2.1.0/oauth2Scopes.json @@ -0,0 +1,8 @@ +{ + "type": "object", + "additionalProperties": { + "type": "string" + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.1.0/oauth2Scopes.json" +} \ No newline at end of file diff --git a/definitions/2.1.0/openIdConnect.json b/definitions/2.1.0/openIdConnect.json new file mode 100644 index 00000000..623bb8f0 --- /dev/null +++ b/definitions/2.1.0/openIdConnect.json @@ -0,0 +1,30 @@ +{ + "type": "object", + "required": [ + "type", + "openIdConnectUrl" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "openIdConnect" + ] + }, + "description": { + "type": "string" + }, + "openIdConnectUrl": { + "type": "string", + "format": "uri" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.1.0/specificationExtension.json" + } + }, + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.1.0/openIdConnect.json" +} \ No newline at end of file diff --git a/definitions/2.1.0/operation.json b/definitions/2.1.0/operation.json new file mode 100644 index 00000000..a5e0f15b --- /dev/null +++ b/definitions/2.1.0/operation.json @@ -0,0 +1,70 @@ +{ + "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" + }, + { + "type": "array", + "items": [ + { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.1.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.1.0/operationTrait.json" + } + ] + }, + { + "type": "object", + "additionalItems": true + } + ] + } + ] + } + }, + "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" + }, + "operationId": { + "type": "string" + }, + "bindings": { + "$ref": "http://asyncapi.com/definitions/2.1.0/bindingsObject.json" + }, + "message": { + "$ref": "http://asyncapi.com/definitions/2.1.0/message.json" + } + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.1.0/operation.json" +} \ No newline at end of file diff --git a/definitions/2.1.0/operationTrait.json b/definitions/2.1.0/operationTrait.json new file mode 100644 index 00000000..76d50e50 --- /dev/null +++ b/definitions/2.1.0/operationTrait.json @@ -0,0 +1,35 @@ +{ + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.1.0/specificationExtension.json" + } + }, + "properties": { + "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" + }, + "operationId": { + "type": "string" + }, + "bindings": { + "$ref": "http://asyncapi.com/definitions/2.1.0/bindingsObject.json" + } + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.1.0/operationTrait.json" +} \ No newline at end of file diff --git a/definitions/2.1.0/parameter.json b/definitions/2.1.0/parameter.json new file mode 100644 index 00000000..959c1873 --- /dev/null +++ b/definitions/2.1.0/parameter.json @@ -0,0 +1,27 @@ +{ + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.1.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." + }, + "schema": { + "$ref": "http://asyncapi.com/definitions/2.1.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.1.0/ReferenceObject.json" + } + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.1.0/parameter.json" +} \ No newline at end of file diff --git a/definitions/2.1.0/parameters.json b/definitions/2.1.0/parameters.json new file mode 100644 index 00000000..37bd933d --- /dev/null +++ b/definitions/2.1.0/parameters.json @@ -0,0 +1,9 @@ +{ + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/2.1.0/parameter.json" + }, + "description": "JSON objects describing re-usable channel parameters.", + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.1.0/parameters.json" +} \ No newline at end of file diff --git a/definitions/2.1.0/schema.json b/definitions/2.1.0/schema.json new file mode 100644 index 00000000..7806d896 --- /dev/null +++ b/definitions/2.1.0/schema.json @@ -0,0 +1,98 @@ +{ + "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 + } + } + } + ], + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.1.0/schema.json" +} \ No newline at end of file diff --git a/definitions/2.1.0/schemas.json b/definitions/2.1.0/schemas.json new file mode 100644 index 00000000..0ad04b96 --- /dev/null +++ b/definitions/2.1.0/schemas.json @@ -0,0 +1,9 @@ +{ + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/2.1.0/schema.json" + }, + "description": "JSON objects describing schemas the API uses.", + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.1.0/schemas.json" +} \ No newline at end of file diff --git a/definitions/2.1.0/server.json b/definitions/2.1.0/server.json new file mode 100644 index 00000000..d9375030 --- /dev/null +++ b/definitions/2.1.0/server.json @@ -0,0 +1,43 @@ +{ + "type": "object", + "description": "An object representing a Server.", + "required": [ + "url", + "protocol" + ], + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.1.0/specificationExtension.json" + } + }, + "properties": { + "url": { + "type": "string" + }, + "description": { + "type": "string" + }, + "protocol": { + "type": "string", + "description": "The transfer protocol." + }, + "protocolVersion": { + "type": "string" + }, + "variables": { + "$ref": "http://asyncapi.com/definitions/2.1.0/serverVariables.json" + }, + "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" + } + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.1.0/server.json" +} \ No newline at end of file diff --git a/definitions/2.1.0/serverVariable.json b/definitions/2.1.0/serverVariable.json new file mode 100644 index 00000000..c1832de1 --- /dev/null +++ b/definitions/2.1.0/serverVariable.json @@ -0,0 +1,33 @@ +{ + "type": "object", + "description": "An object representing a Server Variable for server URL template substitution.", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.1.0/specificationExtension.json" + } + }, + "properties": { + "enum": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + }, + "default": { + "type": "string" + }, + "description": { + "type": "string" + }, + "examples": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.1.0/serverVariable.json" +} \ No newline at end of file diff --git a/definitions/2.1.0/serverVariables.json b/definitions/2.1.0/serverVariables.json new file mode 100644 index 00000000..3f8ae5f9 --- /dev/null +++ b/definitions/2.1.0/serverVariables.json @@ -0,0 +1,8 @@ +{ + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/2.1.0/serverVariable.json" + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.1.0/serverVariables.json" +} \ No newline at end of file diff --git a/definitions/2.1.0/specificationExtension.json b/definitions/2.1.0/specificationExtension.json new file mode 100644 index 00000000..fcca86ed --- /dev/null +++ b/definitions/2.1.0/specificationExtension.json @@ -0,0 +1,7 @@ +{ + "description": "Any property starting with x- is valid.", + "additionalProperties": true, + "additionalItems": true, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.1.0/specificationExtension.json" +} \ No newline at end of file diff --git a/definitions/2.1.0/symmetricEncryption.json b/definitions/2.1.0/symmetricEncryption.json new file mode 100644 index 00000000..afc5b1a8 --- /dev/null +++ b/definitions/2.1.0/symmetricEncryption.json @@ -0,0 +1,25 @@ +{ + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "symmetricEncryption" + ] + }, + "description": { + "type": "string" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.1.0/specificationExtension.json" + } + }, + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.1.0/symmetricEncryption.json" +} \ No newline at end of file diff --git a/definitions/2.1.0/tag.json b/definitions/2.1.0/tag.json new file mode 100644 index 00000000..e75b8e7c --- /dev/null +++ b/definitions/2.1.0/tag.json @@ -0,0 +1,25 @@ +{ + "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" + } + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.1.0/tag.json" +} \ No newline at end of file diff --git a/definitions/2.1.0/userPassword.json b/definitions/2.1.0/userPassword.json new file mode 100644 index 00000000..9f7fe4c0 --- /dev/null +++ b/definitions/2.1.0/userPassword.json @@ -0,0 +1,25 @@ +{ + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "userPassword" + ] + }, + "description": { + "type": "string" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.1.0/specificationExtension.json" + } + }, + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.1.0/userPassword.json" +} \ No newline at end of file diff --git a/definitions/2.2.0/APIKeyHTTPSecurityScheme.json b/definitions/2.2.0/APIKeyHTTPSecurityScheme.json new file mode 100644 index 00000000..792ff857 --- /dev/null +++ b/definitions/2.2.0/APIKeyHTTPSecurityScheme.json @@ -0,0 +1,38 @@ +{ + "type": "object", + "required": [ + "type", + "name", + "in" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "httpApiKey" + ] + }, + "name": { + "type": "string" + }, + "in": { + "type": "string", + "enum": [ + "header", + "query", + "cookie" + ] + }, + "description": { + "type": "string" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.2.0/specificationExtension.json" + } + }, + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.2.0/APIKeyHTTPSecurityScheme.json" +} \ No newline at end of file diff --git a/definitions/2.2.0/BearerHTTPSecurityScheme.json b/definitions/2.2.0/BearerHTTPSecurityScheme.json new file mode 100644 index 00000000..ef1f487a --- /dev/null +++ b/definitions/2.2.0/BearerHTTPSecurityScheme.json @@ -0,0 +1,35 @@ +{ + "type": "object", + "required": [ + "type", + "scheme" + ], + "properties": { + "scheme": { + "type": "string", + "enum": [ + "bearer" + ] + }, + "bearerFormat": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "http" + ] + }, + "description": { + "type": "string" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.2.0/specificationExtension.json" + } + }, + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.2.0/BearerHTTPSecurityScheme.json" +} \ No newline at end of file diff --git a/definitions/2.2.0/HTTPSecurityScheme.json b/definitions/2.2.0/HTTPSecurityScheme.json new file mode 100644 index 00000000..cfe23a41 --- /dev/null +++ b/definitions/2.2.0/HTTPSecurityScheme.json @@ -0,0 +1,15 @@ +{ + "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" + } + ], + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.2.0/HTTPSecurityScheme.json" +} \ No newline at end of file diff --git a/definitions/2.2.0/NonBearerHTTPSecurityScheme.json b/definitions/2.2.0/NonBearerHTTPSecurityScheme.json new file mode 100644 index 00000000..d95ea3ac --- /dev/null +++ b/definitions/2.2.0/NonBearerHTTPSecurityScheme.json @@ -0,0 +1,40 @@ +{ + "not": { + "type": "object", + "properties": { + "scheme": { + "type": "string", + "enum": [ + "bearer" + ] + } + } + }, + "type": "object", + "required": [ + "scheme", + "type" + ], + "properties": { + "scheme": { + "type": "string" + }, + "description": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "http" + ] + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.2.0/specificationExtension.json" + } + }, + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.2.0/NonBearerHTTPSecurityScheme.json" +} \ No newline at end of file diff --git a/definitions/2.2.0/Reference.json b/definitions/2.2.0/Reference.json new file mode 100644 index 00000000..550875fc --- /dev/null +++ b/definitions/2.2.0/Reference.json @@ -0,0 +1,13 @@ +{ + "type": "object", + "required": [ + "$ref" + ], + "properties": { + "$ref": { + "$ref": "http://asyncapi.com/definitions/2.2.0/ReferenceObject.json" + } + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.2.0/Reference.json" +} \ No newline at end of file diff --git a/definitions/2.2.0/ReferenceObject.json b/definitions/2.2.0/ReferenceObject.json new file mode 100644 index 00000000..54ca2529 --- /dev/null +++ b/definitions/2.2.0/ReferenceObject.json @@ -0,0 +1,6 @@ +{ + "type": "string", + "format": "uri-reference", + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.2.0/ReferenceObject.json" +} \ No newline at end of file diff --git a/definitions/2.2.0/SaslGssapiSecurityScheme.json b/definitions/2.2.0/SaslGssapiSecurityScheme.json new file mode 100644 index 00000000..334a54a1 --- /dev/null +++ b/definitions/2.2.0/SaslGssapiSecurityScheme.json @@ -0,0 +1,25 @@ +{ + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "gssapi" + ] + }, + "description": { + "type": "string" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.2.0/specificationExtension.json" + } + }, + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.2.0/SaslGssapiSecurityScheme.json" +} \ No newline at end of file diff --git a/definitions/2.2.0/SaslPlainSecurityScheme.json b/definitions/2.2.0/SaslPlainSecurityScheme.json new file mode 100644 index 00000000..d837f4e7 --- /dev/null +++ b/definitions/2.2.0/SaslPlainSecurityScheme.json @@ -0,0 +1,25 @@ +{ + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "plain" + ] + }, + "description": { + "type": "string" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.2.0/specificationExtension.json" + } + }, + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.2.0/SaslPlainSecurityScheme.json" +} \ No newline at end of file diff --git a/definitions/2.2.0/SaslScramSecurityScheme.json b/definitions/2.2.0/SaslScramSecurityScheme.json new file mode 100644 index 00000000..e8dc5b6b --- /dev/null +++ b/definitions/2.2.0/SaslScramSecurityScheme.json @@ -0,0 +1,26 @@ +{ + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "scramSha256", + "scramSha512" + ] + }, + "description": { + "type": "string" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.2.0/specificationExtension.json" + } + }, + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.2.0/SaslScramSecurityScheme.json" +} \ No newline at end of file diff --git a/definitions/2.2.0/SaslSecurityScheme.json b/definitions/2.2.0/SaslSecurityScheme.json new file mode 100644 index 00000000..839fbbab --- /dev/null +++ b/definitions/2.2.0/SaslSecurityScheme.json @@ -0,0 +1,15 @@ +{ + "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" + } + ], + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.2.0/SaslSecurityScheme.json" +} \ No newline at end of file diff --git a/definitions/2.2.0/SecurityRequirement.json b/definitions/2.2.0/SecurityRequirement.json new file mode 100644 index 00000000..84f0db91 --- /dev/null +++ b/definitions/2.2.0/SecurityRequirement.json @@ -0,0 +1,12 @@ +{ + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.2.0/SecurityRequirement.json" +} \ No newline at end of file diff --git a/definitions/2.2.0/SecurityScheme.json b/definitions/2.2.0/SecurityScheme.json new file mode 100644 index 00000000..06be60c3 --- /dev/null +++ b/definitions/2.2.0/SecurityScheme.json @@ -0,0 +1,33 @@ +{ + "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" + } + ], + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.2.0/SecurityScheme.json" +} \ No newline at end of file diff --git a/definitions/2.2.0/X509.json b/definitions/2.2.0/X509.json new file mode 100644 index 00000000..73c7ed3d --- /dev/null +++ b/definitions/2.2.0/X509.json @@ -0,0 +1,25 @@ +{ + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "X509" + ] + }, + "description": { + "type": "string" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.2.0/specificationExtension.json" + } + }, + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.2.0/X509.json" +} \ No newline at end of file diff --git a/definitions/2.2.0/apiKey.json b/definitions/2.2.0/apiKey.json new file mode 100644 index 00000000..27c32570 --- /dev/null +++ b/definitions/2.2.0/apiKey.json @@ -0,0 +1,33 @@ +{ + "type": "object", + "required": [ + "type", + "in" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "apiKey" + ] + }, + "in": { + "type": "string", + "enum": [ + "user", + "password" + ] + }, + "description": { + "type": "string" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.2.0/specificationExtension.json" + } + }, + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.2.0/apiKey.json" +} \ No newline at end of file diff --git a/definitions/2.2.0/asymmetricEncryption.json b/definitions/2.2.0/asymmetricEncryption.json new file mode 100644 index 00000000..c00df8bc --- /dev/null +++ b/definitions/2.2.0/asymmetricEncryption.json @@ -0,0 +1,25 @@ +{ + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "asymmetricEncryption" + ] + }, + "description": { + "type": "string" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.2.0/specificationExtension.json" + } + }, + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.2.0/asymmetricEncryption.json" +} \ No newline at end of file diff --git a/definitions/2.2.0/asyncapi.json b/definitions/2.2.0/asyncapi.json new file mode 100644 index 00000000..827f14ec --- /dev/null +++ b/definitions/2.2.0/asyncapi.json @@ -0,0 +1,59 @@ +{ + "title": "AsyncAPI 2.2.0 schema.", + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.2.0/asyncapi.json", + "type": "object", + "required": [ + "asyncapi", + "info", + "channels" + ], + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.2.0/specificationExtension.json" + } + }, + "properties": { + "asyncapi": { + "type": "string", + "enum": [ + "2.2.0" + ], + "description": "The AsyncAPI specification version of this document." + }, + "id": { + "type": "string", + "description": "A unique id representing the application.", + "format": "uri" + }, + "info": { + "$ref": "http://asyncapi.com/definitions/2.2.0/info.json" + }, + "servers": { + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/2.2.0/server.json" + } + }, + "defaultContentType": { + "type": "string" + }, + "channels": { + "$ref": "http://asyncapi.com/definitions/2.2.0/channels.json" + }, + "components": { + "$ref": "http://asyncapi.com/definitions/2.2.0/components.json" + }, + "tags": { + "type": "array", + "items": { + "$ref": "http://asyncapi.com/definitions/2.2.0/tag.json" + }, + "uniqueItems": true + }, + "externalDocs": { + "$ref": "http://asyncapi.com/definitions/2.2.0/externalDocs.json" + } + } +} \ No newline at end of file diff --git a/definitions/2.2.0/bindingsObject.json b/definitions/2.2.0/bindingsObject.json new file mode 100644 index 00000000..16868e37 --- /dev/null +++ b/definitions/2.2.0/bindingsObject.json @@ -0,0 +1,23 @@ +{ + "type": "object", + "additionalProperties": true, + "properties": { + "http": {}, + "ws": {}, + "amqp": {}, + "amqp1": {}, + "mqtt": {}, + "mqtt5": {}, + "kafka": {}, + "anypointmq": {}, + "nats": {}, + "jms": {}, + "sns": {}, + "sqs": {}, + "stomp": {}, + "redis": {}, + "ibmmq": {} + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.2.0/bindingsObject.json" +} \ No newline at end of file diff --git a/definitions/2.2.0/channelItem.json b/definitions/2.2.0/channelItem.json new file mode 100644 index 00000000..1a42bf78 --- /dev/null +++ b/definitions/2.2.0/channelItem.json @@ -0,0 +1,47 @@ +{ + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.2.0/specificationExtension.json" + } + }, + "properties": { + "$ref": { + "$ref": "http://asyncapi.com/definitions/2.2.0/ReferenceObject.json" + }, + "parameters": { + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/2.2.0/parameter.json" + } + }, + "description": { + "type": "string", + "description": "A description of the channel." + }, + "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 + }, + "publish": { + "$ref": "http://asyncapi.com/definitions/2.2.0/operation.json" + }, + "subscribe": { + "$ref": "http://asyncapi.com/definitions/2.2.0/operation.json" + }, + "deprecated": { + "type": "boolean", + "default": false + }, + "bindings": { + "$ref": "http://asyncapi.com/definitions/2.2.0/bindingsObject.json" + } + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.2.0/channelItem.json" +} \ No newline at end of file diff --git a/definitions/2.2.0/channels.json b/definitions/2.2.0/channels.json new file mode 100644 index 00000000..bd2ab181 --- /dev/null +++ b/definitions/2.2.0/channels.json @@ -0,0 +1,13 @@ +{ + "type": "object", + "propertyNames": { + "type": "string", + "format": "uri-template", + "minLength": 1 + }, + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/2.2.0/channelItem.json" + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.2.0/channels.json" +} \ No newline at end of file diff --git a/definitions/2.2.0/components.json b/definitions/2.2.0/components.json new file mode 100644 index 00000000..aff38c99 --- /dev/null +++ b/definitions/2.2.0/components.json @@ -0,0 +1,89 @@ +{ + "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" + } + } + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.2.0/components.json" +} \ No newline at end of file diff --git a/definitions/2.2.0/contact.json b/definitions/2.2.0/contact.json new file mode 100644 index 00000000..bded944d --- /dev/null +++ b/definitions/2.2.0/contact.json @@ -0,0 +1,28 @@ +{ + "type": "object", + "description": "Contact information for the owners of the API.", + "additionalProperties": false, + "properties": { + "name": { + "type": "string", + "description": "The identifying name of the contact person/organization." + }, + "url": { + "type": "string", + "description": "The URL pointing to the contact information.", + "format": "uri" + }, + "email": { + "type": "string", + "description": "The email address of the contact person/organization.", + "format": "email" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.2.0/specificationExtension.json" + } + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.2.0/contact.json" +} \ No newline at end of file diff --git a/definitions/2.2.0/correlationId.json b/definitions/2.2.0/correlationId.json new file mode 100644 index 00000000..50394f45 --- /dev/null +++ b/definitions/2.2.0/correlationId.json @@ -0,0 +1,25 @@ +{ + "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]))*)*" + } + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.2.0/correlationId.json" +} \ No newline at end of file diff --git a/definitions/2.2.0/external.json b/definitions/2.2.0/external.json new file mode 100644 index 00000000..127175b4 --- /dev/null +++ b/definitions/2.2.0/external.json @@ -0,0 +1,5 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.2.0/http://something.example.com/schemas/external.json", + "type": "string" + } \ No newline at end of file diff --git a/definitions/2.2.0/externalDocs.json b/definitions/2.2.0/externalDocs.json new file mode 100644 index 00000000..ab5e503e --- /dev/null +++ b/definitions/2.2.0/externalDocs.json @@ -0,0 +1,24 @@ +{ + "type": "object", + "additionalProperties": false, + "description": "information about external documentation", + "required": [ + "url" + ], + "properties": { + "description": { + "type": "string" + }, + "url": { + "type": "string", + "format": "uri" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.2.0/specificationExtension.json" + } + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.2.0/externalDocs.json" +} \ No newline at end of file diff --git a/definitions/2.2.0/info.json b/definitions/2.2.0/info.json new file mode 100644 index 00000000..49937aee --- /dev/null +++ b/definitions/2.2.0/info.json @@ -0,0 +1,41 @@ +{ + "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" + } + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.2.0/info.json" +} \ No newline at end of file diff --git a/definitions/2.2.0/license.json b/definitions/2.2.0/license.json new file mode 100644 index 00000000..82276487 --- /dev/null +++ b/definitions/2.2.0/license.json @@ -0,0 +1,25 @@ +{ + "type": "object", + "required": [ + "name" + ], + "additionalProperties": false, + "properties": { + "name": { + "type": "string", + "description": "The name of the license type. It's encouraged to use an OSI compatible license." + }, + "url": { + "type": "string", + "description": "The URL pointing to the license.", + "format": "uri" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.2.0/specificationExtension.json" + } + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.2.0/license.json" +} \ No newline at end of file diff --git a/definitions/2.2.0/message.json b/definitions/2.2.0/message.json new file mode 100644 index 00000000..383db06a --- /dev/null +++ b/definitions/2.2.0/message.json @@ -0,0 +1,168 @@ +{ + "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" + }, + { + "type": "array", + "items": [ + { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.2.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.2.0/messageTrait.json" + } + ] + }, + { + "type": "object", + "additionalItems": true + } + ] + } + ] + } + } + } + } + ] + } + ], + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.2.0/message.json" +} \ No newline at end of file diff --git a/definitions/2.2.0/messageTrait.json b/definitions/2.2.0/messageTrait.json new file mode 100644 index 00000000..6bea576f --- /dev/null +++ b/definitions/2.2.0/messageTrait.json @@ -0,0 +1,78 @@ +{ + "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": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.2.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.2.0/schema.json" + } + ] + }, + "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" + } + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.2.0/messageTrait.json" +} \ No newline at end of file diff --git a/definitions/2.2.0/messages.json b/definitions/2.2.0/messages.json new file mode 100644 index 00000000..4b703be2 --- /dev/null +++ b/definitions/2.2.0/messages.json @@ -0,0 +1,9 @@ +{ + "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.", + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.2.0/messages.json" +} \ No newline at end of file diff --git a/definitions/2.2.0/oauth2Flow.json b/definitions/2.2.0/oauth2Flow.json new file mode 100644 index 00000000..70ab26f0 --- /dev/null +++ b/definitions/2.2.0/oauth2Flow.json @@ -0,0 +1,28 @@ +{ + "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, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.2.0/oauth2Flow.json" +} \ No newline at end of file diff --git a/definitions/2.2.0/oauth2Flows.json b/definitions/2.2.0/oauth2Flows.json new file mode 100644 index 00000000..06c6d0a9 --- /dev/null +++ b/definitions/2.2.0/oauth2Flows.json @@ -0,0 +1,105 @@ +{ + "type": "object", + "required": [ + "type", + "flows" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "oauth2" + ] + }, + "description": { + "type": "string" + }, + "flows": { + "type": "object", + "properties": { + "implicit": { + "allOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.2.0/oauth2Flow.json" + }, + { + "required": [ + "authorizationUrl", + "scopes" + ] + }, + { + "not": { + "required": [ + "tokenUrl" + ] + } + } + ] + }, + "password": { + "allOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.2.0/oauth2Flow.json" + }, + { + "required": [ + "tokenUrl", + "scopes" + ] + }, + { + "not": { + "required": [ + "authorizationUrl" + ] + } + } + ] + }, + "clientCredentials": { + "allOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.2.0/oauth2Flow.json" + }, + { + "required": [ + "tokenUrl", + "scopes" + ] + }, + { + "not": { + "required": [ + "authorizationUrl" + ] + } + } + ] + }, + "authorizationCode": { + "allOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.2.0/oauth2Flow.json" + }, + { + "required": [ + "authorizationUrl", + "tokenUrl", + "scopes" + ] + } + ] + } + }, + "additionalProperties": false + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.2.0/specificationExtension.json" + } + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.2.0/oauth2Flows.json" +} \ No newline at end of file diff --git a/definitions/2.2.0/oauth2Scopes.json b/definitions/2.2.0/oauth2Scopes.json new file mode 100644 index 00000000..36395da7 --- /dev/null +++ b/definitions/2.2.0/oauth2Scopes.json @@ -0,0 +1,8 @@ +{ + "type": "object", + "additionalProperties": { + "type": "string" + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.2.0/oauth2Scopes.json" +} \ No newline at end of file diff --git a/definitions/2.2.0/openIdConnect.json b/definitions/2.2.0/openIdConnect.json new file mode 100644 index 00000000..b015c8c5 --- /dev/null +++ b/definitions/2.2.0/openIdConnect.json @@ -0,0 +1,30 @@ +{ + "type": "object", + "required": [ + "type", + "openIdConnectUrl" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "openIdConnect" + ] + }, + "description": { + "type": "string" + }, + "openIdConnectUrl": { + "type": "string", + "format": "uri" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.2.0/specificationExtension.json" + } + }, + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.2.0/openIdConnect.json" +} \ No newline at end of file diff --git a/definitions/2.2.0/operation.json b/definitions/2.2.0/operation.json new file mode 100644 index 00000000..b7e79046 --- /dev/null +++ b/definitions/2.2.0/operation.json @@ -0,0 +1,70 @@ +{ + "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" + }, + { + "type": "array", + "items": [ + { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.2.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.2.0/operationTrait.json" + } + ] + }, + { + "type": "object", + "additionalItems": true + } + ] + } + ] + } + }, + "summary": { + "type": "string" + }, + "description": { + "type": "string" + }, + "tags": { + "type": "array", + "items": { + "$ref": "http://asyncapi.com/definitions/2.2.0/tag.json" + }, + "uniqueItems": true + }, + "externalDocs": { + "$ref": "http://asyncapi.com/definitions/2.2.0/externalDocs.json" + }, + "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" + } + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.2.0/operation.json" +} \ No newline at end of file diff --git a/definitions/2.2.0/operationTrait.json b/definitions/2.2.0/operationTrait.json new file mode 100644 index 00000000..c104781f --- /dev/null +++ b/definitions/2.2.0/operationTrait.json @@ -0,0 +1,35 @@ +{ + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.2.0/specificationExtension.json" + } + }, + "properties": { + "summary": { + "type": "string" + }, + "description": { + "type": "string" + }, + "tags": { + "type": "array", + "items": { + "$ref": "http://asyncapi.com/definitions/2.2.0/tag.json" + }, + "uniqueItems": true + }, + "externalDocs": { + "$ref": "http://asyncapi.com/definitions/2.2.0/externalDocs.json" + }, + "operationId": { + "type": "string" + }, + "bindings": { + "$ref": "http://asyncapi.com/definitions/2.2.0/bindingsObject.json" + } + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.2.0/operationTrait.json" +} \ No newline at end of file diff --git a/definitions/2.2.0/parameter.json b/definitions/2.2.0/parameter.json new file mode 100644 index 00000000..ba0430be --- /dev/null +++ b/definitions/2.2.0/parameter.json @@ -0,0 +1,27 @@ +{ + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.2.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." + }, + "schema": { + "$ref": "http://asyncapi.com/definitions/2.2.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.2.0/ReferenceObject.json" + } + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.2.0/parameter.json" +} \ No newline at end of file diff --git a/definitions/2.2.0/parameters.json b/definitions/2.2.0/parameters.json new file mode 100644 index 00000000..8dd19448 --- /dev/null +++ b/definitions/2.2.0/parameters.json @@ -0,0 +1,9 @@ +{ + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/2.2.0/parameter.json" + }, + "description": "JSON objects describing re-usable channel parameters.", + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.2.0/parameters.json" +} \ No newline at end of file diff --git a/definitions/2.2.0/schema.json b/definitions/2.2.0/schema.json new file mode 100644 index 00000000..708f5a6e --- /dev/null +++ b/definitions/2.2.0/schema.json @@ -0,0 +1,98 @@ +{ + "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 + } + } + } + ], + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.2.0/schema.json" +} \ No newline at end of file diff --git a/definitions/2.2.0/schemas.json b/definitions/2.2.0/schemas.json new file mode 100644 index 00000000..00ca72ff --- /dev/null +++ b/definitions/2.2.0/schemas.json @@ -0,0 +1,9 @@ +{ + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/2.2.0/schema.json" + }, + "description": "JSON objects describing schemas the API uses.", + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.2.0/schemas.json" +} \ No newline at end of file diff --git a/definitions/2.2.0/server.json b/definitions/2.2.0/server.json new file mode 100644 index 00000000..d0958120 --- /dev/null +++ b/definitions/2.2.0/server.json @@ -0,0 +1,43 @@ +{ + "type": "object", + "description": "An object representing a Server.", + "required": [ + "url", + "protocol" + ], + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.2.0/specificationExtension.json" + } + }, + "properties": { + "url": { + "type": "string" + }, + "description": { + "type": "string" + }, + "protocol": { + "type": "string", + "description": "The transfer protocol." + }, + "protocolVersion": { + "type": "string" + }, + "variables": { + "$ref": "http://asyncapi.com/definitions/2.2.0/serverVariables.json" + }, + "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" + } + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.2.0/server.json" +} \ No newline at end of file diff --git a/definitions/2.2.0/serverVariable.json b/definitions/2.2.0/serverVariable.json new file mode 100644 index 00000000..eb364353 --- /dev/null +++ b/definitions/2.2.0/serverVariable.json @@ -0,0 +1,33 @@ +{ + "type": "object", + "description": "An object representing a Server Variable for server URL template substitution.", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.2.0/specificationExtension.json" + } + }, + "properties": { + "enum": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + }, + "default": { + "type": "string" + }, + "description": { + "type": "string" + }, + "examples": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.2.0/serverVariable.json" +} \ No newline at end of file diff --git a/definitions/2.2.0/serverVariables.json b/definitions/2.2.0/serverVariables.json new file mode 100644 index 00000000..8edf45a1 --- /dev/null +++ b/definitions/2.2.0/serverVariables.json @@ -0,0 +1,8 @@ +{ + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/2.2.0/serverVariable.json" + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.2.0/serverVariables.json" +} \ No newline at end of file diff --git a/definitions/2.2.0/specificationExtension.json b/definitions/2.2.0/specificationExtension.json new file mode 100644 index 00000000..7bdcafe1 --- /dev/null +++ b/definitions/2.2.0/specificationExtension.json @@ -0,0 +1,7 @@ +{ + "description": "Any property starting with x- is valid.", + "additionalProperties": true, + "additionalItems": true, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.2.0/specificationExtension.json" +} \ No newline at end of file diff --git a/definitions/2.2.0/symmetricEncryption.json b/definitions/2.2.0/symmetricEncryption.json new file mode 100644 index 00000000..53be37ec --- /dev/null +++ b/definitions/2.2.0/symmetricEncryption.json @@ -0,0 +1,25 @@ +{ + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "symmetricEncryption" + ] + }, + "description": { + "type": "string" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.2.0/specificationExtension.json" + } + }, + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.2.0/symmetricEncryption.json" +} \ No newline at end of file diff --git a/definitions/2.2.0/tag.json b/definitions/2.2.0/tag.json new file mode 100644 index 00000000..7fa64432 --- /dev/null +++ b/definitions/2.2.0/tag.json @@ -0,0 +1,25 @@ +{ + "type": "object", + "additionalProperties": false, + "required": [ + "name" + ], + "properties": { + "name": { + "type": "string" + }, + "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" + } + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.2.0/tag.json" +} \ No newline at end of file diff --git a/definitions/2.2.0/userPassword.json b/definitions/2.2.0/userPassword.json new file mode 100644 index 00000000..f9569e2d --- /dev/null +++ b/definitions/2.2.0/userPassword.json @@ -0,0 +1,25 @@ +{ + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "userPassword" + ] + }, + "description": { + "type": "string" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.2.0/specificationExtension.json" + } + }, + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.2.0/userPassword.json" +} \ No newline at end of file diff --git a/definitions/2.3.0/APIKeyHTTPSecurityScheme.json b/definitions/2.3.0/APIKeyHTTPSecurityScheme.json new file mode 100644 index 00000000..5218b532 --- /dev/null +++ b/definitions/2.3.0/APIKeyHTTPSecurityScheme.json @@ -0,0 +1,38 @@ +{ + "type": "object", + "required": [ + "type", + "name", + "in" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "httpApiKey" + ] + }, + "name": { + "type": "string" + }, + "in": { + "type": "string", + "enum": [ + "header", + "query", + "cookie" + ] + }, + "description": { + "type": "string" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.3.0/specificationExtension.json" + } + }, + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.3.0/APIKeyHTTPSecurityScheme.json" +} \ No newline at end of file diff --git a/definitions/2.3.0/BearerHTTPSecurityScheme.json b/definitions/2.3.0/BearerHTTPSecurityScheme.json new file mode 100644 index 00000000..a0cab5e7 --- /dev/null +++ b/definitions/2.3.0/BearerHTTPSecurityScheme.json @@ -0,0 +1,35 @@ +{ + "type": "object", + "required": [ + "type", + "scheme" + ], + "properties": { + "scheme": { + "type": "string", + "enum": [ + "bearer" + ] + }, + "bearerFormat": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "http" + ] + }, + "description": { + "type": "string" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.3.0/specificationExtension.json" + } + }, + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.3.0/BearerHTTPSecurityScheme.json" +} \ No newline at end of file diff --git a/definitions/2.3.0/HTTPSecurityScheme.json b/definitions/2.3.0/HTTPSecurityScheme.json new file mode 100644 index 00000000..5dd62945 --- /dev/null +++ b/definitions/2.3.0/HTTPSecurityScheme.json @@ -0,0 +1,15 @@ +{ + "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" + } + ], + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.3.0/HTTPSecurityScheme.json" +} \ No newline at end of file diff --git a/definitions/2.3.0/NonBearerHTTPSecurityScheme.json b/definitions/2.3.0/NonBearerHTTPSecurityScheme.json new file mode 100644 index 00000000..52d2adb9 --- /dev/null +++ b/definitions/2.3.0/NonBearerHTTPSecurityScheme.json @@ -0,0 +1,40 @@ +{ + "not": { + "type": "object", + "properties": { + "scheme": { + "type": "string", + "enum": [ + "bearer" + ] + } + } + }, + "type": "object", + "required": [ + "scheme", + "type" + ], + "properties": { + "scheme": { + "type": "string" + }, + "description": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "http" + ] + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.3.0/specificationExtension.json" + } + }, + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.3.0/NonBearerHTTPSecurityScheme.json" +} \ No newline at end of file diff --git a/definitions/2.3.0/Reference.json b/definitions/2.3.0/Reference.json new file mode 100644 index 00000000..d91bda6e --- /dev/null +++ b/definitions/2.3.0/Reference.json @@ -0,0 +1,13 @@ +{ + "type": "object", + "required": [ + "$ref" + ], + "properties": { + "$ref": { + "$ref": "http://asyncapi.com/definitions/2.3.0/ReferenceObject.json" + } + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.3.0/Reference.json" +} \ No newline at end of file diff --git a/definitions/2.3.0/ReferenceObject.json b/definitions/2.3.0/ReferenceObject.json new file mode 100644 index 00000000..b02a9f31 --- /dev/null +++ b/definitions/2.3.0/ReferenceObject.json @@ -0,0 +1,6 @@ +{ + "type": "string", + "format": "uri-reference", + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.3.0/ReferenceObject.json" +} \ No newline at end of file diff --git a/definitions/2.3.0/SaslGssapiSecurityScheme.json b/definitions/2.3.0/SaslGssapiSecurityScheme.json new file mode 100644 index 00000000..27addf0f --- /dev/null +++ b/definitions/2.3.0/SaslGssapiSecurityScheme.json @@ -0,0 +1,25 @@ +{ + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "gssapi" + ] + }, + "description": { + "type": "string" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.3.0/specificationExtension.json" + } + }, + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.3.0/SaslGssapiSecurityScheme.json" +} \ No newline at end of file diff --git a/definitions/2.3.0/SaslPlainSecurityScheme.json b/definitions/2.3.0/SaslPlainSecurityScheme.json new file mode 100644 index 00000000..55d04cd1 --- /dev/null +++ b/definitions/2.3.0/SaslPlainSecurityScheme.json @@ -0,0 +1,25 @@ +{ + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "plain" + ] + }, + "description": { + "type": "string" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.3.0/specificationExtension.json" + } + }, + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.3.0/SaslPlainSecurityScheme.json" +} \ No newline at end of file diff --git a/definitions/2.3.0/SaslScramSecurityScheme.json b/definitions/2.3.0/SaslScramSecurityScheme.json new file mode 100644 index 00000000..54ace0ee --- /dev/null +++ b/definitions/2.3.0/SaslScramSecurityScheme.json @@ -0,0 +1,26 @@ +{ + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "scramSha256", + "scramSha512" + ] + }, + "description": { + "type": "string" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.3.0/specificationExtension.json" + } + }, + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.3.0/SaslScramSecurityScheme.json" +} \ No newline at end of file diff --git a/definitions/2.3.0/SaslSecurityScheme.json b/definitions/2.3.0/SaslSecurityScheme.json new file mode 100644 index 00000000..5454ccb1 --- /dev/null +++ b/definitions/2.3.0/SaslSecurityScheme.json @@ -0,0 +1,15 @@ +{ + "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" + } + ], + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.3.0/SaslSecurityScheme.json" +} \ No newline at end of file diff --git a/definitions/2.3.0/SecurityRequirement.json b/definitions/2.3.0/SecurityRequirement.json new file mode 100644 index 00000000..2c7fe765 --- /dev/null +++ b/definitions/2.3.0/SecurityRequirement.json @@ -0,0 +1,12 @@ +{ + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.3.0/SecurityRequirement.json" +} \ No newline at end of file diff --git a/definitions/2.3.0/SecurityScheme.json b/definitions/2.3.0/SecurityScheme.json new file mode 100644 index 00000000..ce795ddb --- /dev/null +++ b/definitions/2.3.0/SecurityScheme.json @@ -0,0 +1,33 @@ +{ + "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" + } + ], + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.3.0/SecurityScheme.json" +} \ No newline at end of file diff --git a/definitions/2.3.0/X509.json b/definitions/2.3.0/X509.json new file mode 100644 index 00000000..6c1d1127 --- /dev/null +++ b/definitions/2.3.0/X509.json @@ -0,0 +1,25 @@ +{ + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "X509" + ] + }, + "description": { + "type": "string" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.3.0/specificationExtension.json" + } + }, + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.3.0/X509.json" +} \ No newline at end of file diff --git a/definitions/2.3.0/apiKey.json b/definitions/2.3.0/apiKey.json new file mode 100644 index 00000000..ba2f2bc3 --- /dev/null +++ b/definitions/2.3.0/apiKey.json @@ -0,0 +1,33 @@ +{ + "type": "object", + "required": [ + "type", + "in" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "apiKey" + ] + }, + "in": { + "type": "string", + "enum": [ + "user", + "password" + ] + }, + "description": { + "type": "string" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.3.0/specificationExtension.json" + } + }, + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.3.0/apiKey.json" +} \ No newline at end of file diff --git a/definitions/2.3.0/asymmetricEncryption.json b/definitions/2.3.0/asymmetricEncryption.json new file mode 100644 index 00000000..455ad200 --- /dev/null +++ b/definitions/2.3.0/asymmetricEncryption.json @@ -0,0 +1,25 @@ +{ + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "asymmetricEncryption" + ] + }, + "description": { + "type": "string" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.3.0/specificationExtension.json" + } + }, + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.3.0/asymmetricEncryption.json" +} \ No newline at end of file diff --git a/definitions/2.3.0/asyncapi.json b/definitions/2.3.0/asyncapi.json new file mode 100644 index 00000000..fa4d4077 --- /dev/null +++ b/definitions/2.3.0/asyncapi.json @@ -0,0 +1,56 @@ +{ + "title": "AsyncAPI 2.3.0 schema.", + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.3.0/asyncapi.json", + "type": "object", + "required": [ + "asyncapi", + "info", + "channels" + ], + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.3.0/specificationExtension.json" + } + }, + "properties": { + "asyncapi": { + "type": "string", + "enum": [ + "2.3.0" + ], + "description": "The AsyncAPI specification version of this document." + }, + "id": { + "type": "string", + "description": "A unique id representing the application.", + "format": "uri" + }, + "info": { + "$ref": "http://asyncapi.com/definitions/2.3.0/info.json" + }, + "servers": { + "$ref": "http://asyncapi.com/definitions/2.3.0/servers.json" + }, + "defaultContentType": { + "type": "string" + }, + "channels": { + "$ref": "http://asyncapi.com/definitions/2.3.0/channels.json" + }, + "components": { + "$ref": "http://asyncapi.com/definitions/2.3.0/components.json" + }, + "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" + } + } +} \ No newline at end of file diff --git a/definitions/2.3.0/bindingsObject.json b/definitions/2.3.0/bindingsObject.json new file mode 100644 index 00000000..6f5d1358 --- /dev/null +++ b/definitions/2.3.0/bindingsObject.json @@ -0,0 +1,24 @@ +{ + "type": "object", + "additionalProperties": true, + "properties": { + "http": {}, + "ws": {}, + "amqp": {}, + "amqp1": {}, + "mqtt": {}, + "mqtt5": {}, + "kafka": {}, + "anypointmq": {}, + "nats": {}, + "jms": {}, + "sns": {}, + "sqs": {}, + "stomp": {}, + "redis": {}, + "ibmmq": {}, + "solace": {} + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.3.0/bindingsObject.json" +} \ No newline at end of file diff --git a/definitions/2.3.0/channelItem.json b/definitions/2.3.0/channelItem.json new file mode 100644 index 00000000..0c9e6ef5 --- /dev/null +++ b/definitions/2.3.0/channelItem.json @@ -0,0 +1,47 @@ +{ + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.3.0/specificationExtension.json" + } + }, + "properties": { + "$ref": { + "$ref": "http://asyncapi.com/definitions/2.3.0/ReferenceObject.json" + }, + "parameters": { + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/2.3.0/parameter.json" + } + }, + "description": { + "type": "string", + "description": "A description of the channel." + }, + "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 + }, + "publish": { + "$ref": "http://asyncapi.com/definitions/2.3.0/operation.json" + }, + "subscribe": { + "$ref": "http://asyncapi.com/definitions/2.3.0/operation.json" + }, + "deprecated": { + "type": "boolean", + "default": false + }, + "bindings": { + "$ref": "http://asyncapi.com/definitions/2.3.0/bindingsObject.json" + } + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.3.0/channelItem.json" +} \ No newline at end of file diff --git a/definitions/2.3.0/channels.json b/definitions/2.3.0/channels.json new file mode 100644 index 00000000..f1e4c2ed --- /dev/null +++ b/definitions/2.3.0/channels.json @@ -0,0 +1,13 @@ +{ + "type": "object", + "propertyNames": { + "type": "string", + "format": "uri-template", + "minLength": 1 + }, + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/2.3.0/channelItem.json" + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.3.0/channels.json" +} \ No newline at end of file diff --git a/definitions/2.3.0/components.json b/definitions/2.3.0/components.json new file mode 100644 index 00000000..bbd96895 --- /dev/null +++ b/definitions/2.3.0/components.json @@ -0,0 +1,89 @@ +{ + "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" + }, + "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" + } + } + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.3.0/components.json" +} \ No newline at end of file diff --git a/definitions/2.3.0/contact.json b/definitions/2.3.0/contact.json new file mode 100644 index 00000000..2cd15aa7 --- /dev/null +++ b/definitions/2.3.0/contact.json @@ -0,0 +1,28 @@ +{ + "type": "object", + "description": "Contact information for the owners of the API.", + "additionalProperties": false, + "properties": { + "name": { + "type": "string", + "description": "The identifying name of the contact person/organization." + }, + "url": { + "type": "string", + "description": "The URL pointing to the contact information.", + "format": "uri" + }, + "email": { + "type": "string", + "description": "The email address of the contact person/organization.", + "format": "email" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.3.0/specificationExtension.json" + } + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.3.0/contact.json" +} \ No newline at end of file diff --git a/definitions/2.3.0/correlationId.json b/definitions/2.3.0/correlationId.json new file mode 100644 index 00000000..32808f72 --- /dev/null +++ b/definitions/2.3.0/correlationId.json @@ -0,0 +1,25 @@ +{ + "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]))*)*" + } + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.3.0/correlationId.json" +} \ No newline at end of file diff --git a/definitions/2.3.0/external.json b/definitions/2.3.0/external.json new file mode 100644 index 00000000..e5eab736 --- /dev/null +++ b/definitions/2.3.0/external.json @@ -0,0 +1,5 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.3.0/http://something.example.com/schemas/external.json", + "type": "string" + } \ No newline at end of file diff --git a/definitions/2.3.0/externalDocs.json b/definitions/2.3.0/externalDocs.json new file mode 100644 index 00000000..eeefb738 --- /dev/null +++ b/definitions/2.3.0/externalDocs.json @@ -0,0 +1,24 @@ +{ + "type": "object", + "additionalProperties": false, + "description": "information about external documentation", + "required": [ + "url" + ], + "properties": { + "description": { + "type": "string" + }, + "url": { + "type": "string", + "format": "uri" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.3.0/specificationExtension.json" + } + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.3.0/externalDocs.json" +} \ No newline at end of file diff --git a/definitions/2.3.0/info.json b/definitions/2.3.0/info.json new file mode 100644 index 00000000..0410e566 --- /dev/null +++ b/definitions/2.3.0/info.json @@ -0,0 +1,41 @@ +{ + "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" + } + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.3.0/info.json" +} \ No newline at end of file diff --git a/definitions/2.3.0/license.json b/definitions/2.3.0/license.json new file mode 100644 index 00000000..05236c1a --- /dev/null +++ b/definitions/2.3.0/license.json @@ -0,0 +1,25 @@ +{ + "type": "object", + "required": [ + "name" + ], + "additionalProperties": false, + "properties": { + "name": { + "type": "string", + "description": "The name of the license type. It's encouraged to use an OSI compatible license." + }, + "url": { + "type": "string", + "description": "The URL pointing to the license.", + "format": "uri" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.3.0/specificationExtension.json" + } + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.3.0/license.json" +} \ No newline at end of file diff --git a/definitions/2.3.0/message.json b/definitions/2.3.0/message.json new file mode 100644 index 00000000..db1ae34b --- /dev/null +++ b/definitions/2.3.0/message.json @@ -0,0 +1,168 @@ +{ + "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" + }, + { + "type": "array", + "items": [ + { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.3.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.3.0/messageTrait.json" + } + ] + }, + { + "type": "object", + "additionalItems": true + } + ] + } + ] + } + } + } + } + ] + } + ], + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.3.0/message.json" +} \ No newline at end of file diff --git a/definitions/2.3.0/messageTrait.json b/definitions/2.3.0/messageTrait.json new file mode 100644 index 00000000..006e42d1 --- /dev/null +++ b/definitions/2.3.0/messageTrait.json @@ -0,0 +1,82 @@ +{ + "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" + } + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.3.0/messageTrait.json" +} \ No newline at end of file diff --git a/definitions/2.3.0/messages.json b/definitions/2.3.0/messages.json new file mode 100644 index 00000000..3fb3b29a --- /dev/null +++ b/definitions/2.3.0/messages.json @@ -0,0 +1,9 @@ +{ + "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.", + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.3.0/messages.json" +} \ No newline at end of file diff --git a/definitions/2.3.0/oauth2Flow.json b/definitions/2.3.0/oauth2Flow.json new file mode 100644 index 00000000..8cb18de0 --- /dev/null +++ b/definitions/2.3.0/oauth2Flow.json @@ -0,0 +1,28 @@ +{ + "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, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.3.0/oauth2Flow.json" +} \ No newline at end of file diff --git a/definitions/2.3.0/oauth2Flows.json b/definitions/2.3.0/oauth2Flows.json new file mode 100644 index 00000000..265153a7 --- /dev/null +++ b/definitions/2.3.0/oauth2Flows.json @@ -0,0 +1,105 @@ +{ + "type": "object", + "required": [ + "type", + "flows" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "oauth2" + ] + }, + "description": { + "type": "string" + }, + "flows": { + "type": "object", + "properties": { + "implicit": { + "allOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.3.0/oauth2Flow.json" + }, + { + "required": [ + "authorizationUrl", + "scopes" + ] + }, + { + "not": { + "required": [ + "tokenUrl" + ] + } + } + ] + }, + "password": { + "allOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.3.0/oauth2Flow.json" + }, + { + "required": [ + "tokenUrl", + "scopes" + ] + }, + { + "not": { + "required": [ + "authorizationUrl" + ] + } + } + ] + }, + "clientCredentials": { + "allOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.3.0/oauth2Flow.json" + }, + { + "required": [ + "tokenUrl", + "scopes" + ] + }, + { + "not": { + "required": [ + "authorizationUrl" + ] + } + } + ] + }, + "authorizationCode": { + "allOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.3.0/oauth2Flow.json" + }, + { + "required": [ + "authorizationUrl", + "tokenUrl", + "scopes" + ] + } + ] + } + }, + "additionalProperties": false + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.3.0/specificationExtension.json" + } + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.3.0/oauth2Flows.json" +} \ No newline at end of file diff --git a/definitions/2.3.0/oauth2Scopes.json b/definitions/2.3.0/oauth2Scopes.json new file mode 100644 index 00000000..28eb0593 --- /dev/null +++ b/definitions/2.3.0/oauth2Scopes.json @@ -0,0 +1,8 @@ +{ + "type": "object", + "additionalProperties": { + "type": "string" + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.3.0/oauth2Scopes.json" +} \ No newline at end of file diff --git a/definitions/2.3.0/openIdConnect.json b/definitions/2.3.0/openIdConnect.json new file mode 100644 index 00000000..a2fffcaa --- /dev/null +++ b/definitions/2.3.0/openIdConnect.json @@ -0,0 +1,30 @@ +{ + "type": "object", + "required": [ + "type", + "openIdConnectUrl" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "openIdConnect" + ] + }, + "description": { + "type": "string" + }, + "openIdConnectUrl": { + "type": "string", + "format": "uri" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.3.0/specificationExtension.json" + } + }, + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.3.0/openIdConnect.json" +} \ No newline at end of file diff --git a/definitions/2.3.0/operation.json b/definitions/2.3.0/operation.json new file mode 100644 index 00000000..8ab96870 --- /dev/null +++ b/definitions/2.3.0/operation.json @@ -0,0 +1,70 @@ +{ + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.3.0/specificationExtension.json" + } + }, + "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" + }, + { + "type": "array", + "items": [ + { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.3.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.3.0/operationTrait.json" + } + ] + }, + { + "type": "object", + "additionalItems": true + } + ] + } + ] + } + }, + "summary": { + "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" + } + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.3.0/operation.json" +} \ No newline at end of file diff --git a/definitions/2.3.0/operationTrait.json b/definitions/2.3.0/operationTrait.json new file mode 100644 index 00000000..6a008cc7 --- /dev/null +++ b/definitions/2.3.0/operationTrait.json @@ -0,0 +1,35 @@ +{ + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.3.0/specificationExtension.json" + } + }, + "properties": { + "summary": { + "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" + } + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.3.0/operationTrait.json" +} \ No newline at end of file diff --git a/definitions/2.3.0/parameter.json b/definitions/2.3.0/parameter.json new file mode 100644 index 00000000..4c016441 --- /dev/null +++ b/definitions/2.3.0/parameter.json @@ -0,0 +1,27 @@ +{ + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.3.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." + }, + "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" + } + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.3.0/parameter.json" +} \ No newline at end of file diff --git a/definitions/2.3.0/parameters.json b/definitions/2.3.0/parameters.json new file mode 100644 index 00000000..91e6310a --- /dev/null +++ b/definitions/2.3.0/parameters.json @@ -0,0 +1,9 @@ +{ + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/2.3.0/parameter.json" + }, + "description": "JSON objects describing re-usable channel parameters.", + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.3.0/parameters.json" +} \ No newline at end of file diff --git a/definitions/2.3.0/schema.json b/definitions/2.3.0/schema.json new file mode 100644 index 00000000..43a6cc03 --- /dev/null +++ b/definitions/2.3.0/schema.json @@ -0,0 +1,98 @@ +{ + "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 + } + } + } + ], + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.3.0/schema.json" +} \ No newline at end of file diff --git a/definitions/2.3.0/schemas.json b/definitions/2.3.0/schemas.json new file mode 100644 index 00000000..a2fc1dbe --- /dev/null +++ b/definitions/2.3.0/schemas.json @@ -0,0 +1,9 @@ +{ + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/2.3.0/schema.json" + }, + "description": "JSON objects describing schemas the API uses.", + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.3.0/schemas.json" +} \ No newline at end of file diff --git a/definitions/2.3.0/server.json b/definitions/2.3.0/server.json new file mode 100644 index 00000000..daf2dc8d --- /dev/null +++ b/definitions/2.3.0/server.json @@ -0,0 +1,43 @@ +{ + "type": "object", + "description": "An object representing a Server.", + "required": [ + "url", + "protocol" + ], + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.3.0/specificationExtension.json" + } + }, + "properties": { + "url": { + "type": "string" + }, + "description": { + "type": "string" + }, + "protocol": { + "type": "string", + "description": "The transfer protocol." + }, + "protocolVersion": { + "type": "string" + }, + "variables": { + "$ref": "http://asyncapi.com/definitions/2.3.0/serverVariables.json" + }, + "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" + } + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.3.0/server.json" +} \ No newline at end of file diff --git a/definitions/2.3.0/serverVariable.json b/definitions/2.3.0/serverVariable.json new file mode 100644 index 00000000..c9c94f7f --- /dev/null +++ b/definitions/2.3.0/serverVariable.json @@ -0,0 +1,33 @@ +{ + "type": "object", + "description": "An object representing a Server Variable for server URL template substitution.", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.3.0/specificationExtension.json" + } + }, + "properties": { + "enum": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + }, + "default": { + "type": "string" + }, + "description": { + "type": "string" + }, + "examples": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.3.0/serverVariable.json" +} \ No newline at end of file diff --git a/definitions/2.3.0/serverVariables.json b/definitions/2.3.0/serverVariables.json new file mode 100644 index 00000000..c241f677 --- /dev/null +++ b/definitions/2.3.0/serverVariables.json @@ -0,0 +1,8 @@ +{ + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/2.3.0/serverVariable.json" + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.3.0/serverVariables.json" +} \ No newline at end of file diff --git a/definitions/2.3.0/servers.json b/definitions/2.3.0/servers.json new file mode 100644 index 00000000..66dbc8c2 --- /dev/null +++ b/definitions/2.3.0/servers.json @@ -0,0 +1,16 @@ +{ + "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" + } + ] + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.3.0/servers.json" +} \ No newline at end of file diff --git a/definitions/2.3.0/specificationExtension.json b/definitions/2.3.0/specificationExtension.json new file mode 100644 index 00000000..10569cde --- /dev/null +++ b/definitions/2.3.0/specificationExtension.json @@ -0,0 +1,7 @@ +{ + "description": "Any property starting with x- is valid.", + "additionalProperties": true, + "additionalItems": true, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.3.0/specificationExtension.json" +} \ No newline at end of file diff --git a/definitions/2.3.0/symmetricEncryption.json b/definitions/2.3.0/symmetricEncryption.json new file mode 100644 index 00000000..08e59d9e --- /dev/null +++ b/definitions/2.3.0/symmetricEncryption.json @@ -0,0 +1,25 @@ +{ + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "symmetricEncryption" + ] + }, + "description": { + "type": "string" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.3.0/specificationExtension.json" + } + }, + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.3.0/symmetricEncryption.json" +} \ No newline at end of file diff --git a/definitions/2.3.0/tag.json b/definitions/2.3.0/tag.json new file mode 100644 index 00000000..527d558a --- /dev/null +++ b/definitions/2.3.0/tag.json @@ -0,0 +1,25 @@ +{ + "type": "object", + "additionalProperties": false, + "required": [ + "name" + ], + "properties": { + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "externalDocs": { + "$ref": "http://asyncapi.com/definitions/2.3.0/externalDocs.json" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.3.0/specificationExtension.json" + } + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.3.0/tag.json" +} \ No newline at end of file diff --git a/definitions/2.3.0/userPassword.json b/definitions/2.3.0/userPassword.json new file mode 100644 index 00000000..c065556d --- /dev/null +++ b/definitions/2.3.0/userPassword.json @@ -0,0 +1,25 @@ +{ + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "userPassword" + ] + }, + "description": { + "type": "string" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.3.0/specificationExtension.json" + } + }, + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.3.0/userPassword.json" +} \ No newline at end of file diff --git a/index.js b/index.js index e99ad44d..d1152a61 100644 --- a/index.js +++ b/index.js @@ -7,5 +7,5 @@ module.exports = { '2.0.0': require('./schemas/2.0.0.json'), '2.1.0': require('./schemas/2.1.0.json'), '2.2.0': require('./schemas/2.2.0.json'), - '2.3.0': require('./schemas/2.3.0.json'), + '2.3.0': require('./schemas/2.3.0.json') }; diff --git a/migrations/Migrate to version 3.md b/migrations/Migrate to version 3.md new file mode 100644 index 00000000..fab9abd3 --- /dev/null +++ b/migrations/Migrate to version 3.md @@ -0,0 +1,35 @@ +# Migrating to version 3 + +In version 3, the only breaking change is that the provided bundled schemas located under [schemas](../schemas) now use completely different `$id`s and definition namings. + +> If you don't manually access schemas under `definitions`, you can upgrade the version without any problems. + +Previously, each definition would have it defined as: + +```json +{ + ... + "definitions": { + "Reference": { ... }, + "ReferenceObject": { ... }, + "info": { ... }, + ... + } +} +``` + +With the new naming approach, those definitions would be called: + +```json +{ + ... + "definitions": { + "http://asyncapi.com/definitions/2.2.0/Reference.json": { ... }, + "http://asyncapi.com/definitions/2.2.0/ReferenceObject.json": { ... }, + "http://asyncapi.com/definitions/2.2.0/info.json": { ... }, + ... + } +} +``` + +All definitions follow the same change from `` to `http://asyncapi.com/definitions//.json`. diff --git a/package.json b/package.json index 68a83a35..d9c95ff6 100644 --- a/package.json +++ b/package.json @@ -4,9 +4,13 @@ "description": "AsyncAPI schema versions", "main": "index.js", "scripts": { - "test": "nyc mocha", + "test": "npm run build && nyc mocha", + "build": "npm run bundle", "release": "semantic-release", - "generate:assets": "echo 'No additional assets need to be generated at the moment'", + "generate:assets": "npm run build", + "prepublishOnly": "npm run build", + "bundle": "cd tools/bundler && npm i && npm run bundle", + "startNewVersion": "newVersion=$npm_config_new_version && latestVersion=$(ls -d ./definitions/* | sort -V -r | head -1 | xargs -n 1 basename) && [ -d ./definitions/${newVersion} ] && echo Directory ./definitions/$newVersion already exist and cannot be overwritten. Please create a different version. || (cp -R ./definitions/$latestVersion ./definitions/$newVersion && find ./definitions/$newVersion -name '*.json' -exec sed -i '' \"s+definitions/$latestVersion+definitions/$newVersion+g\" {} +)", "lint": "echo 'No linter integrated yet'", "bump:version": "npm --no-git-tag-version --allow-same-version version $VERSION" }, @@ -46,7 +50,7 @@ "branches": [ "master", { - "name": "2022-01-release", + "name": "next-major", "prerelease": true } ], diff --git a/schemas/1.0.0.json b/schemas/1.0.0.json index fe7f7681..7d9be09b 100644 --- a/schemas/1.0.0.json +++ b/schemas/1.0.0.json @@ -1,849 +1,1077 @@ { - "title": "AsyncAPI 1.0 schema.", - "id": "http://asyncapi.hitchhq.com/v1/schema.json#", - "$schema": "http://json-schema.org/draft-04/schema#", - "type": "object", - "required": [ - "asyncapi", - "info", - "topics" - ], - "additionalProperties": false, - "patternProperties": { - "^x-": { - "$ref": "#/definitions/vendorExtension" - } - }, - "properties": { - "asyncapi": { - "type": "string", - "enum": [ - "1.0.0" - ], - "description": "The AsyncAPI specification version of this document." - }, - "info": { - "$ref": "#/definitions/info" - }, - "baseTopic": { - "type": "string", - "pattern": "^[^/.]", - "description": "The base topic to the API. Example: 'hitch'.", - "default": "" - }, - "servers": { - "type": "array", - "items": { - "$ref": "#/definitions/server" - }, - "uniqueItems": true - }, - "topics": { - "$ref": "#/definitions/topics" - }, - "components": { - "$ref": "#/definitions/components" - }, - "tags": { - "type": "array", - "items": { - "$ref": "#/definitions/tag" - }, - "uniqueItems": true - }, - "security": { - "type": "array", - "items": { - "$ref": "#/definitions/SecurityRequirement" - } - }, - "externalDocs": { - "$ref": "#/definitions/externalDocs" - } - }, - "definitions": { - "Reference": { - "type": "object", - "required": [ - "$ref" - ], - "properties": { - "$ref": { - "type": "string", - "format": "uri" - } - } - }, - "info": { - "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": { - "type": "object", - "description": "Contact information for the owners of the API.", - "additionalProperties": false, - "properties": { - "name": { - "type": "string", - "description": "The identifying name of the contact person/organization." - }, - "url": { - "type": "string", - "description": "The URL pointing to the contact information.", - "format": "uri" - }, - "email": { - "type": "string", - "description": "The email address of the contact person/organization.", - "format": "email" - } - }, - "patternProperties": { - "^x-": { - "$ref": "#/definitions/vendorExtension" - } - } - }, - "license": { - "type": "object", - "required": [ - "name" - ], - "additionalProperties": false, - "properties": { - "name": { - "type": "string", - "description": "The name of the license type. It's encouraged to use an OSI compatible license." - }, - "url": { - "type": "string", - "description": "The URL pointing to the license.", - "format": "uri" - } - }, - "patternProperties": { - "^x-": { - "$ref": "#/definitions/vendorExtension" - } - } - }, - "server": { - "type": "object", - "description": "An object representing a Server.", - "required": [ - "url", - "scheme" - ], - "additionalProperties": false, - "patternProperties": { + "id": "http://asyncapi.com/definitions/1.0.0/asyncapi.json", + "$schema": "http://json-schema.org/draft-04/schema", + "title": "AsyncAPI 1.0 schema.", + "type": "object", + "required": [ + "asyncapi", + "info", + "topics" + ], + "additionalProperties": false, + "patternProperties": { "^x-": { - "$ref": "#/definitions/vendorExtension" + "$ref": "http://asyncapi.com/definitions/1.0.0/vendorExtension.json" } - }, - "properties": { - "url": { - "type": "string" - }, - "description": { - "type": "string" - }, - "scheme": { - "type": "string", - "description": "The transfer protocol.", - "enum": [ - "kafka", - "kafka-secure", - "amqp", - "amqps", - "mqtt", - "mqtts", - "secure-mqtt", - "ws", - "wss", - "stomp", - "stomps" - ] - }, - "schemeVersion": { - "type": "string" - }, - "variables": { - "$ref": "#/definitions/serverVariables" - } - } - }, - "serverVariables": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/serverVariable" - } - }, - "serverVariable": { - "type": "object", - "description": "An object representing a Server Variable for server URL template substitution.", - "minProperties": 1, - "additionalProperties": false, - "patternProperties": { - "^x-": { - "$ref": "#/definitions/vendorExtension" - } - }, - "properties": { - "enum": { - "type": "array", - "items": { - "type": "string" - }, - "uniqueItems": true - }, - "default": { - "type": "string" - }, - "description": { - "type": "string" - } - } - }, - "topics": { - "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 - }, - "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": { - "^[a-zA-Z0-9\\.\\-_]+$": { - "oneOf": [ - { "$ref": "#/definitions/Reference" }, - { "$ref": "#/definitions/SecurityScheme" } - ] - } - } - } - } - }, - "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." - }, - "schema": { - "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": "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" + "properties": { + "asyncapi": { + "type": "string", + "enum": [ + "1.0.0" + ], + "description": "The AsyncAPI specification version of this document." }, - "minItems": { - "$ref": "http://json-schema.org/draft-04/schema#/definitions/positiveIntegerDefault0" + "info": { + "$ref": "http://asyncapi.com/definitions/1.0.0/info.json" }, - "uniqueItems": { - "$ref": "http://json-schema.org/draft-04/schema#/properties/uniqueItems" + "baseTopic": { + "type": "string", + "pattern": "^[^/.]", + "description": "The base topic to the API. Example: 'hitch'.", + "default": "" + }, + "servers": { + "type": "array", + "items": { + "$ref": "http://asyncapi.com/definitions/1.0.0/server.json" + }, + "uniqueItems": true }, - "maxProperties": { - "$ref": "http://json-schema.org/draft-04/schema#/definitions/positiveInteger" + "topics": { + "$ref": "http://asyncapi.com/definitions/1.0.0/topics.json" }, - "minProperties": { - "$ref": "http://json-schema.org/draft-04/schema#/definitions/positiveIntegerDefault0" + "components": { + "$ref": "http://asyncapi.com/definitions/1.0.0/components.json" }, - "required": { - "$ref": "http://json-schema.org/draft-04/schema#/definitions/stringArray" + "tags": { + "type": "array", + "items": { + "$ref": "http://asyncapi.com/definitions/1.0.0/tag.json" + }, + "uniqueItems": true }, - "enum": { - "$ref": "http://json-schema.org/draft-04/schema#/properties/enum" + "security": { + "type": "array", + "items": { + "$ref": "http://asyncapi.com/definitions/1.0.0/SecurityRequirement.json" + } }, - "additionalProperties": { - "anyOf": [ - { - "$ref": "#/definitions/schema" + "externalDocs": { + "$ref": "http://asyncapi.com/definitions/1.0.0/externalDocs.json" + } + }, + "definitions": { + "http://asyncapi.com/definitions/1.0.0/vendorExtension.json": { + "id": "http://asyncapi.com/definitions/1.0.0/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" + } }, - { - "type": "boolean" - } - ], - "default": {} - }, - "type": { - "$ref": "http://json-schema.org/draft-04/schema#/properties/type" - }, - "items": { - "anyOf": [ - { - "$ref": "#/definitions/schema" - }, - { - "type": "array", - "minItems": 1, - "items": { - "$ref": "#/definitions/schema" - } + "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" + } } - ], - "default": {} - }, - "allOf": { - "type": "array", - "minItems": 1, - "items": { - "$ref": "#/definitions/schema" - } - }, - "properties": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/schema" - }, - "default": {} - }, - "discriminator": { - "type": "string" }, - "readOnly": { - "type": "boolean", - "default": false - }, - "xml": { - "$ref": "#/definitions/xml" + "http://asyncapi.com/definitions/1.0.0/contact.json": { + "id": "http://asyncapi.com/definitions/1.0.0/contact.json", + "type": "object", + "description": "Contact information for the owners of the API.", + "additionalProperties": false, + "properties": { + "name": { + "type": "string", + "description": "The identifying name of the contact person/organization." + }, + "url": { + "type": "string", + "description": "The URL pointing to the contact information.", + "format": "uri" + }, + "email": { + "type": "string", + "description": "The email address of the contact person/organization.", + "format": "email" + } + }, + "patternProperties": { + "^x-": { + "$ref": "http://asyncapi.com/definitions/1.0.0/vendorExtension.json" + } + } }, - "externalDocs": { - "$ref": "#/definitions/externalDocs" + "http://asyncapi.com/definitions/1.0.0/license.json": { + "id": "http://asyncapi.com/definitions/1.0.0/license.json", + "type": "object", + "required": [ + "name" + ], + "additionalProperties": false, + "properties": { + "name": { + "type": "string", + "description": "The name of the license type. It's encouraged to use an OSI compatible license." + }, + "url": { + "type": "string", + "description": "The URL pointing to the license.", + "format": "uri" + } + }, + "patternProperties": { + "^x-": { + "$ref": "http://asyncapi.com/definitions/1.0.0/vendorExtension.json" + } + } }, - "example": {} - }, - "additionalProperties": false - }, - "xml": { - "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": { - "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" - } - } - }, - "topicItem": { - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^x-": { - "$ref": "#/definitions/vendorExtension" - } - }, - "minProperties": 1, - "properties": { - "$ref": { - "type": "string" + "http://asyncapi.com/definitions/1.0.0/server.json": { + "id": "http://asyncapi.com/definitions/1.0.0/server.json", + "type": "object", + "description": "An object representing a Server.", + "required": [ + "url", + "scheme" + ], + "additionalProperties": false, + "patternProperties": { + "^x-": { + "$ref": "http://asyncapi.com/definitions/1.0.0/vendorExtension.json" + } + }, + "properties": { + "url": { + "type": "string" + }, + "description": { + "type": "string" + }, + "scheme": { + "type": "string", + "description": "The transfer protocol.", + "enum": [ + "kafka", + "kafka-secure", + "amqp", + "amqps", + "mqtt", + "mqtts", + "secure-mqtt", + "ws", + "wss", + "stomp", + "stomps" + ] + }, + "schemeVersion": { + "type": "string" + }, + "variables": { + "$ref": "http://asyncapi.com/definitions/1.0.0/serverVariables.json" + } + } }, - "publish": { - "$ref": "#/definitions/message" + "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" + } }, - "subscribe": { - "$ref": "#/definitions/message" + "http://asyncapi.com/definitions/1.0.0/serverVariable.json": { + "id": "http://asyncapi.com/definitions/1.0.0/serverVariable.json", + "type": "object", + "description": "An object representing a Server Variable for server URL template substitution.", + "minProperties": 1, + "additionalProperties": false, + "patternProperties": { + "^x-": { + "$ref": "http://asyncapi.com/definitions/1.0.0/vendorExtension.json" + } + }, + "properties": { + "enum": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + }, + "default": { + "type": "string" + }, + "description": { + "type": "string" + } + } }, - "deprecated": { - "type": "boolean", - "default": false - } - } - }, - "message": { - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^x-": { - "$ref": "#/definitions/vendorExtension" - } - }, - "properties": { - "$ref": { - "type": "string" + "http://asyncapi.com/definitions/1.0.0/topics.json": { + "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": "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 + } + } }, - "headers": { - "$ref": "#/definitions/schema" + "http://asyncapi.com/definitions/1.0.0/message.json": { + "id": "http://asyncapi.com/definitions/1.0.0/message.json", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-": { + "$ref": "http://asyncapi.com/definitions/1.0.0/vendorExtension.json" + } + }, + "properties": { + "$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", + "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": {} + } }, - "payload": { - "$ref": "#/definitions/schema" + "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": {} + }, + "discriminator": { + "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 + }, + "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": "#" + } + }, + "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" + }, + "additionalItems": { + "anyOf": [ + { + "type": "boolean" + }, + { + "$ref": "#" + } + ], + "default": {} + }, + "items": { + "anyOf": [ + { + "$ref": "#" + }, + { + "$ref": "#/definitions/schemaArray" + } + ], + "default": {} + }, + "maxItems": { + "$ref": "#/definitions/positiveInteger" + }, + "minItems": { + "$ref": "#/definitions/positiveIntegerDefault0" + }, + "uniqueItems": { + "type": "boolean", + "default": false + }, + "maxProperties": { + "$ref": "#/definitions/positiveInteger" + }, + "minProperties": { + "$ref": "#/definitions/positiveIntegerDefault0" + }, + "required": { + "$ref": "#/definitions/stringArray" + }, + "additionalProperties": { + "anyOf": [ + { + "type": "boolean" + }, + { + "$ref": "#" + } + ], + "default": {} + }, + "definitions": { + "type": "object", + "additionalProperties": { + "$ref": "#" + }, + "default": {} + }, + "properties": { + "type": "object", + "additionalProperties": { + "$ref": "#" + }, + "default": {} + }, + "patternProperties": { + "type": "object", + "additionalProperties": { + "$ref": "#" + }, + "default": {} + }, + "dependencies": { + "type": "object", + "additionalProperties": { + "anyOf": [ + { + "$ref": "#" + }, + { + "$ref": "#/definitions/stringArray" + } + ] + } + }, + "enum": { + "type": "array", + "minItems": 1, + "uniqueItems": true + }, + "type": { + "anyOf": [ + { + "$ref": "#/definitions/simpleTypes" + }, + { + "type": "array", + "items": { + "$ref": "#/definitions/simpleTypes" + }, + "minItems": 1, + "uniqueItems": true + } + ] + }, + "format": { + "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" + }, + "namespace": { + "type": "string" + }, + "prefix": { + "type": "string" + }, + "attribute": { + "type": "boolean", + "default": false + }, + "wrapped": { + "type": "boolean", + "default": false + } + } }, - "tags": { - "type": "array", - "items": { - "$ref": "#/definitions/tag" - }, - "uniqueItems": true + "http://asyncapi.com/definitions/1.0.0/externalDocs.json": { + "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" + } + }, + "patternProperties": { + "^x-": { + "$ref": "http://asyncapi.com/definitions/1.0.0/vendorExtension.json" + } + } }, - "summary": { - "type": "string", - "description": "A brief summary of the message." + "http://asyncapi.com/definitions/1.0.0/tag.json": { + "id": "http://asyncapi.com/definitions/1.0.0/tag.json", + "type": "object", + "additionalProperties": false, + "required": [ + "name" + ], + "properties": { + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "externalDocs": { + "$ref": "http://asyncapi.com/definitions/1.0.0/externalDocs.json" + } + }, + "patternProperties": { + "^x-": { + "$ref": "http://asyncapi.com/definitions/1.0.0/vendorExtension.json" + } + } }, - "description": { - "type": "string", - "description": "A longer description of the message. CommonMark is allowed." + "http://asyncapi.com/definitions/1.0.0/components.json": { + "id": "http://asyncapi.com/definitions/1.0.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.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" + } + ] + } + } + } + } }, - "externalDocs": { - "$ref": "#/definitions/externalDocs" + "http://asyncapi.com/definitions/1.0.0/schemas.json": { + "id": "http://asyncapi.com/definitions/1.0.0/schemas.json", + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/1.0.0/schema.json" + }, + "description": "JSON objects describing schemas the API uses." }, - "deprecated": { - "type": "boolean", - "default": false + "http://asyncapi.com/definitions/1.0.0/messages.json": { + "id": "http://asyncapi.com/definitions/1.0.0/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", + "type": "object", + "required": [ + "$ref" + ], + "properties": { + "$ref": { + "type": "string", + "format": "uri" + } + } }, - "example": {} - } - }, - "vendorExtension": { - "description": "Any property starting with x- is valid.", - "additionalProperties": true, - "additionalItems": true - }, - "tag": { - "type": "object", - "additionalProperties": false, - "required": [ - "name" - ], - "properties": { - "name": { - "type": "string" - }, - "description": { - "type": "string" + "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" + } + ] }, - "externalDocs": { - "$ref": "#/definitions/externalDocs" - } - }, - "patternProperties": { - "^x-": { - "$ref": "#/definitions/vendorExtension" - } - } - }, - "SecurityScheme": { - "oneOf": [ - { "$ref": "#/definitions/userPassword" }, - { "$ref": "#/definitions/apiKey" }, - { "$ref": "#/definitions/X509" }, - { "$ref": "#/definitions/symmetricEncryption" }, - { "$ref": "#/definitions/asymmetricEncryption" }, - { "$ref": "#/definitions/HTTPSecurityScheme" } - ] - }, - "userPassword": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "userPassword" - ] - }, - "description": { - "type": "string" - } - }, - "patternProperties": { - "^x-": {} - }, - "additionalProperties": false - }, - "apiKey": { - "type": "object", - "required": [ - "type", - "in" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "apiKey" - ] - }, - "in": { - "type": "string", - "enum": [ - "user", - "password" - ] - }, - "description": { - "type": "string" - } - }, - "patternProperties": { - "^x-": {} - }, - "additionalProperties": false - }, - "X509": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "X509" - ] - }, - "description": { - "type": "string" - } - }, - "patternProperties": { - "^x-": {} - }, - "additionalProperties": false - }, - "symmetricEncryption": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "symmetricEncryption" - ] - }, - "description": { - "type": "string" - } - }, - "patternProperties": { - "^x-": {} - }, - "additionalProperties": false - }, - "asymmetricEncryption": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "asymmetricEncryption" - ] - }, - "description": { - "type": "string" - } - }, - "patternProperties": { - "^x-": {} - }, - "additionalProperties": false - }, - "HTTPSecurityScheme": { - "oneOf": [ - { "$ref": "#/definitions/NonBearerHTTPSecurityScheme" }, - { "$ref": "#/definitions/BearerHTTPSecurityScheme" }, - { "$ref": "#/definitions/APIKeyHTTPSecurityScheme" } - ] - }, - "NonBearerHTTPSecurityScheme": { - "not": { - "type": "object", - "properties": { - "scheme": { - "type": "string", - "enum": [ - "bearer" + "http://asyncapi.com/definitions/1.0.0/userPassword.json": { + "id": "http://asyncapi.com/definitions/1.0.0/userPassword.json", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "userPassword" + ] + }, + "description": { + "type": "string" + } + }, + "patternProperties": { + "^x-": {} + }, + "additionalProperties": false + }, + "http://asyncapi.com/definitions/1.0.0/apiKey.json": { + "id": "http://asyncapi.com/definitions/1.0.0/apiKey.json", + "type": "object", + "required": [ + "type", + "in" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "apiKey" + ] + }, + "in": { + "type": "string", + "enum": [ + "user", + "password" + ] + }, + "description": { + "type": "string" + } + }, + "patternProperties": { + "^x-": {} + }, + "additionalProperties": false + }, + "http://asyncapi.com/definitions/1.0.0/X509.json": { + "id": "http://asyncapi.com/definitions/1.0.0/X509.json", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "X509" + ] + }, + "description": { + "type": "string" + } + }, + "patternProperties": { + "^x-": {} + }, + "additionalProperties": false + }, + "http://asyncapi.com/definitions/1.0.0/symmetricEncryption.json": { + "id": "http://asyncapi.com/definitions/1.0.0/symmetricEncryption.json", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "symmetricEncryption" + ] + }, + "description": { + "type": "string" + } + }, + "patternProperties": { + "^x-": {} + }, + "additionalProperties": false + }, + "http://asyncapi.com/definitions/1.0.0/asymmetricEncryption.json": { + "id": "http://asyncapi.com/definitions/1.0.0/asymmetricEncryption.json", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "asymmetricEncryption" + ] + }, + "description": { + "type": "string" + } + }, + "patternProperties": { + "^x-": {} + }, + "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" + } ] - } - } - }, - "type": "object", - "required": [ - "scheme", - "type" - ], - "properties": { - "scheme": { - "type": "string" - }, - "description": { - "type": "string" - }, - "type": { - "type": "string", - "enum": [ - "http" - ] - } - }, - "patternProperties": { - "^x-": {} - }, - "additionalProperties": false - }, - "BearerHTTPSecurityScheme": { - "type": "object", - "required": [ - "type", - "scheme" - ], - "properties": { - "scheme": { - "type": "string", - "enum": [ - "bearer" - ] - }, - "bearerFormat": { - "type": "string" - }, - "type": { - "type": "string", - "enum": [ - "http" - ] - }, - "description": { - "type": "string" - } - }, - "patternProperties": { - "^x-": {} - }, - "additionalProperties": false - }, - "APIKeyHTTPSecurityScheme": { - "type": "object", - "required": [ - "type", - "name", - "in" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "httpApiKey" - ] - }, - "name": { - "type": "string" - }, - "in": { - "type": "string", - "enum": [ - "header", - "query", - "cookie" - ] - }, - "description": { - "type": "string" - } - }, - "patternProperties": { - "^x-": {} - }, - "additionalProperties": false - }, - "SecurityRequirement": { - "type": "object", - "additionalProperties": { - "type": "array", - "items": { - "type": "string" + }, + "http://asyncapi.com/definitions/1.0.0/NonBearerHTTPSecurityScheme.json": { + "id": "http://asyncapi.com/definitions/1.0.0/NonBearerHTTPSecurityScheme.json", + "not": { + "type": "object", + "properties": { + "scheme": { + "type": "string", + "enum": [ + "bearer" + ] + } + } + }, + "type": "object", + "required": [ + "scheme", + "type" + ], + "properties": { + "scheme": { + "type": "string" + }, + "description": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "http" + ] + } + }, + "patternProperties": { + "^x-": {} + }, + "additionalProperties": false + }, + "http://asyncapi.com/definitions/1.0.0/BearerHTTPSecurityScheme.json": { + "id": "http://asyncapi.com/definitions/1.0.0/BearerHTTPSecurityScheme.json", + "type": "object", + "required": [ + "type", + "scheme" + ], + "properties": { + "scheme": { + "type": "string", + "enum": [ + "bearer" + ] + }, + "bearerFormat": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "http" + ] + }, + "description": { + "type": "string" + } + }, + "patternProperties": { + "^x-": {} + }, + "additionalProperties": false + }, + "http://asyncapi.com/definitions/1.0.0/APIKeyHTTPSecurityScheme.json": { + "id": "http://asyncapi.com/definitions/1.0.0/APIKeyHTTPSecurityScheme.json", + "type": "object", + "required": [ + "type", + "name", + "in" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "httpApiKey" + ] + }, + "name": { + "type": "string" + }, + "in": { + "type": "string", + "enum": [ + "header", + "query", + "cookie" + ] + }, + "description": { + "type": "string" + } + }, + "patternProperties": { + "^x-": {} + }, + "additionalProperties": false + }, + "http://asyncapi.com/definitions/1.0.0/SecurityRequirement.json": { + "id": "http://asyncapi.com/definitions/1.0.0/SecurityRequirement.json", + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "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" }, - "enum": { - "$ref": "http://json-schema.org/draft-04/schema#/properties/enum" - } - } -} + "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 a689a7e3..7af355df 100644 --- a/schemas/1.1.0.json +++ b/schemas/1.1.0.json @@ -1,921 +1,1155 @@ { - "title": "AsyncAPI 1.1.0 schema.", - "id": "http://asyncapi.hitchhq.com/v1/schema.json#", - "$schema": "http://json-schema.org/draft-04/schema#", - "type": "object", - "required": [ - "asyncapi", - "info", - "topics" - ], - "additionalProperties": false, - "patternProperties": { - "^x-": { - "$ref": "#/definitions/vendorExtension" - } - }, - "properties": { - "asyncapi": { - "type": "string", - "enum": [ - "1.0.0", - "1.1.0" - ], - "description": "The AsyncAPI specification version of this document." - }, - "info": { - "$ref": "#/definitions/info" - }, - "baseTopic": { - "type": "string", - "pattern": "^[^/.]", - "description": "The base topic to the API. Example: 'hitch'.", - "default": "" - }, - "servers": { - "type": "array", - "items": { - "$ref": "#/definitions/server" - }, - "uniqueItems": true - }, - "topics": { - "$ref": "#/definitions/topics" - }, - "components": { - "$ref": "#/definitions/components" - }, - "tags": { - "type": "array", - "items": { - "$ref": "#/definitions/tag" - }, - "uniqueItems": true - }, - "security": { - "type": "array", - "items": { - "$ref": "#/definitions/SecurityRequirement" - } - }, - "externalDocs": { - "$ref": "#/definitions/externalDocs" - } - }, - "definitions": { - "Reference": { - "type": "object", - "required": [ - "$ref" - ], - "properties": { - "$ref": { - "type": "string", - "format": "uri" - } - } - }, - "info": { - "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": { - "type": "object", - "description": "Contact information for the owners of the API.", - "additionalProperties": false, - "properties": { - "name": { - "type": "string", - "description": "The identifying name of the contact person/organization." - }, - "url": { - "type": "string", - "description": "The URL pointing to the contact information.", - "format": "uri" - }, - "email": { - "type": "string", - "description": "The email address of the contact person/organization.", - "format": "email" - } - }, - "patternProperties": { + "id": "http://asyncapi.com/definitions/1.1.0/asyncapi.json", + "$schema": "http://json-schema.org/draft-04/schema", + "title": "AsyncAPI 1.1.0 schema.", + "type": "object", + "required": [ + "asyncapi", + "info", + "topics" + ], + "additionalProperties": false, + "patternProperties": { "^x-": { - "$ref": "#/definitions/vendorExtension" + "$ref": "http://asyncapi.com/definitions/1.1.0/vendorExtension.json" } - } }, - "license": { - "type": "object", - "required": [ - "name" - ], - "additionalProperties": false, - "properties": { - "name": { - "type": "string", - "description": "The name of the license type. It's encouraged to use an OSI compatible license." - }, - "url": { - "type": "string", - "description": "The URL pointing to the license.", - "format": "uri" - } - }, - "patternProperties": { - "^x-": { - "$ref": "#/definitions/vendorExtension" - } - } - }, - "server": { - "type": "object", - "description": "An object representing a Server.", - "required": [ - "url", - "scheme" - ], - "additionalProperties": false, - "patternProperties": { - "^x-": { - "$ref": "#/definitions/vendorExtension" - } - }, - "properties": { - "url": { - "type": "string" - }, - "description": { - "type": "string" - }, - "scheme": { - "type": "string", - "description": "The transfer protocol.", - "enum": [ - "kafka", - "kafka-secure", - "amqp", - "amqps", - "mqtt", - "mqtts", - "secure-mqtt", - "ws", - "wss", - "stomp", - "stomps", - "jms" - ] - }, - "schemeVersion": { - "type": "string" - }, - "variables": { - "$ref": "#/definitions/serverVariables" - } - } - }, - "serverVariables": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/serverVariable" - } - }, - "serverVariable": { - "type": "object", - "description": "An object representing a Server Variable for server URL template substitution.", - "minProperties": 1, - "additionalProperties": false, - "patternProperties": { - "^x-": { - "$ref": "#/definitions/vendorExtension" - } - }, - "properties": { - "enum": { - "type": "array", - "items": { - "type": "string" - }, - "uniqueItems": true - }, - "default": { - "type": "string" - }, - "description": { - "type": "string" - } - } - }, - "topics": { - "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 - }, - "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": { - "^[a-zA-Z0-9\\.\\-_]+$": { - "oneOf": [ - { "$ref": "#/definitions/Reference" }, - { "$ref": "#/definitions/SecurityScheme" } - ] - } - } - } - } - }, - "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." - }, - "schema": { - "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": "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" + "properties": { + "asyncapi": { + "type": "string", + "enum": [ + "1.0.0", + "1.1.0" + ], + "description": "The AsyncAPI specification version of this document." }, - "exclusiveMinimum": { - "$ref": "http://json-schema.org/draft-04/schema#/properties/exclusiveMinimum" + "info": { + "$ref": "http://asyncapi.com/definitions/1.1.0/info.json" }, - "maxLength": { - "$ref": "http://json-schema.org/draft-04/schema#/definitions/positiveInteger" + "baseTopic": { + "type": "string", + "pattern": "^[^/.]", + "description": "The base topic to the API. Example: 'hitch'.", + "default": "" + }, + "servers": { + "type": "array", + "items": { + "$ref": "http://asyncapi.com/definitions/1.1.0/server.json" + }, + "uniqueItems": true }, - "minLength": { - "$ref": "http://json-schema.org/draft-04/schema#/definitions/positiveIntegerDefault0" + "topics": { + "$ref": "http://asyncapi.com/definitions/1.1.0/topics.json" }, - "pattern": { - "$ref": "http://json-schema.org/draft-04/schema#/properties/pattern" + "components": { + "$ref": "http://asyncapi.com/definitions/1.1.0/components.json" }, - "maxItems": { - "$ref": "http://json-schema.org/draft-04/schema#/definitions/positiveInteger" + "tags": { + "type": "array", + "items": { + "$ref": "http://asyncapi.com/definitions/1.1.0/tag.json" + }, + "uniqueItems": true }, - "minItems": { - "$ref": "http://json-schema.org/draft-04/schema#/definitions/positiveIntegerDefault0" + "security": { + "type": "array", + "items": { + "$ref": "http://asyncapi.com/definitions/1.1.0/SecurityRequirement.json" + } }, - "uniqueItems": { - "$ref": "http://json-schema.org/draft-04/schema#/properties/uniqueItems" + "externalDocs": { + "$ref": "http://asyncapi.com/definitions/1.1.0/externalDocs.json" + } + }, + "definitions": { + "http://asyncapi.com/definitions/1.1.0/vendorExtension.json": { + "id": "http://asyncapi.com/definitions/1.1.0/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" + } + } }, - "maxProperties": { - "$ref": "http://json-schema.org/draft-04/schema#/definitions/positiveInteger" + "http://asyncapi.com/definitions/1.1.0/contact.json": { + "id": "http://asyncapi.com/definitions/1.1.0/contact.json", + "type": "object", + "description": "Contact information for the owners of the API.", + "additionalProperties": false, + "properties": { + "name": { + "type": "string", + "description": "The identifying name of the contact person/organization." + }, + "url": { + "type": "string", + "description": "The URL pointing to the contact information.", + "format": "uri" + }, + "email": { + "type": "string", + "description": "The email address of the contact person/organization.", + "format": "email" + } + }, + "patternProperties": { + "^x-": { + "$ref": "http://asyncapi.com/definitions/1.1.0/vendorExtension.json" + } + } }, - "minProperties": { - "$ref": "http://json-schema.org/draft-04/schema#/definitions/positiveIntegerDefault0" + "http://asyncapi.com/definitions/1.1.0/license.json": { + "id": "http://asyncapi.com/definitions/1.1.0/license.json", + "type": "object", + "required": [ + "name" + ], + "additionalProperties": false, + "properties": { + "name": { + "type": "string", + "description": "The name of the license type. It's encouraged to use an OSI compatible license." + }, + "url": { + "type": "string", + "description": "The URL pointing to the license.", + "format": "uri" + } + }, + "patternProperties": { + "^x-": { + "$ref": "http://asyncapi.com/definitions/1.1.0/vendorExtension.json" + } + } }, - "required": { - "$ref": "http://json-schema.org/draft-04/schema#/definitions/stringArray" + "http://asyncapi.com/definitions/1.1.0/server.json": { + "id": "http://asyncapi.com/definitions/1.1.0/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" + } + }, + "properties": { + "url": { + "type": "string" + }, + "description": { + "type": "string" + }, + "scheme": { + "type": "string", + "description": "The transfer protocol.", + "enum": [ + "kafka", + "kafka-secure", + "amqp", + "amqps", + "mqtt", + "mqtts", + "secure-mqtt", + "ws", + "wss", + "stomp", + "stomps", + "jms" + ] + }, + "schemeVersion": { + "type": "string" + }, + "variables": { + "$ref": "http://asyncapi.com/definitions/1.1.0/serverVariables.json" + } + } }, - "enum": { - "$ref": "http://json-schema.org/draft-04/schema#/properties/enum" + "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" + } }, - "additionalProperties": { - "anyOf": [ - { - "$ref": "#/definitions/schema" + "http://asyncapi.com/definitions/1.1.0/serverVariable.json": { + "id": "http://asyncapi.com/definitions/1.1.0/serverVariable.json", + "type": "object", + "description": "An object representing a Server Variable for server URL template substitution.", + "minProperties": 1, + "additionalProperties": false, + "patternProperties": { + "^x-": { + "$ref": "http://asyncapi.com/definitions/1.1.0/vendorExtension.json" + } }, - { - "type": "boolean" - } - ], - "default": {} - }, - "type": { - "$ref": "http://json-schema.org/draft-04/schema#/properties/type" - }, - "items": { - "anyOf": [ - { - "$ref": "#/definitions/schema" - }, - { - "type": "array", - "minItems": 1, - "items": { - "$ref": "#/definitions/schema" - } + "properties": { + "enum": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + }, + "default": { + "type": "string" + }, + "description": { + "type": "string" + } } - ], - "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" + "http://asyncapi.com/definitions/1.1.0/topics.json": { + "id": "http://asyncapi.com/definitions/1.1.0/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.1.0/vendorExtension.json" + }, + "^[^.]": { + "$ref": "http://asyncapi.com/definitions/1.1.0/topicItem.json" + } + }, + "additionalProperties": false + }, + "http://asyncapi.com/definitions/1.1.0/topicItem.json": { + "id": "http://asyncapi.com/definitions/1.1.0/topicItem.json", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-": { + "$ref": "http://asyncapi.com/definitions/1.1.0/vendorExtension.json" + } + }, + "minProperties": 1, + "properties": { + "$ref": { + "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 + } + } }, - "example": {} - }, - "additionalProperties": false - }, - "xml": { - "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": { - "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" - } - } - }, - "topicItem": { - "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": { - "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" - } - } - }, - "operation": { - "oneOf": [ - { "$ref": "#/definitions/message" }, - { - "type": "object", - "required": [ "oneOf" ], - "additionalProperties": false, - "patternProperties": { - "^x-": { - "$ref": "#/definitions/vendorExtension" + "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" + } } - }, - "properties": { - "oneOf": { - "type": "array", - "minItems": 2, - "items": { - "$ref": "#/definitions/message" - } + }, + "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": {} + }, + "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://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": "#" + } + }, + "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" + }, + "additionalItems": { + "anyOf": [ + { + "type": "boolean" + }, + { + "$ref": "#" + } + ], + "default": {} + }, + "items": { + "anyOf": [ + { + "$ref": "#" + }, + { + "$ref": "#/definitions/schemaArray" + } + ], + "default": {} + }, + "maxItems": { + "$ref": "#/definitions/positiveInteger" + }, + "minItems": { + "$ref": "#/definitions/positiveIntegerDefault0" + }, + "uniqueItems": { + "type": "boolean", + "default": false + }, + "maxProperties": { + "$ref": "#/definitions/positiveInteger" + }, + "minProperties": { + "$ref": "#/definitions/positiveIntegerDefault0" + }, + "required": { + "$ref": "#/definitions/stringArray" + }, + "additionalProperties": { + "anyOf": [ + { + "type": "boolean" + }, + { + "$ref": "#" + } + ], + "default": {} + }, + "definitions": { + "type": "object", + "additionalProperties": { + "$ref": "#" + }, + "default": {} + }, + "properties": { + "type": "object", + "additionalProperties": { + "$ref": "#" + }, + "default": {} + }, + "patternProperties": { + "type": "object", + "additionalProperties": { + "$ref": "#" + }, + "default": {} + }, + "dependencies": { + "type": "object", + "additionalProperties": { + "anyOf": [ + { + "$ref": "#" + }, + { + "$ref": "#/definitions/stringArray" + } + ] + } + }, + "enum": { + "type": "array", + "minItems": 1, + "uniqueItems": true + }, + "type": { + "anyOf": [ + { + "$ref": "#/definitions/simpleTypes" + }, + { + "type": "array", + "items": { + "$ref": "#/definitions/simpleTypes" + }, + "minItems": 1, + "uniqueItems": true + } + ] + }, + "format": { + "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.1.0/xml.json": { + "id": "http://asyncapi.com/definitions/1.1.0/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 + } } - } - } - ] - }, - "message": { - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^x-": { - "$ref": "#/definitions/vendorExtension" - } - }, - "properties": { - "$ref": { - "type": "string" }, - "headers": { - "$ref": "#/definitions/schema" + "http://asyncapi.com/definitions/1.1.0/externalDocs.json": { + "id": "http://asyncapi.com/definitions/1.1.0/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" + } + } }, - "payload": { - "$ref": "#/definitions/schema" + "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" + } + } + } + } + ] }, - "tags": { - "type": "array", - "items": { - "$ref": "#/definitions/tag" - }, - "uniqueItems": true + "http://asyncapi.com/definitions/1.1.0/message.json": { + "id": "http://asyncapi.com/definitions/1.1.0/message.json", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-": { + "$ref": "http://asyncapi.com/definitions/1.1.0/vendorExtension.json" + } + }, + "properties": { + "$ref": { + "type": "string" + }, + "headers": { + "$ref": "http://asyncapi.com/definitions/1.1.0/schema.json" + }, + "payload": { + "$ref": "http://asyncapi.com/definitions/1.1.0/schema.json" + }, + "tags": { + "type": "array", + "items": { + "$ref": "http://asyncapi.com/definitions/1.1.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.1.0/externalDocs.json" + }, + "deprecated": { + "type": "boolean", + "default": false + }, + "example": {} + } }, - "summary": { - "type": "string", - "description": "A brief summary of the message." + "http://asyncapi.com/definitions/1.1.0/tag.json": { + "id": "http://asyncapi.com/definitions/1.1.0/tag.json", + "type": "object", + "additionalProperties": false, + "required": [ + "name" + ], + "properties": { + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "externalDocs": { + "$ref": "http://asyncapi.com/definitions/1.1.0/externalDocs.json" + } + }, + "patternProperties": { + "^x-": { + "$ref": "http://asyncapi.com/definitions/1.1.0/vendorExtension.json" + } + } }, - "description": { - "type": "string", - "description": "A longer description of the message. CommonMark is allowed." + "http://asyncapi.com/definitions/1.1.0/components.json": { + "id": "http://asyncapi.com/definitions/1.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, + "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" + } + ] + } + } + } + } }, - "externalDocs": { - "$ref": "#/definitions/externalDocs" + "http://asyncapi.com/definitions/1.1.0/schemas.json": { + "id": "http://asyncapi.com/definitions/1.1.0/schemas.json", + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/1.1.0/schema.json" + }, + "description": "JSON objects describing schemas the API uses." }, - "deprecated": { - "type": "boolean", - "default": false + "http://asyncapi.com/definitions/1.1.0/messages.json": { + "id": "http://asyncapi.com/definitions/1.1.0/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", + "type": "object", + "required": [ + "$ref" + ], + "properties": { + "$ref": { + "type": "string", + "format": "uri" + } + } }, - "example": {} - } - }, - "vendorExtension": { - "description": "Any property starting with x- is valid.", - "additionalProperties": true, - "additionalItems": true - }, - "tag": { - "type": "object", - "additionalProperties": false, - "required": [ - "name" - ], - "properties": { - "name": { - "type": "string" - }, - "description": { - "type": "string" + "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" + } + ] }, - "externalDocs": { - "$ref": "#/definitions/externalDocs" - } - }, - "patternProperties": { - "^x-": { - "$ref": "#/definitions/vendorExtension" - } - } - }, - "SecurityScheme": { - "oneOf": [ - { "$ref": "#/definitions/userPassword" }, - { "$ref": "#/definitions/apiKey" }, - { "$ref": "#/definitions/X509" }, - { "$ref": "#/definitions/symmetricEncryption" }, - { "$ref": "#/definitions/asymmetricEncryption" }, - { "$ref": "#/definitions/HTTPSecurityScheme" } - ] - }, - "userPassword": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "userPassword" - ] - }, - "description": { - "type": "string" - } - }, - "patternProperties": { - "^x-": {} - }, - "additionalProperties": false - }, - "apiKey": { - "type": "object", - "required": [ - "type", - "in" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "apiKey" - ] - }, - "in": { - "type": "string", - "enum": [ - "user", - "password" - ] - }, - "description": { - "type": "string" - } - }, - "patternProperties": { - "^x-": {} - }, - "additionalProperties": false - }, - "X509": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "X509" - ] - }, - "description": { - "type": "string" - } - }, - "patternProperties": { - "^x-": {} - }, - "additionalProperties": false - }, - "symmetricEncryption": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "symmetricEncryption" - ] - }, - "description": { - "type": "string" - } - }, - "patternProperties": { - "^x-": {} - }, - "additionalProperties": false - }, - "asymmetricEncryption": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "asymmetricEncryption" - ] - }, - "description": { - "type": "string" - } - }, - "patternProperties": { - "^x-": {} - }, - "additionalProperties": false - }, - "HTTPSecurityScheme": { - "oneOf": [ - { "$ref": "#/definitions/NonBearerHTTPSecurityScheme" }, - { "$ref": "#/definitions/BearerHTTPSecurityScheme" }, - { "$ref": "#/definitions/APIKeyHTTPSecurityScheme" } - ] - }, - "NonBearerHTTPSecurityScheme": { - "not": { - "type": "object", - "properties": { - "scheme": { - "type": "string", - "enum": [ - "bearer" + "http://asyncapi.com/definitions/1.1.0/userPassword.json": { + "id": "http://asyncapi.com/definitions/1.1.0/userPassword.json", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "userPassword" + ] + }, + "description": { + "type": "string" + } + }, + "patternProperties": { + "^x-": {} + }, + "additionalProperties": false + }, + "http://asyncapi.com/definitions/1.1.0/apiKey.json": { + "id": "http://asyncapi.com/definitions/1.1.0/apiKey.json", + "type": "object", + "required": [ + "type", + "in" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "apiKey" + ] + }, + "in": { + "type": "string", + "enum": [ + "user", + "password" + ] + }, + "description": { + "type": "string" + } + }, + "patternProperties": { + "^x-": {} + }, + "additionalProperties": false + }, + "http://asyncapi.com/definitions/1.1.0/X509.json": { + "id": "http://asyncapi.com/definitions/1.1.0/X509.json", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "X509" + ] + }, + "description": { + "type": "string" + } + }, + "patternProperties": { + "^x-": {} + }, + "additionalProperties": false + }, + "http://asyncapi.com/definitions/1.1.0/symmetricEncryption.json": { + "id": "http://asyncapi.com/definitions/1.1.0/symmetricEncryption.json", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "symmetricEncryption" + ] + }, + "description": { + "type": "string" + } + }, + "patternProperties": { + "^x-": {} + }, + "additionalProperties": false + }, + "http://asyncapi.com/definitions/1.1.0/asymmetricEncryption.json": { + "id": "http://asyncapi.com/definitions/1.1.0/asymmetricEncryption.json", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "asymmetricEncryption" + ] + }, + "description": { + "type": "string" + } + }, + "patternProperties": { + "^x-": {} + }, + "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" + } ] - } - } - }, - "type": "object", - "required": [ - "scheme", - "type" - ], - "properties": { - "scheme": { - "type": "string" - }, - "description": { - "type": "string" - }, - "type": { - "type": "string", - "enum": [ - "http" - ] - } - }, - "patternProperties": { - "^x-": {} - }, - "additionalProperties": false - }, - "BearerHTTPSecurityScheme": { - "type": "object", - "required": [ - "type", - "scheme" - ], - "properties": { - "scheme": { - "type": "string", - "enum": [ - "bearer" - ] - }, - "bearerFormat": { - "type": "string" - }, - "type": { - "type": "string", - "enum": [ - "http" - ] - }, - "description": { - "type": "string" - } - }, - "patternProperties": { - "^x-": {} - }, - "additionalProperties": false - }, - "APIKeyHTTPSecurityScheme": { - "type": "object", - "required": [ - "type", - "name", - "in" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "httpApiKey" - ] - }, - "name": { - "type": "string" - }, - "in": { - "type": "string", - "enum": [ - "header", - "query", - "cookie" - ] - }, - "description": { - "type": "string" - } - }, - "patternProperties": { - "^x-": {} - }, - "additionalProperties": false - }, - "SecurityRequirement": { - "type": "object", - "additionalProperties": { - "type": "array", - "items": { - "type": "string" + }, + "http://asyncapi.com/definitions/1.1.0/NonBearerHTTPSecurityScheme.json": { + "id": "http://asyncapi.com/definitions/1.1.0/NonBearerHTTPSecurityScheme.json", + "not": { + "type": "object", + "properties": { + "scheme": { + "type": "string", + "enum": [ + "bearer" + ] + } + } + }, + "type": "object", + "required": [ + "scheme", + "type" + ], + "properties": { + "scheme": { + "type": "string" + }, + "description": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "http" + ] + } + }, + "patternProperties": { + "^x-": {} + }, + "additionalProperties": false + }, + "http://asyncapi.com/definitions/1.1.0/BearerHTTPSecurityScheme.json": { + "id": "http://asyncapi.com/definitions/1.1.0/BearerHTTPSecurityScheme.json", + "type": "object", + "required": [ + "type", + "scheme" + ], + "properties": { + "scheme": { + "type": "string", + "enum": [ + "bearer" + ] + }, + "bearerFormat": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "http" + ] + }, + "description": { + "type": "string" + } + }, + "patternProperties": { + "^x-": {} + }, + "additionalProperties": false + }, + "http://asyncapi.com/definitions/1.1.0/APIKeyHTTPSecurityScheme.json": { + "id": "http://asyncapi.com/definitions/1.1.0/APIKeyHTTPSecurityScheme.json", + "type": "object", + "required": [ + "type", + "name", + "in" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "httpApiKey" + ] + }, + "name": { + "type": "string" + }, + "in": { + "type": "string", + "enum": [ + "header", + "query", + "cookie" + ] + }, + "description": { + "type": "string" + } + }, + "patternProperties": { + "^x-": {} + }, + "additionalProperties": false + }, + "http://asyncapi.com/definitions/1.1.0/SecurityRequirement.json": { + "id": "http://asyncapi.com/definitions/1.1.0/SecurityRequirement.json", + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "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" }, - "enum": { - "$ref": "http://json-schema.org/draft-04/schema#/properties/enum" - } - } -} + "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 8d382d9c..d523b305 100644 --- a/schemas/1.2.0.json +++ b/schemas/1.2.0.json @@ -1,1084 +1,1321 @@ { - "title": "AsyncAPI 1.2.0 schema.", - "id": "http://asyncapi.hitchhq.com/v1/schema.json#", - "$schema": "http://json-schema.org/draft-04/schema#", - "type": "object", - "required": [ - "asyncapi", - "info" - ], - "oneOf": [ - { - "required": [ - "topics" - ] - }, - { - "required": [ - "stream" - ] - }, - { - "required": [ - "events" - ] - } - ], - "additionalProperties": false, - "patternProperties": { - "^x-": { - "$ref": "#/definitions/vendorExtension" - } - }, - "properties": { - "asyncapi": { - "type": "string", - "enum": [ - "1.0.0", - "1.1.0", - "1.2.0" - ], - "description": "The AsyncAPI specification version of this document." - }, - "info": { - "$ref": "#/definitions/info" - }, - "baseTopic": { - "type": "string", - "pattern": "^[^/.]", - "description": "The base topic to the API. Example: 'hitch'.", - "default": "" - }, - "servers": { - "type": "array", - "items": { - "$ref": "#/definitions/server" - }, - "uniqueItems": true - }, - "topics": { - "$ref": "#/definitions/topics" - }, - "stream": { - "$ref": "#/definitions/stream", - "description": "The list of messages a consumer can read or write from/to a streaming API." - }, - "events": { - "$ref": "#/definitions/events", - "description": "The list of messages an events API sends and/or receives." - }, - "components": { - "$ref": "#/definitions/components" - }, - "tags": { - "type": "array", - "items": { - "$ref": "#/definitions/tag" - }, - "uniqueItems": true - }, - "security": { - "type": "array", - "items": { - "$ref": "#/definitions/SecurityRequirement" - } - }, - "externalDocs": { - "$ref": "#/definitions/externalDocs" - } - }, - "definitions": { - "Reference": { - "type": "object", - "required": [ - "$ref" - ], - "properties": { - "$ref": { - "type": "string", - "format": "uri" - } - } - }, - "info": { - "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": { - "type": "object", - "description": "Contact information for the owners of the API.", - "additionalProperties": false, - "properties": { - "name": { - "type": "string", - "description": "The identifying name of the contact person/organization." - }, - "url": { - "type": "string", - "description": "The URL pointing to the contact information.", - "format": "uri" + "id": "http://asyncapi.com/definitions/1.2.0/asyncapi.json", + "$schema": "http://json-schema.org/draft-04/schema", + "title": "AsyncAPI 1.2.0 schema.", + "type": "object", + "required": [ + "asyncapi", + "info" + ], + "oneOf": [ + { + "required": [ + "topics" + ] }, - "email": { - "type": "string", - "description": "The email address of the contact person/organization.", - "format": "email" - } - }, - "patternProperties": { - "^x-": { - "$ref": "#/definitions/vendorExtension" - } - } - }, - "license": { - "type": "object", - "required": [ - "name" - ], - "additionalProperties": false, - "properties": { - "name": { - "type": "string", - "description": "The name of the license type. It's encouraged to use an OSI compatible license." + { + "required": [ + "stream" + ] }, - "url": { - "type": "string", - "description": "The URL pointing to the license.", - "format": "uri" + { + "required": [ + "events" + ] } - }, - "patternProperties": { + ], + "additionalProperties": false, + "patternProperties": { "^x-": { - "$ref": "#/definitions/vendorExtension" + "$ref": "http://asyncapi.com/definitions/1.2.0/vendorExtension.json" } - } }, - "server": { - "type": "object", - "description": "An object representing a Server.", - "required": [ - "url", - "scheme" - ], - "additionalProperties": false, - "patternProperties": { - "^x-": { - "$ref": "#/definitions/vendorExtension" - } - }, - "properties": { - "url": { - "type": "string" - }, - "description": { - "type": "string" + "properties": { + "asyncapi": { + "type": "string", + "enum": [ + "1.0.0", + "1.1.0", + "1.2.0" + ], + "description": "The AsyncAPI specification version of this document." }, - "scheme": { - "type": "string", - "description": "The transfer protocol.", - "enum": [ - "kafka", - "kafka-secure", - "amqp", - "amqps", - "mqtt", - "mqtts", - "secure-mqtt", - "ws", - "wss", - "stomp", - "stomps", - "jms", - "http", - "https" - ] + "info": { + "$ref": "http://asyncapi.com/definitions/1.2.0/info.json" }, - "schemeVersion": { - "type": "string" + "baseTopic": { + "type": "string", + "pattern": "^[^/.]", + "description": "The base topic to the API. Example: 'hitch'.", + "default": "" + }, + "servers": { + "type": "array", + "items": { + "$ref": "http://asyncapi.com/definitions/1.2.0/server.json" + }, + "uniqueItems": true }, - "variables": { - "$ref": "#/definitions/serverVariables" - } - } - }, - "serverVariables": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/serverVariable" - } - }, - "serverVariable": { - "type": "object", - "description": "An object representing a Server Variable for server URL template substitution.", - "minProperties": 1, - "additionalProperties": false, - "patternProperties": { - "^x-": { - "$ref": "#/definitions/vendorExtension" - } - }, - "properties": { - "enum": { - "type": "array", - "items": { - "type": "string" - }, - "uniqueItems": true + "topics": { + "$ref": "http://asyncapi.com/definitions/1.2.0/topics.json" }, - "default": { - "type": "string" + "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." }, - "description": { - "type": "string" - } - } - }, - "topics": { - "type": "object", - "description": "Relative paths to the individual topics. They must be relative to the 'baseTopic'.", - "patternProperties": { - "^x-": { - "$ref": "#/definitions/vendorExtension" + "events": { + "$ref": "http://asyncapi.com/definitions/1.2.0/events.json", + "description": "The list of messages an events API sends and/or receives." }, - "^[^.]": { - "$ref": "#/definitions/topicItem" - } - }, - "additionalProperties": false - }, - "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" + "components": { + "$ref": "http://asyncapi.com/definitions/1.2.0/components.json" }, - "messages": { - "$ref": "#/definitions/messages" + "tags": { + "type": "array", + "items": { + "$ref": "http://asyncapi.com/definitions/1.2.0/tag.json" + }, + "uniqueItems": true }, - "securitySchemes": { - "type": "object", - "patternProperties": { - "^[a-zA-Z0-9\\.\\-_]+$": { - "oneOf": [ - { "$ref": "#/definitions/Reference" }, - { "$ref": "#/definitions/SecurityScheme" } - ] + "security": { + "type": "array", + "items": { + "$ref": "http://asyncapi.com/definitions/1.2.0/SecurityRequirement.json" } - } }, - "parameters": { - "$ref": "#/definitions/parameters" + "externalDocs": { + "$ref": "http://asyncapi.com/definitions/1.2.0/externalDocs.json" } - } - }, - "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." - }, - "parameters": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/parameter" - }, - "description": "JSON objects describing re-usable topic parameters." }, - "schema": { - "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": "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": "#/definitions/schema" + "definitions": { + "http://asyncapi.com/definitions/1.2.0/vendorExtension.json": { + "id": "http://asyncapi.com/definitions/1.2.0/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" + } }, - { - "type": "boolean" + "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" + } } - ], - "default": {} - }, - "type": { - "$ref": "http://json-schema.org/draft-04/schema#/properties/type" }, - "items": { - "anyOf": [ - { - "$ref": "#/definitions/schema" + "http://asyncapi.com/definitions/1.2.0/contact.json": { + "id": "http://asyncapi.com/definitions/1.2.0/contact.json", + "type": "object", + "description": "Contact information for the owners of the API.", + "additionalProperties": false, + "properties": { + "name": { + "type": "string", + "description": "The identifying name of the contact person/organization." + }, + "url": { + "type": "string", + "description": "The URL pointing to the contact information.", + "format": "uri" + }, + "email": { + "type": "string", + "description": "The email address of the contact person/organization.", + "format": "email" + } }, - { - "type": "array", - "minItems": 1, - "items": { - "$ref": "#/definitions/schema" - } + "patternProperties": { + "^x-": { + "$ref": "http://asyncapi.com/definitions/1.2.0/vendorExtension.json" + } } - ], - "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 - }, - "xml": { - "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": { - "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" - } - } - }, - "topicItem": { - "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": { - "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." + "http://asyncapi.com/definitions/1.2.0/license.json": { + "id": "http://asyncapi.com/definitions/1.2.0/license.json", + "type": "object", + "required": [ + "name" + ], + "additionalProperties": false, + "properties": { + "name": { + "type": "string", + "description": "The name of the license type. It's encouraged to use an OSI compatible license." + }, + "url": { + "type": "string", + "description": "The URL pointing to the license.", + "format": "uri" + } + }, + "patternProperties": { + "^x-": { + "$ref": "http://asyncapi.com/definitions/1.2.0/vendorExtension.json" + } + } }, - "name": { - "type": "string", - "description": "The name of the parameter." + "http://asyncapi.com/definitions/1.2.0/server.json": { + "id": "http://asyncapi.com/definitions/1.2.0/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" + } + }, + "properties": { + "url": { + "type": "string" + }, + "description": { + "type": "string" + }, + "scheme": { + "type": "string", + "description": "The transfer protocol.", + "enum": [ + "kafka", + "kafka-secure", + "amqp", + "amqps", + "mqtt", + "mqtts", + "secure-mqtt", + "ws", + "wss", + "stomp", + "stomps", + "jms", + "http", + "https" + ] + }, + "schemeVersion": { + "type": "string" + }, + "variables": { + "$ref": "http://asyncapi.com/definitions/1.2.0/serverVariables.json" + } + } }, - "schema": { - "$ref": "#/definitions/schema" + "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" + } }, - "$ref": { - "type": "string" - } - } - }, - "operation": { - "oneOf": [ - { "$ref": "#/definitions/message" }, - { - "type": "object", - "required": [ "oneOf" ], - "additionalProperties": false, - "patternProperties": { - "^x-": { - "$ref": "#/definitions/vendorExtension" + "http://asyncapi.com/definitions/1.2.0/serverVariable.json": { + "id": "http://asyncapi.com/definitions/1.2.0/serverVariable.json", + "type": "object", + "description": "An object representing a Server Variable for server URL template substitution.", + "minProperties": 1, + "additionalProperties": false, + "patternProperties": { + "^x-": { + "$ref": "http://asyncapi.com/definitions/1.2.0/vendorExtension.json" + } + }, + "properties": { + "enum": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + }, + "default": { + "type": "string" + }, + "description": { + "type": "string" + } } - }, - "properties": { - "oneOf": { - "type": "array", - "minItems": 2, - "items": { - "$ref": "#/definitions/message" - } + }, + "http://asyncapi.com/definitions/1.2.0/topics.json": { + "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": "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/topicItem.json": { + "id": "http://asyncapi.com/definitions/1.2.0/topicItem.json", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-": { + "$ref": "http://asyncapi.com/definitions/1.2.0/vendorExtension.json" + } + }, + "minProperties": 1, + "properties": { + "$ref": { + "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 + } } - } - } - ] - }, - "stream": { - "title": "Stream Object", - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^x-": { - "$ref": "#/definitions/vendorExtension" - } - }, - "minProperties": 1, - "properties": { - "framing": { - "title": "Stream Framing Object", - "type": "object", - "patternProperties": { - "^x-": { - "$ref": "#/definitions/vendorExtension" + }, + "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." + }, + "name": { + "type": "string", + "description": "The name of the parameter." + }, + "schema": { + "$ref": "http://asyncapi.com/definitions/1.2.0/schema.json" + }, + "$ref": { + "type": "string" + } } - }, - "minProperties": 1, - "oneOf": [ - { - "additionalProperties": false, - "properties": { + }, + "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": { - "type": "string", - "enum": [ - "chunked" - ] - }, - "delimiter": { - "type": "string", - "enum": [ - "\\r\\n", - "\\n" - ], - "default": "\\r\\n" + "$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", + "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 } - } }, - { - "additionalProperties": false, - "properties": { + "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" + }, + "additionalItems": { + "anyOf": [ + { + "type": "boolean" + }, + { + "$ref": "#" + } + ], + "default": {} + }, + "items": { + "anyOf": [ + { + "$ref": "#" + }, + { + "$ref": "#/definitions/schemaArray" + } + ], + "default": {} + }, + "maxItems": { + "$ref": "#/definitions/positiveInteger" + }, + "minItems": { + "$ref": "#/definitions/positiveIntegerDefault0" + }, + "uniqueItems": { + "type": "boolean", + "default": false + }, + "maxProperties": { + "$ref": "#/definitions/positiveInteger" + }, + "minProperties": { + "$ref": "#/definitions/positiveIntegerDefault0" + }, + "required": { + "$ref": "#/definitions/stringArray" + }, + "additionalProperties": { + "anyOf": [ + { + "type": "boolean" + }, + { + "$ref": "#" + } + ], + "default": {} + }, + "definitions": { + "type": "object", + "additionalProperties": { + "$ref": "#" + }, + "default": {} + }, + "properties": { + "type": "object", + "additionalProperties": { + "$ref": "#" + }, + "default": {} + }, + "patternProperties": { + "type": "object", + "additionalProperties": { + "$ref": "#" + }, + "default": {} + }, + "dependencies": { + "type": "object", + "additionalProperties": { + "anyOf": [ + { + "$ref": "#" + }, + { + "$ref": "#/definitions/stringArray" + } + ] + } + }, + "enum": { + "type": "array", + "minItems": 1, + "uniqueItems": true + }, "type": { - "type": "string", - "enum": [ - "sse" - ] - }, - "delimiter": { - "type": "string", - "enum": [ - "\\n\\n" - ], - "default": "\\n\\n" + "anyOf": [ + { + "$ref": "#/definitions/simpleTypes" + }, + { + "type": "array", + "items": { + "$ref": "#/definitions/simpleTypes" + }, + "minItems": 1, + "uniqueItems": true + } + ] + }, + "format": { + "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.2.0/xml.json": { + "id": "http://asyncapi.com/definitions/1.2.0/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 } - } } - ] - }, - "read": { - "title": "Stream Read Object", - "type": "array", - "uniqueItems": true, - "minItems": 1, - "items": { - "$ref": "#/definitions/message" - } - }, - "write": { - "title": "Stream Write Object", - "type": "array", - "uniqueItems": true, - "minItems": 1, - "items": { - "$ref": "#/definitions/message" - } - } - } - }, - "events": { - "title": "Events Object", - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^x-": { - "$ref": "#/definitions/vendorExtension" - } - }, - "minProperties": 1, - "anyOf": [ - { - "required": [ - "receive" - ] - }, - { - "required": [ - "send" - ] - } - ], - "properties": { - "receive": { - "title": "Events Receive Object", - "type": "array", - "uniqueItems": true, - "minItems": 1, - "items": { - "$ref": "#/definitions/message" - } - }, - "send": { - "title": "Events Send Object", - "type": "array", - "uniqueItems": true, - "minItems": 1, - "items": { - "$ref": "#/definitions/message" - } - } - } - }, - "message": { - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^x-": { - "$ref": "#/definitions/vendorExtension" - } - }, - "properties": { - "$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", - "description": "A longer description of the message. CommonMark is allowed." - }, - "externalDocs": { - "$ref": "#/definitions/externalDocs" - }, - "deprecated": { - "type": "boolean", - "default": false + "http://asyncapi.com/definitions/1.2.0/externalDocs.json": { + "id": "http://asyncapi.com/definitions/1.2.0/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" + } + } }, - "example": {} - } - }, - "vendorExtension": { - "description": "Any property starting with x- is valid.", - "additionalProperties": true, - "additionalItems": true - }, - "tag": { - "type": "object", - "additionalProperties": false, - "required": [ - "name" - ], - "properties": { - "name": { - "type": "string" + "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" + } + } + } + } + ] }, - "description": { - "type": "string" + "http://asyncapi.com/definitions/1.2.0/message.json": { + "id": "http://asyncapi.com/definitions/1.2.0/message.json", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-": { + "$ref": "http://asyncapi.com/definitions/1.2.0/vendorExtension.json" + } + }, + "properties": { + "$ref": { + "type": "string" + }, + "headers": { + "$ref": "http://asyncapi.com/definitions/1.2.0/schema.json" + }, + "payload": { + "$ref": "http://asyncapi.com/definitions/1.2.0/schema.json" + }, + "tags": { + "type": "array", + "items": { + "$ref": "http://asyncapi.com/definitions/1.2.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.2.0/externalDocs.json" + }, + "deprecated": { + "type": "boolean", + "default": false + }, + "example": {} + } }, - "externalDocs": { - "$ref": "#/definitions/externalDocs" - } - }, - "patternProperties": { - "^x-": { - "$ref": "#/definitions/vendorExtension" - } - } - }, - "SecurityScheme": { - "oneOf": [ - { "$ref": "#/definitions/userPassword" }, - { "$ref": "#/definitions/apiKey" }, - { "$ref": "#/definitions/X509" }, - { "$ref": "#/definitions/symmetricEncryption" }, - { "$ref": "#/definitions/asymmetricEncryption" }, - { "$ref": "#/definitions/HTTPSecurityScheme" } - ] - }, - "userPassword": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "userPassword" - ] + "http://asyncapi.com/definitions/1.2.0/tag.json": { + "id": "http://asyncapi.com/definitions/1.2.0/tag.json", + "type": "object", + "additionalProperties": false, + "required": [ + "name" + ], + "properties": { + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "externalDocs": { + "$ref": "http://asyncapi.com/definitions/1.2.0/externalDocs.json" + } + }, + "patternProperties": { + "^x-": { + "$ref": "http://asyncapi.com/definitions/1.2.0/vendorExtension.json" + } + } }, - "description": { - "type": "string" - } - }, - "patternProperties": { - "^x-": {} - }, - "additionalProperties": false - }, - "apiKey": { - "type": "object", - "required": [ - "type", - "in" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "apiKey" - ] + "http://asyncapi.com/definitions/1.2.0/stream.json": { + "id": "http://asyncapi.com/definitions/1.2.0/stream.json", + "title": "Stream Object", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-": { + "$ref": "http://asyncapi.com/definitions/1.2.0/vendorExtension.json" + } + }, + "minProperties": 1, + "properties": { + "framing": { + "title": "Stream Framing Object", + "type": "object", + "patternProperties": { + "^x-": { + "$ref": "http://asyncapi.com/definitions/1.2.0/vendorExtension.json" + } + }, + "minProperties": 1, + "oneOf": [ + { + "additionalProperties": false, + "properties": { + "type": { + "type": "string", + "enum": [ + "chunked" + ] + }, + "delimiter": { + "type": "string", + "enum": [ + "\\r\\n", + "\\n" + ], + "default": "\\r\\n" + } + } + }, + { + "additionalProperties": false, + "properties": { + "type": { + "type": "string", + "enum": [ + "sse" + ] + }, + "delimiter": { + "type": "string", + "enum": [ + "\\n\\n" + ], + "default": "\\n\\n" + } + } + } + ] + }, + "read": { + "title": "Stream Read Object", + "type": "array", + "uniqueItems": true, + "minItems": 1, + "items": { + "$ref": "http://asyncapi.com/definitions/1.2.0/message.json" + } + }, + "write": { + "title": "Stream Write Object", + "type": "array", + "uniqueItems": true, + "minItems": 1, + "items": { + "$ref": "http://asyncapi.com/definitions/1.2.0/message.json" + } + } + } }, - "in": { - "type": "string", - "enum": [ - "user", - "password" - ] + "http://asyncapi.com/definitions/1.2.0/events.json": { + "id": "http://asyncapi.com/definitions/1.2.0/events.json", + "title": "Events Object", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-": { + "$ref": "http://asyncapi.com/definitions/1.2.0/vendorExtension.json" + } + }, + "minProperties": 1, + "anyOf": [ + { + "required": [ + "receive" + ] + }, + { + "required": [ + "send" + ] + } + ], + "properties": { + "receive": { + "title": "Events Receive Object", + "type": "array", + "uniqueItems": true, + "minItems": 1, + "items": { + "$ref": "http://asyncapi.com/definitions/1.2.0/message.json" + } + }, + "send": { + "title": "Events Send Object", + "type": "array", + "uniqueItems": true, + "minItems": 1, + "items": { + "$ref": "http://asyncapi.com/definitions/1.2.0/message.json" + } + } + } }, - "description": { - "type": "string" - } - }, - "patternProperties": { - "^x-": {} - }, - "additionalProperties": false - }, - "X509": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "X509" - ] + "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" + } + } }, - "description": { - "type": "string" - } - }, - "patternProperties": { - "^x-": {} - }, - "additionalProperties": false - }, - "symmetricEncryption": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "symmetricEncryption" - ] + "http://asyncapi.com/definitions/1.2.0/schemas.json": { + "id": "http://asyncapi.com/definitions/1.2.0/schemas.json", + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/1.2.0/schema.json" + }, + "description": "JSON objects describing schemas the API uses." }, - "description": { - "type": "string" - } - }, - "patternProperties": { - "^x-": {} - }, - "additionalProperties": false - }, - "asymmetricEncryption": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "asymmetricEncryption" - ] + "http://asyncapi.com/definitions/1.2.0/messages.json": { + "id": "http://asyncapi.com/definitions/1.2.0/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", + "type": "object", + "required": [ + "$ref" + ], + "properties": { + "$ref": { + "type": "string", + "format": "uri" + } + } }, - "description": { - "type": "string" - } - }, - "patternProperties": { - "^x-": {} - }, - "additionalProperties": false - }, - "HTTPSecurityScheme": { - "oneOf": [ - { "$ref": "#/definitions/NonBearerHTTPSecurityScheme" }, - { "$ref": "#/definitions/BearerHTTPSecurityScheme" }, - { "$ref": "#/definitions/APIKeyHTTPSecurityScheme" } - ] - }, - "NonBearerHTTPSecurityScheme": { - "not": { - "type": "object", - "properties": { - "scheme": { - "type": "string", - "enum": [ - "bearer" + "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" + } ] - } - } - }, - "type": "object", - "required": [ - "scheme", - "type" - ], - "properties": { - "scheme": { - "type": "string" - }, - "description": { - "type": "string" }, - "type": { - "type": "string", - "enum": [ - "http" - ] - } - }, - "patternProperties": { - "^x-": {} - }, - "additionalProperties": false - }, - "BearerHTTPSecurityScheme": { - "type": "object", - "required": [ - "type", - "scheme" - ], - "properties": { - "scheme": { - "type": "string", - "enum": [ - "bearer" - ] - }, - "bearerFormat": { - "type": "string" - }, - "type": { - "type": "string", - "enum": [ - "http" - ] - }, - "description": { - "type": "string" - } - }, - "patternProperties": { - "^x-": {} - }, - "additionalProperties": false - }, - "APIKeyHTTPSecurityScheme": { - "type": "object", - "required": [ - "type", - "name", - "in" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "httpApiKey" - ] + "http://asyncapi.com/definitions/1.2.0/userPassword.json": { + "id": "http://asyncapi.com/definitions/1.2.0/userPassword.json", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "userPassword" + ] + }, + "description": { + "type": "string" + } + }, + "patternProperties": { + "^x-": {} + }, + "additionalProperties": false + }, + "http://asyncapi.com/definitions/1.2.0/apiKey.json": { + "id": "http://asyncapi.com/definitions/1.2.0/apiKey.json", + "type": "object", + "required": [ + "type", + "in" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "apiKey" + ] + }, + "in": { + "type": "string", + "enum": [ + "user", + "password" + ] + }, + "description": { + "type": "string" + } + }, + "patternProperties": { + "^x-": {} + }, + "additionalProperties": false + }, + "http://asyncapi.com/definitions/1.2.0/X509.json": { + "id": "http://asyncapi.com/definitions/1.2.0/X509.json", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "X509" + ] + }, + "description": { + "type": "string" + } + }, + "patternProperties": { + "^x-": {} + }, + "additionalProperties": false + }, + "http://asyncapi.com/definitions/1.2.0/symmetricEncryption.json": { + "id": "http://asyncapi.com/definitions/1.2.0/symmetricEncryption.json", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "symmetricEncryption" + ] + }, + "description": { + "type": "string" + } + }, + "patternProperties": { + "^x-": {} + }, + "additionalProperties": false + }, + "http://asyncapi.com/definitions/1.2.0/asymmetricEncryption.json": { + "id": "http://asyncapi.com/definitions/1.2.0/asymmetricEncryption.json", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "asymmetricEncryption" + ] + }, + "description": { + "type": "string" + } + }, + "patternProperties": { + "^x-": {} + }, + "additionalProperties": false }, - "name": { - "type": "string" + "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" + } + ] }, - "in": { - "type": "string", - "enum": [ - "header", - "query", - "cookie" - ] + "http://asyncapi.com/definitions/1.2.0/NonBearerHTTPSecurityScheme.json": { + "id": "http://asyncapi.com/definitions/1.2.0/NonBearerHTTPSecurityScheme.json", + "not": { + "type": "object", + "properties": { + "scheme": { + "type": "string", + "enum": [ + "bearer" + ] + } + } + }, + "type": "object", + "required": [ + "scheme", + "type" + ], + "properties": { + "scheme": { + "type": "string" + }, + "description": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "http" + ] + } + }, + "patternProperties": { + "^x-": {} + }, + "additionalProperties": false + }, + "http://asyncapi.com/definitions/1.2.0/BearerHTTPSecurityScheme.json": { + "id": "http://asyncapi.com/definitions/1.2.0/BearerHTTPSecurityScheme.json", + "type": "object", + "required": [ + "type", + "scheme" + ], + "properties": { + "scheme": { + "type": "string", + "enum": [ + "bearer" + ] + }, + "bearerFormat": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "http" + ] + }, + "description": { + "type": "string" + } + }, + "patternProperties": { + "^x-": {} + }, + "additionalProperties": false + }, + "http://asyncapi.com/definitions/1.2.0/APIKeyHTTPSecurityScheme.json": { + "id": "http://asyncapi.com/definitions/1.2.0/APIKeyHTTPSecurityScheme.json", + "type": "object", + "required": [ + "type", + "name", + "in" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "httpApiKey" + ] + }, + "name": { + "type": "string" + }, + "in": { + "type": "string", + "enum": [ + "header", + "query", + "cookie" + ] + }, + "description": { + "type": "string" + } + }, + "patternProperties": { + "^x-": {} + }, + "additionalProperties": false }, - "description": { - "type": "string" - } - }, - "patternProperties": { - "^x-": {} - }, - "additionalProperties": false - }, - "SecurityRequirement": { - "type": "object", - "additionalProperties": { - "type": "array", - "items": { - "type": "string" + "http://asyncapi.com/definitions/1.2.0/parameters.json": { + "id": "http://asyncapi.com/definitions/1.2.0/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", + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "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" }, - "enum": { - "$ref": "http://json-schema.org/draft-04/schema#/properties/enum" - } - } -} + "description": "!!Auto generated!! \n Do not manually edit. " +} \ No newline at end of file diff --git a/schemas/2.0.0-rc1.json b/schemas/2.0.0-rc1.json index 34754228..36c56c42 100644 --- a/schemas/2.0.0-rc1.json +++ b/schemas/2.0.0-rc1.json @@ -1,1349 +1,1691 @@ { - "title": "AsyncAPI 2.0.0-rc1 schema.", - "$schema": "http://json-schema.org/draft-07/schema#", - "type": "object", - "required": [ - "asyncapi", - "id", - "info", - "channels" - ], - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "properties": { - "asyncapi": { - "type": "string", - "enum": [ - "2.0.0-rc1" - ], - "description": "The AsyncAPI specification version of this document." - }, - "id": { - "type": "string", - "description": "A unique id representing the application.", - "format": "uri-reference" - }, - "info": { - "$ref": "#/definitions/info" - }, - "servers": { - "type": "array", - "items": { - "$ref": "#/definitions/server" - }, - "uniqueItems": true - }, - "defaultContentType": { - "type": "string" - }, - "channels": { - "$ref": "#/definitions/channels" - }, - "components": { - "$ref": "#/definitions/components" - }, - "tags": { - "type": "array", - "items": { - "$ref": "#/definitions/tag" - }, - "uniqueItems": true - }, - "externalDocs": { - "$ref": "#/definitions/externalDocs" - } - }, - "definitions": { - "Reference": { - "type": "object", - "required": [ - "$ref" - ], - "properties": { - "$ref": { - "$ref": "#/definitions/ReferenceObject" - } - } - }, - "ReferenceObject": { - "type": "string", - "format": "uri" - }, - "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.", - "additionalProperties": false, - "properties": { - "name": { - "type": "string", - "description": "The identifying name of the contact person/organization." - }, - "url": { - "type": "string", - "description": "The URL pointing to the contact information.", - "format": "uri" - }, - "email": { - "type": "string", - "description": "The email address of the contact person/organization.", - "format": "email" - } - }, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - } - }, - "license": { - "type": "object", - "required": [ - "name" - ], - "additionalProperties": false, - "properties": { - "name": { - "type": "string", - "description": "The name of the license type. It's encouraged to use an OSI compatible license." - }, - "url": { - "type": "string", - "description": "The URL pointing to the license.", - "format": "uri" - } - }, - "patternProperties": { + "$id": "http://asyncapi.com/definitions/2.0.0-rc1/asyncapi.json", + "$schema": "http://json-schema.org/draft-07/schema", + "title": "AsyncAPI 2.0.0-rc1 schema.", + "type": "object", + "required": [ + "asyncapi", + "id", + "info", + "channels" + ], + "additionalProperties": false, + "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" + "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/specificationExtension.json" } - } }, - "server": { - "type": "object", - "description": "An object representing a Server.", - "required": [ - "url", - "protocol" - ], - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "properties": { - "url": { - "type": "string" - }, - "description": { - "type": "string" - }, - "protocol": { - "type": "string", - "description": "The transfer protocol." + "properties": { + "asyncapi": { + "type": "string", + "enum": [ + "2.0.0-rc1" + ], + "description": "The AsyncAPI specification version of this document." }, - "protocolVersion": { - "type": "string" + "id": { + "type": "string", + "description": "A unique id representing the application.", + "format": "uri-reference" }, - "variables": { - "$ref": "#/definitions/serverVariables" + "info": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/info.json" }, - "baseChannel": { - "type": "string", - "x-format": "uri-path" + "servers": { + "type": "array", + "items": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/server.json" + }, + "uniqueItems": true }, - "security": { - "type": "array", - "items": { - "$ref": "#/definitions/SecurityRequirement" - } - } - } - }, - "serverVariables": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/serverVariable" - } - }, - "serverVariable": { - "type": "object", - "description": "An object representing a Server Variable for server URL template substitution.", - "minProperties": 1, - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "properties": { - "enum": { - "type": "array", - "items": { + "defaultContentType": { "type": "string" - }, - "uniqueItems": true }, - "default": { - "type": "string" + "channels": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/channels.json" }, - "description": { - "type": "string" + "components": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/components.json" }, - "examples": { - "type": "array", - "items": { - "type": "string" - } + "tags": { + "type": "array", + "items": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/tag.json" + }, + "uniqueItems": true + }, + "externalDocs": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/externalDocs.json" } - } }, - "channels": { - "type": "object", - "propertyNames": { - "type": "string", - "format": "uri-template", - "minLength": 1 - }, - "additionalProperties": { - "$ref": "#/definitions/channelItem" - } - }, - "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" } - ] + "definitions": { + "http://asyncapi.com/definitions/2.0.0-rc1/specificationExtension.json": { + "$id": "http://asyncapi.com/definitions/2.0.0-rc1/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" + } } - } }, - "parameters": { - "$ref": "#/definitions/parameters" - }, - "correlationIds": { - "type": "object", - "patternProperties": { - "^[\\w\\d\\.\\-_]+$": { - "oneOf": [ - { "$ref": "#/definitions/Reference" }, - { "$ref": "#/definitions/correlationId" } - ] + "http://asyncapi.com/definitions/2.0.0-rc1/contact.json": { + "$id": "http://asyncapi.com/definitions/2.0.0-rc1/contact.json", + "type": "object", + "description": "Contact information for the owners of the API.", + "additionalProperties": false, + "properties": { + "name": { + "type": "string", + "description": "The identifying name of the contact person/organization." + }, + "url": { + "type": "string", + "description": "The URL pointing to the contact information.", + "format": "uri" + }, + "email": { + "type": "string", + "description": "The email address of the contact person/organization.", + "format": "email" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/specificationExtension.json" + } } - } - }, - "traits": { - "$ref": "#/definitions/traits" - } - } - }, - "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." - }, - "parameters": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/parameter" - }, - "description": "JSON objects describing re-usable channel parameters." - }, - "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": "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": "#/definitions/schema" + "http://asyncapi.com/definitions/2.0.0-rc1/license.json": { + "$id": "http://asyncapi.com/definitions/2.0.0-rc1/license.json", + "type": "object", + "required": [ + "name" + ], + "additionalProperties": false, + "properties": { + "name": { + "type": "string", + "description": "The name of the license type. It's encouraged to use an OSI compatible license." + }, + "url": { + "type": "string", + "description": "The URL pointing to the license.", + "format": "uri" + } }, - { - "type": "boolean" + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/specificationExtension.json" + } } - ], - "default": {} }, - "type": { - "$ref": "http://json-schema.org/draft-04/schema#/properties/type" - }, - "items": { - "anyOf": [ - { - "$ref": "#/definitions/schema" + "http://asyncapi.com/definitions/2.0.0-rc1/server.json": { + "$id": "http://asyncapi.com/definitions/2.0.0-rc1/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" + } }, - { - "type": "array", - "minItems": 1, - "items": { - "$ref": "#/definitions/schema" - } + "properties": { + "url": { + "type": "string" + }, + "description": { + "type": "string" + }, + "protocol": { + "type": "string", + "description": "The transfer protocol." + }, + "protocolVersion": { + "type": "string" + }, + "variables": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/serverVariables.json" + }, + "baseChannel": { + "type": "string", + "x-format": "uri-path" + }, + "security": { + "type": "array", + "items": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/SecurityRequirement.json" + } + } } - ], - "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": {}, - "examples": { - "type": "array", - "items": {} - } - }, - "additionalProperties": false - }, - "xml": { - "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": { - "type": "object", - "additionalProperties": false, - "description": "information about external documentation", - "required": [ - "url" - ], - "properties": { - "description": { - "type": "string" - }, - "url": { - "type": "string", - "format": "uri" - } - }, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - } - }, - "channelItem": { - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "minProperties": 1, - "properties": { - "$ref": { - "$ref": "#/definitions/ReferenceObject" - }, - "parameters": { - "type": "array", - "uniqueItems": true, - "minItems": 1, - "items": { - "$ref": "#/definitions/parameter" - } - }, - "publish": { - "$ref": "#/definitions/operation" - }, - "subscribe": { - "$ref": "#/definitions/operation" - }, - "deprecated": { - "type": "boolean", - "default": false - }, - "protocolInfo": { - "type": "object", - "additionalProperties": { - "type": "object" - } - } - } - }, - "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" - } - } - }, - "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" }, - { - "type": "array", - "items": [ - { - "oneOf": [ - { - "$ref": "#/definitions/Reference" - }, - { - "$ref": "#/definitions/operationTrait" - } - ] - }, - { - "type": "object", - "additionalItems": true - } - ] - } - ] - } - }, - "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" - } + "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" + } }, - "message": { - "oneOf": [ - { - "$ref": "#/definitions/message" - }, - { - "type": "object", - "required": [ - "oneOf" - ], - "additionalProperties": false, - "patternProperties": { + "http://asyncapi.com/definitions/2.0.0-rc1/serverVariable.json": { + "$id": "http://asyncapi.com/definitions/2.0.0-rc1/serverVariable.json", + "type": "object", + "description": "An object representing a Server Variable for server URL template substitution.", + "minProperties": 1, + "additionalProperties": false, + "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" + "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/specificationExtension.json" } - }, - "properties": { - "oneOf": { - "type": "array", - "minItems": 2, - "items": { - "$ref": "#/definitions/message" - } + }, + "properties": { + "enum": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + }, + "default": { + "type": "string" + }, + "description": { + "type": "string" + }, + "examples": { + "type": "array", + "items": { + "type": "string" + } } - } } - ] - } - } - }, - "message": { - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "properties": { - "schemaFormat": { - "type": "string" - }, - "contentType": { - "type": "string" - }, - "headers": { - "type": "object", - "additionalProperties": { - "oneOf": [ - { "$ref": "#/definitions/Reference" }, - {"$ref": "#/definitions/schema" } - ] - } - }, - "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" - } - }, - "protocolInfo": { - "type": "object", - "additionalProperties": { - "type": "object" - } - }, - "traits": { - "type": "array", - "items": { - "oneOf": [ - { - "$ref": "#/definitions/Reference" - }, - { - "$ref": "#/definitions/messageTrait" - }, - { + "http://asyncapi.com/definitions/2.0.0-rc1/SecurityRequirement.json": { + "$id": "http://asyncapi.com/definitions/2.0.0-rc1/SecurityRequirement.json", + "type": "object", + "additionalProperties": { "type": "array", - "items": [ - { - "oneOf": [ - { - "$ref": "#/definitions/Reference" - }, - { - "$ref": "#/definitions/messageTrait" - } - ] - }, - { - "type": "object", - "additionalItems": true - } - ] - } - ] - } - } - } - }, - "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+)+" - } - } - }, - "specificationExtension": { - "description": "Any property starting with x- is valid.", - "additionalProperties": true, - "additionalItems": true - }, - "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" - } - } - }, - "traits": { - "type": "object", - "additionalProperties": { - "anyOf": [ - { "$ref": "#/definitions/operationTrait" }, - { "$ref": "#/definitions/messageTrait" } - ] - } - }, - "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" - }, - "protocolInfo": { - "type": "object", - "additionalProperties": { - "type": "object" - } - } - } - }, - "messageTrait": { - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "properties": { - "schemaFormat": { - "type": "string" - }, - "contentType": { - "type": "string" - }, - "headers": { - "type": "object", - "additionalProperties": { - "oneOf": [ - { - "$ref": "#/definitions/Reference" - }, - { - "$ref": "#/definitions/schema" - } - ] - } + "items": { + "type": "string" + }, + "uniqueItems": true + } }, - "correlationId": { - "oneOf": [ - { - "$ref": "#/definitions/Reference" + "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 }, - { - "$ref": "#/definitions/correlationId" + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/channelItem.json" } - ] - }, - "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." + "http://asyncapi.com/definitions/2.0.0-rc1/channelItem.json": { + "$id": "http://asyncapi.com/definitions/2.0.0-rc1/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": { + "type": "array", + "uniqueItems": true, + "minItems": 1, + "items": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/parameter.json" + } + }, + "publish": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/operation.json" + }, + "subscribe": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/operation.json" + }, + "deprecated": { + "type": "boolean", + "default": false + }, + "protocolInfo": { + "type": "object", + "additionalProperties": { + "type": "object" + } + } + } }, - "externalDocs": { - "$ref": "#/definitions/externalDocs" + "http://asyncapi.com/definitions/2.0.0-rc1/ReferenceObject.json": { + "$id": "http://asyncapi.com/definitions/2.0.0-rc1/ReferenceObject.json", + "type": "string", + "format": "uri" }, - "deprecated": { - "type": "boolean", - "default": false + "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." + }, + "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" + } + } }, - "examples": { - "type": "array", - "items": { - "type": "object" - } - }, - "protocolInfo": { - "type": "object", - "additionalProperties": { - "type": "object" - } - } - } - }, - "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": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "userPassword" - ] - }, - "description": { - "type": "string" - } - }, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "additionalProperties": false - }, - "apiKey": { - "type": "object", - "required": [ - "type", - "in" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "apiKey" - ] - }, - "in": { - "type": "string", - "enum": [ - "user", - "password" - ] + "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" + } + }, + "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 + }, + "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" + }, + "additionalItems": { + "anyOf": [ + { + "type": "boolean" + }, + { + "$ref": "#" + } + ], + "default": {} + }, + "items": { + "anyOf": [ + { + "$ref": "#" + }, + { + "$ref": "#/definitions/schemaArray" + } + ], + "default": {} + }, + "maxItems": { + "$ref": "#/definitions/positiveInteger" + }, + "minItems": { + "$ref": "#/definitions/positiveIntegerDefault0" + }, + "uniqueItems": { + "type": "boolean", + "default": false + }, + "maxProperties": { + "$ref": "#/definitions/positiveInteger" + }, + "minProperties": { + "$ref": "#/definitions/positiveIntegerDefault0" + }, + "required": { + "$ref": "#/definitions/stringArray" + }, + "additionalProperties": { + "anyOf": [ + { + "type": "boolean" + }, + { + "$ref": "#" + } + ], + "default": {} + }, + "definitions": { + "type": "object", + "additionalProperties": { + "$ref": "#" + }, + "default": {} + }, + "properties": { + "type": "object", + "additionalProperties": { + "$ref": "#" + }, + "default": {} + }, + "patternProperties": { + "type": "object", + "additionalProperties": { + "$ref": "#" + }, + "default": {} + }, + "dependencies": { + "type": "object", + "additionalProperties": { + "anyOf": [ + { + "$ref": "#" + }, + { + "$ref": "#/definitions/stringArray" + } + ] + } + }, + "enum": { + "type": "array", + "minItems": 1, + "uniqueItems": true + }, + "type": { + "anyOf": [ + { + "$ref": "#/definitions/simpleTypes" + }, + { + "type": "array", + "items": { + "$ref": "#/definitions/simpleTypes" + }, + "minItems": 1, + "uniqueItems": true + } + ] + }, + "format": { + "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/2.0.0-rc1/xml.json": { + "$id": "http://asyncapi.com/definitions/2.0.0-rc1/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 + } + } }, - "description": { - "type": "string" - } - }, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "additionalProperties": false - }, - "X509": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "X509" - ] + "http://asyncapi.com/definitions/2.0.0-rc1/externalDocs.json": { + "$id": "http://asyncapi.com/definitions/2.0.0-rc1/externalDocs.json", + "type": "object", + "additionalProperties": false, + "description": "information about external documentation", + "required": [ + "url" + ], + "properties": { + "description": { + "type": "string" + }, + "url": { + "type": "string", + "format": "uri" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/specificationExtension.json" + } + } }, - "description": { - "type": "string" - } - }, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "additionalProperties": false - }, - "symmetricEncryption": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "symmetricEncryption" - ] + "http://asyncapi.com/definitions/2.0.0-rc1/operation.json": { + "$id": "http://asyncapi.com/definitions/2.0.0-rc1/operation.json", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/specificationExtension.json" + } + }, + "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" + }, + { + "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" + } + ] + }, + { + "type": "object", + "additionalItems": true + } + ] + } + ] + } + }, + "summary": { + "type": "string" + }, + "description": { + "type": "string" + }, + "tags": { + "type": "array", + "items": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/tag.json" + }, + "uniqueItems": true + }, + "externalDocs": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/externalDocs.json" + }, + "operationId": { + "type": "string" + }, + "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" + } + } + } + } + ] + } + } }, - "description": { - "type": "string" - } - }, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "additionalProperties": false - }, - "asymmetricEncryption": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "asymmetricEncryption" - ] + "http://asyncapi.com/definitions/2.0.0-rc1/Reference.json": { + "$id": "http://asyncapi.com/definitions/2.0.0-rc1/Reference.json", + "type": "object", + "required": [ + "$ref" + ], + "properties": { + "$ref": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/ReferenceObject.json" + } + } }, - "description": { - "type": "string" - } - }, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "additionalProperties": false - }, - "HTTPSecurityScheme": { - "oneOf": [ - { "$ref": "#/definitions/NonBearerHTTPSecurityScheme" }, - { "$ref": "#/definitions/BearerHTTPSecurityScheme" }, - { "$ref": "#/definitions/APIKeyHTTPSecurityScheme" } - ] - }, - "NonBearerHTTPSecurityScheme": { - "not": { - "type": "object", - "properties": { - "scheme": { - "type": "string", - "enum": [ - "bearer" - ] - } - } - }, - "type": "object", - "required": [ - "scheme", - "type" - ], - "properties": { - "scheme": { - "type": "string" + "http://asyncapi.com/definitions/2.0.0-rc1/operationTrait.json": { + "$id": "http://asyncapi.com/definitions/2.0.0-rc1/operationTrait.json", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/specificationExtension.json" + } + }, + "properties": { + "summary": { + "type": "string" + }, + "description": { + "type": "string" + }, + "tags": { + "type": "array", + "items": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/tag.json" + }, + "uniqueItems": true + }, + "externalDocs": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/externalDocs.json" + }, + "operationId": { + "type": "string" + }, + "protocolInfo": { + "type": "object", + "additionalProperties": { + "type": "object" + } + } + } }, - "description": { - "type": "string" + "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" + } + } }, - "type": { - "type": "string", - "enum": [ - "http" - ] - } - }, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "additionalProperties": false - }, - "BearerHTTPSecurityScheme": { - "type": "object", - "required": [ - "type", - "scheme" - ], - "properties": { - "scheme": { - "type": "string", - "enum": [ - "bearer" - ] + "http://asyncapi.com/definitions/2.0.0-rc1/message.json": { + "$id": "http://asyncapi.com/definitions/2.0.0-rc1/message.json", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/specificationExtension.json" + } + }, + "properties": { + "schemaFormat": { + "type": "string" + }, + "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" + } + ] + } + }, + "payload": {}, + "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": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/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-rc1/externalDocs.json" + }, + "deprecated": { + "type": "boolean", + "default": false + }, + "examples": { + "type": "array", + "items": { + "type": "object" + } + }, + "protocolInfo": { + "type": "object", + "additionalProperties": { + "type": "object" + } + }, + "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/messageTrait.json" + }, + { + "type": "array", + "items": [ + { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/messageTrait.json" + } + ] + }, + { + "type": "object", + "additionalItems": true + } + ] + } + ] + } + } + } }, - "bearerFormat": { - "type": "string" + "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+)+" + } + } }, - "type": { - "type": "string", - "enum": [ - "http" - ] + "http://asyncapi.com/definitions/2.0.0-rc1/messageTrait.json": { + "$id": "http://asyncapi.com/definitions/2.0.0-rc1/messageTrait.json", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/specificationExtension.json" + } + }, + "properties": { + "schemaFormat": { + "type": "string" + }, + "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": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/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-rc1/externalDocs.json" + }, + "deprecated": { + "type": "boolean", + "default": false + }, + "examples": { + "type": "array", + "items": { + "type": "object" + } + }, + "protocolInfo": { + "type": "object", + "additionalProperties": { + "type": "object" + } + } + } }, - "description": { - "type": "string" - } - }, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "additionalProperties": false - }, - "APIKeyHTTPSecurityScheme": { - "type": "object", - "required": [ - "type", - "name", - "in" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "httpApiKey" - ] + "http://asyncapi.com/definitions/2.0.0-rc1/components.json": { + "$id": "http://asyncapi.com/definitions/2.0.0-rc1/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" + } + } }, - "name": { - "type": "string" + "http://asyncapi.com/definitions/2.0.0-rc1/schemas.json": { + "$id": "http://asyncapi.com/definitions/2.0.0-rc1/schemas.json", + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/schema.json" + }, + "description": "JSON objects describing schemas the API uses." }, - "in": { - "type": "string", - "enum": [ - "header", - "query", - "cookie" - ] + "http://asyncapi.com/definitions/2.0.0-rc1/messages.json": { + "$id": "http://asyncapi.com/definitions/2.0.0-rc1/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." }, - "description": { - "type": "string" - } - }, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "additionalProperties": false - }, - "oauth2Flows": { - "type": "object", - "required": [ "type", "flows" ], - "properties": { - "type": { - "type": "string", - "enum": [ "oauth2" ] + "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" + } + ] }, - "description": { - "type": "string" + "http://asyncapi.com/definitions/2.0.0-rc1/userPassword.json": { + "$id": "http://asyncapi.com/definitions/2.0.0-rc1/userPassword.json", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "userPassword" + ] + }, + "description": { + "type": "string" + } + }, + "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/apiKey.json": { + "$id": "http://asyncapi.com/definitions/2.0.0-rc1/apiKey.json", + "type": "object", + "required": [ + "type", + "in" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "apiKey" + ] + }, + "in": { + "type": "string", + "enum": [ + "user", + "password" + ] + }, + "description": { + "type": "string" + } + }, + "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/X509.json": { + "$id": "http://asyncapi.com/definitions/2.0.0-rc1/X509.json", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "X509" + ] + }, + "description": { + "type": "string" + } + }, + "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/symmetricEncryption.json": { + "$id": "http://asyncapi.com/definitions/2.0.0-rc1/symmetricEncryption.json", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "symmetricEncryption" + ] + }, + "description": { + "type": "string" + } + }, + "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/asymmetricEncryption.json": { + "$id": "http://asyncapi.com/definitions/2.0.0-rc1/asymmetricEncryption.json", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "asymmetricEncryption" + ] + }, + "description": { + "type": "string" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/specificationExtension.json" + } + }, + "additionalProperties": false }, - "flows": { - "type": "object", - "properties": { - "implicit": { - "allOf": [ - { "$ref": "#/definitions/oauth2Flow" }, + "http://asyncapi.com/definitions/2.0.0-rc1/HTTPSecurityScheme.json": { + "$id": "http://asyncapi.com/definitions/2.0.0-rc1/HTTPSecurityScheme.json", + "oneOf": [ { - "required": [ - "authorizationUrl", - "scopes" - ] + "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/NonBearerHTTPSecurityScheme.json" }, - { "not": { "required": ["tokenUrl"] } } - ] - }, - "password": { - "allOf": [ - { "$ref": "#/definitions/oauth2Flow" }, { - "required": [ - "tokenUrl", - "scopes" - ] + "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/BearerHTTPSecurityScheme.json" }, - { "not": { "required": ["authorizationUrl"] } } - ] - }, - "clientCredentials": { - "allOf": [ - { "$ref": "#/definitions/oauth2Flow" }, { - "required": [ - "tokenUrl", - "scopes" - ] + "$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", + "not": { + "type": "object", + "properties": { + "scheme": { + "type": "string", + "enum": [ + "bearer" + ] + } + } + }, + "type": "object", + "required": [ + "scheme", + "type" + ], + "properties": { + "scheme": { + "type": "string" + }, + "description": { + "type": "string" }, - { "not": { "required": ["authorizationUrl"] } } - ] + "type": { + "type": "string", + "enum": [ + "http" + ] + } }, - "authorizationCode": { - "allOf": [ - { "$ref": "#/definitions/oauth2Flow" }, - { - "required": [ - "authorizationUrl", - "tokenUrl", - "scopes" - ] + "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/BearerHTTPSecurityScheme.json": { + "$id": "http://asyncapi.com/definitions/2.0.0-rc1/BearerHTTPSecurityScheme.json", + "type": "object", + "required": [ + "type", + "scheme" + ], + "properties": { + "scheme": { + "type": "string", + "enum": [ + "bearer" + ] + }, + "bearerFormat": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "http" + ] + }, + "description": { + "type": "string" + } + }, + "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/APIKeyHTTPSecurityScheme.json": { + "$id": "http://asyncapi.com/definitions/2.0.0-rc1/APIKeyHTTPSecurityScheme.json", + "type": "object", + "required": [ + "type", + "name", + "in" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "httpApiKey" + ] + }, + "name": { + "type": "string" + }, + "in": { + "type": "string", + "enum": [ + "header", + "query", + "cookie" + ] + }, + "description": { + "type": "string" + } + }, + "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/oauth2Flows.json": { + "$id": "http://asyncapi.com/definitions/2.0.0-rc1/oauth2Flows.json", + "type": "object", + "required": [ + "type", + "flows" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "oauth2" + ] + }, + "description": { + "type": "string" + }, + "flows": { + "type": "object", + "properties": { + "implicit": { + "allOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/oauth2Flow.json" + }, + { + "required": [ + "authorizationUrl", + "scopes" + ] + }, + { + "not": { + "required": [ + "tokenUrl" + ] + } + } + ] + }, + "password": { + "allOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/oauth2Flow.json" + }, + { + "required": [ + "tokenUrl", + "scopes" + ] + }, + { + "not": { + "required": [ + "authorizationUrl" + ] + } + } + ] + }, + "clientCredentials": { + "allOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/oauth2Flow.json" + }, + { + "required": [ + "tokenUrl", + "scopes" + ] + }, + { + "not": { + "required": [ + "authorizationUrl" + ] + } + } + ] + }, + "authorizationCode": { + "allOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/oauth2Flow.json" + }, + { + "required": [ + "authorizationUrl", + "tokenUrl", + "scopes" + ] + } + ] + } + }, + "additionalProperties": false, + "minProperties": 1 + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/specificationExtension.json" } - ] } - }, - "additionalProperties": false, - "minProperties": 1 - } - }, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - } - }, - "oauth2Flow": { - "type": "object", - "properties": { - "authorizationUrl": { - "type": "string", - "format": "uri" - }, - "tokenUrl": { - "type": "string", - "format": "uri" }, - "refreshUrl": { - "type": "string", - "format": "uri" + "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 }, - "scopes": { - "$ref": "#/definitions/oauth2Scopes" - } - }, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "additionalProperties": false - }, - "oauth2Scopes": { - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "openIdConnect": { - "type": "object", - "required": [ - "type", - "openIdConnectUrl" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "openIdConnect" - ] + "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" + } }, - "description": { - "type": "string" + "http://asyncapi.com/definitions/2.0.0-rc1/openIdConnect.json": { + "$id": "http://asyncapi.com/definitions/2.0.0-rc1/openIdConnect.json", + "type": "object", + "required": [ + "type", + "openIdConnectUrl" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "openIdConnect" + ] + }, + "description": { + "type": "string" + }, + "openIdConnectUrl": { + "type": "string", + "format": "uri" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/specificationExtension.json" + } + }, + "additionalProperties": false }, - "openIdConnectUrl": { - "type": "string", - "format": "uri" - } - }, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" + "http://asyncapi.com/definitions/2.0.0-rc1/parameters.json": { + "$id": "http://asyncapi.com/definitions/2.0.0-rc1/parameters.json", + "type": "object", + "additionalProperties": { + "$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/traits.json": { + "$id": "http://asyncapi.com/definitions/2.0.0-rc1/traits.json", + "type": "object", + "additionalProperties": { + "anyOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/operationTrait.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/messageTrait.json" + } + ] + } } - }, - "additionalProperties": false }, - "SecurityRequirement": { - "type": "object", - "additionalProperties": { - "type": "array", - "items": { - "type": "string" - }, - "uniqueItems": true - } - } - } -} + "description": "!!Auto generated!! \n Do not manually edit. " +} \ No newline at end of file diff --git a/schemas/2.0.0-rc2.json b/schemas/2.0.0-rc2.json index 06f13716..9e0f599b 100644 --- a/schemas/2.0.0-rc2.json +++ b/schemas/2.0.0-rc2.json @@ -1,1350 +1,1636 @@ { - "title": "AsyncAPI 2.0.0-rc2 schema.", - "$schema": "http://json-schema.org/draft-07/schema#", - "type": "object", - "required": [ - "asyncapi", - "info", - "channels" - ], - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "properties": { - "asyncapi": { - "type": "string", - "enum": [ - "2.0.0-rc2" - ], - "description": "The AsyncAPI specification version of this document." - }, - "id": { - "type": "string", - "description": "A unique id representing the application.", - "format": "uri" - }, - "info": { - "$ref": "#/definitions/info" - }, - "servers": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/server" - } - }, - "defaultContentType": { - "type": "string" - }, - "channels": { - "$ref": "#/definitions/channels" - }, - "components": { - "$ref": "#/definitions/components" - }, - "tags": { - "type": "array", - "items": { - "$ref": "#/definitions/tag" - }, - "uniqueItems": true - }, - "externalDocs": { - "$ref": "#/definitions/externalDocs" - } - }, - "definitions": { - "Reference": { - "type": "object", - "required": [ - "$ref" - ], - "properties": { - "$ref": { - "$ref": "#/definitions/ReferenceObject" - } - } - }, - "ReferenceObject": { - "type": "string", - "format": "uri-reference" - }, - "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.", - "additionalProperties": false, - "properties": { - "name": { - "type": "string", - "description": "The identifying name of the contact person/organization." - }, - "url": { - "type": "string", - "description": "The URL pointing to the contact information.", - "format": "uri" - }, - "email": { - "type": "string", - "description": "The email address of the contact person/organization.", - "format": "email" - } - }, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - } - }, - "license": { - "type": "object", - "required": [ - "name" - ], - "additionalProperties": false, - "properties": { - "name": { - "type": "string", - "description": "The name of the license type. It's encouraged to use an OSI compatible license." - }, - "url": { - "type": "string", - "description": "The URL pointing to the license.", - "format": "uri" - } - }, - "patternProperties": { + "$id": "http://asyncapi.com/definitions/2.0.0-rc2/asyncapi.json", + "$schema": "http://json-schema.org/draft-07/schema", + "title": "AsyncAPI 2.0.0-rc2 schema.", + "type": "object", + "required": [ + "asyncapi", + "info", + "channels" + ], + "additionalProperties": false, + "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" + "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/specificationExtension.json" } - } }, - "server": { - "type": "object", - "description": "An object representing a Server.", - "required": [ - "url", - "protocol" - ], - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "properties": { - "url": { - "type": "string" - }, - "description": { - "type": "string" - }, - "protocol": { - "type": "string", - "description": "The transfer protocol." + "properties": { + "asyncapi": { + "type": "string", + "enum": [ + "2.0.0-rc2" + ], + "description": "The AsyncAPI specification version of this document." }, - "protocolVersion": { - "type": "string" + "id": { + "type": "string", + "description": "A unique id representing the application.", + "format": "uri" }, - "variables": { - "$ref": "#/definitions/serverVariables" + "info": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/info.json" }, - "security": { - "type": "array", - "items": { - "$ref": "#/definitions/SecurityRequirement" - } + "servers": { + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/server.json" + } }, - "bindings": { - "$ref": "#/definitions/bindingsObject" - } - } - }, - "serverVariables": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/serverVariable" - } - }, - "serverVariable": { - "type": "object", - "description": "An object representing a Server Variable for server URL template substitution.", - "minProperties": 1, - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "properties": { - "enum": { - "type": "array", - "items": { + "defaultContentType": { "type": "string" - }, - "uniqueItems": true }, - "default": { - "type": "string" + "channels": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/channels.json" }, - "description": { - "type": "string" + "components": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/components.json" }, - "examples": { - "type": "array", - "items": { - "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" } - } }, - "channels": { - "type": "object", - "propertyNames": { - "type": "string", - "format": "uri-template", - "minLength": 1 - }, - "additionalProperties": { - "$ref": "#/definitions/channelItem" - } - }, - "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" + "definitions": { + "http://asyncapi.com/definitions/2.0.0-rc2/specificationExtension.json": { + "$id": "http://asyncapi.com/definitions/2.0.0-rc2/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." }, - { - "$ref": "#/definitions/SecurityScheme" + "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" } - ] } - } }, - "parameters": { - "$ref": "#/definitions/parameters" - }, - "correlationIds": { - "type": "object", - "patternProperties": { - "^[\\w\\d\\.\\-_]+$": { - "oneOf": [ - { - "$ref": "#/definitions/Reference" + "http://asyncapi.com/definitions/2.0.0-rc2/contact.json": { + "$id": "http://asyncapi.com/definitions/2.0.0-rc2/contact.json", + "type": "object", + "description": "Contact information for the owners of the API.", + "additionalProperties": false, + "properties": { + "name": { + "type": "string", + "description": "The identifying name of the contact person/organization." }, - { - "$ref": "#/definitions/correlationId" + "url": { + "type": "string", + "description": "The URL pointing to the contact information.", + "format": "uri" + }, + "email": { + "type": "string", + "description": "The email address of the contact person/organization.", + "format": "email" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/specificationExtension.json" } - ] } - } - }, - "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" - } - } - } - }, - "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." - }, - "parameters": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/parameter" - }, - "description": "JSON objects describing re-usable channel parameters." - }, - "schema": { - "allOf": [ - { - "$ref": "http://json-schema.org/draft-07/schema#" }, - { - "type": "object", - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "properties": { - "additionalProperties": { - "$ref": "#/definitions/schema" - }, - "items": { - "anyOf": [ - { - "$ref": "#/definitions/schema" + "http://asyncapi.com/definitions/2.0.0-rc2/license.json": { + "$id": "http://asyncapi.com/definitions/2.0.0-rc2/license.json", + "type": "object", + "required": [ + "name" + ], + "additionalProperties": false, + "properties": { + "name": { + "type": "string", + "description": "The name of the license type. It's encouraged to use an OSI compatible license." }, - { - "type": "array", - "minItems": 1, - "items": { - "$ref": "#/definitions/schema" - } + "url": { + "type": "string", + "description": "The URL pointing to the license.", + "format": "uri" } - ], - "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 + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/specificationExtension.json" + } } - } - } - ] - }, - "externalDocs": { - "type": "object", - "additionalProperties": false, - "description": "information about external documentation", - "required": [ - "url" - ], - "properties": { - "description": { - "type": "string" - }, - "url": { - "type": "string", - "format": "uri" - } - }, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - } - }, - "channelItem": { - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "minProperties": 1, - "properties": { - "$ref": { - "$ref": "#/definitions/ReferenceObject" - }, - "parameters": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/parameter" - } - }, - "description": { - "type": "string", - "description": "A description of the channel." - }, - "publish": { - "$ref": "#/definitions/operation" }, - "subscribe": { - "$ref": "#/definitions/operation" - }, - "deprecated": { - "type": "boolean", - "default": false - }, - "bindings": { - "$ref": "#/definitions/bindingsObject" - } - } - }, - "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." + "http://asyncapi.com/definitions/2.0.0-rc2/server.json": { + "$id": "http://asyncapi.com/definitions/2.0.0-rc2/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" + } + }, + "properties": { + "url": { + "type": "string" + }, + "description": { + "type": "string" + }, + "protocol": { + "type": "string", + "description": "The transfer protocol." + }, + "protocolVersion": { + "type": "string" + }, + "variables": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/serverVariables.json" + }, + "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" + } + } }, - "schema": { - "$ref": "#/definitions/schema" + "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" + } }, - "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.0.0-rc2/serverVariable.json": { + "$id": "http://asyncapi.com/definitions/2.0.0-rc2/serverVariable.json", + "type": "object", + "description": "An object representing a Server Variable for server URL template substitution.", + "minProperties": 1, + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/specificationExtension.json" + } + }, + "properties": { + "enum": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + }, + "default": { + "type": "string" + }, + "description": { + "type": "string" + }, + "examples": { + "type": "array", + "items": { + "type": "string" + } + } + } }, - "$ref": { - "$ref": "#/definitions/ReferenceObject" - } - } - }, - "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" - }, - { + "http://asyncapi.com/definitions/2.0.0-rc2/SecurityRequirement.json": { + "$id": "http://asyncapi.com/definitions/2.0.0-rc2/SecurityRequirement.json", + "type": "object", + "additionalProperties": { "type": "array", - "items": [ - { - "oneOf": [ - { - "$ref": "#/definitions/Reference" - }, - { - "$ref": "#/definitions/operationTrait" - } - ] - }, - { - "type": "object", - "additionalItems": true - } - ] - } - ] - } - }, - "summary": { - "type": "string" - }, - "description": { - "type": "string" - }, - "tags": { - "type": "array", - "items": { - "$ref": "#/definitions/tag" - }, - "uniqueItems": true - }, - "externalDocs": { - "$ref": "#/definitions/externalDocs" - }, - "operationId": { - "type": "string" + "items": { + "type": "string" + }, + "uniqueItems": true + } }, - "bindings": { - "$ref": "#/definitions/bindingsObject" + "http://asyncapi.com/definitions/2.0.0-rc2/bindingsObject.json": { + "$id": "http://asyncapi.com/definitions/2.0.0-rc2/bindingsObject.json", + "type": "object", + "additionalProperties": true, + "properties": { + "http": {}, + "ws": {}, + "amqp": {}, + "amqp1": {}, + "mqtt": {}, + "mqtt5": {}, + "kafka": {}, + "nats": {}, + "jms": {}, + "sns": {}, + "sqs": {}, + "stomp": {}, + "redis": {} + } }, - "message": { - "$ref": "#/definitions/message" - } - } - }, - "message": { - "oneOf": [ - { - "$ref": "#/definitions/Reference" + "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" + } }, - { - "oneOf": [ - { - "type": "object", - "required": [ - "oneOf" - ], - "additionalProperties": false, - "properties": { - "oneOf": { - "type": "array", - "items": { - "$ref": "#/definitions/message" - } + "http://asyncapi.com/definitions/2.0.0-rc2/channelItem.json": { + "$id": "http://asyncapi.com/definitions/2.0.0-rc2/channelItem.json", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/specificationExtension.json" } - } }, - { - "type": "object", - "additionalProperties": false, - "patternProperties": { + "minProperties": 1, + "properties": { + "$ref": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/ReferenceObject.json" + }, + "parameters": { + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/parameter.json" + } + }, + "description": { + "type": "string", + "description": "A description of the channel." + }, + "publish": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/operation.json" + }, + "subscribe": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/operation.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/ReferenceObject.json": { + "$id": "http://asyncapi.com/definitions/2.0.0-rc2/ReferenceObject.json", + "type": "string", + "format": "uri-reference" + }, + "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": "#/definitions/specificationExtension" + "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/specificationExtension.json" } - }, - "properties": { - "schemaFormat": { - "type": "string" + }, + "properties": { + "description": { + "type": "string", + "description": "A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed." }, - "contentType": { - "type": "string" + "schema": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/schema.json" }, - "headers": { - "$ref": "#/definitions/schema" + "location": { + "type": "string", + "description": "A runtime expression that specifies the location of the parameter value", + "pattern": "^\\$message\\.(header|payload)#(\\/(([^\\/~])|(~[01]))*)*" }, - "payload": {}, - "correlationId": { - "oneOf": [ - { - "$ref": "#/definitions/Reference" + "$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" + } }, - { - "$ref": "#/definitions/correlationId" + "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": "#" } - ] }, - "tags": { - "type": "array", - "items": { - "$ref": "#/definitions/tag" - }, - "uniqueItems": true + "nonNegativeInteger": { + "type": "integer", + "minimum": 0 }, - "summary": { - "type": "string", - "description": "A brief summary of the message." + "nonNegativeIntegerDefault0": { + "allOf": [ + { + "$ref": "#/definitions/nonNegativeInteger" + }, + { + "default": 0 + } + ] }, - "name": { - "type": "string", - "description": "Name of the message." + "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": "A human-friendly title for the message." + "type": "string" }, "description": { - "type": "string", - "description": "A longer description of the message. CommonMark is allowed." + "type": "string" }, - "externalDocs": { - "$ref": "#/definitions/externalDocs" + "default": true, + "readOnly": { + "type": "boolean", + "default": false }, - "deprecated": { - "type": "boolean", - "default": false + "writeOnly": { + "type": "boolean", + "default": false }, "examples": { - "type": "array", - "items": { - "type": "object" - } + "type": "array", + "items": true }, - "bindings": { - "$ref": "#/definitions/bindingsObject" + "multipleOf": { + "type": "number", + "exclusiveMinimum": 0 }, - "traits": { - "type": "array", - "items": { - "oneOf": [ - { - "$ref": "#/definitions/Reference" - }, - { - "$ref": "#/definitions/messageTrait" - }, - { - "type": "array", - "items": [ - { - "oneOf": [ - { - "$ref": "#/definitions/Reference" - }, - { - "$ref": "#/definitions/messageTrait" - } - ] - }, - { - "type": "object", - "additionalItems": true - } - ] - } - ] - } - } - } - } - ] - } - ] - }, - "bindingsObject": { - "type": "object", - "additionalProperties": true, - "properties": { - "http": {}, - "ws": {}, - "amqp": {}, - "amqp1": {}, - "mqtt": {}, - "mqtt5": {}, - "kafka": {}, - "nats": {}, - "jms": {}, - "sns": {}, - "sqs": {}, - "stomp": {}, - "redis": {} - } - }, - "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]))*)*" - } - } - }, - "specificationExtension": { - "description": "Any property starting with x- is valid.", - "additionalProperties": true, - "additionalItems": true - }, - "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" - }, - "description": { - "type": "string" - }, - "tags": { - "type": "array", - "items": { - "$ref": "#/definitions/tag" - }, - "uniqueItems": true - }, - "externalDocs": { - "$ref": "#/definitions/externalDocs" - }, - "operationId": { - "type": "string" - }, - "bindings": { - "$ref": "#/definitions/bindingsObject" - } - } - }, - "messageTrait": { - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "properties": { - "schemaFormat": { - "type": "string" - }, - "contentType": { - "type": "string" - }, - "headers": { - "oneOf": [ - { - "$ref": "#/definitions/Reference" + "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": [ + { + "$ref": "#" + }, + { + "$ref": "#/definitions/schemaArray" + } + ], + "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": { + "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" + }, + { + "type": "array", + "items": { + "$ref": "#/definitions/simpleTypes" + }, + "minItems": 1, + "uniqueItems": true + } + ] + }, + "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": "#" + } }, - { - "$ref": "#/definitions/schema" + "default": true + }, + "http://asyncapi.com/definitions/2.0.0-rc2/externalDocs.json": { + "$id": "http://asyncapi.com/definitions/2.0.0-rc2/externalDocs.json", + "type": "object", + "additionalProperties": false, + "description": "information about external documentation", + "required": [ + "url" + ], + "properties": { + "description": { + "type": "string" + }, + "url": { + "type": "string", + "format": "uri" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/specificationExtension.json" + } } - ] }, - "correlationId": { - "oneOf": [ - { - "$ref": "#/definitions/Reference" + "http://asyncapi.com/definitions/2.0.0-rc2/operation.json": { + "$id": "http://asyncapi.com/definitions/2.0.0-rc2/operation.json", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/specificationExtension.json" + } }, - { - "$ref": "#/definitions/correlationId" + "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" + }, + { + "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" + } + ] + }, + { + "type": "object", + "additionalItems": true + } + ] + } + ] + } + }, + "summary": { + "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" + } } - ] - }, - "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" - } - } - }, - "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": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "userPassword" - ] - }, - "description": { - "type": "string" - } - }, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "additionalProperties": false - }, - "apiKey": { - "type": "object", - "required": [ - "type", - "in" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "apiKey" - ] - }, - "in": { - "type": "string", - "enum": [ - "user", - "password" - ] - }, - "description": { - "type": "string" - } - }, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "additionalProperties": false - }, - "X509": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "X509" - ] - }, - "description": { - "type": "string" - } - }, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "additionalProperties": false - }, - "symmetricEncryption": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "symmetricEncryption" - ] - }, - "description": { - "type": "string" - } - }, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "additionalProperties": false - }, - "asymmetricEncryption": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "asymmetricEncryption" - ] + "http://asyncapi.com/definitions/2.0.0-rc2/Reference.json": { + "$id": "http://asyncapi.com/definitions/2.0.0-rc2/Reference.json", + "type": "object", + "required": [ + "$ref" + ], + "properties": { + "$ref": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/ReferenceObject.json" + } + } }, - "description": { - "type": "string" - } - }, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "additionalProperties": false - }, - "HTTPSecurityScheme": { - "oneOf": [ - { - "$ref": "#/definitions/NonBearerHTTPSecurityScheme" + "http://asyncapi.com/definitions/2.0.0-rc2/operationTrait.json": { + "$id": "http://asyncapi.com/definitions/2.0.0-rc2/operationTrait.json", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/specificationExtension.json" + } + }, + "properties": { + "summary": { + "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" + } + } }, - { - "$ref": "#/definitions/BearerHTTPSecurityScheme" + "http://asyncapi.com/definitions/2.0.0-rc2/tag.json": { + "$id": "http://asyncapi.com/definitions/2.0.0-rc2/tag.json", + "type": "object", + "additionalProperties": false, + "required": [ + "name" + ], + "properties": { + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "externalDocs": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/externalDocs.json" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/specificationExtension.json" + } + } }, - { - "$ref": "#/definitions/APIKeyHTTPSecurityScheme" - } - ] - }, - "NonBearerHTTPSecurityScheme": { - "not": { - "type": "object", - "properties": { - "scheme": { - "type": "string", - "enum": [ - "bearer" + "http://asyncapi.com/definitions/2.0.0-rc2/message.json": { + "$id": "http://asyncapi.com/definitions/2.0.0-rc2/message.json", + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/Reference.json" + }, + { + "oneOf": [ + { + "type": "object", + "required": [ + "oneOf" + ], + "additionalProperties": false, + "properties": { + "oneOf": { + "type": "array", + "items": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/message.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": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/schema.json" + }, + "payload": {}, + "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" + }, + "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/messageTrait.json" + }, + { + "type": "array", + "items": [ + { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/messageTrait.json" + } + ] + }, + { + "type": "object", + "additionalItems": true + } + ] + } + ] + } + } + } + } + ] + } ] - } - } - }, - "type": "object", - "required": [ - "scheme", - "type" - ], - "properties": { - "scheme": { - "type": "string" - }, - "description": { - "type": "string" - }, - "type": { - "type": "string", - "enum": [ - "http" - ] - } - }, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "additionalProperties": false - }, - "BearerHTTPSecurityScheme": { - "type": "object", - "required": [ - "type", - "scheme" - ], - "properties": { - "scheme": { - "type": "string", - "enum": [ - "bearer" - ] - }, - "bearerFormat": { - "type": "string" }, - "type": { - "type": "string", - "enum": [ - "http" - ] - }, - "description": { - "type": "string" - } - }, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "additionalProperties": false - }, - "APIKeyHTTPSecurityScheme": { - "type": "object", - "required": [ - "type", - "name", - "in" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "httpApiKey" - ] + "http://asyncapi.com/definitions/2.0.0-rc2/correlationId.json": { + "$id": "http://asyncapi.com/definitions/2.0.0-rc2/correlationId.json", + "type": "object", + "required": [ + "location" + ], + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/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]))*)*" + } + } }, - "name": { - "type": "string" + "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": { + "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" + } + } }, - "in": { - "type": "string", - "enum": [ - "header", - "query", - "cookie" - ] + "http://asyncapi.com/definitions/2.0.0-rc2/components.json": { + "$id": "http://asyncapi.com/definitions/2.0.0-rc2/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" + } + } + } }, - "description": { - "type": "string" - } - }, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "additionalProperties": false - }, - "oauth2Flows": { - "type": "object", - "required": [ - "type", - "flows" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "oauth2" - ] + "http://asyncapi.com/definitions/2.0.0-rc2/schemas.json": { + "$id": "http://asyncapi.com/definitions/2.0.0-rc2/schemas.json", + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/schema.json" + }, + "description": "JSON objects describing schemas the API uses." }, - "description": { - "type": "string" + "http://asyncapi.com/definitions/2.0.0-rc2/messages.json": { + "$id": "http://asyncapi.com/definitions/2.0.0-rc2/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." }, - "flows": { - "type": "object", - "properties": { - "implicit": { - "allOf": [ + "http://asyncapi.com/definitions/2.0.0-rc2/SecurityScheme.json": { + "$id": "http://asyncapi.com/definitions/2.0.0-rc2/SecurityScheme.json", + "oneOf": [ { - "$ref": "#/definitions/oauth2Flow" + "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/userPassword.json" }, { - "required": [ - "authorizationUrl", - "scopes" - ] + "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/apiKey.json" }, { - "not": { - "required": [ - "tokenUrl" - ] - } - } - ] - }, - "password": { - "allOf": [ + "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/X509.json" + }, { - "$ref": "#/definitions/oauth2Flow" + "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/symmetricEncryption.json" }, { - "required": [ - "tokenUrl", - "scopes" - ] + "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/asymmetricEncryption.json" }, { - "not": { - "required": [ - "authorizationUrl" + "$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", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "userPassword" ] - } + }, + "description": { + "type": "string" + } + }, + "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/apiKey.json": { + "$id": "http://asyncapi.com/definitions/2.0.0-rc2/apiKey.json", + "type": "object", + "required": [ + "type", + "in" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "apiKey" + ] + }, + "in": { + "type": "string", + "enum": [ + "user", + "password" + ] + }, + "description": { + "type": "string" + } + }, + "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/X509.json": { + "$id": "http://asyncapi.com/definitions/2.0.0-rc2/X509.json", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "X509" + ] + }, + "description": { + "type": "string" + } + }, + "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/symmetricEncryption.json": { + "$id": "http://asyncapi.com/definitions/2.0.0-rc2/symmetricEncryption.json", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "symmetricEncryption" + ] + }, + "description": { + "type": "string" } - ] }, - "clientCredentials": { - "allOf": [ + "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/asymmetricEncryption.json": { + "$id": "http://asyncapi.com/definitions/2.0.0-rc2/asymmetricEncryption.json", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "asymmetricEncryption" + ] + }, + "description": { + "type": "string" + } + }, + "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/HTTPSecurityScheme.json": { + "$id": "http://asyncapi.com/definitions/2.0.0-rc2/HTTPSecurityScheme.json", + "oneOf": [ { - "$ref": "#/definitions/oauth2Flow" + "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/NonBearerHTTPSecurityScheme.json" }, { - "required": [ - "tokenUrl", - "scopes" - ] + "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/BearerHTTPSecurityScheme.json" }, { - "not": { - "required": [ - "authorizationUrl" + "$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", + "not": { + "type": "object", + "properties": { + "scheme": { + "type": "string", + "enum": [ + "bearer" + ] + } + } + }, + "type": "object", + "required": [ + "scheme", + "type" + ], + "properties": { + "scheme": { + "type": "string" + }, + "description": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "http" ] - } } - ] }, - "authorizationCode": { - "allOf": [ - { - "$ref": "#/definitions/oauth2Flow" + "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/BearerHTTPSecurityScheme.json": { + "$id": "http://asyncapi.com/definitions/2.0.0-rc2/BearerHTTPSecurityScheme.json", + "type": "object", + "required": [ + "type", + "scheme" + ], + "properties": { + "scheme": { + "type": "string", + "enum": [ + "bearer" + ] }, - { - "required": [ - "authorizationUrl", - "tokenUrl", - "scopes" - ] + "bearerFormat": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "http" + ] + }, + "description": { + "type": "string" + } + }, + "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/APIKeyHTTPSecurityScheme.json": { + "$id": "http://asyncapi.com/definitions/2.0.0-rc2/APIKeyHTTPSecurityScheme.json", + "type": "object", + "required": [ + "type", + "name", + "in" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "httpApiKey" + ] + }, + "name": { + "type": "string" + }, + "in": { + "type": "string", + "enum": [ + "header", + "query", + "cookie" + ] + }, + "description": { + "type": "string" + } + }, + "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/oauth2Flows.json": { + "$id": "http://asyncapi.com/definitions/2.0.0-rc2/oauth2Flows.json", + "type": "object", + "required": [ + "type", + "flows" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "oauth2" + ] + }, + "description": { + "type": "string" + }, + "flows": { + "type": "object", + "properties": { + "implicit": { + "allOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/oauth2Flow.json" + }, + { + "required": [ + "authorizationUrl", + "scopes" + ] + }, + { + "not": { + "required": [ + "tokenUrl" + ] + } + } + ] + }, + "password": { + "allOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/oauth2Flow.json" + }, + { + "required": [ + "tokenUrl", + "scopes" + ] + }, + { + "not": { + "required": [ + "authorizationUrl" + ] + } + } + ] + }, + "clientCredentials": { + "allOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/oauth2Flow.json" + }, + { + "required": [ + "tokenUrl", + "scopes" + ] + }, + { + "not": { + "required": [ + "authorizationUrl" + ] + } + } + ] + }, + "authorizationCode": { + "allOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/oauth2Flow.json" + }, + { + "required": [ + "authorizationUrl", + "tokenUrl", + "scopes" + ] + } + ] + } + }, + "additionalProperties": false, + "minProperties": 1 + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/specificationExtension.json" } - ] } - }, - "additionalProperties": false, - "minProperties": 1 - } - }, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - } - }, - "oauth2Flow": { - "type": "object", - "properties": { - "authorizationUrl": { - "type": "string", - "format": "uri" - }, - "tokenUrl": { - "type": "string", - "format": "uri" }, - "refreshUrl": { - "type": "string", - "format": "uri" + "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 }, - "scopes": { - "$ref": "#/definitions/oauth2Scopes" - } - }, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "additionalProperties": false - }, - "oauth2Scopes": { - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "openIdConnect": { - "type": "object", - "required": [ - "type", - "openIdConnectUrl" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "openIdConnect" - ] + "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" + } }, - "description": { - "type": "string" + "http://asyncapi.com/definitions/2.0.0-rc2/openIdConnect.json": { + "$id": "http://asyncapi.com/definitions/2.0.0-rc2/openIdConnect.json", + "type": "object", + "required": [ + "type", + "openIdConnectUrl" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "openIdConnect" + ] + }, + "description": { + "type": "string" + }, + "openIdConnectUrl": { + "type": "string", + "format": "uri" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/specificationExtension.json" + } + }, + "additionalProperties": false }, - "openIdConnectUrl": { - "type": "string", - "format": "uri" - } - }, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" + "http://asyncapi.com/definitions/2.0.0-rc2/parameters.json": { + "$id": "http://asyncapi.com/definitions/2.0.0-rc2/parameters.json", + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/parameter.json" + }, + "description": "JSON objects describing re-usable channel parameters." } - }, - "additionalProperties": false }, - "SecurityRequirement": { - "type": "object", - "additionalProperties": { - "type": "array", - "items": { - "type": "string" - }, - "uniqueItems": true - } - } - } + "description": "!!Auto generated!! \n Do not manually edit. " } \ No newline at end of file diff --git a/schemas/2.0.0.json b/schemas/2.0.0.json index 626c7b6f..e6d016d6 100644 --- a/schemas/2.0.0.json +++ b/schemas/2.0.0.json @@ -1,1377 +1,1663 @@ { - "title": "AsyncAPI 2.0.0 schema.", - "$schema": "http://json-schema.org/draft-07/schema#", - "type": "object", - "required": [ - "asyncapi", - "info", - "channels" - ], - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "properties": { - "asyncapi": { - "type": "string", - "enum": [ - "2.0.0" - ], - "description": "The AsyncAPI specification version of this document." - }, - "id": { - "type": "string", - "description": "A unique id representing the application.", - "format": "uri" - }, - "info": { - "$ref": "#/definitions/info" - }, - "servers": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/server" - } - }, - "defaultContentType": { - "type": "string" - }, - "channels": { - "$ref": "#/definitions/channels" - }, - "components": { - "$ref": "#/definitions/components" - }, - "tags": { - "type": "array", - "items": { - "$ref": "#/definitions/tag" - }, - "uniqueItems": true - }, - "externalDocs": { - "$ref": "#/definitions/externalDocs" - } - }, - "definitions": { - "Reference": { - "type": "object", - "required": [ - "$ref" - ], - "properties": { - "$ref": { - "$ref": "#/definitions/ReferenceObject" - } - } - }, - "ReferenceObject": { - "type": "string", - "format": "uri-reference" - }, - "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.", - "additionalProperties": false, - "properties": { - "name": { - "type": "string", - "description": "The identifying name of the contact person/organization." - }, - "url": { - "type": "string", - "description": "The URL pointing to the contact information.", - "format": "uri" - }, - "email": { - "type": "string", - "description": "The email address of the contact person/organization.", - "format": "email" - } - }, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - } - }, - "license": { - "type": "object", - "required": [ - "name" - ], - "additionalProperties": false, - "properties": { - "name": { - "type": "string", - "description": "The name of the license type. It's encouraged to use an OSI compatible license." - }, - "url": { - "type": "string", - "description": "The URL pointing to the license.", - "format": "uri" - } - }, - "patternProperties": { + "$id": "http://asyncapi.com/definitions/2.0.0/asyncapi.json", + "$schema": "http://json-schema.org/draft-07/schema", + "title": "AsyncAPI 2.0.0 schema.", + "type": "object", + "required": [ + "asyncapi", + "info", + "channels" + ], + "additionalProperties": false, + "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" + "$ref": "http://asyncapi.com/definitions/2.0.0/specificationExtension.json" } - } }, - "server": { - "type": "object", - "description": "An object representing a Server.", - "required": [ - "url", - "protocol" - ], - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "properties": { - "url": { - "type": "string" - }, - "description": { - "type": "string" - }, - "protocol": { - "type": "string", - "description": "The transfer protocol." + "properties": { + "asyncapi": { + "type": "string", + "enum": [ + "2.0.0" + ], + "description": "The AsyncAPI specification version of this document." }, - "protocolVersion": { - "type": "string" + "id": { + "type": "string", + "description": "A unique id representing the application.", + "format": "uri" }, - "variables": { - "$ref": "#/definitions/serverVariables" + "info": { + "$ref": "http://asyncapi.com/definitions/2.0.0/info.json" }, - "security": { - "type": "array", - "items": { - "$ref": "#/definitions/SecurityRequirement" - } + "servers": { + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/2.0.0/server.json" + } }, - "bindings": { - "$ref": "#/definitions/bindingsObject" - } - } - }, - "serverVariables": { - "type": "object", - "additionalProperties": { - "$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", - "items": { + "defaultContentType": { "type": "string" - }, - "uniqueItems": true }, - "default": { - "type": "string" + "channels": { + "$ref": "http://asyncapi.com/definitions/2.0.0/channels.json" }, - "description": { - "type": "string" + "components": { + "$ref": "http://asyncapi.com/definitions/2.0.0/components.json" }, - "examples": { - "type": "array", - "items": { - "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" } - } }, - "channels": { - "type": "object", - "propertyNames": { - "type": "string", - "format": "uri-template", - "minLength": 1 - }, - "additionalProperties": { - "$ref": "#/definitions/channelItem" - } - }, - "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" + "definitions": { + "http://asyncapi.com/definitions/2.0.0/specificationExtension.json": { + "$id": "http://asyncapi.com/definitions/2.0.0/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." }, - { - "$ref": "#/definitions/SecurityScheme" + "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" } - ] } - } }, - "parameters": { - "$ref": "#/definitions/parameters" - }, - "correlationIds": { - "type": "object", - "patternProperties": { - "^[\\w\\d\\.\\-_]+$": { - "oneOf": [ - { - "$ref": "#/definitions/Reference" + "http://asyncapi.com/definitions/2.0.0/contact.json": { + "$id": "http://asyncapi.com/definitions/2.0.0/contact.json", + "type": "object", + "description": "Contact information for the owners of the API.", + "additionalProperties": false, + "properties": { + "name": { + "type": "string", + "description": "The identifying name of the contact person/organization." }, - { - "$ref": "#/definitions/correlationId" + "url": { + "type": "string", + "description": "The URL pointing to the contact information.", + "format": "uri" + }, + "email": { + "type": "string", + "description": "The email address of the contact person/organization.", + "format": "email" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.0.0/specificationExtension.json" } - ] } - } - }, - "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" - } - } - } - }, - "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." - }, - "parameters": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/parameter" - }, - "description": "JSON objects describing re-usable channel parameters." - }, - "schema": { - "allOf": [ - { - "$ref": "http://json-schema.org/draft-07/schema#" - }, - { - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "properties": { - "additionalProperties": { - "anyOf": [ - { - "$ref": "#/definitions/schema" + "http://asyncapi.com/definitions/2.0.0/license.json": { + "$id": "http://asyncapi.com/definitions/2.0.0/license.json", + "type": "object", + "required": [ + "name" + ], + "additionalProperties": false, + "properties": { + "name": { + "type": "string", + "description": "The name of the license type. It's encouraged to use an OSI compatible license." }, - { - "type": "boolean" + "url": { + "type": "string", + "description": "The URL pointing to the license.", + "format": "uri" } - ], - "default": {} }, - "items": { - "anyOf": [ - { - "$ref": "#/definitions/schema" - }, - { - "type": "array", - "minItems": 1, - "items": { - "$ref": "#/definitions/schema" - } + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.0.0/specificationExtension.json" } - ], - "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": {} - }, + } + }, + "http://asyncapi.com/definitions/2.0.0/server.json": { + "$id": "http://asyncapi.com/definitions/2.0.0/server.json", + "type": "object", + "description": "An object representing a Server.", + "required": [ + "url", + "protocol" + ], + "additionalProperties": false, "patternProperties": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/schema" - }, - "default": {} - }, - "propertyNames": { - "$ref": "#/definitions/schema" - }, - "contains": { - "$ref": "#/definitions/schema" - }, - "discriminator": { - "type": "string" - }, - "externalDocs": { - "$ref": "#/definitions/externalDocs" + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.0.0/specificationExtension.json" + } }, - "deprecated": { - "type": "boolean", - "default": false + "properties": { + "url": { + "type": "string" + }, + "description": { + "type": "string" + }, + "protocol": { + "type": "string", + "description": "The transfer protocol." + }, + "protocolVersion": { + "type": "string" + }, + "variables": { + "$ref": "http://asyncapi.com/definitions/2.0.0/serverVariables.json" + }, + "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" + } } - } - } - ] - }, - "externalDocs": { - "type": "object", - "additionalProperties": false, - "description": "information about external documentation", - "required": [ - "url" - ], - "properties": { - "description": { - "type": "string" - }, - "url": { - "type": "string", - "format": "uri" - } - }, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - } - }, - "channelItem": { - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "properties": { - "$ref": { - "$ref": "#/definitions/ReferenceObject" - }, - "parameters": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/parameter" - } - }, - "description": { - "type": "string", - "description": "A description of the channel." - }, - "publish": { - "$ref": "#/definitions/operation" - }, - "subscribe": { - "$ref": "#/definitions/operation" - }, - "deprecated": { - "type": "boolean", - "default": false - }, - "bindings": { - "$ref": "#/definitions/bindingsObject" - } - } - }, - "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" + "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" + } }, - "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.0.0/serverVariable.json": { + "$id": "http://asyncapi.com/definitions/2.0.0/serverVariable.json", + "type": "object", + "description": "An object representing a Server Variable for server URL template substitution.", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.0.0/specificationExtension.json" + } + }, + "properties": { + "enum": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + }, + "default": { + "type": "string" + }, + "description": { + "type": "string" + }, + "examples": { + "type": "array", + "items": { + "type": "string" + } + } + } }, - "$ref": { - "$ref": "#/definitions/ReferenceObject" - } - } - }, - "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" - }, - { + "http://asyncapi.com/definitions/2.0.0/SecurityRequirement.json": { + "$id": "http://asyncapi.com/definitions/2.0.0/SecurityRequirement.json", + "type": "object", + "additionalProperties": { "type": "array", - "items": [ - { - "oneOf": [ - { - "$ref": "#/definitions/Reference" - }, - { - "$ref": "#/definitions/operationTrait" - } - ] - }, - { - "type": "object", - "additionalItems": true - } - ] - } - ] - } - }, - "summary": { - "type": "string" - }, - "description": { - "type": "string" - }, - "tags": { - "type": "array", - "items": { - "$ref": "#/definitions/tag" - }, - "uniqueItems": true - }, - "externalDocs": { - "$ref": "#/definitions/externalDocs" - }, - "operationId": { - "type": "string" + "items": { + "type": "string" + }, + "uniqueItems": true + } }, - "bindings": { - "$ref": "#/definitions/bindingsObject" + "http://asyncapi.com/definitions/2.0.0/bindingsObject.json": { + "$id": "http://asyncapi.com/definitions/2.0.0/bindingsObject.json", + "type": "object", + "additionalProperties": true, + "properties": { + "http": {}, + "ws": {}, + "amqp": {}, + "amqp1": {}, + "mqtt": {}, + "mqtt5": {}, + "kafka": {}, + "nats": {}, + "jms": {}, + "sns": {}, + "sqs": {}, + "stomp": {}, + "redis": {} + } }, - "message": { - "$ref": "#/definitions/message" - } - } - }, - "message": { - "oneOf": [ - { - "$ref": "#/definitions/Reference" + "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" + } }, - { - "oneOf": [ - { - "type": "object", - "required": [ - "oneOf" - ], - "additionalProperties": false, - "properties": { - "oneOf": { - "type": "array", - "items": { - "$ref": "#/definitions/message" - } + "http://asyncapi.com/definitions/2.0.0/channelItem.json": { + "$id": "http://asyncapi.com/definitions/2.0.0/channelItem.json", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.0.0/specificationExtension.json" } - } }, - { - "type": "object", - "additionalProperties": false, - "patternProperties": { + "properties": { + "$ref": { + "$ref": "http://asyncapi.com/definitions/2.0.0/ReferenceObject.json" + }, + "parameters": { + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/2.0.0/parameter.json" + } + }, + "description": { + "type": "string", + "description": "A description of the channel." + }, + "publish": { + "$ref": "http://asyncapi.com/definitions/2.0.0/operation.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/ReferenceObject.json": { + "$id": "http://asyncapi.com/definitions/2.0.0/ReferenceObject.json", + "type": "string", + "format": "uri-reference" + }, + "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": "#/definitions/specificationExtension" + "$ref": "http://asyncapi.com/definitions/2.0.0/specificationExtension.json" } - }, - "properties": { - "schemaFormat": { - "type": "string" + }, + "properties": { + "description": { + "type": "string", + "description": "A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed." }, - "contentType": { - "type": "string" + "schema": { + "$ref": "http://asyncapi.com/definitions/2.0.0/schema.json" }, - "headers": { - "allOf": [ - { - "$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": "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": { - "type": { - "const": "object" + "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": "#" + } }, - "payload": {}, - "correlationId": { - "oneOf": [ - { - "$ref": "#/definitions/Reference" + "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" }, - { - "$ref": "#/definitions/correlationId" - } - ] + "uniqueItems": true, + "default": [] + } + }, + "type": [ + "object", + "boolean" + ], + "properties": { + "$id": { + "type": "string", + "format": "uri-reference" }, - "tags": { - "type": "array", - "items": { - "$ref": "#/definitions/tag" - }, - "uniqueItems": true + "$schema": { + "type": "string", + "format": "uri" }, - "summary": { - "type": "string", - "description": "A brief summary of the message." + "$ref": { + "type": "string", + "format": "uri-reference" }, - "name": { - "type": "string", - "description": "Name of the message." + "$comment": { + "type": "string" }, "title": { - "type": "string", - "description": "A human-friendly title for the message." + "type": "string" }, "description": { - "type": "string", - "description": "A longer description of the message. CommonMark is allowed." + "type": "string" }, - "externalDocs": { - "$ref": "#/definitions/externalDocs" + "default": true, + "readOnly": { + "type": "boolean", + "default": false }, - "deprecated": { - "type": "boolean", - "default": false + "writeOnly": { + "type": "boolean", + "default": false }, "examples": { - "type": "array", - "items": { - "type": "object", - "additionalProperties": false, - "properties": { - "headers": { - "type": "object" - }, - "payload": {} - } - } + "type": "array", + "items": true }, - "bindings": { - "$ref": "#/definitions/bindingsObject" + "multipleOf": { + "type": "number", + "exclusiveMinimum": 0 }, - "traits": { - "type": "array", - "items": { - "oneOf": [ - { - "$ref": "#/definitions/Reference" - }, - { - "$ref": "#/definitions/messageTrait" - }, - { - "type": "array", - "items": [ - { - "oneOf": [ - { - "$ref": "#/definitions/Reference" - }, - { - "$ref": "#/definitions/messageTrait" - } - ] - }, - { - "type": "object", - "additionalItems": true - } + "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": [ + { + "$ref": "#" + }, + { + "$ref": "#/definitions/schemaArray" + } + ], + "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": { + "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" + }, + { + "type": "array", + "items": { + "$ref": "#/definitions/simpleTypes" + }, + "minItems": 1, + "uniqueItems": true + } ] - } + }, + "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 + }, + "http://asyncapi.com/definitions/2.0.0/externalDocs.json": { + "$id": "http://asyncapi.com/definitions/2.0.0/externalDocs.json", + "type": "object", + "additionalProperties": false, + "description": "information about external documentation", + "required": [ + "url" + ], + "properties": { + "description": { + "type": "string" + }, + "url": { + "type": "string", + "format": "uri" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.0.0/specificationExtension.json" } - } } - ] - } - ] - }, - "bindingsObject": { - "type": "object", - "additionalProperties": true, - "properties": { - "http": {}, - "ws": {}, - "amqp": {}, - "amqp1": {}, - "mqtt": {}, - "mqtt5": {}, - "kafka": {}, - "nats": {}, - "jms": {}, - "sns": {}, - "sqs": {}, - "stomp": {}, - "redis": {} - } - }, - "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]))*)*" - } - } - }, - "specificationExtension": { - "description": "Any property starting with x- is valid.", - "additionalProperties": true, - "additionalItems": true - }, - "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" - }, - "description": { - "type": "string" }, - "tags": { - "type": "array", - "items": { - "$ref": "#/definitions/tag" - }, - "uniqueItems": true - }, - "externalDocs": { - "$ref": "#/definitions/externalDocs" - }, - "operationId": { - "type": "string" - }, - "bindings": { - "$ref": "#/definitions/bindingsObject" - } - } - }, - "messageTrait": { - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "properties": { - "schemaFormat": { - "type": "string" + "http://asyncapi.com/definitions/2.0.0/operation.json": { + "$id": "http://asyncapi.com/definitions/2.0.0/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" + }, + { + "type": "array", + "items": [ + { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.0.0/operationTrait.json" + } + ] + }, + { + "type": "object", + "additionalItems": true + } + ] + } + ] + } + }, + "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" + }, + "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" + } + } }, - "contentType": { - "type": "string" + "http://asyncapi.com/definitions/2.0.0/Reference.json": { + "$id": "http://asyncapi.com/definitions/2.0.0/Reference.json", + "type": "object", + "required": [ + "$ref" + ], + "properties": { + "$ref": { + "$ref": "http://asyncapi.com/definitions/2.0.0/ReferenceObject.json" + } + } }, - "headers": { - "oneOf": [ - { - "$ref": "#/definitions/Reference" + "http://asyncapi.com/definitions/2.0.0/operationTrait.json": { + "$id": "http://asyncapi.com/definitions/2.0.0/operationTrait.json", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.0.0/specificationExtension.json" + } }, - { - "$ref": "#/definitions/schema" + "properties": { + "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" + }, + "operationId": { + "type": "string" + }, + "bindings": { + "$ref": "http://asyncapi.com/definitions/2.0.0/bindingsObject.json" + } } - ] }, - "correlationId": { - "oneOf": [ - { - "$ref": "#/definitions/Reference" + "http://asyncapi.com/definitions/2.0.0/tag.json": { + "$id": "http://asyncapi.com/definitions/2.0.0/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" + } }, - { - "$ref": "#/definitions/correlationId" + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.0.0/specificationExtension.json" + } } - ] - }, - "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" - } - } - }, - "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": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "userPassword" - ] - }, - "description": { - "type": "string" - } - }, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "additionalProperties": false - }, - "apiKey": { - "type": "object", - "required": [ - "type", - "in" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "apiKey" - ] - }, - "in": { - "type": "string", - "enum": [ - "user", - "password" - ] - }, - "description": { - "type": "string" - } - }, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "additionalProperties": false - }, - "X509": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "X509" - ] - }, - "description": { - "type": "string" - } - }, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "additionalProperties": false - }, - "symmetricEncryption": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "symmetricEncryption" - ] - }, - "description": { - "type": "string" - } - }, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "additionalProperties": false - }, - "asymmetricEncryption": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "asymmetricEncryption" - ] - }, - "description": { - "type": "string" - } - }, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "additionalProperties": false - }, - "HTTPSecurityScheme": { - "oneOf": [ - { - "$ref": "#/definitions/NonBearerHTTPSecurityScheme" - }, - { - "$ref": "#/definitions/BearerHTTPSecurityScheme" - }, - { - "$ref": "#/definitions/APIKeyHTTPSecurityScheme" - } - ] - }, - "NonBearerHTTPSecurityScheme": { - "not": { - "type": "object", - "properties": { - "scheme": { - "type": "string", - "enum": [ - "bearer" + "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" + }, + { + "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" + }, + { + "type": "array", + "items": [ + { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.0.0/messageTrait.json" + } + ] + }, + { + "type": "object", + "additionalItems": true + } + ] + } + ] + } + } + } + } + ] + } ] - } - } - }, - "type": "object", - "required": [ - "scheme", - "type" - ], - "properties": { - "scheme": { - "type": "string" - }, - "description": { - "type": "string" - }, - "type": { - "type": "string", - "enum": [ - "http" - ] - } - }, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "additionalProperties": false - }, - "BearerHTTPSecurityScheme": { - "type": "object", - "required": [ - "type", - "scheme" - ], - "properties": { - "scheme": { - "type": "string", - "enum": [ - "bearer" - ] - }, - "bearerFormat": { - "type": "string" }, - "type": { - "type": "string", - "enum": [ - "http" - ] - }, - "description": { - "type": "string" - } - }, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "additionalProperties": false - }, - "APIKeyHTTPSecurityScheme": { - "type": "object", - "required": [ - "type", - "name", - "in" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "httpApiKey" - ] + "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]))*)*" + } + } }, - "name": { - "type": "string" + "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": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.0.0/schema.json" + } + ] + }, + "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" + } + } }, - "in": { - "type": "string", - "enum": [ - "header", - "query", - "cookie" - ] + "http://asyncapi.com/definitions/2.0.0/components.json": { + "$id": "http://asyncapi.com/definitions/2.0.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.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" + } + } + } }, - "description": { - "type": "string" - } - }, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "additionalProperties": false - }, - "oauth2Flows": { - "type": "object", - "required": [ - "type", - "flows" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "oauth2" - ] + "http://asyncapi.com/definitions/2.0.0/schemas.json": { + "$id": "http://asyncapi.com/definitions/2.0.0/schemas.json", + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/2.0.0/schema.json" + }, + "description": "JSON objects describing schemas the API uses." }, - "description": { - "type": "string" + "http://asyncapi.com/definitions/2.0.0/messages.json": { + "$id": "http://asyncapi.com/definitions/2.0.0/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." }, - "flows": { - "type": "object", - "properties": { - "implicit": { - "allOf": [ + "http://asyncapi.com/definitions/2.0.0/SecurityScheme.json": { + "$id": "http://asyncapi.com/definitions/2.0.0/SecurityScheme.json", + "oneOf": [ { - "$ref": "#/definitions/oauth2Flow" + "$ref": "http://asyncapi.com/definitions/2.0.0/userPassword.json" }, { - "required": [ - "authorizationUrl", - "scopes" - ] + "$ref": "http://asyncapi.com/definitions/2.0.0/apiKey.json" }, { - "not": { - "required": [ - "tokenUrl" - ] - } - } - ] - }, - "password": { - "allOf": [ + "$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": "#/definitions/oauth2Flow" + "$ref": "http://asyncapi.com/definitions/2.0.0/HTTPSecurityScheme.json" }, { - "required": [ - "tokenUrl", - "scopes" - ] + "$ref": "http://asyncapi.com/definitions/2.0.0/oauth2Flows.json" }, { - "not": { - "required": [ - "authorizationUrl" + "$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", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "userPassword" ] - } + }, + "description": { + "type": "string" } - ] }, - "clientCredentials": { - "allOf": [ + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.0.0/specificationExtension.json" + } + }, + "additionalProperties": false + }, + "http://asyncapi.com/definitions/2.0.0/apiKey.json": { + "$id": "http://asyncapi.com/definitions/2.0.0/apiKey.json", + "type": "object", + "required": [ + "type", + "in" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "apiKey" + ] + }, + "in": { + "type": "string", + "enum": [ + "user", + "password" + ] + }, + "description": { + "type": "string" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.0.0/specificationExtension.json" + } + }, + "additionalProperties": false + }, + "http://asyncapi.com/definitions/2.0.0/X509.json": { + "$id": "http://asyncapi.com/definitions/2.0.0/X509.json", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "X509" + ] + }, + "description": { + "type": "string" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.0.0/specificationExtension.json" + } + }, + "additionalProperties": false + }, + "http://asyncapi.com/definitions/2.0.0/symmetricEncryption.json": { + "$id": "http://asyncapi.com/definitions/2.0.0/symmetricEncryption.json", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "symmetricEncryption" + ] + }, + "description": { + "type": "string" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.0.0/specificationExtension.json" + } + }, + "additionalProperties": false + }, + "http://asyncapi.com/definitions/2.0.0/asymmetricEncryption.json": { + "$id": "http://asyncapi.com/definitions/2.0.0/asymmetricEncryption.json", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "asymmetricEncryption" + ] + }, + "description": { + "type": "string" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.0.0/specificationExtension.json" + } + }, + "additionalProperties": false + }, + "http://asyncapi.com/definitions/2.0.0/HTTPSecurityScheme.json": { + "$id": "http://asyncapi.com/definitions/2.0.0/HTTPSecurityScheme.json", + "oneOf": [ { - "$ref": "#/definitions/oauth2Flow" + "$ref": "http://asyncapi.com/definitions/2.0.0/NonBearerHTTPSecurityScheme.json" }, { - "required": [ - "tokenUrl", - "scopes" - ] + "$ref": "http://asyncapi.com/definitions/2.0.0/BearerHTTPSecurityScheme.json" }, { - "not": { - "required": [ - "authorizationUrl" + "$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", + "not": { + "type": "object", + "properties": { + "scheme": { + "type": "string", + "enum": [ + "bearer" + ] + } + } + }, + "type": "object", + "required": [ + "scheme", + "type" + ], + "properties": { + "scheme": { + "type": "string" + }, + "description": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "http" ] - } } - ] }, - "authorizationCode": { - "allOf": [ - { - "$ref": "#/definitions/oauth2Flow" + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.0.0/specificationExtension.json" + } + }, + "additionalProperties": false + }, + "http://asyncapi.com/definitions/2.0.0/BearerHTTPSecurityScheme.json": { + "$id": "http://asyncapi.com/definitions/2.0.0/BearerHTTPSecurityScheme.json", + "type": "object", + "required": [ + "type", + "scheme" + ], + "properties": { + "scheme": { + "type": "string", + "enum": [ + "bearer" + ] }, - { - "required": [ - "authorizationUrl", - "tokenUrl", - "scopes" - ] + "bearerFormat": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "http" + ] + }, + "description": { + "type": "string" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.0.0/specificationExtension.json" + } + }, + "additionalProperties": false + }, + "http://asyncapi.com/definitions/2.0.0/APIKeyHTTPSecurityScheme.json": { + "$id": "http://asyncapi.com/definitions/2.0.0/APIKeyHTTPSecurityScheme.json", + "type": "object", + "required": [ + "type", + "name", + "in" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "httpApiKey" + ] + }, + "name": { + "type": "string" + }, + "in": { + "type": "string", + "enum": [ + "header", + "query", + "cookie" + ] + }, + "description": { + "type": "string" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.0.0/specificationExtension.json" + } + }, + "additionalProperties": false + }, + "http://asyncapi.com/definitions/2.0.0/oauth2Flows.json": { + "$id": "http://asyncapi.com/definitions/2.0.0/oauth2Flows.json", + "type": "object", + "required": [ + "type", + "flows" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "oauth2" + ] + }, + "description": { + "type": "string" + }, + "flows": { + "type": "object", + "properties": { + "implicit": { + "allOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.0.0/oauth2Flow.json" + }, + { + "required": [ + "authorizationUrl", + "scopes" + ] + }, + { + "not": { + "required": [ + "tokenUrl" + ] + } + } + ] + }, + "password": { + "allOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.0.0/oauth2Flow.json" + }, + { + "required": [ + "tokenUrl", + "scopes" + ] + }, + { + "not": { + "required": [ + "authorizationUrl" + ] + } + } + ] + }, + "clientCredentials": { + "allOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.0.0/oauth2Flow.json" + }, + { + "required": [ + "tokenUrl", + "scopes" + ] + }, + { + "not": { + "required": [ + "authorizationUrl" + ] + } + } + ] + }, + "authorizationCode": { + "allOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.0.0/oauth2Flow.json" + }, + { + "required": [ + "authorizationUrl", + "tokenUrl", + "scopes" + ] + } + ] + } + }, + "additionalProperties": false + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.0.0/specificationExtension.json" } - ] } - }, - "additionalProperties": false - } - }, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - } - }, - "oauth2Flow": { - "type": "object", - "properties": { - "authorizationUrl": { - "type": "string", - "format": "uri" }, - "tokenUrl": { - "type": "string", - "format": "uri" - }, - "refreshUrl": { - "type": "string", - "format": "uri" + "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 }, - "scopes": { - "$ref": "#/definitions/oauth2Scopes" - } - }, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "additionalProperties": false - }, - "oauth2Scopes": { - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "openIdConnect": { - "type": "object", - "required": [ - "type", - "openIdConnectUrl" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "openIdConnect" - ] + "http://asyncapi.com/definitions/2.0.0/oauth2Scopes.json": { + "$id": "http://asyncapi.com/definitions/2.0.0/oauth2Scopes.json", + "type": "object", + "additionalProperties": { + "type": "string" + } }, - "description": { - "type": "string" + "http://asyncapi.com/definitions/2.0.0/openIdConnect.json": { + "$id": "http://asyncapi.com/definitions/2.0.0/openIdConnect.json", + "type": "object", + "required": [ + "type", + "openIdConnectUrl" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "openIdConnect" + ] + }, + "description": { + "type": "string" + }, + "openIdConnectUrl": { + "type": "string", + "format": "uri" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.0.0/specificationExtension.json" + } + }, + "additionalProperties": false }, - "openIdConnectUrl": { - "type": "string", - "format": "uri" - } - }, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" + "http://asyncapi.com/definitions/2.0.0/parameters.json": { + "$id": "http://asyncapi.com/definitions/2.0.0/parameters.json", + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/2.0.0/parameter.json" + }, + "description": "JSON objects describing re-usable channel parameters." } - }, - "additionalProperties": false }, - "SecurityRequirement": { - "type": "object", - "additionalProperties": { - "type": "array", - "items": { - "type": "string" - }, - "uniqueItems": true - } - } - } + "description": "!!Auto generated!! \n Do not manually edit. " } \ No newline at end of file diff --git a/schemas/2.1.0.json b/schemas/2.1.0.json index bd3045d1..b9aa6efd 100644 --- a/schemas/2.1.0.json +++ b/schemas/2.1.0.json @@ -1,1495 +1,1801 @@ { - "title": "AsyncAPI 2.1.0 schema.", - "$schema": "http://json-schema.org/draft-07/schema#", - "type": "object", - "required": [ - "asyncapi", - "info", - "channels" - ], - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "properties": { - "asyncapi": { - "type": "string", - "enum": [ - "2.1.0" - ], - "description": "The AsyncAPI specification version of this document." - }, - "id": { - "type": "string", - "description": "A unique id representing the application.", - "format": "uri" - }, - "info": { - "$ref": "#/definitions/info" - }, - "servers": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/server" - } - }, - "defaultContentType": { - "type": "string" - }, - "channels": { - "$ref": "#/definitions/channels" - }, - "components": { - "$ref": "#/definitions/components" - }, - "tags": { - "type": "array", - "items": { - "$ref": "#/definitions/tag" - }, - "uniqueItems": true - }, - "externalDocs": { - "$ref": "#/definitions/externalDocs" - } - }, - "definitions": { - "Reference": { - "type": "object", - "required": [ - "$ref" - ], - "properties": { - "$ref": { - "$ref": "#/definitions/ReferenceObject" - } - } - }, - "ReferenceObject": { - "type": "string", - "format": "uri-reference" - }, - "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.", - "additionalProperties": false, - "properties": { - "name": { - "type": "string", - "description": "The identifying name of the contact person/organization." - }, - "url": { - "type": "string", - "description": "The URL pointing to the contact information.", - "format": "uri" - }, - "email": { - "type": "string", - "description": "The email address of the contact person/organization.", - "format": "email" - } - }, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - } - }, - "license": { - "type": "object", - "required": [ - "name" - ], - "additionalProperties": false, - "properties": { - "name": { - "type": "string", - "description": "The name of the license type. It's encouraged to use an OSI compatible license." - }, - "url": { - "type": "string", - "description": "The URL pointing to the license.", - "format": "uri" - } - }, - "patternProperties": { + "$id": "http://asyncapi.com/definitions/2.1.0/asyncapi.json", + "$schema": "http://json-schema.org/draft-07/schema", + "title": "AsyncAPI 2.1.0 schema.", + "type": "object", + "required": [ + "asyncapi", + "info", + "channels" + ], + "additionalProperties": false, + "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" + "$ref": "http://asyncapi.com/definitions/2.1.0/specificationExtension.json" } - } }, - "server": { - "type": "object", - "description": "An object representing a Server.", - "required": [ - "url", - "protocol" - ], - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "properties": { - "url": { - "type": "string" - }, - "description": { - "type": "string" - }, - "protocol": { - "type": "string", - "description": "The transfer protocol." + "properties": { + "asyncapi": { + "type": "string", + "enum": [ + "2.1.0" + ], + "description": "The AsyncAPI specification version of this document." }, - "protocolVersion": { - "type": "string" + "id": { + "type": "string", + "description": "A unique id representing the application.", + "format": "uri" }, - "variables": { - "$ref": "#/definitions/serverVariables" + "info": { + "$ref": "http://asyncapi.com/definitions/2.1.0/info.json" }, - "security": { - "type": "array", - "items": { - "$ref": "#/definitions/SecurityRequirement" - } + "servers": { + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/2.1.0/server.json" + } }, - "bindings": { - "$ref": "#/definitions/bindingsObject" - } - } - }, - "serverVariables": { - "type": "object", - "additionalProperties": { - "$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", - "items": { + "defaultContentType": { "type": "string" - }, - "uniqueItems": true }, - "default": { - "type": "string" + "channels": { + "$ref": "http://asyncapi.com/definitions/2.1.0/channels.json" }, - "description": { - "type": "string" + "components": { + "$ref": "http://asyncapi.com/definitions/2.1.0/components.json" }, - "examples": { - "type": "array", - "items": { - "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" } - } }, - "channels": { - "type": "object", - "propertyNames": { - "type": "string", - "format": "uri-template", - "minLength": 1 - }, - "additionalProperties": { - "$ref": "#/definitions/channelItem" - } - }, - "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" + "definitions": { + "http://asyncapi.com/definitions/2.1.0/specificationExtension.json": { + "$id": "http://asyncapi.com/definitions/2.1.0/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." }, - { - "$ref": "#/definitions/SecurityScheme" + "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" } - ] } - } - }, - "parameters": { - "$ref": "#/definitions/parameters" }, - "correlationIds": { - "type": "object", - "patternProperties": { - "^[\\w\\d\\.\\-_]+$": { - "oneOf": [ - { - "$ref": "#/definitions/Reference" + "http://asyncapi.com/definitions/2.1.0/contact.json": { + "$id": "http://asyncapi.com/definitions/2.1.0/contact.json", + "type": "object", + "description": "Contact information for the owners of the API.", + "additionalProperties": false, + "properties": { + "name": { + "type": "string", + "description": "The identifying name of the contact person/organization." }, - { - "$ref": "#/definitions/correlationId" + "url": { + "type": "string", + "description": "The URL pointing to the contact information.", + "format": "uri" + }, + "email": { + "type": "string", + "description": "The email address of the contact person/organization.", + "format": "email" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.1.0/specificationExtension.json" } - ] } - } - }, - "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" - } - } - } - }, - "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." - }, - "parameters": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/parameter" - }, - "description": "JSON objects describing re-usable channel parameters." - }, - "schema": { - "allOf": [ - { - "$ref": "http://json-schema.org/draft-07/schema#" - }, - { - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "properties": { - "additionalProperties": { - "anyOf": [ - { - "$ref": "#/definitions/schema" + "http://asyncapi.com/definitions/2.1.0/license.json": { + "$id": "http://asyncapi.com/definitions/2.1.0/license.json", + "type": "object", + "required": [ + "name" + ], + "additionalProperties": false, + "properties": { + "name": { + "type": "string", + "description": "The name of the license type. It's encouraged to use an OSI compatible license." }, - { - "type": "boolean" + "url": { + "type": "string", + "description": "The URL pointing to the license.", + "format": "uri" } - ], - "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 + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.1.0/specificationExtension.json" + } } - } - } - ] - }, - "externalDocs": { - "type": "object", - "additionalProperties": false, - "description": "information about external documentation", - "required": [ - "url" - ], - "properties": { - "description": { - "type": "string" - }, - "url": { - "type": "string", - "format": "uri" - } - }, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - } - }, - "channelItem": { - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "properties": { - "$ref": { - "$ref": "#/definitions/ReferenceObject" - }, - "parameters": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/parameter" - } - }, - "description": { - "type": "string", - "description": "A description of the channel." - }, - "publish": { - "$ref": "#/definitions/operation" - }, - "subscribe": { - "$ref": "#/definitions/operation" - }, - "deprecated": { - "type": "boolean", - "default": false - }, - "bindings": { - "$ref": "#/definitions/bindingsObject" - } - } - }, - "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" - } - } - }, - "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" - }, - { - "type": "array", - "items": [ - { - "oneOf": [ - { - "$ref": "#/definitions/Reference" - }, - { - "$ref": "#/definitions/operationTrait" - } - ] - }, - { - "type": "object", - "additionalItems": true - } - ] - } - ] - } - }, - "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" - } - } - }, - "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": { + "http://asyncapi.com/definitions/2.1.0/server.json": { + "$id": "http://asyncapi.com/definitions/2.1.0/server.json", + "type": "object", + "description": "An object representing a Server.", + "required": [ + "url", + "protocol" + ], + "additionalProperties": false, + "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" + "$ref": "http://asyncapi.com/definitions/2.1.0/specificationExtension.json" } - }, - "properties": { - "schemaFormat": { - "type": "string" + }, + "properties": { + "url": { + "type": "string" }, - "contentType": { - "type": "string" + "description": { + "type": "string" }, - "headers": { - "allOf": [ - { - "$ref": "#/definitions/schema" - }, - { - "properties": { - "type": { - "const": "object" - } - } - } - ] + "protocol": { + "type": "string", + "description": "The transfer protocol." }, - "payload": {}, - "correlationId": { - "oneOf": [ - { - "$ref": "#/definitions/Reference" - }, - { - "$ref": "#/definitions/correlationId" - } - ] + "protocolVersion": { + "type": "string" }, - "tags": { - "type": "array", - "items": { - "$ref": "#/definitions/tag" - }, - "uniqueItems": true + "variables": { + "$ref": "http://asyncapi.com/definitions/2.1.0/serverVariables.json" }, - "summary": { - "type": "string", - "description": "A brief summary of the message." + "security": { + "type": "array", + "items": { + "$ref": "http://asyncapi.com/definitions/2.1.0/SecurityRequirement.json" + } }, - "name": { - "type": "string", - "description": "Name of the message." + "bindings": { + "$ref": "http://asyncapi.com/definitions/2.1.0/bindingsObject.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", + "type": "object", + "description": "An object representing a Server Variable for server URL template substitution.", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.1.0/specificationExtension.json" + } + }, + "properties": { + "enum": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true }, - "title": { - "type": "string", - "description": "A human-friendly title for the message." + "default": { + "type": "string" }, "description": { - "type": "string", - "description": "A longer description of the message. CommonMark is allowed." - }, - "externalDocs": { - "$ref": "#/definitions/externalDocs" - }, - "deprecated": { - "type": "boolean", - "default": false + "type": "string" }, "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": {} + "type": "array", + "items": { + "type": "string" } - } - }, - "bindings": { - "$ref": "#/definitions/bindingsObject" - }, - "traits": { - "type": "array", - "items": { - "oneOf": [ - { - "$ref": "#/definitions/Reference" - }, - { - "$ref": "#/definitions/messageTrait" - }, - { - "type": "array", - "items": [ - { - "oneOf": [ - { - "$ref": "#/definitions/Reference" - }, - { - "$ref": "#/definitions/messageTrait" - } - ] - }, - { - "type": "object", - "additionalItems": true - } - ] - } - ] - } } - } } - ] - } - ] - }, - "bindingsObject": { - "type": "object", - "additionalProperties": true, - "properties": { - "http": {}, - "ws": {}, - "amqp": {}, - "amqp1": {}, - "mqtt": {}, - "mqtt5": {}, - "kafka": {}, - "nats": {}, - "jms": {}, - "sns": {}, - "sqs": {}, - "stomp": {}, - "redis": {}, - "ibmmq": {} - } - }, - "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]))*)*" - } - } - }, - "specificationExtension": { - "description": "Any property starting with x- is valid.", - "additionalProperties": true, - "additionalItems": true - }, - "tag": { - "type": "object", - "additionalProperties": false, - "required": [ - "name" - ], - "properties": { - "name": { - "type": "string" }, - "description": { - "type": "string" + "http://asyncapi.com/definitions/2.1.0/SecurityRequirement.json": { + "$id": "http://asyncapi.com/definitions/2.1.0/SecurityRequirement.json", + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + } }, - "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" + "http://asyncapi.com/definitions/2.1.0/bindingsObject.json": { + "$id": "http://asyncapi.com/definitions/2.1.0/bindingsObject.json", + "type": "object", + "additionalProperties": true, + "properties": { + "http": {}, + "ws": {}, + "amqp": {}, + "amqp1": {}, + "mqtt": {}, + "mqtt5": {}, + "kafka": {}, + "nats": {}, + "jms": {}, + "sns": {}, + "sqs": {}, + "stomp": {}, + "redis": {}, + "ibmmq": {} + } }, - "description": { - "type": "string" + "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" + } }, - "tags": { - "type": "array", - "items": { - "$ref": "#/definitions/tag" - }, - "uniqueItems": true + "http://asyncapi.com/definitions/2.1.0/channelItem.json": { + "$id": "http://asyncapi.com/definitions/2.1.0/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": { + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/2.1.0/parameter.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" + } + } }, - "externalDocs": { - "$ref": "#/definitions/externalDocs" + "http://asyncapi.com/definitions/2.1.0/ReferenceObject.json": { + "$id": "http://asyncapi.com/definitions/2.1.0/ReferenceObject.json", + "type": "string", + "format": "uri-reference" }, - "operationId": { - "type": "string" + "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" + } + }, + "properties": { + "description": { + "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" + }, + "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.1.0/ReferenceObject.json" + } + } }, - "bindings": { - "$ref": "#/definitions/bindingsObject" - } - } - }, - "messageTrait": { - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "properties": { - "schemaFormat": { - "type": "string" + "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 + } + } + } + ] }, - "contentType": { - "type": "string" + "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" + }, + "$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": [ + { + "$ref": "#" + }, + { + "$ref": "#/definitions/schemaArray" + } + ], + "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": { + "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" + }, + { + "type": "array", + "items": { + "$ref": "#/definitions/simpleTypes" + }, + "minItems": 1, + "uniqueItems": true + } + ] + }, + "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 }, - "headers": { - "oneOf": [ - { - "$ref": "#/definitions/Reference" + "http://asyncapi.com/definitions/2.1.0/externalDocs.json": { + "$id": "http://asyncapi.com/definitions/2.1.0/externalDocs.json", + "type": "object", + "additionalProperties": false, + "description": "information about external documentation", + "required": [ + "url" + ], + "properties": { + "description": { + "type": "string" + }, + "url": { + "type": "string", + "format": "uri" + } }, - { - "$ref": "#/definitions/schema" + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.1.0/specificationExtension.json" + } } - ] }, - "correlationId": { - "oneOf": [ - { - "$ref": "#/definitions/Reference" + "http://asyncapi.com/definitions/2.1.0/operation.json": { + "$id": "http://asyncapi.com/definitions/2.1.0/operation.json", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.1.0/specificationExtension.json" + } }, - { - "$ref": "#/definitions/correlationId" + "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" + }, + { + "type": "array", + "items": [ + { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.1.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.1.0/operationTrait.json" + } + ] + }, + { + "type": "object", + "additionalItems": true + } + ] + } + ] + } + }, + "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" + }, + "operationId": { + "type": "string" + }, + "bindings": { + "$ref": "http://asyncapi.com/definitions/2.1.0/bindingsObject.json" + }, + "message": { + "$ref": "http://asyncapi.com/definitions/2.1.0/message.json" + } } - ] - }, - "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" + "http://asyncapi.com/definitions/2.1.0/Reference.json": { + "$id": "http://asyncapi.com/definitions/2.1.0/Reference.json", + "type": "object", + "required": [ + "$ref" + ], + "properties": { + "$ref": { + "$ref": "http://asyncapi.com/definitions/2.1.0/ReferenceObject.json" + } + } }, - "deprecated": { - "type": "boolean", - "default": false + "http://asyncapi.com/definitions/2.1.0/operationTrait.json": { + "$id": "http://asyncapi.com/definitions/2.1.0/operationTrait.json", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.1.0/specificationExtension.json" + } + }, + "properties": { + "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" + }, + "operationId": { + "type": "string" + }, + "bindings": { + "$ref": "http://asyncapi.com/definitions/2.1.0/bindingsObject.json" + } + } }, - "examples": { - "type": "array", - "items": { + "http://asyncapi.com/definitions/2.1.0/tag.json": { + "$id": "http://asyncapi.com/definitions/2.1.0/tag.json", "type": "object", "additionalProperties": false, - "anyOf": [ - {"required": ["payload"] }, - {"required": ["headers"] } + "required": [ + "name" ], "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": {} + "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" + } } - } - }, - "bindings": { - "$ref": "#/definitions/bindingsObject" - } - } - }, - "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" - } - ] - }, - "userPassword": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "userPassword" - ] - }, - "description": { - "type": "string" - } - }, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "additionalProperties": false - }, - "apiKey": { - "type": "object", - "required": [ - "type", - "in" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "apiKey" - ] - }, - "in": { - "type": "string", - "enum": [ - "user", - "password" - ] - }, - "description": { - "type": "string" - } - }, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "additionalProperties": false - }, - "X509": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "X509" - ] - }, - "description": { - "type": "string" - } - }, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "additionalProperties": false - }, - "symmetricEncryption": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "symmetricEncryption" - ] - }, - "description": { - "type": "string" - } - }, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "additionalProperties": false - }, - "asymmetricEncryption": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "asymmetricEncryption" - ] - }, - "description": { - "type": "string" - } - }, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "additionalProperties": false - }, - "HTTPSecurityScheme": { - "oneOf": [ - { - "$ref": "#/definitions/NonBearerHTTPSecurityScheme" }, - { - "$ref": "#/definitions/BearerHTTPSecurityScheme" - }, - { - "$ref": "#/definitions/APIKeyHTTPSecurityScheme" - } - ] - }, - "NonBearerHTTPSecurityScheme": { - "not": { - "type": "object", - "properties": { - "scheme": { - "type": "string", - "enum": [ - "bearer" + "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" + }, + { + "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" + }, + { + "type": "array", + "items": [ + { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.1.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.1.0/messageTrait.json" + } + ] + }, + { + "type": "object", + "additionalItems": true + } + ] + } + ] + } + } + } + } + ] + } ] - } - } - }, - "type": "object", - "required": [ - "scheme", - "type" - ], - "properties": { - "scheme": { - "type": "string" - }, - "description": { - "type": "string" - }, - "type": { - "type": "string", - "enum": [ - "http" - ] - } - }, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "additionalProperties": false - }, - "BearerHTTPSecurityScheme": { - "type": "object", - "required": [ - "type", - "scheme" - ], - "properties": { - "scheme": { - "type": "string", - "enum": [ - "bearer" - ] - }, - "bearerFormat": { - "type": "string" }, - "type": { - "type": "string", - "enum": [ - "http" - ] + "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]))*)*" + } + } }, - "description": { - "type": "string" - } - }, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "additionalProperties": false - }, - "APIKeyHTTPSecurityScheme": { - "type": "object", - "required": [ - "type", - "name", - "in" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "httpApiKey" - ] + "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": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.1.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.1.0/schema.json" + } + ] + }, + "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" + } + } }, - "name": { - "type": "string" + "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" + }, + "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" + } + } + } }, - "in": { - "type": "string", - "enum": [ - "header", - "query", - "cookie" - ] + "http://asyncapi.com/definitions/2.1.0/schemas.json": { + "$id": "http://asyncapi.com/definitions/2.1.0/schemas.json", + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/2.1.0/schema.json" + }, + "description": "JSON objects describing schemas the API uses." }, - "description": { - "type": "string" - } - }, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "additionalProperties": false - }, - "SaslSecurityScheme": { - "oneOf": [ - { - "$ref": "#/definitions/SaslPlainSecurityScheme" + "http://asyncapi.com/definitions/2.1.0/messages.json": { + "$id": "http://asyncapi.com/definitions/2.1.0/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." }, - { - "$ref": "#/definitions/SaslScramSecurityScheme" + "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" + } + ] }, - { - "$ref": "#/definitions/SaslGssapiSecurityScheme" - } - ] - }, - "SaslPlainSecurityScheme": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "plain" - ] + "http://asyncapi.com/definitions/2.1.0/userPassword.json": { + "$id": "http://asyncapi.com/definitions/2.1.0/userPassword.json", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "userPassword" + ] + }, + "description": { + "type": "string" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.1.0/specificationExtension.json" + } + }, + "additionalProperties": false }, - "description": { - "type": "string" - } - }, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "additionalProperties": false - }, - "SaslScramSecurityScheme": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "scramSha256", - "scramSha512" - ] + "http://asyncapi.com/definitions/2.1.0/apiKey.json": { + "$id": "http://asyncapi.com/definitions/2.1.0/apiKey.json", + "type": "object", + "required": [ + "type", + "in" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "apiKey" + ] + }, + "in": { + "type": "string", + "enum": [ + "user", + "password" + ] + }, + "description": { + "type": "string" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.1.0/specificationExtension.json" + } + }, + "additionalProperties": false }, - "description": { - "type": "string" - } - }, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "additionalProperties": false - }, - "SaslGssapiSecurityScheme": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "gssapi" - ] + "http://asyncapi.com/definitions/2.1.0/X509.json": { + "$id": "http://asyncapi.com/definitions/2.1.0/X509.json", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "X509" + ] + }, + "description": { + "type": "string" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.1.0/specificationExtension.json" + } + }, + "additionalProperties": false }, - "description": { - "type": "string" - } - }, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "additionalProperties": false - }, - "oauth2Flows": { - "type": "object", - "required": [ - "type", - "flows" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "oauth2" - ] + "http://asyncapi.com/definitions/2.1.0/symmetricEncryption.json": { + "$id": "http://asyncapi.com/definitions/2.1.0/symmetricEncryption.json", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "symmetricEncryption" + ] + }, + "description": { + "type": "string" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.1.0/specificationExtension.json" + } + }, + "additionalProperties": false }, - "description": { - "type": "string" + "http://asyncapi.com/definitions/2.1.0/asymmetricEncryption.json": { + "$id": "http://asyncapi.com/definitions/2.1.0/asymmetricEncryption.json", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "asymmetricEncryption" + ] + }, + "description": { + "type": "string" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.1.0/specificationExtension.json" + } + }, + "additionalProperties": false }, - "flows": { - "type": "object", - "properties": { - "implicit": { - "allOf": [ + "http://asyncapi.com/definitions/2.1.0/HTTPSecurityScheme.json": { + "$id": "http://asyncapi.com/definitions/2.1.0/HTTPSecurityScheme.json", + "oneOf": [ { - "$ref": "#/definitions/oauth2Flow" + "$ref": "http://asyncapi.com/definitions/2.1.0/NonBearerHTTPSecurityScheme.json" }, { - "required": [ - "authorizationUrl", - "scopes" - ] + "$ref": "http://asyncapi.com/definitions/2.1.0/BearerHTTPSecurityScheme.json" }, { - "not": { - "required": [ - "tokenUrl" + "$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", + "not": { + "type": "object", + "properties": { + "scheme": { + "type": "string", + "enum": [ + "bearer" + ] + } + } + }, + "type": "object", + "required": [ + "scheme", + "type" + ], + "properties": { + "scheme": { + "type": "string" + }, + "description": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "http" ] - } } - ] }, - "password": { - "allOf": [ - { - "$ref": "#/definitions/oauth2Flow" + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.1.0/specificationExtension.json" + } + }, + "additionalProperties": false + }, + "http://asyncapi.com/definitions/2.1.0/BearerHTTPSecurityScheme.json": { + "$id": "http://asyncapi.com/definitions/2.1.0/BearerHTTPSecurityScheme.json", + "type": "object", + "required": [ + "type", + "scheme" + ], + "properties": { + "scheme": { + "type": "string", + "enum": [ + "bearer" + ] }, - { - "required": [ - "tokenUrl", - "scopes" - ] + "bearerFormat": { + "type": "string" }, - { - "not": { - "required": [ - "authorizationUrl" + "type": { + "type": "string", + "enum": [ + "http" ] - } + }, + "description": { + "type": "string" } - ] }, - "clientCredentials": { - "allOf": [ - { - "$ref": "#/definitions/oauth2Flow" + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.1.0/specificationExtension.json" + } + }, + "additionalProperties": false + }, + "http://asyncapi.com/definitions/2.1.0/APIKeyHTTPSecurityScheme.json": { + "$id": "http://asyncapi.com/definitions/2.1.0/APIKeyHTTPSecurityScheme.json", + "type": "object", + "required": [ + "type", + "name", + "in" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "httpApiKey" + ] }, - { - "required": [ - "tokenUrl", - "scopes" - ] + "name": { + "type": "string" }, - { - "not": { - "required": [ - "authorizationUrl" + "in": { + "type": "string", + "enum": [ + "header", + "query", + "cookie" ] - } + }, + "description": { + "type": "string" } - ] }, - "authorizationCode": { - "allOf": [ - { - "$ref": "#/definitions/oauth2Flow" + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.1.0/specificationExtension.json" + } + }, + "additionalProperties": false + }, + "http://asyncapi.com/definitions/2.1.0/oauth2Flows.json": { + "$id": "http://asyncapi.com/definitions/2.1.0/oauth2Flows.json", + "type": "object", + "required": [ + "type", + "flows" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "oauth2" + ] }, - { - "required": [ - "authorizationUrl", - "tokenUrl", - "scopes" - ] + "description": { + "type": "string" + }, + "flows": { + "type": "object", + "properties": { + "implicit": { + "allOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.1.0/oauth2Flow.json" + }, + { + "required": [ + "authorizationUrl", + "scopes" + ] + }, + { + "not": { + "required": [ + "tokenUrl" + ] + } + } + ] + }, + "password": { + "allOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.1.0/oauth2Flow.json" + }, + { + "required": [ + "tokenUrl", + "scopes" + ] + }, + { + "not": { + "required": [ + "authorizationUrl" + ] + } + } + ] + }, + "clientCredentials": { + "allOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.1.0/oauth2Flow.json" + }, + { + "required": [ + "tokenUrl", + "scopes" + ] + }, + { + "not": { + "required": [ + "authorizationUrl" + ] + } + } + ] + }, + "authorizationCode": { + "allOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.1.0/oauth2Flow.json" + }, + { + "required": [ + "authorizationUrl", + "tokenUrl", + "scopes" + ] + } + ] + } + }, + "additionalProperties": false + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.1.0/specificationExtension.json" } - ] } - }, - "additionalProperties": false - } - }, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - } - }, - "oauth2Flow": { - "type": "object", - "properties": { - "authorizationUrl": { - "type": "string", - "format": "uri" }, - "tokenUrl": { - "type": "string", - "format": "uri" + "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 }, - "refreshUrl": { - "type": "string", - "format": "uri" + "http://asyncapi.com/definitions/2.1.0/oauth2Scopes.json": { + "$id": "http://asyncapi.com/definitions/2.1.0/oauth2Scopes.json", + "type": "object", + "additionalProperties": { + "type": "string" + } }, - "scopes": { - "$ref": "#/definitions/oauth2Scopes" - } - }, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "additionalProperties": false - }, - "oauth2Scopes": { - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "openIdConnect": { - "type": "object", - "required": [ - "type", - "openIdConnectUrl" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "openIdConnect" - ] + "http://asyncapi.com/definitions/2.1.0/openIdConnect.json": { + "$id": "http://asyncapi.com/definitions/2.1.0/openIdConnect.json", + "type": "object", + "required": [ + "type", + "openIdConnectUrl" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "openIdConnect" + ] + }, + "description": { + "type": "string" + }, + "openIdConnectUrl": { + "type": "string", + "format": "uri" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.1.0/specificationExtension.json" + } + }, + "additionalProperties": false }, - "description": { - "type": "string" + "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" + } + ] }, - "openIdConnectUrl": { - "type": "string", - "format": "uri" - } - }, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" + "http://asyncapi.com/definitions/2.1.0/SaslPlainSecurityScheme.json": { + "$id": "http://asyncapi.com/definitions/2.1.0/SaslPlainSecurityScheme.json", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "plain" + ] + }, + "description": { + "type": "string" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.1.0/specificationExtension.json" + } + }, + "additionalProperties": false + }, + "http://asyncapi.com/definitions/2.1.0/SaslScramSecurityScheme.json": { + "$id": "http://asyncapi.com/definitions/2.1.0/SaslScramSecurityScheme.json", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "scramSha256", + "scramSha512" + ] + }, + "description": { + "type": "string" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.1.0/specificationExtension.json" + } + }, + "additionalProperties": false + }, + "http://asyncapi.com/definitions/2.1.0/SaslGssapiSecurityScheme.json": { + "$id": "http://asyncapi.com/definitions/2.1.0/SaslGssapiSecurityScheme.json", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "gssapi" + ] + }, + "description": { + "type": "string" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.1.0/specificationExtension.json" + } + }, + "additionalProperties": false + }, + "http://asyncapi.com/definitions/2.1.0/parameters.json": { + "$id": "http://asyncapi.com/definitions/2.1.0/parameters.json", + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/2.1.0/parameter.json" + }, + "description": "JSON objects describing re-usable channel parameters." } - }, - "additionalProperties": false }, - "SecurityRequirement": { - "type": "object", - "additionalProperties": { - "type": "array", - "items": { - "type": "string" - }, - "uniqueItems": true - } - } - } -} + "description": "!!Auto generated!! \n Do not manually edit. " +} \ No newline at end of file diff --git a/schemas/2.2.0.json b/schemas/2.2.0.json index 94c48a54..37c4c4b0 100644 --- a/schemas/2.2.0.json +++ b/schemas/2.2.0.json @@ -1,1485 +1,1783 @@ { - "title": "AsyncAPI 2.2.0 schema.", - "$schema": "http://json-schema.org/draft-07/schema#", - "type": "object", - "required": [ - "asyncapi", - "info", - "channels" - ], - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "properties": { - "asyncapi": { - "type": "string", - "enum": [ - "2.2.0" - ], - "description": "The AsyncAPI specification version of this document." - }, - "id": { - "type": "string", - "description": "A unique id representing the application.", - "format": "uri" - }, - "info": { - "$ref": "#/definitions/info" - }, - "servers": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/server" - } - }, - "defaultContentType": { - "type": "string" - }, - "channels": { - "$ref": "#/definitions/channels" - }, - "components": { - "$ref": "#/definitions/components" - }, - "tags": { - "type": "array", - "items": { - "$ref": "#/definitions/tag" - }, - "uniqueItems": true - }, - "externalDocs": { - "$ref": "#/definitions/externalDocs" - } - }, - "definitions": { - "Reference": { - "type": "object", - "required": [ - "$ref" - ], - "properties": { - "$ref": { - "$ref": "#/definitions/ReferenceObject" - } - } - }, - "ReferenceObject": { - "type": "string", - "format": "uri-reference" - }, - "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.", - "additionalProperties": false, - "properties": { - "name": { - "type": "string", - "description": "The identifying name of the contact person/organization." - }, - "url": { - "type": "string", - "description": "The URL pointing to the contact information.", - "format": "uri" - }, - "email": { - "type": "string", - "description": "The email address of the contact person/organization.", - "format": "email" - } - }, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - } - }, - "license": { - "type": "object", - "required": [ - "name" - ], - "additionalProperties": false, - "properties": { - "name": { - "type": "string", - "description": "The name of the license type. It's encouraged to use an OSI compatible license." - }, - "url": { - "type": "string", - "description": "The URL pointing to the license.", - "format": "uri" - } - }, - "patternProperties": { + "$id": "http://asyncapi.com/definitions/2.2.0/asyncapi.json", + "$schema": "http://json-schema.org/draft-07/schema", + "title": "AsyncAPI 2.2.0 schema.", + "type": "object", + "required": [ + "asyncapi", + "info", + "channels" + ], + "additionalProperties": false, + "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" + "$ref": "http://asyncapi.com/definitions/2.2.0/specificationExtension.json" } - } }, - "server": { - "type": "object", - "description": "An object representing a Server.", - "required": [ - "url", - "protocol" - ], - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "properties": { - "url": { - "type": "string" - }, - "description": { - "type": "string" - }, - "protocol": { - "type": "string", - "description": "The transfer protocol." + "properties": { + "asyncapi": { + "type": "string", + "enum": [ + "2.2.0" + ], + "description": "The AsyncAPI specification version of this document." }, - "protocolVersion": { - "type": "string" + "id": { + "type": "string", + "description": "A unique id representing the application.", + "format": "uri" }, - "variables": { - "$ref": "#/definitions/serverVariables" + "info": { + "$ref": "http://asyncapi.com/definitions/2.2.0/info.json" }, - "security": { - "type": "array", - "items": { - "$ref": "#/definitions/SecurityRequirement" - } + "servers": { + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/2.2.0/server.json" + } }, - "bindings": { - "$ref": "#/definitions/bindingsObject" - } - } - }, - "serverVariables": { - "type": "object", - "additionalProperties": { - "$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", - "items": { + "defaultContentType": { "type": "string" - }, - "uniqueItems": true }, - "default": { - "type": "string" + "channels": { + "$ref": "http://asyncapi.com/definitions/2.2.0/channels.json" }, - "description": { - "type": "string" + "components": { + "$ref": "http://asyncapi.com/definitions/2.2.0/components.json" }, - "examples": { - "type": "array", - "items": { - "type": "string" - } + "tags": { + "type": "array", + "items": { + "$ref": "http://asyncapi.com/definitions/2.2.0/tag.json" + }, + "uniqueItems": true + }, + "externalDocs": { + "$ref": "http://asyncapi.com/definitions/2.2.0/externalDocs.json" } - } - }, - "channels": { - "type": "object", - "propertyNames": { - "type": "string", - "format": "uri-template", - "minLength": 1 - }, - "additionalProperties": { - "$ref": "#/definitions/channelItem" - } }, - "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" + "definitions": { + "http://asyncapi.com/definitions/2.2.0/specificationExtension.json": { + "$id": "http://asyncapi.com/definitions/2.2.0/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." }, - { - "$ref": "#/definitions/SecurityScheme" + "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" } - ] } - } - }, - "parameters": { - "$ref": "#/definitions/parameters" }, - "correlationIds": { - "type": "object", - "patternProperties": { - "^[\\w\\d\\.\\-_]+$": { - "oneOf": [ - { - "$ref": "#/definitions/Reference" + "http://asyncapi.com/definitions/2.2.0/contact.json": { + "$id": "http://asyncapi.com/definitions/2.2.0/contact.json", + "type": "object", + "description": "Contact information for the owners of the API.", + "additionalProperties": false, + "properties": { + "name": { + "type": "string", + "description": "The identifying name of the contact person/organization." }, - { - "$ref": "#/definitions/correlationId" + "url": { + "type": "string", + "description": "The URL pointing to the contact information.", + "format": "uri" + }, + "email": { + "type": "string", + "description": "The email address of the contact person/organization.", + "format": "email" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.2.0/specificationExtension.json" } - ] } - } - }, - "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" - } - } - } - }, - "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." - }, - "parameters": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/parameter" - }, - "description": "JSON objects describing re-usable channel parameters." - }, - "schema": { - "allOf": [ - { - "$ref": "http://json-schema.org/draft-07/schema#" - }, - { - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "properties": { - "additionalProperties": { - "anyOf": [ - { - "$ref": "#/definitions/schema" + "http://asyncapi.com/definitions/2.2.0/license.json": { + "$id": "http://asyncapi.com/definitions/2.2.0/license.json", + "type": "object", + "required": [ + "name" + ], + "additionalProperties": false, + "properties": { + "name": { + "type": "string", + "description": "The name of the license type. It's encouraged to use an OSI compatible license." }, - { - "type": "boolean" + "url": { + "type": "string", + "description": "The URL pointing to the license.", + "format": "uri" } - ], - "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 + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.2.0/specificationExtension.json" + } } - } - } - ] - }, - "externalDocs": { - "type": "object", - "additionalProperties": false, - "description": "information about external documentation", - "required": [ - "url" - ], - "properties": { - "description": { - "type": "string" - }, - "url": { - "type": "string", - "format": "uri" - } - }, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - } - }, - "channelItem": { - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "properties": { - "$ref": { - "$ref": "#/definitions/ReferenceObject" - }, - "parameters": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/parameter" - } - }, - "description": { - "type": "string", - "description": "A description of the channel." - }, - "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 }, - "publish": { - "$ref": "#/definitions/operation" - }, - "subscribe": { - "$ref": "#/definitions/operation" - }, - "deprecated": { - "type": "boolean", - "default": false - }, - "bindings": { - "$ref": "#/definitions/bindingsObject" - } - } - }, - "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." + "http://asyncapi.com/definitions/2.2.0/server.json": { + "$id": "http://asyncapi.com/definitions/2.2.0/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.2.0/specificationExtension.json" + } + }, + "properties": { + "url": { + "type": "string" + }, + "description": { + "type": "string" + }, + "protocol": { + "type": "string", + "description": "The transfer protocol." + }, + "protocolVersion": { + "type": "string" + }, + "variables": { + "$ref": "http://asyncapi.com/definitions/2.2.0/serverVariables.json" + }, + "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" + } + } }, - "schema": { - "$ref": "#/definitions/schema" + "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" + } }, - "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.2.0/serverVariable.json": { + "$id": "http://asyncapi.com/definitions/2.2.0/serverVariable.json", + "type": "object", + "description": "An object representing a Server Variable for server URL template substitution.", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.2.0/specificationExtension.json" + } + }, + "properties": { + "enum": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + }, + "default": { + "type": "string" + }, + "description": { + "type": "string" + }, + "examples": { + "type": "array", + "items": { + "type": "string" + } + } + } }, - "$ref": { - "$ref": "#/definitions/ReferenceObject" - } - } - }, - "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" - }, - { + "http://asyncapi.com/definitions/2.2.0/SecurityRequirement.json": { + "$id": "http://asyncapi.com/definitions/2.2.0/SecurityRequirement.json", + "type": "object", + "additionalProperties": { "type": "array", - "items": [ - { - "oneOf": [ - { - "$ref": "#/definitions/Reference" - }, - { - "$ref": "#/definitions/operationTrait" - } - ] - }, - { - "type": "object", - "additionalItems": true - } - ] - } - ] - } - }, - "summary": { - "type": "string" - }, - "description": { - "type": "string" - }, - "tags": { - "type": "array", - "items": { - "$ref": "#/definitions/tag" - }, - "uniqueItems": true - }, - "externalDocs": { - "$ref": "#/definitions/externalDocs" - }, - "operationId": { - "type": "string" + "items": { + "type": "string" + }, + "uniqueItems": true + } }, - "bindings": { - "$ref": "#/definitions/bindingsObject" + "http://asyncapi.com/definitions/2.2.0/bindingsObject.json": { + "$id": "http://asyncapi.com/definitions/2.2.0/bindingsObject.json", + "type": "object", + "additionalProperties": true, + "properties": { + "http": {}, + "ws": {}, + "amqp": {}, + "amqp1": {}, + "mqtt": {}, + "mqtt5": {}, + "kafka": {}, + "anypointmq": {}, + "nats": {}, + "jms": {}, + "sns": {}, + "sqs": {}, + "stomp": {}, + "redis": {}, + "ibmmq": {} + } }, - "message": { - "$ref": "#/definitions/message" - } - } - }, - "message": { - "oneOf": [ - { - "$ref": "#/definitions/Reference" + "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" + } }, - { - "oneOf": [ - { - "type": "object", - "required": [ - "oneOf" - ], - "additionalProperties": false, - "properties": { - "oneOf": { - "type": "array", - "items": { - "$ref": "#/definitions/message" - } + "http://asyncapi.com/definitions/2.2.0/channelItem.json": { + "$id": "http://asyncapi.com/definitions/2.2.0/channelItem.json", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.2.0/specificationExtension.json" } - } }, - { - "type": "object", - "additionalProperties": false, - "patternProperties": { + "properties": { + "$ref": { + "$ref": "http://asyncapi.com/definitions/2.2.0/ReferenceObject.json" + }, + "parameters": { + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/2.2.0/parameter.json" + } + }, + "description": { + "type": "string", + "description": "A description of the channel." + }, + "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 + }, + "publish": { + "$ref": "http://asyncapi.com/definitions/2.2.0/operation.json" + }, + "subscribe": { + "$ref": "http://asyncapi.com/definitions/2.2.0/operation.json" + }, + "deprecated": { + "type": "boolean", + "default": false + }, + "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", + "type": "string", + "format": "uri-reference" + }, + "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": "#/definitions/specificationExtension" + "$ref": "http://asyncapi.com/definitions/2.2.0/specificationExtension.json" } - }, - "properties": { - "schemaFormat": { - "type": "string" + }, + "properties": { + "description": { + "type": "string", + "description": "A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed." }, - "contentType": { - "type": "string" + "schema": { + "$ref": "http://asyncapi.com/definitions/2.2.0/schema.json" }, - "headers": { - "allOf": [ - { - "$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": "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": { - "type": { - "const": "object" + "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": "#" + } }, - "payload": {}, - "correlationId": { - "oneOf": [ - { - "$ref": "#/definitions/Reference" + "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" }, - { - "$ref": "#/definitions/correlationId" - } - ] + "uniqueItems": true, + "default": [] + } + }, + "type": [ + "object", + "boolean" + ], + "properties": { + "$id": { + "type": "string", + "format": "uri-reference" }, - "tags": { - "type": "array", - "items": { - "$ref": "#/definitions/tag" - }, - "uniqueItems": true + "$schema": { + "type": "string", + "format": "uri" }, - "summary": { - "type": "string", - "description": "A brief summary of the message." + "$ref": { + "type": "string", + "format": "uri-reference" }, - "name": { - "type": "string", - "description": "Name of the message." + "$comment": { + "type": "string" }, "title": { - "type": "string", - "description": "A human-friendly title for the message." + "type": "string" }, "description": { - "type": "string", - "description": "A longer description of the message. CommonMark is allowed." + "type": "string" }, - "externalDocs": { - "$ref": "#/definitions/externalDocs" + "default": true, + "readOnly": { + "type": "boolean", + "default": false }, - "deprecated": { - "type": "boolean", - "default": false + "writeOnly": { + "type": "boolean", + "default": false }, "examples": { - "type": "array", - "items": { - "type": "object", - "additionalProperties": false, - "anyOf": [ - {"required": ["payload"] }, - {"required": ["headers"] } + "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": [ + { + "$ref": "#" + }, + { + "$ref": "#/definitions/schemaArray" + } ], - "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": {} - } - } + "default": true }, - "bindings": { - "$ref": "#/definitions/bindingsObject" + "maxItems": { + "$ref": "#/definitions/nonNegativeInteger" }, - "traits": { - "type": "array", - "items": { - "oneOf": [ - { - "$ref": "#/definitions/Reference" - }, - { - "$ref": "#/definitions/messageTrait" - }, - { - "type": "array", - "items": [ - { - "oneOf": [ - { - "$ref": "#/definitions/Reference" - }, - { - "$ref": "#/definitions/messageTrait" - } - ] - }, - { - "type": "object", - "additionalItems": true - } + "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": { + "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" + }, + { + "type": "array", + "items": { + "$ref": "#/definitions/simpleTypes" + }, + "minItems": 1, + "uniqueItems": true + } ] - } + }, + "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 + }, + "http://asyncapi.com/definitions/2.2.0/externalDocs.json": { + "$id": "http://asyncapi.com/definitions/2.2.0/externalDocs.json", + "type": "object", + "additionalProperties": false, + "description": "information about external documentation", + "required": [ + "url" + ], + "properties": { + "description": { + "type": "string" + }, + "url": { + "type": "string", + "format": "uri" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.2.0/specificationExtension.json" } - } } - ] - } - ] - }, - "bindingsObject": { - "type": "object", - "additionalProperties": true, - "properties": { - "http": {}, - "ws": {}, - "amqp": {}, - "amqp1": {}, - "mqtt": {}, - "mqtt5": {}, - "kafka": {}, - "anypointmq": {}, - "nats": {}, - "jms": {}, - "sns": {}, - "sqs": {}, - "stomp": {}, - "redis": {}, - "ibmmq": {} - } - }, - "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]))*)*" - } - } - }, - "specificationExtension": { - "description": "Any property starting with x- is valid.", - "additionalProperties": true, - "additionalItems": true - }, - "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" - }, - "description": { - "type": "string" - }, - "tags": { - "type": "array", - "items": { - "$ref": "#/definitions/tag" - }, - "uniqueItems": true - }, - "externalDocs": { - "$ref": "#/definitions/externalDocs" - }, - "operationId": { - "type": "string" - }, - "bindings": { - "$ref": "#/definitions/bindingsObject" - } - } - }, - "messageTrait": { - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "properties": { - "schemaFormat": { - "type": "string" + "http://asyncapi.com/definitions/2.2.0/operation.json": { + "$id": "http://asyncapi.com/definitions/2.2.0/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" + }, + { + "type": "array", + "items": [ + { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.2.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.2.0/operationTrait.json" + } + ] + }, + { + "type": "object", + "additionalItems": true + } + ] + } + ] + } + }, + "summary": { + "type": "string" + }, + "description": { + "type": "string" + }, + "tags": { + "type": "array", + "items": { + "$ref": "http://asyncapi.com/definitions/2.2.0/tag.json" + }, + "uniqueItems": true + }, + "externalDocs": { + "$ref": "http://asyncapi.com/definitions/2.2.0/externalDocs.json" + }, + "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" + } + } }, - "contentType": { - "type": "string" + "http://asyncapi.com/definitions/2.2.0/Reference.json": { + "$id": "http://asyncapi.com/definitions/2.2.0/Reference.json", + "type": "object", + "required": [ + "$ref" + ], + "properties": { + "$ref": { + "$ref": "http://asyncapi.com/definitions/2.2.0/ReferenceObject.json" + } + } }, - "headers": { - "oneOf": [ - { - "$ref": "#/definitions/Reference" + "http://asyncapi.com/definitions/2.2.0/operationTrait.json": { + "$id": "http://asyncapi.com/definitions/2.2.0/operationTrait.json", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.2.0/specificationExtension.json" + } }, - { - "$ref": "#/definitions/schema" + "properties": { + "summary": { + "type": "string" + }, + "description": { + "type": "string" + }, + "tags": { + "type": "array", + "items": { + "$ref": "http://asyncapi.com/definitions/2.2.0/tag.json" + }, + "uniqueItems": true + }, + "externalDocs": { + "$ref": "http://asyncapi.com/definitions/2.2.0/externalDocs.json" + }, + "operationId": { + "type": "string" + }, + "bindings": { + "$ref": "http://asyncapi.com/definitions/2.2.0/bindingsObject.json" + } } - ] }, - "correlationId": { - "oneOf": [ - { - "$ref": "#/definitions/Reference" + "http://asyncapi.com/definitions/2.2.0/tag.json": { + "$id": "http://asyncapi.com/definitions/2.2.0/tag.json", + "type": "object", + "additionalProperties": false, + "required": [ + "name" + ], + "properties": { + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "externalDocs": { + "$ref": "http://asyncapi.com/definitions/2.2.0/externalDocs.json" + } }, - { - "$ref": "#/definitions/correlationId" + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.2.0/specificationExtension.json" + } } - ] - }, - "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" - } - } - }, - "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" - } - ] - }, - "userPassword": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "userPassword" - ] - }, - "description": { - "type": "string" - } - }, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "additionalProperties": false - }, - "apiKey": { - "type": "object", - "required": [ - "type", - "in" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "apiKey" - ] - }, - "in": { - "type": "string", - "enum": [ - "user", - "password" - ] - }, - "description": { - "type": "string" - } - }, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "additionalProperties": false - }, - "X509": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "X509" - ] - }, - "description": { - "type": "string" - } - }, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "additionalProperties": false - }, - "symmetricEncryption": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "symmetricEncryption" - ] - }, - "description": { - "type": "string" - } - }, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "additionalProperties": false - }, - "asymmetricEncryption": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "asymmetricEncryption" - ] }, - "description": { - "type": "string" - } - }, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "additionalProperties": false - }, - "HTTPSecurityScheme": { - "oneOf": [ - { - "$ref": "#/definitions/NonBearerHTTPSecurityScheme" - }, - { - "$ref": "#/definitions/BearerHTTPSecurityScheme" - }, - { - "$ref": "#/definitions/APIKeyHTTPSecurityScheme" - } - ] - }, - "NonBearerHTTPSecurityScheme": { - "not": { - "type": "object", - "properties": { - "scheme": { - "type": "string", - "enum": [ - "bearer" + "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" + }, + { + "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" + }, + { + "type": "array", + "items": [ + { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.2.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.2.0/messageTrait.json" + } + ] + }, + { + "type": "object", + "additionalItems": true + } + ] + } + ] + } + } + } + } + ] + } ] - } - } - }, - "type": "object", - "required": [ - "scheme", - "type" - ], - "properties": { - "scheme": { - "type": "string" }, - "description": { - "type": "string" - }, - "type": { - "type": "string", - "enum": [ - "http" - ] - } - }, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "additionalProperties": false - }, - "BearerHTTPSecurityScheme": { - "type": "object", - "required": [ - "type", - "scheme" - ], - "properties": { - "scheme": { - "type": "string", - "enum": [ - "bearer" - ] - }, - "bearerFormat": { - "type": "string" - }, - "type": { - "type": "string", - "enum": [ - "http" - ] - }, - "description": { - "type": "string" - } - }, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "additionalProperties": false - }, - "APIKeyHTTPSecurityScheme": { - "type": "object", - "required": [ - "type", - "name", - "in" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "httpApiKey" - ] - }, - "name": { - "type": "string" - }, - "in": { - "type": "string", - "enum": [ - "header", - "query", - "cookie" - ] - }, - "description": { - "type": "string" - } - }, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "additionalProperties": false - }, - "SaslSecurityScheme": { - "oneOf": [ - { - "$ref": "#/definitions/SaslPlainSecurityScheme" - }, - { - "$ref": "#/definitions/SaslScramSecurityScheme" - }, - { - "$ref": "#/definitions/SaslGssapiSecurityScheme" - } - ] - }, - "SaslPlainSecurityScheme": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "plain" - ] + "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]))*)*" + } + } }, - "description": { - "type": "string" - } - }, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "additionalProperties": false - }, - "SaslScramSecurityScheme": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "scramSha256", - "scramSha512" - ] + "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" + } + }, + "properties": { + "schemaFormat": { + "type": "string" + }, + "contentType": { + "type": "string" + }, + "headers": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.2.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.2.0/schema.json" + } + ] + }, + "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" + } + } }, - "description": { - "type": "string" - } - }, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "additionalProperties": false - }, - "SaslGssapiSecurityScheme": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "gssapi" - ] + "http://asyncapi.com/definitions/2.2.0/components.json": { + "$id": "http://asyncapi.com/definitions/2.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, + "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" + } + } + } }, - "description": { - "type": "string" - } - }, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "additionalProperties": false - }, - "oauth2Flows": { - "type": "object", - "required": [ - "type", - "flows" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "oauth2" - ] + "http://asyncapi.com/definitions/2.2.0/schemas.json": { + "$id": "http://asyncapi.com/definitions/2.2.0/schemas.json", + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/2.2.0/schema.json" + }, + "description": "JSON objects describing schemas the API uses." }, - "description": { - "type": "string" + "http://asyncapi.com/definitions/2.2.0/messages.json": { + "$id": "http://asyncapi.com/definitions/2.2.0/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." }, - "flows": { - "type": "object", - "properties": { - "implicit": { - "allOf": [ + "http://asyncapi.com/definitions/2.2.0/SecurityScheme.json": { + "$id": "http://asyncapi.com/definitions/2.2.0/SecurityScheme.json", + "oneOf": [ { - "$ref": "#/definitions/oauth2Flow" + "$ref": "http://asyncapi.com/definitions/2.2.0/userPassword.json" }, { - "required": [ - "authorizationUrl", - "scopes" - ] + "$ref": "http://asyncapi.com/definitions/2.2.0/apiKey.json" }, { - "not": { - "required": [ - "tokenUrl" - ] - } - } - ] - }, - "password": { - "allOf": [ + "$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": "#/definitions/oauth2Flow" + "$ref": "http://asyncapi.com/definitions/2.2.0/oauth2Flows.json" }, { - "required": [ - "tokenUrl", - "scopes" - ] + "$ref": "http://asyncapi.com/definitions/2.2.0/openIdConnect.json" }, { - "not": { - "required": [ - "authorizationUrl" + "$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", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "userPassword" + ] + }, + "description": { + "type": "string" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.2.0/specificationExtension.json" + } + }, + "additionalProperties": false + }, + "http://asyncapi.com/definitions/2.2.0/apiKey.json": { + "$id": "http://asyncapi.com/definitions/2.2.0/apiKey.json", + "type": "object", + "required": [ + "type", + "in" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "apiKey" + ] + }, + "in": { + "type": "string", + "enum": [ + "user", + "password" + ] + }, + "description": { + "type": "string" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.2.0/specificationExtension.json" + } + }, + "additionalProperties": false + }, + "http://asyncapi.com/definitions/2.2.0/X509.json": { + "$id": "http://asyncapi.com/definitions/2.2.0/X509.json", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "X509" + ] + }, + "description": { + "type": "string" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.2.0/specificationExtension.json" + } + }, + "additionalProperties": false + }, + "http://asyncapi.com/definitions/2.2.0/symmetricEncryption.json": { + "$id": "http://asyncapi.com/definitions/2.2.0/symmetricEncryption.json", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "symmetricEncryption" + ] + }, + "description": { + "type": "string" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.2.0/specificationExtension.json" + } + }, + "additionalProperties": false + }, + "http://asyncapi.com/definitions/2.2.0/asymmetricEncryption.json": { + "$id": "http://asyncapi.com/definitions/2.2.0/asymmetricEncryption.json", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "asymmetricEncryption" ] - } + }, + "description": { + "type": "string" } - ] }, - "clientCredentials": { - "allOf": [ + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.2.0/specificationExtension.json" + } + }, + "additionalProperties": false + }, + "http://asyncapi.com/definitions/2.2.0/HTTPSecurityScheme.json": { + "$id": "http://asyncapi.com/definitions/2.2.0/HTTPSecurityScheme.json", + "oneOf": [ { - "$ref": "#/definitions/oauth2Flow" + "$ref": "http://asyncapi.com/definitions/2.2.0/NonBearerHTTPSecurityScheme.json" }, { - "required": [ - "tokenUrl", - "scopes" - ] + "$ref": "http://asyncapi.com/definitions/2.2.0/BearerHTTPSecurityScheme.json" }, { - "not": { - "required": [ - "authorizationUrl" + "$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", + "not": { + "type": "object", + "properties": { + "scheme": { + "type": "string", + "enum": [ + "bearer" + ] + } + } + }, + "type": "object", + "required": [ + "scheme", + "type" + ], + "properties": { + "scheme": { + "type": "string" + }, + "description": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "http" ] - } } - ] }, - "authorizationCode": { - "allOf": [ - { - "$ref": "#/definitions/oauth2Flow" + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.2.0/specificationExtension.json" + } + }, + "additionalProperties": false + }, + "http://asyncapi.com/definitions/2.2.0/BearerHTTPSecurityScheme.json": { + "$id": "http://asyncapi.com/definitions/2.2.0/BearerHTTPSecurityScheme.json", + "type": "object", + "required": [ + "type", + "scheme" + ], + "properties": { + "scheme": { + "type": "string", + "enum": [ + "bearer" + ] }, - { - "required": [ - "authorizationUrl", - "tokenUrl", - "scopes" - ] + "bearerFormat": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "http" + ] + }, + "description": { + "type": "string" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.2.0/specificationExtension.json" + } + }, + "additionalProperties": false + }, + "http://asyncapi.com/definitions/2.2.0/APIKeyHTTPSecurityScheme.json": { + "$id": "http://asyncapi.com/definitions/2.2.0/APIKeyHTTPSecurityScheme.json", + "type": "object", + "required": [ + "type", + "name", + "in" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "httpApiKey" + ] + }, + "name": { + "type": "string" + }, + "in": { + "type": "string", + "enum": [ + "header", + "query", + "cookie" + ] + }, + "description": { + "type": "string" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.2.0/specificationExtension.json" + } + }, + "additionalProperties": false + }, + "http://asyncapi.com/definitions/2.2.0/oauth2Flows.json": { + "$id": "http://asyncapi.com/definitions/2.2.0/oauth2Flows.json", + "type": "object", + "required": [ + "type", + "flows" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "oauth2" + ] + }, + "description": { + "type": "string" + }, + "flows": { + "type": "object", + "properties": { + "implicit": { + "allOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.2.0/oauth2Flow.json" + }, + { + "required": [ + "authorizationUrl", + "scopes" + ] + }, + { + "not": { + "required": [ + "tokenUrl" + ] + } + } + ] + }, + "password": { + "allOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.2.0/oauth2Flow.json" + }, + { + "required": [ + "tokenUrl", + "scopes" + ] + }, + { + "not": { + "required": [ + "authorizationUrl" + ] + } + } + ] + }, + "clientCredentials": { + "allOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.2.0/oauth2Flow.json" + }, + { + "required": [ + "tokenUrl", + "scopes" + ] + }, + { + "not": { + "required": [ + "authorizationUrl" + ] + } + } + ] + }, + "authorizationCode": { + "allOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.2.0/oauth2Flow.json" + }, + { + "required": [ + "authorizationUrl", + "tokenUrl", + "scopes" + ] + } + ] + } + }, + "additionalProperties": false + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.2.0/specificationExtension.json" } - ] } - }, - "additionalProperties": false - } - }, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - } - }, - "oauth2Flow": { - "type": "object", - "properties": { - "authorizationUrl": { - "type": "string", - "format": "uri" }, - "tokenUrl": { - "type": "string", - "format": "uri" + "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" + } }, - "refreshUrl": { - "type": "string", - "format": "uri" + "http://asyncapi.com/definitions/2.2.0/openIdConnect.json": { + "$id": "http://asyncapi.com/definitions/2.2.0/openIdConnect.json", + "type": "object", + "required": [ + "type", + "openIdConnectUrl" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "openIdConnect" + ] + }, + "description": { + "type": "string" + }, + "openIdConnectUrl": { + "type": "string", + "format": "uri" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.2.0/specificationExtension.json" + } + }, + "additionalProperties": false }, - "scopes": { - "$ref": "#/definitions/oauth2Scopes" - } - }, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "additionalProperties": false - }, - "oauth2Scopes": { - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "openIdConnect": { - "type": "object", - "required": [ - "type", - "openIdConnectUrl" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "openIdConnect" - ] + "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" + } + ] }, - "description": { - "type": "string" + "http://asyncapi.com/definitions/2.2.0/SaslPlainSecurityScheme.json": { + "$id": "http://asyncapi.com/definitions/2.2.0/SaslPlainSecurityScheme.json", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "plain" + ] + }, + "description": { + "type": "string" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.2.0/specificationExtension.json" + } + }, + "additionalProperties": false + }, + "http://asyncapi.com/definitions/2.2.0/SaslScramSecurityScheme.json": { + "$id": "http://asyncapi.com/definitions/2.2.0/SaslScramSecurityScheme.json", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "scramSha256", + "scramSha512" + ] + }, + "description": { + "type": "string" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.2.0/specificationExtension.json" + } + }, + "additionalProperties": false + }, + "http://asyncapi.com/definitions/2.2.0/SaslGssapiSecurityScheme.json": { + "$id": "http://asyncapi.com/definitions/2.2.0/SaslGssapiSecurityScheme.json", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "gssapi" + ] + }, + "description": { + "type": "string" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.2.0/specificationExtension.json" + } + }, + "additionalProperties": false }, - "openIdConnectUrl": { - "type": "string", - "format": "uri" - } - }, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" + "http://asyncapi.com/definitions/2.2.0/parameters.json": { + "$id": "http://asyncapi.com/definitions/2.2.0/parameters.json", + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/2.2.0/parameter.json" + }, + "description": "JSON objects describing re-usable channel parameters." } - }, - "additionalProperties": false }, - "SecurityRequirement": { - "type": "object", - "additionalProperties": { - "type": "array", - "items": { - "type": "string" - }, - "uniqueItems": true - } - } - } -} + "description": "!!Auto generated!! \n Do not manually edit. " +} \ No newline at end of file diff --git a/schemas/2.3.0.json b/schemas/2.3.0.json index 8d4f8307..3375226b 100644 --- a/schemas/2.3.0.json +++ b/schemas/2.3.0.json @@ -1,1502 +1,1800 @@ { - "title": "AsyncAPI 2.3.0 schema.", - "$schema": "http://json-schema.org/draft-07/schema#", - "type": "object", - "required": [ - "asyncapi", - "info", - "channels" - ], - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "properties": { - "asyncapi": { - "type": "string", - "enum": [ - "2.3.0" - ], - "description": "The AsyncAPI specification version of this document." - }, - "id": { - "type": "string", - "description": "A unique id representing the application.", - "format": "uri" - }, - "info": { - "$ref": "#/definitions/info" - }, - "servers": { - "$ref": "#/definitions/servers" - }, - "defaultContentType": { - "type": "string" - }, - "channels": { - "$ref": "#/definitions/channels" - }, - "components": { - "$ref": "#/definitions/components" - }, - "tags": { - "type": "array", - "items": { - "$ref": "#/definitions/tag" - }, - "uniqueItems": true - }, - "externalDocs": { - "$ref": "#/definitions/externalDocs" - } - }, - "definitions": { - "Reference": { - "type": "object", - "required": [ - "$ref" - ], - "properties": { - "$ref": { - "$ref": "#/definitions/ReferenceObject" - } - } - }, - "ReferenceObject": { - "type": "string", - "format": "uri-reference" - }, - "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.", - "additionalProperties": false, - "properties": { - "name": { - "type": "string", - "description": "The identifying name of the contact person/organization." - }, - "url": { - "type": "string", - "description": "The URL pointing to the contact information.", - "format": "uri" - }, - "email": { - "type": "string", - "description": "The email address of the contact person/organization.", - "format": "email" - } - }, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - } - }, - "license": { - "type": "object", - "required": [ - "name" - ], - "additionalProperties": false, - "properties": { - "name": { - "type": "string", - "description": "The name of the license type. It's encouraged to use an OSI compatible license." - }, - "url": { - "type": "string", - "description": "The URL pointing to the license.", - "format": "uri" - } - }, - "patternProperties": { + "$id": "http://asyncapi.com/definitions/2.3.0/asyncapi.json", + "$schema": "http://json-schema.org/draft-07/schema", + "title": "AsyncAPI 2.2.0 schema.", + "type": "object", + "required": [ + "asyncapi", + "info", + "channels" + ], + "additionalProperties": false, + "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" + "$ref": "http://asyncapi.com/definitions/2.3.0/specificationExtension.json" } - } }, - "server": { - "type": "object", - "description": "An object representing a Server.", - "anyOf" : [ - { "required" : ["url", "protocol"] }, - { "required" : ["$ref"] } - ], - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "properties": { - "$ref": { - "$ref": "#/definitions/ReferenceObject" - }, - "url": { - "type": "string" - }, - "description": { - "type": "string" - }, - "protocol": { - "type": "string", - "description": "The transfer protocol." + "properties": { + "asyncapi": { + "type": "string", + "enum": [ + "2.2.0" + ], + "description": "The AsyncAPI specification version of this document." }, - "protocolVersion": { - "type": "string" + "id": { + "type": "string", + "description": "A unique id representing the application.", + "format": "uri" }, - "variables": { - "$ref": "#/definitions/serverVariables" + "info": { + "$ref": "http://asyncapi.com/definitions/2.3.0/info.json" }, - "security": { - "type": "array", - "items": { - "$ref": "#/definitions/SecurityRequirement" - } + "servers": { + "$ref": "http://asyncapi.com/definitions/2.3.0/servers.json" }, - "bindings": { - "$ref": "#/definitions/bindingsObject" - } - } - }, - "servers": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/server" - } - }, - "serverVariables": { - "type": "object", - "additionalProperties": { - "$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", - "items": { + "defaultContentType": { "type": "string" - }, - "uniqueItems": true }, - "default": { - "type": "string" + "channels": { + "$ref": "http://asyncapi.com/definitions/2.3.0/channels.json" }, - "description": { - "type": "string" + "components": { + "$ref": "http://asyncapi.com/definitions/2.3.0/components.json" }, - "examples": { - "type": "array", - "items": { - "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" } - } }, - "channels": { - "type": "object", - "propertyNames": { - "type": "string", - "format": "uri-template", - "minLength": 1 - }, - "additionalProperties": { - "$ref": "#/definitions/channelItem" - } - }, - "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" + "definitions": { + "http://asyncapi.com/definitions/2.3.0/specificationExtension.json": { + "$id": "http://asyncapi.com/definitions/2.3.0/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." }, - { - "$ref": "#/definitions/SecurityScheme" + "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" } - ] } - } }, - "parameters": { - "$ref": "#/definitions/parameters" - }, - "correlationIds": { - "type": "object", - "patternProperties": { - "^[\\w\\d\\.\\-_]+$": { - "oneOf": [ - { - "$ref": "#/definitions/Reference" + "http://asyncapi.com/definitions/2.3.0/contact.json": { + "$id": "http://asyncapi.com/definitions/2.3.0/contact.json", + "type": "object", + "description": "Contact information for the owners of the API.", + "additionalProperties": false, + "properties": { + "name": { + "type": "string", + "description": "The identifying name of the contact person/organization." }, - { - "$ref": "#/definitions/correlationId" + "url": { + "type": "string", + "description": "The URL pointing to the contact information.", + "format": "uri" + }, + "email": { + "type": "string", + "description": "The email address of the contact person/organization.", + "format": "email" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.3.0/specificationExtension.json" } - ] } - } - }, - "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" - } - } - } - }, - "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." - }, - "parameters": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/parameter" - }, - "description": "JSON objects describing re-usable channel parameters." - }, - "schema": { - "allOf": [ - { - "$ref": "http://json-schema.org/draft-07/schema#" }, - { - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "properties": { - "additionalProperties": { - "anyOf": [ - { - "$ref": "#/definitions/schema" + "http://asyncapi.com/definitions/2.3.0/license.json": { + "$id": "http://asyncapi.com/definitions/2.3.0/license.json", + "type": "object", + "required": [ + "name" + ], + "additionalProperties": false, + "properties": { + "name": { + "type": "string", + "description": "The name of the license type. It's encouraged to use an OSI compatible license." }, - { - "type": "boolean" + "url": { + "type": "string", + "description": "The URL pointing to the license.", + "format": "uri" } - ], - "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 + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.3.0/specificationExtension.json" + } } - } - } - ] - }, - "externalDocs": { - "type": "object", - "additionalProperties": false, - "description": "information about external documentation", - "required": [ - "url" - ], - "properties": { - "description": { - "type": "string" - }, - "url": { - "type": "string", - "format": "uri" - } - }, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - } - }, - "channelItem": { - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "properties": { - "$ref": { - "$ref": "#/definitions/ReferenceObject" }, - "parameters": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/parameter" - } - }, - "description": { - "type": "string", - "description": "A description of the channel." - }, - "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 - }, - "publish": { - "$ref": "#/definitions/operation" - }, - "subscribe": { - "$ref": "#/definitions/operation" - }, - "deprecated": { - "type": "boolean", - "default": false - }, - "bindings": { - "$ref": "#/definitions/bindingsObject" - } - } - }, - "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" - } - } - }, - "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" - }, - { - "type": "array", - "items": [ - { - "oneOf": [ - { - "$ref": "#/definitions/Reference" - }, - { - "$ref": "#/definitions/operationTrait" - } - ] - }, - { - "type": "object", - "additionalItems": true - } + "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" + } ] - } - ] - } - }, - "summary": { - "type": "string" + } }, - "description": { - "type": "string" + "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" + } + } }, - "tags": { - "type": "array", - "items": { - "$ref": "#/definitions/tag" - }, - "uniqueItems": true + "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", + "type": "object", + "description": "An object representing a Server.", + "required": [ + "url", + "protocol" + ], + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.3.0/specificationExtension.json" + } + }, + "properties": { + "url": { + "type": "string" + }, + "description": { + "type": "string" + }, + "protocol": { + "type": "string", + "description": "The transfer protocol." + }, + "protocolVersion": { + "type": "string" + }, + "variables": { + "$ref": "http://asyncapi.com/definitions/2.3.0/serverVariables.json" + }, + "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" + } + } }, - "externalDocs": { - "$ref": "#/definitions/externalDocs" + "http://asyncapi.com/definitions/2.3.0/serverVariables.json": { + "$id": "http://asyncapi.com/definitions/2.3.0/serverVariables.json", + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/2.3.0/serverVariable.json" + } }, - "operationId": { - "type": "string" + "http://asyncapi.com/definitions/2.3.0/serverVariable.json": { + "$id": "http://asyncapi.com/definitions/2.3.0/serverVariable.json", + "type": "object", + "description": "An object representing a Server Variable for server URL template substitution.", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.3.0/specificationExtension.json" + } + }, + "properties": { + "enum": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + }, + "default": { + "type": "string" + }, + "description": { + "type": "string" + }, + "examples": { + "type": "array", + "items": { + "type": "string" + } + } + } }, - "bindings": { - "$ref": "#/definitions/bindingsObject" + "http://asyncapi.com/definitions/2.3.0/SecurityRequirement.json": { + "$id": "http://asyncapi.com/definitions/2.3.0/SecurityRequirement.json", + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + } }, - "message": { - "$ref": "#/definitions/message" - } - } - }, - "message": { - "oneOf": [ - { - "$ref": "#/definitions/Reference" + "http://asyncapi.com/definitions/2.3.0/bindingsObject.json": { + "$id": "http://asyncapi.com/definitions/2.3.0/bindingsObject.json", + "type": "object", + "additionalProperties": true, + "properties": { + "http": {}, + "ws": {}, + "amqp": {}, + "amqp1": {}, + "mqtt": {}, + "mqtt5": {}, + "kafka": {}, + "anypointmq": {}, + "nats": {}, + "jms": {}, + "sns": {}, + "sqs": {}, + "stomp": {}, + "redis": {}, + "ibmmq": {}, + "solace": {} + } }, - { - "oneOf": [ - { - "type": "object", - "required": [ - "oneOf" - ], - "additionalProperties": false, - "properties": { - "oneOf": { - "type": "array", - "items": { - "$ref": "#/definitions/message" - } - } - } + "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 }, - { - "type": "object", - "additionalProperties": false, - "patternProperties": { + "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", + "type": "object", + "additionalProperties": false, + "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" + "$ref": "http://asyncapi.com/definitions/2.3.0/specificationExtension.json" } - }, - "properties": { - "schemaFormat": { - "type": "string" - }, - "contentType": { - "type": "string" + }, + "properties": { + "$ref": { + "$ref": "http://asyncapi.com/definitions/2.3.0/ReferenceObject.json" }, - "headers": { - "allOf": [ - { - "$ref": "#/definitions/schema" - }, - { - "properties": { - "type": { - "const": "object" - } - } + "parameters": { + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/2.3.0/parameter.json" } - ] }, - "payload": {}, - "correlationId": { - "oneOf": [ - { - "$ref": "#/definitions/Reference" - }, - { - "$ref": "#/definitions/correlationId" - } - ] + "description": { + "type": "string", + "description": "A description of the channel." }, - "tags": { - "type": "array", - "items": { - "$ref": "#/definitions/tag" - }, - "uniqueItems": true + "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 }, - "summary": { - "type": "string", - "description": "A brief summary of the message." + "publish": { + "$ref": "http://asyncapi.com/definitions/2.3.0/operation.json" }, - "name": { - "type": "string", - "description": "Name of the message." + "subscribe": { + "$ref": "http://asyncapi.com/definitions/2.3.0/operation.json" }, - "title": { - "type": "string", - "description": "A human-friendly title for the message." + "deprecated": { + "type": "boolean", + "default": false }, + "bindings": { + "$ref": "http://asyncapi.com/definitions/2.3.0/bindingsObject.json" + } + } + }, + "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" + } + }, + "properties": { "description": { - "type": "string", - "description": "A longer description of the message. CommonMark is allowed." + "type": "string", + "description": "A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed." }, - "externalDocs": { - "$ref": "#/definitions/externalDocs" + "schema": { + "$ref": "http://asyncapi.com/definitions/2.3.0/schema.json" }, - "deprecated": { - "type": "boolean", - "default": false + "location": { + "type": "string", + "description": "A runtime expression that specifies the location of the parameter value", + "pattern": "^\\$message\\.(header|payload)#(\\/(([^\\/~])|(~[01]))*)*" }, - "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" + "$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#" }, - "traits": { - "type": "array", - "items": { - "oneOf": [ - { - "$ref": "#/definitions/Reference" - }, - { - "$ref": "#/definitions/messageTrait" - }, - { - "type": "array", - "items": [ - { - "oneOf": [ - { - "$ref": "#/definitions/Reference" - }, - { - "$ref": "#/definitions/messageTrait" - } - ] - }, - { + { + "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", - "additionalItems": true - } + "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" + }, + "$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": [ + { + "$ref": "#" + }, + { + "$ref": "#/definitions/schemaArray" + } + ], + "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": { + "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" + }, + { + "type": "array", + "items": { + "$ref": "#/definitions/simpleTypes" + }, + "minItems": 1, + "uniqueItems": true + } ] - } + }, + "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 + }, + "http://asyncapi.com/definitions/2.3.0/externalDocs.json": { + "$id": "http://asyncapi.com/definitions/2.3.0/externalDocs.json", + "type": "object", + "additionalProperties": false, + "description": "information about external documentation", + "required": [ + "url" + ], + "properties": { + "description": { + "type": "string" + }, + "url": { + "type": "string", + "format": "uri" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.3.0/specificationExtension.json" } - } } - ] - } - ] - }, - "bindingsObject": { - "type": "object", - "additionalProperties": true, - "properties": { - "http": {}, - "ws": {}, - "amqp": {}, - "amqp1": {}, - "mqtt": {}, - "mqtt5": {}, - "kafka": {}, - "anypointmq": {}, - "nats": {}, - "jms": {}, - "sns": {}, - "sqs": {}, - "stomp": {}, - "redis": {}, - "ibmmq": {}, - "solace": {} - } - }, - "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]))*)*" - } - } - }, - "specificationExtension": { - "description": "Any property starting with x- is valid.", - "additionalProperties": true, - "additionalItems": true - }, - "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" - }, - "description": { - "type": "string" - }, - "tags": { - "type": "array", - "items": { - "$ref": "#/definitions/tag" - }, - "uniqueItems": true - }, - "externalDocs": { - "$ref": "#/definitions/externalDocs" }, - "operationId": { - "type": "string" - }, - "bindings": { - "$ref": "#/definitions/bindingsObject" - } - } - }, - "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" + "http://asyncapi.com/definitions/2.3.0/operation.json": { + "$id": "http://asyncapi.com/definitions/2.3.0/operation.json", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.3.0/specificationExtension.json" + } }, - { - "properties": { - "type": { - "const": "object" + "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" + }, + { + "type": "array", + "items": [ + { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.3.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.3.0/operationTrait.json" + } + ] + }, + { + "type": "object", + "additionalItems": true + } + ] + } + ] + } + }, + "summary": { + "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" } - } } - ] }, - "correlationId": { - "oneOf": [ - { - "$ref": "#/definitions/Reference" + "http://asyncapi.com/definitions/2.3.0/operationTrait.json": { + "$id": "http://asyncapi.com/definitions/2.3.0/operationTrait.json", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.3.0/specificationExtension.json" + } }, - { - "$ref": "#/definitions/correlationId" + "properties": { + "summary": { + "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" + } } - ] - }, - "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" - } - } - }, - "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" - } - ] - }, - "userPassword": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "userPassword" - ] - }, - "description": { - "type": "string" - } - }, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "additionalProperties": false - }, - "apiKey": { - "type": "object", - "required": [ - "type", - "in" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "apiKey" - ] - }, - "in": { - "type": "string", - "enum": [ - "user", - "password" - ] - }, - "description": { - "type": "string" - } - }, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "additionalProperties": false - }, - "X509": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "X509" - ] - }, - "description": { - "type": "string" - } - }, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "additionalProperties": false - }, - "symmetricEncryption": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "symmetricEncryption" - ] }, - "description": { - "type": "string" - } - }, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "additionalProperties": false - }, - "asymmetricEncryption": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "asymmetricEncryption" - ] - }, - "description": { - "type": "string" - } - }, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "additionalProperties": false - }, - "HTTPSecurityScheme": { - "oneOf": [ - { - "$ref": "#/definitions/NonBearerHTTPSecurityScheme" - }, - { - "$ref": "#/definitions/BearerHTTPSecurityScheme" + "http://asyncapi.com/definitions/2.3.0/tag.json": { + "$id": "http://asyncapi.com/definitions/2.3.0/tag.json", + "type": "object", + "additionalProperties": false, + "required": [ + "name" + ], + "properties": { + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "externalDocs": { + "$ref": "http://asyncapi.com/definitions/2.3.0/externalDocs.json" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.3.0/specificationExtension.json" + } + } }, - { - "$ref": "#/definitions/APIKeyHTTPSecurityScheme" - } - ] - }, - "NonBearerHTTPSecurityScheme": { - "not": { - "type": "object", - "properties": { - "scheme": { - "type": "string", - "enum": [ - "bearer" + "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" + }, + { + "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" + }, + { + "type": "array", + "items": [ + { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.3.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.3.0/messageTrait.json" + } + ] + }, + { + "type": "object", + "additionalItems": true + } + ] + } + ] + } + } + } + } + ] + } ] - } - } - }, - "type": "object", - "required": [ - "scheme", - "type" - ], - "properties": { - "scheme": { - "type": "string" - }, - "description": { - "type": "string" - }, - "type": { - "type": "string", - "enum": [ - "http" - ] - } - }, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "additionalProperties": false - }, - "BearerHTTPSecurityScheme": { - "type": "object", - "required": [ - "type", - "scheme" - ], - "properties": { - "scheme": { - "type": "string", - "enum": [ - "bearer" - ] - }, - "bearerFormat": { - "type": "string" - }, - "type": { - "type": "string", - "enum": [ - "http" - ] - }, - "description": { - "type": "string" - } - }, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "additionalProperties": false - }, - "APIKeyHTTPSecurityScheme": { - "type": "object", - "required": [ - "type", - "name", - "in" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "httpApiKey" - ] - }, - "name": { - "type": "string" - }, - "in": { - "type": "string", - "enum": [ - "header", - "query", - "cookie" - ] }, - "description": { - "type": "string" - } - }, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "additionalProperties": false - }, - "SaslSecurityScheme": { - "oneOf": [ - { - "$ref": "#/definitions/SaslPlainSecurityScheme" - }, - { - "$ref": "#/definitions/SaslScramSecurityScheme" - }, - { - "$ref": "#/definitions/SaslGssapiSecurityScheme" - } - ] - }, - "SaslPlainSecurityScheme": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "plain" - ] + "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]))*)*" + } + } }, - "description": { - "type": "string" - } - }, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "additionalProperties": false - }, - "SaslScramSecurityScheme": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "scramSha256", - "scramSha512" - ] + "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" + } + } }, - "description": { - "type": "string" - } - }, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "additionalProperties": false - }, - "SaslGssapiSecurityScheme": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "gssapi" - ] + "http://asyncapi.com/definitions/2.3.0/components.json": { + "$id": "http://asyncapi.com/definitions/2.3.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.3.0/specificationExtension.json" + } + }, + "properties": { + "schemas": { + "$ref": "http://asyncapi.com/definitions/2.3.0/schemas.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" + } + } + } }, - "description": { - "type": "string" - } - }, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "additionalProperties": false - }, - "oauth2Flows": { - "type": "object", - "required": [ - "type", - "flows" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "oauth2" - ] + "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." }, - "description": { - "type": "string" + "http://asyncapi.com/definitions/2.3.0/messages.json": { + "$id": "http://asyncapi.com/definitions/2.3.0/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." }, - "flows": { - "type": "object", - "properties": { - "implicit": { - "allOf": [ + "http://asyncapi.com/definitions/2.3.0/SecurityScheme.json": { + "$id": "http://asyncapi.com/definitions/2.3.0/SecurityScheme.json", + "oneOf": [ { - "$ref": "#/definitions/oauth2Flow" + "$ref": "http://asyncapi.com/definitions/2.3.0/userPassword.json" }, { - "required": [ - "authorizationUrl", - "scopes" - ] + "$ref": "http://asyncapi.com/definitions/2.3.0/apiKey.json" }, { - "not": { - "required": [ - "tokenUrl" - ] - } - } - ] - }, - "password": { - "allOf": [ + "$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": "#/definitions/oauth2Flow" + "$ref": "http://asyncapi.com/definitions/2.3.0/oauth2Flows.json" }, { - "required": [ - "tokenUrl", - "scopes" - ] + "$ref": "http://asyncapi.com/definitions/2.3.0/openIdConnect.json" }, { - "not": { - "required": [ - "authorizationUrl" + "$ref": "http://asyncapi.com/definitions/2.3.0/SaslSecurityScheme.json" + } + ] + }, + "http://asyncapi.com/definitions/2.3.0/userPassword.json": { + "$id": "http://asyncapi.com/definitions/2.3.0/userPassword.json", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "userPassword" + ] + }, + "description": { + "type": "string" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.3.0/specificationExtension.json" + } + }, + "additionalProperties": false + }, + "http://asyncapi.com/definitions/2.3.0/apiKey.json": { + "$id": "http://asyncapi.com/definitions/2.3.0/apiKey.json", + "type": "object", + "required": [ + "type", + "in" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "apiKey" + ] + }, + "in": { + "type": "string", + "enum": [ + "user", + "password" + ] + }, + "description": { + "type": "string" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.3.0/specificationExtension.json" + } + }, + "additionalProperties": false + }, + "http://asyncapi.com/definitions/2.3.0/X509.json": { + "$id": "http://asyncapi.com/definitions/2.3.0/X509.json", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "X509" + ] + }, + "description": { + "type": "string" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.3.0/specificationExtension.json" + } + }, + "additionalProperties": false + }, + "http://asyncapi.com/definitions/2.3.0/symmetricEncryption.json": { + "$id": "http://asyncapi.com/definitions/2.3.0/symmetricEncryption.json", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "symmetricEncryption" + ] + }, + "description": { + "type": "string" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.3.0/specificationExtension.json" + } + }, + "additionalProperties": false + }, + "http://asyncapi.com/definitions/2.3.0/asymmetricEncryption.json": { + "$id": "http://asyncapi.com/definitions/2.3.0/asymmetricEncryption.json", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "asymmetricEncryption" ] - } + }, + "description": { + "type": "string" } - ] }, - "clientCredentials": { - "allOf": [ + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.3.0/specificationExtension.json" + } + }, + "additionalProperties": false + }, + "http://asyncapi.com/definitions/2.3.0/HTTPSecurityScheme.json": { + "$id": "http://asyncapi.com/definitions/2.3.0/HTTPSecurityScheme.json", + "oneOf": [ { - "$ref": "#/definitions/oauth2Flow" + "$ref": "http://asyncapi.com/definitions/2.3.0/NonBearerHTTPSecurityScheme.json" }, { - "required": [ - "tokenUrl", - "scopes" - ] + "$ref": "http://asyncapi.com/definitions/2.3.0/BearerHTTPSecurityScheme.json" }, { - "not": { - "required": [ - "authorizationUrl" + "$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", + "not": { + "type": "object", + "properties": { + "scheme": { + "type": "string", + "enum": [ + "bearer" + ] + } + } + }, + "type": "object", + "required": [ + "scheme", + "type" + ], + "properties": { + "scheme": { + "type": "string" + }, + "description": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "http" ] - } } - ] }, - "authorizationCode": { - "allOf": [ - { - "$ref": "#/definitions/oauth2Flow" + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.3.0/specificationExtension.json" + } + }, + "additionalProperties": false + }, + "http://asyncapi.com/definitions/2.3.0/BearerHTTPSecurityScheme.json": { + "$id": "http://asyncapi.com/definitions/2.3.0/BearerHTTPSecurityScheme.json", + "type": "object", + "required": [ + "type", + "scheme" + ], + "properties": { + "scheme": { + "type": "string", + "enum": [ + "bearer" + ] }, - { - "required": [ - "authorizationUrl", - "tokenUrl", - "scopes" - ] + "bearerFormat": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "http" + ] + }, + "description": { + "type": "string" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.3.0/specificationExtension.json" + } + }, + "additionalProperties": false + }, + "http://asyncapi.com/definitions/2.3.0/APIKeyHTTPSecurityScheme.json": { + "$id": "http://asyncapi.com/definitions/2.3.0/APIKeyHTTPSecurityScheme.json", + "type": "object", + "required": [ + "type", + "name", + "in" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "httpApiKey" + ] + }, + "name": { + "type": "string" + }, + "in": { + "type": "string", + "enum": [ + "header", + "query", + "cookie" + ] + }, + "description": { + "type": "string" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.3.0/specificationExtension.json" + } + }, + "additionalProperties": false + }, + "http://asyncapi.com/definitions/2.3.0/oauth2Flows.json": { + "$id": "http://asyncapi.com/definitions/2.3.0/oauth2Flows.json", + "type": "object", + "required": [ + "type", + "flows" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "oauth2" + ] + }, + "description": { + "type": "string" + }, + "flows": { + "type": "object", + "properties": { + "implicit": { + "allOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.3.0/oauth2Flow.json" + }, + { + "required": [ + "authorizationUrl", + "scopes" + ] + }, + { + "not": { + "required": [ + "tokenUrl" + ] + } + } + ] + }, + "password": { + "allOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.3.0/oauth2Flow.json" + }, + { + "required": [ + "tokenUrl", + "scopes" + ] + }, + { + "not": { + "required": [ + "authorizationUrl" + ] + } + } + ] + }, + "clientCredentials": { + "allOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.3.0/oauth2Flow.json" + }, + { + "required": [ + "tokenUrl", + "scopes" + ] + }, + { + "not": { + "required": [ + "authorizationUrl" + ] + } + } + ] + }, + "authorizationCode": { + "allOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.3.0/oauth2Flow.json" + }, + { + "required": [ + "authorizationUrl", + "tokenUrl", + "scopes" + ] + } + ] + } + }, + "additionalProperties": false + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.3.0/specificationExtension.json" } - ] } - }, - "additionalProperties": false - } - }, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - } - }, - "oauth2Flow": { - "type": "object", - "properties": { - "authorizationUrl": { - "type": "string", - "format": "uri" }, - "tokenUrl": { - "type": "string", - "format": "uri" + "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" + } }, - "refreshUrl": { - "type": "string", - "format": "uri" + "http://asyncapi.com/definitions/2.3.0/openIdConnect.json": { + "$id": "http://asyncapi.com/definitions/2.3.0/openIdConnect.json", + "type": "object", + "required": [ + "type", + "openIdConnectUrl" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "openIdConnect" + ] + }, + "description": { + "type": "string" + }, + "openIdConnectUrl": { + "type": "string", + "format": "uri" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.3.0/specificationExtension.json" + } + }, + "additionalProperties": false }, - "scopes": { - "$ref": "#/definitions/oauth2Scopes" - } - }, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "additionalProperties": false - }, - "oauth2Scopes": { - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "openIdConnect": { - "type": "object", - "required": [ - "type", - "openIdConnectUrl" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "openIdConnect" - ] + "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" + } + ] }, - "description": { - "type": "string" + "http://asyncapi.com/definitions/2.3.0/SaslPlainSecurityScheme.json": { + "$id": "http://asyncapi.com/definitions/2.3.0/SaslPlainSecurityScheme.json", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "plain" + ] + }, + "description": { + "type": "string" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.3.0/specificationExtension.json" + } + }, + "additionalProperties": false + }, + "http://asyncapi.com/definitions/2.3.0/SaslScramSecurityScheme.json": { + "$id": "http://asyncapi.com/definitions/2.3.0/SaslScramSecurityScheme.json", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "scramSha256", + "scramSha512" + ] + }, + "description": { + "type": "string" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.3.0/specificationExtension.json" + } + }, + "additionalProperties": false + }, + "http://asyncapi.com/definitions/2.3.0/SaslGssapiSecurityScheme.json": { + "$id": "http://asyncapi.com/definitions/2.3.0/SaslGssapiSecurityScheme.json", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "gssapi" + ] + }, + "description": { + "type": "string" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.3.0/specificationExtension.json" + } + }, + "additionalProperties": false }, - "openIdConnectUrl": { - "type": "string", - "format": "uri" - } - }, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" + "http://asyncapi.com/definitions/2.3.0/parameters.json": { + "$id": "http://asyncapi.com/definitions/2.3.0/parameters.json", + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/2.3.0/parameter.json" + }, + "description": "JSON objects describing re-usable channel parameters." } - }, - "additionalProperties": false }, - "SecurityRequirement": { - "type": "object", - "additionalProperties": { - "type": "array", - "items": { - "type": "string" - }, - "uniqueItems": true - } - } - } -} + "description": "!!Auto generated!! \n Do not manually edit. " +} \ No newline at end of file diff --git a/test/index.js b/test/index.js index 67f9f56b..6bb26836 100644 --- a/test/index.js +++ b/test/index.js @@ -9,7 +9,8 @@ describe('AsyncAPI', () => { }); it('should check if json schema is exported and if it matches the original file', () => { - fs.readdirSync('schemas').forEach(file => { + const files = fs.readdirSync('schemas'); + files.forEach(file => { const fileName = path.parse(file).name; const asyncapi = require('..'); diff --git a/tools/bundler/index.js b/tools/bundler/index.js new file mode 100644 index 00000000..3733af64 --- /dev/null +++ b/tools/bundler/index.js @@ -0,0 +1,42 @@ +const path = require('path'); +const fs = require('fs'); +const definitionsDirectory = path.resolve(__dirname, '../../definitions'); +const outputDirectory = path.resolve(__dirname, '../../schemas'); +console.log(`Looking for separate definitions in the following directory: ${definitionsDirectory}`); +console.log(`Using the following output directory: ${outputDirectory}`); + +/** + * When run, go through all versions that have split definitions and bundles them together. + */ +(async () => { + const versions = await fs.promises.readdir(definitionsDirectory); + console.log(`Ensuring output directory is present ${outputDirectory}`); + if (!fs.existsSync(outputDirectory)) { + await fs.promises.mkdir(outputDirectory); + } + console.log(`The following versions have separate definitions: ${versions.join(',')}`); + for (const version of versions) { + const Bundler = require("@hyperjump/json-schema-bundle"); + try{ + console.log(`Bundling the following version together: ${version}`); + const versionDir = path.resolve(definitionsDirectory, 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)); + for (const jsonFile of definitionJson) { + Bundler.add(jsonFile); + } + const filePathToBundle = `file://${versionDir}/asyncapi.json`; + const fileToBundle = await Bundler.get(filePathToBundle); + const bundledSchema = await Bundler.bundle(fileToBundle); + bundledSchema.description = `!!Auto generated!! \n Do not manually edit. ${bundledSchema.description ?? ''}`; + const outputFile = path.resolve(outputDirectory, `${version}.json`); + console.log(`Writing the bundled file to: ${outputFile}`); + await fs.promises.writeFile(outputFile, JSON.stringify(bundledSchema, null, 4)); + }catch(e) { + console.log(e); + } + } + console.log('done'); +})(); + diff --git a/tools/bundler/package-lock.json b/tools/bundler/package-lock.json new file mode 100644 index 00000000..060fa868 --- /dev/null +++ b/tools/bundler/package-lock.json @@ -0,0 +1,112 @@ +{ + "name": "bundler", + "version": "1.0.0", + "lockfileVersion": 1, + "requires": true, + "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==", + "requires": { + "just-curry-it": "^3.2.1" + } + }, + "@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-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==", + "requires": { + "@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" + } + }, + "@hyperjump/pact": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/@hyperjump/pact/-/pact-0.2.0.tgz", + "integrity": "sha512-RHt0XRFsADXbqopurGZfCUNL7mPc0695TD2HNDqs4RCK5Db/1lDU2Bhk9EsyFmCBE9N1/boyvdKWjT1UYHIebg==", + "requires": { + "just-curry-it": "^3.1.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==" + }, + "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==" + }, + "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.6", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.6.tgz", + "integrity": "sha512-Z8/6vRlTUChSdIgMa51jxQ4lrw/Jy5SOW10ObaA47/RElsAN2c5Pn8bTgFGWn/ibwzXTE8qwr1Yzx28vsecXEA==", + "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==" + }, + "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" + } + } + } +} diff --git a/tools/bundler/package.json b/tools/bundler/package.json new file mode 100644 index 00000000..08644b82 --- /dev/null +++ b/tools/bundler/package.json @@ -0,0 +1,14 @@ +{ + "name": "bundler", + "version": "1.0.0", + "description": "Bundles all definitions together to provide the complete schema document", + "main": "index.js", + "scripts": { + "bundle": "node index" + }, + "dependencies": { + "@hyperjump/json-schema-bundle": "0.1.3" + }, + "author": "Jonas Lagoni (jonas-lt@live.dk)", + "license": "Apache-2.0" +}