From 63747090d924dc49c0b14e6a2d61151c11ebd285 Mon Sep 17 00:00:00 2001 From: Jonas Lagoni Date: Thu, 21 Apr 2022 13:58:15 +0200 Subject: [PATCH 001/102] chore: update with upstream master (#205) --- ...-for-humans-add-ready-to-merge-or-do-not-merge-label.yml | 4 ++-- .github/workflows/automerge-orphans.yml | 2 +- .github/workflows/link-check-cron.yml | 6 +++--- .github/workflows/link-check-pr.yml | 5 ++++- package.json | 4 ++++ 5 files changed, 14 insertions(+), 7 deletions(-) diff --git a/.github/workflows/automerge-for-humans-add-ready-to-merge-or-do-not-merge-label.yml b/.github/workflows/automerge-for-humans-add-ready-to-merge-or-do-not-merge-label.yml index c694c38f..e00a45fa 100644 --- a/.github/workflows/automerge-for-humans-add-ready-to-merge-or-do-not-merge-label.yml +++ b/.github/workflows/automerge-for-humans-add-ready-to-merge-or-do-not-merge-label.yml @@ -50,7 +50,7 @@ jobs: repo: pull.head.repo.name, basehead: `${pull.base.label}...${pull.head.label}`, }); - if (comparison.behind_by !== 0) { + if (comparison.behind_by !== 0 && pull.mergeable_state === 'behind') { console.log(`This branch is behind the target by ${comparison.behind_by} commits`) console.log('adding out-of-date comment...'); github.rest.issues.createComment({ @@ -108,4 +108,4 @@ jobs: owner: context.repo.owner, repo: context.repo.repo, labels: ['autoupdate'] - }) \ No newline at end of file + }) diff --git a/.github/workflows/automerge-orphans.yml b/.github/workflows/automerge-orphans.yml index 5c39ba92..5e2ff6ed 100644 --- a/.github/workflows/automerge-orphans.yml +++ b/.github/workflows/automerge-orphans.yml @@ -57,7 +57,7 @@ jobs: name: Send info about orphan to slack uses: rtCamp/action-slack-notify@v2 env: - SLACK_WEBHOOK: ${{secrets.SLACK_GITHUB_NEWISSUEPR}} + SLACK_WEBHOOK: ${{secrets.SLACK_CI_FAIL_NOTIFY}} SLACK_TITLE: 🚨 Not merged PR that should be automerged 🚨 SLACK_MESSAGE: ${{steps.issuemarkdown.outputs.text}} MSG_MINIMAL: true \ No newline at end of file diff --git a/.github/workflows/link-check-cron.yml b/.github/workflows/link-check-cron.yml index e24b066b..cfc2cf01 100644 --- a/.github/workflows/link-check-cron.yml +++ b/.github/workflows/link-check-cron.yml @@ -29,8 +29,8 @@ jobs: - name: Report workflow run status to Slack uses: 8398a7/action-slack@v3 with: - status: ${{ job.status }} - fields: repo,message,action,eventName,ref,workflow + status: ${{ job.status }} + fields: repo,action,workflow env: - SLACK_WEBHOOK_URL: ${{ secrets.SLACK_DOCS_CHANNEL }} + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_CI_FAIL_NOTIFY }} if: failure() # Only, on failure, send a message on the Slack Docs Channel (if there are broken links) diff --git a/.github/workflows/link-check-pr.yml b/.github/workflows/link-check-pr.yml index 6e9eb358..ecdf2b39 100644 --- a/.github/workflows/link-check-pr.yml +++ b/.github/workflows/link-check-pr.yml @@ -6,12 +6,15 @@ name: Check Markdown links on: pull_request_target: types: [synchronize, ready_for_review, opened, reopened] + paths: + - '**.md' jobs: External-link-validation-on-PR: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - name: Checkout repo + uses: actions/checkout@v3 - name: Check links uses: gaurav-nelson/github-action-markdown-link-check@v1 with: diff --git a/package.json b/package.json index 04f1c657..738ac891 100644 --- a/package.json +++ b/package.json @@ -48,6 +48,10 @@ { "name": "2022-04-release", "prerelease": true + }, + { + "name": "next-major-spec", + "prerelease": true } ], "plugins": [ From 36ab33ce7cfa622167c8635c73a36e60ca1d6e66 Mon Sep 17 00:00:00 2001 From: Jonas Lagoni Date: Wed, 18 May 2022 15:21:36 +0200 Subject: [PATCH 002/102] feat: add v3 schemas (#221) --- .../3.0.0/APIKeyHTTPSecurityScheme.json | 38 + .../3.0.0/BearerHTTPSecurityScheme.json | 35 + definitions/3.0.0/HTTPSecurityScheme.json | 15 + .../3.0.0/NonBearerHTTPSecurityScheme.json | 40 + definitions/3.0.0/Reference.json | 13 + definitions/3.0.0/ReferenceObject.json | 6 + .../3.0.0/SaslGssapiSecurityScheme.json | 25 + .../3.0.0/SaslPlainSecurityScheme.json | 25 + .../3.0.0/SaslScramSecurityScheme.json | 26 + definitions/3.0.0/SaslSecurityScheme.json | 15 + definitions/3.0.0/SecurityRequirement.json | 12 + definitions/3.0.0/SecurityScheme.json | 33 + definitions/3.0.0/X509.json | 25 + definitions/3.0.0/apiKey.json | 33 + definitions/3.0.0/asymmetricEncryption.json | 25 + definitions/3.0.0/asyncapi.json | 56 + definitions/3.0.0/bindingsObject.json | 24 + definitions/3.0.0/channelItem.json | 47 + definitions/3.0.0/channels.json | 13 + definitions/3.0.0/components.json | 98 + definitions/3.0.0/contact.json | 28 + definitions/3.0.0/correlationId.json | 25 + definitions/3.0.0/external.json | 5 + definitions/3.0.0/externalDocs.json | 24 + definitions/3.0.0/info.json | 41 + definitions/3.0.0/license.json | 25 + definitions/3.0.0/message.json | 171 ++ definitions/3.0.0/messageTrait.json | 85 + definitions/3.0.0/messages.json | 9 + definitions/3.0.0/oauth2Flow.json | 28 + definitions/3.0.0/oauth2Flows.json | 105 + definitions/3.0.0/oauth2Scopes.json | 8 + definitions/3.0.0/openIdConnect.json | 30 + definitions/3.0.0/operation.json | 76 + definitions/3.0.0/operationTrait.json | 41 + definitions/3.0.0/parameter.json | 27 + definitions/3.0.0/parameters.json | 9 + definitions/3.0.0/schema.json | 98 + definitions/3.0.0/schemas.json | 9 + definitions/3.0.0/server.json | 43 + definitions/3.0.0/serverVariable.json | 33 + definitions/3.0.0/serverVariables.json | 8 + definitions/3.0.0/servers.json | 16 + definitions/3.0.0/specificationExtension.json | 7 + definitions/3.0.0/symmetricEncryption.json | 25 + definitions/3.0.0/tag.json | 25 + definitions/3.0.0/userPassword.json | 25 + index.js | 1 + schemas/3.0.0.json | 1827 +++++++++++++++++ 49 files changed, 3458 insertions(+) create mode 100644 definitions/3.0.0/APIKeyHTTPSecurityScheme.json create mode 100644 definitions/3.0.0/BearerHTTPSecurityScheme.json create mode 100644 definitions/3.0.0/HTTPSecurityScheme.json create mode 100644 definitions/3.0.0/NonBearerHTTPSecurityScheme.json create mode 100644 definitions/3.0.0/Reference.json create mode 100644 definitions/3.0.0/ReferenceObject.json create mode 100644 definitions/3.0.0/SaslGssapiSecurityScheme.json create mode 100644 definitions/3.0.0/SaslPlainSecurityScheme.json create mode 100644 definitions/3.0.0/SaslScramSecurityScheme.json create mode 100644 definitions/3.0.0/SaslSecurityScheme.json create mode 100644 definitions/3.0.0/SecurityRequirement.json create mode 100644 definitions/3.0.0/SecurityScheme.json create mode 100644 definitions/3.0.0/X509.json create mode 100644 definitions/3.0.0/apiKey.json create mode 100644 definitions/3.0.0/asymmetricEncryption.json create mode 100644 definitions/3.0.0/asyncapi.json create mode 100644 definitions/3.0.0/bindingsObject.json create mode 100644 definitions/3.0.0/channelItem.json create mode 100644 definitions/3.0.0/channels.json create mode 100644 definitions/3.0.0/components.json create mode 100644 definitions/3.0.0/contact.json create mode 100644 definitions/3.0.0/correlationId.json create mode 100644 definitions/3.0.0/external.json create mode 100644 definitions/3.0.0/externalDocs.json create mode 100644 definitions/3.0.0/info.json create mode 100644 definitions/3.0.0/license.json create mode 100644 definitions/3.0.0/message.json create mode 100644 definitions/3.0.0/messageTrait.json create mode 100644 definitions/3.0.0/messages.json create mode 100644 definitions/3.0.0/oauth2Flow.json create mode 100644 definitions/3.0.0/oauth2Flows.json create mode 100644 definitions/3.0.0/oauth2Scopes.json create mode 100644 definitions/3.0.0/openIdConnect.json create mode 100644 definitions/3.0.0/operation.json create mode 100644 definitions/3.0.0/operationTrait.json create mode 100644 definitions/3.0.0/parameter.json create mode 100644 definitions/3.0.0/parameters.json create mode 100644 definitions/3.0.0/schema.json create mode 100644 definitions/3.0.0/schemas.json create mode 100644 definitions/3.0.0/server.json create mode 100644 definitions/3.0.0/serverVariable.json create mode 100644 definitions/3.0.0/serverVariables.json create mode 100644 definitions/3.0.0/servers.json create mode 100644 definitions/3.0.0/specificationExtension.json create mode 100644 definitions/3.0.0/symmetricEncryption.json create mode 100644 definitions/3.0.0/tag.json create mode 100644 definitions/3.0.0/userPassword.json create mode 100644 schemas/3.0.0.json diff --git a/definitions/3.0.0/APIKeyHTTPSecurityScheme.json b/definitions/3.0.0/APIKeyHTTPSecurityScheme.json new file mode 100644 index 00000000..d1472015 --- /dev/null +++ b/definitions/3.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/3.0.0/specificationExtension.json" + } + }, + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/3.0.0/APIKeyHTTPSecurityScheme.json" +} \ No newline at end of file diff --git a/definitions/3.0.0/BearerHTTPSecurityScheme.json b/definitions/3.0.0/BearerHTTPSecurityScheme.json new file mode 100644 index 00000000..7a247c3a --- /dev/null +++ b/definitions/3.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/3.0.0/specificationExtension.json" + } + }, + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/3.0.0/BearerHTTPSecurityScheme.json" +} \ No newline at end of file diff --git a/definitions/3.0.0/HTTPSecurityScheme.json b/definitions/3.0.0/HTTPSecurityScheme.json new file mode 100644 index 00000000..c75d7b50 --- /dev/null +++ b/definitions/3.0.0/HTTPSecurityScheme.json @@ -0,0 +1,15 @@ +{ + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/NonBearerHTTPSecurityScheme.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/BearerHTTPSecurityScheme.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/APIKeyHTTPSecurityScheme.json" + } + ], + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/3.0.0/HTTPSecurityScheme.json" +} \ No newline at end of file diff --git a/definitions/3.0.0/NonBearerHTTPSecurityScheme.json b/definitions/3.0.0/NonBearerHTTPSecurityScheme.json new file mode 100644 index 00000000..eeadb2d8 --- /dev/null +++ b/definitions/3.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/3.0.0/specificationExtension.json" + } + }, + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/3.0.0/NonBearerHTTPSecurityScheme.json" +} \ No newline at end of file diff --git a/definitions/3.0.0/Reference.json b/definitions/3.0.0/Reference.json new file mode 100644 index 00000000..f9e9893a --- /dev/null +++ b/definitions/3.0.0/Reference.json @@ -0,0 +1,13 @@ +{ + "type": "object", + "required": [ + "$ref" + ], + "properties": { + "$ref": { + "$ref": "http://asyncapi.com/definitions/3.0.0/ReferenceObject.json" + } + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/3.0.0/Reference.json" +} \ No newline at end of file diff --git a/definitions/3.0.0/ReferenceObject.json b/definitions/3.0.0/ReferenceObject.json new file mode 100644 index 00000000..c58008a4 --- /dev/null +++ b/definitions/3.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/3.0.0/ReferenceObject.json" +} \ No newline at end of file diff --git a/definitions/3.0.0/SaslGssapiSecurityScheme.json b/definitions/3.0.0/SaslGssapiSecurityScheme.json new file mode 100644 index 00000000..f3ef3f35 --- /dev/null +++ b/definitions/3.0.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/3.0.0/specificationExtension.json" + } + }, + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/3.0.0/SaslGssapiSecurityScheme.json" +} \ No newline at end of file diff --git a/definitions/3.0.0/SaslPlainSecurityScheme.json b/definitions/3.0.0/SaslPlainSecurityScheme.json new file mode 100644 index 00000000..6de1b832 --- /dev/null +++ b/definitions/3.0.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/3.0.0/specificationExtension.json" + } + }, + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/3.0.0/SaslPlainSecurityScheme.json" +} \ No newline at end of file diff --git a/definitions/3.0.0/SaslScramSecurityScheme.json b/definitions/3.0.0/SaslScramSecurityScheme.json new file mode 100644 index 00000000..b7b9fc36 --- /dev/null +++ b/definitions/3.0.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/3.0.0/specificationExtension.json" + } + }, + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/3.0.0/SaslScramSecurityScheme.json" +} \ No newline at end of file diff --git a/definitions/3.0.0/SaslSecurityScheme.json b/definitions/3.0.0/SaslSecurityScheme.json new file mode 100644 index 00000000..4688e223 --- /dev/null +++ b/definitions/3.0.0/SaslSecurityScheme.json @@ -0,0 +1,15 @@ +{ + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/SaslPlainSecurityScheme.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/SaslScramSecurityScheme.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/SaslGssapiSecurityScheme.json" + } + ], + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/3.0.0/SaslSecurityScheme.json" +} \ No newline at end of file diff --git a/definitions/3.0.0/SecurityRequirement.json b/definitions/3.0.0/SecurityRequirement.json new file mode 100644 index 00000000..410afeb6 --- /dev/null +++ b/definitions/3.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/3.0.0/SecurityRequirement.json" +} \ No newline at end of file diff --git a/definitions/3.0.0/SecurityScheme.json b/definitions/3.0.0/SecurityScheme.json new file mode 100644 index 00000000..ee6b9f70 --- /dev/null +++ b/definitions/3.0.0/SecurityScheme.json @@ -0,0 +1,33 @@ +{ + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/userPassword.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/apiKey.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/X509.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/symmetricEncryption.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/asymmetricEncryption.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/HTTPSecurityScheme.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/oauth2Flows.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/openIdConnect.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/SaslSecurityScheme.json" + } + ], + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/3.0.0/SecurityScheme.json" +} \ No newline at end of file diff --git a/definitions/3.0.0/X509.json b/definitions/3.0.0/X509.json new file mode 100644 index 00000000..059a1ca0 --- /dev/null +++ b/definitions/3.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/3.0.0/specificationExtension.json" + } + }, + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/3.0.0/X509.json" +} \ No newline at end of file diff --git a/definitions/3.0.0/apiKey.json b/definitions/3.0.0/apiKey.json new file mode 100644 index 00000000..dd4b8af8 --- /dev/null +++ b/definitions/3.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/3.0.0/specificationExtension.json" + } + }, + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/3.0.0/apiKey.json" +} \ No newline at end of file diff --git a/definitions/3.0.0/asymmetricEncryption.json b/definitions/3.0.0/asymmetricEncryption.json new file mode 100644 index 00000000..58ef8eb1 --- /dev/null +++ b/definitions/3.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/3.0.0/specificationExtension.json" + } + }, + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/3.0.0/asymmetricEncryption.json" +} \ No newline at end of file diff --git a/definitions/3.0.0/asyncapi.json b/definitions/3.0.0/asyncapi.json new file mode 100644 index 00000000..703621ae --- /dev/null +++ b/definitions/3.0.0/asyncapi.json @@ -0,0 +1,56 @@ +{ + "title": "AsyncAPI 3.0.0 schema.", + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/3.0.0/asyncapi.json", + "type": "object", + "required": [ + "asyncapi", + "info", + "channels" + ], + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "properties": { + "asyncapi": { + "type": "string", + "enum": [ + "3.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/3.0.0/info.json" + }, + "servers": { + "$ref": "http://asyncapi.com/definitions/3.0.0/servers.json" + }, + "defaultContentType": { + "type": "string" + }, + "channels": { + "$ref": "http://asyncapi.com/definitions/3.0.0/channels.json" + }, + "components": { + "$ref": "http://asyncapi.com/definitions/3.0.0/components.json" + }, + "tags": { + "type": "array", + "items": { + "$ref": "http://asyncapi.com/definitions/3.0.0/tag.json" + }, + "uniqueItems": true + }, + "externalDocs": { + "$ref": "http://asyncapi.com/definitions/3.0.0/externalDocs.json" + } + } +} \ No newline at end of file diff --git a/definitions/3.0.0/bindingsObject.json b/definitions/3.0.0/bindingsObject.json new file mode 100644 index 00000000..cec5e0fc --- /dev/null +++ b/definitions/3.0.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/3.0.0/bindingsObject.json" +} \ No newline at end of file diff --git a/definitions/3.0.0/channelItem.json b/definitions/3.0.0/channelItem.json new file mode 100644 index 00000000..7e682196 --- /dev/null +++ b/definitions/3.0.0/channelItem.json @@ -0,0 +1,47 @@ +{ + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "properties": { + "$ref": { + "$ref": "http://asyncapi.com/definitions/3.0.0/ReferenceObject.json" + }, + "parameters": { + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/3.0.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/3.0.0/operation.json" + }, + "subscribe": { + "$ref": "http://asyncapi.com/definitions/3.0.0/operation.json" + }, + "deprecated": { + "type": "boolean", + "default": false + }, + "bindings": { + "$ref": "http://asyncapi.com/definitions/3.0.0/bindingsObject.json" + } + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/3.0.0/channelItem.json" +} \ No newline at end of file diff --git a/definitions/3.0.0/channels.json b/definitions/3.0.0/channels.json new file mode 100644 index 00000000..e1c540d6 --- /dev/null +++ b/definitions/3.0.0/channels.json @@ -0,0 +1,13 @@ +{ + "type": "object", + "propertyNames": { + "type": "string", + "format": "uri-template", + "minLength": 1 + }, + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/3.0.0/channelItem.json" + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/3.0.0/channels.json" +} \ No newline at end of file diff --git a/definitions/3.0.0/components.json b/definitions/3.0.0/components.json new file mode 100644 index 00000000..3e673074 --- /dev/null +++ b/definitions/3.0.0/components.json @@ -0,0 +1,98 @@ +{ + "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/3.0.0/specificationExtension.json" + } + }, + "properties": { + "schemas": { + "$ref": "http://asyncapi.com/definitions/3.0.0/schemas.json" + }, + "servers": { + "$ref": "http://asyncapi.com/definitions/3.0.0/servers.json" + }, + "channels": { + "$ref": "http://asyncapi.com/definitions/3.0.0/channels.json" + }, + "serverVariables": { + "$ref": "http://asyncapi.com/definitions/3.0.0/serverVariables.json" + }, + "messages": { + "$ref": "http://asyncapi.com/definitions/3.0.0/messages.json" + }, + "securitySchemes": { + "type": "object", + "patternProperties": { + "^[\\w\\d\\.\\-_]+$": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/SecurityScheme.json" + } + ] + } + } + }, + "parameters": { + "$ref": "http://asyncapi.com/definitions/3.0.0/parameters.json" + }, + "correlationIds": { + "type": "object", + "patternProperties": { + "^[\\w\\d\\.\\-_]+$": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/correlationId.json" + } + ] + } + } + }, + "operationTraits": { + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/3.0.0/operationTrait.json" + } + }, + "messageTraits": { + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/3.0.0/messageTrait.json" + } + }, + "serverBindings": { + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/3.0.0/bindingsObject.json" + } + }, + "channelBindings": { + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/3.0.0/bindingsObject.json" + } + }, + "operationBindings": { + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/3.0.0/bindingsObject.json" + } + }, + "messageBindings": { + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/3.0.0/bindingsObject.json" + } + } + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/3.0.0/components.json" +} \ No newline at end of file diff --git a/definitions/3.0.0/contact.json b/definitions/3.0.0/contact.json new file mode 100644 index 00000000..ec226020 --- /dev/null +++ b/definitions/3.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/3.0.0/specificationExtension.json" + } + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/3.0.0/contact.json" +} \ No newline at end of file diff --git a/definitions/3.0.0/correlationId.json b/definitions/3.0.0/correlationId.json new file mode 100644 index 00000000..03d0a514 --- /dev/null +++ b/definitions/3.0.0/correlationId.json @@ -0,0 +1,25 @@ +{ + "type": "object", + "required": [ + "location" + ], + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "properties": { + "description": { + "type": "string", + "description": "A optional description of the correlation ID. GitHub Flavored Markdown is allowed." + }, + "location": { + "type": "string", + "description": "A runtime expression that specifies the location of the correlation ID", + "pattern": "^\\$message\\.(header|payload)#(\\/(([^\\/~])|(~[01]))*)*" + } + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/3.0.0/correlationId.json" +} \ No newline at end of file diff --git a/definitions/3.0.0/external.json b/definitions/3.0.0/external.json new file mode 100644 index 00000000..c8aa2109 --- /dev/null +++ b/definitions/3.0.0/external.json @@ -0,0 +1,5 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/3.0.0/http://something.example.com/schemas/external.json", + "type": "string" + } \ No newline at end of file diff --git a/definitions/3.0.0/externalDocs.json b/definitions/3.0.0/externalDocs.json new file mode 100644 index 00000000..0a20754f --- /dev/null +++ b/definitions/3.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/3.0.0/specificationExtension.json" + } + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/3.0.0/externalDocs.json" +} \ No newline at end of file diff --git a/definitions/3.0.0/info.json b/definitions/3.0.0/info.json new file mode 100644 index 00000000..1cfc1ee8 --- /dev/null +++ b/definitions/3.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/3.0.0/specificationExtension.json" + } + }, + "properties": { + "title": { + "type": "string", + "description": "A unique and precise title of the API." + }, + "version": { + "type": "string", + "description": "A semantic version number of the API." + }, + "description": { + "type": "string", + "description": "A longer description of the API. Should be different from the title. CommonMark is allowed." + }, + "termsOfService": { + "type": "string", + "description": "A URL to the Terms of Service for the API. MUST be in the format of a URL.", + "format": "uri" + }, + "contact": { + "$ref": "http://asyncapi.com/definitions/3.0.0/contact.json" + }, + "license": { + "$ref": "http://asyncapi.com/definitions/3.0.0/license.json" + } + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/3.0.0/info.json" +} \ No newline at end of file diff --git a/definitions/3.0.0/license.json b/definitions/3.0.0/license.json new file mode 100644 index 00000000..391692c9 --- /dev/null +++ b/definitions/3.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/3.0.0/specificationExtension.json" + } + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/3.0.0/license.json" +} \ No newline at end of file diff --git a/definitions/3.0.0/message.json b/definitions/3.0.0/message.json new file mode 100644 index 00000000..ae67c0fc --- /dev/null +++ b/definitions/3.0.0/message.json @@ -0,0 +1,171 @@ +{ + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "oneOf": [ + { + "type": "object", + "required": [ + "oneOf" + ], + "additionalProperties": false, + "properties": { + "oneOf": { + "type": "array", + "items": { + "$ref": "http://asyncapi.com/definitions/3.0.0/message.json" + } + } + } + }, + { + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "properties": { + "schemaFormat": { + "type": "string" + }, + "contentType": { + "type": "string" + }, + "headers": { + "allOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" + }, + { + "properties": { + "type": { + "const": "object" + } + } + } + ] + }, + "messageId": { + "type": "string" + }, + "payload": {}, + "correlationId": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/correlationId.json" + } + ] + }, + "tags": { + "type": "array", + "items": { + "$ref": "http://asyncapi.com/definitions/3.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/3.0.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/3.0.0/bindingsObject.json" + }, + "traits": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/messageTrait.json" + }, + { + "type": "array", + "items": [ + { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/messageTrait.json" + } + ] + }, + { + "type": "object", + "additionalItems": true + } + ] + } + ] + } + } + } + } + ] + } + ], + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/3.0.0/message.json" +} \ No newline at end of file diff --git a/definitions/3.0.0/messageTrait.json b/definitions/3.0.0/messageTrait.json new file mode 100644 index 00000000..9adb00fd --- /dev/null +++ b/definitions/3.0.0/messageTrait.json @@ -0,0 +1,85 @@ +{ + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "properties": { + "schemaFormat": { + "type": "string" + }, + "contentType": { + "type": "string" + }, + "headers": { + "allOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" + }, + { + "properties": { + "type": { + "const": "object" + } + } + } + ] + }, + "messageId": { + "type": "string" + }, + "correlationId": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/correlationId.json" + } + ] + }, + "tags": { + "type": "array", + "items": { + "$ref": "http://asyncapi.com/definitions/3.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/3.0.0/externalDocs.json" + }, + "deprecated": { + "type": "boolean", + "default": false + }, + "examples": { + "type": "array", + "items": { + "type": "object" + } + }, + "bindings": { + "$ref": "http://asyncapi.com/definitions/3.0.0/bindingsObject.json" + } + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/3.0.0/messageTrait.json" +} \ No newline at end of file diff --git a/definitions/3.0.0/messages.json b/definitions/3.0.0/messages.json new file mode 100644 index 00000000..a57453e0 --- /dev/null +++ b/definitions/3.0.0/messages.json @@ -0,0 +1,9 @@ +{ + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/3.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/3.0.0/messages.json" +} \ No newline at end of file diff --git a/definitions/3.0.0/oauth2Flow.json b/definitions/3.0.0/oauth2Flow.json new file mode 100644 index 00000000..f5a9e447 --- /dev/null +++ b/definitions/3.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/3.0.0/oauth2Scopes.json" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/3.0.0/oauth2Flow.json" +} \ No newline at end of file diff --git a/definitions/3.0.0/oauth2Flows.json b/definitions/3.0.0/oauth2Flows.json new file mode 100644 index 00000000..bb895f28 --- /dev/null +++ b/definitions/3.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/3.0.0/oauth2Flow.json" + }, + { + "required": [ + "authorizationUrl", + "scopes" + ] + }, + { + "not": { + "required": [ + "tokenUrl" + ] + } + } + ] + }, + "password": { + "allOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/oauth2Flow.json" + }, + { + "required": [ + "tokenUrl", + "scopes" + ] + }, + { + "not": { + "required": [ + "authorizationUrl" + ] + } + } + ] + }, + "clientCredentials": { + "allOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/oauth2Flow.json" + }, + { + "required": [ + "tokenUrl", + "scopes" + ] + }, + { + "not": { + "required": [ + "authorizationUrl" + ] + } + } + ] + }, + "authorizationCode": { + "allOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/oauth2Flow.json" + }, + { + "required": [ + "authorizationUrl", + "tokenUrl", + "scopes" + ] + } + ] + } + }, + "additionalProperties": false + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/3.0.0/oauth2Flows.json" +} \ No newline at end of file diff --git a/definitions/3.0.0/oauth2Scopes.json b/definitions/3.0.0/oauth2Scopes.json new file mode 100644 index 00000000..4e26a71e --- /dev/null +++ b/definitions/3.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/3.0.0/oauth2Scopes.json" +} \ No newline at end of file diff --git a/definitions/3.0.0/openIdConnect.json b/definitions/3.0.0/openIdConnect.json new file mode 100644 index 00000000..4d034031 --- /dev/null +++ b/definitions/3.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/3.0.0/specificationExtension.json" + } + }, + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/3.0.0/openIdConnect.json" +} \ No newline at end of file diff --git a/definitions/3.0.0/operation.json b/definitions/3.0.0/operation.json new file mode 100644 index 00000000..89f058d4 --- /dev/null +++ b/definitions/3.0.0/operation.json @@ -0,0 +1,76 @@ +{ + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "properties": { + "traits": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/operationTrait.json" + }, + { + "type": "array", + "items": [ + { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/operationTrait.json" + } + ] + }, + { + "type": "object", + "additionalItems": true + } + ] + } + ] + } + }, + "summary": { + "type": "string" + }, + "description": { + "type": "string" + }, + "security": { + "type": "array", + "items": { + "$ref": "http://asyncapi.com/definitions/3.0.0/SecurityRequirement.json" + } + }, + "tags": { + "type": "array", + "items": { + "$ref": "http://asyncapi.com/definitions/3.0.0/tag.json" + }, + "uniqueItems": true + }, + "externalDocs": { + "$ref": "http://asyncapi.com/definitions/3.0.0/externalDocs.json" + }, + "operationId": { + "type": "string" + }, + "bindings": { + "$ref": "http://asyncapi.com/definitions/3.0.0/bindingsObject.json" + }, + "message": { + "$ref": "http://asyncapi.com/definitions/3.0.0/message.json" + } + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/3.0.0/operation.json" +} \ No newline at end of file diff --git a/definitions/3.0.0/operationTrait.json b/definitions/3.0.0/operationTrait.json new file mode 100644 index 00000000..b30f9aaa --- /dev/null +++ b/definitions/3.0.0/operationTrait.json @@ -0,0 +1,41 @@ +{ + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "properties": { + "summary": { + "type": "string" + }, + "description": { + "type": "string" + }, + "tags": { + "type": "array", + "items": { + "$ref": "http://asyncapi.com/definitions/3.0.0/tag.json" + }, + "uniqueItems": true + }, + "externalDocs": { + "$ref": "http://asyncapi.com/definitions/3.0.0/externalDocs.json" + }, + "operationId": { + "type": "string" + }, + "security": { + "type": "array", + "items": { + "$ref": "http://asyncapi.com/definitions/3.0.0/SecurityRequirement.json" + } + }, + "bindings": { + "$ref": "http://asyncapi.com/definitions/3.0.0/bindingsObject.json" + } + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/3.0.0/operationTrait.json" +} \ No newline at end of file diff --git a/definitions/3.0.0/parameter.json b/definitions/3.0.0/parameter.json new file mode 100644 index 00000000..f6c81ddd --- /dev/null +++ b/definitions/3.0.0/parameter.json @@ -0,0 +1,27 @@ +{ + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.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/3.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/3.0.0/ReferenceObject.json" + } + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/3.0.0/parameter.json" +} \ No newline at end of file diff --git a/definitions/3.0.0/parameters.json b/definitions/3.0.0/parameters.json new file mode 100644 index 00000000..8bb0178b --- /dev/null +++ b/definitions/3.0.0/parameters.json @@ -0,0 +1,9 @@ +{ + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/3.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/3.0.0/parameters.json" +} \ No newline at end of file diff --git a/definitions/3.0.0/schema.json b/definitions/3.0.0/schema.json new file mode 100644 index 00000000..c5770a09 --- /dev/null +++ b/definitions/3.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/3.0.0/specificationExtension.json" + } + }, + "properties": { + "additionalProperties": { + "anyOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" + }, + { + "type": "boolean" + } + ], + "default": {} + }, + "items": { + "anyOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" + }, + { + "type": "array", + "minItems": 1, + "items": { + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" + } + } + ], + "default": {} + }, + "allOf": { + "type": "array", + "minItems": 1, + "items": { + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" + } + }, + "oneOf": { + "type": "array", + "minItems": 1, + "items": { + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" + } + }, + "anyOf": { + "type": "array", + "minItems": 1, + "items": { + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" + } + }, + "not": { + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" + }, + "properties": { + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" + }, + "default": {} + }, + "patternProperties": { + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" + }, + "default": {} + }, + "propertyNames": { + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" + }, + "contains": { + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" + }, + "discriminator": { + "type": "string" + }, + "externalDocs": { + "$ref": "http://asyncapi.com/definitions/3.0.0/externalDocs.json" + }, + "deprecated": { + "type": "boolean", + "default": false + } + } + } + ], + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/3.0.0/schema.json" +} \ No newline at end of file diff --git a/definitions/3.0.0/schemas.json b/definitions/3.0.0/schemas.json new file mode 100644 index 00000000..fdbe4a81 --- /dev/null +++ b/definitions/3.0.0/schemas.json @@ -0,0 +1,9 @@ +{ + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/3.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/3.0.0/schemas.json" +} \ No newline at end of file diff --git a/definitions/3.0.0/server.json b/definitions/3.0.0/server.json new file mode 100644 index 00000000..31f04069 --- /dev/null +++ b/definitions/3.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/3.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/3.0.0/serverVariables.json" + }, + "security": { + "type": "array", + "items": { + "$ref": "http://asyncapi.com/definitions/3.0.0/SecurityRequirement.json" + } + }, + "bindings": { + "$ref": "http://asyncapi.com/definitions/3.0.0/bindingsObject.json" + } + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/3.0.0/server.json" +} \ No newline at end of file diff --git a/definitions/3.0.0/serverVariable.json b/definitions/3.0.0/serverVariable.json new file mode 100644 index 00000000..9ef8f966 --- /dev/null +++ b/definitions/3.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/3.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/3.0.0/serverVariable.json" +} \ No newline at end of file diff --git a/definitions/3.0.0/serverVariables.json b/definitions/3.0.0/serverVariables.json new file mode 100644 index 00000000..d4946d79 --- /dev/null +++ b/definitions/3.0.0/serverVariables.json @@ -0,0 +1,8 @@ +{ + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/3.0.0/serverVariable.json" + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/3.0.0/serverVariables.json" +} \ No newline at end of file diff --git a/definitions/3.0.0/servers.json b/definitions/3.0.0/servers.json new file mode 100644 index 00000000..921b4ed4 --- /dev/null +++ b/definitions/3.0.0/servers.json @@ -0,0 +1,16 @@ +{ + "description": "An object representing multiple servers.", + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/server.json" + } + ] + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/3.0.0/servers.json" +} \ No newline at end of file diff --git a/definitions/3.0.0/specificationExtension.json b/definitions/3.0.0/specificationExtension.json new file mode 100644 index 00000000..37c426a1 --- /dev/null +++ b/definitions/3.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/3.0.0/specificationExtension.json" +} \ No newline at end of file diff --git a/definitions/3.0.0/symmetricEncryption.json b/definitions/3.0.0/symmetricEncryption.json new file mode 100644 index 00000000..4fb69278 --- /dev/null +++ b/definitions/3.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/3.0.0/specificationExtension.json" + } + }, + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/3.0.0/symmetricEncryption.json" +} \ No newline at end of file diff --git a/definitions/3.0.0/tag.json b/definitions/3.0.0/tag.json new file mode 100644 index 00000000..32d3413b --- /dev/null +++ b/definitions/3.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/3.0.0/externalDocs.json" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/3.0.0/tag.json" +} \ No newline at end of file diff --git a/definitions/3.0.0/userPassword.json b/definitions/3.0.0/userPassword.json new file mode 100644 index 00000000..aeaa22d0 --- /dev/null +++ b/definitions/3.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/3.0.0/specificationExtension.json" + } + }, + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/3.0.0/userPassword.json" +} \ No newline at end of file diff --git a/index.js b/index.js index 6a4f5e66..5293dab3 100644 --- a/index.js +++ b/index.js @@ -9,4 +9,5 @@ module.exports = { '2.2.0': require('./schemas/2.2.0.json'), '2.3.0': require('./schemas/2.3.0.json'), '2.4.0': require('./schemas/2.4.0.json'), + '3.0.0': require('./schemas/3.0.0.json'), }; diff --git a/schemas/3.0.0.json b/schemas/3.0.0.json new file mode 100644 index 00000000..6466df19 --- /dev/null +++ b/schemas/3.0.0.json @@ -0,0 +1,1827 @@ +{ + "$id": "http://asyncapi.com/definitions/3.0.0/asyncapi.json", + "$schema": "http://json-schema.org/draft-07/schema", + "title": "AsyncAPI 3.0.0 schema.", + "type": "object", + "required": [ + "asyncapi", + "info", + "channels" + ], + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "properties": { + "asyncapi": { + "type": "string", + "enum": [ + "3.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/3.0.0/info.json" + }, + "servers": { + "$ref": "http://asyncapi.com/definitions/3.0.0/servers.json" + }, + "defaultContentType": { + "type": "string" + }, + "channels": { + "$ref": "http://asyncapi.com/definitions/3.0.0/channels.json" + }, + "components": { + "$ref": "http://asyncapi.com/definitions/3.0.0/components.json" + }, + "tags": { + "type": "array", + "items": { + "$ref": "http://asyncapi.com/definitions/3.0.0/tag.json" + }, + "uniqueItems": true + }, + "externalDocs": { + "$ref": "http://asyncapi.com/definitions/3.0.0/externalDocs.json" + } + }, + "definitions": { + "http://asyncapi.com/definitions/3.0.0/specificationExtension.json": { + "$id": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json", + "description": "Any property starting with x- is valid.", + "additionalProperties": true, + "additionalItems": true + }, + "http://asyncapi.com/definitions/3.0.0/info.json": { + "$id": "http://asyncapi.com/definitions/3.0.0/info.json", + "type": "object", + "description": "General information about the API.", + "required": [ + "version", + "title" + ], + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "properties": { + "title": { + "type": "string", + "description": "A unique and precise title of the API." + }, + "version": { + "type": "string", + "description": "A semantic version number of the API." + }, + "description": { + "type": "string", + "description": "A longer description of the API. Should be different from the title. CommonMark is allowed." + }, + "termsOfService": { + "type": "string", + "description": "A URL to the Terms of Service for the API. MUST be in the format of a URL.", + "format": "uri" + }, + "contact": { + "$ref": "http://asyncapi.com/definitions/3.0.0/contact.json" + }, + "license": { + "$ref": "http://asyncapi.com/definitions/3.0.0/license.json" + } + } + }, + "http://asyncapi.com/definitions/3.0.0/contact.json": { + "$id": "http://asyncapi.com/definitions/3.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-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + } + }, + "http://asyncapi.com/definitions/3.0.0/license.json": { + "$id": "http://asyncapi.com/definitions/3.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-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + } + }, + "http://asyncapi.com/definitions/3.0.0/servers.json": { + "$id": "http://asyncapi.com/definitions/3.0.0/servers.json", + "description": "An object representing multiple servers.", + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/server.json" + } + ] + } + }, + "http://asyncapi.com/definitions/3.0.0/Reference.json": { + "$id": "http://asyncapi.com/definitions/3.0.0/Reference.json", + "type": "object", + "required": [ + "$ref" + ], + "properties": { + "$ref": { + "$ref": "http://asyncapi.com/definitions/3.0.0/ReferenceObject.json" + } + } + }, + "http://asyncapi.com/definitions/3.0.0/ReferenceObject.json": { + "$id": "http://asyncapi.com/definitions/3.0.0/ReferenceObject.json", + "type": "string", + "format": "uri-reference" + }, + "http://asyncapi.com/definitions/3.0.0/server.json": { + "$id": "http://asyncapi.com/definitions/3.0.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/3.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/3.0.0/serverVariables.json" + }, + "security": { + "type": "array", + "items": { + "$ref": "http://asyncapi.com/definitions/3.0.0/SecurityRequirement.json" + } + }, + "bindings": { + "$ref": "http://asyncapi.com/definitions/3.0.0/bindingsObject.json" + } + } + }, + "http://asyncapi.com/definitions/3.0.0/serverVariables.json": { + "$id": "http://asyncapi.com/definitions/3.0.0/serverVariables.json", + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/3.0.0/serverVariable.json" + } + }, + "http://asyncapi.com/definitions/3.0.0/serverVariable.json": { + "$id": "http://asyncapi.com/definitions/3.0.0/serverVariable.json", + "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/3.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" + } + } + } + }, + "http://asyncapi.com/definitions/3.0.0/SecurityRequirement.json": { + "$id": "http://asyncapi.com/definitions/3.0.0/SecurityRequirement.json", + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + } + }, + "http://asyncapi.com/definitions/3.0.0/bindingsObject.json": { + "$id": "http://asyncapi.com/definitions/3.0.0/bindingsObject.json", + "type": "object", + "additionalProperties": true, + "properties": { + "http": {}, + "ws": {}, + "amqp": {}, + "amqp1": {}, + "mqtt": {}, + "mqtt5": {}, + "kafka": {}, + "anypointmq": {}, + "nats": {}, + "jms": {}, + "sns": {}, + "sqs": {}, + "stomp": {}, + "redis": {}, + "ibmmq": {}, + "solace": {} + } + }, + "http://asyncapi.com/definitions/3.0.0/channels.json": { + "$id": "http://asyncapi.com/definitions/3.0.0/channels.json", + "type": "object", + "propertyNames": { + "type": "string", + "format": "uri-template", + "minLength": 1 + }, + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/3.0.0/channelItem.json" + } + }, + "http://asyncapi.com/definitions/3.0.0/channelItem.json": { + "$id": "http://asyncapi.com/definitions/3.0.0/channelItem.json", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "properties": { + "$ref": { + "$ref": "http://asyncapi.com/definitions/3.0.0/ReferenceObject.json" + }, + "parameters": { + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/3.0.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/3.0.0/operation.json" + }, + "subscribe": { + "$ref": "http://asyncapi.com/definitions/3.0.0/operation.json" + }, + "deprecated": { + "type": "boolean", + "default": false + }, + "bindings": { + "$ref": "http://asyncapi.com/definitions/3.0.0/bindingsObject.json" + } + } + }, + "http://asyncapi.com/definitions/3.0.0/parameter.json": { + "$id": "http://asyncapi.com/definitions/3.0.0/parameter.json", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.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/3.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/3.0.0/ReferenceObject.json" + } + } + }, + "http://asyncapi.com/definitions/3.0.0/schema.json": { + "$id": "http://asyncapi.com/definitions/3.0.0/schema.json", + "allOf": [ + { + "$ref": "http://json-schema.org/draft-07/schema#" + }, + { + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "properties": { + "additionalProperties": { + "anyOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" + }, + { + "type": "boolean" + } + ], + "default": {} + }, + "items": { + "anyOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" + }, + { + "type": "array", + "minItems": 1, + "items": { + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" + } + } + ], + "default": {} + }, + "allOf": { + "type": "array", + "minItems": 1, + "items": { + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" + } + }, + "oneOf": { + "type": "array", + "minItems": 1, + "items": { + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" + } + }, + "anyOf": { + "type": "array", + "minItems": 1, + "items": { + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" + } + }, + "not": { + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" + }, + "properties": { + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" + }, + "default": {} + }, + "patternProperties": { + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" + }, + "default": {} + }, + "propertyNames": { + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" + }, + "contains": { + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" + }, + "discriminator": { + "type": "string" + }, + "externalDocs": { + "$ref": "http://asyncapi.com/definitions/3.0.0/externalDocs.json" + }, + "deprecated": { + "type": "boolean", + "default": false + } + } + } + ] + }, + "http://json-schema.org/draft-07/schema": { + "$id": "http://json-schema.org/draft-07/schema", + "title": "Core schema meta-schema", + "definitions": { + "schemaArray": { + "type": "array", + "minItems": 1, + "items": { + "$ref": "#" + } + }, + "nonNegativeInteger": { + "type": "integer", + "minimum": 0 + }, + "nonNegativeIntegerDefault0": { + "allOf": [ + { + "$ref": "#/definitions/nonNegativeInteger" + }, + { + "default": 0 + } + ] + }, + "simpleTypes": { + "enum": [ + "array", + "boolean", + "integer", + "null", + "number", + "object", + "string" + ] + }, + "stringArray": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true, + "default": [] + } + }, + "type": [ + "object", + "boolean" + ], + "properties": { + "$id": { + "type": "string", + "format": "uri-reference" + }, + "$schema": { + "type": "string", + "format": "uri" + }, + "$ref": { + "type": "string", + "format": "uri-reference" + }, + "$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/3.0.0/externalDocs.json": { + "$id": "http://asyncapi.com/definitions/3.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/3.0.0/specificationExtension.json" + } + } + }, + "http://asyncapi.com/definitions/3.0.0/operation.json": { + "$id": "http://asyncapi.com/definitions/3.0.0/operation.json", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "properties": { + "traits": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/operationTrait.json" + }, + { + "type": "array", + "items": [ + { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/operationTrait.json" + } + ] + }, + { + "type": "object", + "additionalItems": true + } + ] + } + ] + } + }, + "summary": { + "type": "string" + }, + "description": { + "type": "string" + }, + "security": { + "type": "array", + "items": { + "$ref": "http://asyncapi.com/definitions/3.0.0/SecurityRequirement.json" + } + }, + "tags": { + "type": "array", + "items": { + "$ref": "http://asyncapi.com/definitions/3.0.0/tag.json" + }, + "uniqueItems": true + }, + "externalDocs": { + "$ref": "http://asyncapi.com/definitions/3.0.0/externalDocs.json" + }, + "operationId": { + "type": "string" + }, + "bindings": { + "$ref": "http://asyncapi.com/definitions/3.0.0/bindingsObject.json" + }, + "message": { + "$ref": "http://asyncapi.com/definitions/3.0.0/message.json" + } + } + }, + "http://asyncapi.com/definitions/3.0.0/operationTrait.json": { + "$id": "http://asyncapi.com/definitions/3.0.0/operationTrait.json", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "properties": { + "summary": { + "type": "string" + }, + "description": { + "type": "string" + }, + "tags": { + "type": "array", + "items": { + "$ref": "http://asyncapi.com/definitions/3.0.0/tag.json" + }, + "uniqueItems": true + }, + "externalDocs": { + "$ref": "http://asyncapi.com/definitions/3.0.0/externalDocs.json" + }, + "operationId": { + "type": "string" + }, + "security": { + "type": "array", + "items": { + "$ref": "http://asyncapi.com/definitions/3.0.0/SecurityRequirement.json" + } + }, + "bindings": { + "$ref": "http://asyncapi.com/definitions/3.0.0/bindingsObject.json" + } + } + }, + "http://asyncapi.com/definitions/3.0.0/tag.json": { + "$id": "http://asyncapi.com/definitions/3.0.0/tag.json", + "type": "object", + "additionalProperties": false, + "required": [ + "name" + ], + "properties": { + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "externalDocs": { + "$ref": "http://asyncapi.com/definitions/3.0.0/externalDocs.json" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + } + }, + "http://asyncapi.com/definitions/3.0.0/message.json": { + "$id": "http://asyncapi.com/definitions/3.0.0/message.json", + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "oneOf": [ + { + "type": "object", + "required": [ + "oneOf" + ], + "additionalProperties": false, + "properties": { + "oneOf": { + "type": "array", + "items": { + "$ref": "http://asyncapi.com/definitions/3.0.0/message.json" + } + } + } + }, + { + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "properties": { + "schemaFormat": { + "type": "string" + }, + "contentType": { + "type": "string" + }, + "headers": { + "allOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" + }, + { + "properties": { + "type": { + "const": "object" + } + } + } + ] + }, + "messageId": { + "type": "string" + }, + "payload": {}, + "correlationId": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/correlationId.json" + } + ] + }, + "tags": { + "type": "array", + "items": { + "$ref": "http://asyncapi.com/definitions/3.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/3.0.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/3.0.0/bindingsObject.json" + }, + "traits": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/messageTrait.json" + }, + { + "type": "array", + "items": [ + { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/messageTrait.json" + } + ] + }, + { + "type": "object", + "additionalItems": true + } + ] + } + ] + } + } + } + } + ] + } + ] + }, + "http://asyncapi.com/definitions/3.0.0/correlationId.json": { + "$id": "http://asyncapi.com/definitions/3.0.0/correlationId.json", + "type": "object", + "required": [ + "location" + ], + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "properties": { + "description": { + "type": "string", + "description": "A optional description of the correlation ID. GitHub Flavored Markdown is allowed." + }, + "location": { + "type": "string", + "description": "A runtime expression that specifies the location of the correlation ID", + "pattern": "^\\$message\\.(header|payload)#(\\/(([^\\/~])|(~[01]))*)*" + } + } + }, + "http://asyncapi.com/definitions/3.0.0/messageTrait.json": { + "$id": "http://asyncapi.com/definitions/3.0.0/messageTrait.json", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "properties": { + "schemaFormat": { + "type": "string" + }, + "contentType": { + "type": "string" + }, + "headers": { + "allOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" + }, + { + "properties": { + "type": { + "const": "object" + } + } + } + ] + }, + "messageId": { + "type": "string" + }, + "correlationId": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/correlationId.json" + } + ] + }, + "tags": { + "type": "array", + "items": { + "$ref": "http://asyncapi.com/definitions/3.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/3.0.0/externalDocs.json" + }, + "deprecated": { + "type": "boolean", + "default": false + }, + "examples": { + "type": "array", + "items": { + "type": "object" + } + }, + "bindings": { + "$ref": "http://asyncapi.com/definitions/3.0.0/bindingsObject.json" + } + } + }, + "http://asyncapi.com/definitions/3.0.0/components.json": { + "$id": "http://asyncapi.com/definitions/3.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/3.0.0/specificationExtension.json" + } + }, + "properties": { + "schemas": { + "$ref": "http://asyncapi.com/definitions/3.0.0/schemas.json" + }, + "servers": { + "$ref": "http://asyncapi.com/definitions/3.0.0/servers.json" + }, + "channels": { + "$ref": "http://asyncapi.com/definitions/3.0.0/channels.json" + }, + "serverVariables": { + "$ref": "http://asyncapi.com/definitions/3.0.0/serverVariables.json" + }, + "messages": { + "$ref": "http://asyncapi.com/definitions/3.0.0/messages.json" + }, + "securitySchemes": { + "type": "object", + "patternProperties": { + "^[\\w\\d\\.\\-_]+$": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/SecurityScheme.json" + } + ] + } + } + }, + "parameters": { + "$ref": "http://asyncapi.com/definitions/3.0.0/parameters.json" + }, + "correlationIds": { + "type": "object", + "patternProperties": { + "^[\\w\\d\\.\\-_]+$": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/correlationId.json" + } + ] + } + } + }, + "operationTraits": { + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/3.0.0/operationTrait.json" + } + }, + "messageTraits": { + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/3.0.0/messageTrait.json" + } + }, + "serverBindings": { + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/3.0.0/bindingsObject.json" + } + }, + "channelBindings": { + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/3.0.0/bindingsObject.json" + } + }, + "operationBindings": { + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/3.0.0/bindingsObject.json" + } + }, + "messageBindings": { + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/3.0.0/bindingsObject.json" + } + } + } + }, + "http://asyncapi.com/definitions/3.0.0/schemas.json": { + "$id": "http://asyncapi.com/definitions/3.0.0/schemas.json", + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" + }, + "description": "JSON objects describing schemas the API uses." + }, + "http://asyncapi.com/definitions/3.0.0/messages.json": { + "$id": "http://asyncapi.com/definitions/3.0.0/messages.json", + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/3.0.0/message.json" + }, + "description": "JSON objects describing the messages being consumed and produced by the API." + }, + "http://asyncapi.com/definitions/3.0.0/SecurityScheme.json": { + "$id": "http://asyncapi.com/definitions/3.0.0/SecurityScheme.json", + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/userPassword.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/apiKey.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/X509.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/symmetricEncryption.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/asymmetricEncryption.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/HTTPSecurityScheme.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/oauth2Flows.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/openIdConnect.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/SaslSecurityScheme.json" + } + ] + }, + "http://asyncapi.com/definitions/3.0.0/userPassword.json": { + "$id": "http://asyncapi.com/definitions/3.0.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/3.0.0/specificationExtension.json" + } + }, + "additionalProperties": false + }, + "http://asyncapi.com/definitions/3.0.0/apiKey.json": { + "$id": "http://asyncapi.com/definitions/3.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/3.0.0/specificationExtension.json" + } + }, + "additionalProperties": false + }, + "http://asyncapi.com/definitions/3.0.0/X509.json": { + "$id": "http://asyncapi.com/definitions/3.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/3.0.0/specificationExtension.json" + } + }, + "additionalProperties": false + }, + "http://asyncapi.com/definitions/3.0.0/symmetricEncryption.json": { + "$id": "http://asyncapi.com/definitions/3.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/3.0.0/specificationExtension.json" + } + }, + "additionalProperties": false + }, + "http://asyncapi.com/definitions/3.0.0/asymmetricEncryption.json": { + "$id": "http://asyncapi.com/definitions/3.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/3.0.0/specificationExtension.json" + } + }, + "additionalProperties": false + }, + "http://asyncapi.com/definitions/3.0.0/HTTPSecurityScheme.json": { + "$id": "http://asyncapi.com/definitions/3.0.0/HTTPSecurityScheme.json", + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/NonBearerHTTPSecurityScheme.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/BearerHTTPSecurityScheme.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/APIKeyHTTPSecurityScheme.json" + } + ] + }, + "http://asyncapi.com/definitions/3.0.0/NonBearerHTTPSecurityScheme.json": { + "$id": "http://asyncapi.com/definitions/3.0.0/NonBearerHTTPSecurityScheme.json", + "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/3.0.0/specificationExtension.json" + } + }, + "additionalProperties": false + }, + "http://asyncapi.com/definitions/3.0.0/BearerHTTPSecurityScheme.json": { + "$id": "http://asyncapi.com/definitions/3.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-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "additionalProperties": false + }, + "http://asyncapi.com/definitions/3.0.0/APIKeyHTTPSecurityScheme.json": { + "$id": "http://asyncapi.com/definitions/3.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/3.0.0/specificationExtension.json" + } + }, + "additionalProperties": false + }, + "http://asyncapi.com/definitions/3.0.0/oauth2Flows.json": { + "$id": "http://asyncapi.com/definitions/3.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/3.0.0/oauth2Flow.json" + }, + { + "required": [ + "authorizationUrl", + "scopes" + ] + }, + { + "not": { + "required": [ + "tokenUrl" + ] + } + } + ] + }, + "password": { + "allOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/oauth2Flow.json" + }, + { + "required": [ + "tokenUrl", + "scopes" + ] + }, + { + "not": { + "required": [ + "authorizationUrl" + ] + } + } + ] + }, + "clientCredentials": { + "allOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/oauth2Flow.json" + }, + { + "required": [ + "tokenUrl", + "scopes" + ] + }, + { + "not": { + "required": [ + "authorizationUrl" + ] + } + } + ] + }, + "authorizationCode": { + "allOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/oauth2Flow.json" + }, + { + "required": [ + "authorizationUrl", + "tokenUrl", + "scopes" + ] + } + ] + } + }, + "additionalProperties": false + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + } + }, + "http://asyncapi.com/definitions/3.0.0/oauth2Flow.json": { + "$id": "http://asyncapi.com/definitions/3.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/3.0.0/oauth2Scopes.json" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "additionalProperties": false + }, + "http://asyncapi.com/definitions/3.0.0/oauth2Scopes.json": { + "$id": "http://asyncapi.com/definitions/3.0.0/oauth2Scopes.json", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "http://asyncapi.com/definitions/3.0.0/openIdConnect.json": { + "$id": "http://asyncapi.com/definitions/3.0.0/openIdConnect.json", + "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/3.0.0/specificationExtension.json" + } + }, + "additionalProperties": false + }, + "http://asyncapi.com/definitions/3.0.0/SaslSecurityScheme.json": { + "$id": "http://asyncapi.com/definitions/3.0.0/SaslSecurityScheme.json", + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/SaslPlainSecurityScheme.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/SaslScramSecurityScheme.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/SaslGssapiSecurityScheme.json" + } + ] + }, + "http://asyncapi.com/definitions/3.0.0/SaslPlainSecurityScheme.json": { + "$id": "http://asyncapi.com/definitions/3.0.0/SaslPlainSecurityScheme.json", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "plain" + ] + }, + "description": { + "type": "string" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "additionalProperties": false + }, + "http://asyncapi.com/definitions/3.0.0/SaslScramSecurityScheme.json": { + "$id": "http://asyncapi.com/definitions/3.0.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/3.0.0/specificationExtension.json" + } + }, + "additionalProperties": false + }, + "http://asyncapi.com/definitions/3.0.0/SaslGssapiSecurityScheme.json": { + "$id": "http://asyncapi.com/definitions/3.0.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/3.0.0/specificationExtension.json" + } + }, + "additionalProperties": false + }, + "http://asyncapi.com/definitions/3.0.0/parameters.json": { + "$id": "http://asyncapi.com/definitions/3.0.0/parameters.json", + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/3.0.0/parameter.json" + }, + "description": "JSON objects describing re-usable channel parameters." + } + }, + "description": "!!Auto generated!! \n Do not manually edit. " +} \ No newline at end of file From 7d396cf7b55ca7dde6e2bb2efd80ccff9cf96905 Mon Sep 17 00:00:00 2001 From: Jonas Lagoni Date: Thu, 9 Jun 2022 05:38:39 +0200 Subject: [PATCH 003/102] feat: add all protocol binding schemas (#225) --- bindings/amqp/channel.json | 137 +++++++++++++++++++++++++++++++ bindings/amqp/message.json | 37 +++++++++ bindings/amqp/operation.json | 89 ++++++++++++++++++++ bindings/amqp1/.keep | 0 bindings/anypointmq/channel.json | 40 +++++++++ bindings/anypointmq/message.json | 40 +++++++++ bindings/http/message.json | 42 ++++++++++ bindings/http/operation.json | 119 +++++++++++++++++++++++++++ bindings/ibmmq/channel.json | 127 ++++++++++++++++++++++++++++ bindings/ibmmq/message.json | 81 ++++++++++++++++++ bindings/ibmmq/server.json | 58 +++++++++++++ bindings/jms/.keep | 0 bindings/kafka/message.json | 42 ++++++++++ bindings/kafka/operation.json | 48 +++++++++++ bindings/mercure/.keep | 0 bindings/mqtt/message.json | 27 ++++++ bindings/mqtt/operation.json | 37 +++++++++ bindings/mqtt/server.json | 72 ++++++++++++++++ bindings/mqtt5/.keep | 0 bindings/nats/operation.json | 33 ++++++++ bindings/redis/.keep | 0 bindings/sns/.keep | 0 bindings/solace/operation.json | 106 ++++++++++++++++++++++++ bindings/solace/server.json | 32 ++++++++ bindings/sqs/.keep | 0 bindings/stomp/.keep | 0 bindings/websockets/channel.json | 44 ++++++++++ 27 files changed, 1211 insertions(+) create mode 100644 bindings/amqp/channel.json create mode 100644 bindings/amqp/message.json create mode 100644 bindings/amqp/operation.json create mode 100644 bindings/amqp1/.keep create mode 100644 bindings/anypointmq/channel.json create mode 100644 bindings/anypointmq/message.json create mode 100644 bindings/http/message.json create mode 100644 bindings/http/operation.json create mode 100644 bindings/ibmmq/channel.json create mode 100644 bindings/ibmmq/message.json create mode 100644 bindings/ibmmq/server.json create mode 100644 bindings/jms/.keep create mode 100644 bindings/kafka/message.json create mode 100644 bindings/kafka/operation.json create mode 100644 bindings/mercure/.keep create mode 100644 bindings/mqtt/message.json create mode 100644 bindings/mqtt/operation.json create mode 100644 bindings/mqtt/server.json create mode 100644 bindings/mqtt5/.keep create mode 100644 bindings/nats/operation.json create mode 100644 bindings/redis/.keep create mode 100644 bindings/sns/.keep create mode 100644 bindings/solace/operation.json create mode 100644 bindings/solace/server.json create mode 100644 bindings/sqs/.keep create mode 100644 bindings/stomp/.keep create mode 100644 bindings/websockets/channel.json diff --git a/bindings/amqp/channel.json b/bindings/amqp/channel.json new file mode 100644 index 00000000..0ef1d292 --- /dev/null +++ b/bindings/amqp/channel.json @@ -0,0 +1,137 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/bindings/amqp/channel.json", + "title": "AMQP channel bindings object", + "description": "This object contains information about the channel representation in AMQP.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\-\\_]+$": { + "$ref": "https://raw.githubusercontent.com/asyncapi/asyncapi-node/v2.7.7/schemas/2.0.0.json#/definitions/specificationExtension" + } + }, + "properties": { + "is": { + "type": "string", + "enum": ["queue", "routingKey"], + "description": "Defines what type of channel is it. Can be either 'queue' or 'routingKey' (default)." + }, + "exchange": { + "type": "object", + "properties": { + "name": { + "type": "string", + "maxLength": 255, + "description": "The name of the exchange. It MUST NOT exceed 255 characters long." + }, + "type": { + "type": "string", + "enum": ["topic", "direct", "fanout", "default", "headers"], + "description": "The type of the exchange. Can be either 'topic', 'direct', 'fanout', 'default' or 'headers'." + }, + "durable": { + "type": "boolean", + "description": "Whether the exchange should survive broker restarts or not." + }, + "autoDelete": { + "type": "boolean", + "description": "Whether the exchange should be deleted when the last queue is unbound from it." + }, + "vhost": { + "type": "string", + "default": "/", + "description": "The virtual host of the exchange. Defaults to '/'." + } + }, + "description": "When is=routingKey, this object defines the exchange properties." + }, + "queue": { + "type": "object", + "properties": { + "name": { + "type": "string", + "maxLength": 255, + "description": "The name of the queue. It MUST NOT exceed 255 characters long." + }, + "durable": { + "type": "boolean", + "description": "Whether the queue should survive broker restarts or not." + }, + "exclusive": { + "type": "boolean", + "description": "Whether the queue should be used only by one connection or not." + }, + "autoDelete": { + "type": "boolean", + "description": "Whether the queue should be deleted when the last consumer unsubscribes." + }, + "vhost": { + "type": "string", + "default": "/", + "description": "The virtual host of the queue. Defaults to '/'." + } + }, + "description": "When is=queue, this object defines the queue properties." + }, + "bindingVersion": { + "type": "string", + "enum": [ + "0.2.0" + ], + "description": "The version of this binding. If omitted, 'latest' MUST be assumed." + } + + }, + "oneOf": [ + { + "properties": { + "is": { "const": "routingKey" } + }, + "required": [ + "exchange" + ], + "not": { + "required": [ + "queue" + ] + } + }, + { + "properties": { + "is": { "const": "queue" } + }, + "required": [ + "queue" + ], + "not": { + "required": [ + "exchange" + ] + } + } + ], + "examples": [ + { + "is": "routingKey", + "exchange": { + "name": "myExchange", + "type": "topic", + "durable": true, + "autoDelete": false, + "vhost": "/" + }, + "bindingVersion": "0.2.0" + }, + { + "is": "queue", + "queue": { + "name": "my-queue-name", + "durable": true, + "exclusive": true, + "autoDelete": false, + "vhost": "/" + }, + "bindingVersion": "0.2.0" + } + ] +} diff --git a/bindings/amqp/message.json b/bindings/amqp/message.json new file mode 100644 index 00000000..5ec49ac6 --- /dev/null +++ b/bindings/amqp/message.json @@ -0,0 +1,37 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/bindings/amqp/message.json", + "title": "AMQP message bindings object", + "description": "This object contains information about the message representation in AMQP.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\-\\_]+$": { + "$ref": "https://raw.githubusercontent.com/asyncapi/asyncapi-node/v2.7.7/schemas/2.0.0.json#/definitions/specificationExtension" + } + }, + "properties": { + "contentEncoding": { + "type": "string", + "description": "A MIME encoding for the message content." + }, + "messageType": { + "type": "string", + "description": "Application-specific message type." + }, + "bindingVersion": { + "type": "string", + "enum": [ + "0.2.0" + ], + "description": "The version of this binding. If omitted, \"latest\" MUST be assumed." + } + }, + "examples": [ + { + "contentEncoding": "gzip", + "messageType": "user.signup", + "bindingVersion": "0.2.0" + } + ] +} diff --git a/bindings/amqp/operation.json b/bindings/amqp/operation.json new file mode 100644 index 00000000..c01cd405 --- /dev/null +++ b/bindings/amqp/operation.json @@ -0,0 +1,89 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/bindings/amqp/operation.json", + "title": "AMQP operation bindings object", + "description": "This object contains information about the operation representation in AMQP.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\-\\_]+$": { + "$ref": "https://raw.githubusercontent.com/asyncapi/asyncapi-node/v2.7.7/schemas/2.0.0.json#/definitions/specificationExtension" + } + }, + "properties": { + "expiration": { + "type": "integer", + "minimum": 0, + "description": "TTL (Time-To-Live) for the message. It MUST be greater than or equal to zero." + }, + "userId": { + "type": "string", + "description": "Identifies the user who has sent the message." + }, + "cc": { + "type": "array", + "items": { + "type": "string" + }, + "description": "The routing keys the message should be routed to at the time of publishing." + }, + "priority": { + "type": "integer", + "description": "A priority for the message." + }, + "deliveryMode": { + "type": "integer", + "enum": [1,2], + "description": "Delivery mode of the message. Its value MUST be either 1 (transient) or 2 (persistent)." + }, + "mandatory": { + "type": "boolean", + "description": "Whether the message is mandatory or not." + }, + "bcc": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Like cc but consumers will not receive this information." + }, + "replyTo": { + "type": "string", + "description": "Name of the queue where the consumer should send the response." + }, + "timestamp": { + "type": "boolean", + "description": "Whether the message should include a timestamp or not." + }, + "ack": { + "type": "boolean", + "description": "Whether the consumer should ack the message or not." + }, + "bindingVersion": { + "type": "string", + "enum": [ + "0.2.0" + ], + "description": "The version of this binding. If omitted, \"latest\" MUST be assumed." + } + }, + "examples": [ + { + "expiration": 100000, + "userId": "guest", + "cc": [ + "user.logs" + ], + "priority": 10, + "deliveryMode": 2, + "mandatory": false, + "bcc": [ + "external.audit" + ], + "replyTo": "user.signedup", + "timestamp": true, + "ack": false, + "bindingVersion": "0.2.0" + } + ] +} diff --git a/bindings/amqp1/.keep b/bindings/amqp1/.keep new file mode 100644 index 00000000..e69de29b diff --git a/bindings/anypointmq/channel.json b/bindings/anypointmq/channel.json new file mode 100644 index 00000000..8a994e38 --- /dev/null +++ b/bindings/anypointmq/channel.json @@ -0,0 +1,40 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/bindings/anypointmq/channel.json", + "title": "Anypoint MQ channel bindings object", + "description": "This object contains configuration for describing an Anypoint MQ exchange, queue, or FIFO queue as an AsyncAPI channel. This objects only contains configuration that can not be provided in the AsyncAPI standard channel object.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\-\\_]+$": { + "$ref": "https://raw.githubusercontent.com/asyncapi/asyncapi-node/v2.7.7/schemas/2.0.0.json#/definitions/specificationExtension" + } + }, + "properties": { + "destination": { + "type": "string", + "description": "The destination (queue or exchange) name for this channel. SHOULD only be specified if the channel name differs from the actual destination name, such as when the channel name is not a valid destination name in Anypoint MQ. Defaults to the channel name." + }, + "destinationType": { + "type": "string", + "enum": ["exchange", "queue", "fifo-queue"], + "default": "queue", + "description": "The type of destination. SHOULD be specified to document the messaging model (publish/subscribe, point-to-point, strict message ordering) supported by this channel." + }, + "bindingVersion": { + "type": "string", + "enum": [ + "0.0.1" + ], + "description": "The version of this binding. If omitted, 'latest' MUST be assumed." + } + + }, + "examples": [ + { + "destination": "user-signup-exchg", + "destinationType": "exchange", + "bindingVersion": "0.0.1" + } + ] +} diff --git a/bindings/anypointmq/message.json b/bindings/anypointmq/message.json new file mode 100644 index 00000000..3b4b0d68 --- /dev/null +++ b/bindings/anypointmq/message.json @@ -0,0 +1,40 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/bindings/anypointmq/message.json", + "title": "Anypoint MQ message bindings object", + "description": "This object contains configuration for describing an Anypoint MQ message as an AsyncAPI message. This objects only contains configuration that can not be provided in the AsyncAPI standard message object.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\-\\_]+$": { + "$ref": "https://raw.githubusercontent.com/asyncapi/asyncapi-node/v2.7.7/schemas/2.0.0.json#/definitions/specificationExtension" + } + }, + "properties": { + "headers": { + "$ref": "https://raw.githubusercontent.com/asyncapi/asyncapi-node/v2.7.7/schemas/2.0.0.json#/definitions/schema", + "description": "A Schema object containing the definitions for Anypoint MQ-specific headers (protocol headers). This schema MUST be of type 'object' and have a 'properties' key. Examples of Anypoint MQ protocol headers are 'messageId' and 'messageGroupId'." + }, + "bindingVersion": { + "type": "string", + "enum": [ + "0.0.1" + ], + "description": "The version of this binding. If omitted, 'latest' MUST be assumed." + } + + }, + "examples": [ + { + "headers": { + "type": "object", + "properties": { + "messageId": { + "type": "string" + } + } + }, + "bindingVersion": "0.0.1" + } + ] +} diff --git a/bindings/http/message.json b/bindings/http/message.json new file mode 100644 index 00000000..151e979f --- /dev/null +++ b/bindings/http/message.json @@ -0,0 +1,42 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/bindings/http/message.json", + "title": "HTTP message bindings object", + "description": "This object contains information about the message representation in HTTP.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\-\\_]+$": { + "$ref": "https://raw.githubusercontent.com/asyncapi/asyncapi-node/v2.7.7/schemas/2.0.0.json#/definitions/specificationExtension" + } + }, + "properties": { + "headers": { + "$ref": "https://raw.githubusercontent.com/asyncapi/asyncapi-node/v2.7.7/schemas/2.0.0.json#/definitions/schema", + "description": "\tA Schema object containing the definitions for HTTP-specific headers. This schema MUST be of type 'object' and have a 'properties' key." + }, + "bindingVersion": { + "type": "string", + "enum": [ + "0.1.0" + ], + "description": "The version of this binding. If omitted, \"latest\" MUST be assumed." + } + }, + "examples": [ + { + "headers": { + "type": "object", + "properties": { + "Content-Type": { + "type": "string", + "enum": [ + "application/json" + ] + } + } + }, + "bindingVersion": "0.1.0" + } + ] +} diff --git a/bindings/http/operation.json b/bindings/http/operation.json new file mode 100644 index 00000000..d9329440 --- /dev/null +++ b/bindings/http/operation.json @@ -0,0 +1,119 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/bindings/http/operation.json", + "title": "HTTP operation bindings object", + "description": "This object contains information about the operation representation in HTTP.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\-\\_]+$": { + "$ref": "https://raw.githubusercontent.com/asyncapi/asyncapi-node/v2.7.7/schemas/2.0.0.json#/definitions/specificationExtension" + } + }, + "properties": { + "type": { + "type": "string", + "enum": [ + "request", + "response" + ], + "description": "Required. Type of operation. Its value MUST be either 'request' or 'response'." + }, + "method": { + "type": "string", + "enum": [ + "GET", + "PUT", + "POST", + "PATCH", + "DELETE", + "HEAD", + "OPTIONS", + "CONNECT", + "TRACE" + ], + "description": "When 'type' is 'request', this is the HTTP method, otherwise it MUST be ignored. Its value MUST be one of 'GET', 'POST', 'PUT', 'PATCH', 'DELETE', 'HEAD', 'OPTIONS', 'CONNECT', and 'TRACE'." + }, + "query": { + "$ref": "https://raw.githubusercontent.com/asyncapi/asyncapi-node/v2.7.7/schemas/2.0.0.json#/definitions/schema", + "description": "A Schema object containing the definitions for each query parameter. This schema MUST be of type 'object' and have a properties key." + }, + "bindingVersion": { + "type": "string", + "enum": [ + "0.1.0" + ], + "description": "The version of this binding. If omitted, 'latest' MUST be assumed." + } + }, + "required": [ + "type" + ], + "oneOf": [ + { + "properties": { + "type": { + "const": "request" + } + }, + "required": [ + "method" + ] + }, + { + "properties": { + "is": { + "const": "response" + } + }, + "not": { + "required": [ + "method" + ] + } + } + ], + "examples": [ + { + "type": "response", + "query": { + "type": "object", + "required": [ + "companyId" + ], + "properties": { + "companyId": { + "type": "number", + "minimum": 1, + "description": "The Id of the company." + } + }, + "additionalProperties": false + }, + "bindingVersion": "0.1.0" + }, + { + "type": "request", + "method": "GET", + "query": { + "type": "object", + "required": [ + "companyId" + ], + "properties": { + "companyId": { + "type": "number", + "minimum": 1, + "description": "The Id of the company." + } + }, + "additionalProperties": false + }, + "bindingVersion": "0.1.0" + } + ] +} + + + + diff --git a/bindings/ibmmq/channel.json b/bindings/ibmmq/channel.json new file mode 100644 index 00000000..7dae8eac --- /dev/null +++ b/bindings/ibmmq/channel.json @@ -0,0 +1,127 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/bindings/ibmmq/channel.json", + "title": "IBM MQ channel bindings object", + "description": "This object contains information about the channel representation in IBM MQ. Each channel corresponds to a Queue or Topic within IBM MQ.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\-\\_]+$": { + "$ref": "https://raw.githubusercontent.com/asyncapi/asyncapi-node/v2.7.7/schemas/2.0.0.json#/definitions/specificationExtension" + } + }, + "properties": { + "destinationType": { + "type": "string", + "enum": ["topic", "queue"], + "default": "topic", + "description": "Defines the type of AsyncAPI channel." + }, + "queue": { + "type": "object", + "description": "Defines the properties of a queue.", + "properties": { + "objectName": { + "type": "string", + "maxLength": 48, + "description": "Defines the name of the IBM MQ queue associated with the channel." + }, + "isPartitioned": { + "type": "boolean", + "default": false, + "description": "Defines if the queue is a cluster queue and therefore partitioned. If 'true', a binding option MAY be specified when accessing the queue. More information on binding options can be found on this page in the IBM MQ Knowledge Center." + }, + "exclusive": { + "type": "boolean", + "default": false, + "description": "Specifies if it is recommended to open the queue exclusively." + } + }, + "required": ["objectName"] + }, + "topic": { + "type": "object", + "description": "Defines the properties of a topic.", + "properties": { + "string": { + "type": "string", + "maxLength": 10240, + "description": "The value of the IBM MQ topic string to be used." + }, + "objectName": { + "type": "string", + "maxLength": 48, + "description": "The name of the IBM MQ topic object." + }, + "durablePermitted": { + "type": "boolean", + "default": true, + "description": "Defines if the subscription may be durable." + }, + "lastMsgRetained": { + "type": "boolean", + "default": false, + "description": "Defines if the last message published will be made available to new subscriptions." + } + } + }, + "maxMsgLength": { + "type": "integer", + "minimum": 0, + "maximum":104857600, + "description": "The maximum length of the physical message (in bytes) accepted by the Topic or Queue. Messages produced that are greater in size than this value may fail to be delivered. More information on the maximum message length can be found on this [page](https://www.ibm.com/support/knowledgecenter/SSFKSJ_latest/com.ibm.mq.ref.dev.doc/q097520_.html) in the IBM MQ Knowledge Center." + }, + "bindingVersion": { + "type": "string", + "enum": [ + "0.1.0" + ], + "description": "The version of this binding." + } + }, + "oneOf": [ + { + "properties": { + "destinationType": { "const": "topic" } + }, + "required": [ + "topic" + ], + "not": { + "required": [ + "queue" + ] + } + }, + { + "properties": { + "destinationType": { "const": "queue" } + }, + "required": [ + "queue" + ], + "not": { + "required": [ + "topic" + ] + } + } + ], + "examples": [ + { + "destinationType": "topic", + "topic": { + "objectName": "myTopicName" + }, + "bindingVersion": "0.1.0" + }, + { + "destinationType": "queue", + "queue": { + "objectName": "myQueueName", + "exclusive": true + }, + "bindingVersion": "0.1.0" + } + ] +} diff --git a/bindings/ibmmq/message.json b/bindings/ibmmq/message.json new file mode 100644 index 00000000..69cb0075 --- /dev/null +++ b/bindings/ibmmq/message.json @@ -0,0 +1,81 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/bindings/ibmmq/message.json", + "title": "IBM MQ message bindings object", + "description": "This object contains information about the message representation in IBM MQ.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\-\\_]+$": { + "$ref": "https://raw.githubusercontent.com/asyncapi/asyncapi-node/v2.7.7/schemas/2.0.0.json#/definitions/specificationExtension" + } + }, + "properties": { + "type": { + "type": "string", + "enum": ["string", "jms", "binary"], + "default": "string", + "description": "The type of the message." + }, + "headers": { + "type": "string", + "description": "Defines the IBM MQ message headers to include with this message. More than one header can be specified as a comma separated list. Supporting information on IBM MQ message formats can be found on this [page](https://www.ibm.com/docs/en/ibm-mq/9.2?topic=mqmd-format-mqchar8) in the IBM MQ Knowledge Center." + }, + "description": { + "type": "string", + "description": "Provides additional information for application developers: describes the message type or format." + }, + "expiry": { + "type": "integer", + "minimum": 0, + "default": 0, + "description": "The recommended setting the client should use for the TTL (Time-To-Live) of the message. This is a period of time expressed in milliseconds and set by the application that puts the message. 'expiry' values are API dependant e.g., MQI and JMS use different units of time and default values for 'unlimited'. General information on IBM MQ message expiry can be found on this [page](https://www.ibm.com/docs/en/ibm-mq/9.2?topic=mqmd-expiry-mqlong) in the IBM MQ Knowledge Center." + }, + "bindingVersion": { + "type": "string", + "enum": [ + "0.1.0" + ], + "description": "The version of this binding." + } + + }, + "oneOf": [ + { + "properties": { + "type": { "const": "binary" } + } + }, + { + "properties": { + "type": { "const": "jms" } + }, + "not": { + "required": [ + "headers" + ] + } + }, + { + "properties": { + "type": { "const": "string" } + }, + "not": { + "required": [ + "headers" + ] + } + } + ], + "examples": [ + { + "type": "string", + "bindingVersion": "0.1.0" + }, + { + "type": "jms", + "description": "JMS stream message", + "bindingVersion": "0.1.0" + } + ] +} diff --git a/bindings/ibmmq/server.json b/bindings/ibmmq/server.json new file mode 100644 index 00000000..576bf50a --- /dev/null +++ b/bindings/ibmmq/server.json @@ -0,0 +1,58 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/bindings/ibmmq/server.json", + "title": "IBM MQ server bindings object", + "description": "This object contains server connection information about the IBM MQ server, referred to as an IBM MQ queue manager. This object contains additional connectivity information not possible to represent within the core AsyncAPI specification.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\-\\_]+$": { + "$ref": "https://raw.githubusercontent.com/asyncapi/asyncapi-node/v2.7.7/schemas/2.0.0.json#/definitions/specificationExtension" + } + }, + "properties": { + "groupId": { + "type": "string", + "description": "Defines a logical group of IBM MQ server objects. This is necessary to specify multi-endpoint configurations used in high availability deployments. If omitted, the server object is not part of a group." + }, + "ccdtQueueManagerName": { + "type": "string", + "default": "*", + "description": "The name of the IBM MQ queue manager to bind to in the CCDT file." + }, + "cipherSpec": { + "type": "string", + "description": "The recommended cipher specification used to establish a TLS connection between the client and the IBM MQ queue manager. More information on SSL/TLS cipher specifications supported by IBM MQ can be found on this page in the IBM MQ Knowledge Center." + }, + "multiEndpointServer": { + "type": "boolean", + "default": false, + "description": "If 'multiEndpointServer' is 'true' then multiple connections can be workload balanced and applications should not make assumptions as to where messages are processed. Where message ordering, or affinity to specific message resources is necessary, a single endpoint ('multiEndpointServer' = 'false') may be required." + }, + "heartBeatInterval": { + "type": "integer", + "minimum": 0, + "maximum": 999999, + "default": 300, + "description": "The recommended value (in seconds) for the heartbeat sent to the queue manager during periods of inactivity. A value of zero means that no heart beats are sent. A value of 1 means that the client will use the value defined by the queue manager. More information on heart beat interval can be found on this page in the IBM MQ Knowledge Center." + }, + "bindingVersion": { + "type": "string", + "enum": [ + "0.1.0" + ], + "description": "The version of this binding." + } + }, + "examples": [ + { + "groupId": "PRODCLSTR1", + "cipherSpec": "ANY_TLS12_OR_HIGHER", + "bindingVersion": "0.1.0" + }, + { + "groupId": "PRODCLSTR1", + "bindingVersion": "0.1.0" + } + ] +} diff --git a/bindings/jms/.keep b/bindings/jms/.keep new file mode 100644 index 00000000..e69de29b diff --git a/bindings/kafka/message.json b/bindings/kafka/message.json new file mode 100644 index 00000000..da96c722 --- /dev/null +++ b/bindings/kafka/message.json @@ -0,0 +1,42 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/bindings/kafka/message.json", + "title": "Kafka message bindings object", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\-\\_]+$": { + "$ref": "https://raw.githubusercontent.com/asyncapi/asyncapi-node/v2.7.7/schemas/2.0.0.json#/definitions/specificationExtension" + } + }, + "properties": { + "key": { + "$ref": "https://raw.githubusercontent.com/asyncapi/asyncapi-node/v2.7.7/schemas/2.0.0.json#/definitions/schema", + "description": "The message key." + }, + "bindingVersion": { + "type": "string", + "enum": [ + "0.1.0" + ], + "description": "The version of this binding. If omitted, 'latest' MUST be assumed." + } + }, + "examples": [ + { + "key": { + "type": "string", + "enum": [ + "myKey" + ] + }, + "bindingVersion": "0.1.0" + }, + { + "key": { + "$ref": "path/to/user-create.avsc#/UserCreate" + }, + "bindingVersion": "0.2.0" + } + ] +} diff --git a/bindings/kafka/operation.json b/bindings/kafka/operation.json new file mode 100644 index 00000000..9ae5b11d --- /dev/null +++ b/bindings/kafka/operation.json @@ -0,0 +1,48 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/bindings/kafka/operation.json", + "title": "Kafka operation message bindings object", + "description": "This object contains information about the operation representation in Kafka.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\-\\_]+$": { + "$ref": "https://raw.githubusercontent.com/asyncapi/asyncapi-node/v2.7.7/schemas/2.0.0.json#/definitions/specificationExtension" + } + }, + "properties": { + "groupId": { + "$ref": "https://raw.githubusercontent.com/asyncapi/asyncapi-node/v2.7.7/schemas/2.0.0.json#/definitions/schema", + "description": "Id of the consumer group." + }, + "clientId": { + "$ref": "https://raw.githubusercontent.com/asyncapi/asyncapi-node/v2.7.7/schemas/2.0.0.json#/definitions/schema", + "description": "Id of the consumer inside a consumer group." + }, + "bindingVersion": { + "type": "string", + "enum": [ + "0.1.0" + ], + "description": "The version of this binding. If omitted, 'latest' MUST be assumed." + } + + }, + "examples": [ + { + "groupId": { + "type": "string", + "enum": [ + "myGroupId" + ] + }, + "clientId": { + "type": "string", + "enum": [ + "myClientId" + ] + }, + "bindingVersion": "0.1.0" + } + ] +} diff --git a/bindings/mercure/.keep b/bindings/mercure/.keep new file mode 100644 index 00000000..e69de29b diff --git a/bindings/mqtt/message.json b/bindings/mqtt/message.json new file mode 100644 index 00000000..de3211c2 --- /dev/null +++ b/bindings/mqtt/message.json @@ -0,0 +1,27 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/bindings/mqtt/message.json", + "title": "MQTT message bindings object", + "description": "This object contains information about the message representation in MQTT.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\-\\_]+$": { + "$ref": "https://raw.githubusercontent.com/asyncapi/asyncapi-node/v2.7.7/schemas/2.0.0.json#/definitions/specificationExtension" + } + }, + "properties": { + "bindingVersion": { + "type": "string", + "enum": [ + "0.1.0" + ], + "description": "The version of this binding. If omitted, 'latest' MUST be assumed." + } + }, + "examples": [ + { + "bindingVersion": "0.1.0" + } + ] +} diff --git a/bindings/mqtt/operation.json b/bindings/mqtt/operation.json new file mode 100644 index 00000000..f88cbb3a --- /dev/null +++ b/bindings/mqtt/operation.json @@ -0,0 +1,37 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/bindings/mqtt/operation.json", + "title": "MQTT operation bindings object", + "description": "This object contains information about the operation representation in MQTT.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\-\\_]+$": { + "$ref": "https://raw.githubusercontent.com/asyncapi/asyncapi-node/v2.7.7/schemas/2.0.0.json#/definitions/specificationExtension" + } + }, + "properties": { + "qos": { + "type": "integer", + "description": "Defines the Quality of Service (QoS) levels for the message flow between client and server. Its value MUST be either 0 (At most once delivery), 1 (At least once delivery), or 2 (Exactly once delivery)." + }, + "retain": { + "type": "boolean", + "description": "Whether the broker should retain the message or not." + }, + "bindingVersion": { + "type": "string", + "enum": [ + "0.1.0" + ], + "description": "The version of this binding. If omitted, 'latest' MUST be assumed." + } + }, + "examples": [ + { + "qos": 2, + "retain": true, + "bindingVersion": "0.1.0" + } + ] +} diff --git a/bindings/mqtt/server.json b/bindings/mqtt/server.json new file mode 100644 index 00000000..c379848a --- /dev/null +++ b/bindings/mqtt/server.json @@ -0,0 +1,72 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/bindings/mqtt/server.json", + "title": "MQTT server bindings object", + "description": "This object contains information about the server representation in MQTT.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\-\\_]+$": { + "$ref": "https://raw.githubusercontent.com/asyncapi/asyncapi-node/v2.7.7/schemas/2.0.0.json#/definitions/specificationExtension" + } + }, + "properties": { + + "clientId": { + "type": "string", + "description": "The client identifier." + }, + "cleanSession": { + "type": "boolean", + "description": "Whether to create a persistent connection or not. When 'false', the connection will be persistent." + }, + "lastWill": { + "type": "object", + "description": "Last Will and Testament configuration.", + "properties": { + "topic": { + "type": "string", + "description": "The topic where the Last Will and Testament message will be sent." + }, + "qos": { + "type": "integer", + "enum": [0,1,2], + "description": "Defines how hard the broker/client will try to ensure that the Last Will and Testament message is received. Its value MUST be either 0, 1 or 2." + }, + "message": { + "type": "string", + "description": "Last Will message." + }, + "retain": { + "type": "boolean", + "description": "Whether the broker should retain the Last Will and Testament message or not." + } + } + }, + "keepAlive": { + "type": "integer", + "description": "Interval in seconds of the longest period of time the broker and the client can endure without sending a message." + }, + "bindingVersion": { + "type": "string", + "enum": [ + "0.1.0" + ], + "description": "The version of this binding. If omitted, 'latest' MUST be assumed." + } + }, + "examples": [ + { + "clientId": "guest", + "cleanSession": true, + "lastWill": { + "topic": "/last-wills", + "qos": 2, + "message": "Guest gone offline.", + "retain": false + }, + "keepAlive": 60, + "bindingVersion": "0.1.0" + } + ] +} diff --git a/bindings/mqtt5/.keep b/bindings/mqtt5/.keep new file mode 100644 index 00000000..e69de29b diff --git a/bindings/nats/operation.json b/bindings/nats/operation.json new file mode 100644 index 00000000..9955a21e --- /dev/null +++ b/bindings/nats/operation.json @@ -0,0 +1,33 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/bindings/nats/operation.json", + "title": "NATS operation bindings object", + "description": "This object contains information about the operation representation in NATS.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\-\\_]+$": { + "$ref": "https://raw.githubusercontent.com/asyncapi/asyncapi-node/v2.7.7/schemas/2.0.0.json#/definitions/specificationExtension" + } + }, + "properties": { + "queue": { + "type": "string", + "description": "Defines the name of the queue to use. It MUST NOT exceed 255 characters.", + "maxLength": 255 + }, + "bindingVersion": { + "type": "string", + "enum": [ + "0.1.0" + ], + "description": "The version of this binding. If omitted, 'latest' MUST be assumed." + } + }, + "examples": [ + { + "queue": "MyCustomQueue", + "bindingVersion": "0.1.0" + } + ] +} diff --git a/bindings/redis/.keep b/bindings/redis/.keep new file mode 100644 index 00000000..e69de29b diff --git a/bindings/sns/.keep b/bindings/sns/.keep new file mode 100644 index 00000000..e69de29b diff --git a/bindings/solace/operation.json b/bindings/solace/operation.json new file mode 100644 index 00000000..98aad7b8 --- /dev/null +++ b/bindings/solace/operation.json @@ -0,0 +1,106 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/bindings/solace/operation.json", + "title": "Solace operation bindings object", + "description": "This object contains information about the operation representation in Solace.", + "type": "object", + "additionalProperties": false, + "properties": { + "destinations": { + "description": "The list of Solace destinations referenced in the operation.", + "type": "array", + "items": { + "type": "object", + "properties": { + "deliveryMode": { + "type": "string", + "enum": [ + "direct", + "persistent" + ] + } + }, + "oneOf": [ + { + "properties": { + "destinationType": { + "type": "string", + "const": "queue", + "description": "If the type is queue, then the subscriber can bind to the queue. The queue subscribes to the given topicSubscriptions. If no topicSubscriptions are provied, the queue will subscribe to the topic as represented by the channel name." + }, + "queue": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The name of the queue" + }, + "topicSubscriptions": { + "type": "array", + "description": "The list of topics that the queue subscribes to.", + "items": { + "type": "string" + } + }, + "accessType": { + "type": "string", + "enum": [ + "exclusive", + "nonexclusive" + ] + } + } + } + } + }, + { + "properties": { + "destinationType": { + "type": "string", + "const": "topic", + "description": "If the type is topic, then the subscriber subscribes to the given topicSubscriptions. If no topicSubscriptions are provided, the client will subscribe to the topic as represented by the channel name." + }, + "topicSubscriptions": { + "type": "array", + "description": "The list of topics that the client subscribes to.", + "items": { + "type": "string" + } + } + } + } + ] + } + } + }, + "bindingVersion": { + "type": "string", + "enum": [ + "0.2.0" + ], + "description": "The version of this binding. If omitted, \"latest\" MUST be assumed." + }, + "examples": [ + { + "bindingVersion": "0.2.0", + "destinations": [ + { + "destinationType": "queue", + "queue": { + "name": "sampleQueue", + "topicSubscriptions": [ + "samples/*" + ], + "accessType": "nonexclusive" + } + }, + { + "destinationType": "topic", + "topicSubscriptions": [ + "samples/*" + ] + } + ] + } + ] +} diff --git a/bindings/solace/server.json b/bindings/solace/server.json new file mode 100644 index 00000000..a87dedf2 --- /dev/null +++ b/bindings/solace/server.json @@ -0,0 +1,32 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/bindings/solace/server.json", + "title": "Solace server bindings object", + "description": "This object contains server connection information about the Solace broker. This object contains additional connectivity information not possible to represent within the core AsyncAPI specification.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\-\\_]+$": { + "$ref": "https://raw.githubusercontent.com/asyncapi/asyncapi-node/v2.7.7/schemas/2.0.0.json#/definitions/specificationExtension" + } + }, + "properties": { + "msvVpn": { + "type": "string", + "description": "The name of the Virtual Private Network to connect to on the Solace broker." + }, + "bindingVersion": { + "type": "string", + "enum": [ + "0.2.0" + ], + "description": "The version of this binding." + } + }, + "examples": [ + { + "msgVpn": "ProdVPN", + "bindingVersion": "0.2.0" + } + ] +} diff --git a/bindings/sqs/.keep b/bindings/sqs/.keep new file mode 100644 index 00000000..e69de29b diff --git a/bindings/stomp/.keep b/bindings/stomp/.keep new file mode 100644 index 00000000..e69de29b diff --git a/bindings/websockets/channel.json b/bindings/websockets/channel.json new file mode 100644 index 00000000..9e78dbd2 --- /dev/null +++ b/bindings/websockets/channel.json @@ -0,0 +1,44 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/bindings/websockets/channel.json", + "title": "WebSockets channel bindings object", + "description": "When using WebSockets, the channel represents the connection. Unlike other protocols that support multiple virtual channels (topics, routing keys, etc.) per connection, WebSockets doesn't support virtual channels or, put it another way, there's only one channel and its characteristics are strongly related to the protocol used for the handshake, i.e., HTTP.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\-\\_]+$": { + "$ref": "https://raw.githubusercontent.com/asyncapi/asyncapi-node/v2.7.7/schemas/2.0.0.json#/definitions/specificationExtension" + } + }, + "properties": { + "method": { + "type": "string", + "enum": [ + "GET", + "POST" + ], + "description": "The HTTP method to use when establishing the connection. Its value MUST be either 'GET' or 'POST'." + }, + "query": { + "$ref": "https://raw.githubusercontent.com/asyncapi/asyncapi-node/v2.7.7/schemas/2.0.0.json#/definitions/schema", + "description": "A Schema object containing the definitions for each query parameter. This schema MUST be of type 'object' and have a 'properties' key." + }, + "headers": { + "$ref": "https://raw.githubusercontent.com/asyncapi/asyncapi-node/v2.7.7/schemas/2.0.0.json#/definitions/schema", + "description": "A Schema object containing the definitions of the HTTP headers to use when establishing the connection. This schema MUST be of type 'object' and have a 'properties' key." + }, + "bindingVersion": { + "type": "string", + "enum": [ + "0.1.0" + ], + "description": "The version of this binding. If omitted, 'latest' MUST be assumed." + } + }, + "examples": [ + { + "method": "POST", + "bindingVersion": "0.1.0" + } + ] +} From 4e53622e4ae39995d0936066c925df613e19b760 Mon Sep 17 00:00:00 2001 From: Jonas Lagoni Date: Fri, 8 Jul 2022 12:55:14 +0200 Subject: [PATCH 004/102] feat: add specific binding schemas (#224) --- definitions/3.0.0/channelBindingsObject.json | 29 +++++++++++++++++++ definitions/3.0.0/channelItem.json | 2 +- definitions/3.0.0/message.json | 2 +- definitions/3.0.0/messageBindingsObject.json | 29 +++++++++++++++++++ definitions/3.0.0/messageTrait.json | 2 +- definitions/3.0.0/operation.json | 2 +- .../3.0.0/operationBindingsObject.json | 29 +++++++++++++++++++ definitions/3.0.0/operationTrait.json | 2 +- definitions/3.0.0/server.json | 2 +- ...sObject.json => serverBindingsObject.json} | 9 ++++-- 10 files changed, 100 insertions(+), 8 deletions(-) create mode 100644 definitions/3.0.0/channelBindingsObject.json create mode 100644 definitions/3.0.0/messageBindingsObject.json create mode 100644 definitions/3.0.0/operationBindingsObject.json rename definitions/3.0.0/{bindingsObject.json => serverBindingsObject.json} (58%) diff --git a/definitions/3.0.0/channelBindingsObject.json b/definitions/3.0.0/channelBindingsObject.json new file mode 100644 index 00000000..9448104e --- /dev/null +++ b/definitions/3.0.0/channelBindingsObject.json @@ -0,0 +1,29 @@ +{ + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\-\\_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "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/3.0.0/channelBindingsObject.json" +} \ No newline at end of file diff --git a/definitions/3.0.0/channelItem.json b/definitions/3.0.0/channelItem.json index 7e682196..5b469737 100644 --- a/definitions/3.0.0/channelItem.json +++ b/definitions/3.0.0/channelItem.json @@ -39,7 +39,7 @@ "default": false }, "bindings": { - "$ref": "http://asyncapi.com/definitions/3.0.0/bindingsObject.json" + "$ref": "http://asyncapi.com/definitions/3.0.0/channelBindingsObject.json" } }, "$schema": "http://json-schema.org/draft-07/schema#", diff --git a/definitions/3.0.0/message.json b/definitions/3.0.0/message.json index ae67c0fc..2cefb300 100644 --- a/definitions/3.0.0/message.json +++ b/definitions/3.0.0/message.json @@ -127,7 +127,7 @@ } }, "bindings": { - "$ref": "http://asyncapi.com/definitions/3.0.0/bindingsObject.json" + "$ref": "http://asyncapi.com/definitions/3.0.0/messageBindingsObject.json" }, "traits": { "type": "array", diff --git a/definitions/3.0.0/messageBindingsObject.json b/definitions/3.0.0/messageBindingsObject.json new file mode 100644 index 00000000..b2105d2b --- /dev/null +++ b/definitions/3.0.0/messageBindingsObject.json @@ -0,0 +1,29 @@ +{ + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\-\\_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "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/3.0.0/messageBindingsObject.json" +} \ No newline at end of file diff --git a/definitions/3.0.0/messageTrait.json b/definitions/3.0.0/messageTrait.json index 9adb00fd..5dbc42e2 100644 --- a/definitions/3.0.0/messageTrait.json +++ b/definitions/3.0.0/messageTrait.json @@ -77,7 +77,7 @@ } }, "bindings": { - "$ref": "http://asyncapi.com/definitions/3.0.0/bindingsObject.json" + "$ref": "http://asyncapi.com/definitions/3.0.0/messageBindingsObject.json" } }, "$schema": "http://json-schema.org/draft-07/schema#", diff --git a/definitions/3.0.0/operation.json b/definitions/3.0.0/operation.json index 89f058d4..d84c330d 100644 --- a/definitions/3.0.0/operation.json +++ b/definitions/3.0.0/operation.json @@ -65,7 +65,7 @@ "type": "string" }, "bindings": { - "$ref": "http://asyncapi.com/definitions/3.0.0/bindingsObject.json" + "$ref": "http://asyncapi.com/definitions/3.0.0/operationBindingsObject.json" }, "message": { "$ref": "http://asyncapi.com/definitions/3.0.0/message.json" diff --git a/definitions/3.0.0/operationBindingsObject.json b/definitions/3.0.0/operationBindingsObject.json new file mode 100644 index 00000000..a08711d4 --- /dev/null +++ b/definitions/3.0.0/operationBindingsObject.json @@ -0,0 +1,29 @@ +{ + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\-\\_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "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/3.0.0/operationBindingsObject.json" +} \ No newline at end of file diff --git a/definitions/3.0.0/operationTrait.json b/definitions/3.0.0/operationTrait.json index b30f9aaa..73dff058 100644 --- a/definitions/3.0.0/operationTrait.json +++ b/definitions/3.0.0/operationTrait.json @@ -33,7 +33,7 @@ } }, "bindings": { - "$ref": "http://asyncapi.com/definitions/3.0.0/bindingsObject.json" + "$ref": "http://asyncapi.com/definitions/3.0.0/operationBindingsObject.json" } }, "$schema": "http://json-schema.org/draft-07/schema#", diff --git a/definitions/3.0.0/server.json b/definitions/3.0.0/server.json index 31f04069..20371d0f 100644 --- a/definitions/3.0.0/server.json +++ b/definitions/3.0.0/server.json @@ -35,7 +35,7 @@ } }, "bindings": { - "$ref": "http://asyncapi.com/definitions/3.0.0/bindingsObject.json" + "$ref": "http://asyncapi.com/definitions/3.0.0/serverBindingsObject.json" } }, "$schema": "http://json-schema.org/draft-07/schema#", diff --git a/definitions/3.0.0/bindingsObject.json b/definitions/3.0.0/serverBindingsObject.json similarity index 58% rename from definitions/3.0.0/bindingsObject.json rename to definitions/3.0.0/serverBindingsObject.json index cec5e0fc..9eb50779 100644 --- a/definitions/3.0.0/bindingsObject.json +++ b/definitions/3.0.0/serverBindingsObject.json @@ -1,6 +1,11 @@ { "type": "object", - "additionalProperties": true, + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\-\\_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, "properties": { "http": {}, "ws": {}, @@ -20,5 +25,5 @@ "solace": {} }, "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "http://asyncapi.com/definitions/3.0.0/bindingsObject.json" + "$id": "http://asyncapi.com/definitions/3.0.0/serverBindingsObject.json" } \ No newline at end of file From 2f1d5c3456bec081deeab771920d19a741696a99 Mon Sep 17 00:00:00 2001 From: asyncapi-bot Date: Tue, 20 Sep 2022 19:52:45 +0200 Subject: [PATCH 005/102] chore(release): v3.2.0-next-major-spec.1 (#257) --- package-lock.json | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index a92a91ce..a5e620c7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "@asyncapi/specs", - "version": "3.1.0", + "version": "3.2.0-next-major-spec.1", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index bb97f0c3..1f5a530a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@asyncapi/specs", - "version": "3.1.0", + "version": "3.2.0-next-major-spec.1", "description": "AsyncAPI schema versions", "main": "index.js", "scripts": { From 69e1ce7c8d43cf331891d8400d8a0515b0af1e2e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=20M=C3=A9ndez?= Date: Thu, 27 Oct 2022 17:30:44 +0200 Subject: [PATCH 006/102] feat!: add new channels and operations objects (#264) --- definitions/3.0.0/asyncapi.json | 6 +- definitions/3.0.0/bindingsObject.json | 24 + .../3.0.0/{channelItem.json => channel.json} | 30 +- definitions/3.0.0/channelBindingsObject.json | 2 +- definitions/3.0.0/channelMessages.json | 9 + definitions/3.0.0/channels.json | 10 +- definitions/3.0.0/messageBindingsObject.json | 2 +- definitions/3.0.0/operation.json | 18 +- .../3.0.0/operationBindingsObject.json | 2 +- definitions/3.0.0/operationTrait.json | 32 +- definitions/3.0.0/operations.json | 11 + definitions/3.0.0/serverBindingsObject.json | 2 +- schemas/3.0.0.json | 842 +++++++++++------- 13 files changed, 595 insertions(+), 395 deletions(-) create mode 100644 definitions/3.0.0/bindingsObject.json rename definitions/3.0.0/{channelItem.json => channel.json} (53%) create mode 100644 definitions/3.0.0/channelMessages.json create mode 100644 definitions/3.0.0/operations.json diff --git a/definitions/3.0.0/asyncapi.json b/definitions/3.0.0/asyncapi.json index 703621ae..4042edfc 100644 --- a/definitions/3.0.0/asyncapi.json +++ b/definitions/3.0.0/asyncapi.json @@ -5,8 +5,7 @@ "type": "object", "required": [ "asyncapi", - "info", - "channels" + "info" ], "additionalProperties": false, "patternProperties": { @@ -39,6 +38,9 @@ "channels": { "$ref": "http://asyncapi.com/definitions/3.0.0/channels.json" }, + "operations": { + "$ref": "http://asyncapi.com/definitions/3.0.0/operations.json" + }, "components": { "$ref": "http://asyncapi.com/definitions/3.0.0/components.json" }, diff --git a/definitions/3.0.0/bindingsObject.json b/definitions/3.0.0/bindingsObject.json new file mode 100644 index 00000000..cec5e0fc --- /dev/null +++ b/definitions/3.0.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/3.0.0/bindingsObject.json" +} \ No newline at end of file diff --git a/definitions/3.0.0/channelItem.json b/definitions/3.0.0/channel.json similarity index 53% rename from definitions/3.0.0/channelItem.json rename to definitions/3.0.0/channel.json index 5b469737..bd7d9e63 100644 --- a/definitions/3.0.0/channelItem.json +++ b/definitions/3.0.0/channel.json @@ -7,8 +7,12 @@ } }, "properties": { - "$ref": { - "$ref": "http://asyncapi.com/definitions/3.0.0/ReferenceObject.json" + "address": { + "type": ["string", "null"], + "description": "An optional string representation of this channel's address. The address is typically the \"topic name\", \"routing key\", \"event type\", or \"path\". When `null` or absent, it MUST be interpreted as unknown. This is useful when the address is generated dynamically at runtime or can't be known upfront. It MAY contain Channel Address Expressions." + }, + "messages": { + "$ref": "http://asyncapi.com/definitions/3.0.0/channelMessages.json" }, "parameters": { "type": "object", @@ -28,20 +32,20 @@ }, "uniqueItems": true }, - "publish": { - "$ref": "http://asyncapi.com/definitions/3.0.0/operation.json" - }, - "subscribe": { - "$ref": "http://asyncapi.com/definitions/3.0.0/operation.json" - }, - "deprecated": { - "type": "boolean", - "default": false - }, "bindings": { "$ref": "http://asyncapi.com/definitions/3.0.0/channelBindingsObject.json" + }, + "tags": { + "type": "array", + "items": { + "$ref": "http://asyncapi.com/definitions/3.0.0/tag.json" + }, + "uniqueItems": true + }, + "externalDocs": { + "$ref": "http://asyncapi.com/definitions/3.0.0/externalDocs.json" } }, "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "http://asyncapi.com/definitions/3.0.0/channelItem.json" + "$id": "http://asyncapi.com/definitions/3.0.0/channel.json" } \ No newline at end of file diff --git a/definitions/3.0.0/channelBindingsObject.json b/definitions/3.0.0/channelBindingsObject.json index 9448104e..11e3ea23 100644 --- a/definitions/3.0.0/channelBindingsObject.json +++ b/definitions/3.0.0/channelBindingsObject.json @@ -2,7 +2,7 @@ "type": "object", "additionalProperties": false, "patternProperties": { - "^x-[\\w\\d\\.\\-\\_]+$": { + "^x-[\\w\\d\\.\\x2d_]+$": { "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" } }, diff --git a/definitions/3.0.0/channelMessages.json b/definitions/3.0.0/channelMessages.json new file mode 100644 index 00000000..e15c044c --- /dev/null +++ b/definitions/3.0.0/channelMessages.json @@ -0,0 +1,9 @@ +{ + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/3.0.0/message.json" + }, + "description": "A map of the messages that will be sent to this channel by any application at any time. **Every message sent to this channel MUST be valid against one, and only one, of the message objects defined in this map.**", + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/3.0.0/channelMessages.json" +} \ No newline at end of file diff --git a/definitions/3.0.0/channels.json b/definitions/3.0.0/channels.json index e1c540d6..2efd382e 100644 --- a/definitions/3.0.0/channels.json +++ b/definitions/3.0.0/channels.json @@ -1,12 +1,10 @@ { "type": "object", - "propertyNames": { - "type": "string", - "format": "uri-template", - "minLength": 1 - }, "additionalProperties": { - "$ref": "http://asyncapi.com/definitions/3.0.0/channelItem.json" + "oneOf": [ + { "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" }, + { "$ref": "http://asyncapi.com/definitions/3.0.0/channel.json" } + ] }, "$schema": "http://json-schema.org/draft-07/schema#", "$id": "http://asyncapi.com/definitions/3.0.0/channels.json" diff --git a/definitions/3.0.0/messageBindingsObject.json b/definitions/3.0.0/messageBindingsObject.json index b2105d2b..ad18b07f 100644 --- a/definitions/3.0.0/messageBindingsObject.json +++ b/definitions/3.0.0/messageBindingsObject.json @@ -2,7 +2,7 @@ "type": "object", "additionalProperties": false, "patternProperties": { - "^x-[\\w\\d\\.\\-\\_]+$": { + "^x-[\\w\\d\\.\\x2d_]+$": { "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" } }, diff --git a/definitions/3.0.0/operation.json b/definitions/3.0.0/operation.json index d84c330d..d29882cf 100644 --- a/definitions/3.0.0/operation.json +++ b/definitions/3.0.0/operation.json @@ -6,7 +6,19 @@ "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" } }, + "required": [ + "action", + "channel" + ], "properties": { + "action": { + "type": "string", + "description": "Allowed values are send and receive. Use send when it's expected that the application will send a message to the given channel, and receive when the application should expect receiving messages from the given channel.", + "enum": ["send", "receive"] + }, + "channel": { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, "traits": { "type": "array", "items": { @@ -61,14 +73,8 @@ "externalDocs": { "$ref": "http://asyncapi.com/definitions/3.0.0/externalDocs.json" }, - "operationId": { - "type": "string" - }, "bindings": { "$ref": "http://asyncapi.com/definitions/3.0.0/operationBindingsObject.json" - }, - "message": { - "$ref": "http://asyncapi.com/definitions/3.0.0/message.json" } }, "$schema": "http://json-schema.org/draft-07/schema#", diff --git a/definitions/3.0.0/operationBindingsObject.json b/definitions/3.0.0/operationBindingsObject.json index a08711d4..06f560fa 100644 --- a/definitions/3.0.0/operationBindingsObject.json +++ b/definitions/3.0.0/operationBindingsObject.json @@ -2,7 +2,7 @@ "type": "object", "additionalProperties": false, "patternProperties": { - "^x-[\\w\\d\\.\\-\\_]+$": { + "^x-[\\w\\d\\.\\x2d_]+$": { "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" } }, diff --git a/definitions/3.0.0/operationTrait.json b/definitions/3.0.0/operationTrait.json index 73dff058..6ee4172a 100644 --- a/definitions/3.0.0/operationTrait.json +++ b/definitions/3.0.0/operationTrait.json @@ -7,33 +7,29 @@ } }, "properties": { + "action": { + "$ref": "http://asyncapi.com/definitions/3.0.0/operation.json#/properties/action" + }, + "channel": { + "$ref": "http://asyncapi.com/definitions/3.0.0/operation.json#/properties/channel" + }, "summary": { - "type": "string" + "$ref": "http://asyncapi.com/definitions/3.0.0/operation.json#/properties/summary" }, "description": { - "type": "string" + "$ref": "http://asyncapi.com/definitions/3.0.0/operation.json#/properties/description" + }, + "security": { + "$ref": "http://asyncapi.com/definitions/3.0.0/operation.json#/properties/security" }, "tags": { - "type": "array", - "items": { - "$ref": "http://asyncapi.com/definitions/3.0.0/tag.json" - }, - "uniqueItems": true + "$ref": "http://asyncapi.com/definitions/3.0.0/operation.json#/properties/tags" }, "externalDocs": { - "$ref": "http://asyncapi.com/definitions/3.0.0/externalDocs.json" - }, - "operationId": { - "type": "string" - }, - "security": { - "type": "array", - "items": { - "$ref": "http://asyncapi.com/definitions/3.0.0/SecurityRequirement.json" - } + "$ref": "http://asyncapi.com/definitions/3.0.0/operation.json#/properties/externalDocs" }, "bindings": { - "$ref": "http://asyncapi.com/definitions/3.0.0/operationBindingsObject.json" + "$ref": "http://asyncapi.com/definitions/3.0.0/operation.json#/properties/bindings" } }, "$schema": "http://json-schema.org/draft-07/schema#", diff --git a/definitions/3.0.0/operations.json b/definitions/3.0.0/operations.json new file mode 100644 index 00000000..748982cc --- /dev/null +++ b/definitions/3.0.0/operations.json @@ -0,0 +1,11 @@ +{ + "type": "object", + "additionalProperties": { + "oneOf": [ + { "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" }, + { "$ref": "http://asyncapi.com/definitions/3.0.0/operation.json" } + ] + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/3.0.0/operations.json" +} \ No newline at end of file diff --git a/definitions/3.0.0/serverBindingsObject.json b/definitions/3.0.0/serverBindingsObject.json index 9eb50779..a2389092 100644 --- a/definitions/3.0.0/serverBindingsObject.json +++ b/definitions/3.0.0/serverBindingsObject.json @@ -2,7 +2,7 @@ "type": "object", "additionalProperties": false, "patternProperties": { - "^x-[\\w\\d\\.\\-\\_]+$": { + "^x-[\\w\\d\\.\\x2d_]+$": { "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" } }, diff --git a/schemas/3.0.0.json b/schemas/3.0.0.json index 6466df19..89749b62 100644 --- a/schemas/3.0.0.json +++ b/schemas/3.0.0.json @@ -5,8 +5,7 @@ "type": "object", "required": [ "asyncapi", - "info", - "channels" + "info" ], "additionalProperties": false, "patternProperties": { @@ -39,6 +38,9 @@ "channels": { "$ref": "http://asyncapi.com/definitions/3.0.0/channels.json" }, + "operations": { + "$ref": "http://asyncapi.com/definitions/3.0.0/operations.json" + }, "components": { "$ref": "http://asyncapi.com/definitions/3.0.0/components.json" }, @@ -221,7 +223,7 @@ } }, "bindings": { - "$ref": "http://asyncapi.com/definitions/3.0.0/bindingsObject.json" + "$ref": "http://asyncapi.com/definitions/3.0.0/serverBindingsObject.json" } } }, @@ -275,10 +277,15 @@ "uniqueItems": true } }, - "http://asyncapi.com/definitions/3.0.0/bindingsObject.json": { - "$id": "http://asyncapi.com/definitions/3.0.0/bindingsObject.json", + "http://asyncapi.com/definitions/3.0.0/serverBindingsObject.json": { + "$id": "http://asyncapi.com/definitions/3.0.0/serverBindingsObject.json", "type": "object", - "additionalProperties": true, + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, "properties": { "http": {}, "ws": {}, @@ -301,17 +308,19 @@ "http://asyncapi.com/definitions/3.0.0/channels.json": { "$id": "http://asyncapi.com/definitions/3.0.0/channels.json", "type": "object", - "propertyNames": { - "type": "string", - "format": "uri-template", - "minLength": 1 - }, "additionalProperties": { - "$ref": "http://asyncapi.com/definitions/3.0.0/channelItem.json" + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/channel.json" + } + ] } }, - "http://asyncapi.com/definitions/3.0.0/channelItem.json": { - "$id": "http://asyncapi.com/definitions/3.0.0/channelItem.json", + "http://asyncapi.com/definitions/3.0.0/channel.json": { + "$id": "http://asyncapi.com/definitions/3.0.0/channel.json", "type": "object", "additionalProperties": false, "patternProperties": { @@ -320,8 +329,15 @@ } }, "properties": { - "$ref": { - "$ref": "http://asyncapi.com/definitions/3.0.0/ReferenceObject.json" + "address": { + "type": [ + "string", + "null" + ], + "description": "An optional string representation of this channel's address. The address is typically the \"topic name\", \"routing key\", \"event type\", or \"path\". When `null` or absent, it MUST be interpreted as unknown. This is useful when the address is generated dynamically at runtime or can't be known upfront. It MAY contain Channel Address Expressions." + }, + "messages": { + "$ref": "http://asyncapi.com/definitions/3.0.0/channelMessages.json" }, "parameters": { "type": "object", @@ -341,46 +357,198 @@ }, "uniqueItems": true }, - "publish": { - "$ref": "http://asyncapi.com/definitions/3.0.0/operation.json" - }, - "subscribe": { - "$ref": "http://asyncapi.com/definitions/3.0.0/operation.json" + "bindings": { + "$ref": "http://asyncapi.com/definitions/3.0.0/channelBindingsObject.json" }, - "deprecated": { - "type": "boolean", - "default": false + "tags": { + "type": "array", + "items": { + "$ref": "http://asyncapi.com/definitions/3.0.0/tag.json" + }, + "uniqueItems": true }, - "bindings": { - "$ref": "http://asyncapi.com/definitions/3.0.0/bindingsObject.json" + "externalDocs": { + "$ref": "http://asyncapi.com/definitions/3.0.0/externalDocs.json" } } }, - "http://asyncapi.com/definitions/3.0.0/parameter.json": { - "$id": "http://asyncapi.com/definitions/3.0.0/parameter.json", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" - } + "http://asyncapi.com/definitions/3.0.0/channelMessages.json": { + "$id": "http://asyncapi.com/definitions/3.0.0/channelMessages.json", + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/3.0.0/message.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/3.0.0/schema.json" - }, - "location": { - "type": "string", - "description": "A runtime expression that specifies the location of the parameter value", - "pattern": "^\\$message\\.(header|payload)#(\\/(([^\\/~])|(~[01]))*)*" + "description": "A map of the messages that will be sent to this channel by any application at any time. **Every message sent to this channel MUST be valid against one, and only one, of the message objects defined in this map.**" + }, + "http://asyncapi.com/definitions/3.0.0/message.json": { + "$id": "http://asyncapi.com/definitions/3.0.0/message.json", + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" }, - "$ref": { - "$ref": "http://asyncapi.com/definitions/3.0.0/ReferenceObject.json" + { + "oneOf": [ + { + "type": "object", + "required": [ + "oneOf" + ], + "additionalProperties": false, + "properties": { + "oneOf": { + "type": "array", + "items": { + "$ref": "http://asyncapi.com/definitions/3.0.0/message.json" + } + } + } + }, + { + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "properties": { + "schemaFormat": { + "type": "string" + }, + "contentType": { + "type": "string" + }, + "headers": { + "allOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" + }, + { + "properties": { + "type": { + "const": "object" + } + } + } + ] + }, + "messageId": { + "type": "string" + }, + "payload": {}, + "correlationId": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/correlationId.json" + } + ] + }, + "tags": { + "type": "array", + "items": { + "$ref": "http://asyncapi.com/definitions/3.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/3.0.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/3.0.0/messageBindingsObject.json" + }, + "traits": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/messageTrait.json" + }, + { + "type": "array", + "items": [ + { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/messageTrait.json" + } + ] + }, + { + "type": "object", + "additionalItems": true + } + ] + } + ] + } + } + } + } + ] } - } + ] }, "http://asyncapi.com/definitions/3.0.0/schema.json": { "$id": "http://asyncapi.com/definitions/3.0.0/schema.json", @@ -746,9 +914,12 @@ } } }, - "http://asyncapi.com/definitions/3.0.0/operation.json": { - "$id": "http://asyncapi.com/definitions/3.0.0/operation.json", + "http://asyncapi.com/definitions/3.0.0/correlationId.json": { + "$id": "http://asyncapi.com/definitions/3.0.0/correlationId.json", "type": "object", + "required": [ + "location" + ], "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { @@ -756,108 +927,14 @@ } }, "properties": { - "traits": { - "type": "array", - "items": { - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" - }, - { - "$ref": "http://asyncapi.com/definitions/3.0.0/operationTrait.json" - }, - { - "type": "array", - "items": [ - { - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" - }, - { - "$ref": "http://asyncapi.com/definitions/3.0.0/operationTrait.json" - } - ] - }, - { - "type": "object", - "additionalItems": true - } - ] - } - ] - } - }, - "summary": { - "type": "string" - }, "description": { - "type": "string" - }, - "security": { - "type": "array", - "items": { - "$ref": "http://asyncapi.com/definitions/3.0.0/SecurityRequirement.json" - } - }, - "tags": { - "type": "array", - "items": { - "$ref": "http://asyncapi.com/definitions/3.0.0/tag.json" - }, - "uniqueItems": true - }, - "externalDocs": { - "$ref": "http://asyncapi.com/definitions/3.0.0/externalDocs.json" - }, - "operationId": { - "type": "string" - }, - "bindings": { - "$ref": "http://asyncapi.com/definitions/3.0.0/bindingsObject.json" - }, - "message": { - "$ref": "http://asyncapi.com/definitions/3.0.0/message.json" - } - } - }, - "http://asyncapi.com/definitions/3.0.0/operationTrait.json": { - "$id": "http://asyncapi.com/definitions/3.0.0/operationTrait.json", - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" - } - }, - "properties": { - "summary": { - "type": "string" - }, - "description": { - "type": "string" - }, - "tags": { - "type": "array", - "items": { - "$ref": "http://asyncapi.com/definitions/3.0.0/tag.json" - }, - "uniqueItems": true - }, - "externalDocs": { - "$ref": "http://asyncapi.com/definitions/3.0.0/externalDocs.json" - }, - "operationId": { - "type": "string" - }, - "security": { - "type": "array", - "items": { - "$ref": "http://asyncapi.com/definitions/3.0.0/SecurityRequirement.json" - } + "type": "string", + "description": "A optional description of the correlation ID. GitHub Flavored Markdown is allowed." }, - "bindings": { - "$ref": "http://asyncapi.com/definitions/3.0.0/bindingsObject.json" + "location": { + "type": "string", + "description": "A runtime expression that specifies the location of the correlation ID", + "pattern": "^\\$message\\.(header|payload)#(\\/(([^\\/~])|(~[01]))*)*" } } }, @@ -872,195 +949,22 @@ "name": { "type": "string" }, - "description": { - "type": "string" - }, - "externalDocs": { - "$ref": "http://asyncapi.com/definitions/3.0.0/externalDocs.json" - } - }, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" - } - } - }, - "http://asyncapi.com/definitions/3.0.0/message.json": { - "$id": "http://asyncapi.com/definitions/3.0.0/message.json", - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" - }, - { - "oneOf": [ - { - "type": "object", - "required": [ - "oneOf" - ], - "additionalProperties": false, - "properties": { - "oneOf": { - "type": "array", - "items": { - "$ref": "http://asyncapi.com/definitions/3.0.0/message.json" - } - } - } - }, - { - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" - } - }, - "properties": { - "schemaFormat": { - "type": "string" - }, - "contentType": { - "type": "string" - }, - "headers": { - "allOf": [ - { - "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" - }, - { - "properties": { - "type": { - "const": "object" - } - } - } - ] - }, - "messageId": { - "type": "string" - }, - "payload": {}, - "correlationId": { - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" - }, - { - "$ref": "http://asyncapi.com/definitions/3.0.0/correlationId.json" - } - ] - }, - "tags": { - "type": "array", - "items": { - "$ref": "http://asyncapi.com/definitions/3.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/3.0.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/3.0.0/bindingsObject.json" - }, - "traits": { - "type": "array", - "items": { - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" - }, - { - "$ref": "http://asyncapi.com/definitions/3.0.0/messageTrait.json" - }, - { - "type": "array", - "items": [ - { - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" - }, - { - "$ref": "http://asyncapi.com/definitions/3.0.0/messageTrait.json" - } - ] - }, - { - "type": "object", - "additionalItems": true - } - ] - } - ] - } - } - } - } - ] + "description": { + "type": "string" + }, + "externalDocs": { + "$ref": "http://asyncapi.com/definitions/3.0.0/externalDocs.json" } - ] + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + } }, - "http://asyncapi.com/definitions/3.0.0/correlationId.json": { - "$id": "http://asyncapi.com/definitions/3.0.0/correlationId.json", + "http://asyncapi.com/definitions/3.0.0/messageBindingsObject.json": { + "$id": "http://asyncapi.com/definitions/3.0.0/messageBindingsObject.json", "type": "object", - "required": [ - "location" - ], "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { @@ -1068,15 +972,22 @@ } }, "properties": { - "description": { - "type": "string", - "description": "A optional description of the correlation ID. GitHub Flavored Markdown is allowed." - }, - "location": { - "type": "string", - "description": "A runtime expression that specifies the location of the correlation ID", - "pattern": "^\\$message\\.(header|payload)#(\\/(([^\\/~])|(~[01]))*)*" - } + "http": {}, + "ws": {}, + "amqp": {}, + "amqp1": {}, + "mqtt": {}, + "mqtt5": {}, + "kafka": {}, + "anypointmq": {}, + "nats": {}, + "jms": {}, + "sns": {}, + "sqs": {}, + "stomp": {}, + "redis": {}, + "ibmmq": {}, + "solace": {} } }, "http://asyncapi.com/definitions/3.0.0/messageTrait.json": { @@ -1159,8 +1070,224 @@ } }, "bindings": { - "$ref": "http://asyncapi.com/definitions/3.0.0/bindingsObject.json" + "$ref": "http://asyncapi.com/definitions/3.0.0/messageBindingsObject.json" + } + } + }, + "http://asyncapi.com/definitions/3.0.0/parameter.json": { + "$id": "http://asyncapi.com/definitions/3.0.0/parameter.json", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.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/3.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/3.0.0/ReferenceObject.json" + } + } + }, + "http://asyncapi.com/definitions/3.0.0/channelBindingsObject.json": { + "$id": "http://asyncapi.com/definitions/3.0.0/channelBindingsObject.json", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "properties": { + "http": {}, + "ws": {}, + "amqp": {}, + "amqp1": {}, + "mqtt": {}, + "mqtt5": {}, + "kafka": {}, + "anypointmq": {}, + "nats": {}, + "jms": {}, + "sns": {}, + "sqs": {}, + "stomp": {}, + "redis": {}, + "ibmmq": {}, + "solace": {} + } + }, + "http://asyncapi.com/definitions/3.0.0/operations.json": { + "$id": "http://asyncapi.com/definitions/3.0.0/operations.json", + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/operation.json" + } + ] + } + }, + "http://asyncapi.com/definitions/3.0.0/operation.json": { + "$id": "http://asyncapi.com/definitions/3.0.0/operation.json", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "required": [ + "action", + "channel" + ], + "properties": { + "action": { + "type": "string", + "description": "Allowed values are send and receive. Use send when it's expected that the application will send a message to the given channel, and receive when the application should expect receiving messages from the given channel.", + "enum": [ + "send", + "receive" + ] + }, + "channel": { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + "traits": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/operationTrait.json" + }, + { + "type": "array", + "items": [ + { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/operationTrait.json" + } + ] + }, + { + "type": "object", + "additionalItems": true + } + ] + } + ] + } + }, + "summary": { + "type": "string" + }, + "description": { + "type": "string" + }, + "security": { + "type": "array", + "items": { + "$ref": "http://asyncapi.com/definitions/3.0.0/SecurityRequirement.json" + } + }, + "tags": { + "type": "array", + "items": { + "$ref": "http://asyncapi.com/definitions/3.0.0/tag.json" + }, + "uniqueItems": true + }, + "externalDocs": { + "$ref": "http://asyncapi.com/definitions/3.0.0/externalDocs.json" + }, + "bindings": { + "$ref": "http://asyncapi.com/definitions/3.0.0/operationBindingsObject.json" + } + } + }, + "http://asyncapi.com/definitions/3.0.0/operationTrait.json": { + "$id": "http://asyncapi.com/definitions/3.0.0/operationTrait.json", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "properties": { + "action": { + "$ref": "http://asyncapi.com/definitions/3.0.0/operation.json#/properties/action" + }, + "channel": { + "$ref": "http://asyncapi.com/definitions/3.0.0/operation.json#/properties/channel" + }, + "summary": { + "$ref": "http://asyncapi.com/definitions/3.0.0/operation.json#/properties/summary" + }, + "description": { + "$ref": "http://asyncapi.com/definitions/3.0.0/operation.json#/properties/description" + }, + "security": { + "$ref": "http://asyncapi.com/definitions/3.0.0/operation.json#/properties/security" + }, + "tags": { + "$ref": "http://asyncapi.com/definitions/3.0.0/operation.json#/properties/tags" + }, + "externalDocs": { + "$ref": "http://asyncapi.com/definitions/3.0.0/operation.json#/properties/externalDocs" + }, + "bindings": { + "$ref": "http://asyncapi.com/definitions/3.0.0/operation.json#/properties/bindings" + } + } + }, + "http://asyncapi.com/definitions/3.0.0/operationBindingsObject.json": { + "$id": "http://asyncapi.com/definitions/3.0.0/operationBindingsObject.json", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" } + }, + "properties": { + "http": {}, + "ws": {}, + "amqp": {}, + "amqp1": {}, + "mqtt": {}, + "mqtt5": {}, + "kafka": {}, + "anypointmq": {}, + "nats": {}, + "jms": {}, + "sns": {}, + "sqs": {}, + "stomp": {}, + "redis": {}, + "ibmmq": {}, + "solace": {} } }, "http://asyncapi.com/definitions/3.0.0/components.json": { @@ -1821,6 +1948,29 @@ "$ref": "http://asyncapi.com/definitions/3.0.0/parameter.json" }, "description": "JSON objects describing re-usable channel parameters." + }, + "http://asyncapi.com/definitions/3.0.0/bindingsObject.json": { + "$id": "http://asyncapi.com/definitions/3.0.0/bindingsObject.json", + "type": "object", + "additionalProperties": true, + "properties": { + "http": {}, + "ws": {}, + "amqp": {}, + "amqp1": {}, + "mqtt": {}, + "mqtt5": {}, + "kafka": {}, + "anypointmq": {}, + "nats": {}, + "jms": {}, + "sns": {}, + "sqs": {}, + "stomp": {}, + "redis": {}, + "ibmmq": {}, + "solace": {} + } } }, "description": "!!Auto generated!! \n Do not manually edit. " From 09cf0c4a42acb9f11d3ac5eb9b17cb56cff5e330 Mon Sep 17 00:00:00 2001 From: asyncapi-bot Date: Thu, 27 Oct 2022 17:46:13 +0200 Subject: [PATCH 007/102] chore(release): v4.0.0-next-major-spec.1 (#283) --- package-lock.json | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index a5e620c7..7cca6536 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "@asyncapi/specs", - "version": "3.2.0-next-major-spec.1", + "version": "4.0.0-next-major-spec.1", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 1f5a530a..8dafd55e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@asyncapi/specs", - "version": "3.2.0-next-major-spec.1", + "version": "4.0.0-next-major-spec.1", "description": "AsyncAPI schema versions", "main": "index.js", "scripts": { From dc2fd831ffd118741e1ea71760d3488b852570fa Mon Sep 17 00:00:00 2001 From: jonaslagoni Date: Fri, 9 Dec 2022 19:01:55 +0100 Subject: [PATCH 008/102] Update packagelock --- package-lock.json | 46 +++++++++++++++++++++++----------------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/package-lock.json b/package-lock.json index 04a235b2..7f55f229 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "@asyncapi/specs", - "version": "4.0.1", + "version": "4.0.0-next-major-spec.1", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -5189,7 +5189,7 @@ "once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", "dev": true, "requires": { "wrappy": "1" @@ -5294,7 +5294,7 @@ "path-is-absolute": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", "dev": true }, "path-key": { @@ -5318,13 +5318,13 @@ "pify": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha512-C3FsVNH1udSEX48gGX1xfvwTWfsYWj5U+8/uK15BGzIGrKoUpghX8hWZwa/OFnakBiiVNmBvemTJR5mcy7iPcg==", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", "dev": true }, "pkg-conf": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/pkg-conf/-/pkg-conf-2.1.0.tgz", - "integrity": "sha512-C+VUP+8jis7EsQZIhDYmS5qlNtjv2yP4SNtjXK9AP1ZcTRlnSfuumaTnRfYZnYgUUYVIKqL0fRvmUGDV2fmp6g==", + "integrity": "sha1-ISZRTKbyq/69FoWW3xi6V4Z/AFg=", "dev": true, "requires": { "find-up": "^2.0.0", @@ -5458,7 +5458,7 @@ "q": { "version": "1.5.1", "resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz", - "integrity": "sha512-kV/CThkXo6xyFEZUugw/+pIOywXcDbFYgSct5cT3gqlbkBE1SJdwy6UQoZvodiWF/ckQLZyDE/Bu1M6gVu5lVw==", + "integrity": "sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc=", "dev": true }, "queue-microtask": { @@ -5649,7 +5649,7 @@ "release-zalgo": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/release-zalgo/-/release-zalgo-1.0.0.tgz", - "integrity": "sha512-gUAyHVHPPC5wdqX/LG4LWtRYtgjxyX78oanFNTMMyFEfOqdC54s3eE82imuWKbOeqYht2CrNf64Qb8vgmmtZGA==", + "integrity": "sha1-CXALflB0Mpc5Mw5TXFqQ+2eFFzA=", "dev": true, "requires": { "es6-error": "^4.0.1" @@ -5658,7 +5658,7 @@ "require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", + "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", "dev": true }, "require-main-filename": { @@ -7736,7 +7736,7 @@ "set-blocking": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", - "integrity": "sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==", + "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", "dev": true }, "shebang-command": { @@ -7815,7 +7815,7 @@ "figures": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/figures/-/figures-2.0.0.tgz", - "integrity": "sha512-Oa2M9atig69ZkfwiApY8F2Yy+tzMbazyvqv21R0NsSC8floSOC09BbT1ITWAdoMGQvJ/aZnR1KMwdx9tvHnTNA==", + "integrity": "sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI=", "dev": true, "requires": { "escape-string-regexp": "^1.0.5" @@ -7853,7 +7853,7 @@ "spawn-error-forwarder": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/spawn-error-forwarder/-/spawn-error-forwarder-1.0.0.tgz", - "integrity": "sha512-gRjMgK5uFjbCvdibeGJuy3I5OYz6VLoVdsOJdA6wV0WlfQVLFueoqMxwwYD9RODdgb6oUIvlRlsyFSiQkMKu0g==", + "integrity": "sha1-Gv2Uc46ZmwNG17n8NzvlXgdXcCk=", "dev": true }, "spawn-wrap": { @@ -7936,13 +7936,13 @@ "sprintf-js": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", + "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", "dev": true }, "stream-combiner2": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/stream-combiner2/-/stream-combiner2-1.1.1.tgz", - "integrity": "sha512-3PnJbYgS56AeWgtKF5jtJRT6uFJe56Z0Hc5Ngg/6sI6rIt8iiMBTa9cvdyFfpMQjaVHr8dusbNeFGIIonxOvKw==", + "integrity": "sha1-+02KFCDqNidk4hrUeAOXvry0HL4=", "dev": true, "requires": { "duplexer2": "~0.1.0", @@ -8087,7 +8087,7 @@ "through": { "version": "2.3.8", "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", - "integrity": "sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==", + "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", "dev": true }, "through2": { @@ -8115,7 +8115,7 @@ "to-fast-properties": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", - "integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==", + "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=", "dev": true }, "to-regex-range": { @@ -8130,13 +8130,13 @@ "tr46": { "version": "0.0.3", "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", - "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==", + "integrity": "sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o=", "dev": true }, "traverse": { "version": "0.6.6", "resolved": "https://registry.npmjs.org/traverse/-/traverse-0.6.6.tgz", - "integrity": "sha512-kdf4JKs8lbARxWdp7RKdNzoJBhGUcIalSYibuGyHJbmk40pOysQ0+QPvlkCOICOivDWU2IJo2rkrxyTK2AH4fw==", + "integrity": "sha1-y99WD9e5r2MlAv7UD5GMFX6pcTc=", "dev": true }, "trim-newlines": { @@ -8191,7 +8191,7 @@ "util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", "dev": true }, "validate-npm-package-license": { @@ -8207,13 +8207,13 @@ "webidl-conversions": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", - "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==", + "integrity": "sha1-JFNCdeKnvGvnvIZhHMFq4KVlSHE=", "dev": true }, "whatwg-url": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", - "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", + "integrity": "sha1-lmRU6HZUYuN2RNNib2dCzotwll0=", "dev": true, "requires": { "tr46": "~0.0.3", @@ -8232,13 +8232,13 @@ "which-module": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", - "integrity": "sha512-B+enWhmw6cjfVC7kS8Pj9pCrKSc5txArRyaYGe088shv/FGWH+0Rjx/xPgtsWfsUtS27FkP697E4DDhgrgoc0Q==", + "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", "dev": true }, "wordwrap": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", - "integrity": "sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q==", + "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=", "dev": true }, "workerpool": { @@ -8250,7 +8250,7 @@ "wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", "dev": true }, "write-file-atomic": { From f5a2346b0b8dba41fb47dff31bd84a43cea0ae47 Mon Sep 17 00:00:00 2001 From: Jonas Lagoni Date: Wed, 1 Feb 2023 17:10:19 +0100 Subject: [PATCH 009/102] feat: add binding validation (#239) --- CODEOWNERS | 11 +- bindings/amqp/{ => 0.2.0}/channel.json | 7 +- bindings/amqp/{ => 0.2.0}/message.json | 6 +- bindings/amqp/{ => 0.2.0}/operation.json | 6 +- bindings/anypointmq/{ => 0.0.1}/channel.json | 6 +- bindings/anypointmq/{ => 0.0.1}/message.json | 8 +- bindings/googlepubsub/0.1.0/channel.json | 88 + bindings/googlepubsub/0.1.0/message.json | 55 + bindings/http/{ => 0.1.0}/message.json | 8 +- bindings/http/{ => 0.1.0}/operation.json | 8 +- bindings/ibmmq/{ => 0.1.0}/channel.json | 6 +- bindings/ibmmq/{ => 0.1.0}/message.json | 6 +- bindings/ibmmq/{ => 0.1.0}/server.json | 6 +- bindings/kafka/{ => 0.1.0}/message.json | 8 +- bindings/kafka/{ => 0.1.0}/operation.json | 10 +- bindings/kafka/0.3.0/channel.json | 46 + bindings/kafka/0.3.0/message.json | 61 + bindings/kafka/0.3.0/operation.json | 48 + bindings/kafka/0.3.0/server.json | 38 + bindings/mqtt/{ => 0.1.0}/message.json | 6 +- bindings/mqtt/{ => 0.1.0}/operation.json | 6 +- bindings/mqtt/{ => 0.1.0}/server.json | 7 +- bindings/nats/{ => 0.1.0}/operation.json | 6 +- bindings/pulsar/0.1.0/channel.json | 92 + bindings/pulsar/0.1.0/server.json | 32 + bindings/solace/{ => 0.2.0}/operation.json | 2 +- bindings/solace/{ => 0.2.0}/server.json | 6 +- bindings/solace/0.3.0/operation.json | 114 + bindings/solace/0.3.0/server.json | 32 + bindings/websockets/{ => 0.1.0}/channel.json | 10 +- definitions/3.0.0/channelBindingsObject.json | 72 +- definitions/3.0.0/components.json | 8 +- definitions/3.0.0/messageBindingsObject.json | 58 +- .../3.0.0/operationBindingsObject.json | 52 +- definitions/3.0.0/serverBindingsObject.json | 48 +- index.js | 2 +- package-lock.json | 793 +++--- package.json | 5 +- schemas/3.0.0.json | 2173 +++++++++++++++-- test/docs/3.0.0/streetlights-all.json | 61 + test/schemas.js | 33 + tools/bundler/index.js | 41 +- 42 files changed, 3428 insertions(+), 663 deletions(-) rename bindings/amqp/{ => 0.2.0}/channel.json (94%) rename bindings/amqp/{ => 0.2.0}/message.json (79%) rename bindings/amqp/{ => 0.2.0}/operation.json (90%) rename bindings/anypointmq/{ => 0.0.1}/channel.json (86%) rename bindings/anypointmq/{ => 0.0.1}/message.json (76%) create mode 100644 bindings/googlepubsub/0.1.0/channel.json create mode 100644 bindings/googlepubsub/0.1.0/message.json rename bindings/http/{ => 0.1.0}/message.json (73%) rename bindings/http/{ => 0.1.0}/operation.json (87%) rename bindings/ibmmq/{ => 0.1.0}/channel.json (94%) rename bindings/ibmmq/{ => 0.1.0}/message.json (91%) rename bindings/ibmmq/{ => 0.1.0}/server.json (91%) rename bindings/kafka/{ => 0.1.0}/message.json (68%) rename bindings/kafka/{ => 0.1.0}/operation.json (66%) create mode 100644 bindings/kafka/0.3.0/channel.json create mode 100644 bindings/kafka/0.3.0/message.json create mode 100644 bindings/kafka/0.3.0/operation.json create mode 100644 bindings/kafka/0.3.0/server.json rename bindings/mqtt/{ => 0.1.0}/message.json (71%) rename bindings/mqtt/{ => 0.1.0}/operation.json (81%) rename bindings/mqtt/{ => 0.1.0}/server.json (90%) rename bindings/nats/{ => 0.1.0}/operation.json (76%) create mode 100644 bindings/pulsar/0.1.0/channel.json create mode 100644 bindings/pulsar/0.1.0/server.json rename bindings/solace/{ => 0.2.0}/operation.json (97%) rename bindings/solace/{ => 0.2.0}/server.json (78%) create mode 100644 bindings/solace/0.3.0/operation.json create mode 100644 bindings/solace/0.3.0/server.json rename bindings/websockets/{ => 0.1.0}/channel.json (75%) create mode 100644 test/docs/3.0.0/streetlights-all.json create mode 100644 test/schemas.js diff --git a/CODEOWNERS b/CODEOWNERS index 23129c54..5fc5affa 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -6,4 +6,13 @@ # The default owners are automatically added as reviewers when you open a pull request unless different owners are specified in the file. -* @fmvilas @derberg @dalelane @smoya @char0n @asyncapi-bot-eve \ No newline at end of file +* @fmvilas @derberg @dalelane @smoya @char0n @asyncapi-bot-eve + + +/bindings/anypointmq/ @GeraldLoeffler +/bindings/ibmmq/ @rcoppen +/bindings/kafka/ @lbroudoux @dalelane +/bindings/googlepubsub/ @whitlockjc +/bindings/solace/ @damaru-inc @CameronRushton +/bindings/*.json @KhudaDad414 +/bindings/pulsar/ @VisualBean \ No newline at end of file diff --git a/bindings/amqp/channel.json b/bindings/amqp/0.2.0/channel.json similarity index 94% rename from bindings/amqp/channel.json rename to bindings/amqp/0.2.0/channel.json index 0ef1d292..ae692fa1 100644 --- a/bindings/amqp/channel.json +++ b/bindings/amqp/0.2.0/channel.json @@ -1,13 +1,13 @@ { "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "http://asyncapi.com/bindings/amqp/channel.json", + "$id": "http://asyncapi.com/bindings/amqp/0.2.0/channel.json", "title": "AMQP channel bindings object", "description": "This object contains information about the channel representation in AMQP.", "type": "object", "additionalProperties": false, "patternProperties": { - "^x-[\\w\\d\\.\\-\\_]+$": { - "$ref": "https://raw.githubusercontent.com/asyncapi/asyncapi-node/v2.7.7/schemas/2.0.0.json#/definitions/specificationExtension" + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" } }, "properties": { @@ -80,7 +80,6 @@ ], "description": "The version of this binding. If omitted, 'latest' MUST be assumed." } - }, "oneOf": [ { diff --git a/bindings/amqp/message.json b/bindings/amqp/0.2.0/message.json similarity index 79% rename from bindings/amqp/message.json rename to bindings/amqp/0.2.0/message.json index 5ec49ac6..3a213d19 100644 --- a/bindings/amqp/message.json +++ b/bindings/amqp/0.2.0/message.json @@ -1,13 +1,13 @@ { "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "http://asyncapi.com/bindings/amqp/message.json", + "$id": "http://asyncapi.com/bindings/amqp/0.2.0/message.json", "title": "AMQP message bindings object", "description": "This object contains information about the message representation in AMQP.", "type": "object", "additionalProperties": false, "patternProperties": { - "^x-[\\w\\d\\.\\-\\_]+$": { - "$ref": "https://raw.githubusercontent.com/asyncapi/asyncapi-node/v2.7.7/schemas/2.0.0.json#/definitions/specificationExtension" + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" } }, "properties": { diff --git a/bindings/amqp/operation.json b/bindings/amqp/0.2.0/operation.json similarity index 90% rename from bindings/amqp/operation.json rename to bindings/amqp/0.2.0/operation.json index c01cd405..f39900f3 100644 --- a/bindings/amqp/operation.json +++ b/bindings/amqp/0.2.0/operation.json @@ -1,13 +1,13 @@ { "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "http://asyncapi.com/bindings/amqp/operation.json", + "$id": "http://asyncapi.com/bindings/amqp/0.2.0/operation.json", "title": "AMQP operation bindings object", "description": "This object contains information about the operation representation in AMQP.", "type": "object", "additionalProperties": false, "patternProperties": { - "^x-[\\w\\d\\.\\-\\_]+$": { - "$ref": "https://raw.githubusercontent.com/asyncapi/asyncapi-node/v2.7.7/schemas/2.0.0.json#/definitions/specificationExtension" + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" } }, "properties": { diff --git a/bindings/anypointmq/channel.json b/bindings/anypointmq/0.0.1/channel.json similarity index 86% rename from bindings/anypointmq/channel.json rename to bindings/anypointmq/0.0.1/channel.json index 8a994e38..554a842b 100644 --- a/bindings/anypointmq/channel.json +++ b/bindings/anypointmq/0.0.1/channel.json @@ -1,13 +1,13 @@ { "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "http://asyncapi.com/bindings/anypointmq/channel.json", + "$id": "http://asyncapi.com/bindings/anypointmq/0.0.1/channel.json", "title": "Anypoint MQ channel bindings object", "description": "This object contains configuration for describing an Anypoint MQ exchange, queue, or FIFO queue as an AsyncAPI channel. This objects only contains configuration that can not be provided in the AsyncAPI standard channel object.", "type": "object", "additionalProperties": false, "patternProperties": { - "^x-[\\w\\d\\.\\-\\_]+$": { - "$ref": "https://raw.githubusercontent.com/asyncapi/asyncapi-node/v2.7.7/schemas/2.0.0.json#/definitions/specificationExtension" + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" } }, "properties": { diff --git a/bindings/anypointmq/message.json b/bindings/anypointmq/0.0.1/message.json similarity index 76% rename from bindings/anypointmq/message.json rename to bindings/anypointmq/0.0.1/message.json index 3b4b0d68..16075b90 100644 --- a/bindings/anypointmq/message.json +++ b/bindings/anypointmq/0.0.1/message.json @@ -1,18 +1,18 @@ { "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "http://asyncapi.com/bindings/anypointmq/message.json", + "$id": "http://asyncapi.com/bindings/anypointmq/0.0.1/message.json", "title": "Anypoint MQ message bindings object", "description": "This object contains configuration for describing an Anypoint MQ message as an AsyncAPI message. This objects only contains configuration that can not be provided in the AsyncAPI standard message object.", "type": "object", "additionalProperties": false, "patternProperties": { - "^x-[\\w\\d\\.\\-\\_]+$": { - "$ref": "https://raw.githubusercontent.com/asyncapi/asyncapi-node/v2.7.7/schemas/2.0.0.json#/definitions/specificationExtension" + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" } }, "properties": { "headers": { - "$ref": "https://raw.githubusercontent.com/asyncapi/asyncapi-node/v2.7.7/schemas/2.0.0.json#/definitions/schema", + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json", "description": "A Schema object containing the definitions for Anypoint MQ-specific headers (protocol headers). This schema MUST be of type 'object' and have a 'properties' key. Examples of Anypoint MQ protocol headers are 'messageId' and 'messageGroupId'." }, "bindingVersion": { diff --git a/bindings/googlepubsub/0.1.0/channel.json b/bindings/googlepubsub/0.1.0/channel.json new file mode 100644 index 00000000..6a8105f5 --- /dev/null +++ b/bindings/googlepubsub/0.1.0/channel.json @@ -0,0 +1,88 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/bindings/googlepubsub/0.1.0/channel.json", + "title": "Cloud Pub/Sub Channel Schema", + "description": "This object contains information about the channel representation for Google Cloud Pub/Sub.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "properties": { + "bindingVersion": { + "type": "string", + "enum": [ + "0.1.0" + ], + "description": "The version of this binding." + }, + "labels": { + "type": "object" + }, + "messageRetentionDuration": { + "type": "string" + }, + "messageStoragePolicy": { + "type": "object", + "additionalProperties": false, + "properties": { + "allowedPersistenceRegions": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "schemaSettings": { + "type": "object", + "additionalItems": false, + "properties": { + "encoding": { + "type": "string" + }, + "firstRevisionId": { + "type": "string" + }, + "lastRevisionId": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "encoding", + "name" + ] + }, + "topic": { + "type": "string" + } + }, + "required": [ + "schemaSettings", + "topic" + ], + "examples": [ + { + "labels": { + "label1": "value1", + "label2": "value2" + }, + "messageRetentionDuration": "86400s", + "messageStoragePolicy": { + "allowedPersistenceRegions": [ + "us-central1", + "us-east1" + ] + }, + "schemaSettings": { + "encoding": "json", + "name": "projects/your-project-id/schemas/your-schema" + } + } + ] +} \ No newline at end of file diff --git a/bindings/googlepubsub/0.1.0/message.json b/bindings/googlepubsub/0.1.0/message.json new file mode 100644 index 00000000..08f815ff --- /dev/null +++ b/bindings/googlepubsub/0.1.0/message.json @@ -0,0 +1,55 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/bindings/googlepubsub/0.1.0/message.json", + "title": "Cloud Pub/Sub Channel Schema", + "description": "This object contains information about the message representation for Google Cloud Pub/Sub.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "properties": { + "bindingVersion": { + "type": "string", + "enum": [ + "0.1.0" + ], + "description": "The version of this binding." + }, + "attributes": { + "type": "object" + }, + "orderingKey": { + "type": "string" + }, + "schema": { + "type": "object", + "additionalItems": false, + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "required": ["name", "type"] + } + }, + "examples": [ + { + "schema": { + "name": "projects/your-project-id/schemas/your-avro-schema-id", + "type": "avro" + } + }, + { + "schema": { + "name": "projects/your-project-id/schemas/your-protobuf-schema-id", + "type": "protobuf" + } + } + ] +} \ No newline at end of file diff --git a/bindings/http/message.json b/bindings/http/0.1.0/message.json similarity index 73% rename from bindings/http/message.json rename to bindings/http/0.1.0/message.json index 151e979f..7295151a 100644 --- a/bindings/http/message.json +++ b/bindings/http/0.1.0/message.json @@ -1,18 +1,18 @@ { "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "http://asyncapi.com/bindings/http/message.json", + "$id": "http://asyncapi.com/bindings/http/0.1.0/message.json", "title": "HTTP message bindings object", "description": "This object contains information about the message representation in HTTP.", "type": "object", "additionalProperties": false, "patternProperties": { - "^x-[\\w\\d\\.\\-\\_]+$": { - "$ref": "https://raw.githubusercontent.com/asyncapi/asyncapi-node/v2.7.7/schemas/2.0.0.json#/definitions/specificationExtension" + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" } }, "properties": { "headers": { - "$ref": "https://raw.githubusercontent.com/asyncapi/asyncapi-node/v2.7.7/schemas/2.0.0.json#/definitions/schema", + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json", "description": "\tA Schema object containing the definitions for HTTP-specific headers. This schema MUST be of type 'object' and have a 'properties' key." }, "bindingVersion": { diff --git a/bindings/http/operation.json b/bindings/http/0.1.0/operation.json similarity index 87% rename from bindings/http/operation.json rename to bindings/http/0.1.0/operation.json index d9329440..61119a7a 100644 --- a/bindings/http/operation.json +++ b/bindings/http/0.1.0/operation.json @@ -1,13 +1,13 @@ { "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "http://asyncapi.com/bindings/http/operation.json", + "$id": "http://asyncapi.com/bindings/http/0.1.0/operation.json", "title": "HTTP operation bindings object", "description": "This object contains information about the operation representation in HTTP.", "type": "object", "additionalProperties": false, "patternProperties": { - "^x-[\\w\\d\\.\\-\\_]+$": { - "$ref": "https://raw.githubusercontent.com/asyncapi/asyncapi-node/v2.7.7/schemas/2.0.0.json#/definitions/specificationExtension" + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" } }, "properties": { @@ -35,7 +35,7 @@ "description": "When 'type' is 'request', this is the HTTP method, otherwise it MUST be ignored. Its value MUST be one of 'GET', 'POST', 'PUT', 'PATCH', 'DELETE', 'HEAD', 'OPTIONS', 'CONNECT', and 'TRACE'." }, "query": { - "$ref": "https://raw.githubusercontent.com/asyncapi/asyncapi-node/v2.7.7/schemas/2.0.0.json#/definitions/schema", + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json", "description": "A Schema object containing the definitions for each query parameter. This schema MUST be of type 'object' and have a properties key." }, "bindingVersion": { diff --git a/bindings/ibmmq/channel.json b/bindings/ibmmq/0.1.0/channel.json similarity index 94% rename from bindings/ibmmq/channel.json rename to bindings/ibmmq/0.1.0/channel.json index 7dae8eac..85ea1a14 100644 --- a/bindings/ibmmq/channel.json +++ b/bindings/ibmmq/0.1.0/channel.json @@ -1,13 +1,13 @@ { "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "http://asyncapi.com/bindings/ibmmq/channel.json", + "$id": "http://asyncapi.com/bindings/ibmmq/0.1.0/channel.json", "title": "IBM MQ channel bindings object", "description": "This object contains information about the channel representation in IBM MQ. Each channel corresponds to a Queue or Topic within IBM MQ.", "type": "object", "additionalProperties": false, "patternProperties": { - "^x-[\\w\\d\\.\\-\\_]+$": { - "$ref": "https://raw.githubusercontent.com/asyncapi/asyncapi-node/v2.7.7/schemas/2.0.0.json#/definitions/specificationExtension" + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" } }, "properties": { diff --git a/bindings/ibmmq/message.json b/bindings/ibmmq/0.1.0/message.json similarity index 91% rename from bindings/ibmmq/message.json rename to bindings/ibmmq/0.1.0/message.json index 69cb0075..6cc28494 100644 --- a/bindings/ibmmq/message.json +++ b/bindings/ibmmq/0.1.0/message.json @@ -1,13 +1,13 @@ { "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "http://asyncapi.com/bindings/ibmmq/message.json", + "$id": "http://asyncapi.com/bindings/ibmmq/0.1.0/message.json", "title": "IBM MQ message bindings object", "description": "This object contains information about the message representation in IBM MQ.", "type": "object", "additionalProperties": false, "patternProperties": { - "^x-[\\w\\d\\.\\-\\_]+$": { - "$ref": "https://raw.githubusercontent.com/asyncapi/asyncapi-node/v2.7.7/schemas/2.0.0.json#/definitions/specificationExtension" + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" } }, "properties": { diff --git a/bindings/ibmmq/server.json b/bindings/ibmmq/0.1.0/server.json similarity index 91% rename from bindings/ibmmq/server.json rename to bindings/ibmmq/0.1.0/server.json index 576bf50a..20533493 100644 --- a/bindings/ibmmq/server.json +++ b/bindings/ibmmq/0.1.0/server.json @@ -1,13 +1,13 @@ { "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "http://asyncapi.com/bindings/ibmmq/server.json", + "$id": "http://asyncapi.com/bindings/ibmmq/0.1.0/server.json", "title": "IBM MQ server bindings object", "description": "This object contains server connection information about the IBM MQ server, referred to as an IBM MQ queue manager. This object contains additional connectivity information not possible to represent within the core AsyncAPI specification.", "type": "object", "additionalProperties": false, "patternProperties": { - "^x-[\\w\\d\\.\\-\\_]+$": { - "$ref": "https://raw.githubusercontent.com/asyncapi/asyncapi-node/v2.7.7/schemas/2.0.0.json#/definitions/specificationExtension" + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" } }, "properties": { diff --git a/bindings/kafka/message.json b/bindings/kafka/0.1.0/message.json similarity index 68% rename from bindings/kafka/message.json rename to bindings/kafka/0.1.0/message.json index da96c722..85c3b946 100644 --- a/bindings/kafka/message.json +++ b/bindings/kafka/0.1.0/message.json @@ -1,17 +1,17 @@ { "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "http://asyncapi.com/bindings/kafka/message.json", + "$id": "http://asyncapi.com/bindings/kafka/0.1.0/message.json", "title": "Kafka message bindings object", "type": "object", "additionalProperties": false, "patternProperties": { - "^x-[\\w\\d\\.\\-\\_]+$": { - "$ref": "https://raw.githubusercontent.com/asyncapi/asyncapi-node/v2.7.7/schemas/2.0.0.json#/definitions/specificationExtension" + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" } }, "properties": { "key": { - "$ref": "https://raw.githubusercontent.com/asyncapi/asyncapi-node/v2.7.7/schemas/2.0.0.json#/definitions/schema", + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json", "description": "The message key." }, "bindingVersion": { diff --git a/bindings/kafka/operation.json b/bindings/kafka/0.1.0/operation.json similarity index 66% rename from bindings/kafka/operation.json rename to bindings/kafka/0.1.0/operation.json index 9ae5b11d..e37748ef 100644 --- a/bindings/kafka/operation.json +++ b/bindings/kafka/0.1.0/operation.json @@ -1,22 +1,22 @@ { "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "http://asyncapi.com/bindings/kafka/operation.json", + "$id": "http://asyncapi.com/bindings/kafka/0.1.0/operation.json", "title": "Kafka operation message bindings object", "description": "This object contains information about the operation representation in Kafka.", "type": "object", "additionalProperties": false, "patternProperties": { - "^x-[\\w\\d\\.\\-\\_]+$": { - "$ref": "https://raw.githubusercontent.com/asyncapi/asyncapi-node/v2.7.7/schemas/2.0.0.json#/definitions/specificationExtension" + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" } }, "properties": { "groupId": { - "$ref": "https://raw.githubusercontent.com/asyncapi/asyncapi-node/v2.7.7/schemas/2.0.0.json#/definitions/schema", + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json", "description": "Id of the consumer group." }, "clientId": { - "$ref": "https://raw.githubusercontent.com/asyncapi/asyncapi-node/v2.7.7/schemas/2.0.0.json#/definitions/schema", + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json", "description": "Id of the consumer inside a consumer group." }, "bindingVersion": { diff --git a/bindings/kafka/0.3.0/channel.json b/bindings/kafka/0.3.0/channel.json new file mode 100644 index 00000000..91946b2a --- /dev/null +++ b/bindings/kafka/0.3.0/channel.json @@ -0,0 +1,46 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/bindings/kafka/0.3.0/channel.json", + "title": "Channel Schema", + "description": "This object contains information about the channel representation in Kafka.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "properties": { + "topic": { + "type": "string", + "description": "Kafka topic name if different from channel name." + }, + "partitions": { + "type": "integer", + "minimum": 1, + "description": "Number of partitions configured on this topic." + }, + "replicas": { + "type": "integer", + "minimum": 1, + "description": "Number of replicas configured on this topic." + }, + "bindingVersion": { + "type": "string", + "enum": [ + "0.3.0" + ], + "description": "The version of this binding. If omitted, 'latest' MUST be assumed." + } + + }, + "examples": [ + { + "topic": "my-specific-topic", + "partitions": 20, + "replicas": 3, + "bindingVersion": "0.3.0" + } + ] + } + \ No newline at end of file diff --git a/bindings/kafka/0.3.0/message.json b/bindings/kafka/0.3.0/message.json new file mode 100644 index 00000000..8d94ac9c --- /dev/null +++ b/bindings/kafka/0.3.0/message.json @@ -0,0 +1,61 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/bindings/kafka/0.3.0/message.json", + "title": "Message Schema", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "properties": { + "key": { + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json", + "description": "The message key." + }, + "schemaIdLocation": { + "type": "string", + "description": "If a Schema Registry is used when performing this operation, tells where the id of schema is stored.", + "enum": ["header", "payload"] + }, + "schemaIdPayloadEncoding": { + "type": "string", + "description": "Number of bytes or vendor specific values when schema id is encoded in payload." + }, + "schemaLookupStrategy": { + "type": "string", + "description": "Freeform string for any naming strategy class to use. Clients should default to the vendor default if not supplied." + }, + "bindingVersion": { + "type": "string", + "enum": [ + "0.3.0" + ], + "description": "The version of this binding. If omitted, 'latest' MUST be assumed." + } + + }, + "examples": [ + { + "key": { + "type": "string", + "enum": [ + "myKey" + ] + }, + "schemaIdLocation": "payload", + "schemaIdPayloadEncoding": "apicurio-new", + "schemaLookupStrategy": "TopicIdStrategy", + "bindingVersion": "0.3.0" + }, + { + "key": { + "$ref": "path/to/user-create.avsc#/UserCreate" + }, + "schemaIdLocation": "payload", + "schemaIdPayloadEncoding": "4", + "bindingVersion": "0.3.0" + } + ] +} diff --git a/bindings/kafka/0.3.0/operation.json b/bindings/kafka/0.3.0/operation.json new file mode 100644 index 00000000..f7e30e29 --- /dev/null +++ b/bindings/kafka/0.3.0/operation.json @@ -0,0 +1,48 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/bindings/kafka/0.3.0/operation.json", + "title": "Operation Schema", + "description": "This object contains information about the operation representation in Kafka.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "properties": { + "groupId": { + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json", + "description": "Id of the consumer group." + }, + "clientId": { + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json", + "description": "Id of the consumer inside a consumer group." + }, + "bindingVersion": { + "type": "string", + "enum": [ + "0.3.0" + ], + "description": "The version of this binding. If omitted, 'latest' MUST be assumed." + } + + }, + "examples": [ + { + "groupId": { + "type": "string", + "enum": [ + "myGroupId" + ] + }, + "clientId": { + "type": "string", + "enum": [ + "myClientId" + ] + }, + "bindingVersion": "0.3.0" + } + ] +} diff --git a/bindings/kafka/0.3.0/server.json b/bindings/kafka/0.3.0/server.json new file mode 100644 index 00000000..4f8b3c7a --- /dev/null +++ b/bindings/kafka/0.3.0/server.json @@ -0,0 +1,38 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/bindings/kafka/0.3.0/server.json", + "title": "Server Schema", + "description": "This object contains server connection information to a Kafka broker. This object contains additional information not possible to represent within the core AsyncAPI specification.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "properties": { + "schemaRegistryUrl": { + "type": "string", + "description": "API URL for the Schema Registry used when producing Kafka messages (if a Schema Registry was used)." + }, + "schemaRegistryVendor": { + "type": "string", + "description": "The vendor of the Schema Registry and Kafka serdes library that should be used." + }, + "bindingVersion": { + "type": "string", + "enum": [ + "0.3.0" + ], + "description": "The version of this binding." + } + }, + "examples": [ + { + "schemaRegistryUrl": "https://my-schema-registry.com", + "schemaRegistryVendor": "confluent", + "bindingVersion": "0.3.0" + } + ] + } + \ No newline at end of file diff --git a/bindings/mqtt/message.json b/bindings/mqtt/0.1.0/message.json similarity index 71% rename from bindings/mqtt/message.json rename to bindings/mqtt/0.1.0/message.json index de3211c2..6a36e454 100644 --- a/bindings/mqtt/message.json +++ b/bindings/mqtt/0.1.0/message.json @@ -1,13 +1,13 @@ { "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "http://asyncapi.com/bindings/mqtt/message.json", + "$id": "http://asyncapi.com/bindings/mqtt/0.1.0/message.json", "title": "MQTT message bindings object", "description": "This object contains information about the message representation in MQTT.", "type": "object", "additionalProperties": false, "patternProperties": { - "^x-[\\w\\d\\.\\-\\_]+$": { - "$ref": "https://raw.githubusercontent.com/asyncapi/asyncapi-node/v2.7.7/schemas/2.0.0.json#/definitions/specificationExtension" + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" } }, "properties": { diff --git a/bindings/mqtt/operation.json b/bindings/mqtt/0.1.0/operation.json similarity index 81% rename from bindings/mqtt/operation.json rename to bindings/mqtt/0.1.0/operation.json index f88cbb3a..57f5f718 100644 --- a/bindings/mqtt/operation.json +++ b/bindings/mqtt/0.1.0/operation.json @@ -1,13 +1,13 @@ { "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "http://asyncapi.com/bindings/mqtt/operation.json", + "$id": "http://asyncapi.com/bindings/mqtt/0.1.0/operation.json", "title": "MQTT operation bindings object", "description": "This object contains information about the operation representation in MQTT.", "type": "object", "additionalProperties": false, "patternProperties": { - "^x-[\\w\\d\\.\\-\\_]+$": { - "$ref": "https://raw.githubusercontent.com/asyncapi/asyncapi-node/v2.7.7/schemas/2.0.0.json#/definitions/specificationExtension" + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" } }, "properties": { diff --git a/bindings/mqtt/server.json b/bindings/mqtt/0.1.0/server.json similarity index 90% rename from bindings/mqtt/server.json rename to bindings/mqtt/0.1.0/server.json index c379848a..5190fed0 100644 --- a/bindings/mqtt/server.json +++ b/bindings/mqtt/0.1.0/server.json @@ -1,17 +1,16 @@ { "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "http://asyncapi.com/bindings/mqtt/server.json", + "$id": "http://asyncapi.com/bindings/mqtt/0.1.0/server.json", "title": "MQTT server bindings object", "description": "This object contains information about the server representation in MQTT.", "type": "object", "additionalProperties": false, "patternProperties": { - "^x-[\\w\\d\\.\\-\\_]+$": { - "$ref": "https://raw.githubusercontent.com/asyncapi/asyncapi-node/v2.7.7/schemas/2.0.0.json#/definitions/specificationExtension" + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" } }, "properties": { - "clientId": { "type": "string", "description": "The client identifier." diff --git a/bindings/nats/operation.json b/bindings/nats/0.1.0/operation.json similarity index 76% rename from bindings/nats/operation.json rename to bindings/nats/0.1.0/operation.json index 9955a21e..9a75fd15 100644 --- a/bindings/nats/operation.json +++ b/bindings/nats/0.1.0/operation.json @@ -1,13 +1,13 @@ { "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "http://asyncapi.com/bindings/nats/operation.json", + "$id": "http://asyncapi.com/bindings/nats/0.1.0/operation.json", "title": "NATS operation bindings object", "description": "This object contains information about the operation representation in NATS.", "type": "object", "additionalProperties": false, "patternProperties": { - "^x-[\\w\\d\\.\\-\\_]+$": { - "$ref": "https://raw.githubusercontent.com/asyncapi/asyncapi-node/v2.7.7/schemas/2.0.0.json#/definitions/specificationExtension" + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" } }, "properties": { diff --git a/bindings/pulsar/0.1.0/channel.json b/bindings/pulsar/0.1.0/channel.json new file mode 100644 index 00000000..187194f2 --- /dev/null +++ b/bindings/pulsar/0.1.0/channel.json @@ -0,0 +1,92 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/bindings/pulsar/0.1.0/channel.json", + "title": "Channel Schema", + "description": "This object contains information about the channel representation in Pulsar, which covers namespace and topic level admin configuration. This object contains additional information not possible to represent within the core AsyncAPI specification.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "required": [ + "namespace", + "persistence" + ], + "properties": { + "namespace": { + "type": "string", + "description": "The namespace, the channel is associated with." + }, + "persistence": { + "type": "string", + "enum": [ + "persistent", + "non-persistent" + ], + "description": "persistence of the topic in Pulsar." + }, + "compaction": { + "type": "integer", + "minimum": 0, + "description": "Topic compaction threshold given in MB" + }, + "geo-replication": { + "type": "array", + "description": "A list of clusters the topic is replicated to.", + "items": { + "type": "string" + } + }, + "retention": { + "type": "object", + "additionalProperties": false, + "properties": { + "time": { + "type": "integer", + "minimum": 0, + "description": "Time given in Minutes. `0` = Disable message retention." + }, + "size": { + "type": "integer", + "minimum": 0, + "description": "Size given in MegaBytes. `0` = Disable message retention." + } + } + }, + "ttl": { + "type": "integer", + "description": "TTL in seconds for the specified topic" + }, + "deduplication": { + "type": "boolean", + "description": "Whether deduplication of events is enabled or not." + }, + "bindingVersion": { + "type": "string", + "enum": [ + "0.1.0" + ], + "description": "The version of this binding. If omitted, 'latest' MUST be assumed." + } + }, + "examples": [ + { + "namespace": "ns1", + "persistence": "persistent", + "compaction": 1000, + "retention": { + "time": 15, + "size": 1000 + }, + "ttl": 360, + "geo-replication": [ + "us-west", + "us-east" + ], + "deduplication": true, + "bindingVersion": "0.1.0" + } + ] +} \ No newline at end of file diff --git a/bindings/pulsar/0.1.0/server.json b/bindings/pulsar/0.1.0/server.json new file mode 100644 index 00000000..f894fac1 --- /dev/null +++ b/bindings/pulsar/0.1.0/server.json @@ -0,0 +1,32 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/bindings/pulsar/0.1.0/server.json", + "title": "Server Schema", + "description": "This object contains server information of Pulsar broker, which covers cluster and tenant admin configuration. This object contains additional information not possible to represent within the core AsyncAPI specification.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "properties": { + "tenant": { + "type": "string", + "description": "The pulsar tenant. If omitted, 'public' MUST be assumed." + }, + "bindingVersion": { + "type": "string", + "enum": [ + "0.1.0" + ], + "description": "The version of this binding. If omitted, 'latest' MUST be assumed." + } + }, + "examples": [ + { + "tenant": "contoso", + "bindingVersion": "0.1.0" + } + ] +} \ No newline at end of file diff --git a/bindings/solace/operation.json b/bindings/solace/0.2.0/operation.json similarity index 97% rename from bindings/solace/operation.json rename to bindings/solace/0.2.0/operation.json index 98aad7b8..d2b8d946 100644 --- a/bindings/solace/operation.json +++ b/bindings/solace/0.2.0/operation.json @@ -1,6 +1,6 @@ { "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "http://asyncapi.com/bindings/solace/operation.json", + "$id": "http://asyncapi.com/bindings/solace/0.2.0/operation.json", "title": "Solace operation bindings object", "description": "This object contains information about the operation representation in Solace.", "type": "object", diff --git a/bindings/solace/server.json b/bindings/solace/0.2.0/server.json similarity index 78% rename from bindings/solace/server.json rename to bindings/solace/0.2.0/server.json index a87dedf2..5d34ba25 100644 --- a/bindings/solace/server.json +++ b/bindings/solace/0.2.0/server.json @@ -1,13 +1,13 @@ { "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "http://asyncapi.com/bindings/solace/server.json", + "$id": "http://asyncapi.com/bindings/solace/0.2.0/server.json", "title": "Solace server bindings object", "description": "This object contains server connection information about the Solace broker. This object contains additional connectivity information not possible to represent within the core AsyncAPI specification.", "type": "object", "additionalProperties": false, "patternProperties": { - "^x-[\\w\\d\\.\\-\\_]+$": { - "$ref": "https://raw.githubusercontent.com/asyncapi/asyncapi-node/v2.7.7/schemas/2.0.0.json#/definitions/specificationExtension" + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" } }, "properties": { diff --git a/bindings/solace/0.3.0/operation.json b/bindings/solace/0.3.0/operation.json new file mode 100644 index 00000000..477962f7 --- /dev/null +++ b/bindings/solace/0.3.0/operation.json @@ -0,0 +1,114 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/bindings/solace/0.3.0/operation.json", + "title": "Solace operation bindings object", + "description": "This object contains information about the operation representation in Solace.", + "type": "object", + "additionalProperties": false, + "properties": { + "destinations": { + "description": "The list of Solace destinations referenced in the operation.", + "type": "array", + "items": { + "type": "object", + "properties": { + "deliveryMode": { + "type": "string", + "enum": [ + "direct", + "persistent" + ] + } + }, + "oneOf": [ + { + "properties": { + "destinationType": { + "type": "string", + "const": "queue", + "description": "If the type is queue, then the subscriber can bind to the queue. The queue subscribes to the given topicSubscriptions. If no topicSubscriptions are provied, the queue will subscribe to the topic as represented by the channel name." + }, + "queue": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The name of the queue" + }, + "topicSubscriptions": { + "type": "array", + "description": "The list of topics that the queue subscribes to.", + "items": { + "type": "string" + } + }, + "accessType": { + "type": "string", + "enum": [ + "exclusive", + "nonexclusive" + ] + }, + "maxTtl": { + "type": "string", + "description": "The maximum TTL to apply to messages to be spooled." + }, + "maxMsgSpoolUsage": { + "type": "string", + "description": "The maximum amount of message spool that the given queue may use" + } + } + } + } + }, + { + "properties": { + "destinationType": { + "type": "string", + "const": "topic", + "description": "If the type is topic, then the subscriber subscribes to the given topicSubscriptions. If no topicSubscriptions are provided, the client will subscribe to the topic as represented by the channel name." + }, + "topicSubscriptions": { + "type": "array", + "description": "The list of topics that the client subscribes to.", + "items": { + "type": "string" + } + } + } + } + ] + } + } + }, + "bindingVersion": { + "type": "string", + "enum": [ + "0.3.0" + ], + "description": "The version of this binding. If omitted, \"latest\" MUST be assumed." + }, + "examples": [ + { + "bindingVersion": "0.3.0", + "destinations": [ + { + "destinationType": "queue", + "queue": { + "name": "sampleQueue", + "topicSubscriptions": [ + "samples/*" + ], + "accessType": "nonexclusive" + } + }, + { + "destinationType": "topic", + "topicSubscriptions": [ + "samples/*" + ] + } + ] + } + ] +} diff --git a/bindings/solace/0.3.0/server.json b/bindings/solace/0.3.0/server.json new file mode 100644 index 00000000..c4755d29 --- /dev/null +++ b/bindings/solace/0.3.0/server.json @@ -0,0 +1,32 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/bindings/solace/0.3.0/server.json", + "title": "Solace server bindings object", + "description": "This object contains server connection information about the Solace broker. This object contains additional connectivity information not possible to represent within the core AsyncAPI specification.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "properties": { + "msgVpn": { + "type": "string", + "description": "The name of the Virtual Private Network to connect to on the Solace broker." + }, + "bindingVersion": { + "type": "string", + "enum": [ + "0.3.0" + ], + "description": "The version of this binding." + } + }, + "examples": [ + { + "msgVpn": "ProdVPN", + "bindingVersion": "0.3.0" + } + ] +} diff --git a/bindings/websockets/channel.json b/bindings/websockets/0.1.0/channel.json similarity index 75% rename from bindings/websockets/channel.json rename to bindings/websockets/0.1.0/channel.json index 9e78dbd2..d01abd46 100644 --- a/bindings/websockets/channel.json +++ b/bindings/websockets/0.1.0/channel.json @@ -1,13 +1,13 @@ { "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "http://asyncapi.com/bindings/websockets/channel.json", + "$id": "http://asyncapi.com/bindings/websockets/0.1.0/channel.json", "title": "WebSockets channel bindings object", "description": "When using WebSockets, the channel represents the connection. Unlike other protocols that support multiple virtual channels (topics, routing keys, etc.) per connection, WebSockets doesn't support virtual channels or, put it another way, there's only one channel and its characteristics are strongly related to the protocol used for the handshake, i.e., HTTP.", "type": "object", "additionalProperties": false, "patternProperties": { - "^x-[\\w\\d\\.\\-\\_]+$": { - "$ref": "https://raw.githubusercontent.com/asyncapi/asyncapi-node/v2.7.7/schemas/2.0.0.json#/definitions/specificationExtension" + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" } }, "properties": { @@ -20,11 +20,11 @@ "description": "The HTTP method to use when establishing the connection. Its value MUST be either 'GET' or 'POST'." }, "query": { - "$ref": "https://raw.githubusercontent.com/asyncapi/asyncapi-node/v2.7.7/schemas/2.0.0.json#/definitions/schema", + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json", "description": "A Schema object containing the definitions for each query parameter. This schema MUST be of type 'object' and have a 'properties' key." }, "headers": { - "$ref": "https://raw.githubusercontent.com/asyncapi/asyncapi-node/v2.7.7/schemas/2.0.0.json#/definitions/schema", + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json", "description": "A Schema object containing the definitions of the HTTP headers to use when establishing the connection. This schema MUST be of type 'object' and have a 'properties' key." }, "bindingVersion": { diff --git a/definitions/3.0.0/channelBindingsObject.json b/definitions/3.0.0/channelBindingsObject.json index 11e3ea23..10590f36 100644 --- a/definitions/3.0.0/channelBindingsObject.json +++ b/definitions/3.0.0/channelBindingsObject.json @@ -8,21 +8,79 @@ }, "properties": { "http": {}, - "ws": {}, - "amqp": {}, - "amqp1": {}, + "ws": { + "oneOf": [ + { + "description": "Latest binding", + "$ref": "http://asyncapi.com/bindings/websockets/0.1.0/channel.json" + } + ] + }, + "amqp": { + "oneOf": [ + { + "description": "Latest binding", + "$ref": "http://asyncapi.com/bindings/amqp/0.2.0/channel.json" + } + ] + }, + "amqp1": { + "oneOf": [ + { + "description": "Latest binding", + "$ref": "http://asyncapi.com/bindings/amqp/0.2.0/channel.json" + } + ] + }, "mqtt": {}, "mqtt5": {}, - "kafka": {}, - "anypointmq": {}, + "kafka": { + "oneOf": [ + { + "description": "Latest binding", + "$ref": "http://asyncapi.com/bindings/kafka/0.3.0/channel.json" + } + ] + }, + "anypointmq": { + "oneOf": [ + { + "description": "Latest binding", + "$ref": "http://asyncapi.com/bindings/anypointmq/0.0.1/channel.json" + } + ] + }, "nats": {}, "jms": {}, "sns": {}, "sqs": {}, "stomp": {}, "redis": {}, - "ibmmq": {}, - "solace": {} + "ibmmq": { + "oneOf": [ + { + "description": "Latest binding", + "$ref": "http://asyncapi.com/bindings/ibmmq/0.1.0/channel.json" + } + ] + }, + "solace": {}, + "googlepubsub": { + "oneOf": [ + { + "description": "Latest binding", + "$ref": "http://asyncapi.com/bindings/googlepubsub/0.1.0/channel.json" + } + ] + }, + "pulsar": { + "oneOf": [ + { + "description": "Latest binding", + "$ref": "http://asyncapi.com/bindings/pulsar/0.1.0/channel.json" + } + ] + } }, "$schema": "http://json-schema.org/draft-07/schema#", "$id": "http://asyncapi.com/definitions/3.0.0/channelBindingsObject.json" diff --git a/definitions/3.0.0/components.json b/definitions/3.0.0/components.json index 3e673074..fd2df606 100644 --- a/definitions/3.0.0/components.json +++ b/definitions/3.0.0/components.json @@ -71,25 +71,25 @@ "serverBindings": { "type": "object", "additionalProperties": { - "$ref": "http://asyncapi.com/definitions/3.0.0/bindingsObject.json" + "$ref": "http://asyncapi.com/definitions/3.0.0/serverBindingsObject.json" } }, "channelBindings": { "type": "object", "additionalProperties": { - "$ref": "http://asyncapi.com/definitions/3.0.0/bindingsObject.json" + "$ref": "http://asyncapi.com/definitions/3.0.0/channelBindingsObject.json" } }, "operationBindings": { "type": "object", "additionalProperties": { - "$ref": "http://asyncapi.com/definitions/3.0.0/bindingsObject.json" + "$ref": "http://asyncapi.com/definitions/3.0.0/operationBindingsObject.json" } }, "messageBindings": { "type": "object", "additionalProperties": { - "$ref": "http://asyncapi.com/definitions/3.0.0/bindingsObject.json" + "$ref": "http://asyncapi.com/definitions/3.0.0/messageBindingsObject.json" } } }, diff --git a/definitions/3.0.0/messageBindingsObject.json b/definitions/3.0.0/messageBindingsObject.json index ad18b07f..fe4c930b 100644 --- a/definitions/3.0.0/messageBindingsObject.json +++ b/definitions/3.0.0/messageBindingsObject.json @@ -7,22 +7,68 @@ } }, "properties": { - "http": {}, + "http": { + "oneOf": [ + { + "description": "Latest binding", + "$ref": "http://asyncapi.com/bindings/http/0.1.0/message.json" + } + ] + }, "ws": {}, "amqp": {}, "amqp1": {}, - "mqtt": {}, + "mqtt": { + "oneOf": [ + { + "description": "Latest binding", + "$ref": "http://asyncapi.com/bindings/mqtt/0.1.0/message.json" + } + ] + }, "mqtt5": {}, - "kafka": {}, - "anypointmq": {}, + "kafka": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/bindings/kafka/0.1.0/message.json" + }, + { + "description": "Latest binding", + "$ref": "http://asyncapi.com/bindings/kafka/0.3.0/message.json" + } + ] + }, + "anypointmq": { + "oneOf": [ + { + "description": "Latest binding", + "$ref": "http://asyncapi.com/bindings/anypointmq/0.0.1/message.json" + } + ] + }, "nats": {}, "jms": {}, "sns": {}, "sqs": {}, "stomp": {}, "redis": {}, - "ibmmq": {}, - "solace": {} + "ibmmq": { + "oneOf": [ + { + "description": "Latest binding", + "$ref": "http://asyncapi.com/bindings/ibmmq/0.1.0/message.json" + } + ] + }, + "solace": {}, + "googlepubsub": { + "oneOf": [ + { + "description": "Latest binding", + "$ref": "http://asyncapi.com/bindings/googlepubsub/0.1.0/message.json" + } + ] + } }, "$schema": "http://json-schema.org/draft-07/schema#", "$id": "http://asyncapi.com/definitions/3.0.0/messageBindingsObject.json" diff --git a/definitions/3.0.0/operationBindingsObject.json b/definitions/3.0.0/operationBindingsObject.json index 06f560fa..576e1ef5 100644 --- a/definitions/3.0.0/operationBindingsObject.json +++ b/definitions/3.0.0/operationBindingsObject.json @@ -9,20 +9,62 @@ "properties": { "http": {}, "ws": {}, - "amqp": {}, + "amqp": { + "oneOf": [ + { + "description": "Latest binding", + "$ref": "http://asyncapi.com/bindings/amqp/0.2.0/operation.json" + } + ] + }, "amqp1": {}, - "mqtt": {}, + "mqtt": { + "oneOf": [ + { + "description": "Latest binding", + "$ref": "http://asyncapi.com/bindings/mqtt/0.1.0/operation.json" + } + ] + }, "mqtt5": {}, - "kafka": {}, + "kafka": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/bindings/kafka/0.1.0/operation.json" + }, + { + "description": "Latest binding", + "$ref": "http://asyncapi.com/bindings/kafka/0.3.0/operation.json" + } + ] + }, "anypointmq": {}, - "nats": {}, + "nats": { + "oneOf": [ + { + "description": "Latest binding", + "$ref": "http://asyncapi.com/bindings/nats/0.1.0/operation.json" + } + ] + }, "jms": {}, "sns": {}, "sqs": {}, "stomp": {}, "redis": {}, "ibmmq": {}, - "solace": {} + "solace": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/bindings/solace/0.2.0/operation.json" + }, + { + "description": "Latest binding", + "$ref": "http://asyncapi.com/bindings/solace/0.3.0/operation.json" + } + ] + }, + "googlepubsub": {} }, "$schema": "http://json-schema.org/draft-07/schema#", "$id": "http://asyncapi.com/definitions/3.0.0/operationBindingsObject.json" diff --git a/definitions/3.0.0/serverBindingsObject.json b/definitions/3.0.0/serverBindingsObject.json index a2389092..cac1a597 100644 --- a/definitions/3.0.0/serverBindingsObject.json +++ b/definitions/3.0.0/serverBindingsObject.json @@ -11,9 +11,23 @@ "ws": {}, "amqp": {}, "amqp1": {}, - "mqtt": {}, + "mqtt": { + "oneOf": [ + { + "description": "Latest binding", + "$ref": "http://asyncapi.com/bindings/mqtt/0.1.0/server.json" + } + ] + }, "mqtt5": {}, - "kafka": {}, + "kafka": { + "oneOf": [ + { + "description": "Latest binding", + "$ref": "http://asyncapi.com/bindings/kafka/0.3.0/server.json" + } + ] + }, "anypointmq": {}, "nats": {}, "jms": {}, @@ -21,8 +35,34 @@ "sqs": {}, "stomp": {}, "redis": {}, - "ibmmq": {}, - "solace": {} + "ibmmq": { + "oneOf": [ + { + "description": "Latest binding", + "$ref": "http://asyncapi.com/bindings/ibmmq/0.1.0/server.json" + } + ] + }, + "solace": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/bindings/solace/0.2.0/server.json" + }, + { + "description": "Latest binding", + "$ref": "http://asyncapi.com/bindings/solace/0.3.0/server.json" + } + ] + }, + "googlepubsub": {}, + "pulsar": { + "oneOf": [ + { + "description": "Latest binding", + "$ref": "http://asyncapi.com/bindings/pulsar/0.1.0/server.json" + } + ] + } }, "$schema": "http://json-schema.org/draft-07/schema#", "$id": "http://asyncapi.com/definitions/3.0.0/serverBindingsObject.json" diff --git a/index.js b/index.js index ccc50bf6..40ba7025 100644 --- a/index.js +++ b/index.js @@ -5,5 +5,5 @@ module.exports = { '2.3.0': require('./schemas/2.3.0.json'), '2.4.0': require('./schemas/2.4.0.json'), '2.5.0': require('./schemas/2.5.0.json'), - '3.0.0': require('./schemas/3.0.0.json'), + '3.0.0': require('./schemas/3.0.0.json') }; diff --git a/package-lock.json b/package-lock.json index 7f55f229..55917487 100644 --- a/package-lock.json +++ b/package-lock.json @@ -56,12 +56,6 @@ "js-tokens": "^4.0.0" } }, - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "dev": true - }, "source-map": { "version": "0.5.7", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", @@ -691,6 +685,18 @@ "indent-string": "^4.0.0" } }, + "ajv": { + "version": "8.11.2", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.11.2.tgz", + "integrity": "sha512-E4bfmKAhGiSTvMfL1Myyycaub+cUEU2/IvpylXkUu7CHBkBj1f/ikdzbD7YQ6FKUbixDxeYvB/xY4fvyroDlQg==", + "dev": true, + "requires": { + "fast-deep-equal": "^3.1.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2", + "uri-js": "^4.2.2" + } + }, "ansi-colors": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", @@ -706,6 +712,12 @@ "type-fest": "^1.0.2" } }, + "ansi-regex": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", + "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", + "dev": true + }, "ansi-styles": { "version": "3.2.1", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", @@ -882,17 +894,6 @@ "ansi-styles": "^3.2.1", "escape-string-regexp": "^1.0.5", "supports-color": "^5.3.0" - }, - "dependencies": { - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - } } }, "chokidar": { @@ -927,6 +928,17 @@ "string-width": "^4.2.0" } }, + "cliui": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz", + "integrity": "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==", + "dev": true, + "requires": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^6.2.0" + } + }, "color-convert": { "version": "1.9.3", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", @@ -948,6 +960,16 @@ "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=", "dev": true }, + "compare-func": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/compare-func/-/compare-func-1.3.2.tgz", + "integrity": "sha1-md0LpFfh+bxyKxLAjsM+6rMfpkg=", + "dev": true, + "requires": { + "array-ify": "^1.0.0", + "dot-prop": "^3.0.0" + } + }, "concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", @@ -955,78 +977,24 @@ "dev": true }, "conventional-changelog-angular": { - "version": "5.0.13", - "resolved": "https://registry.npmjs.org/conventional-changelog-angular/-/conventional-changelog-angular-5.0.13.tgz", - "integrity": "sha512-i/gipMxs7s8L/QeuavPF2hLnJgH6pEZAttySB6aiQLWcX3puWDL3ACVmvBhJGxnAy52Qc15ua26BufY6KpmrVA==", + "version": "5.0.6", + "resolved": "https://registry.npmjs.org/conventional-changelog-angular/-/conventional-changelog-angular-5.0.6.tgz", + "integrity": "sha512-QDEmLa+7qdhVIv8sFZfVxU1VSyVvnXPsxq8Vam49mKUcO1Z8VTLEJk9uI21uiJUsnmm0I4Hrsdc9TgkOQo9WSA==", "dev": true, "requires": { - "compare-func": "^2.0.0", + "compare-func": "^1.3.1", "q": "^1.5.1" - }, - "dependencies": { - "compare-func": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/compare-func/-/compare-func-2.0.0.tgz", - "integrity": "sha512-zHig5N+tPWARooBnb0Zx1MFcdfpyJrfTJ3Y5L+IFvUm8rM74hHz66z0gw0x4tijh5CorKkKUCnW82R2vmpeCRA==", - "dev": true, - "requires": { - "array-ify": "^1.0.0", - "dot-prop": "^5.1.0" - } - }, - "dot-prop": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-5.3.0.tgz", - "integrity": "sha512-QM8q3zDe58hqUqjraQOmzZ1LIH9SWQJTlEKCH4kJ2oQvLZk7RbQXvtDM2XEq3fwkV9CCvvH4LA0AV+ogFsBM2Q==", - "dev": true, - "requires": { - "is-obj": "^2.0.0" - } - }, - "is-obj": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-2.0.0.tgz", - "integrity": "sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w==", - "dev": true - } } }, "conventional-changelog-conventionalcommits": { - "version": "4.6.3", - "resolved": "https://registry.npmjs.org/conventional-changelog-conventionalcommits/-/conventional-changelog-conventionalcommits-4.6.3.tgz", - "integrity": "sha512-LTTQV4fwOM4oLPad317V/QNQ1FY4Hju5qeBIM1uTHbrnCE+Eg4CdRZ3gO2pUeR+tzWdp80M2j3qFFEDWVqOV4g==", + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/conventional-changelog-conventionalcommits/-/conventional-changelog-conventionalcommits-4.2.3.tgz", + "integrity": "sha512-atGa+R4vvEhb8N/8v3IoW59gCBJeeFiX6uIbPu876ENAmkMwsenyn0R21kdDHJFLQdy6zW4J6b4xN8KI3b9oww==", "dev": true, "requires": { - "compare-func": "^2.0.0", + "compare-func": "^1.3.1", "lodash": "^4.17.15", "q": "^1.5.1" - }, - "dependencies": { - "compare-func": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/compare-func/-/compare-func-2.0.0.tgz", - "integrity": "sha512-zHig5N+tPWARooBnb0Zx1MFcdfpyJrfTJ3Y5L+IFvUm8rM74hHz66z0gw0x4tijh5CorKkKUCnW82R2vmpeCRA==", - "dev": true, - "requires": { - "array-ify": "^1.0.0", - "dot-prop": "^5.1.0" - } - }, - "dot-prop": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-5.3.0.tgz", - "integrity": "sha512-QM8q3zDe58hqUqjraQOmzZ1LIH9SWQJTlEKCH4kJ2oQvLZk7RbQXvtDM2XEq3fwkV9CCvvH4LA0AV+ogFsBM2Q==", - "dev": true, - "requires": { - "is-obj": "^2.0.0" - } - }, - "is-obj": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-2.0.0.tgz", - "integrity": "sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w==", - "dev": true - } } }, "conventional-changelog-writer": { @@ -1287,6 +1255,15 @@ } } }, + "dot-prop": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-3.0.0.tgz", + "integrity": "sha1-G3CK8JSknJoOfbyteQq6U52sEXc=", + "dev": true, + "requires": { + "is-obj": "^1.0.0" + } + }, "duplexer2": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/duplexer2/-/duplexer2-0.1.4.tgz", @@ -1428,6 +1405,12 @@ } } }, + "fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true + }, "fast-glob": { "version": "3.2.11", "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.11.tgz", @@ -1479,6 +1462,15 @@ "pkg-dir": "^4.1.0" } }, + "find-up": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "dev": true, + "requires": { + "locate-path": "^2.0.0" + } + }, "find-versions": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/find-versions/-/find-versions-4.0.0.tgz", @@ -1946,6 +1938,12 @@ "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", "dev": true }, + "is-obj": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-1.0.1.tgz", + "integrity": "sha1-PkcprB9f3gJc19g6iW2rn09n2w8=", + "dev": true + }, "is-path-cwd": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-2.2.0.tgz", @@ -2119,12 +2117,6 @@ "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", "dev": true }, - "uuid": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", - "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", - "dev": true - }, "which": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", @@ -2225,6 +2217,12 @@ "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", "dev": true }, + "json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", + "dev": true + }, "json-stringify-safe": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", @@ -2248,14 +2246,6 @@ "requires": { "graceful-fs": "^4.1.6", "universalify": "^1.0.0" - }, - "dependencies": { - "universalify": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-1.0.0.tgz", - "integrity": "sha512-rb6X1W158d7pRQBg5gkR8uPaSfiids68LTJQYOtEUhoJUWBdaQHsuT/EUduxXYxcrt4r5PJ4fuHW1MHT6p0qug==", - "dev": true - } } }, "jsonparse": { @@ -2286,24 +2276,16 @@ "parse-json": "^4.0.0", "pify": "^3.0.0", "strip-bom": "^3.0.0" - }, - "dependencies": { - "parse-json": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", - "integrity": "sha512-aOIos8bujGN93/8Ox/jPLh7RwVnPEysynVFE+fQZyg6jKELEHwzgKdLRFHUgXJL6kylijVSBC4BvN9OmsB48Rw==", - "dev": true, - "requires": { - "error-ex": "^1.3.1", - "json-parse-better-errors": "^1.0.1" - } - }, - "strip-bom": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", - "integrity": "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==", - "dev": true - } + } + }, + "locate-path": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", + "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", + "dev": true, + "requires": { + "p-locate": "^2.0.0", + "path-exists": "^3.0.0" } }, "lodash": { @@ -2573,9 +2555,9 @@ "dev": true }, "minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", "dev": true, "requires": { "brace-expansion": "^1.1.7" @@ -2923,14 +2905,6 @@ "resolve": "^1.10.0", "semver": "2 || 3 || 4 || 5", "validate-npm-package-license": "^3.0.1" - }, - "dependencies": { - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "dev": true - } } }, "normalize-path": { @@ -3322,7 +3296,8 @@ }, "balanced-match": { "version": "1.0.2", - "bundled": true + "bundled": true, + "dev": true }, "bcrypt-pbkdf": { "version": "1.0.2", @@ -3353,6 +3328,7 @@ "brace-expansion": { "version": "1.1.11", "bundled": true, + "dev": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -3535,7 +3511,8 @@ }, "concat-map": { "version": "0.0.1", - "bundled": true + "bundled": true, + "dev": true }, "console-control-strings": { "version": "1.1.0", @@ -4154,6 +4131,14 @@ "mime-db": "1.49.0" } }, + "minimatch": { + "version": "3.0.4", + "bundled": true, + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, "minipass": { "version": "3.1.5", "bundled": true, @@ -5066,41 +5051,6 @@ "yargs": "^15.0.2" }, "dependencies": { - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "requires": { - "color-convert": "^2.0.1" - } - }, - "cliui": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz", - "integrity": "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==", - "dev": true, - "requires": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^6.2.0" - } - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, "find-up": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", @@ -5138,51 +5088,26 @@ "p-limit": "^2.2.0" } }, - "wrap-ansi": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", - "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", + "p-map": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-map/-/p-map-3.0.0.tgz", + "integrity": "sha512-d3qXVTF/s+W+CdJ5A29wywV2n8CQQYahlgz2bFiA+4eVNJbHJodPZ+/gXwPGh0bOqA+j8S+6+ckmvLGPk1QpxQ==", "dev": true, "requires": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" + "aggregate-error": "^3.0.0" } }, - "y18n": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz", - "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==", + "p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", "dev": true }, - "yargs": { - "version": "15.4.1", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-15.4.1.tgz", - "integrity": "sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==", - "dev": true, - "requires": { - "cliui": "^6.0.0", - "decamelize": "^1.2.0", - "find-up": "^4.1.0", - "get-caller-file": "^2.0.1", - "require-directory": "^2.1.1", - "require-main-filename": "^2.0.0", - "set-blocking": "^2.0.0", - "string-width": "^4.2.0", - "which-module": "^2.0.0", - "y18n": "^4.0.0", - "yargs-parser": "^18.1.2" - } - }, - "yargs-parser": { - "version": "18.1.3", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.3.tgz", - "integrity": "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==", - "dev": true, - "requires": { - "camelcase": "^5.0.0", - "decamelize": "^1.2.0" - } + "path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true } } }, @@ -5196,9 +5121,9 @@ } }, "onetime": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", - "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.0.tgz", + "integrity": "sha512-5NcSkPHhwTVFIQN+TUqXoS5+dlElHXdpAWu9I0HP20YOtIi+aZ0Ct82jdlILDxjLEAWwvm+qj1m6aEtsDVmm6Q==", "dev": true, "requires": { "mimic-fn": "^2.1.0" @@ -5217,14 +5142,6 @@ "dev": true, "requires": { "p-map": "^2.0.0" - }, - "dependencies": { - "p-map": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/p-map/-/p-map-2.1.0.tgz", - "integrity": "sha512-y3b8Kpd8OAN444hxfBbFfj1FY/RjtTd8tzYwhUqNYXx0fXx2iX4maP4Qr6qhIKbQXI02wTLAda4fYUbDagTUFw==", - "dev": true - } } }, "p-is-promise": { @@ -5233,15 +5150,30 @@ "integrity": "sha512-Wo8VsW4IRQSKVXsJCn7TomUaVtyfjVDn3nUP7kE967BQk0CwFpdbZs0X0uk5sW9mkBa9eNM7hCMaG93WUAwxYQ==", "dev": true }, - "p-map": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-map/-/p-map-3.0.0.tgz", - "integrity": "sha512-d3qXVTF/s+W+CdJ5A29wywV2n8CQQYahlgz2bFiA+4eVNJbHJodPZ+/gXwPGh0bOqA+j8S+6+ckmvLGPk1QpxQ==", + "p-limit": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", + "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", + "dev": true, + "requires": { + "p-try": "^1.0.0" + } + }, + "p-locate": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", + "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", "dev": true, "requires": { - "aggregate-error": "^3.0.0" + "p-limit": "^1.1.0" } }, + "p-map": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/p-map/-/p-map-2.1.0.tgz", + "integrity": "sha512-y3b8Kpd8OAN444hxfBbFfj1FY/RjtTd8tzYwhUqNYXx0fXx2iX4maP4Qr6qhIKbQXI02wTLAda4fYUbDagTUFw==", + "dev": true + }, "p-reduce": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/p-reduce/-/p-reduce-2.1.0.tgz", @@ -5259,9 +5191,9 @@ } }, "p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", + "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", "dev": true }, "package-hash": { @@ -5285,10 +5217,20 @@ "callsites": "^3.0.0" } }, - "path-exists": { + "parse-json": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", + "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", + "dev": true, + "requires": { + "error-ex": "^1.3.1", + "json-parse-better-errors": "^1.0.1" + } + }, + "path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", "dev": true }, "path-is-absolute": { @@ -5329,57 +5271,6 @@ "requires": { "find-up": "^2.0.0", "load-json-file": "^4.0.0" - }, - "dependencies": { - "find-up": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", - "integrity": "sha512-NWzkk0jSJtTt08+FBFMvXoeZnOJD+jTtsRmBYbAIzJdX6l7dLgR7CTubCM5/eDdPUBvLCeVasP1brfVR/9/EZQ==", - "dev": true, - "requires": { - "locate-path": "^2.0.0" - } - }, - "locate-path": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", - "integrity": "sha512-NCI2kiDkyR7VeEKm27Kda/iQHyKJe1Bu0FlTbYp3CqJu+9IFe9bLyAjMxf5ZDDbEg+iMPzB5zYyUTSm8wVTKmA==", - "dev": true, - "requires": { - "p-locate": "^2.0.0", - "path-exists": "^3.0.0" - } - }, - "p-limit": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", - "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", - "dev": true, - "requires": { - "p-try": "^1.0.0" - } - }, - "p-locate": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", - "integrity": "sha512-nQja7m7gSKuewoVRen45CtVfODR3crN3goVQ0DDZ9N3yHxgpkuBhZqsaiotSQRrADUrne346peY7kT3TSACykg==", - "dev": true, - "requires": { - "p-limit": "^1.1.0" - } - }, - "p-try": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", - "integrity": "sha512-U1etNYuMJoIz3ZXSrrySFjsXQTWOx2/jdi86L+2pRvph/qMKL6sbcCYdH23fqsbm8TH2Gn0OybpT4eSFlCVHww==", - "dev": true - }, - "path-exists": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha512-bpC7GYwiDYQ4wYLe+FA8lhRjhQCMcQGuSgGGqDkg/QerRWw9CmGRT0iSOVRSZJ29NMLZgIzqaljJ63oaL4NIJQ==", - "dev": true - } } }, "pkg-dir": { @@ -5427,6 +5318,18 @@ "requires": { "p-limit": "^2.2.0" } + }, + "p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true + }, + "path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true } } }, @@ -5455,6 +5358,12 @@ "once": "^1.3.1" } }, + "punycode": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "dev": true + }, "q": { "version": "1.5.1", "resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz", @@ -5661,6 +5570,12 @@ "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", "dev": true }, + "require-from-string": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", + "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", + "dev": true + }, "require-main-filename": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", @@ -5668,14 +5583,12 @@ "dev": true }, "resolve": { - "version": "1.22.1", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.1.tgz", - "integrity": "sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==", + "version": "1.15.1", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.15.1.tgz", + "integrity": "sha512-84oo6ZTtoTUpjgNEr5SJyzQhzL72gaRodsSfyxC/AXRvwu0Yse9H8eF9IpGo7b8YetZhlI6v7ZQ6bKBFV/6S7w==", "dev": true, "requires": { - "is-core-module": "^2.9.0", - "path-parse": "^1.0.7", - "supports-preserve-symlinks-flag": "^1.0.0" + "path-parse": "^1.0.6" } }, "resolve-from": { @@ -5863,15 +5776,6 @@ "color-convert": "^2.0.1" } }, - "brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", - "dev": true, - "requires": { - "balanced-match": "^1.0.0" - } - }, "cliui": { "version": "7.0.4", "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", @@ -5955,15 +5859,6 @@ "integrity": "sha512-jSCU7/VB1loIWBZe14aEYHU/+1UMEHoaO7qxCOVJOw9GgH72VAWppxNcjU+x9a2k3GSIBXNKxXQFqRvvZ7vr3A==", "dev": true }, - "minimatch": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.0.tgz", - "integrity": "sha512-9TPBGGak4nHfGZsPBohm9AWg6NoT7QTCehS3BIJABslyZbzxfV78QM2Y6+i741OPZIafFAaiiEMh5OyIrJPgtg==", - "dev": true, - "requires": { - "brace-expansion": "^2.0.1" - } - }, "npm": { "version": "8.12.1", "resolved": "https://registry.npmjs.org/npm/-/npm-8.12.1.tgz", @@ -6305,7 +6200,8 @@ }, "balanced-match": { "version": "1.0.2", - "bundled": true + "bundled": true, + "dev": true }, "bin-links": { "version": "3.0.1", @@ -6328,6 +6224,7 @@ "brace-expansion": { "version": "2.0.1", "bundled": true, + "dev": true, "requires": { "balanced-match": "^1.0.0" } @@ -6935,6 +6832,14 @@ "ssri": "^9.0.0" } }, + "minimatch": { + "version": "5.1.0", + "bundled": true, + "dev": true, + "requires": { + "brace-expansion": "^2.0.1" + } + }, "minipass": { "version": "3.1.6", "bundled": true, @@ -7075,8 +6980,7 @@ }, "minimatch": { "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "bundled": true, "dev": true, "requires": { "brace-expansion": "^1.1.7" @@ -7400,8 +7304,7 @@ }, "minimatch": { "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "bundled": true, "dev": true, "requires": { "brace-expansion": "^1.1.7" @@ -7701,6 +7604,12 @@ } } }, + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + }, "semver-diff": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/semver-diff/-/semver-diff-3.1.1.tgz", @@ -7755,9 +7664,9 @@ "dev": true }, "signal-exit": { - "version": "3.0.7", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", - "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", + "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", "dev": true }, "signale": { @@ -7771,47 +7680,6 @@ "pkg-conf": "^2.1.0" }, "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "dev": true, - "requires": { - "color-name": "1.1.3" - } - }, - "color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", - "dev": true - }, - "escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", - "dev": true - }, "figures": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/figures/-/figures-2.0.0.tgz", @@ -7820,21 +7688,6 @@ "requires": { "escape-string-regexp": "^1.0.5" } - }, - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", - "dev": true - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } } } }, @@ -7868,12 +7721,23 @@ "rimraf": "^3.0.0", "signal-exit": "^3.0.2", "which": "^2.0.1" + }, + "dependencies": { + "which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } + } } }, "spdx-correct": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.1.tgz", - "integrity": "sha512-cOYcUWwhCuHCXi49RhFRCyJEK3iPj1Ziz9DpViV3tbZOwXD49QzIN3MpOLJNxh2qwq2lJJZaKMVw9qNi4jTC0w==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.0.tgz", + "integrity": "sha512-lr2EZCctC2BNR7j7WzJ2FpDznxky1sjfxvvYEyzxNyb6lZXHODmEoJeFu4JupYlkfha1KZpJyoqiJ7pgA1qq8Q==", "dev": true, "requires": { "spdx-expression-parse": "^3.0.0", @@ -7881,15 +7745,15 @@ } }, "spdx-exceptions": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz", - "integrity": "sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.2.0.tgz", + "integrity": "sha512-2XQACfElKi9SlVb1CYadKDXvoajPgBVPn/gOQLrTvHdElaVhr7ZEbqJaRnJLVNeaI4cMEAgVCeBMKF6MWRDCRA==", "dev": true }, "spdx-expression-parse": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", - "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz", + "integrity": "sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg==", "dev": true, "requires": { "spdx-exceptions": "^2.1.0", @@ -7897,9 +7761,9 @@ } }, "spdx-license-ids": { - "version": "3.0.12", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.12.tgz", - "integrity": "sha512-rr+VVSXtRhO4OHbXUiAF7xW3Bo9DuuF6C5jH+q/x15j2jniycgKbxU09Hr0WqlSLUs4i4ltHGXqTe7VHclYWyA==", + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.5.tgz", + "integrity": "sha512-J+FWzZoynJEXGphVIS+XEh3kFSjZX/1i9gFBaWQcB+/tmpe2qUsSBABpcxqxnAxFdiUFEgAX1bjYGQvIZmoz9Q==", "dev": true }, "split": { @@ -7970,22 +7834,20 @@ } }, "strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", + "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", "dev": true, "requires": { - "ansi-regex": "^5.0.1" - }, - "dependencies": { - "ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true - } + "ansi-regex": "^5.0.0" } }, + "strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", + "dev": true + }, "strip-final-newline": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", @@ -8007,10 +7869,19 @@ "integrity": "sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==", "dev": true }, + "supports-color": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.4.0.tgz", + "integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + }, "supports-hyperlinks": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/supports-hyperlinks/-/supports-hyperlinks-2.3.0.tgz", - "integrity": "sha512-RpsAZlpWcDwOPQA22aCH4J0t7L8JmAvsCxfOSEwm7cQs3LshN36QaTkwd70DnBOXDWGssw2eUoc8CaRWT0XunA==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/supports-hyperlinks/-/supports-hyperlinks-2.2.0.tgz", + "integrity": "sha512-6sXEzV5+I5j8Bmq9/vUphGRM/RJNT9SCURJLjwfOg51heRtguGWDzcaBlgAzKhQa0EVNpPEKzQuBwZ8S8WaCeQ==", "dev": true, "requires": { "has-flag": "^4.0.0", @@ -8034,12 +7905,6 @@ } } }, - "supports-preserve-symlinks-flag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", - "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", - "dev": true - }, "temp-dir": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/temp-dir/-/temp-dir-2.0.0.tgz", @@ -8182,6 +8047,21 @@ "integrity": "sha512-isyNax3wXoKaulPDZWHQqbmIx1k2tb9fb3GGDBRxCscfYV2Ch7WxPArBsFEG8s/safwXTT7H4QGhaIkTp9447w==", "dev": true }, + "universalify": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-1.0.0.tgz", + "integrity": "sha512-rb6X1W158d7pRQBg5gkR8uPaSfiids68LTJQYOtEUhoJUWBdaQHsuT/EUduxXYxcrt4r5PJ4fuHW1MHT6p0qug==", + "dev": true + }, + "uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dev": true, + "requires": { + "punycode": "^2.1.0" + } + }, "url-join": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/url-join/-/url-join-4.0.1.tgz", @@ -8194,6 +8074,12 @@ "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", "dev": true }, + "uuid": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", + "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", + "dev": true + }, "validate-npm-package-license": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", @@ -8247,6 +8133,43 @@ "integrity": "sha512-ILEIE97kDZvF9Wb9f6h5aXK4swSlKGUcOEGiIYb2OOu/IrDU9iwj0fD//SsA6E5ibwJxpEvhullJY4Sl4GcpAw==", "dev": true }, + "wrap-ansi": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", + "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", + "dev": true, + "requires": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + } + } + }, "wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", @@ -8271,6 +8194,12 @@ "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", "dev": true }, + "y18n": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.1.tgz", + "integrity": "sha512-wNcy4NvjMYL8gogWWYAO7ZFWFfHcbdbE57tZO8e4cbpj8tfUcwrwqSl3ad8HxpYWCdXcJUCeKKZS62Av1affwQ==", + "dev": true + }, "yallist": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", @@ -8283,6 +8212,86 @@ "integrity": "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==", "dev": true }, + "yargs": { + "version": "15.4.1", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-15.4.1.tgz", + "integrity": "sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==", + "dev": true, + "requires": { + "cliui": "^6.0.0", + "decamelize": "^1.2.0", + "find-up": "^4.1.0", + "get-caller-file": "^2.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^2.0.0", + "set-blocking": "^2.0.0", + "string-width": "^4.2.0", + "which-module": "^2.0.0", + "y18n": "^4.0.0", + "yargs-parser": "^18.1.2" + }, + "dependencies": { + "find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "requires": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + } + }, + "locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "requires": { + "p-locate": "^4.1.0" + } + }, + "p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "requires": { + "p-try": "^2.0.0" + } + }, + "p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "requires": { + "p-limit": "^2.2.0" + } + }, + "p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true + }, + "path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true + }, + "yargs-parser": { + "version": "18.1.3", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.3.tgz", + "integrity": "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==", + "dev": true, + "requires": { + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" + } + } + } + }, "yargs-parser": { "version": "20.2.9", "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", diff --git a/package.json b/package.json index d876372c..9403dd12 100644 --- a/package.json +++ b/package.json @@ -38,13 +38,14 @@ }, "homepage": "https://github.com/asyncapi/spec-json-schemas#readme", "devDependencies": { - "mocha": "^10.0.0", - "nyc": "^15.1.0", "@semantic-release/commit-analyzer": "^8.0.1", "@semantic-release/github": "7.2.3", "@semantic-release/npm": "^7.0.3", "@semantic-release/release-notes-generator": "^9.0.1", + "ajv": "^8.11.2", "conventional-changelog-conventionalcommits": "^4.2.3", + "mocha": "^10.0.0", + "nyc": "^15.1.0", "semantic-release": "19.0.3" }, "release": { diff --git a/schemas/3.0.0.json b/schemas/3.0.0.json index 89749b62..4972587b 100644 --- a/schemas/3.0.0.json +++ b/schemas/3.0.0.json @@ -291,9 +291,23 @@ "ws": {}, "amqp": {}, "amqp1": {}, - "mqtt": {}, + "mqtt": { + "oneOf": [ + { + "description": "Latest binding", + "$ref": "http://asyncapi.com/bindings/mqtt/0.1.0/server.json" + } + ] + }, "mqtt5": {}, - "kafka": {}, + "kafka": { + "oneOf": [ + { + "description": "Latest binding", + "$ref": "http://asyncapi.com/bindings/kafka/0.3.0/server.json" + } + ] + }, "anypointmq": {}, "nats": {}, "jms": {}, @@ -301,10 +315,296 @@ "sqs": {}, "stomp": {}, "redis": {}, - "ibmmq": {}, - "solace": {} + "ibmmq": { + "oneOf": [ + { + "description": "Latest binding", + "$ref": "http://asyncapi.com/bindings/ibmmq/0.1.0/server.json" + } + ] + }, + "solace": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/bindings/solace/0.2.0/server.json" + }, + { + "description": "Latest binding", + "$ref": "http://asyncapi.com/bindings/solace/0.3.0/server.json" + } + ] + }, + "googlepubsub": {}, + "pulsar": { + "oneOf": [ + { + "description": "Latest binding", + "$ref": "http://asyncapi.com/bindings/pulsar/0.1.0/server.json" + } + ] + } } }, + "http://asyncapi.com/bindings/mqtt/0.1.0/server.json": { + "$id": "http://asyncapi.com/bindings/mqtt/0.1.0/server.json", + "title": "MQTT server bindings object", + "description": "This object contains information about the server representation in MQTT.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "properties": { + "clientId": { + "type": "string", + "description": "The client identifier." + }, + "cleanSession": { + "type": "boolean", + "description": "Whether to create a persistent connection or not. When 'false', the connection will be persistent." + }, + "lastWill": { + "type": "object", + "description": "Last Will and Testament configuration.", + "properties": { + "topic": { + "type": "string", + "description": "The topic where the Last Will and Testament message will be sent." + }, + "qos": { + "type": "integer", + "enum": [ + 0, + 1, + 2 + ], + "description": "Defines how hard the broker/client will try to ensure that the Last Will and Testament message is received. Its value MUST be either 0, 1 or 2." + }, + "message": { + "type": "string", + "description": "Last Will message." + }, + "retain": { + "type": "boolean", + "description": "Whether the broker should retain the Last Will and Testament message or not." + } + } + }, + "keepAlive": { + "type": "integer", + "description": "Interval in seconds of the longest period of time the broker and the client can endure without sending a message." + }, + "bindingVersion": { + "type": "string", + "enum": [ + "0.1.0" + ], + "description": "The version of this binding. If omitted, 'latest' MUST be assumed." + } + }, + "examples": [ + { + "clientId": "guest", + "cleanSession": true, + "lastWill": { + "topic": "/last-wills", + "qos": 2, + "message": "Guest gone offline.", + "retain": false + }, + "keepAlive": 60, + "bindingVersion": "0.1.0" + } + ] + }, + "http://asyncapi.com/bindings/kafka/0.3.0/server.json": { + "$id": "http://asyncapi.com/bindings/kafka/0.3.0/server.json", + "title": "Server Schema", + "description": "This object contains server connection information to a Kafka broker. This object contains additional information not possible to represent within the core AsyncAPI specification.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "properties": { + "schemaRegistryUrl": { + "type": "string", + "description": "API URL for the Schema Registry used when producing Kafka messages (if a Schema Registry was used)." + }, + "schemaRegistryVendor": { + "type": "string", + "description": "The vendor of the Schema Registry and Kafka serdes library that should be used." + }, + "bindingVersion": { + "type": "string", + "enum": [ + "0.3.0" + ], + "description": "The version of this binding." + } + }, + "examples": [ + { + "schemaRegistryUrl": "https://my-schema-registry.com", + "schemaRegistryVendor": "confluent", + "bindingVersion": "0.3.0" + } + ] + }, + "http://asyncapi.com/bindings/ibmmq/0.1.0/server.json": { + "$id": "http://asyncapi.com/bindings/ibmmq/0.1.0/server.json", + "title": "IBM MQ server bindings object", + "description": "This object contains server connection information about the IBM MQ server, referred to as an IBM MQ queue manager. This object contains additional connectivity information not possible to represent within the core AsyncAPI specification.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "properties": { + "groupId": { + "type": "string", + "description": "Defines a logical group of IBM MQ server objects. This is necessary to specify multi-endpoint configurations used in high availability deployments. If omitted, the server object is not part of a group." + }, + "ccdtQueueManagerName": { + "type": "string", + "default": "*", + "description": "The name of the IBM MQ queue manager to bind to in the CCDT file." + }, + "cipherSpec": { + "type": "string", + "description": "The recommended cipher specification used to establish a TLS connection between the client and the IBM MQ queue manager. More information on SSL/TLS cipher specifications supported by IBM MQ can be found on this page in the IBM MQ Knowledge Center." + }, + "multiEndpointServer": { + "type": "boolean", + "default": false, + "description": "If 'multiEndpointServer' is 'true' then multiple connections can be workload balanced and applications should not make assumptions as to where messages are processed. Where message ordering, or affinity to specific message resources is necessary, a single endpoint ('multiEndpointServer' = 'false') may be required." + }, + "heartBeatInterval": { + "type": "integer", + "minimum": 0, + "maximum": 999999, + "default": 300, + "description": "The recommended value (in seconds) for the heartbeat sent to the queue manager during periods of inactivity. A value of zero means that no heart beats are sent. A value of 1 means that the client will use the value defined by the queue manager. More information on heart beat interval can be found on this page in the IBM MQ Knowledge Center." + }, + "bindingVersion": { + "type": "string", + "enum": [ + "0.1.0" + ], + "description": "The version of this binding." + } + }, + "examples": [ + { + "groupId": "PRODCLSTR1", + "cipherSpec": "ANY_TLS12_OR_HIGHER", + "bindingVersion": "0.1.0" + }, + { + "groupId": "PRODCLSTR1", + "bindingVersion": "0.1.0" + } + ] + }, + "http://asyncapi.com/bindings/solace/0.2.0/server.json": { + "$id": "http://asyncapi.com/bindings/solace/0.2.0/server.json", + "title": "Solace server bindings object", + "description": "This object contains server connection information about the Solace broker. This object contains additional connectivity information not possible to represent within the core AsyncAPI specification.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "properties": { + "msvVpn": { + "type": "string", + "description": "The name of the Virtual Private Network to connect to on the Solace broker." + }, + "bindingVersion": { + "type": "string", + "enum": [ + "0.2.0" + ], + "description": "The version of this binding." + } + }, + "examples": [ + { + "msgVpn": "ProdVPN", + "bindingVersion": "0.2.0" + } + ] + }, + "http://asyncapi.com/bindings/solace/0.3.0/server.json": { + "$id": "http://asyncapi.com/bindings/solace/0.3.0/server.json", + "title": "Solace server bindings object", + "description": "This object contains server connection information about the Solace broker. This object contains additional connectivity information not possible to represent within the core AsyncAPI specification.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "properties": { + "msgVpn": { + "type": "string", + "description": "The name of the Virtual Private Network to connect to on the Solace broker." + }, + "bindingVersion": { + "type": "string", + "enum": [ + "0.3.0" + ], + "description": "The version of this binding." + } + }, + "examples": [ + { + "msgVpn": "ProdVPN", + "bindingVersion": "0.3.0" + } + ] + }, + "http://asyncapi.com/bindings/pulsar/0.1.0/server.json": { + "$id": "http://asyncapi.com/bindings/pulsar/0.1.0/server.json", + "title": "Server Schema", + "description": "This object contains server information of Pulsar broker, which covers cluster and tenant admin configuration. This object contains additional information not possible to represent within the core AsyncAPI specification.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "properties": { + "tenant": { + "type": "string", + "description": "The pulsar tenant. If omitted, 'public' MUST be assumed." + }, + "bindingVersion": { + "type": "string", + "enum": [ + "0.1.0" + ], + "description": "The version of this binding. If omitted, 'latest' MUST be assumed." + } + }, + "examples": [ + { + "tenant": "contoso", + "bindingVersion": "0.1.0" + } + ] + }, "http://asyncapi.com/definitions/3.0.0/channels.json": { "$id": "http://asyncapi.com/definitions/3.0.0/channels.json", "type": "object", @@ -972,26 +1272,74 @@ } }, "properties": { - "http": {}, + "http": { + "oneOf": [ + { + "description": "Latest binding", + "$ref": "http://asyncapi.com/bindings/http/0.1.0/message.json" + } + ] + }, "ws": {}, "amqp": {}, "amqp1": {}, - "mqtt": {}, + "mqtt": { + "oneOf": [ + { + "description": "Latest binding", + "$ref": "http://asyncapi.com/bindings/mqtt/0.1.0/message.json" + } + ] + }, "mqtt5": {}, - "kafka": {}, - "anypointmq": {}, + "kafka": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/bindings/kafka/0.1.0/message.json" + }, + { + "description": "Latest binding", + "$ref": "http://asyncapi.com/bindings/kafka/0.3.0/message.json" + } + ] + }, + "anypointmq": { + "oneOf": [ + { + "description": "Latest binding", + "$ref": "http://asyncapi.com/bindings/anypointmq/0.0.1/message.json" + } + ] + }, "nats": {}, "jms": {}, "sns": {}, "sqs": {}, "stomp": {}, "redis": {}, - "ibmmq": {}, - "solace": {} + "ibmmq": { + "oneOf": [ + { + "description": "Latest binding", + "$ref": "http://asyncapi.com/bindings/ibmmq/0.1.0/message.json" + } + ] + }, + "solace": {}, + "googlepubsub": { + "oneOf": [ + { + "description": "Latest binding", + "$ref": "http://asyncapi.com/bindings/googlepubsub/0.1.0/message.json" + } + ] + } } }, - "http://asyncapi.com/definitions/3.0.0/messageTrait.json": { - "$id": "http://asyncapi.com/definitions/3.0.0/messageTrait.json", + "http://asyncapi.com/bindings/http/0.1.0/message.json": { + "$id": "http://asyncapi.com/bindings/http/0.1.0/message.json", + "title": "HTTP message bindings object", + "description": "This object contains information about the message representation in HTTP.", "type": "object", "additionalProperties": false, "patternProperties": { @@ -1000,49 +1348,401 @@ } }, "properties": { - "schemaFormat": { - "type": "string" - }, - "contentType": { - "type": "string" - }, "headers": { - "allOf": [ - { - "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" - }, - { - "properties": { - "type": { - "const": "object" - } - } - } - ] - }, - "messageId": { - "type": "string" + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json", + "description": "\tA Schema object containing the definitions for HTTP-specific headers. This schema MUST be of type 'object' and have a 'properties' key." }, - "correlationId": { - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" - }, - { - "$ref": "http://asyncapi.com/definitions/3.0.0/correlationId.json" + "bindingVersion": { + "type": "string", + "enum": [ + "0.1.0" + ], + "description": "The version of this binding. If omitted, \"latest\" MUST be assumed." + } + }, + "examples": [ + { + "headers": { + "type": "object", + "properties": { + "Content-Type": { + "type": "string", + "enum": [ + "application/json" + ] + } } - ] - }, - "tags": { - "type": "array", - "items": { - "$ref": "http://asyncapi.com/definitions/3.0.0/tag.json" }, - "uniqueItems": true - }, - "summary": { - "type": "string", - "description": "A brief summary of the message." + "bindingVersion": "0.1.0" + } + ] + }, + "http://asyncapi.com/bindings/mqtt/0.1.0/message.json": { + "$id": "http://asyncapi.com/bindings/mqtt/0.1.0/message.json", + "title": "MQTT message bindings object", + "description": "This object contains information about the message representation in MQTT.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "properties": { + "bindingVersion": { + "type": "string", + "enum": [ + "0.1.0" + ], + "description": "The version of this binding. If omitted, 'latest' MUST be assumed." + } + }, + "examples": [ + { + "bindingVersion": "0.1.0" + } + ] + }, + "http://asyncapi.com/bindings/kafka/0.1.0/message.json": { + "$id": "http://asyncapi.com/bindings/kafka/0.1.0/message.json", + "title": "Kafka message bindings object", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "properties": { + "key": { + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json", + "description": "The message key." + }, + "bindingVersion": { + "type": "string", + "enum": [ + "0.1.0" + ], + "description": "The version of this binding. If omitted, 'latest' MUST be assumed." + } + }, + "examples": [ + { + "key": { + "type": "string", + "enum": [ + "myKey" + ] + }, + "bindingVersion": "0.1.0" + }, + { + "key": { + "$ref": "path/to/user-create.avsc#/UserCreate" + }, + "bindingVersion": "0.2.0" + } + ] + }, + "http://asyncapi.com/bindings/kafka/0.3.0/message.json": { + "$id": "http://asyncapi.com/bindings/kafka/0.3.0/message.json", + "title": "Message Schema", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "properties": { + "key": { + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json", + "description": "The message key." + }, + "schemaIdLocation": { + "type": "string", + "description": "If a Schema Registry is used when performing this operation, tells where the id of schema is stored.", + "enum": [ + "header", + "payload" + ] + }, + "schemaIdPayloadEncoding": { + "type": "string", + "description": "Number of bytes or vendor specific values when schema id is encoded in payload." + }, + "schemaLookupStrategy": { + "type": "string", + "description": "Freeform string for any naming strategy class to use. Clients should default to the vendor default if not supplied." + }, + "bindingVersion": { + "type": "string", + "enum": [ + "0.3.0" + ], + "description": "The version of this binding. If omitted, 'latest' MUST be assumed." + } + }, + "examples": [ + { + "key": { + "type": "string", + "enum": [ + "myKey" + ] + }, + "schemaIdLocation": "payload", + "schemaIdPayloadEncoding": "apicurio-new", + "schemaLookupStrategy": "TopicIdStrategy", + "bindingVersion": "0.3.0" + }, + { + "key": { + "$ref": "path/to/user-create.avsc#/UserCreate" + }, + "schemaIdLocation": "payload", + "schemaIdPayloadEncoding": "4", + "bindingVersion": "0.3.0" + } + ] + }, + "http://asyncapi.com/bindings/anypointmq/0.0.1/message.json": { + "$id": "http://asyncapi.com/bindings/anypointmq/0.0.1/message.json", + "title": "Anypoint MQ message bindings object", + "description": "This object contains configuration for describing an Anypoint MQ message as an AsyncAPI message. This objects only contains configuration that can not be provided in the AsyncAPI standard message object.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "properties": { + "headers": { + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json", + "description": "A Schema object containing the definitions for Anypoint MQ-specific headers (protocol headers). This schema MUST be of type 'object' and have a 'properties' key. Examples of Anypoint MQ protocol headers are 'messageId' and 'messageGroupId'." + }, + "bindingVersion": { + "type": "string", + "enum": [ + "0.0.1" + ], + "description": "The version of this binding. If omitted, 'latest' MUST be assumed." + } + }, + "examples": [ + { + "headers": { + "type": "object", + "properties": { + "messageId": { + "type": "string" + } + } + }, + "bindingVersion": "0.0.1" + } + ] + }, + "http://asyncapi.com/bindings/ibmmq/0.1.0/message.json": { + "$id": "http://asyncapi.com/bindings/ibmmq/0.1.0/message.json", + "title": "IBM MQ message bindings object", + "description": "This object contains information about the message representation in IBM MQ.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "properties": { + "type": { + "type": "string", + "enum": [ + "string", + "jms", + "binary" + ], + "default": "string", + "description": "The type of the message." + }, + "headers": { + "type": "string", + "description": "Defines the IBM MQ message headers to include with this message. More than one header can be specified as a comma separated list. Supporting information on IBM MQ message formats can be found on this [page](https://www.ibm.com/docs/en/ibm-mq/9.2?topic=mqmd-format-mqchar8) in the IBM MQ Knowledge Center." + }, + "description": { + "type": "string", + "description": "Provides additional information for application developers: describes the message type or format." + }, + "expiry": { + "type": "integer", + "minimum": 0, + "default": 0, + "description": "The recommended setting the client should use for the TTL (Time-To-Live) of the message. This is a period of time expressed in milliseconds and set by the application that puts the message. 'expiry' values are API dependant e.g., MQI and JMS use different units of time and default values for 'unlimited'. General information on IBM MQ message expiry can be found on this [page](https://www.ibm.com/docs/en/ibm-mq/9.2?topic=mqmd-expiry-mqlong) in the IBM MQ Knowledge Center." + }, + "bindingVersion": { + "type": "string", + "enum": [ + "0.1.0" + ], + "description": "The version of this binding." + } + }, + "oneOf": [ + { + "properties": { + "type": { + "const": "binary" + } + } + }, + { + "properties": { + "type": { + "const": "jms" + } + }, + "not": { + "required": [ + "headers" + ] + } + }, + { + "properties": { + "type": { + "const": "string" + } + }, + "not": { + "required": [ + "headers" + ] + } + } + ], + "examples": [ + { + "type": "string", + "bindingVersion": "0.1.0" + }, + { + "type": "jms", + "description": "JMS stream message", + "bindingVersion": "0.1.0" + } + ] + }, + "http://asyncapi.com/bindings/googlepubsub/0.1.0/message.json": { + "$id": "http://asyncapi.com/bindings/googlepubsub/0.1.0/message.json", + "title": "Cloud Pub/Sub Channel Schema", + "description": "This object contains information about the message representation for Google Cloud Pub/Sub.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "properties": { + "bindingVersion": { + "type": "string", + "enum": [ + "0.1.0" + ], + "description": "The version of this binding." + }, + "attributes": { + "type": "object" + }, + "orderingKey": { + "type": "string" + }, + "schema": { + "type": "object", + "additionalItems": false, + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "required": [ + "name", + "type" + ] + } + }, + "examples": [ + { + "schema": { + "name": "projects/your-project-id/schemas/your-avro-schema-id", + "type": "avro" + } + }, + { + "schema": { + "name": "projects/your-project-id/schemas/your-protobuf-schema-id", + "type": "protobuf" + } + } + ] + }, + "http://asyncapi.com/definitions/3.0.0/messageTrait.json": { + "$id": "http://asyncapi.com/definitions/3.0.0/messageTrait.json", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "properties": { + "schemaFormat": { + "type": "string" + }, + "contentType": { + "type": "string" + }, + "headers": { + "allOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" + }, + { + "properties": { + "type": { + "const": "object" + } + } + } + ] + }, + "messageId": { + "type": "string" + }, + "correlationId": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/correlationId.json" + } + ] + }, + "tags": { + "type": "array", + "items": { + "$ref": "http://asyncapi.com/definitions/3.0.0/tag.json" + }, + "uniqueItems": true + }, + "summary": { + "type": "string", + "description": "A brief summary of the message." }, "name": { "type": "string", @@ -1063,19 +1763,545 @@ "type": "boolean", "default": false }, - "examples": { - "type": "array", - "items": { - "type": "object" + "examples": { + "type": "array", + "items": { + "type": "object" + } + }, + "bindings": { + "$ref": "http://asyncapi.com/definitions/3.0.0/messageBindingsObject.json" + } + } + }, + "http://asyncapi.com/definitions/3.0.0/parameter.json": { + "$id": "http://asyncapi.com/definitions/3.0.0/parameter.json", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.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/3.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/3.0.0/ReferenceObject.json" + } + } + }, + "http://asyncapi.com/definitions/3.0.0/channelBindingsObject.json": { + "$id": "http://asyncapi.com/definitions/3.0.0/channelBindingsObject.json", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "properties": { + "http": {}, + "ws": { + "oneOf": [ + { + "description": "Latest binding", + "$ref": "http://asyncapi.com/bindings/websockets/0.1.0/channel.json" + } + ] + }, + "amqp": { + "oneOf": [ + { + "description": "Latest binding", + "$ref": "http://asyncapi.com/bindings/amqp/0.2.0/channel.json" + } + ] + }, + "amqp1": { + "oneOf": [ + { + "description": "Latest binding", + "$ref": "http://asyncapi.com/bindings/amqp/0.2.0/channel.json" + } + ] + }, + "mqtt": {}, + "mqtt5": {}, + "kafka": { + "oneOf": [ + { + "description": "Latest binding", + "$ref": "http://asyncapi.com/bindings/kafka/0.3.0/channel.json" + } + ] + }, + "anypointmq": { + "oneOf": [ + { + "description": "Latest binding", + "$ref": "http://asyncapi.com/bindings/anypointmq/0.0.1/channel.json" + } + ] + }, + "nats": {}, + "jms": {}, + "sns": {}, + "sqs": {}, + "stomp": {}, + "redis": {}, + "ibmmq": { + "oneOf": [ + { + "description": "Latest binding", + "$ref": "http://asyncapi.com/bindings/ibmmq/0.1.0/channel.json" + } + ] + }, + "solace": {}, + "googlepubsub": { + "oneOf": [ + { + "description": "Latest binding", + "$ref": "http://asyncapi.com/bindings/googlepubsub/0.1.0/channel.json" + } + ] + }, + "pulsar": { + "oneOf": [ + { + "description": "Latest binding", + "$ref": "http://asyncapi.com/bindings/pulsar/0.1.0/channel.json" + } + ] + } + } + }, + "http://asyncapi.com/bindings/websockets/0.1.0/channel.json": { + "$id": "http://asyncapi.com/bindings/websockets/0.1.0/channel.json", + "title": "WebSockets channel bindings object", + "description": "When using WebSockets, the channel represents the connection. Unlike other protocols that support multiple virtual channels (topics, routing keys, etc.) per connection, WebSockets doesn't support virtual channels or, put it another way, there's only one channel and its characteristics are strongly related to the protocol used for the handshake, i.e., HTTP.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "properties": { + "method": { + "type": "string", + "enum": [ + "GET", + "POST" + ], + "description": "The HTTP method to use when establishing the connection. Its value MUST be either 'GET' or 'POST'." + }, + "query": { + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json", + "description": "A Schema object containing the definitions for each query parameter. This schema MUST be of type 'object' and have a 'properties' key." + }, + "headers": { + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json", + "description": "A Schema object containing the definitions of the HTTP headers to use when establishing the connection. This schema MUST be of type 'object' and have a 'properties' key." + }, + "bindingVersion": { + "type": "string", + "enum": [ + "0.1.0" + ], + "description": "The version of this binding. If omitted, 'latest' MUST be assumed." + } + }, + "examples": [ + { + "method": "POST", + "bindingVersion": "0.1.0" + } + ] + }, + "http://asyncapi.com/bindings/amqp/0.2.0/channel.json": { + "$id": "http://asyncapi.com/bindings/amqp/0.2.0/channel.json", + "title": "AMQP channel bindings object", + "description": "This object contains information about the channel representation in AMQP.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "properties": { + "is": { + "type": "string", + "enum": [ + "queue", + "routingKey" + ], + "description": "Defines what type of channel is it. Can be either 'queue' or 'routingKey' (default)." + }, + "exchange": { + "type": "object", + "properties": { + "name": { + "type": "string", + "maxLength": 255, + "description": "The name of the exchange. It MUST NOT exceed 255 characters long." + }, + "type": { + "type": "string", + "enum": [ + "topic", + "direct", + "fanout", + "default", + "headers" + ], + "description": "The type of the exchange. Can be either 'topic', 'direct', 'fanout', 'default' or 'headers'." + }, + "durable": { + "type": "boolean", + "description": "Whether the exchange should survive broker restarts or not." + }, + "autoDelete": { + "type": "boolean", + "description": "Whether the exchange should be deleted when the last queue is unbound from it." + }, + "vhost": { + "type": "string", + "default": "/", + "description": "The virtual host of the exchange. Defaults to '/'." + } + }, + "description": "When is=routingKey, this object defines the exchange properties." + }, + "queue": { + "type": "object", + "properties": { + "name": { + "type": "string", + "maxLength": 255, + "description": "The name of the queue. It MUST NOT exceed 255 characters long." + }, + "durable": { + "type": "boolean", + "description": "Whether the queue should survive broker restarts or not." + }, + "exclusive": { + "type": "boolean", + "description": "Whether the queue should be used only by one connection or not." + }, + "autoDelete": { + "type": "boolean", + "description": "Whether the queue should be deleted when the last consumer unsubscribes." + }, + "vhost": { + "type": "string", + "default": "/", + "description": "The virtual host of the queue. Defaults to '/'." + } + }, + "description": "When is=queue, this object defines the queue properties." + }, + "bindingVersion": { + "type": "string", + "enum": [ + "0.2.0" + ], + "description": "The version of this binding. If omitted, 'latest' MUST be assumed." + } + }, + "oneOf": [ + { + "properties": { + "is": { + "const": "routingKey" + } + }, + "required": [ + "exchange" + ], + "not": { + "required": [ + "queue" + ] + } + }, + { + "properties": { + "is": { + "const": "queue" + } + }, + "required": [ + "queue" + ], + "not": { + "required": [ + "exchange" + ] + } + } + ], + "examples": [ + { + "is": "routingKey", + "exchange": { + "name": "myExchange", + "type": "topic", + "durable": true, + "autoDelete": false, + "vhost": "/" + }, + "bindingVersion": "0.2.0" + }, + { + "is": "queue", + "queue": { + "name": "my-queue-name", + "durable": true, + "exclusive": true, + "autoDelete": false, + "vhost": "/" + }, + "bindingVersion": "0.2.0" + } + ] + }, + "http://asyncapi.com/bindings/kafka/0.3.0/channel.json": { + "$id": "http://asyncapi.com/bindings/kafka/0.3.0/channel.json", + "title": "Channel Schema", + "description": "This object contains information about the channel representation in Kafka.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "properties": { + "topic": { + "type": "string", + "description": "Kafka topic name if different from channel name." + }, + "partitions": { + "type": "integer", + "minimum": 1, + "description": "Number of partitions configured on this topic." + }, + "replicas": { + "type": "integer", + "minimum": 1, + "description": "Number of replicas configured on this topic." + }, + "bindingVersion": { + "type": "string", + "enum": [ + "0.3.0" + ], + "description": "The version of this binding. If omitted, 'latest' MUST be assumed." + } + }, + "examples": [ + { + "topic": "my-specific-topic", + "partitions": 20, + "replicas": 3, + "bindingVersion": "0.3.0" + } + ] + }, + "http://asyncapi.com/bindings/anypointmq/0.0.1/channel.json": { + "$id": "http://asyncapi.com/bindings/anypointmq/0.0.1/channel.json", + "title": "Anypoint MQ channel bindings object", + "description": "This object contains configuration for describing an Anypoint MQ exchange, queue, or FIFO queue as an AsyncAPI channel. This objects only contains configuration that can not be provided in the AsyncAPI standard channel object.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "properties": { + "destination": { + "type": "string", + "description": "The destination (queue or exchange) name for this channel. SHOULD only be specified if the channel name differs from the actual destination name, such as when the channel name is not a valid destination name in Anypoint MQ. Defaults to the channel name." + }, + "destinationType": { + "type": "string", + "enum": [ + "exchange", + "queue", + "fifo-queue" + ], + "default": "queue", + "description": "The type of destination. SHOULD be specified to document the messaging model (publish/subscribe, point-to-point, strict message ordering) supported by this channel." + }, + "bindingVersion": { + "type": "string", + "enum": [ + "0.0.1" + ], + "description": "The version of this binding. If omitted, 'latest' MUST be assumed." + } + }, + "examples": [ + { + "destination": "user-signup-exchg", + "destinationType": "exchange", + "bindingVersion": "0.0.1" + } + ] + }, + "http://asyncapi.com/bindings/ibmmq/0.1.0/channel.json": { + "$id": "http://asyncapi.com/bindings/ibmmq/0.1.0/channel.json", + "title": "IBM MQ channel bindings object", + "description": "This object contains information about the channel representation in IBM MQ. Each channel corresponds to a Queue or Topic within IBM MQ.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "properties": { + "destinationType": { + "type": "string", + "enum": [ + "topic", + "queue" + ], + "default": "topic", + "description": "Defines the type of AsyncAPI channel." + }, + "queue": { + "type": "object", + "description": "Defines the properties of a queue.", + "properties": { + "objectName": { + "type": "string", + "maxLength": 48, + "description": "Defines the name of the IBM MQ queue associated with the channel." + }, + "isPartitioned": { + "type": "boolean", + "default": false, + "description": "Defines if the queue is a cluster queue and therefore partitioned. If 'true', a binding option MAY be specified when accessing the queue. More information on binding options can be found on this page in the IBM MQ Knowledge Center." + }, + "exclusive": { + "type": "boolean", + "default": false, + "description": "Specifies if it is recommended to open the queue exclusively." + } + }, + "required": [ + "objectName" + ] + }, + "topic": { + "type": "object", + "description": "Defines the properties of a topic.", + "properties": { + "string": { + "type": "string", + "maxLength": 10240, + "description": "The value of the IBM MQ topic string to be used." + }, + "objectName": { + "type": "string", + "maxLength": 48, + "description": "The name of the IBM MQ topic object." + }, + "durablePermitted": { + "type": "boolean", + "default": true, + "description": "Defines if the subscription may be durable." + }, + "lastMsgRetained": { + "type": "boolean", + "default": false, + "description": "Defines if the last message published will be made available to new subscriptions." + } + } + }, + "maxMsgLength": { + "type": "integer", + "minimum": 0, + "maximum": 104857600, + "description": "The maximum length of the physical message (in bytes) accepted by the Topic or Queue. Messages produced that are greater in size than this value may fail to be delivered. More information on the maximum message length can be found on this [page](https://www.ibm.com/support/knowledgecenter/SSFKSJ_latest/com.ibm.mq.ref.dev.doc/q097520_.html) in the IBM MQ Knowledge Center." + }, + "bindingVersion": { + "type": "string", + "enum": [ + "0.1.0" + ], + "description": "The version of this binding." + } + }, + "oneOf": [ + { + "properties": { + "destinationType": { + "const": "topic" + } + }, + "required": [ + "topic" + ], + "not": { + "required": [ + "queue" + ] + } + }, + { + "properties": { + "destinationType": { + "const": "queue" + } + }, + "required": [ + "queue" + ], + "not": { + "required": [ + "topic" + ] } + } + ], + "examples": [ + { + "destinationType": "topic", + "topic": { + "objectName": "myTopicName" + }, + "bindingVersion": "0.1.0" }, - "bindings": { - "$ref": "http://asyncapi.com/definitions/3.0.0/messageBindingsObject.json" + { + "destinationType": "queue", + "queue": { + "objectName": "myQueueName", + "exclusive": true + }, + "bindingVersion": "0.1.0" } - } + ] }, - "http://asyncapi.com/definitions/3.0.0/parameter.json": { - "$id": "http://asyncapi.com/definitions/3.0.0/parameter.json", + "http://asyncapi.com/bindings/googlepubsub/0.1.0/channel.json": { + "$id": "http://asyncapi.com/bindings/googlepubsub/0.1.0/channel.json", + "title": "Cloud Pub/Sub Channel Schema", + "description": "This object contains information about the channel representation for Google Cloud Pub/Sub.", + "type": "object", "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { @@ -1083,25 +2309,85 @@ } }, "properties": { - "description": { + "bindingVersion": { "type": "string", - "description": "A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed." + "enum": [ + "0.1.0" + ], + "description": "The version of this binding." }, - "schema": { - "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" + "labels": { + "type": "object" }, - "location": { - "type": "string", - "description": "A runtime expression that specifies the location of the parameter value", - "pattern": "^\\$message\\.(header|payload)#(\\/(([^\\/~])|(~[01]))*)*" + "messageRetentionDuration": { + "type": "string" }, - "$ref": { - "$ref": "http://asyncapi.com/definitions/3.0.0/ReferenceObject.json" + "messageStoragePolicy": { + "type": "object", + "additionalProperties": false, + "properties": { + "allowedPersistenceRegions": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "schemaSettings": { + "type": "object", + "additionalItems": false, + "properties": { + "encoding": { + "type": "string" + }, + "firstRevisionId": { + "type": "string" + }, + "lastRevisionId": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "encoding", + "name" + ] + }, + "topic": { + "type": "string" } - } + }, + "required": [ + "schemaSettings", + "topic" + ], + "examples": [ + { + "labels": { + "label1": "value1", + "label2": "value2" + }, + "messageRetentionDuration": "86400s", + "messageStoragePolicy": { + "allowedPersistenceRegions": [ + "us-central1", + "us-east1" + ] + }, + "schemaSettings": { + "encoding": "json", + "name": "projects/your-project-id/schemas/your-schema" + } + } + ] }, - "http://asyncapi.com/definitions/3.0.0/channelBindingsObject.json": { - "$id": "http://asyncapi.com/definitions/3.0.0/channelBindingsObject.json", + "http://asyncapi.com/bindings/pulsar/0.1.0/channel.json": { + "$id": "http://asyncapi.com/bindings/pulsar/0.1.0/channel.json", + "title": "Channel Schema", + "description": "This object contains information about the channel representation in Pulsar, which covers namespace and topic level admin configuration. This object contains additional information not possible to represent within the core AsyncAPI specification.", "type": "object", "additionalProperties": false, "patternProperties": { @@ -1109,24 +2395,85 @@ "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" } }, + "required": [ + "namespace", + "persistence" + ], "properties": { - "http": {}, - "ws": {}, - "amqp": {}, - "amqp1": {}, - "mqtt": {}, - "mqtt5": {}, - "kafka": {}, - "anypointmq": {}, - "nats": {}, - "jms": {}, - "sns": {}, - "sqs": {}, - "stomp": {}, - "redis": {}, - "ibmmq": {}, - "solace": {} - } + "namespace": { + "type": "string", + "description": "The namespace, the channel is associated with." + }, + "persistence": { + "type": "string", + "enum": [ + "persistent", + "non-persistent" + ], + "description": "persistence of the topic in Pulsar." + }, + "compaction": { + "type": "integer", + "minimum": 0, + "description": "Topic compaction threshold given in MB" + }, + "geo-replication": { + "type": "array", + "description": "A list of clusters the topic is replicated to.", + "items": { + "type": "string" + } + }, + "retention": { + "type": "object", + "additionalProperties": false, + "properties": { + "time": { + "type": "integer", + "minimum": 0, + "description": "Time given in Minutes. `0` = Disable message retention." + }, + "size": { + "type": "integer", + "minimum": 0, + "description": "Size given in MegaBytes. `0` = Disable message retention." + } + } + }, + "ttl": { + "type": "integer", + "description": "TTL in seconds for the specified topic" + }, + "deduplication": { + "type": "boolean", + "description": "Whether deduplication of events is enabled or not." + }, + "bindingVersion": { + "type": "string", + "enum": [ + "0.1.0" + ], + "description": "The version of this binding. If omitted, 'latest' MUST be assumed." + } + }, + "examples": [ + { + "namespace": "ns1", + "persistence": "persistent", + "compaction": 1000, + "retention": { + "time": 15, + "size": 1000 + }, + "ttl": 360, + "geo-replication": [ + "us-west", + "us-east" + ], + "deduplication": true, + "bindingVersion": "0.1.0" + } + ] }, "http://asyncapi.com/definitions/3.0.0/operations.json": { "$id": "http://asyncapi.com/definitions/3.0.0/operations.json", @@ -1205,29 +2552,228 @@ "description": { "type": "string" }, - "security": { - "type": "array", - "items": { - "$ref": "http://asyncapi.com/definitions/3.0.0/SecurityRequirement.json" - } + "security": { + "type": "array", + "items": { + "$ref": "http://asyncapi.com/definitions/3.0.0/SecurityRequirement.json" + } + }, + "tags": { + "type": "array", + "items": { + "$ref": "http://asyncapi.com/definitions/3.0.0/tag.json" + }, + "uniqueItems": true + }, + "externalDocs": { + "$ref": "http://asyncapi.com/definitions/3.0.0/externalDocs.json" + }, + "bindings": { + "$ref": "http://asyncapi.com/definitions/3.0.0/operationBindingsObject.json" + } + } + }, + "http://asyncapi.com/definitions/3.0.0/operationTrait.json": { + "$id": "http://asyncapi.com/definitions/3.0.0/operationTrait.json", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "properties": { + "action": { + "$ref": "http://asyncapi.com/definitions/3.0.0/operation.json#/properties/action" + }, + "channel": { + "$ref": "http://asyncapi.com/definitions/3.0.0/operation.json#/properties/channel" + }, + "summary": { + "$ref": "http://asyncapi.com/definitions/3.0.0/operation.json#/properties/summary" + }, + "description": { + "$ref": "http://asyncapi.com/definitions/3.0.0/operation.json#/properties/description" + }, + "security": { + "$ref": "http://asyncapi.com/definitions/3.0.0/operation.json#/properties/security" + }, + "tags": { + "$ref": "http://asyncapi.com/definitions/3.0.0/operation.json#/properties/tags" + }, + "externalDocs": { + "$ref": "http://asyncapi.com/definitions/3.0.0/operation.json#/properties/externalDocs" + }, + "bindings": { + "$ref": "http://asyncapi.com/definitions/3.0.0/operation.json#/properties/bindings" + } + } + }, + "http://asyncapi.com/definitions/3.0.0/operationBindingsObject.json": { + "$id": "http://asyncapi.com/definitions/3.0.0/operationBindingsObject.json", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "properties": { + "http": {}, + "ws": {}, + "amqp": { + "oneOf": [ + { + "description": "Latest binding", + "$ref": "http://asyncapi.com/bindings/amqp/0.2.0/operation.json" + } + ] + }, + "amqp1": {}, + "mqtt": { + "oneOf": [ + { + "description": "Latest binding", + "$ref": "http://asyncapi.com/bindings/mqtt/0.1.0/operation.json" + } + ] + }, + "mqtt5": {}, + "kafka": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/bindings/kafka/0.1.0/operation.json" + }, + { + "description": "Latest binding", + "$ref": "http://asyncapi.com/bindings/kafka/0.3.0/operation.json" + } + ] + }, + "anypointmq": {}, + "nats": { + "oneOf": [ + { + "description": "Latest binding", + "$ref": "http://asyncapi.com/bindings/nats/0.1.0/operation.json" + } + ] + }, + "jms": {}, + "sns": {}, + "sqs": {}, + "stomp": {}, + "redis": {}, + "ibmmq": {}, + "solace": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/bindings/solace/0.2.0/operation.json" + }, + { + "description": "Latest binding", + "$ref": "http://asyncapi.com/bindings/solace/0.3.0/operation.json" + } + ] + }, + "googlepubsub": {} + } + }, + "http://asyncapi.com/bindings/amqp/0.2.0/operation.json": { + "$id": "http://asyncapi.com/bindings/amqp/0.2.0/operation.json", + "title": "AMQP operation bindings object", + "description": "This object contains information about the operation representation in AMQP.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "properties": { + "expiration": { + "type": "integer", + "minimum": 0, + "description": "TTL (Time-To-Live) for the message. It MUST be greater than or equal to zero." + }, + "userId": { + "type": "string", + "description": "Identifies the user who has sent the message." + }, + "cc": { + "type": "array", + "items": { + "type": "string" + }, + "description": "The routing keys the message should be routed to at the time of publishing." + }, + "priority": { + "type": "integer", + "description": "A priority for the message." + }, + "deliveryMode": { + "type": "integer", + "enum": [ + 1, + 2 + ], + "description": "Delivery mode of the message. Its value MUST be either 1 (transient) or 2 (persistent)." + }, + "mandatory": { + "type": "boolean", + "description": "Whether the message is mandatory or not." }, - "tags": { + "bcc": { "type": "array", "items": { - "$ref": "http://asyncapi.com/definitions/3.0.0/tag.json" + "type": "string" }, - "uniqueItems": true + "description": "Like cc but consumers will not receive this information." }, - "externalDocs": { - "$ref": "http://asyncapi.com/definitions/3.0.0/externalDocs.json" + "replyTo": { + "type": "string", + "description": "Name of the queue where the consumer should send the response." }, - "bindings": { - "$ref": "http://asyncapi.com/definitions/3.0.0/operationBindingsObject.json" + "timestamp": { + "type": "boolean", + "description": "Whether the message should include a timestamp or not." + }, + "ack": { + "type": "boolean", + "description": "Whether the consumer should ack the message or not." + }, + "bindingVersion": { + "type": "string", + "enum": [ + "0.2.0" + ], + "description": "The version of this binding. If omitted, \"latest\" MUST be assumed." } - } + }, + "examples": [ + { + "expiration": 100000, + "userId": "guest", + "cc": [ + "user.logs" + ], + "priority": 10, + "deliveryMode": 2, + "mandatory": false, + "bcc": [ + "external.audit" + ], + "replyTo": "user.signedup", + "timestamp": true, + "ack": false, + "bindingVersion": "0.2.0" + } + ] }, - "http://asyncapi.com/definitions/3.0.0/operationTrait.json": { - "$id": "http://asyncapi.com/definitions/3.0.0/operationTrait.json", + "http://asyncapi.com/bindings/mqtt/0.1.0/operation.json": { + "$id": "http://asyncapi.com/bindings/mqtt/0.1.0/operation.json", + "title": "MQTT operation bindings object", + "description": "This object contains information about the operation representation in MQTT.", "type": "object", "additionalProperties": false, "patternProperties": { @@ -1236,34 +2782,126 @@ } }, "properties": { - "action": { - "$ref": "http://asyncapi.com/definitions/3.0.0/operation.json#/properties/action" - }, - "channel": { - "$ref": "http://asyncapi.com/definitions/3.0.0/operation.json#/properties/channel" + "qos": { + "type": "integer", + "description": "Defines the Quality of Service (QoS) levels for the message flow between client and server. Its value MUST be either 0 (At most once delivery), 1 (At least once delivery), or 2 (Exactly once delivery)." }, - "summary": { - "$ref": "http://asyncapi.com/definitions/3.0.0/operation.json#/properties/summary" + "retain": { + "type": "boolean", + "description": "Whether the broker should retain the message or not." }, - "description": { - "$ref": "http://asyncapi.com/definitions/3.0.0/operation.json#/properties/description" + "bindingVersion": { + "type": "string", + "enum": [ + "0.1.0" + ], + "description": "The version of this binding. If omitted, 'latest' MUST be assumed." + } + }, + "examples": [ + { + "qos": 2, + "retain": true, + "bindingVersion": "0.1.0" + } + ] + }, + "http://asyncapi.com/bindings/kafka/0.1.0/operation.json": { + "$id": "http://asyncapi.com/bindings/kafka/0.1.0/operation.json", + "title": "Kafka operation message bindings object", + "description": "This object contains information about the operation representation in Kafka.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "properties": { + "groupId": { + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json", + "description": "Id of the consumer group." }, - "security": { - "$ref": "http://asyncapi.com/definitions/3.0.0/operation.json#/properties/security" + "clientId": { + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json", + "description": "Id of the consumer inside a consumer group." }, - "tags": { - "$ref": "http://asyncapi.com/definitions/3.0.0/operation.json#/properties/tags" + "bindingVersion": { + "type": "string", + "enum": [ + "0.1.0" + ], + "description": "The version of this binding. If omitted, 'latest' MUST be assumed." + } + }, + "examples": [ + { + "groupId": { + "type": "string", + "enum": [ + "myGroupId" + ] + }, + "clientId": { + "type": "string", + "enum": [ + "myClientId" + ] + }, + "bindingVersion": "0.1.0" + } + ] + }, + "http://asyncapi.com/bindings/kafka/0.3.0/operation.json": { + "$id": "http://asyncapi.com/bindings/kafka/0.3.0/operation.json", + "title": "Operation Schema", + "description": "This object contains information about the operation representation in Kafka.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "properties": { + "groupId": { + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json", + "description": "Id of the consumer group." }, - "externalDocs": { - "$ref": "http://asyncapi.com/definitions/3.0.0/operation.json#/properties/externalDocs" + "clientId": { + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json", + "description": "Id of the consumer inside a consumer group." }, - "bindings": { - "$ref": "http://asyncapi.com/definitions/3.0.0/operation.json#/properties/bindings" + "bindingVersion": { + "type": "string", + "enum": [ + "0.3.0" + ], + "description": "The version of this binding. If omitted, 'latest' MUST be assumed." } - } + }, + "examples": [ + { + "groupId": { + "type": "string", + "enum": [ + "myGroupId" + ] + }, + "clientId": { + "type": "string", + "enum": [ + "myClientId" + ] + }, + "bindingVersion": "0.3.0" + } + ] }, - "http://asyncapi.com/definitions/3.0.0/operationBindingsObject.json": { - "$id": "http://asyncapi.com/definitions/3.0.0/operationBindingsObject.json", + "http://asyncapi.com/bindings/nats/0.1.0/operation.json": { + "$id": "http://asyncapi.com/bindings/nats/0.1.0/operation.json", + "title": "NATS operation bindings object", + "description": "This object contains information about the operation representation in NATS.", "type": "object", "additionalProperties": false, "patternProperties": { @@ -1272,23 +2910,243 @@ } }, "properties": { - "http": {}, - "ws": {}, - "amqp": {}, - "amqp1": {}, - "mqtt": {}, - "mqtt5": {}, - "kafka": {}, - "anypointmq": {}, - "nats": {}, - "jms": {}, - "sns": {}, - "sqs": {}, - "stomp": {}, - "redis": {}, - "ibmmq": {}, - "solace": {} - } + "queue": { + "type": "string", + "description": "Defines the name of the queue to use. It MUST NOT exceed 255 characters.", + "maxLength": 255 + }, + "bindingVersion": { + "type": "string", + "enum": [ + "0.1.0" + ], + "description": "The version of this binding. If omitted, 'latest' MUST be assumed." + } + }, + "examples": [ + { + "queue": "MyCustomQueue", + "bindingVersion": "0.1.0" + } + ] + }, + "http://asyncapi.com/bindings/solace/0.2.0/operation.json": { + "$id": "http://asyncapi.com/bindings/solace/0.2.0/operation.json", + "title": "Solace operation bindings object", + "description": "This object contains information about the operation representation in Solace.", + "type": "object", + "additionalProperties": false, + "properties": { + "destinations": { + "description": "The list of Solace destinations referenced in the operation.", + "type": "array", + "items": { + "type": "object", + "properties": { + "deliveryMode": { + "type": "string", + "enum": [ + "direct", + "persistent" + ] + } + }, + "oneOf": [ + { + "properties": { + "destinationType": { + "type": "string", + "const": "queue", + "description": "If the type is queue, then the subscriber can bind to the queue. The queue subscribes to the given topicSubscriptions. If no topicSubscriptions are provied, the queue will subscribe to the topic as represented by the channel name." + }, + "queue": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The name of the queue" + }, + "topicSubscriptions": { + "type": "array", + "description": "The list of topics that the queue subscribes to.", + "items": { + "type": "string" + } + }, + "accessType": { + "type": "string", + "enum": [ + "exclusive", + "nonexclusive" + ] + } + } + } + } + }, + { + "properties": { + "destinationType": { + "type": "string", + "const": "topic", + "description": "If the type is topic, then the subscriber subscribes to the given topicSubscriptions. If no topicSubscriptions are provided, the client will subscribe to the topic as represented by the channel name." + }, + "topicSubscriptions": { + "type": "array", + "description": "The list of topics that the client subscribes to.", + "items": { + "type": "string" + } + } + } + } + ] + } + } + }, + "bindingVersion": { + "type": "string", + "enum": [ + "0.2.0" + ], + "description": "The version of this binding. If omitted, \"latest\" MUST be assumed." + }, + "examples": [ + { + "bindingVersion": "0.2.0", + "destinations": [ + { + "destinationType": "queue", + "queue": { + "name": "sampleQueue", + "topicSubscriptions": [ + "samples/*" + ], + "accessType": "nonexclusive" + } + }, + { + "destinationType": "topic", + "topicSubscriptions": [ + "samples/*" + ] + } + ] + } + ] + }, + "http://asyncapi.com/bindings/solace/0.3.0/operation.json": { + "$id": "http://asyncapi.com/bindings/solace/0.3.0/operation.json", + "title": "Solace operation bindings object", + "description": "This object contains information about the operation representation in Solace.", + "type": "object", + "additionalProperties": false, + "properties": { + "destinations": { + "description": "The list of Solace destinations referenced in the operation.", + "type": "array", + "items": { + "type": "object", + "properties": { + "deliveryMode": { + "type": "string", + "enum": [ + "direct", + "persistent" + ] + } + }, + "oneOf": [ + { + "properties": { + "destinationType": { + "type": "string", + "const": "queue", + "description": "If the type is queue, then the subscriber can bind to the queue. The queue subscribes to the given topicSubscriptions. If no topicSubscriptions are provied, the queue will subscribe to the topic as represented by the channel name." + }, + "queue": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The name of the queue" + }, + "topicSubscriptions": { + "type": "array", + "description": "The list of topics that the queue subscribes to.", + "items": { + "type": "string" + } + }, + "accessType": { + "type": "string", + "enum": [ + "exclusive", + "nonexclusive" + ] + }, + "maxTtl": { + "type": "string", + "description": "The maximum TTL to apply to messages to be spooled." + }, + "maxMsgSpoolUsage": { + "type": "string", + "description": "The maximum amount of message spool that the given queue may use" + } + } + } + } + }, + { + "properties": { + "destinationType": { + "type": "string", + "const": "topic", + "description": "If the type is topic, then the subscriber subscribes to the given topicSubscriptions. If no topicSubscriptions are provided, the client will subscribe to the topic as represented by the channel name." + }, + "topicSubscriptions": { + "type": "array", + "description": "The list of topics that the client subscribes to.", + "items": { + "type": "string" + } + } + } + } + ] + } + } + }, + "bindingVersion": { + "type": "string", + "enum": [ + "0.3.0" + ], + "description": "The version of this binding. If omitted, \"latest\" MUST be assumed." + }, + "examples": [ + { + "bindingVersion": "0.3.0", + "destinations": [ + { + "destinationType": "queue", + "queue": { + "name": "sampleQueue", + "topicSubscriptions": [ + "samples/*" + ], + "accessType": "nonexclusive" + } + }, + { + "destinationType": "topic", + "topicSubscriptions": [ + "samples/*" + ] + } + ] + } + ] }, "http://asyncapi.com/definitions/3.0.0/components.json": { "$id": "http://asyncapi.com/definitions/3.0.0/components.json", @@ -1364,25 +3222,25 @@ "serverBindings": { "type": "object", "additionalProperties": { - "$ref": "http://asyncapi.com/definitions/3.0.0/bindingsObject.json" + "$ref": "http://asyncapi.com/definitions/3.0.0/serverBindingsObject.json" } }, "channelBindings": { "type": "object", "additionalProperties": { - "$ref": "http://asyncapi.com/definitions/3.0.0/bindingsObject.json" + "$ref": "http://asyncapi.com/definitions/3.0.0/channelBindingsObject.json" } }, "operationBindings": { "type": "object", "additionalProperties": { - "$ref": "http://asyncapi.com/definitions/3.0.0/bindingsObject.json" + "$ref": "http://asyncapi.com/definitions/3.0.0/operationBindingsObject.json" } }, "messageBindings": { "type": "object", "additionalProperties": { - "$ref": "http://asyncapi.com/definitions/3.0.0/bindingsObject.json" + "$ref": "http://asyncapi.com/definitions/3.0.0/messageBindingsObject.json" } } } @@ -1948,29 +3806,6 @@ "$ref": "http://asyncapi.com/definitions/3.0.0/parameter.json" }, "description": "JSON objects describing re-usable channel parameters." - }, - "http://asyncapi.com/definitions/3.0.0/bindingsObject.json": { - "$id": "http://asyncapi.com/definitions/3.0.0/bindingsObject.json", - "type": "object", - "additionalProperties": true, - "properties": { - "http": {}, - "ws": {}, - "amqp": {}, - "amqp1": {}, - "mqtt": {}, - "mqtt5": {}, - "kafka": {}, - "anypointmq": {}, - "nats": {}, - "jms": {}, - "sns": {}, - "sqs": {}, - "stomp": {}, - "redis": {}, - "ibmmq": {}, - "solace": {} - } } }, "description": "!!Auto generated!! \n Do not manually edit. " diff --git a/test/docs/3.0.0/streetlights-all.json b/test/docs/3.0.0/streetlights-all.json new file mode 100644 index 00000000..d0b16f55 --- /dev/null +++ b/test/docs/3.0.0/streetlights-all.json @@ -0,0 +1,61 @@ +{ + "asyncapi": "3.0.0", + "info": { + "title": "Account Service", + "version": "1.0.0", + "description": "This service is in charge of processing user signups" + }, + "channels": { + "UserSignedUpChannel": { + "address": "user/signedup", + "messages": { + "UserSignedUp": { + "$ref": "#/components/messages/UserSignedUp" + } + } + } + }, + "operations": { + "PublishUserSignedUp": { + "action": "send", + "channel": { + "$ref": "#/channels/UserSignedUpChannel" + }, + "bindings": { + "mqtt": { + "bindingVersion": "0.1.0", + "qos": 1 + }, + "kafka": { + "bindingVersion": "0.3.0", + "clientId": { + "type": "string", + "enum": [ + "my-app-id" + ] + } + } + } + } + }, + "components": { + "messages": { + "UserSignedUp": { + "payload": { + "type": "object", + "properties": { + "displayName": { + "type": "string", + "description": "Name of the user" + }, + "email": { + "type": "string", + "format": "email", + "description": "Email of the user" + } + } + } + } + } + } +} \ No newline at end of file diff --git a/test/schemas.js b/test/schemas.js new file mode 100644 index 00000000..562362d8 --- /dev/null +++ b/test/schemas.js @@ -0,0 +1,33 @@ +const assert = require('assert'); +const fs = require('fs'); +const path = require('path'); +const Ajv = require("ajv") +const versionsToTest = [ + { + version: '3.0.0' + } +] + +it('Versions should accurately validate documents', () => { + for (const versionToTest of versionsToTest) { + const version = versionToTest.version; + const asyncapi = require('..'); + const schema = asyncapi[version]; + delete schema.definitions['http://json-schema.org/draft-07/schema']; + const ajv = new Ajv({ + jsonPointers: true, + allErrors: true, + schemaId: '$id', + logger: false, + validateFormats: false, + strict: false + }); + const documentPaths = fs.readdirSync(path.resolve(__dirname, `./docs/${version}`)).map((pathToDoc) => {return path.resolve(__dirname, `./docs/${version}/${pathToDoc}`)}); + for (const documentPath of documentPaths) { + const document = require(documentPath); + const validate = ajv.compile(schema) + const valid = validate(document) + assert(valid === true, 'Document must be validated correctly: ' + JSON.stringify(validate.errors, null, 4)); + } + } +}); diff --git a/tools/bundler/index.js b/tools/bundler/index.js index 3733af64..880686fe 100644 --- a/tools/bundler/index.js +++ b/tools/bundler/index.js @@ -1,10 +1,41 @@ const path = require('path'); const fs = require('fs'); const definitionsDirectory = path.resolve(__dirname, '../../definitions'); +const bindingsDirectory = path.resolve(__dirname, '../../bindings'); const outputDirectory = path.resolve(__dirname, '../../schemas'); console.log(`Looking for separate definitions in the following directory: ${definitionsDirectory}`); +console.log(`Looking for binding version schemas in the following directory: ${bindingsDirectory}`); console.log(`Using the following output directory: ${outputDirectory}`); +/** + * Function to load all the core AsyncAPI spec definition (except the root asyncapi schema, as that will be loaded later) into the bundler. + */ +async function loadDefinitions(bundler, versionDir) { + 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); + } +} +/** + * Function to load all the binding version schemas into the bundler + */ +async function loadBindings(bundler) { + const bindingDirectories = await fs.promises.readdir(bindingsDirectory); + for (const bindingDirectory of bindingDirectories) { + const bindingVersionDirectories = await fs.promises.readdir(path.resolve(bindingsDirectory, bindingDirectory)); + const bindingVersionDirectoriesFiltered = bindingVersionDirectories.filter((file) => fs.lstatSync(path.resolve(bindingsDirectory, bindingDirectory, file)).isDirectory()); + for (const bindingVersionDirectory of bindingVersionDirectoriesFiltered) { + const bindingFiles = await fs.promises.readdir(path.resolve(bindingsDirectory, bindingDirectory, bindingVersionDirectory)); + const bindingFilesFiltered = bindingFiles.filter((bindingFile) => path.extname(bindingFile) === '.json').map((bindingFile) => path.resolve(bindingsDirectory, bindingDirectory, bindingVersionDirectory, bindingFile)); + for (const bindingFile of bindingFilesFiltered) { + const bindingFileContent = require(bindingFile); + bundler.add(bindingFileContent); + } + } + } +} /** * When run, go through all versions that have split definitions and bundles them together. */ @@ -20,12 +51,8 @@ console.log(`Using the following output directory: ${outputDirectory}`); 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); - } + await loadDefinitions(Bundler, versionDir); + await loadBindings(Bundler); const filePathToBundle = `file://${versionDir}/asyncapi.json`; const fileToBundle = await Bundler.get(filePathToBundle); const bundledSchema = await Bundler.bundle(fileToBundle); @@ -33,7 +60,7 @@ console.log(`Using the following output directory: ${outputDirectory}`); 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) { + }catch(e) { console.log(e); } } From eeb6d5d493a22b9a158eb4be4b6794f2153d8eb4 Mon Sep 17 00:00:00 2001 From: asyncapi-bot Date: Wed, 1 Feb 2023 17:14:06 +0100 Subject: [PATCH 010/102] chore(release): v5.0.0-next-major-spec.1 (#309) --- package-lock.json | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index 55917487..509d4e23 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "@asyncapi/specs", - "version": "4.0.0-next-major-spec.1", + "version": "5.0.0-next-major-spec.1", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 9403dd12..fea56c57 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@asyncapi/specs", - "version": "4.0.0-next-major-spec.1", + "version": "5.0.0-next-major-spec.1", "description": "AsyncAPI schema versions", "main": "index.js", "types": "index.d.ts", From bc4e45853bb4b836578c92796981e18391875259 Mon Sep 17 00:00:00 2001 From: Jonas Lagoni Date: Fri, 3 Feb 2023 00:25:20 +0100 Subject: [PATCH 011/102] feat: add kafka 0.4 and mqtt5 changes (#310) --- bindings/ibmmq/0.1.0/channel.json | 3 -- bindings/kafka/0.4.0/channel.json | 80 +++++++++++++++++++++++++++++ bindings/kafka/0.4.0/message.json | 61 ++++++++++++++++++++++ bindings/kafka/0.4.0/operation.json | 47 +++++++++++++++++ bindings/kafka/0.4.0/server.json | 37 +++++++++++++ bindings/mqtt5/.keep | 0 bindings/mqtt5/0.2.0/server.json | 53 +++++++++++++++++++ 7 files changed, 278 insertions(+), 3 deletions(-) create mode 100644 bindings/kafka/0.4.0/channel.json create mode 100644 bindings/kafka/0.4.0/message.json create mode 100644 bindings/kafka/0.4.0/operation.json create mode 100644 bindings/kafka/0.4.0/server.json delete mode 100644 bindings/mqtt5/.keep create mode 100644 bindings/mqtt5/0.2.0/server.json diff --git a/bindings/ibmmq/0.1.0/channel.json b/bindings/ibmmq/0.1.0/channel.json index 85ea1a14..dabc2b45 100644 --- a/bindings/ibmmq/0.1.0/channel.json +++ b/bindings/ibmmq/0.1.0/channel.json @@ -84,9 +84,6 @@ "properties": { "destinationType": { "const": "topic" } }, - "required": [ - "topic" - ], "not": { "required": [ "queue" diff --git a/bindings/kafka/0.4.0/channel.json b/bindings/kafka/0.4.0/channel.json new file mode 100644 index 00000000..a072d922 --- /dev/null +++ b/bindings/kafka/0.4.0/channel.json @@ -0,0 +1,80 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/bindings/kafka/0.4.0/channel.json", + "title": "Channel Schema", + "description": "This object contains information about the channel representation in Kafka.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\-\\_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "properties": { + "topic": { + "type": "string", + "description": "Kafka topic name if different from channel name." + }, + "partitions": { + "type": "integer", + "minimum": 1, + "description": "Number of partitions configured on this topic." + }, + "replicas": { + "type": "integer", + "minimum": 1, + "description": "Number of replicas configured on this topic." + }, + "topicConfiguration" : { + "description": "Topic configuration properties that are relevant for the API.", + "type": "object", + "additionalProperties": false, + "properties": { + "cleanup.policy": { + "description": "The [`cleanup.policy`](https://kafka.apache.org/documentation/#topicconfigs_cleanup.policy) configuration option.", + "type": "array", + "items":{ + "type": "string", + "enum": ["compact", "delete"] + } + }, + "retention.ms": { + "description": "The [`retention.ms`](https://kafka.apache.org/documentation/#topicconfigs_retention.ms) configuration option.", + "type": "integer", + "minimum": -1 + }, + "retention.bytes": { + "description": "The [`retention.bytes`](https://kafka.apache.org/documentation/#topicconfigs_retention.bytes) configuration option.", + "type": "integer", + "minimum": -1 + }, + "delete.retention.ms": { + "description": "The [`delete.retention.ms`](https://kafka.apache.org/documentation/#topicconfigs_delete.retention.ms) configuration option.", + "type": "integer", + "minimum": 0 + }, + "max.message.bytes": { + "description": "The [`max.message.bytes`](https://kafka.apache.org/documentation/#topicconfigs_max.message.bytes) configuration option.", + "type": "integer", + "minimum": 0 + } + } + }, + "bindingVersion": { + "type": "string", + "enum": [ + "0.4.0" + ], + "description": "The version of this binding. If omitted, 'latest' MUST be assumed." + } + + }, + "examples": [ + { + "topic": "my-specific-topic", + "partitions": 20, + "replicas": 3, + "bindingVersion": "0.4.0" + } + ] +} diff --git a/bindings/kafka/0.4.0/message.json b/bindings/kafka/0.4.0/message.json new file mode 100644 index 00000000..ba3f54ef --- /dev/null +++ b/bindings/kafka/0.4.0/message.json @@ -0,0 +1,61 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/bindings/kafka/0.4.0/message.json", + "title": "Message Schema", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\-\\_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "properties": { + "key": { + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json", + "description": "The message key." + }, + "schemaIdLocation": { + "type": "string", + "description": "If a Schema Registry is used when performing this operation, tells where the id of schema is stored.", + "enum": ["header", "payload"] + }, + "schemaIdPayloadEncoding": { + "type": "string", + "description": "Number of bytes or vendor specific values when schema id is encoded in payload." + }, + "schemaLookupStrategy": { + "type": "string", + "description": "Freeform string for any naming strategy class to use. Clients should default to the vendor default if not supplied." + }, + "bindingVersion": { + "type": "string", + "enum": [ + "0.4.0" + ], + "description": "The version of this binding. If omitted, 'latest' MUST be assumed." + } + + }, + "examples": [ + { + "key": { + "type": "string", + "enum": [ + "myKey" + ] + }, + "schemaIdLocation": "payload", + "schemaIdPayloadEncoding": "apicurio-new", + "schemaLookupStrategy": "TopicIdStrategy", + "bindingVersion": "0.4.0" + }, + { + "key": { + "$ref": "path/to/user-create.avsc#/UserCreate" + }, + "schemaIdLocation": "payload", + "schemaIdPayloadEncoding": "4", + "bindingVersion": "0.4.0" + } + ] +} diff --git a/bindings/kafka/0.4.0/operation.json b/bindings/kafka/0.4.0/operation.json new file mode 100644 index 00000000..2dbc5b99 --- /dev/null +++ b/bindings/kafka/0.4.0/operation.json @@ -0,0 +1,47 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/bindings/kafka/0.4.0/operation.json", + "title": "Operation Schema", + "description": "This object contains information about the operation representation in Kafka.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\-\\_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "properties": { + "groupId": { + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json", + "description": "Id of the consumer group." + }, + "clientId": { + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json", + "description": "Id of the consumer inside a consumer group." + }, + "bindingVersion": { + "type": "string", + "enum": [ + "0.4.0" + ], + "description": "The version of this binding. If omitted, 'latest' MUST be assumed." + } + }, + "examples": [ + { + "groupId": { + "type": "string", + "enum": [ + "myGroupId" + ] + }, + "clientId": { + "type": "string", + "enum": [ + "myClientId" + ] + }, + "bindingVersion": "0.4.0" + } + ] +} diff --git a/bindings/kafka/0.4.0/server.json b/bindings/kafka/0.4.0/server.json new file mode 100644 index 00000000..d583e130 --- /dev/null +++ b/bindings/kafka/0.4.0/server.json @@ -0,0 +1,37 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/bindings/kafka/0.4.0/server.json", + "title": "Server Schema", + "description": "This object contains server connection information to a Kafka broker. This object contains additional information not possible to represent within the core AsyncAPI specification.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\-\\_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "properties": { + "schemaRegistryUrl": { + "type": "string", + "description": "API URL for the Schema Registry used when producing Kafka messages (if a Schema Registry was used)." + }, + "schemaRegistryVendor": { + "type": "string", + "description": "The vendor of the Schema Registry and Kafka serdes library that should be used." + }, + "bindingVersion": { + "type": "string", + "enum": [ + "0.4.0" + ], + "description": "The version of this binding." + } + }, + "examples": [ + { + "schemaRegistryUrl": "https://my-schema-registry.com", + "schemaRegistryVendor": "confluent", + "bindingVersion": "0.4.0" + } + ] +} \ No newline at end of file diff --git a/bindings/mqtt5/.keep b/bindings/mqtt5/.keep deleted file mode 100644 index e69de29b..00000000 diff --git a/bindings/mqtt5/0.2.0/server.json b/bindings/mqtt5/0.2.0/server.json new file mode 100644 index 00000000..7ec26256 --- /dev/null +++ b/bindings/mqtt5/0.2.0/server.json @@ -0,0 +1,53 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/bindings/mqtt5/0.1.0/server.json", + "title": "Server Schema", + "description": "This object contains information about the server representation in MQTT5.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\-\\_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "properties": { + + "sessionExpiryInterval": { + "oneOf": [ + { + "type": "integer", + "minimum": 0 + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + } + ], + "description": "Session Expiry Interval in seconds or a Schema Object containing the definition of the interval." + }, + "bindingVersion": { + "type": "string", + "enum": [ + "0.2.0" + ], + "description": "The version of this binding. If omitted, 'latest' MUST be assumed." + } + }, + "examples": [ + { + "sessionExpiryInterval": 60, + "bindingVersion": "0.2.0" + }, + { + "sessionExpiryInterval": { + "type": "integer", + "minimum": 100 + }, + "bindingVersion": "0.2.0" + } + ] + } + + \ No newline at end of file From 6dfff33b2e461883ec8cfff50f4cc65b0f838b6d Mon Sep 17 00:00:00 2001 From: asyncapi-bot Date: Fri, 3 Feb 2023 00:28:48 +0100 Subject: [PATCH 012/102] chore(release): v5.0.0-next-major-spec.2 (#311) --- package-lock.json | 2 +- package.json | 2 +- schemas/3.0.0.json | 3 --- 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index 509d4e23..d96314f7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "@asyncapi/specs", - "version": "5.0.0-next-major-spec.1", + "version": "5.0.0-next-major-spec.2", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index fea56c57..22e83a27 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@asyncapi/specs", - "version": "5.0.0-next-major-spec.1", + "version": "5.0.0-next-major-spec.2", "description": "AsyncAPI schema versions", "main": "index.js", "types": "index.d.ts", diff --git a/schemas/3.0.0.json b/schemas/3.0.0.json index 4972587b..e2abdb38 100644 --- a/schemas/3.0.0.json +++ b/schemas/3.0.0.json @@ -2254,9 +2254,6 @@ "const": "topic" } }, - "required": [ - "topic" - ], "not": { "required": [ "queue" From 2a8ea92e20520e87477b869ea24a2f7a57e8ec4a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maciej=20Urba=C5=84czyk?= Date: Mon, 6 Feb 2023 12:14:00 +0100 Subject: [PATCH 013/102] feat: move tags and externalDocs objects from root to the info object (#244) --- definitions/3.0.0/info.json | 10 ++++++++++ schemas/3.0.0.json | 10 ---------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/definitions/3.0.0/info.json b/definitions/3.0.0/info.json index 1cfc1ee8..b3f3d877 100644 --- a/definitions/3.0.0/info.json +++ b/definitions/3.0.0/info.json @@ -34,6 +34,16 @@ }, "license": { "$ref": "http://asyncapi.com/definitions/3.0.0/license.json" + }, + "tags": { + "type": "array", + "items": { + "$ref": "http://asyncapi.com/definitions/3.0.0/tag.json" + }, + "uniqueItems": true + }, + "externalDocs": { + "$ref": "http://asyncapi.com/definitions/3.0.0/externalDocs.json" } }, "$schema": "http://json-schema.org/draft-07/schema#", diff --git a/schemas/3.0.0.json b/schemas/3.0.0.json index e2abdb38..b1332fb2 100644 --- a/schemas/3.0.0.json +++ b/schemas/3.0.0.json @@ -43,16 +43,6 @@ }, "components": { "$ref": "http://asyncapi.com/definitions/3.0.0/components.json" - }, - "tags": { - "type": "array", - "items": { - "$ref": "http://asyncapi.com/definitions/3.0.0/tag.json" - }, - "uniqueItems": true - }, - "externalDocs": { - "$ref": "http://asyncapi.com/definitions/3.0.0/externalDocs.json" } }, "definitions": { From b87f2d3807413eb8642898b1981058f0e4d30b9d Mon Sep 17 00:00:00 2001 From: asyncapi-bot Date: Mon, 6 Feb 2023 12:18:01 +0100 Subject: [PATCH 014/102] chore(release): v5.0.0-next-major-spec.3 (#314) --- package-lock.json | 2 +- package.json | 2 +- schemas/3.0.0.json | 114 ++++++++++++++++++++++++++------------------- 3 files changed, 69 insertions(+), 49 deletions(-) diff --git a/package-lock.json b/package-lock.json index d96314f7..35eacc29 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "@asyncapi/specs", - "version": "5.0.0-next-major-spec.2", + "version": "5.0.0-next-major-spec.3", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 22e83a27..78756c04 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@asyncapi/specs", - "version": "5.0.0-next-major-spec.2", + "version": "5.0.0-next-major-spec.3", "description": "AsyncAPI schema versions", "main": "index.js", "types": "index.d.ts", diff --git a/schemas/3.0.0.json b/schemas/3.0.0.json index b1332fb2..69e3d3fd 100644 --- a/schemas/3.0.0.json +++ b/schemas/3.0.0.json @@ -43,6 +43,16 @@ }, "components": { "$ref": "http://asyncapi.com/definitions/3.0.0/components.json" + }, + "tags": { + "type": "array", + "items": { + "$ref": "http://asyncapi.com/definitions/3.0.0/tag.json" + }, + "uniqueItems": true + }, + "externalDocs": { + "$ref": "http://asyncapi.com/definitions/3.0.0/externalDocs.json" } }, "definitions": { @@ -89,6 +99,16 @@ }, "license": { "$ref": "http://asyncapi.com/definitions/3.0.0/license.json" + }, + "tags": { + "type": "array", + "items": { + "$ref": "http://asyncapi.com/definitions/3.0.0/tag.json" + }, + "uniqueItems": true + }, + "externalDocs": { + "$ref": "http://asyncapi.com/definitions/3.0.0/externalDocs.json" } } }, @@ -143,6 +163,53 @@ } } }, + "http://asyncapi.com/definitions/3.0.0/tag.json": { + "$id": "http://asyncapi.com/definitions/3.0.0/tag.json", + "type": "object", + "additionalProperties": false, + "required": [ + "name" + ], + "properties": { + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "externalDocs": { + "$ref": "http://asyncapi.com/definitions/3.0.0/externalDocs.json" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + } + }, + "http://asyncapi.com/definitions/3.0.0/externalDocs.json": { + "$id": "http://asyncapi.com/definitions/3.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/3.0.0/specificationExtension.json" + } + } + }, "http://asyncapi.com/definitions/3.0.0/servers.json": { "$id": "http://asyncapi.com/definitions/3.0.0/servers.json", "description": "An object representing multiple servers.", @@ -1181,29 +1248,6 @@ }, "default": true }, - "http://asyncapi.com/definitions/3.0.0/externalDocs.json": { - "$id": "http://asyncapi.com/definitions/3.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/3.0.0/specificationExtension.json" - } - } - }, "http://asyncapi.com/definitions/3.0.0/correlationId.json": { "$id": "http://asyncapi.com/definitions/3.0.0/correlationId.json", "type": "object", @@ -1228,30 +1272,6 @@ } } }, - "http://asyncapi.com/definitions/3.0.0/tag.json": { - "$id": "http://asyncapi.com/definitions/3.0.0/tag.json", - "type": "object", - "additionalProperties": false, - "required": [ - "name" - ], - "properties": { - "name": { - "type": "string" - }, - "description": { - "type": "string" - }, - "externalDocs": { - "$ref": "http://asyncapi.com/definitions/3.0.0/externalDocs.json" - } - }, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" - } - } - }, "http://asyncapi.com/definitions/3.0.0/messageBindingsObject.json": { "$id": "http://asyncapi.com/definitions/3.0.0/messageBindingsObject.json", "type": "object", From 29674f55479d85aa30f9d57228dd487b403d2aa0 Mon Sep 17 00:00:00 2001 From: jonaslagoni Date: Tue, 7 Feb 2023 11:14:09 +0100 Subject: [PATCH 015/102] chore: update package-lock.json from master --- package-lock.json | 877 +++++++++++++++++++++++----------------------- 1 file changed, 431 insertions(+), 446 deletions(-) diff --git a/package-lock.json b/package-lock.json index 35eacc29..1494525b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -56,6 +56,12 @@ "js-tokens": "^4.0.0" } }, + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + }, "source-map": { "version": "0.5.7", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", @@ -685,18 +691,6 @@ "indent-string": "^4.0.0" } }, - "ajv": { - "version": "8.11.2", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.11.2.tgz", - "integrity": "sha512-E4bfmKAhGiSTvMfL1Myyycaub+cUEU2/IvpylXkUu7CHBkBj1f/ikdzbD7YQ6FKUbixDxeYvB/xY4fvyroDlQg==", - "dev": true, - "requires": { - "fast-deep-equal": "^3.1.1", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2", - "uri-js": "^4.2.2" - } - }, "ansi-colors": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", @@ -712,12 +706,6 @@ "type-fest": "^1.0.2" } }, - "ansi-regex": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", - "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", - "dev": true - }, "ansi-styles": { "version": "3.2.1", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", @@ -894,6 +882,17 @@ "ansi-styles": "^3.2.1", "escape-string-regexp": "^1.0.5", "supports-color": "^5.3.0" + }, + "dependencies": { + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } } }, "chokidar": { @@ -928,17 +927,6 @@ "string-width": "^4.2.0" } }, - "cliui": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz", - "integrity": "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==", - "dev": true, - "requires": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^6.2.0" - } - }, "color-convert": { "version": "1.9.3", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", @@ -960,16 +948,6 @@ "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=", "dev": true }, - "compare-func": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/compare-func/-/compare-func-1.3.2.tgz", - "integrity": "sha1-md0LpFfh+bxyKxLAjsM+6rMfpkg=", - "dev": true, - "requires": { - "array-ify": "^1.0.0", - "dot-prop": "^3.0.0" - } - }, "concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", @@ -977,24 +955,78 @@ "dev": true }, "conventional-changelog-angular": { - "version": "5.0.6", - "resolved": "https://registry.npmjs.org/conventional-changelog-angular/-/conventional-changelog-angular-5.0.6.tgz", - "integrity": "sha512-QDEmLa+7qdhVIv8sFZfVxU1VSyVvnXPsxq8Vam49mKUcO1Z8VTLEJk9uI21uiJUsnmm0I4Hrsdc9TgkOQo9WSA==", + "version": "5.0.13", + "resolved": "https://registry.npmjs.org/conventional-changelog-angular/-/conventional-changelog-angular-5.0.13.tgz", + "integrity": "sha512-i/gipMxs7s8L/QeuavPF2hLnJgH6pEZAttySB6aiQLWcX3puWDL3ACVmvBhJGxnAy52Qc15ua26BufY6KpmrVA==", "dev": true, "requires": { - "compare-func": "^1.3.1", + "compare-func": "^2.0.0", "q": "^1.5.1" + }, + "dependencies": { + "compare-func": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/compare-func/-/compare-func-2.0.0.tgz", + "integrity": "sha512-zHig5N+tPWARooBnb0Zx1MFcdfpyJrfTJ3Y5L+IFvUm8rM74hHz66z0gw0x4tijh5CorKkKUCnW82R2vmpeCRA==", + "dev": true, + "requires": { + "array-ify": "^1.0.0", + "dot-prop": "^5.1.0" + } + }, + "dot-prop": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-5.3.0.tgz", + "integrity": "sha512-QM8q3zDe58hqUqjraQOmzZ1LIH9SWQJTlEKCH4kJ2oQvLZk7RbQXvtDM2XEq3fwkV9CCvvH4LA0AV+ogFsBM2Q==", + "dev": true, + "requires": { + "is-obj": "^2.0.0" + } + }, + "is-obj": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-2.0.0.tgz", + "integrity": "sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w==", + "dev": true + } } }, "conventional-changelog-conventionalcommits": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/conventional-changelog-conventionalcommits/-/conventional-changelog-conventionalcommits-4.2.3.tgz", - "integrity": "sha512-atGa+R4vvEhb8N/8v3IoW59gCBJeeFiX6uIbPu876ENAmkMwsenyn0R21kdDHJFLQdy6zW4J6b4xN8KI3b9oww==", + "version": "4.6.3", + "resolved": "https://registry.npmjs.org/conventional-changelog-conventionalcommits/-/conventional-changelog-conventionalcommits-4.6.3.tgz", + "integrity": "sha512-LTTQV4fwOM4oLPad317V/QNQ1FY4Hju5qeBIM1uTHbrnCE+Eg4CdRZ3gO2pUeR+tzWdp80M2j3qFFEDWVqOV4g==", "dev": true, "requires": { - "compare-func": "^1.3.1", + "compare-func": "^2.0.0", "lodash": "^4.17.15", "q": "^1.5.1" + }, + "dependencies": { + "compare-func": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/compare-func/-/compare-func-2.0.0.tgz", + "integrity": "sha512-zHig5N+tPWARooBnb0Zx1MFcdfpyJrfTJ3Y5L+IFvUm8rM74hHz66z0gw0x4tijh5CorKkKUCnW82R2vmpeCRA==", + "dev": true, + "requires": { + "array-ify": "^1.0.0", + "dot-prop": "^5.1.0" + } + }, + "dot-prop": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-5.3.0.tgz", + "integrity": "sha512-QM8q3zDe58hqUqjraQOmzZ1LIH9SWQJTlEKCH4kJ2oQvLZk7RbQXvtDM2XEq3fwkV9CCvvH4LA0AV+ogFsBM2Q==", + "dev": true, + "requires": { + "is-obj": "^2.0.0" + } + }, + "is-obj": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-2.0.0.tgz", + "integrity": "sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w==", + "dev": true + } } }, "conventional-changelog-writer": { @@ -1255,15 +1287,6 @@ } } }, - "dot-prop": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-3.0.0.tgz", - "integrity": "sha1-G3CK8JSknJoOfbyteQq6U52sEXc=", - "dev": true, - "requires": { - "is-obj": "^1.0.0" - } - }, "duplexer2": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/duplexer2/-/duplexer2-0.1.4.tgz", @@ -1405,12 +1428,6 @@ } } }, - "fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", - "dev": true - }, "fast-glob": { "version": "3.2.11", "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.11.tgz", @@ -1462,15 +1479,6 @@ "pkg-dir": "^4.1.0" } }, - "find-up": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", - "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", - "dev": true, - "requires": { - "locate-path": "^2.0.0" - } - }, "find-versions": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/find-versions/-/find-versions-4.0.0.tgz", @@ -1783,6 +1791,12 @@ "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", "dev": true }, + "http-cache-semantics": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.1.tgz", + "integrity": "sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ==", + "dev": true + }, "http-proxy-agent": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-4.0.1.tgz", @@ -1938,12 +1952,6 @@ "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", "dev": true }, - "is-obj": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-1.0.1.tgz", - "integrity": "sha1-PkcprB9f3gJc19g6iW2rn09n2w8=", - "dev": true - }, "is-path-cwd": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-2.2.0.tgz", @@ -2117,6 +2125,12 @@ "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", "dev": true }, + "uuid": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", + "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", + "dev": true + }, "which": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", @@ -2217,12 +2231,6 @@ "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", "dev": true }, - "json-schema-traverse": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", - "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", - "dev": true - }, "json-stringify-safe": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", @@ -2230,13 +2238,10 @@ "dev": true }, "json5": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.0.tgz", - "integrity": "sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA==", - "dev": true, - "requires": { - "minimist": "^1.2.5" - } + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", + "dev": true }, "jsonfile": { "version": "6.0.1", @@ -2246,6 +2251,14 @@ "requires": { "graceful-fs": "^4.1.6", "universalify": "^1.0.0" + }, + "dependencies": { + "universalify": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-1.0.0.tgz", + "integrity": "sha512-rb6X1W158d7pRQBg5gkR8uPaSfiids68LTJQYOtEUhoJUWBdaQHsuT/EUduxXYxcrt4r5PJ4fuHW1MHT6p0qug==", + "dev": true + } } }, "jsonparse": { @@ -2276,16 +2289,24 @@ "parse-json": "^4.0.0", "pify": "^3.0.0", "strip-bom": "^3.0.0" - } - }, - "locate-path": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", - "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", - "dev": true, - "requires": { - "p-locate": "^2.0.0", - "path-exists": "^3.0.0" + }, + "dependencies": { + "parse-json": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", + "integrity": "sha512-aOIos8bujGN93/8Ox/jPLh7RwVnPEysynVFE+fQZyg6jKELEHwzgKdLRFHUgXJL6kylijVSBC4BvN9OmsB48Rw==", + "dev": true, + "requires": { + "error-ex": "^1.3.1", + "json-parse-better-errors": "^1.0.1" + } + }, + "strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==", + "dev": true + } } }, "lodash": { @@ -2555,9 +2576,9 @@ "dev": true }, "minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "dev": true, "requires": { "brace-expansion": "^1.1.7" @@ -2905,6 +2926,14 @@ "resolve": "^1.10.0", "semver": "2 || 3 || 4 || 5", "validate-npm-package-license": "^3.0.1" + }, + "dependencies": { + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + } } }, "normalize-path": { @@ -3296,8 +3325,7 @@ }, "balanced-match": { "version": "1.0.2", - "bundled": true, - "dev": true + "bundled": true }, "bcrypt-pbkdf": { "version": "1.0.2", @@ -3328,7 +3356,6 @@ "brace-expansion": { "version": "1.1.11", "bundled": true, - "dev": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -3511,8 +3538,7 @@ }, "concat-map": { "version": "0.0.1", - "bundled": true, - "dev": true + "bundled": true }, "console-control-strings": { "version": "1.1.0", @@ -3752,11 +3778,6 @@ "lru-cache": "^6.0.0" } }, - "http-cache-semantics": { - "version": "4.1.0", - "bundled": true, - "dev": true - }, "http-proxy-agent": { "version": "4.0.1", "bundled": true, @@ -4131,14 +4152,6 @@ "mime-db": "1.49.0" } }, - "minimatch": { - "version": "3.0.4", - "bundled": true, - "dev": true, - "requires": { - "brace-expansion": "^1.1.7" - } - }, "minipass": { "version": "3.1.5", "bundled": true, @@ -4568,11 +4581,6 @@ "bundled": true, "dev": true }, - "qs": { - "version": "6.5.2", - "bundled": true, - "dev": true - }, "read": { "version": "1.0.7", "bundled": true, @@ -5051,6 +5059,41 @@ "yargs": "^15.0.2" }, "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "cliui": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz", + "integrity": "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==", + "dev": true, + "requires": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^6.2.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, "find-up": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", @@ -5088,42 +5131,67 @@ "p-limit": "^2.2.0" } }, - "p-map": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-map/-/p-map-3.0.0.tgz", - "integrity": "sha512-d3qXVTF/s+W+CdJ5A29wywV2n8CQQYahlgz2bFiA+4eVNJbHJodPZ+/gXwPGh0bOqA+j8S+6+ckmvLGPk1QpxQ==", + "wrap-ansi": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", + "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", "dev": true, "requires": { - "aggregate-error": "^3.0.0" + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" } }, - "p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "y18n": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz", + "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==", "dev": true }, - "path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", - "dev": true + "yargs": { + "version": "15.4.1", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-15.4.1.tgz", + "integrity": "sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==", + "dev": true, + "requires": { + "cliui": "^6.0.0", + "decamelize": "^1.2.0", + "find-up": "^4.1.0", + "get-caller-file": "^2.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^2.0.0", + "set-blocking": "^2.0.0", + "string-width": "^4.2.0", + "which-module": "^2.0.0", + "y18n": "^4.0.0", + "yargs-parser": "^18.1.2" + } + }, + "yargs-parser": { + "version": "18.1.3", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.3.tgz", + "integrity": "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==", + "dev": true, + "requires": { + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" + } } } }, "once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", "dev": true, "requires": { "wrappy": "1" } }, "onetime": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.0.tgz", - "integrity": "sha512-5NcSkPHhwTVFIQN+TUqXoS5+dlElHXdpAWu9I0HP20YOtIi+aZ0Ct82jdlILDxjLEAWwvm+qj1m6aEtsDVmm6Q==", + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", + "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", "dev": true, "requires": { "mimic-fn": "^2.1.0" @@ -5142,6 +5210,14 @@ "dev": true, "requires": { "p-map": "^2.0.0" + }, + "dependencies": { + "p-map": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/p-map/-/p-map-2.1.0.tgz", + "integrity": "sha512-y3b8Kpd8OAN444hxfBbFfj1FY/RjtTd8tzYwhUqNYXx0fXx2iX4maP4Qr6qhIKbQXI02wTLAda4fYUbDagTUFw==", + "dev": true + } } }, "p-is-promise": { @@ -5150,30 +5226,15 @@ "integrity": "sha512-Wo8VsW4IRQSKVXsJCn7TomUaVtyfjVDn3nUP7kE967BQk0CwFpdbZs0X0uk5sW9mkBa9eNM7hCMaG93WUAwxYQ==", "dev": true }, - "p-limit": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", - "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", - "dev": true, - "requires": { - "p-try": "^1.0.0" - } - }, - "p-locate": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", - "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", + "p-map": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-map/-/p-map-3.0.0.tgz", + "integrity": "sha512-d3qXVTF/s+W+CdJ5A29wywV2n8CQQYahlgz2bFiA+4eVNJbHJodPZ+/gXwPGh0bOqA+j8S+6+ckmvLGPk1QpxQ==", "dev": true, "requires": { - "p-limit": "^1.1.0" + "aggregate-error": "^3.0.0" } }, - "p-map": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/p-map/-/p-map-2.1.0.tgz", - "integrity": "sha512-y3b8Kpd8OAN444hxfBbFfj1FY/RjtTd8tzYwhUqNYXx0fXx2iX4maP4Qr6qhIKbQXI02wTLAda4fYUbDagTUFw==", - "dev": true - }, "p-reduce": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/p-reduce/-/p-reduce-2.1.0.tgz", @@ -5191,9 +5252,9 @@ } }, "p-try": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", - "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", "dev": true }, "package-hash": { @@ -5217,26 +5278,16 @@ "callsites": "^3.0.0" } }, - "parse-json": { + "path-exists": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", - "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", - "dev": true, - "requires": { - "error-ex": "^1.3.1", - "json-parse-better-errors": "^1.0.1" - } - }, - "path-exists": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", - "dev": true + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true }, "path-is-absolute": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", "dev": true }, "path-key": { @@ -5260,17 +5311,68 @@ "pify": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "integrity": "sha512-C3FsVNH1udSEX48gGX1xfvwTWfsYWj5U+8/uK15BGzIGrKoUpghX8hWZwa/OFnakBiiVNmBvemTJR5mcy7iPcg==", "dev": true }, "pkg-conf": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/pkg-conf/-/pkg-conf-2.1.0.tgz", - "integrity": "sha1-ISZRTKbyq/69FoWW3xi6V4Z/AFg=", + "integrity": "sha512-C+VUP+8jis7EsQZIhDYmS5qlNtjv2yP4SNtjXK9AP1ZcTRlnSfuumaTnRfYZnYgUUYVIKqL0fRvmUGDV2fmp6g==", "dev": true, "requires": { "find-up": "^2.0.0", "load-json-file": "^4.0.0" + }, + "dependencies": { + "find-up": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha512-NWzkk0jSJtTt08+FBFMvXoeZnOJD+jTtsRmBYbAIzJdX6l7dLgR7CTubCM5/eDdPUBvLCeVasP1brfVR/9/EZQ==", + "dev": true, + "requires": { + "locate-path": "^2.0.0" + } + }, + "locate-path": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", + "integrity": "sha512-NCI2kiDkyR7VeEKm27Kda/iQHyKJe1Bu0FlTbYp3CqJu+9IFe9bLyAjMxf5ZDDbEg+iMPzB5zYyUTSm8wVTKmA==", + "dev": true, + "requires": { + "p-locate": "^2.0.0", + "path-exists": "^3.0.0" + } + }, + "p-limit": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", + "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", + "dev": true, + "requires": { + "p-try": "^1.0.0" + } + }, + "p-locate": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", + "integrity": "sha512-nQja7m7gSKuewoVRen45CtVfODR3crN3goVQ0DDZ9N3yHxgpkuBhZqsaiotSQRrADUrne346peY7kT3TSACykg==", + "dev": true, + "requires": { + "p-limit": "^1.1.0" + } + }, + "p-try": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", + "integrity": "sha512-U1etNYuMJoIz3ZXSrrySFjsXQTWOx2/jdi86L+2pRvph/qMKL6sbcCYdH23fqsbm8TH2Gn0OybpT4eSFlCVHww==", + "dev": true + }, + "path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha512-bpC7GYwiDYQ4wYLe+FA8lhRjhQCMcQGuSgGGqDkg/QerRWw9CmGRT0iSOVRSZJ29NMLZgIzqaljJ63oaL4NIJQ==", + "dev": true + } } }, "pkg-dir": { @@ -5318,18 +5420,6 @@ "requires": { "p-limit": "^2.2.0" } - }, - "p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", - "dev": true - }, - "path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", - "dev": true } } }, @@ -5358,16 +5448,16 @@ "once": "^1.3.1" } }, - "punycode": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", - "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", - "dev": true - }, "q": { "version": "1.5.1", "resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz", - "integrity": "sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc=", + "integrity": "sha512-kV/CThkXo6xyFEZUugw/+pIOywXcDbFYgSct5cT3gqlbkBE1SJdwy6UQoZvodiWF/ckQLZyDE/Bu1M6gVu5lVw==", + "dev": true + }, + "qs": { + "version": "6.5.3", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.3.tgz", + "integrity": "sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA==", "dev": true }, "queue-microtask": { @@ -5558,7 +5648,7 @@ "release-zalgo": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/release-zalgo/-/release-zalgo-1.0.0.tgz", - "integrity": "sha1-CXALflB0Mpc5Mw5TXFqQ+2eFFzA=", + "integrity": "sha512-gUAyHVHPPC5wdqX/LG4LWtRYtgjxyX78oanFNTMMyFEfOqdC54s3eE82imuWKbOeqYht2CrNf64Qb8vgmmtZGA==", "dev": true, "requires": { "es6-error": "^4.0.1" @@ -5567,13 +5657,7 @@ "require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", - "dev": true - }, - "require-from-string": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", - "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", "dev": true }, "require-main-filename": { @@ -5583,12 +5667,14 @@ "dev": true }, "resolve": { - "version": "1.15.1", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.15.1.tgz", - "integrity": "sha512-84oo6ZTtoTUpjgNEr5SJyzQhzL72gaRodsSfyxC/AXRvwu0Yse9H8eF9IpGo7b8YetZhlI6v7ZQ6bKBFV/6S7w==", + "version": "1.22.1", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.1.tgz", + "integrity": "sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==", "dev": true, "requires": { - "path-parse": "^1.0.6" + "is-core-module": "^2.9.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" } }, "resolve-from": { @@ -5776,6 +5862,15 @@ "color-convert": "^2.0.1" } }, + "brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "requires": { + "balanced-match": "^1.0.0" + } + }, "cliui": { "version": "7.0.4", "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", @@ -5859,6 +5954,15 @@ "integrity": "sha512-jSCU7/VB1loIWBZe14aEYHU/+1UMEHoaO7qxCOVJOw9GgH72VAWppxNcjU+x9a2k3GSIBXNKxXQFqRvvZ7vr3A==", "dev": true }, + "minimatch": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.0.tgz", + "integrity": "sha512-9TPBGGak4nHfGZsPBohm9AWg6NoT7QTCehS3BIJABslyZbzxfV78QM2Y6+i741OPZIafFAaiiEMh5OyIrJPgtg==", + "dev": true, + "requires": { + "brace-expansion": "^2.0.1" + } + }, "npm": { "version": "8.12.1", "resolved": "https://registry.npmjs.org/npm/-/npm-8.12.1.tgz", @@ -6200,8 +6304,7 @@ }, "balanced-match": { "version": "1.0.2", - "bundled": true, - "dev": true + "bundled": true }, "bin-links": { "version": "3.0.1", @@ -6224,7 +6327,6 @@ "brace-expansion": { "version": "2.0.1", "bundled": true, - "dev": true, "requires": { "balanced-match": "^1.0.0" } @@ -6519,11 +6621,6 @@ "lru-cache": "^7.5.1" } }, - "http-cache-semantics": { - "version": "4.1.0", - "bundled": true, - "dev": true - }, "http-proxy-agent": { "version": "5.0.0", "bundled": true, @@ -6832,14 +6929,6 @@ "ssri": "^9.0.0" } }, - "minimatch": { - "version": "5.1.0", - "bundled": true, - "dev": true, - "requires": { - "brace-expansion": "^2.0.1" - } - }, "minipass": { "version": "3.1.6", "bundled": true, @@ -6980,7 +7069,8 @@ }, "minimatch": { "version": "3.1.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "dev": true, "requires": { "brace-expansion": "^1.1.7" @@ -7304,7 +7394,8 @@ }, "minimatch": { "version": "3.1.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "dev": true, "requires": { "brace-expansion": "^1.1.7" @@ -7604,12 +7695,6 @@ } } }, - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "dev": true - }, "semver-diff": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/semver-diff/-/semver-diff-3.1.1.tgz", @@ -7645,7 +7730,7 @@ "set-blocking": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", - "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", + "integrity": "sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==", "dev": true }, "shebang-command": { @@ -7664,9 +7749,9 @@ "dev": true }, "signal-exit": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", - "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", "dev": true }, "signale": { @@ -7680,14 +7765,70 @@ "pkg-conf": "^2.1.0" }, "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", + "dev": true + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "dev": true + }, "figures": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/figures/-/figures-2.0.0.tgz", - "integrity": "sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI=", + "integrity": "sha512-Oa2M9atig69ZkfwiApY8F2Yy+tzMbazyvqv21R0NsSC8floSOC09BbT1ITWAdoMGQvJ/aZnR1KMwdx9tvHnTNA==", "dev": true, "requires": { "escape-string-regexp": "^1.0.5" } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "dev": true + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } } } }, @@ -7706,7 +7847,7 @@ "spawn-error-forwarder": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/spawn-error-forwarder/-/spawn-error-forwarder-1.0.0.tgz", - "integrity": "sha1-Gv2Uc46ZmwNG17n8NzvlXgdXcCk=", + "integrity": "sha512-gRjMgK5uFjbCvdibeGJuy3I5OYz6VLoVdsOJdA6wV0WlfQVLFueoqMxwwYD9RODdgb6oUIvlRlsyFSiQkMKu0g==", "dev": true }, "spawn-wrap": { @@ -7721,23 +7862,12 @@ "rimraf": "^3.0.0", "signal-exit": "^3.0.2", "which": "^2.0.1" - }, - "dependencies": { - "which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dev": true, - "requires": { - "isexe": "^2.0.0" - } - } } }, "spdx-correct": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.0.tgz", - "integrity": "sha512-lr2EZCctC2BNR7j7WzJ2FpDznxky1sjfxvvYEyzxNyb6lZXHODmEoJeFu4JupYlkfha1KZpJyoqiJ7pgA1qq8Q==", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.1.tgz", + "integrity": "sha512-cOYcUWwhCuHCXi49RhFRCyJEK3iPj1Ziz9DpViV3tbZOwXD49QzIN3MpOLJNxh2qwq2lJJZaKMVw9qNi4jTC0w==", "dev": true, "requires": { "spdx-expression-parse": "^3.0.0", @@ -7745,15 +7875,15 @@ } }, "spdx-exceptions": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.2.0.tgz", - "integrity": "sha512-2XQACfElKi9SlVb1CYadKDXvoajPgBVPn/gOQLrTvHdElaVhr7ZEbqJaRnJLVNeaI4cMEAgVCeBMKF6MWRDCRA==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz", + "integrity": "sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==", "dev": true }, "spdx-expression-parse": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz", - "integrity": "sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", + "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", "dev": true, "requires": { "spdx-exceptions": "^2.1.0", @@ -7761,9 +7891,9 @@ } }, "spdx-license-ids": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.5.tgz", - "integrity": "sha512-J+FWzZoynJEXGphVIS+XEh3kFSjZX/1i9gFBaWQcB+/tmpe2qUsSBABpcxqxnAxFdiUFEgAX1bjYGQvIZmoz9Q==", + "version": "3.0.12", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.12.tgz", + "integrity": "sha512-rr+VVSXtRhO4OHbXUiAF7xW3Bo9DuuF6C5jH+q/x15j2jniycgKbxU09Hr0WqlSLUs4i4ltHGXqTe7VHclYWyA==", "dev": true }, "split": { @@ -7800,13 +7930,13 @@ "sprintf-js": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", + "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", "dev": true }, "stream-combiner2": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/stream-combiner2/-/stream-combiner2-1.1.1.tgz", - "integrity": "sha1-+02KFCDqNidk4hrUeAOXvry0HL4=", + "integrity": "sha512-3PnJbYgS56AeWgtKF5jtJRT6uFJe56Z0Hc5Ngg/6sI6rIt8iiMBTa9cvdyFfpMQjaVHr8dusbNeFGIIonxOvKw==", "dev": true, "requires": { "duplexer2": "~0.1.0", @@ -7834,20 +7964,22 @@ } }, "strip-ansi": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", - "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", "dev": true, "requires": { - "ansi-regex": "^5.0.0" + "ansi-regex": "^5.0.1" + }, + "dependencies": { + "ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true + } } }, - "strip-bom": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", - "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", - "dev": true - }, "strip-final-newline": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", @@ -7869,19 +8001,10 @@ "integrity": "sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==", "dev": true }, - "supports-color": { - "version": "5.4.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.4.0.tgz", - "integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - }, "supports-hyperlinks": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/supports-hyperlinks/-/supports-hyperlinks-2.2.0.tgz", - "integrity": "sha512-6sXEzV5+I5j8Bmq9/vUphGRM/RJNT9SCURJLjwfOg51heRtguGWDzcaBlgAzKhQa0EVNpPEKzQuBwZ8S8WaCeQ==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/supports-hyperlinks/-/supports-hyperlinks-2.3.0.tgz", + "integrity": "sha512-RpsAZlpWcDwOPQA22aCH4J0t7L8JmAvsCxfOSEwm7cQs3LshN36QaTkwd70DnBOXDWGssw2eUoc8CaRWT0XunA==", "dev": true, "requires": { "has-flag": "^4.0.0", @@ -7905,6 +8028,12 @@ } } }, + "supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "dev": true + }, "temp-dir": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/temp-dir/-/temp-dir-2.0.0.tgz", @@ -7952,7 +8081,7 @@ "through": { "version": "2.3.8", "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", - "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", + "integrity": "sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==", "dev": true }, "through2": { @@ -7980,7 +8109,7 @@ "to-fast-properties": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", - "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=", + "integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==", "dev": true }, "to-regex-range": { @@ -7995,13 +8124,13 @@ "tr46": { "version": "0.0.3", "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", - "integrity": "sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o=", + "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==", "dev": true }, "traverse": { "version": "0.6.6", "resolved": "https://registry.npmjs.org/traverse/-/traverse-0.6.6.tgz", - "integrity": "sha1-y99WD9e5r2MlAv7UD5GMFX6pcTc=", + "integrity": "sha512-kdf4JKs8lbARxWdp7RKdNzoJBhGUcIalSYibuGyHJbmk40pOysQ0+QPvlkCOICOivDWU2IJo2rkrxyTK2AH4fw==", "dev": true }, "trim-newlines": { @@ -8047,21 +8176,6 @@ "integrity": "sha512-isyNax3wXoKaulPDZWHQqbmIx1k2tb9fb3GGDBRxCscfYV2Ch7WxPArBsFEG8s/safwXTT7H4QGhaIkTp9447w==", "dev": true }, - "universalify": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-1.0.0.tgz", - "integrity": "sha512-rb6X1W158d7pRQBg5gkR8uPaSfiids68LTJQYOtEUhoJUWBdaQHsuT/EUduxXYxcrt4r5PJ4fuHW1MHT6p0qug==", - "dev": true - }, - "uri-js": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", - "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", - "dev": true, - "requires": { - "punycode": "^2.1.0" - } - }, "url-join": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/url-join/-/url-join-4.0.1.tgz", @@ -8071,13 +8185,7 @@ "util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", - "dev": true - }, - "uuid": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", - "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", "dev": true }, "validate-npm-package-license": { @@ -8093,13 +8201,13 @@ "webidl-conversions": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", - "integrity": "sha1-JFNCdeKnvGvnvIZhHMFq4KVlSHE=", + "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==", "dev": true }, "whatwg-url": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", - "integrity": "sha1-lmRU6HZUYuN2RNNib2dCzotwll0=", + "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", "dev": true, "requires": { "tr46": "~0.0.3", @@ -8118,13 +8226,13 @@ "which-module": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", - "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", + "integrity": "sha512-B+enWhmw6cjfVC7kS8Pj9pCrKSc5txArRyaYGe088shv/FGWH+0Rjx/xPgtsWfsUtS27FkP697E4DDhgrgoc0Q==", "dev": true }, "wordwrap": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", - "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=", + "integrity": "sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q==", "dev": true }, "workerpool": { @@ -8133,47 +8241,10 @@ "integrity": "sha512-ILEIE97kDZvF9Wb9f6h5aXK4swSlKGUcOEGiIYb2OOu/IrDU9iwj0fD//SsA6E5ibwJxpEvhullJY4Sl4GcpAw==", "dev": true }, - "wrap-ansi": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", - "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", - "dev": true, - "requires": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "dependencies": { - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "requires": { - "color-convert": "^2.0.1" - } - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - } - } - }, "wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", "dev": true }, "write-file-atomic": { @@ -8194,12 +8265,6 @@ "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", "dev": true }, - "y18n": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.1.tgz", - "integrity": "sha512-wNcy4NvjMYL8gogWWYAO7ZFWFfHcbdbE57tZO8e4cbpj8tfUcwrwqSl3ad8HxpYWCdXcJUCeKKZS62Av1affwQ==", - "dev": true - }, "yallist": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", @@ -8212,86 +8277,6 @@ "integrity": "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==", "dev": true }, - "yargs": { - "version": "15.4.1", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-15.4.1.tgz", - "integrity": "sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==", - "dev": true, - "requires": { - "cliui": "^6.0.0", - "decamelize": "^1.2.0", - "find-up": "^4.1.0", - "get-caller-file": "^2.0.1", - "require-directory": "^2.1.1", - "require-main-filename": "^2.0.0", - "set-blocking": "^2.0.0", - "string-width": "^4.2.0", - "which-module": "^2.0.0", - "y18n": "^4.0.0", - "yargs-parser": "^18.1.2" - }, - "dependencies": { - "find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "dev": true, - "requires": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - } - }, - "locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", - "dev": true, - "requires": { - "p-locate": "^4.1.0" - } - }, - "p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "dev": true, - "requires": { - "p-try": "^2.0.0" - } - }, - "p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "dev": true, - "requires": { - "p-limit": "^2.2.0" - } - }, - "p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", - "dev": true - }, - "path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", - "dev": true - }, - "yargs-parser": { - "version": "18.1.3", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.3.tgz", - "integrity": "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==", - "dev": true, - "requires": { - "camelcase": "^5.0.0", - "decamelize": "^1.2.0" - } - } - } - }, "yargs-parser": { "version": "20.2.9", "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", From 4104cabea342e8d88f41fcf98a01d042e640895c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maciej=20Urba=C5=84czyk?= Date: Tue, 7 Feb 2023 16:37:05 +0100 Subject: [PATCH 016/102] feat: add title, summary and description fields to the core models (#315) --- definitions/3.0.0/channel.json | 10 +++++++++- definitions/3.0.0/operation.json | 10 ++++++++-- definitions/3.0.0/operationTrait.json | 3 +++ definitions/3.0.0/server.json | 11 ++++++++++- 4 files changed, 30 insertions(+), 4 deletions(-) diff --git a/definitions/3.0.0/channel.json b/definitions/3.0.0/channel.json index bd7d9e63..6849307a 100644 --- a/definitions/3.0.0/channel.json +++ b/definitions/3.0.0/channel.json @@ -20,9 +20,17 @@ "$ref": "http://asyncapi.com/definitions/3.0.0/parameter.json" } }, + "title": { + "type": "string", + "description": "A human-friendly title for the channel." + }, + "summary": { + "type": "string", + "description": "A brief summary of the channel." + }, "description": { "type": "string", - "description": "A description of the channel." + "description": "A longer description of the channel. CommonMark is allowed." }, "servers": { "type": "array", diff --git a/definitions/3.0.0/operation.json b/definitions/3.0.0/operation.json index d29882cf..bd99aa68 100644 --- a/definitions/3.0.0/operation.json +++ b/definitions/3.0.0/operation.json @@ -51,11 +51,17 @@ ] } }, + "title": { + "type": "string", + "description": "A human-friendly title for the operation." + }, "summary": { - "type": "string" + "type": "string", + "description": "A brief summary of the operation." }, "description": { - "type": "string" + "type": "string", + "description": "A longer description of the operation. CommonMark is allowed." }, "security": { "type": "array", diff --git a/definitions/3.0.0/operationTrait.json b/definitions/3.0.0/operationTrait.json index 6ee4172a..28a12986 100644 --- a/definitions/3.0.0/operationTrait.json +++ b/definitions/3.0.0/operationTrait.json @@ -13,6 +13,9 @@ "channel": { "$ref": "http://asyncapi.com/definitions/3.0.0/operation.json#/properties/channel" }, + "title": { + "$ref": "http://asyncapi.com/definitions/3.0.0/operation.json#/properties/title" + }, "summary": { "$ref": "http://asyncapi.com/definitions/3.0.0/operation.json#/properties/summary" }, diff --git a/definitions/3.0.0/server.json b/definitions/3.0.0/server.json index 20371d0f..5b4fbb4e 100644 --- a/definitions/3.0.0/server.json +++ b/definitions/3.0.0/server.json @@ -15,8 +15,17 @@ "url": { "type": "string" }, + "title": { + "type": "string", + "description": "A human-friendly title for the server." + }, + "summary": { + "type": "string", + "description": "A brief summary of the server." + }, "description": { - "type": "string" + "type": "string", + "description": "A longer description of the server. CommonMark is allowed." }, "protocol": { "type": "string", From 934583ec71698aa9de8c1180fa9b9edfe560a0fa Mon Sep 17 00:00:00 2001 From: asyncapi-bot Date: Tue, 7 Feb 2023 16:41:49 +0100 Subject: [PATCH 017/102] chore(release): v5.0.0-next-major-spec.4 (#323) --- package-lock.json | 2 +- package.json | 2 +- schemas/3.0.0.json | 34 ++++++++++++++++++++++++++++++---- 3 files changed, 32 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index 35eacc29..4fbf1d8e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "@asyncapi/specs", - "version": "5.0.0-next-major-spec.3", + "version": "5.0.0-next-major-spec.4", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 78756c04..f8258590 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@asyncapi/specs", - "version": "5.0.0-next-major-spec.3", + "version": "5.0.0-next-major-spec.4", "description": "AsyncAPI schema versions", "main": "index.js", "types": "index.d.ts", diff --git a/schemas/3.0.0.json b/schemas/3.0.0.json index 69e3d3fd..c92057f3 100644 --- a/schemas/3.0.0.json +++ b/schemas/3.0.0.json @@ -260,8 +260,17 @@ "url": { "type": "string" }, + "title": { + "type": "string", + "description": "A human-friendly title for the server." + }, + "summary": { + "type": "string", + "description": "A brief summary of the server." + }, "description": { - "type": "string" + "type": "string", + "description": "A longer description of the server. CommonMark is allowed." }, "protocol": { "type": "string", @@ -702,9 +711,17 @@ "$ref": "http://asyncapi.com/definitions/3.0.0/parameter.json" } }, + "title": { + "type": "string", + "description": "A human-friendly title for the channel." + }, + "summary": { + "type": "string", + "description": "A brief summary of the channel." + }, "description": { "type": "string", - "description": "A description of the channel." + "description": "A longer description of the channel. CommonMark is allowed." }, "servers": { "type": "array", @@ -2553,11 +2570,17 @@ ] } }, + "title": { + "type": "string", + "description": "A human-friendly title for the operation." + }, "summary": { - "type": "string" + "type": "string", + "description": "A brief summary of the operation." }, "description": { - "type": "string" + "type": "string", + "description": "A longer description of the operation. CommonMark is allowed." }, "security": { "type": "array", @@ -2596,6 +2619,9 @@ "channel": { "$ref": "http://asyncapi.com/definitions/3.0.0/operation.json#/properties/channel" }, + "title": { + "$ref": "http://asyncapi.com/definitions/3.0.0/operation.json#/properties/title" + }, "summary": { "$ref": "http://asyncapi.com/definitions/3.0.0/operation.json#/properties/summary" }, From 8f7da013730ff06b64eac879fe864301036360a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maciej=20Urba=C5=84czyk?= Date: Tue, 7 Feb 2023 16:44:46 +0100 Subject: [PATCH 018/102] feat: channel's servers field allows references (#318) --- definitions/3.0.0/channel.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/definitions/3.0.0/channel.json b/definitions/3.0.0/channel.json index 6849307a..bf715ede 100644 --- a/definitions/3.0.0/channel.json +++ b/definitions/3.0.0/channel.json @@ -34,9 +34,9 @@ }, "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.", + "description": "The references of the servers on which this channel is available. If absent or empty then this channel must be available on all servers.", "items": { - "type": "string" + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" }, "uniqueItems": true }, From b3a5c8efd807e3eefd4bf39a46e38bc4611c3c7a Mon Sep 17 00:00:00 2001 From: asyncapi-bot Date: Tue, 7 Feb 2023 16:49:29 +0100 Subject: [PATCH 019/102] chore(release): v5.0.0-next-major-spec.5 (#324) --- package-lock.json | 2 +- package.json | 2 +- schemas/3.0.0.json | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index 4fbf1d8e..a533710b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "@asyncapi/specs", - "version": "5.0.0-next-major-spec.4", + "version": "5.0.0-next-major-spec.5", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index f8258590..7a007c5b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@asyncapi/specs", - "version": "5.0.0-next-major-spec.4", + "version": "5.0.0-next-major-spec.5", "description": "AsyncAPI schema versions", "main": "index.js", "types": "index.d.ts", diff --git a/schemas/3.0.0.json b/schemas/3.0.0.json index c92057f3..01f009db 100644 --- a/schemas/3.0.0.json +++ b/schemas/3.0.0.json @@ -725,9 +725,9 @@ }, "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.", + "description": "The references of the servers on which this channel is available. If absent or empty then this channel must be available on all servers.", "items": { - "type": "string" + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" }, "uniqueItems": true }, From 03e4545ab48e1314df17c1e427a20dc545f4cf47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maciej=20Urba=C5=84czyk?= Date: Tue, 7 Feb 2023 16:53:07 +0100 Subject: [PATCH 020/102] feat: define new security mechanism (#316) --- definitions/3.0.0/SecurityRequirement.json | 12 ------------ definitions/3.0.0/oauth2Flow.json | 2 +- definitions/3.0.0/oauth2Flows.json | 15 +++++++++++---- definitions/3.0.0/openIdConnect.json | 7 +++++++ definitions/3.0.0/operation.json | 5 +---- definitions/3.0.0/securityRequirements.json | 16 ++++++++++++++++ definitions/3.0.0/server.json | 5 +---- 7 files changed, 37 insertions(+), 25 deletions(-) delete mode 100644 definitions/3.0.0/SecurityRequirement.json create mode 100644 definitions/3.0.0/securityRequirements.json diff --git a/definitions/3.0.0/SecurityRequirement.json b/definitions/3.0.0/SecurityRequirement.json deleted file mode 100644 index 410afeb6..00000000 --- a/definitions/3.0.0/SecurityRequirement.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "type": "object", - "additionalProperties": { - "type": "array", - "items": { - "type": "string" - }, - "uniqueItems": true - }, - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "http://asyncapi.com/definitions/3.0.0/SecurityRequirement.json" -} \ No newline at end of file diff --git a/definitions/3.0.0/oauth2Flow.json b/definitions/3.0.0/oauth2Flow.json index f5a9e447..d3ca471b 100644 --- a/definitions/3.0.0/oauth2Flow.json +++ b/definitions/3.0.0/oauth2Flow.json @@ -13,7 +13,7 @@ "type": "string", "format": "uri" }, - "scopes": { + "availableScopes": { "$ref": "http://asyncapi.com/definitions/3.0.0/oauth2Scopes.json" } }, diff --git a/definitions/3.0.0/oauth2Flows.json b/definitions/3.0.0/oauth2Flows.json index bb895f28..735806c8 100644 --- a/definitions/3.0.0/oauth2Flows.json +++ b/definitions/3.0.0/oauth2Flows.json @@ -25,7 +25,7 @@ { "required": [ "authorizationUrl", - "scopes" + "availableScopes" ] }, { @@ -45,7 +45,7 @@ { "required": [ "tokenUrl", - "scopes" + "availableScopes" ] }, { @@ -65,7 +65,7 @@ { "required": [ "tokenUrl", - "scopes" + "availableScopes" ] }, { @@ -86,13 +86,20 @@ "required": [ "authorizationUrl", "tokenUrl", - "scopes" + "availableScopes" ] } ] } }, "additionalProperties": false + }, + "scopes": { + "type": "array", + "description": "List of the needed scope names.", + "items": { + "type": "string" + } } }, "patternProperties": { diff --git a/definitions/3.0.0/openIdConnect.json b/definitions/3.0.0/openIdConnect.json index 4d034031..2150ba4d 100644 --- a/definitions/3.0.0/openIdConnect.json +++ b/definitions/3.0.0/openIdConnect.json @@ -17,6 +17,13 @@ "openIdConnectUrl": { "type": "string", "format": "uri" + }, + "scopes": { + "type": "array", + "description": "List of the needed scope names.", + "items": { + "type": "string" + } } }, "patternProperties": { diff --git a/definitions/3.0.0/operation.json b/definitions/3.0.0/operation.json index bd99aa68..a8d00ad2 100644 --- a/definitions/3.0.0/operation.json +++ b/definitions/3.0.0/operation.json @@ -64,10 +64,7 @@ "description": "A longer description of the operation. CommonMark is allowed." }, "security": { - "type": "array", - "items": { - "$ref": "http://asyncapi.com/definitions/3.0.0/SecurityRequirement.json" - } + "$ref": "http://asyncapi.com/definitions/3.0.0/securityRequirements.json" }, "tags": { "type": "array", diff --git a/definitions/3.0.0/securityRequirements.json b/definitions/3.0.0/securityRequirements.json new file mode 100644 index 00000000..b8da3dcb --- /dev/null +++ b/definitions/3.0.0/securityRequirements.json @@ -0,0 +1,16 @@ +{ + "description": "An array representing security requirements.", + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/SecurityScheme.json" + } + ] + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/3.0.0/securityRequirements.json" +} diff --git a/definitions/3.0.0/server.json b/definitions/3.0.0/server.json index 5b4fbb4e..5da34f82 100644 --- a/definitions/3.0.0/server.json +++ b/definitions/3.0.0/server.json @@ -38,10 +38,7 @@ "$ref": "http://asyncapi.com/definitions/3.0.0/serverVariables.json" }, "security": { - "type": "array", - "items": { - "$ref": "http://asyncapi.com/definitions/3.0.0/SecurityRequirement.json" - } + "$ref": "http://asyncapi.com/definitions/3.0.0/securityRequirements.json" }, "bindings": { "$ref": "http://asyncapi.com/definitions/3.0.0/serverBindingsObject.json" From 0bcbece8db0508356f1e6d90bc622bc1ad705f89 Mon Sep 17 00:00:00 2001 From: asyncapi-bot Date: Tue, 7 Feb 2023 16:57:09 +0100 Subject: [PATCH 021/102] chore(release): v5.0.0-next-major-spec.6 (#325) --- package-lock.json | 2 +- package.json | 2 +- schemas/3.0.0.json | 5142 ++++++++++++++++++++++---------------------- 3 files changed, 2579 insertions(+), 2567 deletions(-) diff --git a/package-lock.json b/package-lock.json index a533710b..ad2bf088 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "@asyncapi/specs", - "version": "5.0.0-next-major-spec.5", + "version": "5.0.0-next-major-spec.6", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 7a007c5b..890e6215 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@asyncapi/specs", - "version": "5.0.0-next-major-spec.5", + "version": "5.0.0-next-major-spec.6", "description": "AsyncAPI schema versions", "main": "index.js", "types": "index.d.ts", diff --git a/schemas/3.0.0.json b/schemas/3.0.0.json index 01f009db..11ba5327 100644 --- a/schemas/3.0.0.json +++ b/schemas/3.0.0.json @@ -283,10 +283,7 @@ "$ref": "http://asyncapi.com/definitions/3.0.0/serverVariables.json" }, "security": { - "type": "array", - "items": { - "$ref": "http://asyncapi.com/definitions/3.0.0/SecurityRequirement.json" - } + "$ref": "http://asyncapi.com/definitions/3.0.0/securityRequirements.json" }, "bindings": { "$ref": "http://asyncapi.com/definitions/3.0.0/serverBindingsObject.json" @@ -332,965 +329,575 @@ } } }, - "http://asyncapi.com/definitions/3.0.0/SecurityRequirement.json": { - "$id": "http://asyncapi.com/definitions/3.0.0/SecurityRequirement.json", - "type": "object", - "additionalProperties": { - "type": "array", - "items": { - "type": "string" - }, - "uniqueItems": true + "http://asyncapi.com/definitions/3.0.0/securityRequirements.json": { + "$id": "http://asyncapi.com/definitions/3.0.0/securityRequirements.json", + "description": "An array representing security requirements.", + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/SecurityScheme.json" + } + ] } }, - "http://asyncapi.com/definitions/3.0.0/serverBindingsObject.json": { - "$id": "http://asyncapi.com/definitions/3.0.0/serverBindingsObject.json", - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" - } - }, - "properties": { - "http": {}, - "ws": {}, - "amqp": {}, - "amqp1": {}, - "mqtt": { - "oneOf": [ - { - "description": "Latest binding", - "$ref": "http://asyncapi.com/bindings/mqtt/0.1.0/server.json" - } - ] + "http://asyncapi.com/definitions/3.0.0/SecurityScheme.json": { + "$id": "http://asyncapi.com/definitions/3.0.0/SecurityScheme.json", + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/userPassword.json" }, - "mqtt5": {}, - "kafka": { - "oneOf": [ - { - "description": "Latest binding", - "$ref": "http://asyncapi.com/bindings/kafka/0.3.0/server.json" - } - ] + { + "$ref": "http://asyncapi.com/definitions/3.0.0/apiKey.json" }, - "anypointmq": {}, - "nats": {}, - "jms": {}, - "sns": {}, - "sqs": {}, - "stomp": {}, - "redis": {}, - "ibmmq": { - "oneOf": [ - { - "description": "Latest binding", - "$ref": "http://asyncapi.com/bindings/ibmmq/0.1.0/server.json" - } - ] + { + "$ref": "http://asyncapi.com/definitions/3.0.0/X509.json" }, - "solace": { - "oneOf": [ - { - "$ref": "http://asyncapi.com/bindings/solace/0.2.0/server.json" - }, - { - "description": "Latest binding", - "$ref": "http://asyncapi.com/bindings/solace/0.3.0/server.json" - } - ] + { + "$ref": "http://asyncapi.com/definitions/3.0.0/symmetricEncryption.json" }, - "googlepubsub": {}, - "pulsar": { - "oneOf": [ - { - "description": "Latest binding", - "$ref": "http://asyncapi.com/bindings/pulsar/0.1.0/server.json" - } - ] + { + "$ref": "http://asyncapi.com/definitions/3.0.0/asymmetricEncryption.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/HTTPSecurityScheme.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/oauth2Flows.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/openIdConnect.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/SaslSecurityScheme.json" } - } + ] }, - "http://asyncapi.com/bindings/mqtt/0.1.0/server.json": { - "$id": "http://asyncapi.com/bindings/mqtt/0.1.0/server.json", - "title": "MQTT server bindings object", - "description": "This object contains information about the server representation in MQTT.", + "http://asyncapi.com/definitions/3.0.0/userPassword.json": { + "$id": "http://asyncapi.com/definitions/3.0.0/userPassword.json", "type": "object", - "additionalProperties": false, + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "userPassword" + ] + }, + "description": { + "type": "string" + } + }, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" } }, + "additionalProperties": false + }, + "http://asyncapi.com/definitions/3.0.0/apiKey.json": { + "$id": "http://asyncapi.com/definitions/3.0.0/apiKey.json", + "type": "object", + "required": [ + "type", + "in" + ], "properties": { - "clientId": { + "type": { "type": "string", - "description": "The client identifier." - }, - "cleanSession": { - "type": "boolean", - "description": "Whether to create a persistent connection or not. When 'false', the connection will be persistent." - }, - "lastWill": { - "type": "object", - "description": "Last Will and Testament configuration.", - "properties": { - "topic": { - "type": "string", - "description": "The topic where the Last Will and Testament message will be sent." - }, - "qos": { - "type": "integer", - "enum": [ - 0, - 1, - 2 - ], - "description": "Defines how hard the broker/client will try to ensure that the Last Will and Testament message is received. Its value MUST be either 0, 1 or 2." - }, - "message": { - "type": "string", - "description": "Last Will message." - }, - "retain": { - "type": "boolean", - "description": "Whether the broker should retain the Last Will and Testament message or not." - } - } - }, - "keepAlive": { - "type": "integer", - "description": "Interval in seconds of the longest period of time the broker and the client can endure without sending a message." + "enum": [ + "apiKey" + ] }, - "bindingVersion": { + "in": { "type": "string", "enum": [ - "0.1.0" - ], - "description": "The version of this binding. If omitted, 'latest' MUST be assumed." + "user", + "password" + ] + }, + "description": { + "type": "string" } }, - "examples": [ - { - "clientId": "guest", - "cleanSession": true, - "lastWill": { - "topic": "/last-wills", - "qos": 2, - "message": "Guest gone offline.", - "retain": false - }, - "keepAlive": 60, - "bindingVersion": "0.1.0" - } - ] - }, - "http://asyncapi.com/bindings/kafka/0.3.0/server.json": { - "$id": "http://asyncapi.com/bindings/kafka/0.3.0/server.json", - "title": "Server Schema", - "description": "This object contains server connection information to a Kafka broker. This object contains additional information not possible to represent within the core AsyncAPI specification.", - "type": "object", - "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" } }, + "additionalProperties": false + }, + "http://asyncapi.com/definitions/3.0.0/X509.json": { + "$id": "http://asyncapi.com/definitions/3.0.0/X509.json", + "type": "object", + "required": [ + "type" + ], "properties": { - "schemaRegistryUrl": { - "type": "string", - "description": "API URL for the Schema Registry used when producing Kafka messages (if a Schema Registry was used)." - }, - "schemaRegistryVendor": { - "type": "string", - "description": "The vendor of the Schema Registry and Kafka serdes library that should be used." - }, - "bindingVersion": { + "type": { "type": "string", "enum": [ - "0.3.0" - ], - "description": "The version of this binding." + "X509" + ] + }, + "description": { + "type": "string" } }, - "examples": [ - { - "schemaRegistryUrl": "https://my-schema-registry.com", - "schemaRegistryVendor": "confluent", - "bindingVersion": "0.3.0" - } - ] - }, - "http://asyncapi.com/bindings/ibmmq/0.1.0/server.json": { - "$id": "http://asyncapi.com/bindings/ibmmq/0.1.0/server.json", - "title": "IBM MQ server bindings object", - "description": "This object contains server connection information about the IBM MQ server, referred to as an IBM MQ queue manager. This object contains additional connectivity information not possible to represent within the core AsyncAPI specification.", - "type": "object", - "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" } }, + "additionalProperties": false + }, + "http://asyncapi.com/definitions/3.0.0/symmetricEncryption.json": { + "$id": "http://asyncapi.com/definitions/3.0.0/symmetricEncryption.json", + "type": "object", + "required": [ + "type" + ], "properties": { - "groupId": { - "type": "string", - "description": "Defines a logical group of IBM MQ server objects. This is necessary to specify multi-endpoint configurations used in high availability deployments. If omitted, the server object is not part of a group." - }, - "ccdtQueueManagerName": { - "type": "string", - "default": "*", - "description": "The name of the IBM MQ queue manager to bind to in the CCDT file." - }, - "cipherSpec": { + "type": { "type": "string", - "description": "The recommended cipher specification used to establish a TLS connection between the client and the IBM MQ queue manager. More information on SSL/TLS cipher specifications supported by IBM MQ can be found on this page in the IBM MQ Knowledge Center." - }, - "multiEndpointServer": { - "type": "boolean", - "default": false, - "description": "If 'multiEndpointServer' is 'true' then multiple connections can be workload balanced and applications should not make assumptions as to where messages are processed. Where message ordering, or affinity to specific message resources is necessary, a single endpoint ('multiEndpointServer' = 'false') may be required." - }, - "heartBeatInterval": { - "type": "integer", - "minimum": 0, - "maximum": 999999, - "default": 300, - "description": "The recommended value (in seconds) for the heartbeat sent to the queue manager during periods of inactivity. A value of zero means that no heart beats are sent. A value of 1 means that the client will use the value defined by the queue manager. More information on heart beat interval can be found on this page in the IBM MQ Knowledge Center." + "enum": [ + "symmetricEncryption" + ] }, - "bindingVersion": { + "description": { + "type": "string" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "additionalProperties": false + }, + "http://asyncapi.com/definitions/3.0.0/asymmetricEncryption.json": { + "$id": "http://asyncapi.com/definitions/3.0.0/asymmetricEncryption.json", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { "type": "string", "enum": [ - "0.1.0" - ], - "description": "The version of this binding." + "asymmetricEncryption" + ] + }, + "description": { + "type": "string" } }, - "examples": [ + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "additionalProperties": false + }, + "http://asyncapi.com/definitions/3.0.0/HTTPSecurityScheme.json": { + "$id": "http://asyncapi.com/definitions/3.0.0/HTTPSecurityScheme.json", + "oneOf": [ { - "groupId": "PRODCLSTR1", - "cipherSpec": "ANY_TLS12_OR_HIGHER", - "bindingVersion": "0.1.0" + "$ref": "http://asyncapi.com/definitions/3.0.0/NonBearerHTTPSecurityScheme.json" }, { - "groupId": "PRODCLSTR1", - "bindingVersion": "0.1.0" + "$ref": "http://asyncapi.com/definitions/3.0.0/BearerHTTPSecurityScheme.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/APIKeyHTTPSecurityScheme.json" } ] }, - "http://asyncapi.com/bindings/solace/0.2.0/server.json": { - "$id": "http://asyncapi.com/bindings/solace/0.2.0/server.json", - "title": "Solace server bindings object", - "description": "This object contains server connection information about the Solace broker. This object contains additional connectivity information not possible to represent within the core AsyncAPI specification.", - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + "http://asyncapi.com/definitions/3.0.0/NonBearerHTTPSecurityScheme.json": { + "$id": "http://asyncapi.com/definitions/3.0.0/NonBearerHTTPSecurityScheme.json", + "not": { + "type": "object", + "properties": { + "scheme": { + "type": "string", + "enum": [ + "bearer" + ] + } } }, + "type": "object", + "required": [ + "scheme", + "type" + ], "properties": { - "msvVpn": { - "type": "string", - "description": "The name of the Virtual Private Network to connect to on the Solace broker." + "scheme": { + "type": "string" }, - "bindingVersion": { + "description": { + "type": "string" + }, + "type": { "type": "string", "enum": [ - "0.2.0" - ], - "description": "The version of this binding." + "http" + ] } }, - "examples": [ - { - "msgVpn": "ProdVPN", - "bindingVersion": "0.2.0" - } - ] - }, - "http://asyncapi.com/bindings/solace/0.3.0/server.json": { - "$id": "http://asyncapi.com/bindings/solace/0.3.0/server.json", - "title": "Solace server bindings object", - "description": "This object contains server connection information about the Solace broker. This object contains additional connectivity information not possible to represent within the core AsyncAPI specification.", - "type": "object", - "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" } }, + "additionalProperties": false + }, + "http://asyncapi.com/definitions/3.0.0/BearerHTTPSecurityScheme.json": { + "$id": "http://asyncapi.com/definitions/3.0.0/BearerHTTPSecurityScheme.json", + "type": "object", + "required": [ + "type", + "scheme" + ], "properties": { - "msgVpn": { + "scheme": { "type": "string", - "description": "The name of the Virtual Private Network to connect to on the Solace broker." + "enum": [ + "bearer" + ] }, - "bindingVersion": { + "bearerFormat": { + "type": "string" + }, + "type": { "type": "string", "enum": [ - "0.3.0" - ], - "description": "The version of this binding." + "http" + ] + }, + "description": { + "type": "string" } }, - "examples": [ - { - "msgVpn": "ProdVPN", - "bindingVersion": "0.3.0" - } - ] - }, - "http://asyncapi.com/bindings/pulsar/0.1.0/server.json": { - "$id": "http://asyncapi.com/bindings/pulsar/0.1.0/server.json", - "title": "Server Schema", - "description": "This object contains server information of Pulsar broker, which covers cluster and tenant admin configuration. This object contains additional information not possible to represent within the core AsyncAPI specification.", - "type": "object", - "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" } }, + "additionalProperties": false + }, + "http://asyncapi.com/definitions/3.0.0/APIKeyHTTPSecurityScheme.json": { + "$id": "http://asyncapi.com/definitions/3.0.0/APIKeyHTTPSecurityScheme.json", + "type": "object", + "required": [ + "type", + "name", + "in" + ], "properties": { - "tenant": { + "type": { "type": "string", - "description": "The pulsar tenant. If omitted, 'public' MUST be assumed." + "enum": [ + "httpApiKey" + ] }, - "bindingVersion": { + "name": { + "type": "string" + }, + "in": { "type": "string", "enum": [ - "0.1.0" - ], - "description": "The version of this binding. If omitted, 'latest' MUST be assumed." + "header", + "query", + "cookie" + ] + }, + "description": { + "type": "string" } }, - "examples": [ - { - "tenant": "contoso", - "bindingVersion": "0.1.0" - } - ] - }, - "http://asyncapi.com/definitions/3.0.0/channels.json": { - "$id": "http://asyncapi.com/definitions/3.0.0/channels.json", - "type": "object", - "additionalProperties": { - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" - }, - { - "$ref": "http://asyncapi.com/definitions/3.0.0/channel.json" - } - ] - } - }, - "http://asyncapi.com/definitions/3.0.0/channel.json": { - "$id": "http://asyncapi.com/definitions/3.0.0/channel.json", - "type": "object", - "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" } }, + "additionalProperties": false + }, + "http://asyncapi.com/definitions/3.0.0/oauth2Flows.json": { + "$id": "http://asyncapi.com/definitions/3.0.0/oauth2Flows.json", + "type": "object", + "required": [ + "type", + "flows" + ], "properties": { - "address": { - "type": [ - "string", - "null" - ], - "description": "An optional string representation of this channel's address. The address is typically the \"topic name\", \"routing key\", \"event type\", or \"path\". When `null` or absent, it MUST be interpreted as unknown. This is useful when the address is generated dynamically at runtime or can't be known upfront. It MAY contain Channel Address Expressions." + "type": { + "type": "string", + "enum": [ + "oauth2" + ] }, - "messages": { - "$ref": "http://asyncapi.com/definitions/3.0.0/channelMessages.json" + "description": { + "type": "string" }, - "parameters": { + "flows": { "type": "object", - "additionalProperties": { - "$ref": "http://asyncapi.com/definitions/3.0.0/parameter.json" - } - }, - "title": { + "properties": { + "implicit": { + "allOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/oauth2Flow.json" + }, + { + "required": [ + "authorizationUrl", + "availableScopes" + ] + }, + { + "not": { + "required": [ + "tokenUrl" + ] + } + } + ] + }, + "password": { + "allOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/oauth2Flow.json" + }, + { + "required": [ + "tokenUrl", + "availableScopes" + ] + }, + { + "not": { + "required": [ + "authorizationUrl" + ] + } + } + ] + }, + "clientCredentials": { + "allOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/oauth2Flow.json" + }, + { + "required": [ + "tokenUrl", + "availableScopes" + ] + }, + { + "not": { + "required": [ + "authorizationUrl" + ] + } + } + ] + }, + "authorizationCode": { + "allOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/oauth2Flow.json" + }, + { + "required": [ + "authorizationUrl", + "tokenUrl", + "availableScopes" + ] + } + ] + } + }, + "additionalProperties": false + }, + "scopes": { + "type": "array", + "description": "List of the needed scope names.", + "items": { + "type": "string" + } + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + } + }, + "http://asyncapi.com/definitions/3.0.0/oauth2Flow.json": { + "$id": "http://asyncapi.com/definitions/3.0.0/oauth2Flow.json", + "type": "object", + "properties": { + "authorizationUrl": { "type": "string", - "description": "A human-friendly title for the channel." + "format": "uri" }, - "summary": { + "tokenUrl": { "type": "string", - "description": "A brief summary of the channel." + "format": "uri" + }, + "refreshUrl": { + "type": "string", + "format": "uri" + }, + "availableScopes": { + "$ref": "http://asyncapi.com/definitions/3.0.0/oauth2Scopes.json" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "additionalProperties": false + }, + "http://asyncapi.com/definitions/3.0.0/oauth2Scopes.json": { + "$id": "http://asyncapi.com/definitions/3.0.0/oauth2Scopes.json", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "http://asyncapi.com/definitions/3.0.0/openIdConnect.json": { + "$id": "http://asyncapi.com/definitions/3.0.0/openIdConnect.json", + "type": "object", + "required": [ + "type", + "openIdConnectUrl" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "openIdConnect" + ] }, "description": { + "type": "string" + }, + "openIdConnectUrl": { "type": "string", - "description": "A longer description of the channel. CommonMark is allowed." + "format": "uri" }, - "servers": { + "scopes": { "type": "array", - "description": "The references of the servers on which this channel is available. If absent or empty then this channel must be available on all servers.", + "description": "List of the needed scope names.", "items": { - "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" - }, - "uniqueItems": true + "type": "string" + } + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "additionalProperties": false + }, + "http://asyncapi.com/definitions/3.0.0/SaslSecurityScheme.json": { + "$id": "http://asyncapi.com/definitions/3.0.0/SaslSecurityScheme.json", + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/SaslPlainSecurityScheme.json" }, - "bindings": { - "$ref": "http://asyncapi.com/definitions/3.0.0/channelBindingsObject.json" + { + "$ref": "http://asyncapi.com/definitions/3.0.0/SaslScramSecurityScheme.json" }, - "tags": { - "type": "array", - "items": { - "$ref": "http://asyncapi.com/definitions/3.0.0/tag.json" - }, - "uniqueItems": true + { + "$ref": "http://asyncapi.com/definitions/3.0.0/SaslGssapiSecurityScheme.json" + } + ] + }, + "http://asyncapi.com/definitions/3.0.0/SaslPlainSecurityScheme.json": { + "$id": "http://asyncapi.com/definitions/3.0.0/SaslPlainSecurityScheme.json", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "plain" + ] }, - "externalDocs": { - "$ref": "http://asyncapi.com/definitions/3.0.0/externalDocs.json" + "description": { + "type": "string" } - } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "additionalProperties": false }, - "http://asyncapi.com/definitions/3.0.0/channelMessages.json": { - "$id": "http://asyncapi.com/definitions/3.0.0/channelMessages.json", + "http://asyncapi.com/definitions/3.0.0/SaslScramSecurityScheme.json": { + "$id": "http://asyncapi.com/definitions/3.0.0/SaslScramSecurityScheme.json", "type": "object", - "additionalProperties": { - "$ref": "http://asyncapi.com/definitions/3.0.0/message.json" + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "scramSha256", + "scramSha512" + ] + }, + "description": { + "type": "string" + } }, - "description": "A map of the messages that will be sent to this channel by any application at any time. **Every message sent to this channel MUST be valid against one, and only one, of the message objects defined in this map.**" + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "additionalProperties": false }, - "http://asyncapi.com/definitions/3.0.0/message.json": { - "$id": "http://asyncapi.com/definitions/3.0.0/message.json", - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" - }, - { - "oneOf": [ - { - "type": "object", - "required": [ - "oneOf" - ], - "additionalProperties": false, - "properties": { - "oneOf": { - "type": "array", - "items": { - "$ref": "http://asyncapi.com/definitions/3.0.0/message.json" - } - } - } - }, - { - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" - } - }, - "properties": { - "schemaFormat": { - "type": "string" - }, - "contentType": { - "type": "string" - }, - "headers": { - "allOf": [ - { - "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" - }, - { - "properties": { - "type": { - "const": "object" - } - } - } - ] - }, - "messageId": { - "type": "string" - }, - "payload": {}, - "correlationId": { - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" - }, - { - "$ref": "http://asyncapi.com/definitions/3.0.0/correlationId.json" - } - ] - }, - "tags": { - "type": "array", - "items": { - "$ref": "http://asyncapi.com/definitions/3.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/3.0.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/3.0.0/messageBindingsObject.json" - }, - "traits": { - "type": "array", - "items": { - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" - }, - { - "$ref": "http://asyncapi.com/definitions/3.0.0/messageTrait.json" - }, - { - "type": "array", - "items": [ - { - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" - }, - { - "$ref": "http://asyncapi.com/definitions/3.0.0/messageTrait.json" - } - ] - }, - { - "type": "object", - "additionalItems": true - } - ] - } - ] - } - } - } - } - ] - } - ] - }, - "http://asyncapi.com/definitions/3.0.0/schema.json": { - "$id": "http://asyncapi.com/definitions/3.0.0/schema.json", - "allOf": [ - { - "$ref": "http://json-schema.org/draft-07/schema#" - }, - { - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" - } - }, - "properties": { - "additionalProperties": { - "anyOf": [ - { - "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" - }, - { - "type": "boolean" - } - ], - "default": {} - }, - "items": { - "anyOf": [ - { - "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" - }, - { - "type": "array", - "minItems": 1, - "items": { - "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" - } - } - ], - "default": {} - }, - "allOf": { - "type": "array", - "minItems": 1, - "items": { - "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" - } - }, - "oneOf": { - "type": "array", - "minItems": 1, - "items": { - "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" - } - }, - "anyOf": { - "type": "array", - "minItems": 1, - "items": { - "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" - } - }, - "not": { - "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" - }, - "properties": { - "type": "object", - "additionalProperties": { - "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" - }, - "default": {} - }, - "patternProperties": { - "type": "object", - "additionalProperties": { - "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" - }, - "default": {} - }, - "propertyNames": { - "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" - }, - "contains": { - "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" - }, - "discriminator": { - "type": "string" - }, - "externalDocs": { - "$ref": "http://asyncapi.com/definitions/3.0.0/externalDocs.json" - }, - "deprecated": { - "type": "boolean", - "default": false - } - } - } - ] - }, - "http://json-schema.org/draft-07/schema": { - "$id": "http://json-schema.org/draft-07/schema", - "title": "Core schema meta-schema", - "definitions": { - "schemaArray": { - "type": "array", - "minItems": 1, - "items": { - "$ref": "#" - } - }, - "nonNegativeInteger": { - "type": "integer", - "minimum": 0 - }, - "nonNegativeIntegerDefault0": { - "allOf": [ - { - "$ref": "#/definitions/nonNegativeInteger" - }, - { - "default": 0 - } - ] - }, - "simpleTypes": { - "enum": [ - "array", - "boolean", - "integer", - "null", - "number", - "object", - "string" - ] - }, - "stringArray": { - "type": "array", - "items": { - "type": "string" - }, - "uniqueItems": true, - "default": [] - } - }, - "type": [ - "object", - "boolean" - ], - "properties": { - "$id": { - "type": "string", - "format": "uri-reference" - }, - "$schema": { - "type": "string", - "format": "uri" - }, - "$ref": { - "type": "string", - "format": "uri-reference" - }, - "$comment": { - "type": "string" - }, - "title": { - "type": "string" + "http://asyncapi.com/definitions/3.0.0/SaslGssapiSecurityScheme.json": { + "$id": "http://asyncapi.com/definitions/3.0.0/SaslGssapiSecurityScheme.json", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "gssapi" + ] }, "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/3.0.0/correlationId.json": { - "$id": "http://asyncapi.com/definitions/3.0.0/correlationId.json", - "type": "object", - "required": [ - "location" - ], - "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" } }, - "properties": { - "description": { - "type": "string", - "description": "A optional description of the correlation ID. GitHub Flavored Markdown is allowed." - }, - "location": { - "type": "string", - "description": "A runtime expression that specifies the location of the correlation ID", - "pattern": "^\\$message\\.(header|payload)#(\\/(([^\\/~])|(~[01]))*)*" - } - } - }, - "http://asyncapi.com/definitions/3.0.0/messageBindingsObject.json": { - "$id": "http://asyncapi.com/definitions/3.0.0/messageBindingsObject.json", + "additionalProperties": false + }, + "http://asyncapi.com/definitions/3.0.0/serverBindingsObject.json": { + "$id": "http://asyncapi.com/definitions/3.0.0/serverBindingsObject.json", "type": "object", "additionalProperties": false, "patternProperties": { @@ -1299,14 +906,7 @@ } }, "properties": { - "http": { - "oneOf": [ - { - "description": "Latest binding", - "$ref": "http://asyncapi.com/bindings/http/0.1.0/message.json" - } - ] - }, + "http": {}, "ws": {}, "amqp": {}, "amqp1": {}, @@ -1314,30 +914,20 @@ "oneOf": [ { "description": "Latest binding", - "$ref": "http://asyncapi.com/bindings/mqtt/0.1.0/message.json" + "$ref": "http://asyncapi.com/bindings/mqtt/0.1.0/server.json" } ] }, "mqtt5": {}, "kafka": { - "oneOf": [ - { - "$ref": "http://asyncapi.com/bindings/kafka/0.1.0/message.json" - }, - { - "description": "Latest binding", - "$ref": "http://asyncapi.com/bindings/kafka/0.3.0/message.json" - } - ] - }, - "anypointmq": { "oneOf": [ { "description": "Latest binding", - "$ref": "http://asyncapi.com/bindings/anypointmq/0.0.1/message.json" + "$ref": "http://asyncapi.com/bindings/kafka/0.3.0/server.json" } ] }, + "anypointmq": {}, "nats": {}, "jms": {}, "sns": {}, @@ -1348,25 +938,36 @@ "oneOf": [ { "description": "Latest binding", - "$ref": "http://asyncapi.com/bindings/ibmmq/0.1.0/message.json" + "$ref": "http://asyncapi.com/bindings/ibmmq/0.1.0/server.json" } ] }, - "solace": {}, - "googlepubsub": { + "solace": { "oneOf": [ + { + "$ref": "http://asyncapi.com/bindings/solace/0.2.0/server.json" + }, { "description": "Latest binding", - "$ref": "http://asyncapi.com/bindings/googlepubsub/0.1.0/message.json" + "$ref": "http://asyncapi.com/bindings/solace/0.3.0/server.json" + } + ] + }, + "googlepubsub": {}, + "pulsar": { + "oneOf": [ + { + "description": "Latest binding", + "$ref": "http://asyncapi.com/bindings/pulsar/0.1.0/server.json" } ] } } }, - "http://asyncapi.com/bindings/http/0.1.0/message.json": { - "$id": "http://asyncapi.com/bindings/http/0.1.0/message.json", - "title": "HTTP message bindings object", - "description": "This object contains information about the message representation in HTTP.", + "http://asyncapi.com/bindings/mqtt/0.1.0/server.json": { + "$id": "http://asyncapi.com/bindings/mqtt/0.1.0/server.json", + "title": "MQTT server bindings object", + "description": "This object contains information about the server representation in MQTT.", "type": "object", "additionalProperties": false, "patternProperties": { @@ -1375,39 +976,72 @@ } }, "properties": { - "headers": { - "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json", - "description": "\tA Schema object containing the definitions for HTTP-specific headers. This schema MUST be of type 'object' and have a 'properties' key." + "clientId": { + "type": "string", + "description": "The client identifier." + }, + "cleanSession": { + "type": "boolean", + "description": "Whether to create a persistent connection or not. When 'false', the connection will be persistent." + }, + "lastWill": { + "type": "object", + "description": "Last Will and Testament configuration.", + "properties": { + "topic": { + "type": "string", + "description": "The topic where the Last Will and Testament message will be sent." + }, + "qos": { + "type": "integer", + "enum": [ + 0, + 1, + 2 + ], + "description": "Defines how hard the broker/client will try to ensure that the Last Will and Testament message is received. Its value MUST be either 0, 1 or 2." + }, + "message": { + "type": "string", + "description": "Last Will message." + }, + "retain": { + "type": "boolean", + "description": "Whether the broker should retain the Last Will and Testament message or not." + } + } + }, + "keepAlive": { + "type": "integer", + "description": "Interval in seconds of the longest period of time the broker and the client can endure without sending a message." }, "bindingVersion": { "type": "string", "enum": [ "0.1.0" ], - "description": "The version of this binding. If omitted, \"latest\" MUST be assumed." + "description": "The version of this binding. If omitted, 'latest' MUST be assumed." } }, "examples": [ { - "headers": { - "type": "object", - "properties": { - "Content-Type": { - "type": "string", - "enum": [ - "application/json" - ] - } - } + "clientId": "guest", + "cleanSession": true, + "lastWill": { + "topic": "/last-wills", + "qos": 2, + "message": "Guest gone offline.", + "retain": false }, + "keepAlive": 60, "bindingVersion": "0.1.0" } ] }, - "http://asyncapi.com/bindings/mqtt/0.1.0/message.json": { - "$id": "http://asyncapi.com/bindings/mqtt/0.1.0/message.json", - "title": "MQTT message bindings object", - "description": "This object contains information about the message representation in MQTT.", + "http://asyncapi.com/bindings/kafka/0.3.0/server.json": { + "$id": "http://asyncapi.com/bindings/kafka/0.3.0/server.json", + "title": "Server Schema", + "description": "This object contains server connection information to a Kafka broker. This object contains additional information not possible to represent within the core AsyncAPI specification.", "type": "object", "additionalProperties": false, "patternProperties": { @@ -1416,23 +1050,34 @@ } }, "properties": { + "schemaRegistryUrl": { + "type": "string", + "description": "API URL for the Schema Registry used when producing Kafka messages (if a Schema Registry was used)." + }, + "schemaRegistryVendor": { + "type": "string", + "description": "The vendor of the Schema Registry and Kafka serdes library that should be used." + }, "bindingVersion": { "type": "string", "enum": [ - "0.1.0" + "0.3.0" ], - "description": "The version of this binding. If omitted, 'latest' MUST be assumed." + "description": "The version of this binding." } }, "examples": [ { - "bindingVersion": "0.1.0" + "schemaRegistryUrl": "https://my-schema-registry.com", + "schemaRegistryVendor": "confluent", + "bindingVersion": "0.3.0" } ] }, - "http://asyncapi.com/bindings/kafka/0.1.0/message.json": { - "$id": "http://asyncapi.com/bindings/kafka/0.1.0/message.json", - "title": "Kafka message bindings object", + "http://asyncapi.com/bindings/ibmmq/0.1.0/server.json": { + "$id": "http://asyncapi.com/bindings/ibmmq/0.1.0/server.json", + "title": "IBM MQ server bindings object", + "description": "This object contains server connection information about the IBM MQ server, referred to as an IBM MQ queue manager. This object contains additional connectivity information not possible to represent within the core AsyncAPI specification.", "type": "object", "additionalProperties": false, "patternProperties": { @@ -1441,39 +1086,55 @@ } }, "properties": { - "key": { - "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json", - "description": "The message key." + "groupId": { + "type": "string", + "description": "Defines a logical group of IBM MQ server objects. This is necessary to specify multi-endpoint configurations used in high availability deployments. If omitted, the server object is not part of a group." + }, + "ccdtQueueManagerName": { + "type": "string", + "default": "*", + "description": "The name of the IBM MQ queue manager to bind to in the CCDT file." + }, + "cipherSpec": { + "type": "string", + "description": "The recommended cipher specification used to establish a TLS connection between the client and the IBM MQ queue manager. More information on SSL/TLS cipher specifications supported by IBM MQ can be found on this page in the IBM MQ Knowledge Center." + }, + "multiEndpointServer": { + "type": "boolean", + "default": false, + "description": "If 'multiEndpointServer' is 'true' then multiple connections can be workload balanced and applications should not make assumptions as to where messages are processed. Where message ordering, or affinity to specific message resources is necessary, a single endpoint ('multiEndpointServer' = 'false') may be required." + }, + "heartBeatInterval": { + "type": "integer", + "minimum": 0, + "maximum": 999999, + "default": 300, + "description": "The recommended value (in seconds) for the heartbeat sent to the queue manager during periods of inactivity. A value of zero means that no heart beats are sent. A value of 1 means that the client will use the value defined by the queue manager. More information on heart beat interval can be found on this page in the IBM MQ Knowledge Center." }, "bindingVersion": { "type": "string", "enum": [ "0.1.0" ], - "description": "The version of this binding. If omitted, 'latest' MUST be assumed." + "description": "The version of this binding." } }, "examples": [ { - "key": { - "type": "string", - "enum": [ - "myKey" - ] - }, + "groupId": "PRODCLSTR1", + "cipherSpec": "ANY_TLS12_OR_HIGHER", "bindingVersion": "0.1.0" }, { - "key": { - "$ref": "path/to/user-create.avsc#/UserCreate" - }, - "bindingVersion": "0.2.0" + "groupId": "PRODCLSTR1", + "bindingVersion": "0.1.0" } ] }, - "http://asyncapi.com/bindings/kafka/0.3.0/message.json": { - "$id": "http://asyncapi.com/bindings/kafka/0.3.0/message.json", - "title": "Message Schema", + "http://asyncapi.com/bindings/solace/0.2.0/server.json": { + "$id": "http://asyncapi.com/bindings/solace/0.2.0/server.json", + "title": "Solace server bindings object", + "description": "This object contains server connection information about the Solace broker. This object contains additional connectivity information not possible to represent within the core AsyncAPI specification.", "type": "object", "additionalProperties": false, "patternProperties": { @@ -1482,61 +1143,60 @@ } }, "properties": { - "key": { - "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json", - "description": "The message key." - }, - "schemaIdLocation": { - "type": "string", - "description": "If a Schema Registry is used when performing this operation, tells where the id of schema is stored.", - "enum": [ - "header", - "payload" - ] - }, - "schemaIdPayloadEncoding": { - "type": "string", - "description": "Number of bytes or vendor specific values when schema id is encoded in payload." - }, - "schemaLookupStrategy": { + "msvVpn": { "type": "string", - "description": "Freeform string for any naming strategy class to use. Clients should default to the vendor default if not supplied." + "description": "The name of the Virtual Private Network to connect to on the Solace broker." }, "bindingVersion": { "type": "string", "enum": [ - "0.3.0" + "0.2.0" ], - "description": "The version of this binding. If omitted, 'latest' MUST be assumed." + "description": "The version of this binding." } }, "examples": [ { - "key": { - "type": "string", - "enum": [ - "myKey" - ] - }, - "schemaIdLocation": "payload", - "schemaIdPayloadEncoding": "apicurio-new", - "schemaLookupStrategy": "TopicIdStrategy", - "bindingVersion": "0.3.0" + "msgVpn": "ProdVPN", + "bindingVersion": "0.2.0" + } + ] + }, + "http://asyncapi.com/bindings/solace/0.3.0/server.json": { + "$id": "http://asyncapi.com/bindings/solace/0.3.0/server.json", + "title": "Solace server bindings object", + "description": "This object contains server connection information about the Solace broker. This object contains additional connectivity information not possible to represent within the core AsyncAPI specification.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "properties": { + "msgVpn": { + "type": "string", + "description": "The name of the Virtual Private Network to connect to on the Solace broker." }, + "bindingVersion": { + "type": "string", + "enum": [ + "0.3.0" + ], + "description": "The version of this binding." + } + }, + "examples": [ { - "key": { - "$ref": "path/to/user-create.avsc#/UserCreate" - }, - "schemaIdLocation": "payload", - "schemaIdPayloadEncoding": "4", + "msgVpn": "ProdVPN", "bindingVersion": "0.3.0" } ] }, - "http://asyncapi.com/bindings/anypointmq/0.0.1/message.json": { - "$id": "http://asyncapi.com/bindings/anypointmq/0.0.1/message.json", - "title": "Anypoint MQ message bindings object", - "description": "This object contains configuration for describing an Anypoint MQ message as an AsyncAPI message. This objects only contains configuration that can not be provided in the AsyncAPI standard message object.", + "http://asyncapi.com/bindings/pulsar/0.1.0/server.json": { + "$id": "http://asyncapi.com/bindings/pulsar/0.1.0/server.json", + "title": "Server Schema", + "description": "This object contains server information of Pulsar broker, which covers cluster and tenant admin configuration. This object contains additional information not possible to represent within the core AsyncAPI specification.", "type": "object", "additionalProperties": false, "patternProperties": { @@ -1545,36 +1205,41 @@ } }, "properties": { - "headers": { - "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json", - "description": "A Schema object containing the definitions for Anypoint MQ-specific headers (protocol headers). This schema MUST be of type 'object' and have a 'properties' key. Examples of Anypoint MQ protocol headers are 'messageId' and 'messageGroupId'." + "tenant": { + "type": "string", + "description": "The pulsar tenant. If omitted, 'public' MUST be assumed." }, "bindingVersion": { "type": "string", "enum": [ - "0.0.1" + "0.1.0" ], "description": "The version of this binding. If omitted, 'latest' MUST be assumed." } }, "examples": [ { - "headers": { - "type": "object", - "properties": { - "messageId": { - "type": "string" - } - } - }, - "bindingVersion": "0.0.1" + "tenant": "contoso", + "bindingVersion": "0.1.0" } ] }, - "http://asyncapi.com/bindings/ibmmq/0.1.0/message.json": { - "$id": "http://asyncapi.com/bindings/ibmmq/0.1.0/message.json", - "title": "IBM MQ message bindings object", - "description": "This object contains information about the message representation in IBM MQ.", + "http://asyncapi.com/definitions/3.0.0/channels.json": { + "$id": "http://asyncapi.com/definitions/3.0.0/channels.json", + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/channel.json" + } + ] + } + }, + "http://asyncapi.com/definitions/3.0.0/channel.json": { + "$id": "http://asyncapi.com/definitions/3.0.0/channel.json", "type": "object", "additionalProperties": false, "patternProperties": { @@ -1583,226 +1248,582 @@ } }, "properties": { - "type": { - "type": "string", - "enum": [ + "address": { + "type": [ "string", - "jms", - "binary" + "null" ], - "default": "string", - "description": "The type of the message." + "description": "An optional string representation of this channel's address. The address is typically the \"topic name\", \"routing key\", \"event type\", or \"path\". When `null` or absent, it MUST be interpreted as unknown. This is useful when the address is generated dynamically at runtime or can't be known upfront. It MAY contain Channel Address Expressions." }, - "headers": { + "messages": { + "$ref": "http://asyncapi.com/definitions/3.0.0/channelMessages.json" + }, + "parameters": { + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/3.0.0/parameter.json" + } + }, + "title": { "type": "string", - "description": "Defines the IBM MQ message headers to include with this message. More than one header can be specified as a comma separated list. Supporting information on IBM MQ message formats can be found on this [page](https://www.ibm.com/docs/en/ibm-mq/9.2?topic=mqmd-format-mqchar8) in the IBM MQ Knowledge Center." + "description": "A human-friendly title for the channel." + }, + "summary": { + "type": "string", + "description": "A brief summary of the channel." }, "description": { "type": "string", - "description": "Provides additional information for application developers: describes the message type or format." + "description": "A longer description of the channel. CommonMark is allowed." }, - "expiry": { - "type": "integer", - "minimum": 0, - "default": 0, - "description": "The recommended setting the client should use for the TTL (Time-To-Live) of the message. This is a period of time expressed in milliseconds and set by the application that puts the message. 'expiry' values are API dependant e.g., MQI and JMS use different units of time and default values for 'unlimited'. General information on IBM MQ message expiry can be found on this [page](https://www.ibm.com/docs/en/ibm-mq/9.2?topic=mqmd-expiry-mqlong) in the IBM MQ Knowledge Center." + "servers": { + "type": "array", + "description": "The references of the servers on which this channel is available. If absent or empty then this channel must be available on all servers.", + "items": { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + "uniqueItems": true }, - "bindingVersion": { - "type": "string", - "enum": [ - "0.1.0" - ], - "description": "The version of this binding." + "bindings": { + "$ref": "http://asyncapi.com/definitions/3.0.0/channelBindingsObject.json" + }, + "tags": { + "type": "array", + "items": { + "$ref": "http://asyncapi.com/definitions/3.0.0/tag.json" + }, + "uniqueItems": true + }, + "externalDocs": { + "$ref": "http://asyncapi.com/definitions/3.0.0/externalDocs.json" + } + } + }, + "http://asyncapi.com/definitions/3.0.0/channelMessages.json": { + "$id": "http://asyncapi.com/definitions/3.0.0/channelMessages.json", + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/3.0.0/message.json" + }, + "description": "A map of the messages that will be sent to this channel by any application at any time. **Every message sent to this channel MUST be valid against one, and only one, of the message objects defined in this map.**" + }, + "http://asyncapi.com/definitions/3.0.0/message.json": { + "$id": "http://asyncapi.com/definitions/3.0.0/message.json", + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "oneOf": [ + { + "type": "object", + "required": [ + "oneOf" + ], + "additionalProperties": false, + "properties": { + "oneOf": { + "type": "array", + "items": { + "$ref": "http://asyncapi.com/definitions/3.0.0/message.json" + } + } + } + }, + { + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "properties": { + "schemaFormat": { + "type": "string" + }, + "contentType": { + "type": "string" + }, + "headers": { + "allOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" + }, + { + "properties": { + "type": { + "const": "object" + } + } + } + ] + }, + "messageId": { + "type": "string" + }, + "payload": {}, + "correlationId": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/correlationId.json" + } + ] + }, + "tags": { + "type": "array", + "items": { + "$ref": "http://asyncapi.com/definitions/3.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/3.0.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/3.0.0/messageBindingsObject.json" + }, + "traits": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/messageTrait.json" + }, + { + "type": "array", + "items": [ + { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/messageTrait.json" + } + ] + }, + { + "type": "object", + "additionalItems": true + } + ] + } + ] + } + } + } + } + ] } - }, - "oneOf": [ + ] + }, + "http://asyncapi.com/definitions/3.0.0/schema.json": { + "$id": "http://asyncapi.com/definitions/3.0.0/schema.json", + "allOf": [ { - "properties": { - "type": { - "const": "binary" - } - } + "$ref": "http://json-schema.org/draft-07/schema#" }, { - "properties": { - "type": { - "const": "jms" + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" } }, - "not": { - "required": [ - "headers" - ] - } - }, - { "properties": { - "type": { - "const": "string" + "additionalProperties": { + "anyOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" + }, + { + "type": "boolean" + } + ], + "default": {} + }, + "items": { + "anyOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" + }, + { + "type": "array", + "minItems": 1, + "items": { + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" + } + } + ], + "default": {} + }, + "allOf": { + "type": "array", + "minItems": 1, + "items": { + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" + } + }, + "oneOf": { + "type": "array", + "minItems": 1, + "items": { + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" + } + }, + "anyOf": { + "type": "array", + "minItems": 1, + "items": { + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" + } + }, + "not": { + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" + }, + "properties": { + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" + }, + "default": {} + }, + "patternProperties": { + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" + }, + "default": {} + }, + "propertyNames": { + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" + }, + "contains": { + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" + }, + "discriminator": { + "type": "string" + }, + "externalDocs": { + "$ref": "http://asyncapi.com/definitions/3.0.0/externalDocs.json" + }, + "deprecated": { + "type": "boolean", + "default": false } - }, - "not": { - "required": [ - "headers" - ] } } - ], - "examples": [ - { - "type": "string", - "bindingVersion": "0.1.0" - }, - { - "type": "jms", - "description": "JMS stream message", - "bindingVersion": "0.1.0" - } ] }, - "http://asyncapi.com/bindings/googlepubsub/0.1.0/message.json": { - "$id": "http://asyncapi.com/bindings/googlepubsub/0.1.0/message.json", - "title": "Cloud Pub/Sub Channel Schema", - "description": "This object contains information about the message representation for Google Cloud Pub/Sub.", - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" - } - }, - "properties": { - "bindingVersion": { - "type": "string", - "enum": [ - "0.1.0" - ], - "description": "The version of this binding." - }, - "attributes": { - "type": "object" + "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": "#" + } }, - "orderingKey": { - "type": "string" + "nonNegativeInteger": { + "type": "integer", + "minimum": 0 }, - "schema": { - "type": "object", - "additionalItems": false, - "properties": { - "name": { - "type": "string" + "nonNegativeIntegerDefault0": { + "allOf": [ + { + "$ref": "#/definitions/nonNegativeInteger" }, - "type": { - "type": "string" + { + "default": 0 } - }, - "required": [ - "name", - "type" ] - } - }, - "examples": [ - { - "schema": { - "name": "projects/your-project-id/schemas/your-avro-schema-id", - "type": "avro" - } }, - { - "schema": { - "name": "projects/your-project-id/schemas/your-protobuf-schema-id", - "type": "protobuf" - } - } - ] - }, - "http://asyncapi.com/definitions/3.0.0/messageTrait.json": { - "$id": "http://asyncapi.com/definitions/3.0.0/messageTrait.json", - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + "simpleTypes": { + "enum": [ + "array", + "boolean", + "integer", + "null", + "number", + "object", + "string" + ] + }, + "stringArray": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true, + "default": [] } }, + "type": [ + "object", + "boolean" + ], "properties": { - "schemaFormat": { + "$id": { + "type": "string", + "format": "uri-reference" + }, + "$schema": { + "type": "string", + "format": "uri" + }, + "$ref": { + "type": "string", + "format": "uri-reference" + }, + "$comment": { "type": "string" }, - "contentType": { + "title": { "type": "string" }, - "headers": { - "allOf": [ + "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": "http://asyncapi.com/definitions/3.0.0/schema.json" + "$ref": "#" }, { - "properties": { - "type": { - "const": "object" - } - } + "$ref": "#/definitions/schemaArray" } - ] + ], + "default": true }, - "messageId": { - "type": "string" + "maxItems": { + "$ref": "#/definitions/nonNegativeInteger" }, - "correlationId": { - "oneOf": [ + "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": "http://asyncapi.com/definitions/3.0.0/Reference.json" + "$ref": "#/definitions/simpleTypes" }, { - "$ref": "http://asyncapi.com/definitions/3.0.0/correlationId.json" + "type": "array", + "items": { + "$ref": "#/definitions/simpleTypes" + }, + "minItems": 1, + "uniqueItems": true } ] }, - "tags": { - "type": "array", - "items": { - "$ref": "http://asyncapi.com/definitions/3.0.0/tag.json" - }, - "uniqueItems": true + "format": { + "type": "string" }, - "summary": { - "type": "string", - "description": "A brief summary of the message." + "contentMediaType": { + "type": "string" }, - "name": { - "type": "string", - "description": "Name of the message." + "contentEncoding": { + "type": "string" }, - "title": { - "type": "string", - "description": "A human-friendly title for the message." + "if": { + "$ref": "#" }, - "description": { - "type": "string", - "description": "A longer description of the message. CommonMark is allowed." + "then": { + "$ref": "#" }, - "externalDocs": { - "$ref": "http://asyncapi.com/definitions/3.0.0/externalDocs.json" + "else": { + "$ref": "#" }, - "deprecated": { - "type": "boolean", - "default": false + "allOf": { + "$ref": "#/definitions/schemaArray" }, - "examples": { - "type": "array", - "items": { - "type": "object" - } + "anyOf": { + "$ref": "#/definitions/schemaArray" }, - "bindings": { - "$ref": "http://asyncapi.com/definitions/3.0.0/messageBindingsObject.json" + "oneOf": { + "$ref": "#/definitions/schemaArray" + }, + "not": { + "$ref": "#" } - } + }, + "default": true }, - "http://asyncapi.com/definitions/3.0.0/parameter.json": { - "$id": "http://asyncapi.com/definitions/3.0.0/parameter.json", + "http://asyncapi.com/definitions/3.0.0/correlationId.json": { + "$id": "http://asyncapi.com/definitions/3.0.0/correlationId.json", + "type": "object", + "required": [ + "location" + ], "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { @@ -1812,63 +1833,53 @@ "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/3.0.0/schema.json" + "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 parameter value", + "description": "A runtime expression that specifies the location of the correlation ID", "pattern": "^\\$message\\.(header|payload)#(\\/(([^\\/~])|(~[01]))*)*" - }, - "$ref": { - "$ref": "http://asyncapi.com/definitions/3.0.0/ReferenceObject.json" } } }, - "http://asyncapi.com/definitions/3.0.0/channelBindingsObject.json": { - "$id": "http://asyncapi.com/definitions/3.0.0/channelBindingsObject.json", + "http://asyncapi.com/definitions/3.0.0/messageBindingsObject.json": { + "$id": "http://asyncapi.com/definitions/3.0.0/messageBindingsObject.json", "type": "object", "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" - } - }, - "properties": { - "http": {}, - "ws": { - "oneOf": [ - { - "description": "Latest binding", - "$ref": "http://asyncapi.com/bindings/websockets/0.1.0/channel.json" - } - ] - }, - "amqp": { + } + }, + "properties": { + "http": { "oneOf": [ { "description": "Latest binding", - "$ref": "http://asyncapi.com/bindings/amqp/0.2.0/channel.json" + "$ref": "http://asyncapi.com/bindings/http/0.1.0/message.json" } ] }, - "amqp1": { + "ws": {}, + "amqp": {}, + "amqp1": {}, + "mqtt": { "oneOf": [ { "description": "Latest binding", - "$ref": "http://asyncapi.com/bindings/amqp/0.2.0/channel.json" + "$ref": "http://asyncapi.com/bindings/mqtt/0.1.0/message.json" } ] }, - "mqtt": {}, "mqtt5": {}, "kafka": { "oneOf": [ + { + "$ref": "http://asyncapi.com/bindings/kafka/0.1.0/message.json" + }, { "description": "Latest binding", - "$ref": "http://asyncapi.com/bindings/kafka/0.3.0/channel.json" + "$ref": "http://asyncapi.com/bindings/kafka/0.3.0/message.json" } ] }, @@ -1876,7 +1887,7 @@ "oneOf": [ { "description": "Latest binding", - "$ref": "http://asyncapi.com/bindings/anypointmq/0.0.1/channel.json" + "$ref": "http://asyncapi.com/bindings/anypointmq/0.0.1/message.json" } ] }, @@ -1890,7 +1901,7 @@ "oneOf": [ { "description": "Latest binding", - "$ref": "http://asyncapi.com/bindings/ibmmq/0.1.0/channel.json" + "$ref": "http://asyncapi.com/bindings/ibmmq/0.1.0/message.json" } ] }, @@ -1899,24 +1910,16 @@ "oneOf": [ { "description": "Latest binding", - "$ref": "http://asyncapi.com/bindings/googlepubsub/0.1.0/channel.json" - } - ] - }, - "pulsar": { - "oneOf": [ - { - "description": "Latest binding", - "$ref": "http://asyncapi.com/bindings/pulsar/0.1.0/channel.json" + "$ref": "http://asyncapi.com/bindings/googlepubsub/0.1.0/message.json" } ] } } }, - "http://asyncapi.com/bindings/websockets/0.1.0/channel.json": { - "$id": "http://asyncapi.com/bindings/websockets/0.1.0/channel.json", - "title": "WebSockets channel bindings object", - "description": "When using WebSockets, the channel represents the connection. Unlike other protocols that support multiple virtual channels (topics, routing keys, etc.) per connection, WebSockets doesn't support virtual channels or, put it another way, there's only one channel and its characteristics are strongly related to the protocol used for the handshake, i.e., HTTP.", + "http://asyncapi.com/bindings/http/0.1.0/message.json": { + "$id": "http://asyncapi.com/bindings/http/0.1.0/message.json", + "title": "HTTP message bindings object", + "description": "This object contains information about the message representation in HTTP.", "type": "object", "additionalProperties": false, "patternProperties": { @@ -1925,41 +1928,39 @@ } }, "properties": { - "method": { - "type": "string", - "enum": [ - "GET", - "POST" - ], - "description": "The HTTP method to use when establishing the connection. Its value MUST be either 'GET' or 'POST'." - }, - "query": { - "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json", - "description": "A Schema object containing the definitions for each query parameter. This schema MUST be of type 'object' and have a 'properties' key." - }, "headers": { "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json", - "description": "A Schema object containing the definitions of the HTTP headers to use when establishing the connection. This schema MUST be of type 'object' and have a 'properties' key." + "description": "\tA Schema object containing the definitions for HTTP-specific headers. This schema MUST be of type 'object' and have a 'properties' key." }, "bindingVersion": { "type": "string", "enum": [ "0.1.0" ], - "description": "The version of this binding. If omitted, 'latest' MUST be assumed." + "description": "The version of this binding. If omitted, \"latest\" MUST be assumed." } }, "examples": [ { - "method": "POST", + "headers": { + "type": "object", + "properties": { + "Content-Type": { + "type": "string", + "enum": [ + "application/json" + ] + } + } + }, "bindingVersion": "0.1.0" } ] }, - "http://asyncapi.com/bindings/amqp/0.2.0/channel.json": { - "$id": "http://asyncapi.com/bindings/amqp/0.2.0/channel.json", - "title": "AMQP channel bindings object", - "description": "This object contains information about the channel representation in AMQP.", + "http://asyncapi.com/bindings/mqtt/0.1.0/message.json": { + "$id": "http://asyncapi.com/bindings/mqtt/0.1.0/message.json", + "title": "MQTT message bindings object", + "description": "This object contains information about the message representation in MQTT.", "type": "object", "additionalProperties": false, "patternProperties": { @@ -1968,146 +1969,64 @@ } }, "properties": { - "is": { - "type": "string", - "enum": [ - "queue", - "routingKey" - ], - "description": "Defines what type of channel is it. Can be either 'queue' or 'routingKey' (default)." - }, - "exchange": { - "type": "object", - "properties": { - "name": { - "type": "string", - "maxLength": 255, - "description": "The name of the exchange. It MUST NOT exceed 255 characters long." - }, - "type": { - "type": "string", - "enum": [ - "topic", - "direct", - "fanout", - "default", - "headers" - ], - "description": "The type of the exchange. Can be either 'topic', 'direct', 'fanout', 'default' or 'headers'." - }, - "durable": { - "type": "boolean", - "description": "Whether the exchange should survive broker restarts or not." - }, - "autoDelete": { - "type": "boolean", - "description": "Whether the exchange should be deleted when the last queue is unbound from it." - }, - "vhost": { - "type": "string", - "default": "/", - "description": "The virtual host of the exchange. Defaults to '/'." - } - }, - "description": "When is=routingKey, this object defines the exchange properties." - }, - "queue": { - "type": "object", - "properties": { - "name": { - "type": "string", - "maxLength": 255, - "description": "The name of the queue. It MUST NOT exceed 255 characters long." - }, - "durable": { - "type": "boolean", - "description": "Whether the queue should survive broker restarts or not." - }, - "exclusive": { - "type": "boolean", - "description": "Whether the queue should be used only by one connection or not." - }, - "autoDelete": { - "type": "boolean", - "description": "Whether the queue should be deleted when the last consumer unsubscribes." - }, - "vhost": { - "type": "string", - "default": "/", - "description": "The virtual host of the queue. Defaults to '/'." - } - }, - "description": "When is=queue, this object defines the queue properties." - }, "bindingVersion": { "type": "string", "enum": [ - "0.2.0" + "0.1.0" ], "description": "The version of this binding. If omitted, 'latest' MUST be assumed." } }, - "oneOf": [ + "examples": [ { - "properties": { - "is": { - "const": "routingKey" - } - }, - "required": [ - "exchange" - ], - "not": { - "required": [ - "queue" - ] - } + "bindingVersion": "0.1.0" + } + ] + }, + "http://asyncapi.com/bindings/kafka/0.1.0/message.json": { + "$id": "http://asyncapi.com/bindings/kafka/0.1.0/message.json", + "title": "Kafka message bindings object", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "properties": { + "key": { + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json", + "description": "The message key." }, - { - "properties": { - "is": { - "const": "queue" - } - }, - "required": [ - "queue" + "bindingVersion": { + "type": "string", + "enum": [ + "0.1.0" ], - "not": { - "required": [ - "exchange" - ] - } + "description": "The version of this binding. If omitted, 'latest' MUST be assumed." } - ], + }, "examples": [ { - "is": "routingKey", - "exchange": { - "name": "myExchange", - "type": "topic", - "durable": true, - "autoDelete": false, - "vhost": "/" + "key": { + "type": "string", + "enum": [ + "myKey" + ] }, - "bindingVersion": "0.2.0" + "bindingVersion": "0.1.0" }, { - "is": "queue", - "queue": { - "name": "my-queue-name", - "durable": true, - "exclusive": true, - "autoDelete": false, - "vhost": "/" + "key": { + "$ref": "path/to/user-create.avsc#/UserCreate" }, "bindingVersion": "0.2.0" } ] }, - "http://asyncapi.com/bindings/kafka/0.3.0/channel.json": { - "$id": "http://asyncapi.com/bindings/kafka/0.3.0/channel.json", - "title": "Channel Schema", - "description": "This object contains information about the channel representation in Kafka.", + "http://asyncapi.com/bindings/kafka/0.3.0/message.json": { + "$id": "http://asyncapi.com/bindings/kafka/0.3.0/message.json", + "title": "Message Schema", "type": "object", "additionalProperties": false, "patternProperties": { @@ -2116,19 +2035,25 @@ } }, "properties": { - "topic": { + "key": { + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json", + "description": "The message key." + }, + "schemaIdLocation": { "type": "string", - "description": "Kafka topic name if different from channel name." + "description": "If a Schema Registry is used when performing this operation, tells where the id of schema is stored.", + "enum": [ + "header", + "payload" + ] }, - "partitions": { - "type": "integer", - "minimum": 1, - "description": "Number of partitions configured on this topic." + "schemaIdPayloadEncoding": { + "type": "string", + "description": "Number of bytes or vendor specific values when schema id is encoded in payload." }, - "replicas": { - "type": "integer", - "minimum": 1, - "description": "Number of replicas configured on this topic." + "schemaLookupStrategy": { + "type": "string", + "description": "Freeform string for any naming strategy class to use. Clients should default to the vendor default if not supplied." }, "bindingVersion": { "type": "string", @@ -2140,17 +2065,31 @@ }, "examples": [ { - "topic": "my-specific-topic", - "partitions": 20, - "replicas": 3, + "key": { + "type": "string", + "enum": [ + "myKey" + ] + }, + "schemaIdLocation": "payload", + "schemaIdPayloadEncoding": "apicurio-new", + "schemaLookupStrategy": "TopicIdStrategy", + "bindingVersion": "0.3.0" + }, + { + "key": { + "$ref": "path/to/user-create.avsc#/UserCreate" + }, + "schemaIdLocation": "payload", + "schemaIdPayloadEncoding": "4", "bindingVersion": "0.3.0" } ] }, - "http://asyncapi.com/bindings/anypointmq/0.0.1/channel.json": { - "$id": "http://asyncapi.com/bindings/anypointmq/0.0.1/channel.json", - "title": "Anypoint MQ channel bindings object", - "description": "This object contains configuration for describing an Anypoint MQ exchange, queue, or FIFO queue as an AsyncAPI channel. This objects only contains configuration that can not be provided in the AsyncAPI standard channel object.", + "http://asyncapi.com/bindings/anypointmq/0.0.1/message.json": { + "$id": "http://asyncapi.com/bindings/anypointmq/0.0.1/message.json", + "title": "Anypoint MQ message bindings object", + "description": "This object contains configuration for describing an Anypoint MQ message as an AsyncAPI message. This objects only contains configuration that can not be provided in the AsyncAPI standard message object.", "type": "object", "additionalProperties": false, "patternProperties": { @@ -2159,19 +2098,9 @@ } }, "properties": { - "destination": { - "type": "string", - "description": "The destination (queue or exchange) name for this channel. SHOULD only be specified if the channel name differs from the actual destination name, such as when the channel name is not a valid destination name in Anypoint MQ. Defaults to the channel name." - }, - "destinationType": { - "type": "string", - "enum": [ - "exchange", - "queue", - "fifo-queue" - ], - "default": "queue", - "description": "The type of destination. SHOULD be specified to document the messaging model (publish/subscribe, point-to-point, strict message ordering) supported by this channel." + "headers": { + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json", + "description": "A Schema object containing the definitions for Anypoint MQ-specific headers (protocol headers). This schema MUST be of type 'object' and have a 'properties' key. Examples of Anypoint MQ protocol headers are 'messageId' and 'messageGroupId'." }, "bindingVersion": { "type": "string", @@ -2183,16 +2112,22 @@ }, "examples": [ { - "destination": "user-signup-exchg", - "destinationType": "exchange", + "headers": { + "type": "object", + "properties": { + "messageId": { + "type": "string" + } + } + }, "bindingVersion": "0.0.1" } ] }, - "http://asyncapi.com/bindings/ibmmq/0.1.0/channel.json": { - "$id": "http://asyncapi.com/bindings/ibmmq/0.1.0/channel.json", - "title": "IBM MQ channel bindings object", - "description": "This object contains information about the channel representation in IBM MQ. Each channel corresponds to a Queue or Topic within IBM MQ.", + "http://asyncapi.com/bindings/ibmmq/0.1.0/message.json": { + "$id": "http://asyncapi.com/bindings/ibmmq/0.1.0/message.json", + "title": "IBM MQ message bindings object", + "description": "This object contains information about the message representation in IBM MQ.", "type": "object", "additionalProperties": false, "patternProperties": { @@ -2201,70 +2136,29 @@ } }, "properties": { - "destinationType": { + "type": { "type": "string", "enum": [ - "topic", - "queue" + "string", + "jms", + "binary" ], - "default": "topic", - "description": "Defines the type of AsyncAPI channel." + "default": "string", + "description": "The type of the message." }, - "queue": { - "type": "object", - "description": "Defines the properties of a queue.", - "properties": { - "objectName": { - "type": "string", - "maxLength": 48, - "description": "Defines the name of the IBM MQ queue associated with the channel." - }, - "isPartitioned": { - "type": "boolean", - "default": false, - "description": "Defines if the queue is a cluster queue and therefore partitioned. If 'true', a binding option MAY be specified when accessing the queue. More information on binding options can be found on this page in the IBM MQ Knowledge Center." - }, - "exclusive": { - "type": "boolean", - "default": false, - "description": "Specifies if it is recommended to open the queue exclusively." - } - }, - "required": [ - "objectName" - ] + "headers": { + "type": "string", + "description": "Defines the IBM MQ message headers to include with this message. More than one header can be specified as a comma separated list. Supporting information on IBM MQ message formats can be found on this [page](https://www.ibm.com/docs/en/ibm-mq/9.2?topic=mqmd-format-mqchar8) in the IBM MQ Knowledge Center." }, - "topic": { - "type": "object", - "description": "Defines the properties of a topic.", - "properties": { - "string": { - "type": "string", - "maxLength": 10240, - "description": "The value of the IBM MQ topic string to be used." - }, - "objectName": { - "type": "string", - "maxLength": 48, - "description": "The name of the IBM MQ topic object." - }, - "durablePermitted": { - "type": "boolean", - "default": true, - "description": "Defines if the subscription may be durable." - }, - "lastMsgRetained": { - "type": "boolean", - "default": false, - "description": "Defines if the last message published will be made available to new subscriptions." - } - } + "description": { + "type": "string", + "description": "Provides additional information for application developers: describes the message type or format." }, - "maxMsgLength": { + "expiry": { "type": "integer", "minimum": 0, - "maximum": 104857600, - "description": "The maximum length of the physical message (in bytes) accepted by the Topic or Queue. Messages produced that are greater in size than this value may fail to be delivered. More information on the maximum message length can be found on this [page](https://www.ibm.com/support/knowledgecenter/SSFKSJ_latest/com.ibm.mq.ref.dev.doc/q097520_.html) in the IBM MQ Knowledge Center." + "default": 0, + "description": "The recommended setting the client should use for the TTL (Time-To-Live) of the message. This is a period of time expressed in milliseconds and set by the application that puts the message. 'expiry' values are API dependant e.g., MQI and JMS use different units of time and default values for 'unlimited'. General information on IBM MQ message expiry can be found on this [page](https://www.ibm.com/docs/en/ibm-mq/9.2?topic=mqmd-expiry-mqlong) in the IBM MQ Knowledge Center." }, "bindingVersion": { "type": "string", @@ -2277,141 +2171,52 @@ "oneOf": [ { "properties": { - "destinationType": { - "const": "topic" + "type": { + "const": "binary" } - }, - "not": { - "required": [ - "queue" - ] } }, { "properties": { - "destinationType": { - "const": "queue" + "type": { + "const": "jms" } }, - "required": [ - "queue" - ], "not": { "required": [ - "topic" + "headers" ] } - } - ], - "examples": [ - { - "destinationType": "topic", - "topic": { - "objectName": "myTopicName" - }, - "bindingVersion": "0.1.0" }, { - "destinationType": "queue", - "queue": { - "objectName": "myQueueName", - "exclusive": true - }, - "bindingVersion": "0.1.0" - } - ] - }, - "http://asyncapi.com/bindings/googlepubsub/0.1.0/channel.json": { - "$id": "http://asyncapi.com/bindings/googlepubsub/0.1.0/channel.json", - "title": "Cloud Pub/Sub Channel Schema", - "description": "This object contains information about the channel representation for Google Cloud Pub/Sub.", - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" - } - }, - "properties": { - "bindingVersion": { - "type": "string", - "enum": [ - "0.1.0" - ], - "description": "The version of this binding." - }, - "labels": { - "type": "object" - }, - "messageRetentionDuration": { - "type": "string" - }, - "messageStoragePolicy": { - "type": "object", - "additionalProperties": false, - "properties": { - "allowedPersistenceRegions": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "schemaSettings": { - "type": "object", - "additionalItems": false, "properties": { - "encoding": { - "type": "string" - }, - "firstRevisionId": { - "type": "string" - }, - "lastRevisionId": { - "type": "string" - }, - "name": { - "type": "string" + "type": { + "const": "string" } }, - "required": [ - "encoding", - "name" - ] - }, - "topic": { - "type": "string" - } - }, - "required": [ - "schemaSettings", - "topic" - ], - "examples": [ - { - "labels": { - "label1": "value1", - "label2": "value2" - }, - "messageRetentionDuration": "86400s", - "messageStoragePolicy": { - "allowedPersistenceRegions": [ - "us-central1", - "us-east1" + "not": { + "required": [ + "headers" ] - }, - "schemaSettings": { - "encoding": "json", - "name": "projects/your-project-id/schemas/your-schema" } } + ], + "examples": [ + { + "type": "string", + "bindingVersion": "0.1.0" + }, + { + "type": "jms", + "description": "JMS stream message", + "bindingVersion": "0.1.0" + } ] }, - "http://asyncapi.com/bindings/pulsar/0.1.0/channel.json": { - "$id": "http://asyncapi.com/bindings/pulsar/0.1.0/channel.json", - "title": "Channel Schema", - "description": "This object contains information about the channel representation in Pulsar, which covers namespace and topic level admin configuration. This object contains additional information not possible to represent within the core AsyncAPI specification.", + "http://asyncapi.com/bindings/googlepubsub/0.1.0/message.json": { + "$id": "http://asyncapi.com/bindings/googlepubsub/0.1.0/message.json", + "title": "Cloud Pub/Sub Channel Schema", + "description": "This object contains information about the message representation for Google Cloud Pub/Sub.", "type": "object", "additionalProperties": false, "patternProperties": { @@ -2419,102 +2224,54 @@ "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" } }, - "required": [ - "namespace", - "persistence" - ], "properties": { - "namespace": { - "type": "string", - "description": "The namespace, the channel is associated with." - }, - "persistence": { + "bindingVersion": { "type": "string", "enum": [ - "persistent", - "non-persistent" + "0.1.0" ], - "description": "persistence of the topic in Pulsar." + "description": "The version of this binding." }, - "compaction": { - "type": "integer", - "minimum": 0, - "description": "Topic compaction threshold given in MB" + "attributes": { + "type": "object" }, - "geo-replication": { - "type": "array", - "description": "A list of clusters the topic is replicated to.", - "items": { - "type": "string" - } + "orderingKey": { + "type": "string" }, - "retention": { + "schema": { "type": "object", - "additionalProperties": false, + "additionalItems": false, "properties": { - "time": { - "type": "integer", - "minimum": 0, - "description": "Time given in Minutes. `0` = Disable message retention." + "name": { + "type": "string" }, - "size": { - "type": "integer", - "minimum": 0, - "description": "Size given in MegaBytes. `0` = Disable message retention." + "type": { + "type": "string" } - } - }, - "ttl": { - "type": "integer", - "description": "TTL in seconds for the specified topic" - }, - "deduplication": { - "type": "boolean", - "description": "Whether deduplication of events is enabled or not." - }, - "bindingVersion": { - "type": "string", - "enum": [ - "0.1.0" - ], - "description": "The version of this binding. If omitted, 'latest' MUST be assumed." + }, + "required": [ + "name", + "type" + ] } }, "examples": [ { - "namespace": "ns1", - "persistence": "persistent", - "compaction": 1000, - "retention": { - "time": 15, - "size": 1000 - }, - "ttl": 360, - "geo-replication": [ - "us-west", - "us-east" - ], - "deduplication": true, - "bindingVersion": "0.1.0" + "schema": { + "name": "projects/your-project-id/schemas/your-avro-schema-id", + "type": "avro" + } + }, + { + "schema": { + "name": "projects/your-project-id/schemas/your-protobuf-schema-id", + "type": "protobuf" + } } ] }, - "http://asyncapi.com/definitions/3.0.0/operations.json": { - "$id": "http://asyncapi.com/definitions/3.0.0/operations.json", - "type": "object", - "additionalProperties": { - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" - }, - { - "$ref": "http://asyncapi.com/definitions/3.0.0/operation.json" - } - ] - } - }, - "http://asyncapi.com/definitions/3.0.0/operation.json": { - "$id": "http://asyncapi.com/definitions/3.0.0/operation.json", + "http://asyncapi.com/definitions/3.0.0/messageTrait.json": { + "$id": "http://asyncapi.com/definitions/3.0.0/messageTrait.json", "type": "object", "additionalProperties": false, "patternProperties": { @@ -2522,128 +2279,109 @@ "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" } }, - "required": [ - "action", - "channel" - ], "properties": { - "action": { - "type": "string", - "description": "Allowed values are send and receive. Use send when it's expected that the application will send a message to the given channel, and receive when the application should expect receiving messages from the given channel.", - "enum": [ - "send", - "receive" + "schemaFormat": { + "type": "string" + }, + "contentType": { + "type": "string" + }, + "headers": { + "allOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" + }, + { + "properties": { + "type": { + "const": "object" + } + } + } ] }, - "channel": { - "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + "messageId": { + "type": "string" }, - "traits": { + "correlationId": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/correlationId.json" + } + ] + }, + "tags": { "type": "array", "items": { - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" - }, - { - "$ref": "http://asyncapi.com/definitions/3.0.0/operationTrait.json" - }, - { - "type": "array", - "items": [ - { - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" - }, - { - "$ref": "http://asyncapi.com/definitions/3.0.0/operationTrait.json" - } - ] - }, - { - "type": "object", - "additionalItems": true - } - ] - } - ] - } + "$ref": "http://asyncapi.com/definitions/3.0.0/tag.json" + }, + "uniqueItems": true }, - "title": { + "summary": { "type": "string", - "description": "A human-friendly title for the operation." + "description": "A brief summary of the message." }, - "summary": { + "name": { "type": "string", - "description": "A brief summary of the operation." + "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 operation. CommonMark is allowed." + "description": "A longer description of the message. CommonMark is allowed." }, - "security": { - "type": "array", - "items": { - "$ref": "http://asyncapi.com/definitions/3.0.0/SecurityRequirement.json" - } + "externalDocs": { + "$ref": "http://asyncapi.com/definitions/3.0.0/externalDocs.json" }, - "tags": { + "deprecated": { + "type": "boolean", + "default": false + }, + "examples": { "type": "array", "items": { - "$ref": "http://asyncapi.com/definitions/3.0.0/tag.json" - }, - "uniqueItems": true - }, - "externalDocs": { - "$ref": "http://asyncapi.com/definitions/3.0.0/externalDocs.json" + "type": "object" + } }, "bindings": { - "$ref": "http://asyncapi.com/definitions/3.0.0/operationBindingsObject.json" + "$ref": "http://asyncapi.com/definitions/3.0.0/messageBindingsObject.json" } } }, - "http://asyncapi.com/definitions/3.0.0/operationTrait.json": { - "$id": "http://asyncapi.com/definitions/3.0.0/operationTrait.json", - "type": "object", + "http://asyncapi.com/definitions/3.0.0/parameter.json": { + "$id": "http://asyncapi.com/definitions/3.0.0/parameter.json", "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" } }, - "properties": { - "action": { - "$ref": "http://asyncapi.com/definitions/3.0.0/operation.json#/properties/action" - }, - "channel": { - "$ref": "http://asyncapi.com/definitions/3.0.0/operation.json#/properties/channel" - }, - "title": { - "$ref": "http://asyncapi.com/definitions/3.0.0/operation.json#/properties/title" - }, - "summary": { - "$ref": "http://asyncapi.com/definitions/3.0.0/operation.json#/properties/summary" - }, + "properties": { "description": { - "$ref": "http://asyncapi.com/definitions/3.0.0/operation.json#/properties/description" - }, - "security": { - "$ref": "http://asyncapi.com/definitions/3.0.0/operation.json#/properties/security" + "type": "string", + "description": "A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed." }, - "tags": { - "$ref": "http://asyncapi.com/definitions/3.0.0/operation.json#/properties/tags" + "schema": { + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" }, - "externalDocs": { - "$ref": "http://asyncapi.com/definitions/3.0.0/operation.json#/properties/externalDocs" + "location": { + "type": "string", + "description": "A runtime expression that specifies the location of the parameter value", + "pattern": "^\\$message\\.(header|payload)#(\\/(([^\\/~])|(~[01]))*)*" }, - "bindings": { - "$ref": "http://asyncapi.com/definitions/3.0.0/operation.json#/properties/bindings" + "$ref": { + "$ref": "http://asyncapi.com/definitions/3.0.0/ReferenceObject.json" } } }, - "http://asyncapi.com/definitions/3.0.0/operationBindingsObject.json": { - "$id": "http://asyncapi.com/definitions/3.0.0/operationBindingsObject.json", + "http://asyncapi.com/definitions/3.0.0/channelBindingsObject.json": { + "$id": "http://asyncapi.com/definitions/3.0.0/channelBindingsObject.json", "type": "object", "additionalProperties": false, "patternProperties": { @@ -2653,69 +2391,85 @@ }, "properties": { "http": {}, - "ws": {}, + "ws": { + "oneOf": [ + { + "description": "Latest binding", + "$ref": "http://asyncapi.com/bindings/websockets/0.1.0/channel.json" + } + ] + }, "amqp": { "oneOf": [ { "description": "Latest binding", - "$ref": "http://asyncapi.com/bindings/amqp/0.2.0/operation.json" + "$ref": "http://asyncapi.com/bindings/amqp/0.2.0/channel.json" } ] }, - "amqp1": {}, - "mqtt": { + "amqp1": { "oneOf": [ { "description": "Latest binding", - "$ref": "http://asyncapi.com/bindings/mqtt/0.1.0/operation.json" + "$ref": "http://asyncapi.com/bindings/amqp/0.2.0/channel.json" } ] }, + "mqtt": {}, "mqtt5": {}, "kafka": { "oneOf": [ - { - "$ref": "http://asyncapi.com/bindings/kafka/0.1.0/operation.json" - }, { "description": "Latest binding", - "$ref": "http://asyncapi.com/bindings/kafka/0.3.0/operation.json" + "$ref": "http://asyncapi.com/bindings/kafka/0.3.0/channel.json" } ] }, - "anypointmq": {}, - "nats": { + "anypointmq": { "oneOf": [ { "description": "Latest binding", - "$ref": "http://asyncapi.com/bindings/nats/0.1.0/operation.json" + "$ref": "http://asyncapi.com/bindings/anypointmq/0.0.1/channel.json" } ] }, + "nats": {}, "jms": {}, "sns": {}, "sqs": {}, "stomp": {}, "redis": {}, - "ibmmq": {}, - "solace": { + "ibmmq": { "oneOf": [ { - "$ref": "http://asyncapi.com/bindings/solace/0.2.0/operation.json" - }, + "description": "Latest binding", + "$ref": "http://asyncapi.com/bindings/ibmmq/0.1.0/channel.json" + } + ] + }, + "solace": {}, + "googlepubsub": { + "oneOf": [ { "description": "Latest binding", - "$ref": "http://asyncapi.com/bindings/solace/0.3.0/operation.json" + "$ref": "http://asyncapi.com/bindings/googlepubsub/0.1.0/channel.json" } ] }, - "googlepubsub": {} + "pulsar": { + "oneOf": [ + { + "description": "Latest binding", + "$ref": "http://asyncapi.com/bindings/pulsar/0.1.0/channel.json" + } + ] + } } }, - "http://asyncapi.com/bindings/amqp/0.2.0/operation.json": { - "$id": "http://asyncapi.com/bindings/amqp/0.2.0/operation.json", - "title": "AMQP operation bindings object", - "description": "This object contains information about the operation representation in AMQP.", + "http://asyncapi.com/bindings/websockets/0.1.0/channel.json": { + "$id": "http://asyncapi.com/bindings/websockets/0.1.0/channel.json", + "title": "WebSockets channel bindings object", + "description": "When using WebSockets, the channel represents the connection. Unlike other protocols that support multiple virtual channels (topics, routing keys, etc.) per connection, WebSockets doesn't support virtual channels or, put it another way, there's only one channel and its characteristics are strongly related to the protocol used for the handshake, i.e., HTTP.", "type": "object", "additionalProperties": false, "patternProperties": { @@ -2724,89 +2478,189 @@ } }, "properties": { - "expiration": { - "type": "integer", - "minimum": 0, - "description": "TTL (Time-To-Live) for the message. It MUST be greater than or equal to zero." - }, - "userId": { + "method": { "type": "string", - "description": "Identifies the user who has sent the message." - }, - "cc": { - "type": "array", - "items": { - "type": "string" - }, - "description": "The routing keys the message should be routed to at the time of publishing." - }, - "priority": { - "type": "integer", - "description": "A priority for the message." - }, - "deliveryMode": { - "type": "integer", "enum": [ - 1, - 2 + "GET", + "POST" ], - "description": "Delivery mode of the message. Its value MUST be either 1 (transient) or 2 (persistent)." + "description": "The HTTP method to use when establishing the connection. Its value MUST be either 'GET' or 'POST'." }, - "mandatory": { - "type": "boolean", - "description": "Whether the message is mandatory or not." + "query": { + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json", + "description": "A Schema object containing the definitions for each query parameter. This schema MUST be of type 'object' and have a 'properties' key." }, - "bcc": { - "type": "array", - "items": { - "type": "string" - }, - "description": "Like cc but consumers will not receive this information." + "headers": { + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json", + "description": "A Schema object containing the definitions of the HTTP headers to use when establishing the connection. This schema MUST be of type 'object' and have a 'properties' key." }, - "replyTo": { + "bindingVersion": { "type": "string", - "description": "Name of the queue where the consumer should send the response." + "enum": [ + "0.1.0" + ], + "description": "The version of this binding. If omitted, 'latest' MUST be assumed." + } + }, + "examples": [ + { + "method": "POST", + "bindingVersion": "0.1.0" + } + ] + }, + "http://asyncapi.com/bindings/amqp/0.2.0/channel.json": { + "$id": "http://asyncapi.com/bindings/amqp/0.2.0/channel.json", + "title": "AMQP channel bindings object", + "description": "This object contains information about the channel representation in AMQP.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "properties": { + "is": { + "type": "string", + "enum": [ + "queue", + "routingKey" + ], + "description": "Defines what type of channel is it. Can be either 'queue' or 'routingKey' (default)." }, - "timestamp": { - "type": "boolean", - "description": "Whether the message should include a timestamp or not." + "exchange": { + "type": "object", + "properties": { + "name": { + "type": "string", + "maxLength": 255, + "description": "The name of the exchange. It MUST NOT exceed 255 characters long." + }, + "type": { + "type": "string", + "enum": [ + "topic", + "direct", + "fanout", + "default", + "headers" + ], + "description": "The type of the exchange. Can be either 'topic', 'direct', 'fanout', 'default' or 'headers'." + }, + "durable": { + "type": "boolean", + "description": "Whether the exchange should survive broker restarts or not." + }, + "autoDelete": { + "type": "boolean", + "description": "Whether the exchange should be deleted when the last queue is unbound from it." + }, + "vhost": { + "type": "string", + "default": "/", + "description": "The virtual host of the exchange. Defaults to '/'." + } + }, + "description": "When is=routingKey, this object defines the exchange properties." }, - "ack": { - "type": "boolean", - "description": "Whether the consumer should ack the message or not." + "queue": { + "type": "object", + "properties": { + "name": { + "type": "string", + "maxLength": 255, + "description": "The name of the queue. It MUST NOT exceed 255 characters long." + }, + "durable": { + "type": "boolean", + "description": "Whether the queue should survive broker restarts or not." + }, + "exclusive": { + "type": "boolean", + "description": "Whether the queue should be used only by one connection or not." + }, + "autoDelete": { + "type": "boolean", + "description": "Whether the queue should be deleted when the last consumer unsubscribes." + }, + "vhost": { + "type": "string", + "default": "/", + "description": "The virtual host of the queue. Defaults to '/'." + } + }, + "description": "When is=queue, this object defines the queue properties." }, "bindingVersion": { "type": "string", "enum": [ "0.2.0" ], - "description": "The version of this binding. If omitted, \"latest\" MUST be assumed." + "description": "The version of this binding. If omitted, 'latest' MUST be assumed." + } + }, + "oneOf": [ + { + "properties": { + "is": { + "const": "routingKey" + } + }, + "required": [ + "exchange" + ], + "not": { + "required": [ + "queue" + ] + } + }, + { + "properties": { + "is": { + "const": "queue" + } + }, + "required": [ + "queue" + ], + "not": { + "required": [ + "exchange" + ] + } } - }, + ], "examples": [ { - "expiration": 100000, - "userId": "guest", - "cc": [ - "user.logs" - ], - "priority": 10, - "deliveryMode": 2, - "mandatory": false, - "bcc": [ - "external.audit" - ], - "replyTo": "user.signedup", - "timestamp": true, - "ack": false, + "is": "routingKey", + "exchange": { + "name": "myExchange", + "type": "topic", + "durable": true, + "autoDelete": false, + "vhost": "/" + }, + "bindingVersion": "0.2.0" + }, + { + "is": "queue", + "queue": { + "name": "my-queue-name", + "durable": true, + "exclusive": true, + "autoDelete": false, + "vhost": "/" + }, "bindingVersion": "0.2.0" } ] }, - "http://asyncapi.com/bindings/mqtt/0.1.0/operation.json": { - "$id": "http://asyncapi.com/bindings/mqtt/0.1.0/operation.json", - "title": "MQTT operation bindings object", - "description": "This object contains information about the operation representation in MQTT.", + "http://asyncapi.com/bindings/kafka/0.3.0/channel.json": { + "$id": "http://asyncapi.com/bindings/kafka/0.3.0/channel.json", + "title": "Channel Schema", + "description": "This object contains information about the channel representation in Kafka.", "type": "object", "additionalProperties": false, "patternProperties": { @@ -2815,34 +2669,41 @@ } }, "properties": { - "qos": { + "topic": { + "type": "string", + "description": "Kafka topic name if different from channel name." + }, + "partitions": { "type": "integer", - "description": "Defines the Quality of Service (QoS) levels for the message flow between client and server. Its value MUST be either 0 (At most once delivery), 1 (At least once delivery), or 2 (Exactly once delivery)." + "minimum": 1, + "description": "Number of partitions configured on this topic." }, - "retain": { - "type": "boolean", - "description": "Whether the broker should retain the message or not." + "replicas": { + "type": "integer", + "minimum": 1, + "description": "Number of replicas configured on this topic." }, "bindingVersion": { "type": "string", "enum": [ - "0.1.0" + "0.3.0" ], "description": "The version of this binding. If omitted, 'latest' MUST be assumed." } }, "examples": [ { - "qos": 2, - "retain": true, - "bindingVersion": "0.1.0" + "topic": "my-specific-topic", + "partitions": 20, + "replicas": 3, + "bindingVersion": "0.3.0" } ] }, - "http://asyncapi.com/bindings/kafka/0.1.0/operation.json": { - "$id": "http://asyncapi.com/bindings/kafka/0.1.0/operation.json", - "title": "Kafka operation message bindings object", - "description": "This object contains information about the operation representation in Kafka.", + "http://asyncapi.com/bindings/anypointmq/0.0.1/channel.json": { + "$id": "http://asyncapi.com/bindings/anypointmq/0.0.1/channel.json", + "title": "Anypoint MQ channel bindings object", + "description": "This object contains configuration for describing an Anypoint MQ exchange, queue, or FIFO queue as an AsyncAPI channel. This objects only contains configuration that can not be provided in the AsyncAPI standard channel object.", "type": "object", "additionalProperties": false, "patternProperties": { @@ -2851,44 +2712,40 @@ } }, "properties": { - "groupId": { - "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json", - "description": "Id of the consumer group." + "destination": { + "type": "string", + "description": "The destination (queue or exchange) name for this channel. SHOULD only be specified if the channel name differs from the actual destination name, such as when the channel name is not a valid destination name in Anypoint MQ. Defaults to the channel name." }, - "clientId": { - "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json", - "description": "Id of the consumer inside a consumer group." + "destinationType": { + "type": "string", + "enum": [ + "exchange", + "queue", + "fifo-queue" + ], + "default": "queue", + "description": "The type of destination. SHOULD be specified to document the messaging model (publish/subscribe, point-to-point, strict message ordering) supported by this channel." }, "bindingVersion": { "type": "string", "enum": [ - "0.1.0" + "0.0.1" ], "description": "The version of this binding. If omitted, 'latest' MUST be assumed." } }, "examples": [ { - "groupId": { - "type": "string", - "enum": [ - "myGroupId" - ] - }, - "clientId": { - "type": "string", - "enum": [ - "myClientId" - ] - }, - "bindingVersion": "0.1.0" + "destination": "user-signup-exchg", + "destinationType": "exchange", + "bindingVersion": "0.0.1" } ] }, - "http://asyncapi.com/bindings/kafka/0.3.0/operation.json": { - "$id": "http://asyncapi.com/bindings/kafka/0.3.0/operation.json", - "title": "Operation Schema", - "description": "This object contains information about the operation representation in Kafka.", + "http://asyncapi.com/bindings/ibmmq/0.1.0/channel.json": { + "$id": "http://asyncapi.com/bindings/ibmmq/0.1.0/channel.json", + "title": "IBM MQ channel bindings object", + "description": "This object contains information about the channel representation in IBM MQ. Each channel corresponds to a Queue or Topic within IBM MQ.", "type": "object", "additionalProperties": false, "patternProperties": { @@ -2897,44 +2754,130 @@ } }, "properties": { - "groupId": { - "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json", - "description": "Id of the consumer group." + "destinationType": { + "type": "string", + "enum": [ + "topic", + "queue" + ], + "default": "topic", + "description": "Defines the type of AsyncAPI channel." }, - "clientId": { - "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json", - "description": "Id of the consumer inside a consumer group." + "queue": { + "type": "object", + "description": "Defines the properties of a queue.", + "properties": { + "objectName": { + "type": "string", + "maxLength": 48, + "description": "Defines the name of the IBM MQ queue associated with the channel." + }, + "isPartitioned": { + "type": "boolean", + "default": false, + "description": "Defines if the queue is a cluster queue and therefore partitioned. If 'true', a binding option MAY be specified when accessing the queue. More information on binding options can be found on this page in the IBM MQ Knowledge Center." + }, + "exclusive": { + "type": "boolean", + "default": false, + "description": "Specifies if it is recommended to open the queue exclusively." + } + }, + "required": [ + "objectName" + ] + }, + "topic": { + "type": "object", + "description": "Defines the properties of a topic.", + "properties": { + "string": { + "type": "string", + "maxLength": 10240, + "description": "The value of the IBM MQ topic string to be used." + }, + "objectName": { + "type": "string", + "maxLength": 48, + "description": "The name of the IBM MQ topic object." + }, + "durablePermitted": { + "type": "boolean", + "default": true, + "description": "Defines if the subscription may be durable." + }, + "lastMsgRetained": { + "type": "boolean", + "default": false, + "description": "Defines if the last message published will be made available to new subscriptions." + } + } + }, + "maxMsgLength": { + "type": "integer", + "minimum": 0, + "maximum": 104857600, + "description": "The maximum length of the physical message (in bytes) accepted by the Topic or Queue. Messages produced that are greater in size than this value may fail to be delivered. More information on the maximum message length can be found on this [page](https://www.ibm.com/support/knowledgecenter/SSFKSJ_latest/com.ibm.mq.ref.dev.doc/q097520_.html) in the IBM MQ Knowledge Center." }, "bindingVersion": { "type": "string", "enum": [ - "0.3.0" + "0.1.0" ], - "description": "The version of this binding. If omitted, 'latest' MUST be assumed." + "description": "The version of this binding." } }, - "examples": [ + "oneOf": [ { - "groupId": { - "type": "string", - "enum": [ - "myGroupId" + "properties": { + "destinationType": { + "const": "topic" + } + }, + "not": { + "required": [ + "queue" ] + } + }, + { + "properties": { + "destinationType": { + "const": "queue" + } }, - "clientId": { - "type": "string", - "enum": [ - "myClientId" + "required": [ + "queue" + ], + "not": { + "required": [ + "topic" ] + } + } + ], + "examples": [ + { + "destinationType": "topic", + "topic": { + "objectName": "myTopicName" }, - "bindingVersion": "0.3.0" + "bindingVersion": "0.1.0" + }, + { + "destinationType": "queue", + "queue": { + "objectName": "myQueueName", + "exclusive": true + }, + "bindingVersion": "0.1.0" } - ] - }, - "http://asyncapi.com/bindings/nats/0.1.0/operation.json": { - "$id": "http://asyncapi.com/bindings/nats/0.1.0/operation.json", - "title": "NATS operation bindings object", - "description": "This object contains information about the operation representation in NATS.", + ] + }, + "http://asyncapi.com/bindings/googlepubsub/0.1.0/channel.json": { + "$id": "http://asyncapi.com/bindings/googlepubsub/0.1.0/channel.json", + "title": "Cloud Pub/Sub Channel Schema", + "description": "This object contains information about the channel representation for Google Cloud Pub/Sub.", "type": "object", "additionalProperties": false, "patternProperties": { @@ -2943,894 +2886,963 @@ } }, "properties": { - "queue": { - "type": "string", - "description": "Defines the name of the queue to use. It MUST NOT exceed 255 characters.", - "maxLength": 255 - }, "bindingVersion": { "type": "string", "enum": [ "0.1.0" ], - "description": "The version of this binding. If omitted, 'latest' MUST be assumed." - } - }, - "examples": [ - { - "queue": "MyCustomQueue", - "bindingVersion": "0.1.0" - } - ] - }, - "http://asyncapi.com/bindings/solace/0.2.0/operation.json": { - "$id": "http://asyncapi.com/bindings/solace/0.2.0/operation.json", - "title": "Solace operation bindings object", - "description": "This object contains information about the operation representation in Solace.", - "type": "object", - "additionalProperties": false, - "properties": { - "destinations": { - "description": "The list of Solace destinations referenced in the operation.", - "type": "array", - "items": { - "type": "object", - "properties": { - "deliveryMode": { - "type": "string", - "enum": [ - "direct", - "persistent" - ] - } - }, - "oneOf": [ - { - "properties": { - "destinationType": { - "type": "string", - "const": "queue", - "description": "If the type is queue, then the subscriber can bind to the queue. The queue subscribes to the given topicSubscriptions. If no topicSubscriptions are provied, the queue will subscribe to the topic as represented by the channel name." - }, - "queue": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "The name of the queue" - }, - "topicSubscriptions": { - "type": "array", - "description": "The list of topics that the queue subscribes to.", - "items": { - "type": "string" - } - }, - "accessType": { - "type": "string", - "enum": [ - "exclusive", - "nonexclusive" - ] - } - } - } - } - }, - { - "properties": { - "destinationType": { - "type": "string", - "const": "topic", - "description": "If the type is topic, then the subscriber subscribes to the given topicSubscriptions. If no topicSubscriptions are provided, the client will subscribe to the topic as represented by the channel name." - }, - "topicSubscriptions": { - "type": "array", - "description": "The list of topics that the client subscribes to.", - "items": { - "type": "string" - } - } - } - } - ] - } - } - }, - "bindingVersion": { - "type": "string", - "enum": [ - "0.2.0" - ], - "description": "The version of this binding. If omitted, \"latest\" MUST be assumed." - }, - "examples": [ - { - "bindingVersion": "0.2.0", - "destinations": [ - { - "destinationType": "queue", - "queue": { - "name": "sampleQueue", - "topicSubscriptions": [ - "samples/*" - ], - "accessType": "nonexclusive" + "description": "The version of this binding." + }, + "labels": { + "type": "object" + }, + "messageRetentionDuration": { + "type": "string" + }, + "messageStoragePolicy": { + "type": "object", + "additionalProperties": false, + "properties": { + "allowedPersistenceRegions": { + "type": "array", + "items": { + "type": "string" } - }, - { - "destinationType": "topic", - "topicSubscriptions": [ - "samples/*" - ] } - ] - } - ] - }, - "http://asyncapi.com/bindings/solace/0.3.0/operation.json": { - "$id": "http://asyncapi.com/bindings/solace/0.3.0/operation.json", - "title": "Solace operation bindings object", - "description": "This object contains information about the operation representation in Solace.", - "type": "object", - "additionalProperties": false, - "properties": { - "destinations": { - "description": "The list of Solace destinations referenced in the operation.", - "type": "array", - "items": { - "type": "object", - "properties": { - "deliveryMode": { - "type": "string", - "enum": [ - "direct", - "persistent" - ] - } - }, - "oneOf": [ - { - "properties": { - "destinationType": { - "type": "string", - "const": "queue", - "description": "If the type is queue, then the subscriber can bind to the queue. The queue subscribes to the given topicSubscriptions. If no topicSubscriptions are provied, the queue will subscribe to the topic as represented by the channel name." - }, - "queue": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "The name of the queue" - }, - "topicSubscriptions": { - "type": "array", - "description": "The list of topics that the queue subscribes to.", - "items": { - "type": "string" - } - }, - "accessType": { - "type": "string", - "enum": [ - "exclusive", - "nonexclusive" - ] - }, - "maxTtl": { - "type": "string", - "description": "The maximum TTL to apply to messages to be spooled." - }, - "maxMsgSpoolUsage": { - "type": "string", - "description": "The maximum amount of message spool that the given queue may use" - } - } - } - } - }, - { - "properties": { - "destinationType": { - "type": "string", - "const": "topic", - "description": "If the type is topic, then the subscriber subscribes to the given topicSubscriptions. If no topicSubscriptions are provided, the client will subscribe to the topic as represented by the channel name." - }, - "topicSubscriptions": { - "type": "array", - "description": "The list of topics that the client subscribes to.", - "items": { - "type": "string" - } - } - } - } - ] } - } - }, - "bindingVersion": { - "type": "string", - "enum": [ - "0.3.0" - ], - "description": "The version of this binding. If omitted, \"latest\" MUST be assumed." - }, - "examples": [ - { - "bindingVersion": "0.3.0", - "destinations": [ - { - "destinationType": "queue", - "queue": { - "name": "sampleQueue", - "topicSubscriptions": [ - "samples/*" - ], - "accessType": "nonexclusive" - } + }, + "schemaSettings": { + "type": "object", + "additionalItems": false, + "properties": { + "encoding": { + "type": "string" }, - { - "destinationType": "topic", - "topicSubscriptions": [ - "samples/*" - ] + "firstRevisionId": { + "type": "string" + }, + "lastRevisionId": { + "type": "string" + }, + "name": { + "type": "string" } + }, + "required": [ + "encoding", + "name" ] + }, + "topic": { + "type": "string" + } + }, + "required": [ + "schemaSettings", + "topic" + ], + "examples": [ + { + "labels": { + "label1": "value1", + "label2": "value2" + }, + "messageRetentionDuration": "86400s", + "messageStoragePolicy": { + "allowedPersistenceRegions": [ + "us-central1", + "us-east1" + ] + }, + "schemaSettings": { + "encoding": "json", + "name": "projects/your-project-id/schemas/your-schema" + } } ] }, - "http://asyncapi.com/definitions/3.0.0/components.json": { - "$id": "http://asyncapi.com/definitions/3.0.0/components.json", + "http://asyncapi.com/bindings/pulsar/0.1.0/channel.json": { + "$id": "http://asyncapi.com/bindings/pulsar/0.1.0/channel.json", + "title": "Channel Schema", + "description": "This object contains information about the channel representation in Pulsar, which covers namespace and topic level admin configuration. This object contains additional information not possible to represent within the core AsyncAPI specification.", "type": "object", - "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/3.0.0/specificationExtension.json" } }, + "required": [ + "namespace", + "persistence" + ], "properties": { - "schemas": { - "$ref": "http://asyncapi.com/definitions/3.0.0/schemas.json" - }, - "servers": { - "$ref": "http://asyncapi.com/definitions/3.0.0/servers.json" + "namespace": { + "type": "string", + "description": "The namespace, the channel is associated with." }, - "channels": { - "$ref": "http://asyncapi.com/definitions/3.0.0/channels.json" + "persistence": { + "type": "string", + "enum": [ + "persistent", + "non-persistent" + ], + "description": "persistence of the topic in Pulsar." }, - "serverVariables": { - "$ref": "http://asyncapi.com/definitions/3.0.0/serverVariables.json" + "compaction": { + "type": "integer", + "minimum": 0, + "description": "Topic compaction threshold given in MB" }, - "messages": { - "$ref": "http://asyncapi.com/definitions/3.0.0/messages.json" + "geo-replication": { + "type": "array", + "description": "A list of clusters the topic is replicated to.", + "items": { + "type": "string" + } }, - "securitySchemes": { + "retention": { "type": "object", - "patternProperties": { - "^[\\w\\d\\.\\-_]+$": { - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" - }, - { - "$ref": "http://asyncapi.com/definitions/3.0.0/SecurityScheme.json" - } - ] + "additionalProperties": false, + "properties": { + "time": { + "type": "integer", + "minimum": 0, + "description": "Time given in Minutes. `0` = Disable message retention." + }, + "size": { + "type": "integer", + "minimum": 0, + "description": "Size given in MegaBytes. `0` = Disable message retention." } } }, - "parameters": { - "$ref": "http://asyncapi.com/definitions/3.0.0/parameters.json" + "ttl": { + "type": "integer", + "description": "TTL in seconds for the specified topic" }, - "correlationIds": { - "type": "object", - "patternProperties": { - "^[\\w\\d\\.\\-_]+$": { - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" - }, - { - "$ref": "http://asyncapi.com/definitions/3.0.0/correlationId.json" - } - ] - } - } + "deduplication": { + "type": "boolean", + "description": "Whether deduplication of events is enabled or not." }, - "operationTraits": { - "type": "object", - "additionalProperties": { - "$ref": "http://asyncapi.com/definitions/3.0.0/operationTrait.json" + "bindingVersion": { + "type": "string", + "enum": [ + "0.1.0" + ], + "description": "The version of this binding. If omitted, 'latest' MUST be assumed." + } + }, + "examples": [ + { + "namespace": "ns1", + "persistence": "persistent", + "compaction": 1000, + "retention": { + "time": 15, + "size": 1000 + }, + "ttl": 360, + "geo-replication": [ + "us-west", + "us-east" + ], + "deduplication": true, + "bindingVersion": "0.1.0" + } + ] + }, + "http://asyncapi.com/definitions/3.0.0/operations.json": { + "$id": "http://asyncapi.com/definitions/3.0.0/operations.json", + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/operation.json" } + ] + } + }, + "http://asyncapi.com/definitions/3.0.0/operation.json": { + "$id": "http://asyncapi.com/definitions/3.0.0/operation.json", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "required": [ + "action", + "channel" + ], + "properties": { + "action": { + "type": "string", + "description": "Allowed values are send and receive. Use send when it's expected that the application will send a message to the given channel, and receive when the application should expect receiving messages from the given channel.", + "enum": [ + "send", + "receive" + ] }, - "messageTraits": { - "type": "object", - "additionalProperties": { - "$ref": "http://asyncapi.com/definitions/3.0.0/messageTrait.json" - } + "channel": { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" }, - "serverBindings": { - "type": "object", - "additionalProperties": { - "$ref": "http://asyncapi.com/definitions/3.0.0/serverBindingsObject.json" + "traits": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/operationTrait.json" + }, + { + "type": "array", + "items": [ + { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/operationTrait.json" + } + ] + }, + { + "type": "object", + "additionalItems": true + } + ] + } + ] } }, - "channelBindings": { - "type": "object", - "additionalProperties": { - "$ref": "http://asyncapi.com/definitions/3.0.0/channelBindingsObject.json" - } + "title": { + "type": "string", + "description": "A human-friendly title for the operation." }, - "operationBindings": { - "type": "object", - "additionalProperties": { - "$ref": "http://asyncapi.com/definitions/3.0.0/operationBindingsObject.json" - } + "summary": { + "type": "string", + "description": "A brief summary of the operation." + }, + "description": { + "type": "string", + "description": "A longer description of the operation. CommonMark is allowed." + }, + "security": { + "$ref": "http://asyncapi.com/definitions/3.0.0/securityRequirements.json" + }, + "tags": { + "type": "array", + "items": { + "$ref": "http://asyncapi.com/definitions/3.0.0/tag.json" + }, + "uniqueItems": true }, - "messageBindings": { - "type": "object", - "additionalProperties": { - "$ref": "http://asyncapi.com/definitions/3.0.0/messageBindingsObject.json" - } + "externalDocs": { + "$ref": "http://asyncapi.com/definitions/3.0.0/externalDocs.json" + }, + "bindings": { + "$ref": "http://asyncapi.com/definitions/3.0.0/operationBindingsObject.json" } } }, - "http://asyncapi.com/definitions/3.0.0/schemas.json": { - "$id": "http://asyncapi.com/definitions/3.0.0/schemas.json", - "type": "object", - "additionalProperties": { - "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" - }, - "description": "JSON objects describing schemas the API uses." - }, - "http://asyncapi.com/definitions/3.0.0/messages.json": { - "$id": "http://asyncapi.com/definitions/3.0.0/messages.json", + "http://asyncapi.com/definitions/3.0.0/operationTrait.json": { + "$id": "http://asyncapi.com/definitions/3.0.0/operationTrait.json", "type": "object", - "additionalProperties": { - "$ref": "http://asyncapi.com/definitions/3.0.0/message.json" + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } }, - "description": "JSON objects describing the messages being consumed and produced by the API." - }, - "http://asyncapi.com/definitions/3.0.0/SecurityScheme.json": { - "$id": "http://asyncapi.com/definitions/3.0.0/SecurityScheme.json", - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/3.0.0/userPassword.json" + "properties": { + "action": { + "$ref": "http://asyncapi.com/definitions/3.0.0/operation.json#/properties/action" }, - { - "$ref": "http://asyncapi.com/definitions/3.0.0/apiKey.json" + "channel": { + "$ref": "http://asyncapi.com/definitions/3.0.0/operation.json#/properties/channel" }, - { - "$ref": "http://asyncapi.com/definitions/3.0.0/X509.json" + "title": { + "$ref": "http://asyncapi.com/definitions/3.0.0/operation.json#/properties/title" }, - { - "$ref": "http://asyncapi.com/definitions/3.0.0/symmetricEncryption.json" + "summary": { + "$ref": "http://asyncapi.com/definitions/3.0.0/operation.json#/properties/summary" }, - { - "$ref": "http://asyncapi.com/definitions/3.0.0/asymmetricEncryption.json" + "description": { + "$ref": "http://asyncapi.com/definitions/3.0.0/operation.json#/properties/description" }, - { - "$ref": "http://asyncapi.com/definitions/3.0.0/HTTPSecurityScheme.json" + "security": { + "$ref": "http://asyncapi.com/definitions/3.0.0/operation.json#/properties/security" }, - { - "$ref": "http://asyncapi.com/definitions/3.0.0/oauth2Flows.json" + "tags": { + "$ref": "http://asyncapi.com/definitions/3.0.0/operation.json#/properties/tags" }, - { - "$ref": "http://asyncapi.com/definitions/3.0.0/openIdConnect.json" + "externalDocs": { + "$ref": "http://asyncapi.com/definitions/3.0.0/operation.json#/properties/externalDocs" }, - { - "$ref": "http://asyncapi.com/definitions/3.0.0/SaslSecurityScheme.json" + "bindings": { + "$ref": "http://asyncapi.com/definitions/3.0.0/operation.json#/properties/bindings" } - ] + } }, - "http://asyncapi.com/definitions/3.0.0/userPassword.json": { - "$id": "http://asyncapi.com/definitions/3.0.0/userPassword.json", + "http://asyncapi.com/definitions/3.0.0/operationBindingsObject.json": { + "$id": "http://asyncapi.com/definitions/3.0.0/operationBindingsObject.json", "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "userPassword" - ] - }, - "description": { - "type": "string" - } - }, + "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" } }, - "additionalProperties": false - }, - "http://asyncapi.com/definitions/3.0.0/apiKey.json": { - "$id": "http://asyncapi.com/definitions/3.0.0/apiKey.json", - "type": "object", - "required": [ - "type", - "in" - ], "properties": { - "type": { - "type": "string", - "enum": [ - "apiKey" + "http": {}, + "ws": {}, + "amqp": { + "oneOf": [ + { + "description": "Latest binding", + "$ref": "http://asyncapi.com/bindings/amqp/0.2.0/operation.json" + } ] }, - "in": { - "type": "string", - "enum": [ - "user", - "password" + "amqp1": {}, + "mqtt": { + "oneOf": [ + { + "description": "Latest binding", + "$ref": "http://asyncapi.com/bindings/mqtt/0.1.0/operation.json" + } ] }, - "description": { - "type": "string" - } - }, + "mqtt5": {}, + "kafka": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/bindings/kafka/0.1.0/operation.json" + }, + { + "description": "Latest binding", + "$ref": "http://asyncapi.com/bindings/kafka/0.3.0/operation.json" + } + ] + }, + "anypointmq": {}, + "nats": { + "oneOf": [ + { + "description": "Latest binding", + "$ref": "http://asyncapi.com/bindings/nats/0.1.0/operation.json" + } + ] + }, + "jms": {}, + "sns": {}, + "sqs": {}, + "stomp": {}, + "redis": {}, + "ibmmq": {}, + "solace": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/bindings/solace/0.2.0/operation.json" + }, + { + "description": "Latest binding", + "$ref": "http://asyncapi.com/bindings/solace/0.3.0/operation.json" + } + ] + }, + "googlepubsub": {} + } + }, + "http://asyncapi.com/bindings/amqp/0.2.0/operation.json": { + "$id": "http://asyncapi.com/bindings/amqp/0.2.0/operation.json", + "title": "AMQP operation bindings object", + "description": "This object contains information about the operation representation in AMQP.", + "type": "object", + "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" } }, - "additionalProperties": false - }, - "http://asyncapi.com/definitions/3.0.0/X509.json": { - "$id": "http://asyncapi.com/definitions/3.0.0/X509.json", - "type": "object", - "required": [ - "type" - ], "properties": { - "type": { + "expiration": { + "type": "integer", + "minimum": 0, + "description": "TTL (Time-To-Live) for the message. It MUST be greater than or equal to zero." + }, + "userId": { "type": "string", + "description": "Identifies the user who has sent the message." + }, + "cc": { + "type": "array", + "items": { + "type": "string" + }, + "description": "The routing keys the message should be routed to at the time of publishing." + }, + "priority": { + "type": "integer", + "description": "A priority for the message." + }, + "deliveryMode": { + "type": "integer", "enum": [ - "X509" - ] + 1, + 2 + ], + "description": "Delivery mode of the message. Its value MUST be either 1 (transient) or 2 (persistent)." }, - "description": { - "type": "string" - } - }, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" - } - }, - "additionalProperties": false - }, - "http://asyncapi.com/definitions/3.0.0/symmetricEncryption.json": { - "$id": "http://asyncapi.com/definitions/3.0.0/symmetricEncryption.json", - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { + "mandatory": { + "type": "boolean", + "description": "Whether the message is mandatory or not." + }, + "bcc": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Like cc but consumers will not receive this information." + }, + "replyTo": { + "type": "string", + "description": "Name of the queue where the consumer should send the response." + }, + "timestamp": { + "type": "boolean", + "description": "Whether the message should include a timestamp or not." + }, + "ack": { + "type": "boolean", + "description": "Whether the consumer should ack the message or not." + }, + "bindingVersion": { "type": "string", "enum": [ - "symmetricEncryption" - ] - }, - "description": { - "type": "string" + "0.2.0" + ], + "description": "The version of this binding. If omitted, \"latest\" MUST be assumed." } }, + "examples": [ + { + "expiration": 100000, + "userId": "guest", + "cc": [ + "user.logs" + ], + "priority": 10, + "deliveryMode": 2, + "mandatory": false, + "bcc": [ + "external.audit" + ], + "replyTo": "user.signedup", + "timestamp": true, + "ack": false, + "bindingVersion": "0.2.0" + } + ] + }, + "http://asyncapi.com/bindings/mqtt/0.1.0/operation.json": { + "$id": "http://asyncapi.com/bindings/mqtt/0.1.0/operation.json", + "title": "MQTT operation bindings object", + "description": "This object contains information about the operation representation in MQTT.", + "type": "object", + "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" } }, - "additionalProperties": false - }, - "http://asyncapi.com/definitions/3.0.0/asymmetricEncryption.json": { - "$id": "http://asyncapi.com/definitions/3.0.0/asymmetricEncryption.json", - "type": "object", - "required": [ - "type" - ], "properties": { - "type": { + "qos": { + "type": "integer", + "description": "Defines the Quality of Service (QoS) levels for the message flow between client and server. Its value MUST be either 0 (At most once delivery), 1 (At least once delivery), or 2 (Exactly once delivery)." + }, + "retain": { + "type": "boolean", + "description": "Whether the broker should retain the message or not." + }, + "bindingVersion": { "type": "string", "enum": [ - "asymmetricEncryption" - ] - }, - "description": { - "type": "string" + "0.1.0" + ], + "description": "The version of this binding. If omitted, 'latest' MUST be assumed." } }, + "examples": [ + { + "qos": 2, + "retain": true, + "bindingVersion": "0.1.0" + } + ] + }, + "http://asyncapi.com/bindings/kafka/0.1.0/operation.json": { + "$id": "http://asyncapi.com/bindings/kafka/0.1.0/operation.json", + "title": "Kafka operation message bindings object", + "description": "This object contains information about the operation representation in Kafka.", + "type": "object", + "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" } }, - "additionalProperties": false - }, - "http://asyncapi.com/definitions/3.0.0/HTTPSecurityScheme.json": { - "$id": "http://asyncapi.com/definitions/3.0.0/HTTPSecurityScheme.json", - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/3.0.0/NonBearerHTTPSecurityScheme.json" + "properties": { + "groupId": { + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json", + "description": "Id of the consumer group." }, - { - "$ref": "http://asyncapi.com/definitions/3.0.0/BearerHTTPSecurityScheme.json" + "clientId": { + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json", + "description": "Id of the consumer inside a consumer group." }, - { - "$ref": "http://asyncapi.com/definitions/3.0.0/APIKeyHTTPSecurityScheme.json" + "bindingVersion": { + "type": "string", + "enum": [ + "0.1.0" + ], + "description": "The version of this binding. If omitted, 'latest' MUST be assumed." } - ] - }, - "http://asyncapi.com/definitions/3.0.0/NonBearerHTTPSecurityScheme.json": { - "$id": "http://asyncapi.com/definitions/3.0.0/NonBearerHTTPSecurityScheme.json", - "not": { - "type": "object", - "properties": { - "scheme": { + }, + "examples": [ + { + "groupId": { "type": "string", "enum": [ - "bearer" + "myGroupId" ] - } + }, + "clientId": { + "type": "string", + "enum": [ + "myClientId" + ] + }, + "bindingVersion": "0.1.0" } - }, + ] + }, + "http://asyncapi.com/bindings/kafka/0.3.0/operation.json": { + "$id": "http://asyncapi.com/bindings/kafka/0.3.0/operation.json", + "title": "Operation Schema", + "description": "This object contains information about the operation representation in Kafka.", "type": "object", - "required": [ - "scheme", - "type" - ], + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, "properties": { - "scheme": { - "type": "string" + "groupId": { + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json", + "description": "Id of the consumer group." }, - "description": { - "type": "string" + "clientId": { + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json", + "description": "Id of the consumer inside a consumer group." }, - "type": { + "bindingVersion": { "type": "string", "enum": [ - "http" - ] + "0.3.0" + ], + "description": "The version of this binding. If omitted, 'latest' MUST be assumed." } }, + "examples": [ + { + "groupId": { + "type": "string", + "enum": [ + "myGroupId" + ] + }, + "clientId": { + "type": "string", + "enum": [ + "myClientId" + ] + }, + "bindingVersion": "0.3.0" + } + ] + }, + "http://asyncapi.com/bindings/nats/0.1.0/operation.json": { + "$id": "http://asyncapi.com/bindings/nats/0.1.0/operation.json", + "title": "NATS operation bindings object", + "description": "This object contains information about the operation representation in NATS.", + "type": "object", + "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" } }, - "additionalProperties": false - }, - "http://asyncapi.com/definitions/3.0.0/BearerHTTPSecurityScheme.json": { - "$id": "http://asyncapi.com/definitions/3.0.0/BearerHTTPSecurityScheme.json", - "type": "object", - "required": [ - "type", - "scheme" - ], "properties": { - "scheme": { + "queue": { "type": "string", - "enum": [ - "bearer" - ] - }, - "bearerFormat": { - "type": "string" + "description": "Defines the name of the queue to use. It MUST NOT exceed 255 characters.", + "maxLength": 255 }, - "type": { + "bindingVersion": { "type": "string", "enum": [ - "http" - ] - }, - "description": { - "type": "string" + "0.1.0" + ], + "description": "The version of this binding. If omitted, 'latest' MUST be assumed." + } + }, + "examples": [ + { + "queue": "MyCustomQueue", + "bindingVersion": "0.1.0" + } + ] + }, + "http://asyncapi.com/bindings/solace/0.2.0/operation.json": { + "$id": "http://asyncapi.com/bindings/solace/0.2.0/operation.json", + "title": "Solace operation bindings object", + "description": "This object contains information about the operation representation in Solace.", + "type": "object", + "additionalProperties": false, + "properties": { + "destinations": { + "description": "The list of Solace destinations referenced in the operation.", + "type": "array", + "items": { + "type": "object", + "properties": { + "deliveryMode": { + "type": "string", + "enum": [ + "direct", + "persistent" + ] + } + }, + "oneOf": [ + { + "properties": { + "destinationType": { + "type": "string", + "const": "queue", + "description": "If the type is queue, then the subscriber can bind to the queue. The queue subscribes to the given topicSubscriptions. If no topicSubscriptions are provied, the queue will subscribe to the topic as represented by the channel name." + }, + "queue": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The name of the queue" + }, + "topicSubscriptions": { + "type": "array", + "description": "The list of topics that the queue subscribes to.", + "items": { + "type": "string" + } + }, + "accessType": { + "type": "string", + "enum": [ + "exclusive", + "nonexclusive" + ] + } + } + } + } + }, + { + "properties": { + "destinationType": { + "type": "string", + "const": "topic", + "description": "If the type is topic, then the subscriber subscribes to the given topicSubscriptions. If no topicSubscriptions are provided, the client will subscribe to the topic as represented by the channel name." + }, + "topicSubscriptions": { + "type": "array", + "description": "The list of topics that the client subscribes to.", + "items": { + "type": "string" + } + } + } + } + ] + } } }, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" - } + "bindingVersion": { + "type": "string", + "enum": [ + "0.2.0" + ], + "description": "The version of this binding. If omitted, \"latest\" MUST be assumed." }, - "additionalProperties": false - }, - "http://asyncapi.com/definitions/3.0.0/APIKeyHTTPSecurityScheme.json": { - "$id": "http://asyncapi.com/definitions/3.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" + "examples": [ + { + "bindingVersion": "0.2.0", + "destinations": [ + { + "destinationType": "queue", + "queue": { + "name": "sampleQueue", + "topicSubscriptions": [ + "samples/*" + ], + "accessType": "nonexclusive" + } + }, + { + "destinationType": "topic", + "topicSubscriptions": [ + "samples/*" + ] + } ] - }, - "description": { - "type": "string" - } - }, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" } - }, - "additionalProperties": false + ] }, - "http://asyncapi.com/definitions/3.0.0/oauth2Flows.json": { - "$id": "http://asyncapi.com/definitions/3.0.0/oauth2Flows.json", + "http://asyncapi.com/bindings/solace/0.3.0/operation.json": { + "$id": "http://asyncapi.com/bindings/solace/0.3.0/operation.json", + "title": "Solace operation bindings object", + "description": "This object contains information about the operation representation in Solace.", "type": "object", - "required": [ - "type", - "flows" - ], + "additionalProperties": false, "properties": { - "type": { - "type": "string", - "enum": [ - "oauth2" - ] - }, - "description": { - "type": "string" - }, - "flows": { - "type": "object", - "properties": { - "implicit": { - "allOf": [ - { - "$ref": "http://asyncapi.com/definitions/3.0.0/oauth2Flow.json" - }, - { - "required": [ - "authorizationUrl", - "scopes" - ] - }, - { - "not": { - "required": [ - "tokenUrl" - ] - } - } - ] + "destinations": { + "description": "The list of Solace destinations referenced in the operation.", + "type": "array", + "items": { + "type": "object", + "properties": { + "deliveryMode": { + "type": "string", + "enum": [ + "direct", + "persistent" + ] + } }, - "password": { - "allOf": [ - { - "$ref": "http://asyncapi.com/definitions/3.0.0/oauth2Flow.json" - }, - { - "required": [ - "tokenUrl", - "scopes" - ] - }, - { - "not": { - "required": [ - "authorizationUrl" - ] + "oneOf": [ + { + "properties": { + "destinationType": { + "type": "string", + "const": "queue", + "description": "If the type is queue, then the subscriber can bind to the queue. The queue subscribes to the given topicSubscriptions. If no topicSubscriptions are provied, the queue will subscribe to the topic as represented by the channel name." + }, + "queue": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The name of the queue" + }, + "topicSubscriptions": { + "type": "array", + "description": "The list of topics that the queue subscribes to.", + "items": { + "type": "string" + } + }, + "accessType": { + "type": "string", + "enum": [ + "exclusive", + "nonexclusive" + ] + }, + "maxTtl": { + "type": "string", + "description": "The maximum TTL to apply to messages to be spooled." + }, + "maxMsgSpoolUsage": { + "type": "string", + "description": "The maximum amount of message spool that the given queue may use" + } + } } } - ] - }, - "clientCredentials": { - "allOf": [ - { - "$ref": "http://asyncapi.com/definitions/3.0.0/oauth2Flow.json" - }, - { - "required": [ - "tokenUrl", - "scopes" - ] - }, - { - "not": { - "required": [ - "authorizationUrl" - ] + }, + { + "properties": { + "destinationType": { + "type": "string", + "const": "topic", + "description": "If the type is topic, then the subscriber subscribes to the given topicSubscriptions. If no topicSubscriptions are provided, the client will subscribe to the topic as represented by the channel name." + }, + "topicSubscriptions": { + "type": "array", + "description": "The list of topics that the client subscribes to.", + "items": { + "type": "string" + } } } - ] + } + ] + } + } + }, + "bindingVersion": { + "type": "string", + "enum": [ + "0.3.0" + ], + "description": "The version of this binding. If omitted, \"latest\" MUST be assumed." + }, + "examples": [ + { + "bindingVersion": "0.3.0", + "destinations": [ + { + "destinationType": "queue", + "queue": { + "name": "sampleQueue", + "topicSubscriptions": [ + "samples/*" + ], + "accessType": "nonexclusive" + } }, - "authorizationCode": { - "allOf": [ - { - "$ref": "http://asyncapi.com/definitions/3.0.0/oauth2Flow.json" - }, - { - "required": [ - "authorizationUrl", - "tokenUrl", - "scopes" - ] - } + { + "destinationType": "topic", + "topicSubscriptions": [ + "samples/*" ] } - }, - "additionalProperties": false - } - }, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + ] } - } + ] }, - "http://asyncapi.com/definitions/3.0.0/oauth2Flow.json": { - "$id": "http://asyncapi.com/definitions/3.0.0/oauth2Flow.json", + "http://asyncapi.com/definitions/3.0.0/components.json": { + "$id": "http://asyncapi.com/definitions/3.0.0/components.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/3.0.0/oauth2Scopes.json" - } - }, + "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/3.0.0/specificationExtension.json" } }, - "additionalProperties": false - }, - "http://asyncapi.com/definitions/3.0.0/oauth2Scopes.json": { - "$id": "http://asyncapi.com/definitions/3.0.0/oauth2Scopes.json", - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "http://asyncapi.com/definitions/3.0.0/openIdConnect.json": { - "$id": "http://asyncapi.com/definitions/3.0.0/openIdConnect.json", - "type": "object", - "required": [ - "type", - "openIdConnectUrl" - ], "properties": { - "type": { - "type": "string", - "enum": [ - "openIdConnect" - ] + "schemas": { + "$ref": "http://asyncapi.com/definitions/3.0.0/schemas.json" }, - "description": { - "type": "string" + "servers": { + "$ref": "http://asyncapi.com/definitions/3.0.0/servers.json" }, - "openIdConnectUrl": { - "type": "string", - "format": "uri" - } - }, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" - } - }, - "additionalProperties": false - }, - "http://asyncapi.com/definitions/3.0.0/SaslSecurityScheme.json": { - "$id": "http://asyncapi.com/definitions/3.0.0/SaslSecurityScheme.json", - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/3.0.0/SaslPlainSecurityScheme.json" + "channels": { + "$ref": "http://asyncapi.com/definitions/3.0.0/channels.json" }, - { - "$ref": "http://asyncapi.com/definitions/3.0.0/SaslScramSecurityScheme.json" + "serverVariables": { + "$ref": "http://asyncapi.com/definitions/3.0.0/serverVariables.json" }, - { - "$ref": "http://asyncapi.com/definitions/3.0.0/SaslGssapiSecurityScheme.json" - } - ] - }, - "http://asyncapi.com/definitions/3.0.0/SaslPlainSecurityScheme.json": { - "$id": "http://asyncapi.com/definitions/3.0.0/SaslPlainSecurityScheme.json", - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "plain" - ] + "messages": { + "$ref": "http://asyncapi.com/definitions/3.0.0/messages.json" }, - "description": { - "type": "string" - } - }, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + "securitySchemes": { + "type": "object", + "patternProperties": { + "^[\\w\\d\\.\\-_]+$": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/SecurityScheme.json" + } + ] + } + } + }, + "parameters": { + "$ref": "http://asyncapi.com/definitions/3.0.0/parameters.json" + }, + "correlationIds": { + "type": "object", + "patternProperties": { + "^[\\w\\d\\.\\-_]+$": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/correlationId.json" + } + ] + } + } + }, + "operationTraits": { + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/3.0.0/operationTrait.json" + } + }, + "messageTraits": { + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/3.0.0/messageTrait.json" + } + }, + "serverBindings": { + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/3.0.0/serverBindingsObject.json" + } + }, + "channelBindings": { + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/3.0.0/channelBindingsObject.json" + } + }, + "operationBindings": { + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/3.0.0/operationBindingsObject.json" + } + }, + "messageBindings": { + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/3.0.0/messageBindingsObject.json" + } } - }, - "additionalProperties": false + } }, - "http://asyncapi.com/definitions/3.0.0/SaslScramSecurityScheme.json": { - "$id": "http://asyncapi.com/definitions/3.0.0/SaslScramSecurityScheme.json", + "http://asyncapi.com/definitions/3.0.0/schemas.json": { + "$id": "http://asyncapi.com/definitions/3.0.0/schemas.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/3.0.0/specificationExtension.json" - } + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" }, - "additionalProperties": false + "description": "JSON objects describing schemas the API uses." }, - "http://asyncapi.com/definitions/3.0.0/SaslGssapiSecurityScheme.json": { - "$id": "http://asyncapi.com/definitions/3.0.0/SaslGssapiSecurityScheme.json", + "http://asyncapi.com/definitions/3.0.0/messages.json": { + "$id": "http://asyncapi.com/definitions/3.0.0/messages.json", "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "gssapi" - ] - }, - "description": { - "type": "string" - } - }, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" - } + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/3.0.0/message.json" }, - "additionalProperties": false + "description": "JSON objects describing the messages being consumed and produced by the API." }, "http://asyncapi.com/definitions/3.0.0/parameters.json": { "$id": "http://asyncapi.com/definitions/3.0.0/parameters.json", From 40257df9258d6ede8db11dc096e2a6a0b01321fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maciej=20Urba=C5=84czyk?= Date: Tue, 7 Feb 2023 17:03:03 +0100 Subject: [PATCH 022/102] fix: allow references in parameters and server variables (#319) --- definitions/3.0.0/channel.json | 5 +---- definitions/3.0.0/parameters.json | 9 ++++++++- definitions/3.0.0/serverVariables.json | 9 ++++++++- 3 files changed, 17 insertions(+), 6 deletions(-) diff --git a/definitions/3.0.0/channel.json b/definitions/3.0.0/channel.json index bf715ede..17d9d9d1 100644 --- a/definitions/3.0.0/channel.json +++ b/definitions/3.0.0/channel.json @@ -15,10 +15,7 @@ "$ref": "http://asyncapi.com/definitions/3.0.0/channelMessages.json" }, "parameters": { - "type": "object", - "additionalProperties": { - "$ref": "http://asyncapi.com/definitions/3.0.0/parameter.json" - } + "$ref": "http://asyncapi.com/definitions/3.0.0/parameters.json" }, "title": { "type": "string", diff --git a/definitions/3.0.0/parameters.json b/definitions/3.0.0/parameters.json index 8bb0178b..19193781 100644 --- a/definitions/3.0.0/parameters.json +++ b/definitions/3.0.0/parameters.json @@ -1,7 +1,14 @@ { "type": "object", "additionalProperties": { - "$ref": "http://asyncapi.com/definitions/3.0.0/parameter.json" + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/parameter.json" + } + ] }, "description": "JSON objects describing re-usable channel parameters.", "$schema": "http://json-schema.org/draft-07/schema#", diff --git a/definitions/3.0.0/serverVariables.json b/definitions/3.0.0/serverVariables.json index d4946d79..69015771 100644 --- a/definitions/3.0.0/serverVariables.json +++ b/definitions/3.0.0/serverVariables.json @@ -1,7 +1,14 @@ { "type": "object", "additionalProperties": { - "$ref": "http://asyncapi.com/definitions/3.0.0/serverVariable.json" + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/serverVariable.json" + } + ] }, "$schema": "http://json-schema.org/draft-07/schema#", "$id": "http://asyncapi.com/definitions/3.0.0/serverVariables.json" From a74c78f4fa01dce07c665b4c7547f926e27dc33e Mon Sep 17 00:00:00 2001 From: asyncapi-bot Date: Tue, 7 Feb 2023 17:11:30 +0100 Subject: [PATCH 023/102] chore(release): v5.0.0-next-major-spec.7 (#326) --- package-lock.json | 2 +- package.json | 2 +- schemas/3.0.0.json | 37 ++++++++++++++++++++++++------------- 3 files changed, 26 insertions(+), 15 deletions(-) diff --git a/package-lock.json b/package-lock.json index ad2bf088..ce87a5b2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "@asyncapi/specs", - "version": "5.0.0-next-major-spec.6", + "version": "5.0.0-next-major-spec.7", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 890e6215..e33fd0a4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@asyncapi/specs", - "version": "5.0.0-next-major-spec.6", + "version": "5.0.0-next-major-spec.7", "description": "AsyncAPI schema versions", "main": "index.js", "types": "index.d.ts", diff --git a/schemas/3.0.0.json b/schemas/3.0.0.json index 11ba5327..6c788c70 100644 --- a/schemas/3.0.0.json +++ b/schemas/3.0.0.json @@ -294,7 +294,14 @@ "$id": "http://asyncapi.com/definitions/3.0.0/serverVariables.json", "type": "object", "additionalProperties": { - "$ref": "http://asyncapi.com/definitions/3.0.0/serverVariable.json" + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/serverVariable.json" + } + ] } }, "http://asyncapi.com/definitions/3.0.0/serverVariable.json": { @@ -1259,10 +1266,7 @@ "$ref": "http://asyncapi.com/definitions/3.0.0/channelMessages.json" }, "parameters": { - "type": "object", - "additionalProperties": { - "$ref": "http://asyncapi.com/definitions/3.0.0/parameter.json" - } + "$ref": "http://asyncapi.com/definitions/3.0.0/parameters.json" }, "title": { "type": "string", @@ -2354,6 +2358,21 @@ } } }, + "http://asyncapi.com/definitions/3.0.0/parameters.json": { + "$id": "http://asyncapi.com/definitions/3.0.0/parameters.json", + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/parameter.json" + } + ] + }, + "description": "JSON objects describing re-usable channel parameters." + }, "http://asyncapi.com/definitions/3.0.0/parameter.json": { "$id": "http://asyncapi.com/definitions/3.0.0/parameter.json", "additionalProperties": false, @@ -3843,14 +3862,6 @@ "$ref": "http://asyncapi.com/definitions/3.0.0/message.json" }, "description": "JSON objects describing the messages being consumed and produced by the API." - }, - "http://asyncapi.com/definitions/3.0.0/parameters.json": { - "$id": "http://asyncapi.com/definitions/3.0.0/parameters.json", - "type": "object", - "additionalProperties": { - "$ref": "http://asyncapi.com/definitions/3.0.0/parameter.json" - }, - "description": "JSON objects describing re-usable channel parameters." } }, "description": "!!Auto generated!! \n Do not manually edit. " From 290bbf5153d7938810432f755e394225886df78c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maciej=20Urba=C5=84czyk?= Date: Tue, 7 Feb 2023 17:16:45 +0100 Subject: [PATCH 024/102] feat: add reusable tags and externalDocs objects (#245) --- definitions/3.0.0/asyncapi.json | 10 ---------- definitions/3.0.0/channel.json | 24 +++++++++++++++++++----- definitions/3.0.0/components.json | 26 ++++++++++++++++++++++++++ definitions/3.0.0/info.json | 18 ++++++++++++++++-- definitions/3.0.0/message.json | 18 ++++++++++++++++-- definitions/3.0.0/messageTrait.json | 18 ++++++++++++++++-- definitions/3.0.0/operation.json | 18 ++++++++++++++++-- definitions/3.0.0/schema.json | 9 ++++++++- definitions/3.0.0/server.json | 24 ++++++++++++++++++++++++ definitions/3.0.0/tag.json | 9 ++++++++- 10 files changed, 149 insertions(+), 25 deletions(-) diff --git a/definitions/3.0.0/asyncapi.json b/definitions/3.0.0/asyncapi.json index 4042edfc..0157a6dd 100644 --- a/definitions/3.0.0/asyncapi.json +++ b/definitions/3.0.0/asyncapi.json @@ -43,16 +43,6 @@ }, "components": { "$ref": "http://asyncapi.com/definitions/3.0.0/components.json" - }, - "tags": { - "type": "array", - "items": { - "$ref": "http://asyncapi.com/definitions/3.0.0/tag.json" - }, - "uniqueItems": true - }, - "externalDocs": { - "$ref": "http://asyncapi.com/definitions/3.0.0/externalDocs.json" } } } \ No newline at end of file diff --git a/definitions/3.0.0/channel.json b/definitions/3.0.0/channel.json index 17d9d9d1..22a3c4b6 100644 --- a/definitions/3.0.0/channel.json +++ b/definitions/3.0.0/channel.json @@ -37,18 +37,32 @@ }, "uniqueItems": true }, - "bindings": { - "$ref": "http://asyncapi.com/definitions/3.0.0/channelBindingsObject.json" - }, "tags": { "type": "array", "items": { - "$ref": "http://asyncapi.com/definitions/3.0.0/tag.json" + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/tag.json" + } + ] }, "uniqueItems": true }, "externalDocs": { - "$ref": "http://asyncapi.com/definitions/3.0.0/externalDocs.json" + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/externalDocs.json" + } + ] + }, + "bindings": { + "$ref": "http://asyncapi.com/definitions/3.0.0/channelBindingsObject.json" } }, "$schema": "http://json-schema.org/draft-07/schema#", diff --git a/definitions/3.0.0/components.json b/definitions/3.0.0/components.json index fd2df606..f7c7a7d1 100644 --- a/definitions/3.0.0/components.json +++ b/definitions/3.0.0/components.json @@ -91,6 +91,32 @@ "additionalProperties": { "$ref": "http://asyncapi.com/definitions/3.0.0/messageBindingsObject.json" } + }, + "tags": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/tag.json" + } + ] + } + }, + "externalDocs": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/externalDocs.json" + } + ] + } } }, "$schema": "http://json-schema.org/draft-07/schema#", diff --git a/definitions/3.0.0/info.json b/definitions/3.0.0/info.json index b3f3d877..bf8c1491 100644 --- a/definitions/3.0.0/info.json +++ b/definitions/3.0.0/info.json @@ -38,12 +38,26 @@ "tags": { "type": "array", "items": { - "$ref": "http://asyncapi.com/definitions/3.0.0/tag.json" + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/tag.json" + } + ] }, "uniqueItems": true }, "externalDocs": { - "$ref": "http://asyncapi.com/definitions/3.0.0/externalDocs.json" + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/externalDocs.json" + } + ] } }, "$schema": "http://json-schema.org/draft-07/schema#", diff --git a/definitions/3.0.0/message.json b/definitions/3.0.0/message.json index 2cefb300..26bdb168 100644 --- a/definitions/3.0.0/message.json +++ b/definitions/3.0.0/message.json @@ -66,7 +66,14 @@ "tags": { "type": "array", "items": { - "$ref": "http://asyncapi.com/definitions/3.0.0/tag.json" + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/tag.json" + } + ] }, "uniqueItems": true }, @@ -87,7 +94,14 @@ "description": "A longer description of the message. CommonMark is allowed." }, "externalDocs": { - "$ref": "http://asyncapi.com/definitions/3.0.0/externalDocs.json" + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/externalDocs.json" + } + ] }, "deprecated": { "type": "boolean", diff --git a/definitions/3.0.0/messageTrait.json b/definitions/3.0.0/messageTrait.json index 5dbc42e2..b6d33df4 100644 --- a/definitions/3.0.0/messageTrait.json +++ b/definitions/3.0.0/messageTrait.json @@ -43,7 +43,14 @@ "tags": { "type": "array", "items": { - "$ref": "http://asyncapi.com/definitions/3.0.0/tag.json" + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/tag.json" + } + ] }, "uniqueItems": true }, @@ -64,7 +71,14 @@ "description": "A longer description of the message. CommonMark is allowed." }, "externalDocs": { - "$ref": "http://asyncapi.com/definitions/3.0.0/externalDocs.json" + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/externalDocs.json" + } + ] }, "deprecated": { "type": "boolean", diff --git a/definitions/3.0.0/operation.json b/definitions/3.0.0/operation.json index a8d00ad2..aead26de 100644 --- a/definitions/3.0.0/operation.json +++ b/definitions/3.0.0/operation.json @@ -69,12 +69,26 @@ "tags": { "type": "array", "items": { - "$ref": "http://asyncapi.com/definitions/3.0.0/tag.json" + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/tag.json" + } + ] }, "uniqueItems": true }, "externalDocs": { - "$ref": "http://asyncapi.com/definitions/3.0.0/externalDocs.json" + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/externalDocs.json" + } + ] }, "bindings": { "$ref": "http://asyncapi.com/definitions/3.0.0/operationBindingsObject.json" diff --git a/definitions/3.0.0/schema.json b/definitions/3.0.0/schema.json index c5770a09..7f08ab44 100644 --- a/definitions/3.0.0/schema.json +++ b/definitions/3.0.0/schema.json @@ -84,7 +84,14 @@ "type": "string" }, "externalDocs": { - "$ref": "http://asyncapi.com/definitions/3.0.0/externalDocs.json" + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/externalDocs.json" + } + ] }, "deprecated": { "type": "boolean", diff --git a/definitions/3.0.0/server.json b/definitions/3.0.0/server.json index 5da34f82..934a7b5d 100644 --- a/definitions/3.0.0/server.json +++ b/definitions/3.0.0/server.json @@ -40,6 +40,30 @@ "security": { "$ref": "http://asyncapi.com/definitions/3.0.0/securityRequirements.json" }, + "tags": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/tag.json" + } + ] + }, + "uniqueItems": true + }, + "externalDocs": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/externalDocs.json" + } + ] + }, "bindings": { "$ref": "http://asyncapi.com/definitions/3.0.0/serverBindingsObject.json" } diff --git a/definitions/3.0.0/tag.json b/definitions/3.0.0/tag.json index 32d3413b..135fd63b 100644 --- a/definitions/3.0.0/tag.json +++ b/definitions/3.0.0/tag.json @@ -12,7 +12,14 @@ "type": "string" }, "externalDocs": { - "$ref": "http://asyncapi.com/definitions/3.0.0/externalDocs.json" + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/externalDocs.json" + } + ] } }, "patternProperties": { From dda248804bc9c965b4d54c67316b0de362416f47 Mon Sep 17 00:00:00 2001 From: asyncapi-bot Date: Tue, 7 Feb 2023 17:22:52 +0100 Subject: [PATCH 025/102] chore(release): v5.0.0-next-major-spec.8 (#327) --- package-lock.json | 2 +- package.json | 2 +- schemas/3.0.0.json | 208 ++++++++++++++++++++++++++++++++++++--------- 3 files changed, 168 insertions(+), 44 deletions(-) diff --git a/package-lock.json b/package-lock.json index ce87a5b2..aa30ffc8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "@asyncapi/specs", - "version": "5.0.0-next-major-spec.7", + "version": "5.0.0-next-major-spec.8", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index e33fd0a4..1a77b55d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@asyncapi/specs", - "version": "5.0.0-next-major-spec.7", + "version": "5.0.0-next-major-spec.8", "description": "AsyncAPI schema versions", "main": "index.js", "types": "index.d.ts", diff --git a/schemas/3.0.0.json b/schemas/3.0.0.json index 6c788c70..5f13eddd 100644 --- a/schemas/3.0.0.json +++ b/schemas/3.0.0.json @@ -43,16 +43,6 @@ }, "components": { "$ref": "http://asyncapi.com/definitions/3.0.0/components.json" - }, - "tags": { - "type": "array", - "items": { - "$ref": "http://asyncapi.com/definitions/3.0.0/tag.json" - }, - "uniqueItems": true - }, - "externalDocs": { - "$ref": "http://asyncapi.com/definitions/3.0.0/externalDocs.json" } }, "definitions": { @@ -103,12 +93,26 @@ "tags": { "type": "array", "items": { - "$ref": "http://asyncapi.com/definitions/3.0.0/tag.json" + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/tag.json" + } + ] }, "uniqueItems": true }, "externalDocs": { - "$ref": "http://asyncapi.com/definitions/3.0.0/externalDocs.json" + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/externalDocs.json" + } + ] } } }, @@ -163,6 +167,23 @@ } } }, + "http://asyncapi.com/definitions/3.0.0/Reference.json": { + "$id": "http://asyncapi.com/definitions/3.0.0/Reference.json", + "type": "object", + "required": [ + "$ref" + ], + "properties": { + "$ref": { + "$ref": "http://asyncapi.com/definitions/3.0.0/ReferenceObject.json" + } + } + }, + "http://asyncapi.com/definitions/3.0.0/ReferenceObject.json": { + "$id": "http://asyncapi.com/definitions/3.0.0/ReferenceObject.json", + "type": "string", + "format": "uri-reference" + }, "http://asyncapi.com/definitions/3.0.0/tag.json": { "$id": "http://asyncapi.com/definitions/3.0.0/tag.json", "type": "object", @@ -178,7 +199,14 @@ "type": "string" }, "externalDocs": { - "$ref": "http://asyncapi.com/definitions/3.0.0/externalDocs.json" + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/externalDocs.json" + } + ] } }, "patternProperties": { @@ -225,23 +253,6 @@ ] } }, - "http://asyncapi.com/definitions/3.0.0/Reference.json": { - "$id": "http://asyncapi.com/definitions/3.0.0/Reference.json", - "type": "object", - "required": [ - "$ref" - ], - "properties": { - "$ref": { - "$ref": "http://asyncapi.com/definitions/3.0.0/ReferenceObject.json" - } - } - }, - "http://asyncapi.com/definitions/3.0.0/ReferenceObject.json": { - "$id": "http://asyncapi.com/definitions/3.0.0/ReferenceObject.json", - "type": "string", - "format": "uri-reference" - }, "http://asyncapi.com/definitions/3.0.0/server.json": { "$id": "http://asyncapi.com/definitions/3.0.0/server.json", "type": "object", @@ -285,6 +296,30 @@ "security": { "$ref": "http://asyncapi.com/definitions/3.0.0/securityRequirements.json" }, + "tags": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/tag.json" + } + ] + }, + "uniqueItems": true + }, + "externalDocs": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/externalDocs.json" + } + ] + }, "bindings": { "$ref": "http://asyncapi.com/definitions/3.0.0/serverBindingsObject.json" } @@ -1288,18 +1323,32 @@ }, "uniqueItems": true }, - "bindings": { - "$ref": "http://asyncapi.com/definitions/3.0.0/channelBindingsObject.json" - }, "tags": { "type": "array", "items": { - "$ref": "http://asyncapi.com/definitions/3.0.0/tag.json" + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/tag.json" + } + ] }, "uniqueItems": true }, "externalDocs": { - "$ref": "http://asyncapi.com/definitions/3.0.0/externalDocs.json" + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/externalDocs.json" + } + ] + }, + "bindings": { + "$ref": "http://asyncapi.com/definitions/3.0.0/channelBindingsObject.json" } } }, @@ -1380,7 +1429,14 @@ "tags": { "type": "array", "items": { - "$ref": "http://asyncapi.com/definitions/3.0.0/tag.json" + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/tag.json" + } + ] }, "uniqueItems": true }, @@ -1401,7 +1457,14 @@ "description": "A longer description of the message. CommonMark is allowed." }, "externalDocs": { - "$ref": "http://asyncapi.com/definitions/3.0.0/externalDocs.json" + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/externalDocs.json" + } + ] }, "deprecated": { "type": "boolean", @@ -1568,7 +1631,14 @@ "type": "string" }, "externalDocs": { - "$ref": "http://asyncapi.com/definitions/3.0.0/externalDocs.json" + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/externalDocs.json" + } + ] }, "deprecated": { "type": "boolean", @@ -2320,7 +2390,14 @@ "tags": { "type": "array", "items": { - "$ref": "http://asyncapi.com/definitions/3.0.0/tag.json" + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/tag.json" + } + ] }, "uniqueItems": true }, @@ -2341,7 +2418,14 @@ "description": "A longer description of the message. CommonMark is allowed." }, "externalDocs": { - "$ref": "http://asyncapi.com/definitions/3.0.0/externalDocs.json" + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/externalDocs.json" + } + ] }, "deprecated": { "type": "boolean", @@ -3160,12 +3244,26 @@ "tags": { "type": "array", "items": { - "$ref": "http://asyncapi.com/definitions/3.0.0/tag.json" + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/tag.json" + } + ] }, "uniqueItems": true }, "externalDocs": { - "$ref": "http://asyncapi.com/definitions/3.0.0/externalDocs.json" + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/externalDocs.json" + } + ] }, "bindings": { "$ref": "http://asyncapi.com/definitions/3.0.0/operationBindingsObject.json" @@ -3844,6 +3942,32 @@ "additionalProperties": { "$ref": "http://asyncapi.com/definitions/3.0.0/messageBindingsObject.json" } + }, + "tags": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/tag.json" + } + ] + } + }, + "externalDocs": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/externalDocs.json" + } + ] + } } } }, From ca9e4f7168b8afb0ac6ea102d98512735df9492f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maciej=20Urba=C5=84czyk?= Date: Tue, 7 Feb 2023 17:26:32 +0100 Subject: [PATCH 026/102] fix: remove action and channel from operation trait object (#317) --- definitions/3.0.0/operationTrait.json | 6 ------ 1 file changed, 6 deletions(-) diff --git a/definitions/3.0.0/operationTrait.json b/definitions/3.0.0/operationTrait.json index 28a12986..986f4796 100644 --- a/definitions/3.0.0/operationTrait.json +++ b/definitions/3.0.0/operationTrait.json @@ -7,12 +7,6 @@ } }, "properties": { - "action": { - "$ref": "http://asyncapi.com/definitions/3.0.0/operation.json#/properties/action" - }, - "channel": { - "$ref": "http://asyncapi.com/definitions/3.0.0/operation.json#/properties/channel" - }, "title": { "$ref": "http://asyncapi.com/definitions/3.0.0/operation.json#/properties/title" }, From 8b96702cc15ae9374687843baa2b8269864c67c3 Mon Sep 17 00:00:00 2001 From: asyncapi-bot Date: Tue, 7 Feb 2023 17:30:29 +0100 Subject: [PATCH 027/102] chore(release): v5.0.0-next-major-spec.9 (#328) --- package-lock.json | 2 +- package.json | 2 +- schemas/3.0.0.json | 6 ------ 3 files changed, 2 insertions(+), 8 deletions(-) diff --git a/package-lock.json b/package-lock.json index aa30ffc8..ac9afa76 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "@asyncapi/specs", - "version": "5.0.0-next-major-spec.8", + "version": "5.0.0-next-major-spec.9", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 1a77b55d..89b5cc02 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@asyncapi/specs", - "version": "5.0.0-next-major-spec.8", + "version": "5.0.0-next-major-spec.9", "description": "AsyncAPI schema versions", "main": "index.js", "types": "index.d.ts", diff --git a/schemas/3.0.0.json b/schemas/3.0.0.json index 5f13eddd..99ff9dcb 100644 --- a/schemas/3.0.0.json +++ b/schemas/3.0.0.json @@ -3280,12 +3280,6 @@ } }, "properties": { - "action": { - "$ref": "http://asyncapi.com/definitions/3.0.0/operation.json#/properties/action" - }, - "channel": { - "$ref": "http://asyncapi.com/definitions/3.0.0/operation.json#/properties/channel" - }, "title": { "$ref": "http://asyncapi.com/definitions/3.0.0/operation.json#/properties/title" }, From a6c905acfa36e13aa9d0fe2f8f025cd441e865c3 Mon Sep 17 00:00:00 2001 From: Jonas Lagoni Date: Wed, 8 Feb 2023 17:47:20 +0100 Subject: [PATCH 028/102] feat: support multiple binding versions (#312) --- bindings/kafka/0.4.0/channel.json | 2 +- bindings/kafka/0.4.0/message.json | 2 +- bindings/kafka/0.4.0/operation.json | 2 +- bindings/kafka/0.4.0/server.json | 2 +- bindings/mqtt5/0.2.0/server.json | 4 +- definitions/3.0.0/channelBindingsObject.json | 251 +++++++++++++++-- definitions/3.0.0/messageBindingsObject.json | 261 ++++++++++++++++-- .../3.0.0/operationBindingsObject.json | 238 ++++++++++++++-- definitions/3.0.0/serverBindingsObject.json | 226 +++++++++++++-- test/docs/3.0.0/streetlights-all.json | 19 ++ 10 files changed, 917 insertions(+), 90 deletions(-) diff --git a/bindings/kafka/0.4.0/channel.json b/bindings/kafka/0.4.0/channel.json index a072d922..67edf414 100644 --- a/bindings/kafka/0.4.0/channel.json +++ b/bindings/kafka/0.4.0/channel.json @@ -6,7 +6,7 @@ "type": "object", "additionalProperties": false, "patternProperties": { - "^x-[\\w\\d\\.\\-\\_]+$": { + "^x-[\\w\\d\\.\\x2d_]+$": { "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" } }, diff --git a/bindings/kafka/0.4.0/message.json b/bindings/kafka/0.4.0/message.json index ba3f54ef..88227378 100644 --- a/bindings/kafka/0.4.0/message.json +++ b/bindings/kafka/0.4.0/message.json @@ -5,7 +5,7 @@ "type": "object", "additionalProperties": false, "patternProperties": { - "^x-[\\w\\d\\.\\-\\_]+$": { + "^x-[\\w\\d\\.\\x2d_]+$": { "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" } }, diff --git a/bindings/kafka/0.4.0/operation.json b/bindings/kafka/0.4.0/operation.json index 2dbc5b99..2ba93aff 100644 --- a/bindings/kafka/0.4.0/operation.json +++ b/bindings/kafka/0.4.0/operation.json @@ -6,7 +6,7 @@ "type": "object", "additionalProperties": false, "patternProperties": { - "^x-[\\w\\d\\.\\-\\_]+$": { + "^x-[\\w\\d\\.\\x2d_]+$": { "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" } }, diff --git a/bindings/kafka/0.4.0/server.json b/bindings/kafka/0.4.0/server.json index d583e130..8d8d3a78 100644 --- a/bindings/kafka/0.4.0/server.json +++ b/bindings/kafka/0.4.0/server.json @@ -6,7 +6,7 @@ "type": "object", "additionalProperties": false, "patternProperties": { - "^x-[\\w\\d\\.\\-\\_]+$": { + "^x-[\\w\\d\\.\\x2d_]+$": { "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" } }, diff --git a/bindings/mqtt5/0.2.0/server.json b/bindings/mqtt5/0.2.0/server.json index 7ec26256..0ef7db4c 100644 --- a/bindings/mqtt5/0.2.0/server.json +++ b/bindings/mqtt5/0.2.0/server.json @@ -1,12 +1,12 @@ { "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "http://asyncapi.com/bindings/mqtt5/0.1.0/server.json", + "$id": "http://asyncapi.com/bindings/mqtt5/0.2.0/server.json", "title": "Server Schema", "description": "This object contains information about the server representation in MQTT5.", "type": "object", "additionalProperties": false, "patternProperties": { - "^x-[\\w\\d\\.\\-\\_]+$": { + "^x-[\\w\\d\\.\\x2d_]+$": { "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" } }, diff --git a/definitions/3.0.0/channelBindingsObject.json b/definitions/3.0.0/channelBindingsObject.json index 10590f36..c5941fe5 100644 --- a/definitions/3.0.0/channelBindingsObject.json +++ b/definitions/3.0.0/channelBindingsObject.json @@ -9,44 +9,158 @@ "properties": { "http": {}, "ws": { - "oneOf": [ + "properties": { + "bindingVersion": { + "enum": ["0.1.0"] + } + }, + "allOf": [ + { + "description": "If no bindingVersion specified, use the latest binding", + "if": { + "not": { + "required": [ + "bindingVersion" + ] + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/websockets/0.1.0/channel.json" + } + }, { - "description": "Latest binding", - "$ref": "http://asyncapi.com/bindings/websockets/0.1.0/channel.json" + "if": { + "required": [ "bindingVersion" ], + "properties": { + "bindingVersion": { + "const": "0.1.0" + } + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/websockets/0.1.0/channel.json" + } } ] }, "amqp": { - "oneOf": [ - { - "description": "Latest binding", - "$ref": "http://asyncapi.com/bindings/amqp/0.2.0/channel.json" + "properties": { + "bindingVersion": { + "enum": ["0.2.0"] } - ] - }, - "amqp1": { - "oneOf": [ + }, + "allOf": [ { - "description": "Latest binding", - "$ref": "http://asyncapi.com/bindings/amqp/0.2.0/channel.json" + "description": "If no bindingVersion specified, use the latest binding", + "if": { + "not": { + "required": [ + "bindingVersion" + ] + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/amqp/0.2.0/channel.json" + } + }, + { + "if": { + "required": [ "bindingVersion" ], + "properties": { + "bindingVersion": { + "const": "0.2.0" + } + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/amqp/0.2.0/channel.json" + } } ] }, + "amqp1": {}, "mqtt": {}, "mqtt5": {}, "kafka": { - "oneOf": [ + "properties": { + "bindingVersion": { + "enum": ["0.4.0", "0.3.0"] + } + }, + "allOf": [ + { + "description": "If no bindingVersion specified, use the latest binding", + "if": { + "not": { + "required": [ + "bindingVersion" + ] + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/kafka/0.4.0/channel.json" + } + }, + { + "if": { + "required": [ "bindingVersion" ], + "properties": { + "bindingVersion": { + "const": "0.4.0" + } + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/kafka/0.4.0/channel.json" + } + }, { - "description": "Latest binding", - "$ref": "http://asyncapi.com/bindings/kafka/0.3.0/channel.json" + "if": { + "required": [ "bindingVersion" ], + "properties": { + "bindingVersion": { + "const": "0.3.0" + } + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/kafka/0.3.0/channel.json" + } } ] }, "anypointmq": { - "oneOf": [ + "properties": { + "bindingVersion": { + "enum": ["0.0.1"] + } + }, + "allOf": [ + { + "description": "If no bindingVersion specified, use the latest binding", + "if": { + "not": { + "required": [ + "bindingVersion" + ] + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/anypointmq/0.0.1/channel.json" + } + }, { - "description": "Latest binding", - "$ref": "http://asyncapi.com/bindings/anypointmq/0.0.1/channel.json" + "if": { + "required": [ "bindingVersion" ], + "properties": { + "bindingVersion": { + "const": "0.0.1" + } + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/anypointmq/0.0.1/channel.json" + } } ] }, @@ -57,27 +171,108 @@ "stomp": {}, "redis": {}, "ibmmq": { - "oneOf": [ + "properties": { + "bindingVersion": { + "enum": ["0.1.0"] + } + }, + "allOf": [ + { + "description": "If no bindingVersion specified, use the latest binding", + "if": { + "not": { + "required": [ + "bindingVersion" + ] + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/ibmmq/0.1.0/channel.json" + } + }, { - "description": "Latest binding", - "$ref": "http://asyncapi.com/bindings/ibmmq/0.1.0/channel.json" + "if": { + "required": [ "bindingVersion" ], + "properties": { + "bindingVersion": { + "const": "0.1.0" + } + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/ibmmq/0.1.0/channel.json" + } } ] }, "solace": {}, "googlepubsub": { - "oneOf": [ + "properties": { + "bindingVersion": { + "enum": ["0.1.0"] + } + }, + "allOf": [ + { + "description": "If no bindingVersion specified, use the latest binding", + "if": { + "not": { + "required": [ + "bindingVersion" + ] + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/googlepubsub/0.1.0/channel.json" + } + }, { - "description": "Latest binding", - "$ref": "http://asyncapi.com/bindings/googlepubsub/0.1.0/channel.json" + "if": { + "required": [ "bindingVersion" ], + "properties": { + "bindingVersion": { + "const": "0.1.0" + } + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/googlepubsub/0.1.0/channel.json" + } } ] }, "pulsar": { - "oneOf": [ + "properties": { + "bindingVersion": { + "enum": ["0.1.0"] + } + }, + "allOf": [ + { + "description": "If no bindingVersion specified, use the latest binding", + "if": { + "not": { + "required": [ + "bindingVersion" + ] + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/pulsar/0.1.0/channel.json" + } + }, { - "description": "Latest binding", - "$ref": "http://asyncapi.com/bindings/pulsar/0.1.0/channel.json" + "if": { + "required": [ "bindingVersion" ], + "properties": { + "bindingVersion": { + "const": "0.1.0" + } + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/pulsar/0.1.0/channel.json" + } } ] } diff --git a/definitions/3.0.0/messageBindingsObject.json b/definitions/3.0.0/messageBindingsObject.json index fe4c930b..e8813db6 100644 --- a/definitions/3.0.0/messageBindingsObject.json +++ b/definitions/3.0.0/messageBindingsObject.json @@ -8,41 +8,206 @@ }, "properties": { "http": { - "oneOf": [ + "properties": { + "bindingVersion": { + "enum": ["0.1.0"] + } + }, + "allOf": [ + { + "description": "If no bindingVersion specified, use the latest binding", + "if": { + "not": { + "required": [ + "bindingVersion" + ] + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/http/0.1.0/message.json" + } + }, { - "description": "Latest binding", - "$ref": "http://asyncapi.com/bindings/http/0.1.0/message.json" + "if": { + "required": [ "bindingVersion" ], + "properties": { + "bindingVersion": { + "const": "0.1.0" + } + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/http/0.1.0/message.json" + } } ] }, "ws": {}, - "amqp": {}, + "amqp": { + "properties": { + "bindingVersion": { + "enum": ["0.2.0"] + } + }, + "allOf": [ + { + "description": "If no bindingVersion specified, use the latest binding", + "if": { + "not": { + "required": [ + "bindingVersion" + ] + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/amqp/0.2.0/message.json" + } + }, + { + "if": { + "required": [ "bindingVersion" ], + "properties": { + "bindingVersion": { + "const": "0.2.0" + } + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/amqp/0.2.0/message.json" + } + } + ] + }, "amqp1": {}, "mqtt": { - "oneOf": [ + "properties": { + "bindingVersion": { + "enum": ["0.1.0"] + } + }, + "allOf": [ { - "description": "Latest binding", - "$ref": "http://asyncapi.com/bindings/mqtt/0.1.0/message.json" + "description": "If no bindingVersion specified, use the latest binding", + "if": { + "not": { + "required": [ + "bindingVersion" + ] + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/mqtt/0.1.0/message.json" + } + }, + { + "if": { + "required": [ "bindingVersion" ], + "properties": { + "bindingVersion": { + "const": "0.1.0" + } + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/mqtt/0.1.0/message.json" + } } ] }, - "mqtt5": {}, + "mqtt5": { }, "kafka": { - "oneOf": [ + "properties": { + "bindingVersion": { + "enum": ["0.4.0", "0.3.0", "0.1.0"] + } + }, + "allOf": [ { - "$ref": "http://asyncapi.com/bindings/kafka/0.1.0/message.json" + "description": "If no bindingVersion specified, use the latest binding", + "if": { + "not": { + "required": [ + "bindingVersion" + ] + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/kafka/0.4.0/message.json" + } }, { - "description": "Latest binding", - "$ref": "http://asyncapi.com/bindings/kafka/0.3.0/message.json" + "if": { + "required": [ "bindingVersion" ], + "properties": { + "bindingVersion": { + "const": "0.4.0" + } + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/kafka/0.4.0/message.json" + } + }, + { + "if": { + "required": [ "bindingVersion" ], + "properties": { + "bindingVersion": { + "const": "0.3.0" + } + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/kafka/0.3.0/message.json" + } + }, + { + "if": { + "required": [ "bindingVersion" ], + "properties": { + "bindingVersion": { + "const": "0.1.0" + } + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/kafka/0.1.0/message.json" + } } ] }, "anypointmq": { - "oneOf": [ + "properties": { + "bindingVersion": { + "enum": ["0.0.1"] + } + }, + "allOf": [ + { + "description": "If no bindingVersion specified, use the latest binding", + "if": { + "not": { + "required": [ + "bindingVersion" + ] + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/anypointmq/0.0.1/message.json" + } + }, { - "description": "Latest binding", - "$ref": "http://asyncapi.com/bindings/anypointmq/0.0.1/message.json" + "if": { + "required": [ "bindingVersion" ], + "properties": { + "bindingVersion": { + "const": "0.0.1" + } + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/anypointmq/0.0.1/message.json" + } } ] }, @@ -53,19 +218,73 @@ "stomp": {}, "redis": {}, "ibmmq": { - "oneOf": [ + "properties": { + "bindingVersion": { + "enum": ["0.1.0"] + } + }, + "allOf": [ + { + "description": "If no bindingVersion specified, use the latest binding", + "if": { + "not": { + "required": [ + "bindingVersion" + ] + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/ibmmq/0.1.0/message.json" + } + }, { - "description": "Latest binding", - "$ref": "http://asyncapi.com/bindings/ibmmq/0.1.0/message.json" + "if": { + "required": [ "bindingVersion" ], + "properties": { + "bindingVersion": { + "const": "0.1.0" + } + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/ibmmq/0.1.0/message.json" + } } ] }, "solace": {}, "googlepubsub": { - "oneOf": [ + "properties": { + "bindingVersion": { + "enum": ["0.1.0"] + } + }, + "allOf": [ + { + "description": "If no bindingVersion specified, use the latest binding", + "if": { + "not": { + "required": [ + "bindingVersion" + ] + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/googlepubsub/0.1.0/message.json" + } + }, { - "description": "Latest binding", - "$ref": "http://asyncapi.com/bindings/googlepubsub/0.1.0/message.json" + "if": { + "required": [ "bindingVersion" ], + "properties": { + "bindingVersion": { + "const": "0.1.0" + } + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/googlepubsub/0.1.0/message.json" + } } ] } diff --git a/definitions/3.0.0/operationBindingsObject.json b/definitions/3.0.0/operationBindingsObject.json index 576e1ef5..19157d0d 100644 --- a/definitions/3.0.0/operationBindingsObject.json +++ b/definitions/3.0.0/operationBindingsObject.json @@ -7,43 +7,208 @@ } }, "properties": { - "http": {}, + "http": { + "properties": { + "bindingVersion": { + "enum": ["0.1.0"] + } + }, + "allOf": [ + { + "description": "If no bindingVersion specified, use the latest binding", + "if": { + "not": { + "required": [ + "bindingVersion" + ] + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/http/0.1.0/operation.json" + } + }, + { + "if": { + "required": [ "bindingVersion" ], + "properties": { + "bindingVersion": { + "const": "0.1.0" + } + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/http/0.1.0/operation.json" + } + } + ] + }, "ws": {}, "amqp": { - "oneOf": [ + "properties": { + "bindingVersion": { + "enum": ["0.2.0"] + } + }, + "allOf": [ + { + "description": "If no bindingVersion specified, use the latest binding", + "if": { + "not": { + "required": [ + "bindingVersion" + ] + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/amqp/0.2.0/operation.json" + } + }, { - "description": "Latest binding", - "$ref": "http://asyncapi.com/bindings/amqp/0.2.0/operation.json" + "if": { + "required": [ "bindingVersion" ], + "properties": { + "bindingVersion": { + "const": "0.2.0" + } + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/amqp/0.2.0/operation.json" + } } ] }, "amqp1": {}, "mqtt": { - "oneOf": [ + "properties": { + "bindingVersion": { + "enum": ["0.1.0"] + } + }, + "allOf": [ + { + "description": "If no bindingVersion specified, use the latest binding", + "if": { + "not": { + "required": [ + "bindingVersion" + ] + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/mqtt/0.1.0/operation.json" + } + }, { - "description": "Latest binding", - "$ref": "http://asyncapi.com/bindings/mqtt/0.1.0/operation.json" + "if": { + "required": [ "bindingVersion" ], + "properties": { + "bindingVersion": { + "const": "0.1.0" + } + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/mqtt/0.1.0/operation.json" + } } ] }, "mqtt5": {}, "kafka": { - "oneOf": [ + "properties": { + "bindingVersion": { + "enum": ["0.4.0", "0.3.0", "0.1.0"] + } + }, + "allOf": [ + { + "description": "If no bindingVersion specified, use the latest binding", + "if": { + "not": { + "required": [ + "bindingVersion" + ] + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/kafka/0.4.0/operation.json" + } + }, + { + "if": { + "required": [ "bindingVersion" ], + "properties": { + "bindingVersion": { + "const": "0.4.0" + } + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/kafka/0.4.0/operation.json" + } + }, { - "$ref": "http://asyncapi.com/bindings/kafka/0.1.0/operation.json" + "if": { + "required": [ "bindingVersion" ], + "properties": { + "bindingVersion": { + "const": "0.3.0" + } + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/kafka/0.3.0/operation.json" + } }, { - "description": "Latest binding", - "$ref": "http://asyncapi.com/bindings/kafka/0.3.0/operation.json" + "if": { + "required": [ "bindingVersion" ], + "properties": { + "bindingVersion": { + "const": "0.1.0" + } + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/kafka/0.1.0/operation.json" + } } ] }, "anypointmq": {}, "nats": { - "oneOf": [ + "properties": { + "bindingVersion": { + "enum": ["0.1.0"] + } + }, + "allOf": [ + { + "description": "If no bindingVersion specified, use the latest binding", + "if": { + "not": { + "required": [ + "bindingVersion" + ] + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/nats/0.1.0/operation.json" + } + }, { - "description": "Latest binding", - "$ref": "http://asyncapi.com/bindings/nats/0.1.0/operation.json" + "if": { + "required": [ "bindingVersion" ], + "properties": { + "bindingVersion": { + "const": "0.1.0" + } + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/nats/0.1.0/operation.json" + } } ] }, @@ -54,13 +219,50 @@ "redis": {}, "ibmmq": {}, "solace": { - "oneOf": [ + "properties": { + "bindingVersion": { + "enum": ["0.3.0", "0.2.0"] + } + }, + "allOf": [ + { + "description": "If no bindingVersion specified, use the latest binding", + "if": { + "not": { + "required": [ + "bindingVersion" + ] + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/solace/0.3.0/operation.json" + } + }, { - "$ref": "http://asyncapi.com/bindings/solace/0.2.0/operation.json" + "if": { + "required": [ "bindingVersion" ], + "properties": { + "bindingVersion": { + "const": "0.3.0" + } + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/solace/0.3.0/operation.json" + } }, { - "description": "Latest binding", - "$ref": "http://asyncapi.com/bindings/solace/0.3.0/operation.json" + "if": { + "required": [ "bindingVersion" ], + "properties": { + "bindingVersion": { + "const": "0.2.0" + } + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/solace/0.2.0/operation.json" + } } ] }, diff --git a/definitions/3.0.0/serverBindingsObject.json b/definitions/3.0.0/serverBindingsObject.json index cac1a597..c92b9329 100644 --- a/definitions/3.0.0/serverBindingsObject.json +++ b/definitions/3.0.0/serverBindingsObject.json @@ -12,19 +12,120 @@ "amqp": {}, "amqp1": {}, "mqtt": { - "oneOf": [ + "properties": { + "bindingVersion": { + "enum": ["0.1.0"] + } + }, + "allOf": [ + { + "description": "If no bindingVersion specified, use the latest binding", + "if": { + "not": { + "required": [ + "bindingVersion" + ] + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/mqtt/0.1.0/server.json" + } + }, + { + "if": { + "required": [ "bindingVersion" ], + "properties": { + "bindingVersion": { + "const": "0.1.0" + } + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/mqtt/0.1.0/server.json" + } + } + ] + }, + "mqtt5": { + "properties": { + "bindingVersion": { + "enum": ["0.2.0"] + } + }, + "allOf": [ { - "description": "Latest binding", - "$ref": "http://asyncapi.com/bindings/mqtt/0.1.0/server.json" + "description": "If no bindingVersion specified, use the latest binding", + "if": { + "not": { + "required": [ + "bindingVersion" + ] + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/mqtt5/0.2.0/server.json" + } + }, + { + "if": { + "required": [ "bindingVersion" ], + "properties": { + "bindingVersion": { + "const": "0.2.0" + } + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/mqtt5/0.2.0/server.json" + } } ] }, - "mqtt5": {}, "kafka": { - "oneOf": [ + "properties": { + "bindingVersion": { + "enum": ["0.4.0", "0.3.0"] + } + }, + "allOf": [ + { + "description": "If no bindingVersion specified, use the latest binding", + "if": { + "not": { + "required": [ + "bindingVersion" + ] + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/kafka/0.4.0/server.json" + } + }, { - "description": "Latest binding", - "$ref": "http://asyncapi.com/bindings/kafka/0.3.0/server.json" + "if": { + "required": [ "bindingVersion" ], + "properties": { + "bindingVersion": { + "const": "0.4.0" + } + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/kafka/0.4.0/server.json" + } + }, + { + "if": { + "required": [ "bindingVersion" ], + "properties": { + "bindingVersion": { + "const": "0.3.0" + } + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/kafka/0.3.0/server.json" + } } ] }, @@ -36,30 +137,121 @@ "stomp": {}, "redis": {}, "ibmmq": { - "oneOf": [ + "properties": { + "bindingVersion": { + "enum": ["0.1.0"] + } + }, + "allOf": [ { - "description": "Latest binding", - "$ref": "http://asyncapi.com/bindings/ibmmq/0.1.0/server.json" + "description": "If no bindingVersion specified, use the latest binding", + "if": { + "not": { + "required": [ + "bindingVersion" + ] + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/ibmmq/0.1.0/server.json" + } + }, + { + "if": { + "required": [ "bindingVersion" ], + "properties": { + "bindingVersion": { + "const": "0.1.0" + } + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/ibmmq/0.1.0/server.json" + } } ] }, "solace": { - "oneOf": [ + "properties": { + "bindingVersion": { + "enum": ["0.3.0", "0.2.0"] + } + }, + "allOf": [ { - "$ref": "http://asyncapi.com/bindings/solace/0.2.0/server.json" + "description": "If no bindingVersion specified, use the latest binding", + "if": { + "not": { + "required": [ + "bindingVersion" + ] + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/solace/0.3.0/server.json" + } }, { - "description": "Latest binding", - "$ref": "http://asyncapi.com/bindings/solace/0.3.0/server.json" + "if": { + "required": [ "bindingVersion" ], + "properties": { + "bindingVersion": { + "const": "0.3.0" + } + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/solace/0.3.0/server.json" + } + }, + { + "if": { + "required": [ "bindingVersion" ], + "properties": { + "bindingVersion": { + "const": "0.2.0" + } + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/solace/0.2.0/server.json" + } } ] }, "googlepubsub": {}, "pulsar": { - "oneOf": [ + "properties": { + "bindingVersion": { + "enum": ["0.1.0"] + } + }, + "allOf": [ + { + "description": "If no bindingVersion specified, use the latest binding", + "if": { + "not": { + "required": [ + "bindingVersion" + ] + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/pulsar/0.1.0/server.json" + } + }, { - "description": "Latest binding", - "$ref": "http://asyncapi.com/bindings/pulsar/0.1.0/server.json" + "if": { + "required": [ "bindingVersion" ], + "properties": { + "bindingVersion": { + "const": "0.1.0" + } + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/pulsar/0.1.0/server.json" + } } ] } diff --git a/test/docs/3.0.0/streetlights-all.json b/test/docs/3.0.0/streetlights-all.json index d0b16f55..4dd731c9 100644 --- a/test/docs/3.0.0/streetlights-all.json +++ b/test/docs/3.0.0/streetlights-all.json @@ -36,6 +36,25 @@ } } } + }, + "PublishUserSignedUpDefaultBinding": { + "action": "send", + "channel": { + "$ref": "#/channels/UserSignedUpChannel" + }, + "bindings": { + "mqtt": { + "qos": 1 + }, + "kafka": { + "clientId": { + "type": "string", + "enum": [ + "my-app-id" + ] + } + } + } } }, "components": { From dc09eefd6a894fdc3e3e089ea2ca6697dd26e8e1 Mon Sep 17 00:00:00 2001 From: asyncapi-bot Date: Wed, 8 Feb 2023 17:51:39 +0100 Subject: [PATCH 029/102] chore(release): v5.0.0-next-major-spec.10 (#331) --- package-lock.json | 47 +- package.json | 2 +- schemas/3.0.0.json | 3014 ++++++++++++++++++++++++++++++++------------ 3 files changed, 2234 insertions(+), 829 deletions(-) diff --git a/package-lock.json b/package-lock.json index 33e78882..a5f373f9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "@asyncapi/specs", - "version": "5.0.0-next-major-spec.9", + "version": "5.0.0-next-major-spec.10", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -691,6 +691,18 @@ "indent-string": "^4.0.0" } }, + "ajv": { + "version": "8.12.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz", + "integrity": "sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==", + "dev": true, + "requires": { + "fast-deep-equal": "^3.1.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2", + "uri-js": "^4.2.2" + } + }, "ansi-colors": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", @@ -1428,6 +1440,12 @@ } } }, + "fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true + }, "fast-glob": { "version": "3.2.11", "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.11.tgz", @@ -2231,6 +2249,12 @@ "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", "dev": true }, + "json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", + "dev": true + }, "json-stringify-safe": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", @@ -5448,6 +5472,12 @@ "once": "^1.3.1" } }, + "punycode": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz", + "integrity": "sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==", + "dev": true + }, "q": { "version": "1.5.1", "resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz", @@ -5660,6 +5690,12 @@ "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", "dev": true }, + "require-from-string": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", + "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", + "dev": true + }, "require-main-filename": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", @@ -8176,6 +8212,15 @@ "integrity": "sha512-isyNax3wXoKaulPDZWHQqbmIx1k2tb9fb3GGDBRxCscfYV2Ch7WxPArBsFEG8s/safwXTT7H4QGhaIkTp9447w==", "dev": true }, + "uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dev": true, + "requires": { + "punycode": "^2.1.0" + } + }, "url-join": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/url-join/-/url-join-4.0.1.tgz", diff --git a/package.json b/package.json index 89b5cc02..bb0fb25d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@asyncapi/specs", - "version": "5.0.0-next-major-spec.9", + "version": "5.0.0-next-major-spec.10", "description": "AsyncAPI schema versions", "main": "index.js", "types": "index.d.ts", diff --git a/schemas/3.0.0.json b/schemas/3.0.0.json index 99ff9dcb..e2d624bf 100644 --- a/schemas/3.0.0.json +++ b/schemas/3.0.0.json @@ -953,19 +953,135 @@ "amqp": {}, "amqp1": {}, "mqtt": { - "oneOf": [ + "properties": { + "bindingVersion": { + "enum": [ + "0.1.0" + ] + } + }, + "allOf": [ + { + "description": "If no bindingVersion specified, use the latest binding", + "if": { + "not": { + "required": [ + "bindingVersion" + ] + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/mqtt/0.1.0/server.json" + } + }, { - "description": "Latest binding", - "$ref": "http://asyncapi.com/bindings/mqtt/0.1.0/server.json" + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.1.0" + } + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/mqtt/0.1.0/server.json" + } + } + ] + }, + "mqtt5": { + "properties": { + "bindingVersion": { + "enum": [ + "0.2.0" + ] + } + }, + "allOf": [ + { + "description": "If no bindingVersion specified, use the latest binding", + "if": { + "not": { + "required": [ + "bindingVersion" + ] + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/mqtt5/0.2.0/server.json" + } + }, + { + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.2.0" + } + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/mqtt5/0.2.0/server.json" + } } ] }, - "mqtt5": {}, "kafka": { - "oneOf": [ + "properties": { + "bindingVersion": { + "enum": [ + "0.4.0", + "0.3.0" + ] + } + }, + "allOf": [ + { + "description": "If no bindingVersion specified, use the latest binding", + "if": { + "not": { + "required": [ + "bindingVersion" + ] + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/kafka/0.4.0/server.json" + } + }, + { + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.4.0" + } + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/kafka/0.4.0/server.json" + } + }, { - "description": "Latest binding", - "$ref": "http://asyncapi.com/bindings/kafka/0.3.0/server.json" + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.3.0" + } + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/kafka/0.3.0/server.json" + } } ] }, @@ -977,30 +1093,136 @@ "stomp": {}, "redis": {}, "ibmmq": { - "oneOf": [ + "properties": { + "bindingVersion": { + "enum": [ + "0.1.0" + ] + } + }, + "allOf": [ + { + "description": "If no bindingVersion specified, use the latest binding", + "if": { + "not": { + "required": [ + "bindingVersion" + ] + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/ibmmq/0.1.0/server.json" + } + }, { - "description": "Latest binding", - "$ref": "http://asyncapi.com/bindings/ibmmq/0.1.0/server.json" + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.1.0" + } + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/ibmmq/0.1.0/server.json" + } } ] }, "solace": { - "oneOf": [ + "properties": { + "bindingVersion": { + "enum": [ + "0.3.0", + "0.2.0" + ] + } + }, + "allOf": [ + { + "description": "If no bindingVersion specified, use the latest binding", + "if": { + "not": { + "required": [ + "bindingVersion" + ] + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/solace/0.3.0/server.json" + } + }, { - "$ref": "http://asyncapi.com/bindings/solace/0.2.0/server.json" + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.3.0" + } + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/solace/0.3.0/server.json" + } }, { - "description": "Latest binding", - "$ref": "http://asyncapi.com/bindings/solace/0.3.0/server.json" + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.2.0" + } + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/solace/0.2.0/server.json" + } } ] }, "googlepubsub": {}, "pulsar": { - "oneOf": [ + "properties": { + "bindingVersion": { + "enum": [ + "0.1.0" + ] + } + }, + "allOf": [ + { + "description": "If no bindingVersion specified, use the latest binding", + "if": { + "not": { + "required": [ + "bindingVersion" + ] + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/pulsar/0.1.0/server.json" + } + }, { - "description": "Latest binding", - "$ref": "http://asyncapi.com/bindings/pulsar/0.1.0/server.json" + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.1.0" + } + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/pulsar/0.1.0/server.json" + } } ] } @@ -1080,10 +1302,10 @@ } ] }, - "http://asyncapi.com/bindings/kafka/0.3.0/server.json": { - "$id": "http://asyncapi.com/bindings/kafka/0.3.0/server.json", + "http://asyncapi.com/bindings/mqtt5/0.2.0/server.json": { + "$id": "http://asyncapi.com/bindings/mqtt5/0.2.0/server.json", "title": "Server Schema", - "description": "This object contains server connection information to a Kafka broker. This object contains additional information not possible to represent within the core AsyncAPI specification.", + "description": "This object contains information about the server representation in MQTT5.", "type": "object", "additionalProperties": false, "patternProperties": { @@ -1092,805 +1314,890 @@ } }, "properties": { - "schemaRegistryUrl": { - "type": "string", - "description": "API URL for the Schema Registry used when producing Kafka messages (if a Schema Registry was used)." - }, - "schemaRegistryVendor": { - "type": "string", - "description": "The vendor of the Schema Registry and Kafka serdes library that should be used." - }, - "bindingVersion": { - "type": "string", - "enum": [ - "0.3.0" + "sessionExpiryInterval": { + "oneOf": [ + { + "type": "integer", + "minimum": 0 + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + } ], - "description": "The version of this binding." - } - }, - "examples": [ - { - "schemaRegistryUrl": "https://my-schema-registry.com", - "schemaRegistryVendor": "confluent", - "bindingVersion": "0.3.0" - } - ] - }, - "http://asyncapi.com/bindings/ibmmq/0.1.0/server.json": { - "$id": "http://asyncapi.com/bindings/ibmmq/0.1.0/server.json", - "title": "IBM MQ server bindings object", - "description": "This object contains server connection information about the IBM MQ server, referred to as an IBM MQ queue manager. This object contains additional connectivity information not possible to represent within the core AsyncAPI specification.", - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" - } - }, - "properties": { - "groupId": { - "type": "string", - "description": "Defines a logical group of IBM MQ server objects. This is necessary to specify multi-endpoint configurations used in high availability deployments. If omitted, the server object is not part of a group." - }, - "ccdtQueueManagerName": { - "type": "string", - "default": "*", - "description": "The name of the IBM MQ queue manager to bind to in the CCDT file." - }, - "cipherSpec": { - "type": "string", - "description": "The recommended cipher specification used to establish a TLS connection between the client and the IBM MQ queue manager. More information on SSL/TLS cipher specifications supported by IBM MQ can be found on this page in the IBM MQ Knowledge Center." - }, - "multiEndpointServer": { - "type": "boolean", - "default": false, - "description": "If 'multiEndpointServer' is 'true' then multiple connections can be workload balanced and applications should not make assumptions as to where messages are processed. Where message ordering, or affinity to specific message resources is necessary, a single endpoint ('multiEndpointServer' = 'false') may be required." - }, - "heartBeatInterval": { - "type": "integer", - "minimum": 0, - "maximum": 999999, - "default": 300, - "description": "The recommended value (in seconds) for the heartbeat sent to the queue manager during periods of inactivity. A value of zero means that no heart beats are sent. A value of 1 means that the client will use the value defined by the queue manager. More information on heart beat interval can be found on this page in the IBM MQ Knowledge Center." + "description": "Session Expiry Interval in seconds or a Schema Object containing the definition of the interval." }, "bindingVersion": { "type": "string", "enum": [ - "0.1.0" + "0.2.0" ], - "description": "The version of this binding." + "description": "The version of this binding. If omitted, 'latest' MUST be assumed." } }, "examples": [ { - "groupId": "PRODCLSTR1", - "cipherSpec": "ANY_TLS12_OR_HIGHER", - "bindingVersion": "0.1.0" + "sessionExpiryInterval": 60, + "bindingVersion": "0.2.0" }, { - "groupId": "PRODCLSTR1", - "bindingVersion": "0.1.0" + "sessionExpiryInterval": { + "type": "integer", + "minimum": 100 + }, + "bindingVersion": "0.2.0" } ] }, - "http://asyncapi.com/bindings/solace/0.2.0/server.json": { - "$id": "http://asyncapi.com/bindings/solace/0.2.0/server.json", - "title": "Solace server bindings object", - "description": "This object contains server connection information about the Solace broker. This object contains additional connectivity information not possible to represent within the core AsyncAPI specification.", - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" - } - }, - "properties": { - "msvVpn": { - "type": "string", - "description": "The name of the Virtual Private Network to connect to on the Solace broker." + "http://asyncapi.com/definitions/3.0.0/schema.json": { + "$id": "http://asyncapi.com/definitions/3.0.0/schema.json", + "allOf": [ + { + "$ref": "http://json-schema.org/draft-07/schema#" }, - "bindingVersion": { - "type": "string", - "enum": [ - "0.2.0" - ], - "description": "The version of this binding." - } - }, - "examples": [ { - "msgVpn": "ProdVPN", - "bindingVersion": "0.2.0" - } - ] - }, - "http://asyncapi.com/bindings/solace/0.3.0/server.json": { - "$id": "http://asyncapi.com/bindings/solace/0.3.0/server.json", - "title": "Solace server bindings object", - "description": "This object contains server connection information about the Solace broker. This object contains additional connectivity information not possible to represent within the core AsyncAPI specification.", - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" - } - }, - "properties": { - "msgVpn": { - "type": "string", - "description": "The name of the Virtual Private Network to connect to on the Solace broker." - }, - "bindingVersion": { - "type": "string", - "enum": [ - "0.3.0" - ], - "description": "The version of this binding." - } - }, - "examples": [ - { - "msgVpn": "ProdVPN", - "bindingVersion": "0.3.0" + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "properties": { + "additionalProperties": { + "anyOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" + }, + { + "type": "boolean" + } + ], + "default": {} + }, + "items": { + "anyOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" + }, + { + "type": "array", + "minItems": 1, + "items": { + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" + } + } + ], + "default": {} + }, + "allOf": { + "type": "array", + "minItems": 1, + "items": { + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" + } + }, + "oneOf": { + "type": "array", + "minItems": 1, + "items": { + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" + } + }, + "anyOf": { + "type": "array", + "minItems": 1, + "items": { + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" + } + }, + "not": { + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" + }, + "properties": { + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" + }, + "default": {} + }, + "patternProperties": { + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" + }, + "default": {} + }, + "propertyNames": { + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" + }, + "contains": { + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" + }, + "discriminator": { + "type": "string" + }, + "externalDocs": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/externalDocs.json" + } + ] + }, + "deprecated": { + "type": "boolean", + "default": false + } + } } ] }, - "http://asyncapi.com/bindings/pulsar/0.1.0/server.json": { - "$id": "http://asyncapi.com/bindings/pulsar/0.1.0/server.json", - "title": "Server Schema", - "description": "This object contains server information of Pulsar broker, which covers cluster and tenant admin configuration. This object contains additional information not possible to represent within the core AsyncAPI specification.", - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" - } - }, - "properties": { - "tenant": { - "type": "string", - "description": "The pulsar tenant. If omitted, 'public' MUST be assumed." + "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": "#" + } }, - "bindingVersion": { - "type": "string", + "nonNegativeInteger": { + "type": "integer", + "minimum": 0 + }, + "nonNegativeIntegerDefault0": { + "allOf": [ + { + "$ref": "#/definitions/nonNegativeInteger" + }, + { + "default": 0 + } + ] + }, + "simpleTypes": { "enum": [ - "0.1.0" - ], - "description": "The version of this binding. If omitted, 'latest' MUST be assumed." - } - }, - "examples": [ - { - "tenant": "contoso", - "bindingVersion": "0.1.0" - } - ] - }, - "http://asyncapi.com/definitions/3.0.0/channels.json": { - "$id": "http://asyncapi.com/definitions/3.0.0/channels.json", - "type": "object", - "additionalProperties": { - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + "array", + "boolean", + "integer", + "null", + "number", + "object", + "string" + ] + }, + "stringArray": { + "type": "array", + "items": { + "type": "string" }, - { - "$ref": "http://asyncapi.com/definitions/3.0.0/channel.json" - } - ] - } - }, - "http://asyncapi.com/definitions/3.0.0/channel.json": { - "$id": "http://asyncapi.com/definitions/3.0.0/channel.json", - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + "uniqueItems": true, + "default": [] } }, + "type": [ + "object", + "boolean" + ], "properties": { - "address": { - "type": [ - "string", - "null" - ], - "description": "An optional string representation of this channel's address. The address is typically the \"topic name\", \"routing key\", \"event type\", or \"path\". When `null` or absent, it MUST be interpreted as unknown. This is useful when the address is generated dynamically at runtime or can't be known upfront. It MAY contain Channel Address Expressions." - }, - "messages": { - "$ref": "http://asyncapi.com/definitions/3.0.0/channelMessages.json" - }, - "parameters": { - "$ref": "http://asyncapi.com/definitions/3.0.0/parameters.json" - }, - "title": { + "$id": { "type": "string", - "description": "A human-friendly title for the channel." + "format": "uri-reference" }, - "summary": { + "$schema": { "type": "string", - "description": "A brief summary of the channel." + "format": "uri" }, - "description": { + "$ref": { "type": "string", - "description": "A longer description of the channel. CommonMark is allowed." + "format": "uri-reference" }, - "servers": { - "type": "array", - "description": "The references of the servers on which this channel is available. If absent or empty then this channel must be available on all servers.", - "items": { - "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" - }, - "uniqueItems": true + "$comment": { + "type": "string" }, - "tags": { - "type": "array", - "items": { - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" - }, + "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": "http://asyncapi.com/definitions/3.0.0/tag.json" + "$ref": "#" + }, + { + "$ref": "#/definitions/stringArray" } ] - }, + } + }, + "propertyNames": { + "$ref": "#" + }, + "const": true, + "enum": { + "type": "array", + "items": true, + "minItems": 1, "uniqueItems": true }, - "externalDocs": { - "oneOf": [ + "type": { + "anyOf": [ { - "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + "$ref": "#/definitions/simpleTypes" }, { - "$ref": "http://asyncapi.com/definitions/3.0.0/externalDocs.json" + "type": "array", + "items": { + "$ref": "#/definitions/simpleTypes" + }, + "minItems": 1, + "uniqueItems": true } ] }, - "bindings": { - "$ref": "http://asyncapi.com/definitions/3.0.0/channelBindingsObject.json" + "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/3.0.0/channelMessages.json": { - "$id": "http://asyncapi.com/definitions/3.0.0/channelMessages.json", + "http://asyncapi.com/bindings/kafka/0.4.0/server.json": { + "$id": "http://asyncapi.com/bindings/kafka/0.4.0/server.json", + "title": "Server Schema", + "description": "This object contains server connection information to a Kafka broker. This object contains additional information not possible to represent within the core AsyncAPI specification.", "type": "object", - "additionalProperties": { - "$ref": "http://asyncapi.com/definitions/3.0.0/message.json" + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } }, - "description": "A map of the messages that will be sent to this channel by any application at any time. **Every message sent to this channel MUST be valid against one, and only one, of the message objects defined in this map.**" - }, - "http://asyncapi.com/definitions/3.0.0/message.json": { - "$id": "http://asyncapi.com/definitions/3.0.0/message.json", - "oneOf": [ + "properties": { + "schemaRegistryUrl": { + "type": "string", + "description": "API URL for the Schema Registry used when producing Kafka messages (if a Schema Registry was used)." + }, + "schemaRegistryVendor": { + "type": "string", + "description": "The vendor of the Schema Registry and Kafka serdes library that should be used." + }, + "bindingVersion": { + "type": "string", + "enum": [ + "0.4.0" + ], + "description": "The version of this binding." + } + }, + "examples": [ { - "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + "schemaRegistryUrl": "https://my-schema-registry.com", + "schemaRegistryVendor": "confluent", + "bindingVersion": "0.4.0" + } + ] + }, + "http://asyncapi.com/bindings/kafka/0.3.0/server.json": { + "$id": "http://asyncapi.com/bindings/kafka/0.3.0/server.json", + "title": "Server Schema", + "description": "This object contains server connection information to a Kafka broker. This object contains additional information not possible to represent within the core AsyncAPI specification.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "properties": { + "schemaRegistryUrl": { + "type": "string", + "description": "API URL for the Schema Registry used when producing Kafka messages (if a Schema Registry was used)." + }, + "schemaRegistryVendor": { + "type": "string", + "description": "The vendor of the Schema Registry and Kafka serdes library that should be used." }, + "bindingVersion": { + "type": "string", + "enum": [ + "0.3.0" + ], + "description": "The version of this binding." + } + }, + "examples": [ { - "oneOf": [ - { - "type": "object", - "required": [ - "oneOf" - ], - "additionalProperties": false, - "properties": { - "oneOf": { - "type": "array", - "items": { - "$ref": "http://asyncapi.com/definitions/3.0.0/message.json" - } - } - } - }, - { - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" - } - }, - "properties": { - "schemaFormat": { - "type": "string" - }, - "contentType": { - "type": "string" - }, - "headers": { - "allOf": [ - { - "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" - }, - { - "properties": { - "type": { - "const": "object" - } - } - } - ] - }, - "messageId": { - "type": "string" - }, - "payload": {}, - "correlationId": { - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" - }, - { - "$ref": "http://asyncapi.com/definitions/3.0.0/correlationId.json" - } - ] - }, - "tags": { - "type": "array", - "items": { - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" - }, - { - "$ref": "http://asyncapi.com/definitions/3.0.0/tag.json" - } - ] - }, - "uniqueItems": true - }, - "summary": { - "type": "string", - "description": "A brief summary of the message." - }, - "name": { - "type": "string", - "description": "Name of the message." - }, - "title": { - "type": "string", - "description": "A human-friendly title for the message." - }, - "description": { - "type": "string", - "description": "A longer description of the message. CommonMark is allowed." - }, - "externalDocs": { - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" - }, - { - "$ref": "http://asyncapi.com/definitions/3.0.0/externalDocs.json" - } - ] - }, - "deprecated": { - "type": "boolean", - "default": false - }, - "examples": { - "type": "array", - "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/3.0.0/messageBindingsObject.json" - }, - "traits": { - "type": "array", - "items": { - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" - }, - { - "$ref": "http://asyncapi.com/definitions/3.0.0/messageTrait.json" - }, - { - "type": "array", - "items": [ - { - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" - }, - { - "$ref": "http://asyncapi.com/definitions/3.0.0/messageTrait.json" - } - ] - }, - { - "type": "object", - "additionalItems": true - } - ] - } - ] - } - } - } - } - ] + "schemaRegistryUrl": "https://my-schema-registry.com", + "schemaRegistryVendor": "confluent", + "bindingVersion": "0.3.0" } ] }, - "http://asyncapi.com/definitions/3.0.0/schema.json": { - "$id": "http://asyncapi.com/definitions/3.0.0/schema.json", - "allOf": [ - { - "$ref": "http://json-schema.org/draft-07/schema#" - }, - { - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" - } - }, - "properties": { - "additionalProperties": { - "anyOf": [ - { - "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" - }, - { - "type": "boolean" - } - ], - "default": {} - }, - "items": { - "anyOf": [ - { - "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" - }, - { - "type": "array", - "minItems": 1, - "items": { - "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" - } - } - ], - "default": {} - }, - "allOf": { - "type": "array", - "minItems": 1, - "items": { - "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" - } - }, - "oneOf": { - "type": "array", - "minItems": 1, - "items": { - "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" - } - }, - "anyOf": { - "type": "array", - "minItems": 1, - "items": { - "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" - } - }, - "not": { - "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" - }, - "properties": { - "type": "object", - "additionalProperties": { - "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" - }, - "default": {} - }, - "patternProperties": { - "type": "object", - "additionalProperties": { - "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" - }, - "default": {} - }, - "propertyNames": { - "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" - }, - "contains": { - "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" - }, - "discriminator": { - "type": "string" - }, - "externalDocs": { - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" - }, - { - "$ref": "http://asyncapi.com/definitions/3.0.0/externalDocs.json" - } - ] - }, - "deprecated": { - "type": "boolean", - "default": false - } - } + "http://asyncapi.com/bindings/ibmmq/0.1.0/server.json": { + "$id": "http://asyncapi.com/bindings/ibmmq/0.1.0/server.json", + "title": "IBM MQ server bindings object", + "description": "This object contains server connection information about the IBM MQ server, referred to as an IBM MQ queue manager. This object contains additional connectivity information not possible to represent within the core AsyncAPI specification.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" } - ] - }, - "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": "#" - } + }, + "properties": { + "groupId": { + "type": "string", + "description": "Defines a logical group of IBM MQ server objects. This is necessary to specify multi-endpoint configurations used in high availability deployments. If omitted, the server object is not part of a group." }, - "nonNegativeInteger": { - "type": "integer", - "minimum": 0 + "ccdtQueueManagerName": { + "type": "string", + "default": "*", + "description": "The name of the IBM MQ queue manager to bind to in the CCDT file." }, - "nonNegativeIntegerDefault0": { - "allOf": [ - { - "$ref": "#/definitions/nonNegativeInteger" - }, - { - "default": 0 - } - ] + "cipherSpec": { + "type": "string", + "description": "The recommended cipher specification used to establish a TLS connection between the client and the IBM MQ queue manager. More information on SSL/TLS cipher specifications supported by IBM MQ can be found on this page in the IBM MQ Knowledge Center." }, - "simpleTypes": { + "multiEndpointServer": { + "type": "boolean", + "default": false, + "description": "If 'multiEndpointServer' is 'true' then multiple connections can be workload balanced and applications should not make assumptions as to where messages are processed. Where message ordering, or affinity to specific message resources is necessary, a single endpoint ('multiEndpointServer' = 'false') may be required." + }, + "heartBeatInterval": { + "type": "integer", + "minimum": 0, + "maximum": 999999, + "default": 300, + "description": "The recommended value (in seconds) for the heartbeat sent to the queue manager during periods of inactivity. A value of zero means that no heart beats are sent. A value of 1 means that the client will use the value defined by the queue manager. More information on heart beat interval can be found on this page in the IBM MQ Knowledge Center." + }, + "bindingVersion": { + "type": "string", "enum": [ - "array", - "boolean", - "integer", - "null", - "number", - "object", - "string" - ] + "0.1.0" + ], + "description": "The version of this binding." + } + }, + "examples": [ + { + "groupId": "PRODCLSTR1", + "cipherSpec": "ANY_TLS12_OR_HIGHER", + "bindingVersion": "0.1.0" }, - "stringArray": { - "type": "array", - "items": { - "type": "string" - }, - "uniqueItems": true, - "default": [] + { + "groupId": "PRODCLSTR1", + "bindingVersion": "0.1.0" + } + ] + }, + "http://asyncapi.com/bindings/solace/0.3.0/server.json": { + "$id": "http://asyncapi.com/bindings/solace/0.3.0/server.json", + "title": "Solace server bindings object", + "description": "This object contains server connection information about the Solace broker. This object contains additional connectivity information not possible to represent within the core AsyncAPI specification.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" } }, - "type": [ - "object", - "boolean" - ], "properties": { - "$id": { + "msgVpn": { "type": "string", - "format": "uri-reference" + "description": "The name of the Virtual Private Network to connect to on the Solace broker." }, - "$schema": { + "bindingVersion": { "type": "string", - "format": "uri" - }, - "$ref": { + "enum": [ + "0.3.0" + ], + "description": "The version of this binding." + } + }, + "examples": [ + { + "msgVpn": "ProdVPN", + "bindingVersion": "0.3.0" + } + ] + }, + "http://asyncapi.com/bindings/solace/0.2.0/server.json": { + "$id": "http://asyncapi.com/bindings/solace/0.2.0/server.json", + "title": "Solace server bindings object", + "description": "This object contains server connection information about the Solace broker. This object contains additional connectivity information not possible to represent within the core AsyncAPI specification.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "properties": { + "msvVpn": { "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" + "description": "The name of the Virtual Private Network to connect to on the Solace broker." }, - "pattern": { + "bindingVersion": { "type": "string", - "format": "regex" - }, - "additionalItems": { - "$ref": "#" - }, - "items": { - "anyOf": [ - { - "$ref": "#" - }, - { - "$ref": "#/definitions/schemaArray" - } + "enum": [ + "0.2.0" ], - "default": true - }, - "maxItems": { - "$ref": "#/definitions/nonNegativeInteger" - }, - "minItems": { - "$ref": "#/definitions/nonNegativeIntegerDefault0" - }, - "uniqueItems": { - "type": "boolean", - "default": false - }, - "contains": { - "$ref": "#" + "description": "The version of this binding." + } + }, + "examples": [ + { + "msgVpn": "ProdVPN", + "bindingVersion": "0.2.0" + } + ] + }, + "http://asyncapi.com/bindings/pulsar/0.1.0/server.json": { + "$id": "http://asyncapi.com/bindings/pulsar/0.1.0/server.json", + "title": "Server Schema", + "description": "This object contains server information of Pulsar broker, which covers cluster and tenant admin configuration. This object contains additional information not possible to represent within the core AsyncAPI specification.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "properties": { + "tenant": { + "type": "string", + "description": "The pulsar tenant. If omitted, 'public' MUST be assumed." }, - "maxProperties": { - "$ref": "#/definitions/nonNegativeInteger" + "bindingVersion": { + "type": "string", + "enum": [ + "0.1.0" + ], + "description": "The version of this binding. If omitted, 'latest' MUST be assumed." + } + }, + "examples": [ + { + "tenant": "contoso", + "bindingVersion": "0.1.0" + } + ] + }, + "http://asyncapi.com/definitions/3.0.0/channels.json": { + "$id": "http://asyncapi.com/definitions/3.0.0/channels.json", + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/channel.json" + } + ] + } + }, + "http://asyncapi.com/definitions/3.0.0/channel.json": { + "$id": "http://asyncapi.com/definitions/3.0.0/channel.json", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "properties": { + "address": { + "type": [ + "string", + "null" + ], + "description": "An optional string representation of this channel's address. The address is typically the \"topic name\", \"routing key\", \"event type\", or \"path\". When `null` or absent, it MUST be interpreted as unknown. This is useful when the address is generated dynamically at runtime or can't be known upfront. It MAY contain Channel Address Expressions." }, - "minProperties": { - "$ref": "#/definitions/nonNegativeIntegerDefault0" + "messages": { + "$ref": "http://asyncapi.com/definitions/3.0.0/channelMessages.json" }, - "required": { - "$ref": "#/definitions/stringArray" + "parameters": { + "$ref": "http://asyncapi.com/definitions/3.0.0/parameters.json" }, - "additionalProperties": { - "$ref": "#" + "title": { + "type": "string", + "description": "A human-friendly title for the channel." }, - "definitions": { - "type": "object", - "additionalProperties": { - "$ref": "#" - }, - "default": {} + "summary": { + "type": "string", + "description": "A brief summary of the channel." }, - "properties": { - "type": "object", - "additionalProperties": { - "$ref": "#" - }, - "default": {} + "description": { + "type": "string", + "description": "A longer description of the channel. CommonMark is allowed." }, - "patternProperties": { - "type": "object", - "additionalProperties": { - "$ref": "#" - }, - "propertyNames": { - "format": "regex" + "servers": { + "type": "array", + "description": "The references of the servers on which this channel is available. If absent or empty then this channel must be available on all servers.", + "items": { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" }, - "default": {} - }, - "dependencies": { - "type": "object", - "additionalProperties": { - "anyOf": [ - { - "$ref": "#" - }, - { - "$ref": "#/definitions/stringArray" - } - ] - } - }, - "propertyNames": { - "$ref": "#" + "uniqueItems": true }, - "const": true, - "enum": { + "tags": { "type": "array", - "items": true, - "minItems": 1, + "items": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/tag.json" + } + ] + }, "uniqueItems": true }, - "type": { - "anyOf": [ + "externalDocs": { + "oneOf": [ { - "$ref": "#/definitions/simpleTypes" + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" }, { - "type": "array", - "items": { - "$ref": "#/definitions/simpleTypes" - }, - "minItems": 1, - "uniqueItems": true + "$ref": "http://asyncapi.com/definitions/3.0.0/externalDocs.json" } ] }, - "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": "#" + "bindings": { + "$ref": "http://asyncapi.com/definitions/3.0.0/channelBindingsObject.json" } + } + }, + "http://asyncapi.com/definitions/3.0.0/channelMessages.json": { + "$id": "http://asyncapi.com/definitions/3.0.0/channelMessages.json", + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/3.0.0/message.json" }, - "default": true + "description": "A map of the messages that will be sent to this channel by any application at any time. **Every message sent to this channel MUST be valid against one, and only one, of the message objects defined in this map.**" + }, + "http://asyncapi.com/definitions/3.0.0/message.json": { + "$id": "http://asyncapi.com/definitions/3.0.0/message.json", + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "oneOf": [ + { + "type": "object", + "required": [ + "oneOf" + ], + "additionalProperties": false, + "properties": { + "oneOf": { + "type": "array", + "items": { + "$ref": "http://asyncapi.com/definitions/3.0.0/message.json" + } + } + } + }, + { + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "properties": { + "schemaFormat": { + "type": "string" + }, + "contentType": { + "type": "string" + }, + "headers": { + "allOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" + }, + { + "properties": { + "type": { + "const": "object" + } + } + } + ] + }, + "messageId": { + "type": "string" + }, + "payload": {}, + "correlationId": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/correlationId.json" + } + ] + }, + "tags": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/tag.json" + } + ] + }, + "uniqueItems": true + }, + "summary": { + "type": "string", + "description": "A brief summary of the message." + }, + "name": { + "type": "string", + "description": "Name of the message." + }, + "title": { + "type": "string", + "description": "A human-friendly title for the message." + }, + "description": { + "type": "string", + "description": "A longer description of the message. CommonMark is allowed." + }, + "externalDocs": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/externalDocs.json" + } + ] + }, + "deprecated": { + "type": "boolean", + "default": false + }, + "examples": { + "type": "array", + "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/3.0.0/messageBindingsObject.json" + }, + "traits": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/messageTrait.json" + }, + { + "type": "array", + "items": [ + { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/messageTrait.json" + } + ] + }, + { + "type": "object", + "additionalItems": true + } + ] + } + ] + } + } + } + } + ] + } + ] }, "http://asyncapi.com/definitions/3.0.0/correlationId.json": { "$id": "http://asyncapi.com/definitions/3.0.0/correlationId.json", @@ -1927,41 +2234,232 @@ }, "properties": { "http": { - "oneOf": [ + "properties": { + "bindingVersion": { + "enum": [ + "0.1.0" + ] + } + }, + "allOf": [ + { + "description": "If no bindingVersion specified, use the latest binding", + "if": { + "not": { + "required": [ + "bindingVersion" + ] + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/http/0.1.0/message.json" + } + }, { - "description": "Latest binding", - "$ref": "http://asyncapi.com/bindings/http/0.1.0/message.json" + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.1.0" + } + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/http/0.1.0/message.json" + } } ] }, "ws": {}, - "amqp": {}, + "amqp": { + "properties": { + "bindingVersion": { + "enum": [ + "0.2.0" + ] + } + }, + "allOf": [ + { + "description": "If no bindingVersion specified, use the latest binding", + "if": { + "not": { + "required": [ + "bindingVersion" + ] + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/amqp/0.2.0/message.json" + } + }, + { + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.2.0" + } + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/amqp/0.2.0/message.json" + } + } + ] + }, "amqp1": {}, "mqtt": { - "oneOf": [ + "properties": { + "bindingVersion": { + "enum": [ + "0.1.0" + ] + } + }, + "allOf": [ + { + "description": "If no bindingVersion specified, use the latest binding", + "if": { + "not": { + "required": [ + "bindingVersion" + ] + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/mqtt/0.1.0/message.json" + } + }, { - "description": "Latest binding", - "$ref": "http://asyncapi.com/bindings/mqtt/0.1.0/message.json" + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.1.0" + } + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/mqtt/0.1.0/message.json" + } } ] }, "mqtt5": {}, "kafka": { - "oneOf": [ + "properties": { + "bindingVersion": { + "enum": [ + "0.4.0", + "0.3.0", + "0.1.0" + ] + } + }, + "allOf": [ + { + "description": "If no bindingVersion specified, use the latest binding", + "if": { + "not": { + "required": [ + "bindingVersion" + ] + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/kafka/0.4.0/message.json" + } + }, + { + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.4.0" + } + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/kafka/0.4.0/message.json" + } + }, { - "$ref": "http://asyncapi.com/bindings/kafka/0.1.0/message.json" + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.3.0" + } + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/kafka/0.3.0/message.json" + } }, { - "description": "Latest binding", - "$ref": "http://asyncapi.com/bindings/kafka/0.3.0/message.json" + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.1.0" + } + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/kafka/0.1.0/message.json" + } } ] }, "anypointmq": { - "oneOf": [ + "properties": { + "bindingVersion": { + "enum": [ + "0.0.1" + ] + } + }, + "allOf": [ + { + "description": "If no bindingVersion specified, use the latest binding", + "if": { + "not": { + "required": [ + "bindingVersion" + ] + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/anypointmq/0.0.1/message.json" + } + }, { - "description": "Latest binding", - "$ref": "http://asyncapi.com/bindings/anypointmq/0.0.1/message.json" + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.0.1" + } + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/anypointmq/0.0.1/message.json" + } } ] }, @@ -1972,19 +2470,81 @@ "stomp": {}, "redis": {}, "ibmmq": { - "oneOf": [ + "properties": { + "bindingVersion": { + "enum": [ + "0.1.0" + ] + } + }, + "allOf": [ + { + "description": "If no bindingVersion specified, use the latest binding", + "if": { + "not": { + "required": [ + "bindingVersion" + ] + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/ibmmq/0.1.0/message.json" + } + }, { - "description": "Latest binding", - "$ref": "http://asyncapi.com/bindings/ibmmq/0.1.0/message.json" + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.1.0" + } + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/ibmmq/0.1.0/message.json" + } } ] }, "solace": {}, "googlepubsub": { - "oneOf": [ + "properties": { + "bindingVersion": { + "enum": [ + "0.1.0" + ] + } + }, + "allOf": [ + { + "description": "If no bindingVersion specified, use the latest binding", + "if": { + "not": { + "required": [ + "bindingVersion" + ] + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/googlepubsub/0.1.0/message.json" + } + }, { - "description": "Latest binding", - "$ref": "http://asyncapi.com/bindings/googlepubsub/0.1.0/message.json" + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.1.0" + } + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/googlepubsub/0.1.0/message.json" + } } ] } @@ -2031,6 +2591,42 @@ } ] }, + "http://asyncapi.com/bindings/amqp/0.2.0/message.json": { + "$id": "http://asyncapi.com/bindings/amqp/0.2.0/message.json", + "title": "AMQP message bindings object", + "description": "This object contains information about the message representation in AMQP.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "properties": { + "contentEncoding": { + "type": "string", + "description": "A MIME encoding for the message content." + }, + "messageType": { + "type": "string", + "description": "Application-specific message type." + }, + "bindingVersion": { + "type": "string", + "enum": [ + "0.2.0" + ], + "description": "The version of this binding. If omitted, \"latest\" MUST be assumed." + } + }, + "examples": [ + { + "contentEncoding": "gzip", + "messageType": "user.signup", + "bindingVersion": "0.2.0" + } + ] + }, "http://asyncapi.com/bindings/mqtt/0.1.0/message.json": { "$id": "http://asyncapi.com/bindings/mqtt/0.1.0/message.json", "title": "MQTT message bindings object", @@ -2057,9 +2653,9 @@ } ] }, - "http://asyncapi.com/bindings/kafka/0.1.0/message.json": { - "$id": "http://asyncapi.com/bindings/kafka/0.1.0/message.json", - "title": "Kafka message bindings object", + "http://asyncapi.com/bindings/kafka/0.4.0/message.json": { + "$id": "http://asyncapi.com/bindings/kafka/0.4.0/message.json", + "title": "Message Schema", "type": "object", "additionalProperties": false, "patternProperties": { @@ -2072,10 +2668,26 @@ "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json", "description": "The message key." }, + "schemaIdLocation": { + "type": "string", + "description": "If a Schema Registry is used when performing this operation, tells where the id of schema is stored.", + "enum": [ + "header", + "payload" + ] + }, + "schemaIdPayloadEncoding": { + "type": "string", + "description": "Number of bytes or vendor specific values when schema id is encoded in payload." + }, + "schemaLookupStrategy": { + "type": "string", + "description": "Freeform string for any naming strategy class to use. Clients should default to the vendor default if not supplied." + }, "bindingVersion": { "type": "string", "enum": [ - "0.1.0" + "0.4.0" ], "description": "The version of this binding. If omitted, 'latest' MUST be assumed." } @@ -2088,13 +2700,18 @@ "myKey" ] }, - "bindingVersion": "0.1.0" + "schemaIdLocation": "payload", + "schemaIdPayloadEncoding": "apicurio-new", + "schemaLookupStrategy": "TopicIdStrategy", + "bindingVersion": "0.4.0" }, { "key": { "$ref": "path/to/user-create.avsc#/UserCreate" }, - "bindingVersion": "0.2.0" + "schemaIdLocation": "payload", + "schemaIdPayloadEncoding": "4", + "bindingVersion": "0.4.0" } ] }, @@ -2160,6 +2777,47 @@ } ] }, + "http://asyncapi.com/bindings/kafka/0.1.0/message.json": { + "$id": "http://asyncapi.com/bindings/kafka/0.1.0/message.json", + "title": "Kafka message bindings object", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "properties": { + "key": { + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json", + "description": "The message key." + }, + "bindingVersion": { + "type": "string", + "enum": [ + "0.1.0" + ], + "description": "The version of this binding. If omitted, 'latest' MUST be assumed." + } + }, + "examples": [ + { + "key": { + "type": "string", + "enum": [ + "myKey" + ] + }, + "bindingVersion": "0.1.0" + }, + { + "key": { + "$ref": "path/to/user-create.avsc#/UserCreate" + }, + "bindingVersion": "0.2.0" + } + ] + }, "http://asyncapi.com/bindings/anypointmq/0.0.1/message.json": { "$id": "http://asyncapi.com/bindings/anypointmq/0.0.1/message.json", "title": "Anypoint MQ message bindings object", @@ -2495,44 +3153,177 @@ "properties": { "http": {}, "ws": { - "oneOf": [ + "properties": { + "bindingVersion": { + "enum": [ + "0.1.0" + ] + } + }, + "allOf": [ + { + "description": "If no bindingVersion specified, use the latest binding", + "if": { + "not": { + "required": [ + "bindingVersion" + ] + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/websockets/0.1.0/channel.json" + } + }, { - "description": "Latest binding", - "$ref": "http://asyncapi.com/bindings/websockets/0.1.0/channel.json" + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.1.0" + } + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/websockets/0.1.0/channel.json" + } } ] }, "amqp": { - "oneOf": [ - { - "description": "Latest binding", - "$ref": "http://asyncapi.com/bindings/amqp/0.2.0/channel.json" + "properties": { + "bindingVersion": { + "enum": [ + "0.2.0" + ] } - ] - }, - "amqp1": { - "oneOf": [ + }, + "allOf": [ + { + "description": "If no bindingVersion specified, use the latest binding", + "if": { + "not": { + "required": [ + "bindingVersion" + ] + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/amqp/0.2.0/channel.json" + } + }, { - "description": "Latest binding", - "$ref": "http://asyncapi.com/bindings/amqp/0.2.0/channel.json" + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.2.0" + } + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/amqp/0.2.0/channel.json" + } } ] }, + "amqp1": {}, "mqtt": {}, "mqtt5": {}, "kafka": { - "oneOf": [ + "properties": { + "bindingVersion": { + "enum": [ + "0.4.0", + "0.3.0" + ] + } + }, + "allOf": [ + { + "description": "If no bindingVersion specified, use the latest binding", + "if": { + "not": { + "required": [ + "bindingVersion" + ] + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/kafka/0.4.0/channel.json" + } + }, + { + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.4.0" + } + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/kafka/0.4.0/channel.json" + } + }, { - "description": "Latest binding", - "$ref": "http://asyncapi.com/bindings/kafka/0.3.0/channel.json" + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.3.0" + } + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/kafka/0.3.0/channel.json" + } } ] }, "anypointmq": { - "oneOf": [ + "properties": { + "bindingVersion": { + "enum": [ + "0.0.1" + ] + } + }, + "allOf": [ + { + "description": "If no bindingVersion specified, use the latest binding", + "if": { + "not": { + "required": [ + "bindingVersion" + ] + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/anypointmq/0.0.1/channel.json" + } + }, { - "description": "Latest binding", - "$ref": "http://asyncapi.com/bindings/anypointmq/0.0.1/channel.json" + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.0.1" + } + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/anypointmq/0.0.1/channel.json" + } } ] }, @@ -2543,27 +3334,120 @@ "stomp": {}, "redis": {}, "ibmmq": { - "oneOf": [ + "properties": { + "bindingVersion": { + "enum": [ + "0.1.0" + ] + } + }, + "allOf": [ + { + "description": "If no bindingVersion specified, use the latest binding", + "if": { + "not": { + "required": [ + "bindingVersion" + ] + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/ibmmq/0.1.0/channel.json" + } + }, { - "description": "Latest binding", - "$ref": "http://asyncapi.com/bindings/ibmmq/0.1.0/channel.json" + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.1.0" + } + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/ibmmq/0.1.0/channel.json" + } } ] }, "solace": {}, "googlepubsub": { - "oneOf": [ + "properties": { + "bindingVersion": { + "enum": [ + "0.1.0" + ] + } + }, + "allOf": [ + { + "description": "If no bindingVersion specified, use the latest binding", + "if": { + "not": { + "required": [ + "bindingVersion" + ] + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/googlepubsub/0.1.0/channel.json" + } + }, { - "description": "Latest binding", - "$ref": "http://asyncapi.com/bindings/googlepubsub/0.1.0/channel.json" + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.1.0" + } + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/googlepubsub/0.1.0/channel.json" + } } ] }, "pulsar": { - "oneOf": [ + "properties": { + "bindingVersion": { + "enum": [ + "0.1.0" + ] + } + }, + "allOf": [ + { + "description": "If no bindingVersion specified, use the latest binding", + "if": { + "not": { + "required": [ + "bindingVersion" + ] + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/pulsar/0.1.0/channel.json" + } + }, { - "description": "Latest binding", - "$ref": "http://asyncapi.com/bindings/pulsar/0.1.0/channel.json" + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.1.0" + } + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/pulsar/0.1.0/channel.json" + } } ] } @@ -2760,6 +3644,87 @@ } ] }, + "http://asyncapi.com/bindings/kafka/0.4.0/channel.json": { + "$id": "http://asyncapi.com/bindings/kafka/0.4.0/channel.json", + "title": "Channel Schema", + "description": "This object contains information about the channel representation in Kafka.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "properties": { + "topic": { + "type": "string", + "description": "Kafka topic name if different from channel name." + }, + "partitions": { + "type": "integer", + "minimum": 1, + "description": "Number of partitions configured on this topic." + }, + "replicas": { + "type": "integer", + "minimum": 1, + "description": "Number of replicas configured on this topic." + }, + "topicConfiguration": { + "description": "Topic configuration properties that are relevant for the API.", + "type": "object", + "additionalProperties": false, + "properties": { + "cleanup.policy": { + "description": "The [`cleanup.policy`](https://kafka.apache.org/documentation/#topicconfigs_cleanup.policy) configuration option.", + "type": "array", + "items": { + "type": "string", + "enum": [ + "compact", + "delete" + ] + } + }, + "retention.ms": { + "description": "The [`retention.ms`](https://kafka.apache.org/documentation/#topicconfigs_retention.ms) configuration option.", + "type": "integer", + "minimum": -1 + }, + "retention.bytes": { + "description": "The [`retention.bytes`](https://kafka.apache.org/documentation/#topicconfigs_retention.bytes) configuration option.", + "type": "integer", + "minimum": -1 + }, + "delete.retention.ms": { + "description": "The [`delete.retention.ms`](https://kafka.apache.org/documentation/#topicconfigs_delete.retention.ms) configuration option.", + "type": "integer", + "minimum": 0 + }, + "max.message.bytes": { + "description": "The [`max.message.bytes`](https://kafka.apache.org/documentation/#topicconfigs_max.message.bytes) configuration option.", + "type": "integer", + "minimum": 0 + } + } + }, + "bindingVersion": { + "type": "string", + "enum": [ + "0.4.0" + ], + "description": "The version of this binding. If omitted, 'latest' MUST be assumed." + } + }, + "examples": [ + { + "topic": "my-specific-topic", + "partitions": 20, + "replicas": 3, + "bindingVersion": "0.4.0" + } + ] + }, "http://asyncapi.com/bindings/kafka/0.3.0/channel.json": { "$id": "http://asyncapi.com/bindings/kafka/0.3.0/channel.json", "title": "Channel Schema", @@ -3313,43 +4278,234 @@ } }, "properties": { - "http": {}, + "http": { + "properties": { + "bindingVersion": { + "enum": [ + "0.1.0" + ] + } + }, + "allOf": [ + { + "description": "If no bindingVersion specified, use the latest binding", + "if": { + "not": { + "required": [ + "bindingVersion" + ] + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/http/0.1.0/operation.json" + } + }, + { + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.1.0" + } + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/http/0.1.0/operation.json" + } + } + ] + }, "ws": {}, "amqp": { - "oneOf": [ + "properties": { + "bindingVersion": { + "enum": [ + "0.2.0" + ] + } + }, + "allOf": [ + { + "description": "If no bindingVersion specified, use the latest binding", + "if": { + "not": { + "required": [ + "bindingVersion" + ] + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/amqp/0.2.0/operation.json" + } + }, + { + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.2.0" + } + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/amqp/0.2.0/operation.json" + } + } + ] + }, + "amqp1": {}, + "mqtt": { + "properties": { + "bindingVersion": { + "enum": [ + "0.1.0" + ] + } + }, + "allOf": [ { - "description": "Latest binding", - "$ref": "http://asyncapi.com/bindings/amqp/0.2.0/operation.json" - } - ] - }, - "amqp1": {}, - "mqtt": { - "oneOf": [ + "description": "If no bindingVersion specified, use the latest binding", + "if": { + "not": { + "required": [ + "bindingVersion" + ] + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/mqtt/0.1.0/operation.json" + } + }, { - "description": "Latest binding", - "$ref": "http://asyncapi.com/bindings/mqtt/0.1.0/operation.json" + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.1.0" + } + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/mqtt/0.1.0/operation.json" + } } ] }, "mqtt5": {}, "kafka": { - "oneOf": [ + "properties": { + "bindingVersion": { + "enum": [ + "0.4.0", + "0.3.0", + "0.1.0" + ] + } + }, + "allOf": [ + { + "description": "If no bindingVersion specified, use the latest binding", + "if": { + "not": { + "required": [ + "bindingVersion" + ] + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/kafka/0.4.0/operation.json" + } + }, { - "$ref": "http://asyncapi.com/bindings/kafka/0.1.0/operation.json" + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.4.0" + } + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/kafka/0.4.0/operation.json" + } + }, + { + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.3.0" + } + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/kafka/0.3.0/operation.json" + } }, { - "description": "Latest binding", - "$ref": "http://asyncapi.com/bindings/kafka/0.3.0/operation.json" + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.1.0" + } + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/kafka/0.1.0/operation.json" + } } ] }, "anypointmq": {}, "nats": { - "oneOf": [ + "properties": { + "bindingVersion": { + "enum": [ + "0.1.0" + ] + } + }, + "allOf": [ + { + "description": "If no bindingVersion specified, use the latest binding", + "if": { + "not": { + "required": [ + "bindingVersion" + ] + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/nats/0.1.0/operation.json" + } + }, { - "description": "Latest binding", - "$ref": "http://asyncapi.com/bindings/nats/0.1.0/operation.json" + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.1.0" + } + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/nats/0.1.0/operation.json" + } } ] }, @@ -3360,19 +4516,177 @@ "redis": {}, "ibmmq": {}, "solace": { - "oneOf": [ + "properties": { + "bindingVersion": { + "enum": [ + "0.3.0", + "0.2.0" + ] + } + }, + "allOf": [ + { + "description": "If no bindingVersion specified, use the latest binding", + "if": { + "not": { + "required": [ + "bindingVersion" + ] + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/solace/0.3.0/operation.json" + } + }, { - "$ref": "http://asyncapi.com/bindings/solace/0.2.0/operation.json" + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.3.0" + } + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/solace/0.3.0/operation.json" + } }, { - "description": "Latest binding", - "$ref": "http://asyncapi.com/bindings/solace/0.3.0/operation.json" + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.2.0" + } + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/solace/0.2.0/operation.json" + } } ] }, "googlepubsub": {} } }, + "http://asyncapi.com/bindings/http/0.1.0/operation.json": { + "$id": "http://asyncapi.com/bindings/http/0.1.0/operation.json", + "title": "HTTP operation bindings object", + "description": "This object contains information about the operation representation in HTTP.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "properties": { + "type": { + "type": "string", + "enum": [ + "request", + "response" + ], + "description": "Required. Type of operation. Its value MUST be either 'request' or 'response'." + }, + "method": { + "type": "string", + "enum": [ + "GET", + "PUT", + "POST", + "PATCH", + "DELETE", + "HEAD", + "OPTIONS", + "CONNECT", + "TRACE" + ], + "description": "When 'type' is 'request', this is the HTTP method, otherwise it MUST be ignored. Its value MUST be one of 'GET', 'POST', 'PUT', 'PATCH', 'DELETE', 'HEAD', 'OPTIONS', 'CONNECT', and 'TRACE'." + }, + "query": { + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json", + "description": "A Schema object containing the definitions for each query parameter. This schema MUST be of type 'object' and have a properties key." + }, + "bindingVersion": { + "type": "string", + "enum": [ + "0.1.0" + ], + "description": "The version of this binding. If omitted, 'latest' MUST be assumed." + } + }, + "required": [ + "type" + ], + "oneOf": [ + { + "properties": { + "type": { + "const": "request" + } + }, + "required": [ + "method" + ] + }, + { + "properties": { + "is": { + "const": "response" + } + }, + "not": { + "required": [ + "method" + ] + } + } + ], + "examples": [ + { + "type": "response", + "query": { + "type": "object", + "required": [ + "companyId" + ], + "properties": { + "companyId": { + "type": "number", + "minimum": 1, + "description": "The Id of the company." + } + }, + "additionalProperties": false + }, + "bindingVersion": "0.1.0" + }, + { + "type": "request", + "method": "GET", + "query": { + "type": "object", + "required": [ + "companyId" + ], + "properties": { + "companyId": { + "type": "number", + "minimum": 1, + "description": "The Id of the company." + } + }, + "additionalProperties": false + }, + "bindingVersion": "0.1.0" + } + ] + }, "http://asyncapi.com/bindings/amqp/0.2.0/operation.json": { "$id": "http://asyncapi.com/bindings/amqp/0.2.0/operation.json", "title": "AMQP operation bindings object", @@ -3500,9 +4814,9 @@ } ] }, - "http://asyncapi.com/bindings/kafka/0.1.0/operation.json": { - "$id": "http://asyncapi.com/bindings/kafka/0.1.0/operation.json", - "title": "Kafka operation message bindings object", + "http://asyncapi.com/bindings/kafka/0.4.0/operation.json": { + "$id": "http://asyncapi.com/bindings/kafka/0.4.0/operation.json", + "title": "Operation Schema", "description": "This object contains information about the operation representation in Kafka.", "type": "object", "additionalProperties": false, @@ -3523,7 +4837,7 @@ "bindingVersion": { "type": "string", "enum": [ - "0.1.0" + "0.4.0" ], "description": "The version of this binding. If omitted, 'latest' MUST be assumed." } @@ -3542,7 +4856,7 @@ "myClientId" ] }, - "bindingVersion": "0.1.0" + "bindingVersion": "0.4.0" } ] }, @@ -3592,6 +4906,52 @@ } ] }, + "http://asyncapi.com/bindings/kafka/0.1.0/operation.json": { + "$id": "http://asyncapi.com/bindings/kafka/0.1.0/operation.json", + "title": "Kafka operation message bindings object", + "description": "This object contains information about the operation representation in Kafka.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "properties": { + "groupId": { + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json", + "description": "Id of the consumer group." + }, + "clientId": { + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json", + "description": "Id of the consumer inside a consumer group." + }, + "bindingVersion": { + "type": "string", + "enum": [ + "0.1.0" + ], + "description": "The version of this binding. If omitted, 'latest' MUST be assumed." + } + }, + "examples": [ + { + "groupId": { + "type": "string", + "enum": [ + "myGroupId" + ] + }, + "clientId": { + "type": "string", + "enum": [ + "myClientId" + ] + }, + "bindingVersion": "0.1.0" + } + ] + }, "http://asyncapi.com/bindings/nats/0.1.0/operation.json": { "$id": "http://asyncapi.com/bindings/nats/0.1.0/operation.json", "title": "NATS operation bindings object", @@ -3624,8 +4984,8 @@ } ] }, - "http://asyncapi.com/bindings/solace/0.2.0/operation.json": { - "$id": "http://asyncapi.com/bindings/solace/0.2.0/operation.json", + "http://asyncapi.com/bindings/solace/0.3.0/operation.json": { + "$id": "http://asyncapi.com/bindings/solace/0.3.0/operation.json", "title": "Solace operation bindings object", "description": "This object contains information about the operation representation in Solace.", "type": "object", @@ -3673,6 +5033,14 @@ "exclusive", "nonexclusive" ] + }, + "maxTtl": { + "type": "string", + "description": "The maximum TTL to apply to messages to be spooled." + }, + "maxMsgSpoolUsage": { + "type": "string", + "description": "The maximum amount of message spool that the given queue may use" } } } @@ -3701,13 +5069,13 @@ "bindingVersion": { "type": "string", "enum": [ - "0.2.0" + "0.3.0" ], "description": "The version of this binding. If omitted, \"latest\" MUST be assumed." }, "examples": [ { - "bindingVersion": "0.2.0", + "bindingVersion": "0.3.0", "destinations": [ { "destinationType": "queue", @@ -3729,8 +5097,8 @@ } ] }, - "http://asyncapi.com/bindings/solace/0.3.0/operation.json": { - "$id": "http://asyncapi.com/bindings/solace/0.3.0/operation.json", + "http://asyncapi.com/bindings/solace/0.2.0/operation.json": { + "$id": "http://asyncapi.com/bindings/solace/0.2.0/operation.json", "title": "Solace operation bindings object", "description": "This object contains information about the operation representation in Solace.", "type": "object", @@ -3778,14 +5146,6 @@ "exclusive", "nonexclusive" ] - }, - "maxTtl": { - "type": "string", - "description": "The maximum TTL to apply to messages to be spooled." - }, - "maxMsgSpoolUsage": { - "type": "string", - "description": "The maximum amount of message spool that the given queue may use" } } } @@ -3814,13 +5174,13 @@ "bindingVersion": { "type": "string", "enum": [ - "0.3.0" + "0.2.0" ], "description": "The version of this binding. If omitted, \"latest\" MUST be assumed." }, "examples": [ { - "bindingVersion": "0.3.0", + "bindingVersion": "0.2.0", "destinations": [ { "destinationType": "queue", From ce41256aa0045f12a31b62834ab9433c3c20dfcb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maciej=20Urba=C5=84czyk?= Date: Mon, 13 Feb 2023 13:29:38 +0100 Subject: [PATCH 030/102] feat: add host and pathname fields in server object (#329) --- definitions/3.0.0/server.json | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/definitions/3.0.0/server.json b/definitions/3.0.0/server.json index 934a7b5d..17540811 100644 --- a/definitions/3.0.0/server.json +++ b/definitions/3.0.0/server.json @@ -2,7 +2,7 @@ "type": "object", "description": "An object representing a Server.", "required": [ - "url", + "host", "protocol" ], "additionalProperties": false, @@ -12,8 +12,13 @@ } }, "properties": { - "url": { - "type": "string" + "host": { + "type": "string", + "description": "The server host name." + }, + "pathname": { + "type": "string", + "description": "The path to a resource in the host." }, "title": { "type": "string", From cfba93657173a402a4a458cc930142664aa15013 Mon Sep 17 00:00:00 2001 From: asyncapi-bot Date: Mon, 13 Feb 2023 13:34:19 +0100 Subject: [PATCH 031/102] chore(release): v5.0.0-next-major-spec.11 (#337) --- package-lock.json | 2 +- package.json | 2 +- schemas/3.0.0.json | 11 ++++++++--- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index a5f373f9..7736c3cf 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "@asyncapi/specs", - "version": "5.0.0-next-major-spec.10", + "version": "5.0.0-next-major-spec.11", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index bb0fb25d..b7340a79 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@asyncapi/specs", - "version": "5.0.0-next-major-spec.10", + "version": "5.0.0-next-major-spec.11", "description": "AsyncAPI schema versions", "main": "index.js", "types": "index.d.ts", diff --git a/schemas/3.0.0.json b/schemas/3.0.0.json index e2d624bf..d55ec6b4 100644 --- a/schemas/3.0.0.json +++ b/schemas/3.0.0.json @@ -258,7 +258,7 @@ "type": "object", "description": "An object representing a Server.", "required": [ - "url", + "host", "protocol" ], "additionalProperties": false, @@ -268,8 +268,13 @@ } }, "properties": { - "url": { - "type": "string" + "host": { + "type": "string", + "description": "The server host name." + }, + "pathname": { + "type": "string", + "description": "The path to a resource in the host." }, "title": { "type": "string", From a2f0bb73ba9877627dbcba222db65c9230636b1e Mon Sep 17 00:00:00 2001 From: Jonas Lagoni Date: Wed, 22 Feb 2023 18:46:16 +0100 Subject: [PATCH 032/102] fix: message can have nested oneOf (#333) --- definitions/3.0.0/message.json | 158 +------------------------- definitions/3.0.0/messageObject.json | 159 +++++++++++++++++++++++++++ 2 files changed, 161 insertions(+), 156 deletions(-) create mode 100644 definitions/3.0.0/messageObject.json diff --git a/definitions/3.0.0/message.json b/definitions/3.0.0/message.json index 26bdb168..182240a0 100644 --- a/definitions/3.0.0/message.json +++ b/definitions/3.0.0/message.json @@ -15,167 +15,13 @@ "oneOf": { "type": "array", "items": { - "$ref": "http://asyncapi.com/definitions/3.0.0/message.json" + "$ref": "http://asyncapi.com/definitions/3.0.0/messageObject.json" } } } }, { - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" - } - }, - "properties": { - "schemaFormat": { - "type": "string" - }, - "contentType": { - "type": "string" - }, - "headers": { - "allOf": [ - { - "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" - }, - { - "properties": { - "type": { - "const": "object" - } - } - } - ] - }, - "messageId": { - "type": "string" - }, - "payload": {}, - "correlationId": { - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" - }, - { - "$ref": "http://asyncapi.com/definitions/3.0.0/correlationId.json" - } - ] - }, - "tags": { - "type": "array", - "items": { - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" - }, - { - "$ref": "http://asyncapi.com/definitions/3.0.0/tag.json" - } - ] - }, - "uniqueItems": true - }, - "summary": { - "type": "string", - "description": "A brief summary of the message." - }, - "name": { - "type": "string", - "description": "Name of the message." - }, - "title": { - "type": "string", - "description": "A human-friendly title for the message." - }, - "description": { - "type": "string", - "description": "A longer description of the message. CommonMark is allowed." - }, - "externalDocs": { - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" - }, - { - "$ref": "http://asyncapi.com/definitions/3.0.0/externalDocs.json" - } - ] - }, - "deprecated": { - "type": "boolean", - "default": false - }, - "examples": { - "type": "array", - "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/3.0.0/messageBindingsObject.json" - }, - "traits": { - "type": "array", - "items": { - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" - }, - { - "$ref": "http://asyncapi.com/definitions/3.0.0/messageTrait.json" - }, - { - "type": "array", - "items": [ - { - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" - }, - { - "$ref": "http://asyncapi.com/definitions/3.0.0/messageTrait.json" - } - ] - }, - { - "type": "object", - "additionalItems": true - } - ] - } - ] - } - } - } + "$ref": "http://asyncapi.com/definitions/3.0.0/messageObject.json" } ] } diff --git a/definitions/3.0.0/messageObject.json b/definitions/3.0.0/messageObject.json new file mode 100644 index 00000000..3415b230 --- /dev/null +++ b/definitions/3.0.0/messageObject.json @@ -0,0 +1,159 @@ +{ + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "properties": { + "schemaFormat": { + "type": "string" + }, + "contentType": { + "type": "string" + }, + "headers": { + "allOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" + }, + { + "properties": { + "type": { + "const": "object" + } + } + } + ] + }, + "messageId": { + "type": "string" + }, + "payload": {}, + "correlationId": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/correlationId.json" + } + ] + }, + "tags": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/tag.json" + } + ] + }, + "uniqueItems": true + }, + "summary": { + "type": "string", + "description": "A brief summary of the message." + }, + "name": { + "type": "string", + "description": "Name of the message." + }, + "title": { + "type": "string", + "description": "A human-friendly title for the message." + }, + "description": { + "type": "string", + "description": "A longer description of the message. CommonMark is allowed." + }, + "externalDocs": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/externalDocs.json" + } + ] + }, + "deprecated": { + "type": "boolean", + "default": false + }, + "examples": { + "type": "array", + "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/3.0.0/messageBindingsObject.json" + }, + "traits": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/messageTrait.json" + }, + { + "type": "array", + "items": [ + { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/messageTrait.json" + } + ] + }, + { + "type": "object", + "additionalItems": true + } + ] + } + ] + } + } + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/3.0.0/messageObject.json" +} \ No newline at end of file From 094175ef336a6d824732f4c8da2934b81630fa61 Mon Sep 17 00:00:00 2001 From: asyncapi-bot Date: Wed, 22 Feb 2023 18:50:48 +0100 Subject: [PATCH 033/102] chore(release): v5.0.0-next-major-spec.12 (#344) --- package-lock.json | 2 +- package.json | 2 +- schemas/3.0.0.json | 296 +++++++++++++++++++++++---------------------- 3 files changed, 152 insertions(+), 148 deletions(-) diff --git a/package-lock.json b/package-lock.json index 7736c3cf..7076d519 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "@asyncapi/specs", - "version": "5.0.0-next-major-spec.11", + "version": "5.0.0-next-major-spec.12", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index b7340a79..34f880ca 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@asyncapi/specs", - "version": "5.0.0-next-major-spec.11", + "version": "5.0.0-next-major-spec.12", "description": "AsyncAPI schema versions", "main": "index.js", "types": "index.d.ts", diff --git a/schemas/3.0.0.json b/schemas/3.0.0.json index d55ec6b4..6a4d8b3f 100644 --- a/schemas/3.0.0.json +++ b/schemas/3.0.0.json @@ -2038,171 +2038,175 @@ "oneOf": { "type": "array", "items": { - "$ref": "http://asyncapi.com/definitions/3.0.0/message.json" + "$ref": "http://asyncapi.com/definitions/3.0.0/messageObject.json" } } } }, { - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + "$ref": "http://asyncapi.com/definitions/3.0.0/messageObject.json" + } + ] + } + ] + }, + "http://asyncapi.com/definitions/3.0.0/messageObject.json": { + "$id": "http://asyncapi.com/definitions/3.0.0/messageObject.json", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "properties": { + "schemaFormat": { + "type": "string" + }, + "contentType": { + "type": "string" + }, + "headers": { + "allOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" + }, + { + "properties": { + "type": { + "const": "object" } + } + } + ] + }, + "messageId": { + "type": "string" + }, + "payload": {}, + "correlationId": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/correlationId.json" + } + ] + }, + "tags": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" }, - "properties": { - "schemaFormat": { - "type": "string" - }, - "contentType": { - "type": "string" - }, - "headers": { - "allOf": [ - { - "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" - }, - { - "properties": { - "type": { - "const": "object" - } - } - } - ] - }, - "messageId": { - "type": "string" - }, - "payload": {}, - "correlationId": { - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" - }, - { - "$ref": "http://asyncapi.com/definitions/3.0.0/correlationId.json" - } - ] - }, - "tags": { - "type": "array", - "items": { + { + "$ref": "http://asyncapi.com/definitions/3.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": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/externalDocs.json" + } + ] + }, + "deprecated": { + "type": "boolean", + "default": false + }, + "examples": { + "type": "array", + "items": { + "type": "object", + "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/3.0.0/messageBindingsObject.json" + }, + "traits": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/messageTrait.json" + }, + { + "type": "array", + "items": [ + { "oneOf": [ { "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" }, { - "$ref": "http://asyncapi.com/definitions/3.0.0/tag.json" + "$ref": "http://asyncapi.com/definitions/3.0.0/messageTrait.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": { - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" - }, - { - "$ref": "http://asyncapi.com/definitions/3.0.0/externalDocs.json" - } - ] - }, - "deprecated": { - "type": "boolean", - "default": false - }, - "examples": { - "type": "array", - "items": { + { "type": "object", - "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/3.0.0/messageBindingsObject.json" - }, - "traits": { - "type": "array", - "items": { - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" - }, - { - "$ref": "http://asyncapi.com/definitions/3.0.0/messageTrait.json" - }, - { - "type": "array", - "items": [ - { - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" - }, - { - "$ref": "http://asyncapi.com/definitions/3.0.0/messageTrait.json" - } - ] - }, - { - "type": "object", - "additionalItems": true - } - ] - } - ] + "additionalItems": true } - } + ] } - } - ] + ] + } } - ] + } }, "http://asyncapi.com/definitions/3.0.0/correlationId.json": { "$id": "http://asyncapi.com/definitions/3.0.0/correlationId.json", From 38fbec58069613f7faa81890f6a9af8e55ed5e8e Mon Sep 17 00:00:00 2001 From: asyncapi-bot Date: Wed, 22 Feb 2023 20:41:40 +0100 Subject: [PATCH 034/102] chore(release): v5.0.0-next-major-spec.13 (#346) --- package-lock.json | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index 7076d519..cd3c42db 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "@asyncapi/specs", - "version": "5.0.0-next-major-spec.12", + "version": "5.0.0-next-major-spec.13", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 34f880ca..881fc531 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@asyncapi/specs", - "version": "5.0.0-next-major-spec.12", + "version": "5.0.0-next-major-spec.13", "description": "AsyncAPI schema versions", "main": "index.js", "types": "index.d.ts", From ca7b444da4d1624fac3ca3be2a507d22a0a46302 Mon Sep 17 00:00:00 2001 From: Jonas Lagoni Date: Mon, 13 Mar 2023 12:48:40 +0100 Subject: [PATCH 035/102] feat: add core message payload validation (#334) --- definitions/3.0.0/messageObject.json | 84 ++++++++++++++++++++++++++++ 1 file changed, 84 insertions(+) diff --git a/definitions/3.0.0/messageObject.json b/definitions/3.0.0/messageObject.json index 3415b230..38339942 100644 --- a/definitions/3.0.0/messageObject.json +++ b/definitions/3.0.0/messageObject.json @@ -154,6 +154,90 @@ } } }, + "allOf": [ + { + "if": { + "not": { + "required": [ + "schemaFormat" + ] + } + }, + "then": { + "properties": { + "payload": { + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" + } + } + } + }, + { + "if": { + "required": [ + "schemaFormat" + ], + "properties": { + "schemaFormat": { + "enum": [ + "application/vnd.aai.asyncapi;version=2.0.0", + "application/vnd.aai.asyncapi+json;version=2.0.0", + "application/vnd.aai.asyncapi+yaml;version=2.0.0", + "application/vnd.aai.asyncapi;version=2.1.0", + "application/vnd.aai.asyncapi+json;version=2.1.0", + "application/vnd.aai.asyncapi+yaml;version=2.1.0", + "application/vnd.aai.asyncapi;version=2.2.0", + "application/vnd.aai.asyncapi+json;version=2.2.0", + "application/vnd.aai.asyncapi+yaml;version=2.2.0", + "application/vnd.aai.asyncapi;version=2.3.0", + "application/vnd.aai.asyncapi+json;version=2.3.0", + "application/vnd.aai.asyncapi+yaml;version=2.3.0", + "application/vnd.aai.asyncapi;version=2.4.0", + "application/vnd.aai.asyncapi+json;version=2.4.0", + "application/vnd.aai.asyncapi+yaml;version=2.4.0", + "application/vnd.aai.asyncapi;version=2.5.0", + "application/vnd.aai.asyncapi+json;version=2.5.0", + "application/vnd.aai.asyncapi+yaml;version=2.5.0", + "application/vnd.aai.asyncapi;version=2.6.0", + "application/vnd.aai.asyncapi+json;version=2.6.0", + "application/vnd.aai.asyncapi+yaml;version=2.6.0", + "application/vnd.aai.asyncapi;version=3.0.0", + "application/vnd.aai.asyncapi+json;version=3.0.0", + "application/vnd.aai.asyncapi+yaml;version=3.0.0" + ] + } + } + }, + "then": { + "properties": { + "payload": { + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" + } + } + } + }, + { + "if": { + "required": [ + "schemaFormat" + ], + "properties": { + "schemaFormat": { + "enum": [ + "application/schema+json;version=draft-07", + "application/schema+yaml;version=draft-07" + ] + } + } + }, + "then": { + "properties": { + "payload": { + "$ref": "http://json-schema.org/draft-07/schema" + } + } + } + } + ], "$schema": "http://json-schema.org/draft-07/schema#", "$id": "http://asyncapi.com/definitions/3.0.0/messageObject.json" } \ No newline at end of file From 26acf98e63c8013ebdbd69ad70d60aa576a50187 Mon Sep 17 00:00:00 2001 From: Jonas Lagoni Date: Mon, 13 Mar 2023 13:37:28 +0100 Subject: [PATCH 036/102] test: increase timeout that periodically fails (#350) --- test/schemas.js | 46 ++++++++++++++++++++++++---------------------- 1 file changed, 24 insertions(+), 22 deletions(-) diff --git a/test/schemas.js b/test/schemas.js index 562362d8..1f5a0712 100644 --- a/test/schemas.js +++ b/test/schemas.js @@ -7,27 +7,29 @@ const versionsToTest = [ version: '3.0.0' } ] - -it('Versions should accurately validate documents', () => { - for (const versionToTest of versionsToTest) { - const version = versionToTest.version; - const asyncapi = require('..'); - const schema = asyncapi[version]; - delete schema.definitions['http://json-schema.org/draft-07/schema']; - const ajv = new Ajv({ - jsonPointers: true, - allErrors: true, - schemaId: '$id', - logger: false, - validateFormats: false, - strict: false - }); - const documentPaths = fs.readdirSync(path.resolve(__dirname, `./docs/${version}`)).map((pathToDoc) => {return path.resolve(__dirname, `./docs/${version}/${pathToDoc}`)}); - for (const documentPath of documentPaths) { - const document = require(documentPath); - const validate = ajv.compile(schema) - const valid = validate(document) - assert(valid === true, 'Document must be validated correctly: ' + JSON.stringify(validate.errors, null, 4)); +describe("Should be able to validate", function () { + this.timeout(30000); + it('all valid documents', () => { + for (const versionToTest of versionsToTest) { + const version = versionToTest.version; + const asyncapi = require('..'); + const schema = asyncapi[version]; + delete schema.definitions['http://json-schema.org/draft-07/schema']; + const ajv = new Ajv({ + jsonPointers: true, + allErrors: true, + schemaId: '$id', + logger: false, + validateFormats: false, + strict: false + }); + const documentPaths = fs.readdirSync(path.resolve(__dirname, `./docs/${version}`)).map((pathToDoc) => {return path.resolve(__dirname, `./docs/${version}/${pathToDoc}`)}); + for (const documentPath of documentPaths) { + const document = require(documentPath); + const validate = ajv.compile(schema) + const valid = validate(document) + assert(valid === true, 'Document must be validated correctly: ' + JSON.stringify(validate.errors, null, 4)); + } } - } + }); }); From 9b1b4c3cd54ef04b0a11d1392ca669f1fcb65d6c Mon Sep 17 00:00:00 2001 From: Jonas Lagoni Date: Mon, 13 Mar 2023 16:19:31 +0100 Subject: [PATCH 037/102] feat: re-trigger message payload validation (#351) From 8e127db0a741f808d7fedc978ffca2df433586fe Mon Sep 17 00:00:00 2001 From: asyncapi-bot Date: Mon, 13 Mar 2023 16:24:25 +0100 Subject: [PATCH 038/102] chore(release): v5.0.0-next-major-spec.14 (#353) --- package-lock.json | 2 +- package.json | 2 +- schemas/3.0.0.json | 86 +++++++++++++++++++++++++++++++++++++++++++++- 3 files changed, 87 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index cd3c42db..c76ef651 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "@asyncapi/specs", - "version": "5.0.0-next-major-spec.13", + "version": "5.0.0-next-major-spec.14", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 881fc531..bc91d8d9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@asyncapi/specs", - "version": "5.0.0-next-major-spec.13", + "version": "5.0.0-next-major-spec.14", "description": "AsyncAPI schema versions", "main": "index.js", "types": "index.d.ts", diff --git a/schemas/3.0.0.json b/schemas/3.0.0.json index 6a4d8b3f..78a058b7 100644 --- a/schemas/3.0.0.json +++ b/schemas/3.0.0.json @@ -2206,7 +2206,91 @@ ] } } - } + }, + "allOf": [ + { + "if": { + "not": { + "required": [ + "schemaFormat" + ] + } + }, + "then": { + "properties": { + "payload": { + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" + } + } + } + }, + { + "if": { + "required": [ + "schemaFormat" + ], + "properties": { + "schemaFormat": { + "enum": [ + "application/vnd.aai.asyncapi;version=2.0.0", + "application/vnd.aai.asyncapi+json;version=2.0.0", + "application/vnd.aai.asyncapi+yaml;version=2.0.0", + "application/vnd.aai.asyncapi;version=2.1.0", + "application/vnd.aai.asyncapi+json;version=2.1.0", + "application/vnd.aai.asyncapi+yaml;version=2.1.0", + "application/vnd.aai.asyncapi;version=2.2.0", + "application/vnd.aai.asyncapi+json;version=2.2.0", + "application/vnd.aai.asyncapi+yaml;version=2.2.0", + "application/vnd.aai.asyncapi;version=2.3.0", + "application/vnd.aai.asyncapi+json;version=2.3.0", + "application/vnd.aai.asyncapi+yaml;version=2.3.0", + "application/vnd.aai.asyncapi;version=2.4.0", + "application/vnd.aai.asyncapi+json;version=2.4.0", + "application/vnd.aai.asyncapi+yaml;version=2.4.0", + "application/vnd.aai.asyncapi;version=2.5.0", + "application/vnd.aai.asyncapi+json;version=2.5.0", + "application/vnd.aai.asyncapi+yaml;version=2.5.0", + "application/vnd.aai.asyncapi;version=2.6.0", + "application/vnd.aai.asyncapi+json;version=2.6.0", + "application/vnd.aai.asyncapi+yaml;version=2.6.0", + "application/vnd.aai.asyncapi;version=3.0.0", + "application/vnd.aai.asyncapi+json;version=3.0.0", + "application/vnd.aai.asyncapi+yaml;version=3.0.0" + ] + } + } + }, + "then": { + "properties": { + "payload": { + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" + } + } + } + }, + { + "if": { + "required": [ + "schemaFormat" + ], + "properties": { + "schemaFormat": { + "enum": [ + "application/schema+json;version=draft-07", + "application/schema+yaml;version=draft-07" + ] + } + } + }, + "then": { + "properties": { + "payload": { + "$ref": "http://json-schema.org/draft-07/schema" + } + } + } + } + ] }, "http://asyncapi.com/definitions/3.0.0/correlationId.json": { "$id": "http://asyncapi.com/definitions/3.0.0/correlationId.json", From 48e7b43303cdb78134b7079286f247b87623edfd Mon Sep 17 00:00:00 2001 From: Jonas Lagoni Date: Tue, 14 Mar 2023 08:59:39 +0100 Subject: [PATCH 039/102] feat: add OpenAPI 3.0 schema validation (#348) Co-authored-by: Sergio Moya <1083296+smoya@users.noreply.github.com> --- definitions/3.0.0/messageObject.json | 23 ++ definitions/3.0.0/openapiSchema_3_0.json | 288 ++++++++++++++++++++++ test/docs/3.0.0/streetlights-openapi.json | 90 +++++++ 3 files changed, 401 insertions(+) create mode 100644 definitions/3.0.0/openapiSchema_3_0.json create mode 100644 test/docs/3.0.0/streetlights-openapi.json diff --git a/definitions/3.0.0/messageObject.json b/definitions/3.0.0/messageObject.json index 38339942..60ab0c5c 100644 --- a/definitions/3.0.0/messageObject.json +++ b/definitions/3.0.0/messageObject.json @@ -236,6 +236,29 @@ } } } + }, + { + "if": { + "required": [ + "schemaFormat" + ], + "properties": { + "schemaFormat": { + "enum": [ + "application/vnd.oai.openapi;version=3.0.0", + "application/vnd.oai.openapi+json;version=3.0.0", + "application/vnd.oai.openapi+yaml;version=3.0.0" + ] + } + } + }, + "then": { + "properties": { + "payload": { + "$ref": "http://asyncapi.com/definitions/3.0.0/openapiSchema_3_0.json" + } + } + } } ], "$schema": "http://json-schema.org/draft-07/schema#", diff --git a/definitions/3.0.0/openapiSchema_3_0.json b/definitions/3.0.0/openapiSchema_3_0.json new file mode 100644 index 00000000..a4b11b8b --- /dev/null +++ b/definitions/3.0.0/openapiSchema_3_0.json @@ -0,0 +1,288 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/3.0.0/openapiSchema_3_0.json", + "type": "object", + "definitions": { + "ExternalDocumentation": { + "type": "object", + "required": [ + "url" + ], + "properties": { + "description": { + "type": "string" + }, + "url": { + "type": "string", + "format": "uri-reference" + } + }, + "patternProperties": { + "^x-": {} + }, + "additionalProperties": false + }, + "Discriminator": { + "type": "object", + "required": [ + "propertyName" + ], + "properties": { + "propertyName": { + "type": "string" + }, + "mapping": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + }, + "Reference": { + "type": "object", + "required": [ + "$ref" + ], + "patternProperties": { + "^\\$ref$": { + "type": "string", + "format": "uri-reference" + } + } + }, + "XML": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "namespace": { + "type": "string", + "format": "uri" + }, + "prefix": { + "type": "string" + }, + "attribute": { + "type": "boolean", + "default": false + }, + "wrapped": { + "type": "boolean", + "default": false + } + }, + "patternProperties": { + "^x-": {} + }, + "additionalProperties": false + } + }, + "properties": { + "title": { + "type": "string" + }, + "multipleOf": { + "type": "number", + "exclusiveMinimum": 0 + }, + "maximum": { + "type": "number" + }, + "exclusiveMaximum": { + "type": "boolean", + "default": false + }, + "minimum": { + "type": "number" + }, + "exclusiveMinimum": { + "type": "boolean", + "default": false + }, + "maxLength": { + "type": "integer", + "minimum": 0 + }, + "minLength": { + "type": "integer", + "minimum": 0, + "default": 0 + }, + "pattern": { + "type": "string", + "format": "regex" + }, + "maxItems": { + "type": "integer", + "minimum": 0 + }, + "minItems": { + "type": "integer", + "minimum": 0, + "default": 0 + }, + "uniqueItems": { + "type": "boolean", + "default": false + }, + "maxProperties": { + "type": "integer", + "minimum": 0 + }, + "minProperties": { + "type": "integer", + "minimum": 0, + "default": 0 + }, + "required": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 1, + "uniqueItems": true + }, + "enum": { + "type": "array", + "items": true, + "minItems": 1, + "uniqueItems": false + }, + "type": { + "type": "string", + "enum": [ + "array", + "boolean", + "integer", + "number", + "object", + "string" + ] + }, + "not": { + "oneOf": [ + { + "$ref": "#" + }, + { + "$ref": "#/definitions/Reference" + } + ] + }, + "allOf": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#" + }, + { + "$ref": "#/definitions/Reference" + } + ] + } + }, + "oneOf": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#" + }, + { + "$ref": "#/definitions/Reference" + } + ] + } + }, + "anyOf": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#" + }, + { + "$ref": "#/definitions/Reference" + } + ] + } + }, + "items": { + "oneOf": [ + { + "$ref": "#" + }, + { + "$ref": "#/definitions/Reference" + } + ] + }, + "properties": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "$ref": "#" + }, + { + "$ref": "#/definitions/Reference" + } + ] + } + }, + "additionalProperties": { + "oneOf": [ + { + "$ref": "#" + }, + { + "$ref": "#/definitions/Reference" + }, + { + "type": "boolean" + } + ], + "default": true + }, + "description": { + "type": "string" + }, + "format": { + "type": "string" + }, + "default": true, + "nullable": { + "type": "boolean", + "default": false + }, + "discriminator": { + "$ref": "#/definitions/Discriminator" + }, + "readOnly": { + "type": "boolean", + "default": false + }, + "writeOnly": { + "type": "boolean", + "default": false + }, + "example": true, + "externalDocs": { + "$ref": "#/definitions/ExternalDocumentation" + }, + "deprecated": { + "type": "boolean", + "default": false + }, + "xml": { + "$ref": "#/definitions/XML" + } + }, + "patternProperties": { + "^x-": true + }, + "additionalProperties": false +} \ No newline at end of file diff --git a/test/docs/3.0.0/streetlights-openapi.json b/test/docs/3.0.0/streetlights-openapi.json new file mode 100644 index 00000000..939623c8 --- /dev/null +++ b/test/docs/3.0.0/streetlights-openapi.json @@ -0,0 +1,90 @@ +{ + "asyncapi": "3.0.0", + "info": { + "title": "Account Service", + "version": "1.0.0", + "description": "This service is in charge of processing user signups" + }, + "channels": { + "UserSignedUpChannel": { + "address": "user/signedup", + "messages": { + "UserSignedUp": { + "$ref": "#/components/messages/UserSignedUp" + } + } + } + }, + "operations": { + "PublishUserSignedUp": { + "action": "send", + "channel": { + "$ref": "#/channels/UserSignedUpChannel" + }, + "bindings": { + "mqtt": { + "bindingVersion": "0.1.0", + "qos": 1 + }, + "kafka": { + "bindingVersion": "0.3.0", + "clientId": { + "type": "string", + "enum": [ + "my-app-id" + ] + } + } + } + }, + "PublishUserSignedUpDefaultBinding": { + "action": "send", + "channel": { + "$ref": "#/channels/UserSignedUpChannel" + }, + "bindings": { + "mqtt": { + "qos": 1 + }, + "kafka": { + "clientId": { + "type": "string", + "enum": [ + "my-app-id" + ] + } + } + } + } + }, + "components": { + "messages": { + "UserSignedUp": { + "schemaFormat": "application/vnd.oai.openapi;version=3.0.0", + "payload": { + "properties": { + "id": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "completed": { + "type": "boolean" + }, + "completed_at": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + "required": [ + "id", + "name", + "completed" + ] + } + } + } + } +} \ No newline at end of file From cce9d44213120751f7f21497627738647a92e39f Mon Sep 17 00:00:00 2001 From: asyncapi-bot Date: Tue, 14 Mar 2023 09:03:50 +0100 Subject: [PATCH 040/102] chore(release): v5.0.0-next-major-spec.15 (#354) --- package-lock.json | 2 +- package.json | 2 +- schemas/3.0.0.json | 310 +++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 312 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index c76ef651..4f8e5bee 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "@asyncapi/specs", - "version": "5.0.0-next-major-spec.14", + "version": "5.0.0-next-major-spec.15", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index bc91d8d9..87ccd091 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@asyncapi/specs", - "version": "5.0.0-next-major-spec.14", + "version": "5.0.0-next-major-spec.15", "description": "AsyncAPI schema versions", "main": "index.js", "types": "index.d.ts", diff --git a/schemas/3.0.0.json b/schemas/3.0.0.json index 78a058b7..1a63a6b4 100644 --- a/schemas/3.0.0.json +++ b/schemas/3.0.0.json @@ -2289,6 +2289,29 @@ } } } + }, + { + "if": { + "required": [ + "schemaFormat" + ], + "properties": { + "schemaFormat": { + "enum": [ + "application/vnd.oai.openapi;version=3.0.0", + "application/vnd.oai.openapi+json;version=3.0.0", + "application/vnd.oai.openapi+yaml;version=3.0.0" + ] + } + } + }, + "then": { + "properties": { + "payload": { + "$ref": "http://asyncapi.com/definitions/3.0.0/openapiSchema_3_0.json" + } + } + } } ] }, @@ -3193,6 +3216,293 @@ } } }, + "http://asyncapi.com/definitions/3.0.0/openapiSchema_3_0.json": { + "$id": "http://asyncapi.com/definitions/3.0.0/openapiSchema_3_0.json", + "type": "object", + "definitions": { + "ExternalDocumentation": { + "type": "object", + "required": [ + "url" + ], + "properties": { + "description": { + "type": "string" + }, + "url": { + "type": "string", + "format": "uri-reference" + } + }, + "patternProperties": { + "^x-": {} + }, + "additionalProperties": false + }, + "Discriminator": { + "type": "object", + "required": [ + "propertyName" + ], + "properties": { + "propertyName": { + "type": "string" + }, + "mapping": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + }, + "Reference": { + "type": "object", + "required": [ + "$ref" + ], + "patternProperties": { + "^\\$ref$": { + "type": "string", + "format": "uri-reference" + } + } + }, + "XML": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "namespace": { + "type": "string", + "format": "uri" + }, + "prefix": { + "type": "string" + }, + "attribute": { + "type": "boolean", + "default": false + }, + "wrapped": { + "type": "boolean", + "default": false + } + }, + "patternProperties": { + "^x-": {} + }, + "additionalProperties": false + } + }, + "properties": { + "title": { + "type": "string" + }, + "multipleOf": { + "type": "number", + "exclusiveMinimum": 0 + }, + "maximum": { + "type": "number" + }, + "exclusiveMaximum": { + "type": "boolean", + "default": false + }, + "minimum": { + "type": "number" + }, + "exclusiveMinimum": { + "type": "boolean", + "default": false + }, + "maxLength": { + "type": "integer", + "minimum": 0 + }, + "minLength": { + "type": "integer", + "minimum": 0, + "default": 0 + }, + "pattern": { + "type": "string", + "format": "regex" + }, + "maxItems": { + "type": "integer", + "minimum": 0 + }, + "minItems": { + "type": "integer", + "minimum": 0, + "default": 0 + }, + "uniqueItems": { + "type": "boolean", + "default": false + }, + "maxProperties": { + "type": "integer", + "minimum": 0 + }, + "minProperties": { + "type": "integer", + "minimum": 0, + "default": 0 + }, + "required": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 1, + "uniqueItems": true + }, + "enum": { + "type": "array", + "items": true, + "minItems": 1, + "uniqueItems": false + }, + "type": { + "type": "string", + "enum": [ + "array", + "boolean", + "integer", + "number", + "object", + "string" + ] + }, + "not": { + "oneOf": [ + { + "$ref": "#" + }, + { + "$ref": "#/definitions/Reference" + } + ] + }, + "allOf": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#" + }, + { + "$ref": "#/definitions/Reference" + } + ] + } + }, + "oneOf": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#" + }, + { + "$ref": "#/definitions/Reference" + } + ] + } + }, + "anyOf": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#" + }, + { + "$ref": "#/definitions/Reference" + } + ] + } + }, + "items": { + "oneOf": [ + { + "$ref": "#" + }, + { + "$ref": "#/definitions/Reference" + } + ] + }, + "properties": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "$ref": "#" + }, + { + "$ref": "#/definitions/Reference" + } + ] + } + }, + "additionalProperties": { + "oneOf": [ + { + "$ref": "#" + }, + { + "$ref": "#/definitions/Reference" + }, + { + "type": "boolean" + } + ], + "default": true + }, + "description": { + "type": "string" + }, + "format": { + "type": "string" + }, + "default": true, + "nullable": { + "type": "boolean", + "default": false + }, + "discriminator": { + "$ref": "#/definitions/Discriminator" + }, + "readOnly": { + "type": "boolean", + "default": false + }, + "writeOnly": { + "type": "boolean", + "default": false + }, + "example": true, + "externalDocs": { + "$ref": "#/definitions/ExternalDocumentation" + }, + "deprecated": { + "type": "boolean", + "default": false + }, + "xml": { + "$ref": "#/definitions/XML" + } + }, + "patternProperties": { + "^x-": true + }, + "additionalProperties": false + }, "http://asyncapi.com/definitions/3.0.0/parameters.json": { "$id": "http://asyncapi.com/definitions/3.0.0/parameters.json", "type": "object", From dfd288fd97d71caf23577f8f87707fa1506572e0 Mon Sep 17 00:00:00 2001 From: Jonas Lagoni Date: Tue, 14 Mar 2023 09:27:06 +0100 Subject: [PATCH 041/102] fix: oneOf should not be allowed in message components (#345) --- definitions/3.0.0/components.json | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/definitions/3.0.0/components.json b/definitions/3.0.0/components.json index f7c7a7d1..b4af5e44 100644 --- a/definitions/3.0.0/components.json +++ b/definitions/3.0.0/components.json @@ -21,7 +21,19 @@ "$ref": "http://asyncapi.com/definitions/3.0.0/serverVariables.json" }, "messages": { - "$ref": "http://asyncapi.com/definitions/3.0.0/messages.json" + "type": "object", + "patternProperties": { + "^[\\w\\d\\.\\-_]+$": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/messageObject.json" + } + ] + } + } }, "securitySchemes": { "type": "object", From 1f090a6c867dbbd6544c1ac45b17dd79f3e95f33 Mon Sep 17 00:00:00 2001 From: asyncapi-bot Date: Tue, 14 Mar 2023 09:32:38 +0100 Subject: [PATCH 042/102] chore(release): v5.0.0-next-major-spec.16 (#355) --- package-lock.json | 2 +- package.json | 2 +- schemas/3.0.0.json | 22 +++++++++++++--------- 3 files changed, 15 insertions(+), 11 deletions(-) diff --git a/package-lock.json b/package-lock.json index 4f8e5bee..cc95585d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "@asyncapi/specs", - "version": "5.0.0-next-major-spec.15", + "version": "5.0.0-next-major-spec.16", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 87ccd091..7d96b496 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@asyncapi/specs", - "version": "5.0.0-next-major-spec.15", + "version": "5.0.0-next-major-spec.16", "description": "AsyncAPI schema versions", "main": "index.js", "types": "index.d.ts", diff --git a/schemas/3.0.0.json b/schemas/3.0.0.json index 1a63a6b4..a6eb9b6f 100644 --- a/schemas/3.0.0.json +++ b/schemas/3.0.0.json @@ -5629,7 +5629,19 @@ "$ref": "http://asyncapi.com/definitions/3.0.0/serverVariables.json" }, "messages": { - "$ref": "http://asyncapi.com/definitions/3.0.0/messages.json" + "type": "object", + "patternProperties": { + "^[\\w\\d\\.\\-_]+$": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/messageObject.json" + } + ] + } + } }, "securitySchemes": { "type": "object", @@ -5735,14 +5747,6 @@ "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" }, "description": "JSON objects describing schemas the API uses." - }, - "http://asyncapi.com/definitions/3.0.0/messages.json": { - "$id": "http://asyncapi.com/definitions/3.0.0/messages.json", - "type": "object", - "additionalProperties": { - "$ref": "http://asyncapi.com/definitions/3.0.0/message.json" - }, - "description": "JSON objects describing the messages being consumed and produced by the API." } }, "description": "!!Auto generated!! \n Do not manually edit. " From 488cf6bac5b00780d3be053c15e62c3d66072600 Mon Sep 17 00:00:00 2001 From: Jonas Lagoni Date: Wed, 15 Mar 2023 11:25:16 +0100 Subject: [PATCH 043/102] feat: add AVRO schema validation (#347) Co-authored-by: Sergio Moya <1083296+smoya@users.noreply.github.com> --- definitions/3.0.0/avroSchema_v1.json | 317 +++++++++++++++++++++++++ definitions/3.0.0/messageObject.json | 23 ++ test/docs/3.0.0/streetlights-avro.json | 250 +++++++++++++++++++ 3 files changed, 590 insertions(+) create mode 100644 definitions/3.0.0/avroSchema_v1.json create mode 100644 test/docs/3.0.0/streetlights-avro.json diff --git a/definitions/3.0.0/avroSchema_v1.json b/definitions/3.0.0/avroSchema_v1.json new file mode 100644 index 00000000..d3448f10 --- /dev/null +++ b/definitions/3.0.0/avroSchema_v1.json @@ -0,0 +1,317 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/3.0.0/avroSchema_v1.json", + "definitions": { + "avroSchema": { + "title": "Avro Schema", + "description": "Root Schema", + "oneOf": [ + { + "$ref": "#/definitions/types" + } + ] + }, + "types": { + "title": "Avro Types", + "description": "Allowed Avro types", + "oneOf": [ + { + "$ref": "#/definitions/primitiveType" + }, + { + "$ref": "#/definitions/primitiveTypeWithMetadata" + }, + { + "$ref": "#/definitions/customTypeReference" + }, + { + "$ref": "#/definitions/avroRecord" + }, + { + "$ref": "#/definitions/avroEnum" + }, + { + "$ref": "#/definitions/avroArray" + }, + { + "$ref": "#/definitions/avroMap" + }, + { + "$ref": "#/definitions/avroFixed" + }, + { + "$ref": "#/definitions/avroUnion" + } + ] + }, + "primitiveType": { + "title": "Primitive Type", + "description": "Basic type primitives.", + "type": "string", + "enum": [ + "null", + "boolean", + "int", + "long", + "float", + "double", + "bytes", + "string" + ] + }, + "primitiveTypeWithMetadata": { + "title": "Primitive Type With Metadata", + "description": "A primitive type with metadata attached.", + "type": "object", + "properties": { + "type": { + "$ref": "#/definitions/primitiveType" + } + }, + "required": [ + "type" + ] + }, + "customTypeReference": { + "title": "Custom Type", + "description": "Reference to a ComplexType", + "not": { + "$ref": "#/definitions/primitiveType" + }, + "type": "string", + "pattern": "^[A-Za-z_][A-Za-z0-9_]*(\\.[A-Za-z_][A-Za-z0-9_]*)*$" + }, + "avroUnion": { + "title": "Union", + "description": "A Union of types", + "type": "array", + "items": { + "$ref": "#/definitions/avroSchema" + }, + "minItems": 1 + }, + "avroField": { + "title": "Field", + "description": "A field within a Record", + "type": "object", + "properties": { + "name": { + "$ref": "#/definitions/name" + }, + "type": { + "$ref": "#/definitions/types" + }, + "doc": { + "type": "string" + }, + "default": true, + "order": { + "enum": [ + "ascending", + "descending", + "ignore" + ] + }, + "aliases": { + "type": "array", + "items": { + "$ref": "#/definitions/name" + } + } + }, + "required": [ + "name", + "type" + ] + }, + "avroRecord": { + "title": "Record", + "description": "A Record", + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "record" + }, + "name": { + "$ref": "#/definitions/name" + }, + "namespace": { + "$ref": "#/definitions/namespace" + }, + "doc": { + "type": "string" + }, + "aliases": { + "type": "array", + "items": { + "$ref": "#/definitions/name" + } + }, + "fields": { + "type": "array", + "items": { + "$ref": "#/definitions/avroField" + } + } + }, + "required": [ + "type", + "name", + "fields" + ] + }, + "avroEnum": { + "title": "Enum", + "description": "An enumeration", + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "enum" + }, + "name": { + "$ref": "#/definitions/name" + }, + "namespace": { + "$ref": "#/definitions/namespace" + }, + "doc": { + "type": "string" + }, + "aliases": { + "type": "array", + "items": { + "$ref": "#/definitions/name" + } + }, + "symbols": { + "type": "array", + "items": { + "$ref": "#/definitions/name" + } + } + }, + "required": [ + "type", + "name", + "symbols" + ] + }, + "avroArray": { + "title": "Array", + "description": "An array", + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "array" + }, + "name": { + "$ref": "#/definitions/name" + }, + "namespace": { + "$ref": "#/definitions/namespace" + }, + "doc": { + "type": "string" + }, + "aliases": { + "type": "array", + "items": { + "$ref": "#/definitions/name" + } + }, + "items": { + "$ref": "#/definitions/types" + } + }, + "required": [ + "type", + "items" + ] + }, + "avroMap": { + "title": "Map", + "description": "A map of values", + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "map" + }, + "name": { + "$ref": "#/definitions/name" + }, + "namespace": { + "$ref": "#/definitions/namespace" + }, + "doc": { + "type": "string" + }, + "aliases": { + "type": "array", + "items": { + "$ref": "#/definitions/name" + } + }, + "values": { + "$ref": "#/definitions/types" + } + }, + "required": [ + "type", + "values" + ] + }, + "avroFixed": { + "title": "Fixed", + "description": "A fixed sized array of bytes", + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "fixed" + }, + "name": { + "$ref": "#/definitions/name" + }, + "namespace": { + "$ref": "#/definitions/namespace" + }, + "doc": { + "type": "string" + }, + "aliases": { + "type": "array", + "items": { + "$ref": "#/definitions/name" + } + }, + "size": { + "type": "number" + } + }, + "required": [ + "type", + "name", + "size" + ] + }, + "name": { + "type": "string", + "pattern": "^[A-Za-z_][A-Za-z0-9_]*$" + }, + "namespace": { + "type": "string", + "pattern": "^([A-Za-z_][A-Za-z0-9_]*(\\.[A-Za-z_][A-Za-z0-9_]*)*)*$" + } + }, + "description": "Json-Schema definition for Avro AVSC files.", + "oneOf": [ + { + "$ref": "#/definitions/avroSchema" + } + ], + "title": "Avro Schema Definition" +} \ No newline at end of file diff --git a/definitions/3.0.0/messageObject.json b/definitions/3.0.0/messageObject.json index 60ab0c5c..e62f0d66 100644 --- a/definitions/3.0.0/messageObject.json +++ b/definitions/3.0.0/messageObject.json @@ -259,6 +259,29 @@ } } } + }, + { + "if": { + "required": [ + "schemaFormat" + ], + "properties": { + "schemaFormat": { + "enum": [ + "application/vnd.apache.avro;version=1.9.0", + "application/vnd.apache.avro+json;version=1.9.0", + "application/vnd.apache.avro+yaml;version=1.9.0" + ] + } + } + }, + "then": { + "properties": { + "payload": { + "$ref": "http://asyncapi.com/definitions/3.0.0/avroSchema_v1.json" + } + } + } } ], "$schema": "http://json-schema.org/draft-07/schema#", diff --git a/test/docs/3.0.0/streetlights-avro.json b/test/docs/3.0.0/streetlights-avro.json new file mode 100644 index 00000000..2e6a2399 --- /dev/null +++ b/test/docs/3.0.0/streetlights-avro.json @@ -0,0 +1,250 @@ +{ + "asyncapi": "3.0.0", + "info": { + "title": "Account Service", + "version": "1.0.0", + "description": "This service is in charge of processing user signups" + }, + "channels": { + "UserSignedUpChannel": { + "address": "user/signedup", + "messages": { + "UserSignedUp": { + "$ref": "#/components/messages/UserSignedUp" + } + } + } + }, + "operations": { + "PublishUserSignedUp": { + "action": "send", + "channel": { + "$ref": "#/channels/UserSignedUpChannel" + }, + "bindings": { + "mqtt": { + "bindingVersion": "0.1.0", + "qos": 1 + }, + "kafka": { + "bindingVersion": "0.3.0", + "clientId": { + "type": "string", + "enum": [ + "my-app-id" + ] + } + } + } + }, + "PublishUserSignedUpDefaultBinding": { + "action": "send", + "channel": { + "$ref": "#/channels/UserSignedUpChannel" + }, + "bindings": { + "mqtt": { + "qos": 1 + }, + "kafka": { + "clientId": { + "type": "string", + "enum": [ + "my-app-id" + ] + } + } + } + } + }, + "components": { + "messages": { + "UserSignedUp": { + "schemaFormat": "application/vnd.apache.avro;version=1.9.0", + "payload": { + "doc": "This is a user record in a fictitious to-do-list management app. It supports arbitrary grouping and nesting of items, and allows you to add items by email or by tweeting.\n\nNote this app doesn't actually exist. The schema is just a demo for [Avrodoc](https://github.com/ept/avrodoc)!", + "fields": [ + { + "name": "id", + "doc": "System-assigned numeric user ID. Cannot be changed by the user.", + "type": "int" + }, + { + "name": "username", + "doc": "The username chosen by the user. Can be changed by the user.", + "type": "string" + }, + { + "name": "passwordHash", + "doc": "The user's password, hashed using [scrypt](http://www.tarsnap.com/scrypt.html).", + "type": "string" + }, + { + "name": "signupDate", + "doc": "Timestamp (milliseconds since epoch) when the user signed up", + "type": "long" + }, + { + "name": "emailAddresses", + "doc": "All email addresses on the user's account", + "type": { + "type": "array", + "items": { + "type": "record", + "name": "EmailAddress", + "doc": "Stores details about an email address that a user has associated with their account.", + "fields": [ + { + "name": "address", + "doc": "The email address, e.g. `foo@example.com`", + "type": "string" + }, + { + "name": "verified", + "doc": "true if the user has clicked the link in a confirmation email to this address.", + "type": "boolean", + "default": false + }, + { + "name": "dateAdded", + "doc": "Timestamp (milliseconds since epoch) when the email address was added to the account.", + "type": "long" + }, + { + "name": "dateBounced", + "doc": "Timestamp (milliseconds since epoch) when an email sent to this address last bounced. Reset to null when the address no longer bounces.", + "type": [ + "null", + "long" + ] + } + ] + } + } + }, + { + "name": "twitterAccounts", + "doc": "All Twitter accounts that the user has OAuthed", + "type": { + "type": "array", + "items": { + "type": "record", + "name": "TwitterAccount", + "doc": "Stores access credentials for one Twitter account, as granted to us by the user by OAuth.", + "fields": [ + { + "name": "status", + "doc": "Indicator of whether this authorization is currently active, or has been revoked", + "type": { + "type": "enum", + "name": "OAuthStatus", + "doc": "* `PENDING`: the user has started authorizing, but not yet finished\n* `ACTIVE`: the token should work\n* `DENIED`: the user declined the authorization\n* `EXPIRED`: the token used to work, but now it doesn't\n* `REVOKED`: the user has explicitly revoked the token", + "symbols": [ + "PENDING", + "ACTIVE", + "DENIED", + "EXPIRED", + "REVOKED" + ] + } + }, + { + "name": "userId", + "doc": "Twitter's numeric ID for this user", + "type": "long" + }, + { + "name": "screenName", + "doc": "The twitter username for this account (can be changed by the user)", + "type": "string" + }, + { + "name": "oauthToken", + "doc": "The OAuth token for this Twitter account", + "type": "string" + }, + { + "name": "oauthTokenSecret", + "doc": "The OAuth secret, used for signing requests on behalf of this Twitter account. `null` whilst the OAuth flow is not yet complete.", + "type": [ + "null", + "string" + ] + }, + { + "name": "dateAuthorized", + "doc": "Timestamp (milliseconds since epoch) when the user last authorized this Twitter account", + "type": "long" + } + ] + } + } + }, + { + "name": "toDoItems", + "doc": "The top-level items in the user's to-do list", + "type": { + "type": "array", + "items": { + "type": "record", + "name": "ToDoItem", + "doc": "A record is one node in a To-Do item tree (every record can contain nested sub-records).", + "fields": [ + { + "name": "status", + "doc": "User-selected state for this item (e.g. whether or not it is marked as done)", + "type": { + "type": "enum", + "name": "ToDoStatus", + "doc": "* `HIDDEN`: not currently visible, e.g. because it becomes actionable in future\n* `ACTIONABLE`: appears in the current to-do list\n* `DONE`: marked as done, but still appears in the list\n* `ARCHIVED`: marked as done and no longer visible\n* `DELETED`: not done and removed from list (preserved for undo purposes)", + "symbols": [ + "HIDDEN", + "ACTIONABLE", + "DONE", + "ARCHIVED", + "DELETED" + ] + } + }, + { + "name": "title", + "doc": "One-line summary of the item", + "type": "string" + }, + { + "name": "description", + "doc": "Detailed description (may contain HTML markup)", + "type": [ + "null", + "string" + ] + }, + { + "name": "snoozeDate", + "doc": "Timestamp (milliseconds since epoch) at which the item should go from `HIDDEN` to `ACTIONABLE` status", + "type": [ + "null", + "long" + ] + }, + { + "name": "subItems", + "doc": "List of children of this to-do tree node", + "type": { + "type": "array", + "items": "ToDoItem" + } + } + ] + } + } + } + ], + "name": "User", + "namespace": "com.example.avro", + "type": "record" + } + } + } + } +} \ No newline at end of file From 3e6a320b5c4f0c5dd0e98eb7840bb5f858322d57 Mon Sep 17 00:00:00 2001 From: asyncapi-bot Date: Wed, 15 Mar 2023 11:29:52 +0100 Subject: [PATCH 044/102] chore(release): v5.0.0-next-major-spec.17 (#360) --- package-lock.json | 2 +- package.json | 2 +- schemas/3.0.0.json | 339 +++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 341 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index cc95585d..6c93f675 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "@asyncapi/specs", - "version": "5.0.0-next-major-spec.16", + "version": "5.0.0-next-major-spec.17", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 7d96b496..e01aa2cf 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@asyncapi/specs", - "version": "5.0.0-next-major-spec.16", + "version": "5.0.0-next-major-spec.17", "description": "AsyncAPI schema versions", "main": "index.js", "types": "index.d.ts", diff --git a/schemas/3.0.0.json b/schemas/3.0.0.json index a6eb9b6f..1127809a 100644 --- a/schemas/3.0.0.json +++ b/schemas/3.0.0.json @@ -2312,6 +2312,29 @@ } } } + }, + { + "if": { + "required": [ + "schemaFormat" + ], + "properties": { + "schemaFormat": { + "enum": [ + "application/vnd.apache.avro;version=1.9.0", + "application/vnd.apache.avro+json;version=1.9.0", + "application/vnd.apache.avro+yaml;version=1.9.0" + ] + } + } + }, + "then": { + "properties": { + "payload": { + "$ref": "http://asyncapi.com/definitions/3.0.0/avroSchema_v1.json" + } + } + } } ] }, @@ -3503,6 +3526,322 @@ }, "additionalProperties": false }, + "http://asyncapi.com/definitions/3.0.0/avroSchema_v1.json": { + "$id": "http://asyncapi.com/definitions/3.0.0/avroSchema_v1.json", + "definitions": { + "avroSchema": { + "title": "Avro Schema", + "description": "Root Schema", + "oneOf": [ + { + "$ref": "#/definitions/types" + } + ] + }, + "types": { + "title": "Avro Types", + "description": "Allowed Avro types", + "oneOf": [ + { + "$ref": "#/definitions/primitiveType" + }, + { + "$ref": "#/definitions/primitiveTypeWithMetadata" + }, + { + "$ref": "#/definitions/customTypeReference" + }, + { + "$ref": "#/definitions/avroRecord" + }, + { + "$ref": "#/definitions/avroEnum" + }, + { + "$ref": "#/definitions/avroArray" + }, + { + "$ref": "#/definitions/avroMap" + }, + { + "$ref": "#/definitions/avroFixed" + }, + { + "$ref": "#/definitions/avroUnion" + } + ] + }, + "primitiveType": { + "title": "Primitive Type", + "description": "Basic type primitives.", + "type": "string", + "enum": [ + "null", + "boolean", + "int", + "long", + "float", + "double", + "bytes", + "string" + ] + }, + "primitiveTypeWithMetadata": { + "title": "Primitive Type With Metadata", + "description": "A primitive type with metadata attached.", + "type": "object", + "properties": { + "type": { + "$ref": "#/definitions/primitiveType" + } + }, + "required": [ + "type" + ] + }, + "customTypeReference": { + "title": "Custom Type", + "description": "Reference to a ComplexType", + "not": { + "$ref": "#/definitions/primitiveType" + }, + "type": "string", + "pattern": "^[A-Za-z_][A-Za-z0-9_]*(\\.[A-Za-z_][A-Za-z0-9_]*)*$" + }, + "avroUnion": { + "title": "Union", + "description": "A Union of types", + "type": "array", + "items": { + "$ref": "#/definitions/avroSchema" + }, + "minItems": 1 + }, + "avroField": { + "title": "Field", + "description": "A field within a Record", + "type": "object", + "properties": { + "name": { + "$ref": "#/definitions/name" + }, + "type": { + "$ref": "#/definitions/types" + }, + "doc": { + "type": "string" + }, + "default": true, + "order": { + "enum": [ + "ascending", + "descending", + "ignore" + ] + }, + "aliases": { + "type": "array", + "items": { + "$ref": "#/definitions/name" + } + } + }, + "required": [ + "name", + "type" + ] + }, + "avroRecord": { + "title": "Record", + "description": "A Record", + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "record" + }, + "name": { + "$ref": "#/definitions/name" + }, + "namespace": { + "$ref": "#/definitions/namespace" + }, + "doc": { + "type": "string" + }, + "aliases": { + "type": "array", + "items": { + "$ref": "#/definitions/name" + } + }, + "fields": { + "type": "array", + "items": { + "$ref": "#/definitions/avroField" + } + } + }, + "required": [ + "type", + "name", + "fields" + ] + }, + "avroEnum": { + "title": "Enum", + "description": "An enumeration", + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "enum" + }, + "name": { + "$ref": "#/definitions/name" + }, + "namespace": { + "$ref": "#/definitions/namespace" + }, + "doc": { + "type": "string" + }, + "aliases": { + "type": "array", + "items": { + "$ref": "#/definitions/name" + } + }, + "symbols": { + "type": "array", + "items": { + "$ref": "#/definitions/name" + } + } + }, + "required": [ + "type", + "name", + "symbols" + ] + }, + "avroArray": { + "title": "Array", + "description": "An array", + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "array" + }, + "name": { + "$ref": "#/definitions/name" + }, + "namespace": { + "$ref": "#/definitions/namespace" + }, + "doc": { + "type": "string" + }, + "aliases": { + "type": "array", + "items": { + "$ref": "#/definitions/name" + } + }, + "items": { + "$ref": "#/definitions/types" + } + }, + "required": [ + "type", + "items" + ] + }, + "avroMap": { + "title": "Map", + "description": "A map of values", + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "map" + }, + "name": { + "$ref": "#/definitions/name" + }, + "namespace": { + "$ref": "#/definitions/namespace" + }, + "doc": { + "type": "string" + }, + "aliases": { + "type": "array", + "items": { + "$ref": "#/definitions/name" + } + }, + "values": { + "$ref": "#/definitions/types" + } + }, + "required": [ + "type", + "values" + ] + }, + "avroFixed": { + "title": "Fixed", + "description": "A fixed sized array of bytes", + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "fixed" + }, + "name": { + "$ref": "#/definitions/name" + }, + "namespace": { + "$ref": "#/definitions/namespace" + }, + "doc": { + "type": "string" + }, + "aliases": { + "type": "array", + "items": { + "$ref": "#/definitions/name" + } + }, + "size": { + "type": "number" + } + }, + "required": [ + "type", + "name", + "size" + ] + }, + "name": { + "type": "string", + "pattern": "^[A-Za-z_][A-Za-z0-9_]*$" + }, + "namespace": { + "type": "string", + "pattern": "^([A-Za-z_][A-Za-z0-9_]*(\\.[A-Za-z_][A-Za-z0-9_]*)*)*$" + } + }, + "description": "Json-Schema definition for Avro AVSC files.", + "oneOf": [ + { + "$ref": "#/definitions/avroSchema" + } + ], + "title": "Avro Schema Definition" + }, "http://asyncapi.com/definitions/3.0.0/parameters.json": { "$id": "http://asyncapi.com/definitions/3.0.0/parameters.json", "type": "object", From d3ea9c3c95730561c76318fcb2458b3d99541d61 Mon Sep 17 00:00:00 2001 From: asyncapi-bot Date: Fri, 17 Mar 2023 14:27:01 +0100 Subject: [PATCH 045/102] chore(release): v5.0.0-next-major-spec.18 (#366) --- package-lock.json | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index 6c93f675..76462577 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "@asyncapi/specs", - "version": "5.0.0-next-major-spec.17", + "version": "5.0.0-next-major-spec.18", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index e01aa2cf..1e48db97 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@asyncapi/specs", - "version": "5.0.0-next-major-spec.17", + "version": "5.0.0-next-major-spec.18", "description": "AsyncAPI schema versions", "main": "index.js", "types": "index.d.ts", From 6ceb4e4e809255c00f0858774e1df49696ececd2 Mon Sep 17 00:00:00 2001 From: Jonas Lagoni Date: Wed, 12 Apr 2023 01:13:48 +0200 Subject: [PATCH 046/102] fix: consistency and nested traits (#342) Co-authored-by: Sergio Moya <1083296+smoya@users.noreply.github.com> --- definitions/3.0.0/bindingsObject.json | 24 ------------------ definitions/3.0.0/channelMessages.json | 9 ++++++- definitions/3.0.0/channels.json | 8 ++++-- definitions/3.0.0/external.json | 5 ---- definitions/3.0.0/message.json | 35 +++++++++++--------------- definitions/3.0.0/messages.json | 9 ++++++- definitions/3.0.0/operation.json | 19 -------------- definitions/3.0.0/operations.json | 8 ++++-- 8 files changed, 42 insertions(+), 75 deletions(-) delete mode 100644 definitions/3.0.0/bindingsObject.json delete mode 100644 definitions/3.0.0/external.json diff --git a/definitions/3.0.0/bindingsObject.json b/definitions/3.0.0/bindingsObject.json deleted file mode 100644 index cec5e0fc..00000000 --- a/definitions/3.0.0/bindingsObject.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "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/3.0.0/bindingsObject.json" -} \ No newline at end of file diff --git a/definitions/3.0.0/channelMessages.json b/definitions/3.0.0/channelMessages.json index e15c044c..737404e1 100644 --- a/definitions/3.0.0/channelMessages.json +++ b/definitions/3.0.0/channelMessages.json @@ -1,7 +1,14 @@ { "type": "object", "additionalProperties": { - "$ref": "http://asyncapi.com/definitions/3.0.0/message.json" + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/message.json" + } + ] }, "description": "A map of the messages that will be sent to this channel by any application at any time. **Every message sent to this channel MUST be valid against one, and only one, of the message objects defined in this map.**", "$schema": "http://json-schema.org/draft-07/schema#", diff --git a/definitions/3.0.0/channels.json b/definitions/3.0.0/channels.json index 2efd382e..a4f4e89d 100644 --- a/definitions/3.0.0/channels.json +++ b/definitions/3.0.0/channels.json @@ -2,8 +2,12 @@ "type": "object", "additionalProperties": { "oneOf": [ - { "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" }, - { "$ref": "http://asyncapi.com/definitions/3.0.0/channel.json" } + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/channel.json" + } ] }, "$schema": "http://json-schema.org/draft-07/schema#", diff --git a/definitions/3.0.0/external.json b/definitions/3.0.0/external.json deleted file mode 100644 index c8aa2109..00000000 --- a/definitions/3.0.0/external.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "http://asyncapi.com/definitions/3.0.0/http://something.example.com/schemas/external.json", - "type": "string" - } \ No newline at end of file diff --git a/definitions/3.0.0/message.json b/definitions/3.0.0/message.json index 182240a0..d3fc8cd2 100644 --- a/definitions/3.0.0/message.json +++ b/definitions/3.0.0/message.json @@ -1,29 +1,22 @@ { "oneOf": [ { - "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" - }, - { - "oneOf": [ - { - "type": "object", - "required": [ - "oneOf" - ], - "additionalProperties": false, - "properties": { - "oneOf": { - "type": "array", - "items": { - "$ref": "http://asyncapi.com/definitions/3.0.0/messageObject.json" - } - } + "type": "object", + "required": [ + "oneOf" + ], + "additionalProperties": false, + "properties": { + "oneOf": { + "type": "array", + "items": { + "$ref": "http://asyncapi.com/definitions/3.0.0/messageObject.json" } - }, - { - "$ref": "http://asyncapi.com/definitions/3.0.0/messageObject.json" } - ] + } + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/messageObject.json" } ], "$schema": "http://json-schema.org/draft-07/schema#", diff --git a/definitions/3.0.0/messages.json b/definitions/3.0.0/messages.json index a57453e0..2522b7a1 100644 --- a/definitions/3.0.0/messages.json +++ b/definitions/3.0.0/messages.json @@ -1,7 +1,14 @@ { "type": "object", "additionalProperties": { - "$ref": "http://asyncapi.com/definitions/3.0.0/message.json" + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.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#", diff --git a/definitions/3.0.0/operation.json b/definitions/3.0.0/operation.json index aead26de..e8789805 100644 --- a/definitions/3.0.0/operation.json +++ b/definitions/3.0.0/operation.json @@ -28,25 +28,6 @@ }, { "$ref": "http://asyncapi.com/definitions/3.0.0/operationTrait.json" - }, - { - "type": "array", - "items": [ - { - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" - }, - { - "$ref": "http://asyncapi.com/definitions/3.0.0/operationTrait.json" - } - ] - }, - { - "type": "object", - "additionalItems": true - } - ] } ] } diff --git a/definitions/3.0.0/operations.json b/definitions/3.0.0/operations.json index 748982cc..7d44877f 100644 --- a/definitions/3.0.0/operations.json +++ b/definitions/3.0.0/operations.json @@ -2,8 +2,12 @@ "type": "object", "additionalProperties": { "oneOf": [ - { "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" }, - { "$ref": "http://asyncapi.com/definitions/3.0.0/operation.json" } + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/operation.json" + } ] }, "$schema": "http://json-schema.org/draft-07/schema#", From 2b3e23fed0372832ce77bc4f7217d2614cf43c33 Mon Sep 17 00:00:00 2001 From: asyncapi-bot Date: Wed, 12 Apr 2023 01:17:18 +0200 Subject: [PATCH 047/102] chore(release): v5.0.0-next-major-spec.19 (#372) --- package-lock.json | 2 +- package.json | 2 +- schemas/3.0.0.json | 63 ++++++++++++++++------------------------------ 3 files changed, 24 insertions(+), 43 deletions(-) diff --git a/package-lock.json b/package-lock.json index 76462577..04038d79 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "@asyncapi/specs", - "version": "5.0.0-next-major-spec.18", + "version": "5.0.0-next-major-spec.19", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 1e48db97..d8f92030 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@asyncapi/specs", - "version": "5.0.0-next-major-spec.18", + "version": "5.0.0-next-major-spec.19", "description": "AsyncAPI schema versions", "main": "index.js", "types": "index.d.ts", diff --git a/schemas/3.0.0.json b/schemas/3.0.0.json index 1127809a..92283b0d 100644 --- a/schemas/3.0.0.json +++ b/schemas/3.0.0.json @@ -2016,7 +2016,14 @@ "$id": "http://asyncapi.com/definitions/3.0.0/channelMessages.json", "type": "object", "additionalProperties": { - "$ref": "http://asyncapi.com/definitions/3.0.0/message.json" + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/message.json" + } + ] }, "description": "A map of the messages that will be sent to this channel by any application at any time. **Every message sent to this channel MUST be valid against one, and only one, of the message objects defined in this map.**" }, @@ -2024,29 +2031,22 @@ "$id": "http://asyncapi.com/definitions/3.0.0/message.json", "oneOf": [ { - "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" - }, - { - "oneOf": [ - { - "type": "object", - "required": [ - "oneOf" - ], - "additionalProperties": false, - "properties": { - "oneOf": { - "type": "array", - "items": { - "$ref": "http://asyncapi.com/definitions/3.0.0/messageObject.json" - } - } + "type": "object", + "required": [ + "oneOf" + ], + "additionalProperties": false, + "properties": { + "oneOf": { + "type": "array", + "items": { + "$ref": "http://asyncapi.com/definitions/3.0.0/messageObject.json" } - }, - { - "$ref": "http://asyncapi.com/definitions/3.0.0/messageObject.json" } - ] + } + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/messageObject.json" } ] }, @@ -4910,25 +4910,6 @@ }, { "$ref": "http://asyncapi.com/definitions/3.0.0/operationTrait.json" - }, - { - "type": "array", - "items": [ - { - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" - }, - { - "$ref": "http://asyncapi.com/definitions/3.0.0/operationTrait.json" - } - ] - }, - { - "type": "object", - "additionalItems": true - } - ] } ] } From b48eb67facbd12d3e36635af13b8d1a1e08f8b1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maciej=20Urba=C5=84czyk?= Date: Thu, 4 May 2023 08:23:17 +0200 Subject: [PATCH 048/102] feat: add reply object and reply address object (#330) Co-authored-by: Sergio Moya <1083296+smoya@users.noreply.github.com> --- definitions/3.0.0/components.json | 70 +++++++++++++++----- definitions/3.0.0/operation.json | 16 +++++ definitions/3.0.0/operationReply.json | 32 +++++++++ definitions/3.0.0/operationReplyAddress.json | 25 +++++++ 4 files changed, 125 insertions(+), 18 deletions(-) create mode 100644 definitions/3.0.0/operationReply.json create mode 100644 definitions/3.0.0/operationReplyAddress.json diff --git a/definitions/3.0.0/components.json b/definitions/3.0.0/components.json index b4af5e44..1524c0c5 100644 --- a/definitions/3.0.0/components.json +++ b/definitions/3.0.0/components.json @@ -80,6 +80,36 @@ "$ref": "http://asyncapi.com/definitions/3.0.0/messageTrait.json" } }, + "replies": { + "type": "object", + "patternProperties": { + "^[\\w\\d\\.\\-_]+$": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/operationReply.json" + } + ] + } + } + }, + "replyAddresses": { + "type": "object", + "patternProperties": { + "^[\\w\\d\\.\\-_]+$": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/operationReplyAddress.json" + } + ] + } + } + }, "serverBindings": { "type": "object", "additionalProperties": { @@ -106,28 +136,32 @@ }, "tags": { "type": "object", - "additionalProperties": { - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" - }, - { - "$ref": "http://asyncapi.com/definitions/3.0.0/tag.json" - } - ] + "patternProperties": { + "^[\\w\\d\\.\\-_]+$": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/tag.json" + } + ] + } } }, "externalDocs": { "type": "object", - "additionalProperties": { - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" - }, - { - "$ref": "http://asyncapi.com/definitions/3.0.0/externalDocs.json" - } - ] + "patternProperties": { + "^[\\w\\d\\.\\-_]+$": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/externalDocs.json" + } + ] + } } } }, diff --git a/definitions/3.0.0/operation.json b/definitions/3.0.0/operation.json index e8789805..3bcf7fea 100644 --- a/definitions/3.0.0/operation.json +++ b/definitions/3.0.0/operation.json @@ -19,6 +19,22 @@ "channel": { "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" }, + "messages": { + "type": "array", + "items": { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + } + }, + "reply": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/operationReply.json" + } + ] + }, "traits": { "type": "array", "items": { diff --git a/definitions/3.0.0/operationReply.json b/definitions/3.0.0/operationReply.json new file mode 100644 index 00000000..2cf7c0e9 --- /dev/null +++ b/definitions/3.0.0/operationReply.json @@ -0,0 +1,32 @@ +{ + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "properties": { + "address": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/operationReplyAddress.json" + } + ] + }, + "channel": { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + "messages": { + "type": "array", + "items": { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + } + } + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/3.0.0/operationReply.json" +} \ No newline at end of file diff --git a/definitions/3.0.0/operationReplyAddress.json b/definitions/3.0.0/operationReplyAddress.json new file mode 100644 index 00000000..dd7d0e2c --- /dev/null +++ b/definitions/3.0.0/operationReplyAddress.json @@ -0,0 +1,25 @@ +{ + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "required": [ + "location" + ], + "properties": { + "location": { + "type": "string", + "description": "A runtime expression that specifies the location of the reply address.", + "pattern": "^\\$message\\.(header|payload)#(\\/(([^\\/~])|(~[01]))*)*" + }, + "description": { + "type": "string", + "description": "An optional description of the address. CommonMark is allowed." + } + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/3.0.0/operationReplyAddress.json" +} \ No newline at end of file From 7e989b3c4cdcea4a470dd96e88092c1dad846a78 Mon Sep 17 00:00:00 2001 From: asyncapi-bot Date: Thu, 4 May 2023 08:26:56 +0200 Subject: [PATCH 049/102] chore(release): v5.0.0-next-major-spec.20 (#392) --- package-lock.json | 2 +- package.json | 2 +- schemas/3.0.0.json | 141 +++++++++++++++++++++++++++++++++++++++------ 3 files changed, 125 insertions(+), 20 deletions(-) diff --git a/package-lock.json b/package-lock.json index 04038d79..4eded6c1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "@asyncapi/specs", - "version": "5.0.0-next-major-spec.19", + "version": "5.0.0-next-major-spec.20", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index d8f92030..bc63a74f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@asyncapi/specs", - "version": "5.0.0-next-major-spec.19", + "version": "5.0.0-next-major-spec.20", "description": "AsyncAPI schema versions", "main": "index.js", "types": "index.d.ts", diff --git a/schemas/3.0.0.json b/schemas/3.0.0.json index 92283b0d..20daf83c 100644 --- a/schemas/3.0.0.json +++ b/schemas/3.0.0.json @@ -4901,6 +4901,22 @@ "channel": { "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" }, + "messages": { + "type": "array", + "items": { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + } + }, + "reply": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/operationReply.json" + } + ] + }, "traits": { "type": "array", "items": { @@ -4958,6 +4974,61 @@ } } }, + "http://asyncapi.com/definitions/3.0.0/operationReply.json": { + "$id": "http://asyncapi.com/definitions/3.0.0/operationReply.json", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "properties": { + "address": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/operationReplyAddress.json" + } + ] + }, + "channel": { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + "messages": { + "type": "array", + "items": { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + } + } + } + }, + "http://asyncapi.com/definitions/3.0.0/operationReplyAddress.json": { + "$id": "http://asyncapi.com/definitions/3.0.0/operationReplyAddress.json", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "required": [ + "location" + ], + "properties": { + "location": { + "type": "string", + "description": "A runtime expression that specifies the location of the reply address.", + "pattern": "^\\$message\\.(header|payload)#(\\/(([^\\/~])|(~[01]))*)*" + }, + "description": { + "type": "string", + "description": "An optional description of the address. CommonMark is allowed." + } + } + }, "http://asyncapi.com/definitions/3.0.0/operationTrait.json": { "$id": "http://asyncapi.com/definitions/3.0.0/operationTrait.json", "type": "object", @@ -6008,6 +6079,36 @@ "$ref": "http://asyncapi.com/definitions/3.0.0/messageTrait.json" } }, + "replies": { + "type": "object", + "patternProperties": { + "^[\\w\\d\\.\\-_]+$": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/operationReply.json" + } + ] + } + } + }, + "replyAddresses": { + "type": "object", + "patternProperties": { + "^[\\w\\d\\.\\-_]+$": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/operationReplyAddress.json" + } + ] + } + } + }, "serverBindings": { "type": "object", "additionalProperties": { @@ -6034,28 +6135,32 @@ }, "tags": { "type": "object", - "additionalProperties": { - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" - }, - { - "$ref": "http://asyncapi.com/definitions/3.0.0/tag.json" - } - ] + "patternProperties": { + "^[\\w\\d\\.\\-_]+$": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/tag.json" + } + ] + } } }, "externalDocs": { "type": "object", - "additionalProperties": { - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" - }, - { - "$ref": "http://asyncapi.com/definitions/3.0.0/externalDocs.json" - } - ] + "patternProperties": { + "^[\\w\\d\\.\\-_]+$": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/externalDocs.json" + } + ] + } } } } From 6fdb647272764b839aa4df69b1512d86cd7920fd Mon Sep 17 00:00:00 2001 From: Jonas Lagoni Date: Mon, 26 Jun 2023 21:20:46 +0200 Subject: [PATCH 050/102] fix: remove message oneOf (#402) --- definitions/3.0.0/channelMessages.json | 2 +- definitions/3.0.0/message.json | 24 ------------------------ definitions/3.0.0/messages.json | 2 +- 3 files changed, 2 insertions(+), 26 deletions(-) delete mode 100644 definitions/3.0.0/message.json diff --git a/definitions/3.0.0/channelMessages.json b/definitions/3.0.0/channelMessages.json index 737404e1..212ab610 100644 --- a/definitions/3.0.0/channelMessages.json +++ b/definitions/3.0.0/channelMessages.json @@ -6,7 +6,7 @@ "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" }, { - "$ref": "http://asyncapi.com/definitions/3.0.0/message.json" + "$ref": "http://asyncapi.com/definitions/3.0.0/messageObject.json" } ] }, diff --git a/definitions/3.0.0/message.json b/definitions/3.0.0/message.json deleted file mode 100644 index d3fc8cd2..00000000 --- a/definitions/3.0.0/message.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "oneOf": [ - { - "type": "object", - "required": [ - "oneOf" - ], - "additionalProperties": false, - "properties": { - "oneOf": { - "type": "array", - "items": { - "$ref": "http://asyncapi.com/definitions/3.0.0/messageObject.json" - } - } - } - }, - { - "$ref": "http://asyncapi.com/definitions/3.0.0/messageObject.json" - } - ], - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "http://asyncapi.com/definitions/3.0.0/message.json" -} \ No newline at end of file diff --git a/definitions/3.0.0/messages.json b/definitions/3.0.0/messages.json index 2522b7a1..f244339e 100644 --- a/definitions/3.0.0/messages.json +++ b/definitions/3.0.0/messages.json @@ -6,7 +6,7 @@ "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" }, { - "$ref": "http://asyncapi.com/definitions/3.0.0/message.json" + "$ref": "http://asyncapi.com/definitions/3.0.0/messageObject.json" } ] }, From edcf7da08c0e923987643dacc3c4382473414ca6 Mon Sep 17 00:00:00 2001 From: Jonas Lagoni Date: Mon, 26 Jun 2023 21:23:09 +0200 Subject: [PATCH 051/102] fix: inconsistancy in components (#403) --- definitions/3.0.0/components.json | 148 ++++++++++++++++++++++++++---- 1 file changed, 131 insertions(+), 17 deletions(-) diff --git a/definitions/3.0.0/components.json b/definitions/3.0.0/components.json index 1524c0c5..9f457fab 100644 --- a/definitions/3.0.0/components.json +++ b/definitions/3.0.0/components.json @@ -9,16 +9,64 @@ }, "properties": { "schemas": { - "$ref": "http://asyncapi.com/definitions/3.0.0/schemas.json" + "type": "object", + "patternProperties": { + "^[\\w\\d\\.\\-_]+$": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" + } + ] + } + } }, "servers": { - "$ref": "http://asyncapi.com/definitions/3.0.0/servers.json" + "type": "object", + "patternProperties": { + "^[\\w\\d\\.\\-_]+$": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/server.json" + } + ] + } + } }, "channels": { - "$ref": "http://asyncapi.com/definitions/3.0.0/channels.json" + "type": "object", + "patternProperties": { + "^[\\w\\d\\.\\-_]+$": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/channel.json" + } + ] + } + } }, "serverVariables": { - "$ref": "http://asyncapi.com/definitions/3.0.0/serverVariables.json" + "type": "object", + "patternProperties": { + "^[\\w\\d\\.\\-_]+$": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/serverVariable.json" + } + ] + } + } }, "messages": { "type": "object", @@ -51,7 +99,19 @@ } }, "parameters": { - "$ref": "http://asyncapi.com/definitions/3.0.0/parameters.json" + "type": "object", + "patternProperties": { + "^[\\w\\d\\.\\-_]+$": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/parameter.json" + } + ] + } + } }, "correlationIds": { "type": "object", @@ -70,14 +130,32 @@ }, "operationTraits": { "type": "object", - "additionalProperties": { - "$ref": "http://asyncapi.com/definitions/3.0.0/operationTrait.json" + "patternProperties": { + "^[\\w\\d\\.\\-_]+$": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/operationTrait.json" + } + ] + } } }, "messageTraits": { "type": "object", - "additionalProperties": { - "$ref": "http://asyncapi.com/definitions/3.0.0/messageTrait.json" + "patternProperties": { + "^[\\w\\d\\.\\-_]+$": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/messageTrait.json" + } + ] + } } }, "replies": { @@ -112,26 +190,62 @@ }, "serverBindings": { "type": "object", - "additionalProperties": { - "$ref": "http://asyncapi.com/definitions/3.0.0/serverBindingsObject.json" + "patternProperties": { + "^[\\w\\d\\.\\-_]+$": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/serverBindingsObject.json" + } + ] + } } }, "channelBindings": { "type": "object", - "additionalProperties": { - "$ref": "http://asyncapi.com/definitions/3.0.0/channelBindingsObject.json" + "patternProperties": { + "^[\\w\\d\\.\\-_]+$": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/channelBindingsObject.json" + } + ] + } } }, "operationBindings": { "type": "object", - "additionalProperties": { - "$ref": "http://asyncapi.com/definitions/3.0.0/operationBindingsObject.json" + "patternProperties": { + "^[\\w\\d\\.\\-_]+$": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/operationBindingsObject.json" + } + ] + } } }, "messageBindings": { "type": "object", - "additionalProperties": { - "$ref": "http://asyncapi.com/definitions/3.0.0/messageBindingsObject.json" + "patternProperties": { + "^[\\w\\d\\.\\-_]+$": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/messageBindingsObject.json" + } + ] + } } }, "tags": { From 2e1bdb05b37de9d41c7f774a64d5b991c82672c3 Mon Sep 17 00:00:00 2001 From: asyncapi-bot Date: Mon, 26 Jun 2023 21:28:20 +0200 Subject: [PATCH 052/102] chore(release): v5.0.0-next-major-spec.21 (#404) --- package-lock.json | 2 +- package.json | 2 +- schemas/3.0.0.json | 181 +++++++++++++++++++++++++++++++++------------ 3 files changed, 134 insertions(+), 51 deletions(-) diff --git a/package-lock.json b/package-lock.json index 4eded6c1..f4ff87f0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "@asyncapi/specs", - "version": "5.0.0-next-major-spec.20", + "version": "5.0.0-next-major-spec.21", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index bc63a74f..e5e1686d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@asyncapi/specs", - "version": "5.0.0-next-major-spec.20", + "version": "5.0.0-next-major-spec.21", "description": "AsyncAPI schema versions", "main": "index.js", "types": "index.d.ts", diff --git a/schemas/3.0.0.json b/schemas/3.0.0.json index 20daf83c..3a3bc26a 100644 --- a/schemas/3.0.0.json +++ b/schemas/3.0.0.json @@ -2021,35 +2021,12 @@ "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" }, { - "$ref": "http://asyncapi.com/definitions/3.0.0/message.json" + "$ref": "http://asyncapi.com/definitions/3.0.0/messageObject.json" } ] }, "description": "A map of the messages that will be sent to this channel by any application at any time. **Every message sent to this channel MUST be valid against one, and only one, of the message objects defined in this map.**" }, - "http://asyncapi.com/definitions/3.0.0/message.json": { - "$id": "http://asyncapi.com/definitions/3.0.0/message.json", - "oneOf": [ - { - "type": "object", - "required": [ - "oneOf" - ], - "additionalProperties": false, - "properties": { - "oneOf": { - "type": "array", - "items": { - "$ref": "http://asyncapi.com/definitions/3.0.0/messageObject.json" - } - } - } - }, - { - "$ref": "http://asyncapi.com/definitions/3.0.0/messageObject.json" - } - ] - }, "http://asyncapi.com/definitions/3.0.0/messageObject.json": { "$id": "http://asyncapi.com/definitions/3.0.0/messageObject.json", "type": "object", @@ -6008,16 +5985,64 @@ }, "properties": { "schemas": { - "$ref": "http://asyncapi.com/definitions/3.0.0/schemas.json" + "type": "object", + "patternProperties": { + "^[\\w\\d\\.\\-_]+$": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" + } + ] + } + } }, "servers": { - "$ref": "http://asyncapi.com/definitions/3.0.0/servers.json" + "type": "object", + "patternProperties": { + "^[\\w\\d\\.\\-_]+$": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/server.json" + } + ] + } + } }, "channels": { - "$ref": "http://asyncapi.com/definitions/3.0.0/channels.json" + "type": "object", + "patternProperties": { + "^[\\w\\d\\.\\-_]+$": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/channel.json" + } + ] + } + } }, "serverVariables": { - "$ref": "http://asyncapi.com/definitions/3.0.0/serverVariables.json" + "type": "object", + "patternProperties": { + "^[\\w\\d\\.\\-_]+$": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/serverVariable.json" + } + ] + } + } }, "messages": { "type": "object", @@ -6050,7 +6075,19 @@ } }, "parameters": { - "$ref": "http://asyncapi.com/definitions/3.0.0/parameters.json" + "type": "object", + "patternProperties": { + "^[\\w\\d\\.\\-_]+$": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/parameter.json" + } + ] + } + } }, "correlationIds": { "type": "object", @@ -6069,14 +6106,32 @@ }, "operationTraits": { "type": "object", - "additionalProperties": { - "$ref": "http://asyncapi.com/definitions/3.0.0/operationTrait.json" + "patternProperties": { + "^[\\w\\d\\.\\-_]+$": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/operationTrait.json" + } + ] + } } }, "messageTraits": { "type": "object", - "additionalProperties": { - "$ref": "http://asyncapi.com/definitions/3.0.0/messageTrait.json" + "patternProperties": { + "^[\\w\\d\\.\\-_]+$": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/messageTrait.json" + } + ] + } } }, "replies": { @@ -6111,26 +6166,62 @@ }, "serverBindings": { "type": "object", - "additionalProperties": { - "$ref": "http://asyncapi.com/definitions/3.0.0/serverBindingsObject.json" + "patternProperties": { + "^[\\w\\d\\.\\-_]+$": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/serverBindingsObject.json" + } + ] + } } }, "channelBindings": { "type": "object", - "additionalProperties": { - "$ref": "http://asyncapi.com/definitions/3.0.0/channelBindingsObject.json" + "patternProperties": { + "^[\\w\\d\\.\\-_]+$": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/channelBindingsObject.json" + } + ] + } } }, "operationBindings": { "type": "object", - "additionalProperties": { - "$ref": "http://asyncapi.com/definitions/3.0.0/operationBindingsObject.json" + "patternProperties": { + "^[\\w\\d\\.\\-_]+$": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/operationBindingsObject.json" + } + ] + } } }, "messageBindings": { "type": "object", - "additionalProperties": { - "$ref": "http://asyncapi.com/definitions/3.0.0/messageBindingsObject.json" + "patternProperties": { + "^[\\w\\d\\.\\-_]+$": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/messageBindingsObject.json" + } + ] + } } }, "tags": { @@ -6164,14 +6255,6 @@ } } } - }, - "http://asyncapi.com/definitions/3.0.0/schemas.json": { - "$id": "http://asyncapi.com/definitions/3.0.0/schemas.json", - "type": "object", - "additionalProperties": { - "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" - }, - "description": "JSON objects describing schemas the API uses." } }, "description": "!!Auto generated!! \n Do not manually edit. " From 7c68aed5ec2fcf3011b95bbac68f39b1f402a507 Mon Sep 17 00:00:00 2001 From: Sergio Moya <1083296+smoya@users.noreply.github.com> Date: Fri, 30 Jun 2023 18:45:55 +0200 Subject: [PATCH 053/102] fix bundler bug where definition names without .json where producing errors --- schemas/3.0.0-without-$id.json | 5704 ++++++++++++++++++++++++++++++++ tools/bundler/index.js | 22 +- 2 files changed, 5721 insertions(+), 5 deletions(-) create mode 100644 schemas/3.0.0-without-$id.json diff --git a/schemas/3.0.0-without-$id.json b/schemas/3.0.0-without-$id.json new file mode 100644 index 00000000..c3b99e4a --- /dev/null +++ b/schemas/3.0.0-without-$id.json @@ -0,0 +1,5704 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema", + "title": "AsyncAPI 3.0.0 schema.", + "type": "object", + "required": [ + "asyncapi", + "info" + ], + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, + "properties": { + "asyncapi": { + "type": "string", + "enum": [ + "3.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": { + "$ref": "#/definitions/servers" + }, + "defaultContentType": { + "type": "string" + }, + "channels": { + "$ref": "#/definitions/channels" + }, + "operations": { + "$ref": "#/definitions/operations" + }, + "components": { + "$ref": "#/definitions/components" + } + }, + "definitions": { + "specificationExtension": { + "description": "Any property starting with x- is valid.", + "additionalProperties": true, + "additionalItems": true + }, + "info": { + "type": "object", + "description": "General information about the API.", + "required": [ + "version", + "title" + ], + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, + "properties": { + "title": { + "type": "string", + "description": "A unique and precise title of the API." + }, + "version": { + "type": "string", + "description": "A semantic version number of the API." + }, + "description": { + "type": "string", + "description": "A longer description of the API. Should be different from the title. CommonMark is allowed." + }, + "termsOfService": { + "type": "string", + "description": "A URL to the Terms of Service for the API. MUST be in the format of a URL.", + "format": "uri" + }, + "contact": { + "$ref": "#/definitions/contact" + }, + "license": { + "$ref": "#/definitions/license" + }, + "tags": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/tag" + } + ] + }, + "uniqueItems": true + }, + "externalDocs": { + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/externalDocs" + } + ] + } + } + }, + "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": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } + } + }, + "Reference": { + "type": "object", + "required": [ + "$ref" + ], + "properties": { + "$ref": { + "$ref": "#/definitions/ReferenceObject" + } + } + }, + "ReferenceObject": { + "type": "string", + "format": "uri-reference" + }, + "tag": { + "type": "object", + "additionalProperties": false, + "required": [ + "name" + ], + "properties": { + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "externalDocs": { + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/externalDocs" + } + ] + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } + } + }, + "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" + } + } + }, + "servers": { + "description": "An object representing multiple servers.", + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/server" + } + ] + } + }, + "server": { + "type": "object", + "description": "An object representing a Server.", + "required": [ + "host", + "protocol" + ], + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, + "properties": { + "host": { + "type": "string", + "description": "The server host name." + }, + "pathname": { + "type": "string", + "description": "The path to a resource in the host." + }, + "title": { + "type": "string", + "description": "A human-friendly title for the server." + }, + "summary": { + "type": "string", + "description": "A brief summary of the server." + }, + "description": { + "type": "string", + "description": "A longer description of the server. CommonMark is allowed." + }, + "protocol": { + "type": "string", + "description": "The transfer protocol." + }, + "protocolVersion": { + "type": "string" + }, + "variables": { + "$ref": "#/definitions/serverVariables" + }, + "security": { + "$ref": "#/definitions/securityRequirements" + }, + "tags": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/tag" + } + ] + }, + "uniqueItems": true + }, + "externalDocs": { + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/externalDocs" + } + ] + }, + "bindings": { + "$ref": "#/definitions/serverBindingsObject" + } + } + }, + "serverVariables": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/serverVariable" + } + ] + } + }, + "serverVariable": { + "type": "object", + "description": "An object representing a Server Variable for server URL template substitution.", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, + "properties": { + "enum": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + }, + "default": { + "type": "string" + }, + "description": { + "type": "string" + }, + "examples": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "securityRequirements": { + "description": "An array representing security requirements.", + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/SecurityScheme" + } + ] + } + }, + "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" + ] + } + } + }, + "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 + }, + "oauth2Flows": { + "type": "object", + "required": [ + "type", + "flows" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "oauth2" + ] + }, + "description": { + "type": "string" + }, + "flows": { + "type": "object", + "properties": { + "implicit": { + "allOf": [ + { + "$ref": "#/definitions/oauth2Flow" + }, + { + "required": [ + "authorizationUrl", + "availableScopes" + ] + }, + { + "not": { + "required": [ + "tokenUrl" + ] + } + } + ] + }, + "password": { + "allOf": [ + { + "$ref": "#/definitions/oauth2Flow" + }, + { + "required": [ + "tokenUrl", + "availableScopes" + ] + }, + { + "not": { + "required": [ + "authorizationUrl" + ] + } + } + ] + }, + "clientCredentials": { + "allOf": [ + { + "$ref": "#/definitions/oauth2Flow" + }, + { + "required": [ + "tokenUrl", + "availableScopes" + ] + }, + { + "not": { + "required": [ + "authorizationUrl" + ] + } + } + ] + }, + "authorizationCode": { + "allOf": [ + { + "$ref": "#/definitions/oauth2Flow" + }, + { + "required": [ + "authorizationUrl", + "tokenUrl", + "availableScopes" + ] + } + ] + } + }, + "additionalProperties": false + }, + "scopes": { + "type": "array", + "description": "List of the needed scope names.", + "items": { + "type": "string" + } + } + }, + "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" + }, + "availableScopes": { + "$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" + ] + }, + "description": { + "type": "string" + }, + "openIdConnectUrl": { + "type": "string", + "format": "uri" + }, + "scopes": { + "type": "array", + "description": "List of the needed scope names.", + "items": { + "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" + ] + }, + "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" + ] + }, + "description": { + "type": "string" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, + "additionalProperties": false + }, + "SaslGssapiSecurityScheme": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "gssapi" + ] + }, + "description": { + "type": "string" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, + "additionalProperties": false + }, + "serverBindingsObject": { + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, + "properties": { + "http": {}, + "ws": {}, + "amqp": {}, + "amqp1": {}, + "mqtt": { + "properties": { + "bindingVersion": { + "enum": [ + "0.1.0" + ] + } + }, + "allOf": [ + { + "description": "If no bindingVersion specified, use the latest binding", + "if": { + "not": { + "required": [ + "bindingVersion" + ] + } + }, + "then": { + "$ref": "#/definitions/bindings/mqtt/server" + } + }, + { + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.1.0" + } + } + }, + "then": { + "$ref": "#/definitions/bindings/mqtt/server" + } + } + ] + }, + "mqtt5": { + "properties": { + "bindingVersion": { + "enum": [ + "0.2.0" + ] + } + }, + "allOf": [ + { + "description": "If no bindingVersion specified, use the latest binding", + "if": { + "not": { + "required": [ + "bindingVersion" + ] + } + }, + "then": { + "$ref": "#/definitions/bindings/mqtt5/server" + } + }, + { + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.2.0" + } + } + }, + "then": { + "$ref": "#/definitions/bindings/mqtt5/server" + } + } + ] + }, + "kafka": { + "properties": { + "bindingVersion": { + "enum": [ + "0.4.0", + "0.3.0" + ] + } + }, + "allOf": [ + { + "description": "If no bindingVersion specified, use the latest binding", + "if": { + "not": { + "required": [ + "bindingVersion" + ] + } + }, + "then": { + "$ref": "#/definitions/bindings/kafka/server" + } + }, + { + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.4.0" + } + } + }, + "then": { + "$ref": "#/definitions/bindings/kafka/server" + } + }, + { + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.3.0" + } + } + }, + "then": { + "$ref": "#/definitions/bindings/kafka/server" + } + } + ] + }, + "anypointmq": {}, + "nats": {}, + "jms": {}, + "sns": {}, + "sqs": {}, + "stomp": {}, + "redis": {}, + "ibmmq": { + "properties": { + "bindingVersion": { + "enum": [ + "0.1.0" + ] + } + }, + "allOf": [ + { + "description": "If no bindingVersion specified, use the latest binding", + "if": { + "not": { + "required": [ + "bindingVersion" + ] + } + }, + "then": { + "$ref": "#/definitions/bindings/ibmmq/server" + } + }, + { + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.1.0" + } + } + }, + "then": { + "$ref": "#/definitions/bindings/ibmmq/server" + } + } + ] + }, + "solace": { + "properties": { + "bindingVersion": { + "enum": [ + "0.3.0", + "0.2.0" + ] + } + }, + "allOf": [ + { + "description": "If no bindingVersion specified, use the latest binding", + "if": { + "not": { + "required": [ + "bindingVersion" + ] + } + }, + "then": { + "$ref": "#/definitions/bindings/solace/server" + } + }, + { + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.3.0" + } + } + }, + "then": { + "$ref": "#/definitions/bindings/solace/server" + } + }, + { + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.2.0" + } + } + }, + "then": { + "$ref": "#/definitions/bindings/solace/server" + } + } + ] + }, + "googlepubsub": {}, + "pulsar": { + "properties": { + "bindingVersion": { + "enum": [ + "0.1.0" + ] + } + }, + "allOf": [ + { + "description": "If no bindingVersion specified, use the latest binding", + "if": { + "not": { + "required": [ + "bindingVersion" + ] + } + }, + "then": { + "$ref": "#/definitions/bindings/pulsar/server" + } + }, + { + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.1.0" + } + } + }, + "then": { + "$ref": "#/definitions/bindings/pulsar/server" + } + } + ] + } + } + }, + "bindings/mqtt/server": { + "title": "MQTT server bindings object", + "description": "This object contains information about the server representation in MQTT.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, + "properties": { + "clientId": { + "type": "string", + "description": "The client identifier." + }, + "cleanSession": { + "type": "boolean", + "description": "Whether to create a persistent connection or not. When 'false', the connection will be persistent." + }, + "lastWill": { + "type": "object", + "description": "Last Will and Testament configuration.", + "properties": { + "topic": { + "type": "string", + "description": "The topic where the Last Will and Testament message will be sent." + }, + "qos": { + "type": "integer", + "enum": [ + 0, + 1, + 2 + ], + "description": "Defines how hard the broker/client will try to ensure that the Last Will and Testament message is received. Its value MUST be either 0, 1 or 2." + }, + "message": { + "type": "string", + "description": "Last Will message." + }, + "retain": { + "type": "boolean", + "description": "Whether the broker should retain the Last Will and Testament message or not." + } + } + }, + "keepAlive": { + "type": "integer", + "description": "Interval in seconds of the longest period of time the broker and the client can endure without sending a message." + }, + "bindingVersion": { + "type": "string", + "enum": [ + "0.1.0" + ], + "description": "The version of this binding. If omitted, 'latest' MUST be assumed." + } + }, + "examples": [ + { + "clientId": "guest", + "cleanSession": true, + "lastWill": { + "topic": "/last-wills", + "qos": 2, + "message": "Guest gone offline.", + "retain": false + }, + "keepAlive": 60, + "bindingVersion": "0.1.0" + } + ] + }, + "bindings/mqtt5/server": { + "title": "Server Schema", + "description": "This object contains information about the server representation in MQTT5.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, + "properties": { + "sessionExpiryInterval": { + "oneOf": [ + { + "type": "integer", + "minimum": 0 + }, + { + "$ref": "#/definitions/schema" + }, + { + "$ref": "#/definitions/Reference" + } + ], + "description": "Session Expiry Interval in seconds or a Schema Object containing the definition of the interval." + }, + "bindingVersion": { + "type": "string", + "enum": [ + "0.2.0" + ], + "description": "The version of this binding. If omitted, 'latest' MUST be assumed." + } + }, + "examples": [ + { + "sessionExpiryInterval": 60, + "bindingVersion": "0.2.0" + }, + { + "sessionExpiryInterval": { + "type": "integer", + "minimum": 100 + }, + "bindingVersion": "0.2.0" + } + ] + }, + "schema": { + "allOf": [ + { + "$ref": "#/definitions/json-schema-draft-07-schema" + }, + { + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, + "properties": { + "additionalProperties": { + "anyOf": [ + { + "$ref": "#/definitions/schema" + }, + { + "type": "boolean" + } + ], + "default": {} + }, + "items": { + "anyOf": [ + { + "$ref": "#/definitions/schema" + }, + { + "type": "array", + "minItems": 1, + "items": { + "$ref": "#/definitions/schema" + } + } + ], + "default": {} + }, + "allOf": { + "type": "array", + "minItems": 1, + "items": { + "$ref": "#/definitions/schema" + } + }, + "oneOf": { + "type": "array", + "minItems": 1, + "items": { + "$ref": "#/definitions/schema" + } + }, + "anyOf": { + "type": "array", + "minItems": 1, + "items": { + "$ref": "#/definitions/schema" + } + }, + "not": { + "$ref": "#/definitions/schema" + }, + "properties": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/schema" + }, + "default": {} + }, + "patternProperties": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/schema" + }, + "default": {} + }, + "propertyNames": { + "$ref": "#/definitions/schema" + }, + "contains": { + "$ref": "#/definitions/schema" + }, + "discriminator": { + "type": "string" + }, + "externalDocs": { + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/externalDocs" + } + ] + }, + "deprecated": { + "type": "boolean", + "default": false + } + } + } + ] + }, + "json-schema-draft-07-schema": { + "title": "Core schema meta-schema", + "definitions": { + "schemaArray": { + "type": "array", + "minItems": 1, + "items": { + "$ref": "#/definitions/json-schema-draft-07-schema" + } + }, + "nonNegativeInteger": { + "type": "integer", + "minimum": 0 + }, + "nonNegativeIntegerDefault0": { + "allOf": [ + { + "$ref": "#/definitions/json-schema-draft-07-schema/definitions/nonNegativeInteger" + }, + { + "default": 0 + } + ] + }, + "simpleTypes": { + "enum": [ + "array", + "boolean", + "integer", + "null", + "number", + "object", + "string" + ] + }, + "stringArray": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true, + "default": [] + } + }, + "type": [ + "object", + "boolean" + ], + "properties": { + "$id": { + "type": "string", + "format": "uri-reference" + }, + "$schema": { + "type": "string", + "format": "uri" + }, + "$ref": { + "type": "string", + "format": "uri-reference" + }, + "$comment": { + "type": "string" + }, + "title": { + "type": "string" + }, + "description": { + "type": "string" + }, + "default": true, + "readOnly": { + "type": "boolean", + "default": false + }, + "writeOnly": { + "type": "boolean", + "default": false + }, + "examples": { + "type": "array", + "items": true + }, + "multipleOf": { + "type": "number", + "exclusiveMinimum": 0 + }, + "maximum": { + "type": "number" + }, + "exclusiveMaximum": { + "type": "number" + }, + "minimum": { + "type": "number" + }, + "exclusiveMinimum": { + "type": "number" + }, + "maxLength": { + "$ref": "#/definitions/json-schema-draft-07-schema/definitions/nonNegativeInteger" + }, + "minLength": { + "$ref": "#/definitions/json-schema-draft-07-schema/definitions/nonNegativeIntegerDefault0" + }, + "pattern": { + "type": "string", + "format": "regex" + }, + "additionalItems": { + "$ref": "#/definitions/json-schema-draft-07-schema" + }, + "items": { + "anyOf": [ + { + "$ref": "#/definitions/json-schema-draft-07-schema" + }, + { + "$ref": "#/definitions/json-schema-draft-07-schema/definitions/schemaArray" + } + ], + "default": true + }, + "maxItems": { + "$ref": "#/definitions/json-schema-draft-07-schema/definitions/nonNegativeInteger" + }, + "minItems": { + "$ref": "#/definitions/json-schema-draft-07-schema/definitions/nonNegativeIntegerDefault0" + }, + "uniqueItems": { + "type": "boolean", + "default": false + }, + "contains": { + "$ref": "#/definitions/json-schema-draft-07-schema" + }, + "maxProperties": { + "$ref": "#/definitions/json-schema-draft-07-schema/definitions/nonNegativeInteger" + }, + "minProperties": { + "$ref": "#/definitions/json-schema-draft-07-schema/definitions/nonNegativeIntegerDefault0" + }, + "required": { + "$ref": "#/definitions/json-schema-draft-07-schema/definitions/stringArray" + }, + "additionalProperties": { + "$ref": "#/definitions/json-schema-draft-07-schema" + }, + "definitions": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/json-schema-draft-07-schema" + }, + "default": {} + }, + "properties": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/json-schema-draft-07-schema" + }, + "default": {} + }, + "patternProperties": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/json-schema-draft-07-schema" + }, + "propertyNames": { + "format": "regex" + }, + "default": {} + }, + "dependencies": { + "type": "object", + "additionalProperties": { + "anyOf": [ + { + "$ref": "#/definitions/json-schema-draft-07-schema" + }, + { + "$ref": "#/definitions/json-schema-draft-07-schema/definitions/stringArray" + } + ] + } + }, + "propertyNames": { + "$ref": "#/definitions/json-schema-draft-07-schema" + }, + "const": true, + "enum": { + "type": "array", + "items": true, + "minItems": 1, + "uniqueItems": true + }, + "type": { + "anyOf": [ + { + "$ref": "#/definitions/json-schema-draft-07-schema/definitions/simpleTypes" + }, + { + "type": "array", + "items": { + "$ref": "#/definitions/json-schema-draft-07-schema/definitions/simpleTypes" + }, + "minItems": 1, + "uniqueItems": true + } + ] + }, + "format": { + "type": "string" + }, + "contentMediaType": { + "type": "string" + }, + "contentEncoding": { + "type": "string" + }, + "if": { + "$ref": "#/definitions/json-schema-draft-07-schema" + }, + "then": { + "$ref": "#/definitions/json-schema-draft-07-schema" + }, + "else": { + "$ref": "#/definitions/json-schema-draft-07-schema" + }, + "allOf": { + "$ref": "#/definitions/json-schema-draft-07-schema/definitions/schemaArray" + }, + "anyOf": { + "$ref": "#/definitions/json-schema-draft-07-schema/definitions/schemaArray" + }, + "oneOf": { + "$ref": "#/definitions/json-schema-draft-07-schema/definitions/schemaArray" + }, + "not": { + "$ref": "#/definitions/json-schema-draft-07-schema" + } + }, + "default": true + }, + "bindings/kafka/server": { + "title": "Server Schema", + "description": "This object contains server connection information to a Kafka broker. This object contains additional information not possible to represent within the core AsyncAPI specification.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, + "properties": { + "schemaRegistryUrl": { + "type": "string", + "description": "API URL for the Schema Registry used when producing Kafka messages (if a Schema Registry was used)." + }, + "schemaRegistryVendor": { + "type": "string", + "description": "The vendor of the Schema Registry and Kafka serdes library that should be used." + }, + "bindingVersion": { + "type": "string", + "enum": [ + "0.3.0" + ], + "description": "The version of this binding." + } + }, + "examples": [ + { + "schemaRegistryUrl": "https://my-schema-registry.com", + "schemaRegistryVendor": "confluent", + "bindingVersion": "0.3.0" + } + ] + }, + "bindings/ibmmq/server": { + "title": "IBM MQ server bindings object", + "description": "This object contains server connection information about the IBM MQ server, referred to as an IBM MQ queue manager. This object contains additional connectivity information not possible to represent within the core AsyncAPI specification.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, + "properties": { + "groupId": { + "type": "string", + "description": "Defines a logical group of IBM MQ server objects. This is necessary to specify multi-endpoint configurations used in high availability deployments. If omitted, the server object is not part of a group." + }, + "ccdtQueueManagerName": { + "type": "string", + "default": "*", + "description": "The name of the IBM MQ queue manager to bind to in the CCDT file." + }, + "cipherSpec": { + "type": "string", + "description": "The recommended cipher specification used to establish a TLS connection between the client and the IBM MQ queue manager. More information on SSL/TLS cipher specifications supported by IBM MQ can be found on this page in the IBM MQ Knowledge Center." + }, + "multiEndpointServer": { + "type": "boolean", + "default": false, + "description": "If 'multiEndpointServer' is 'true' then multiple connections can be workload balanced and applications should not make assumptions as to where messages are processed. Where message ordering, or affinity to specific message resources is necessary, a single endpoint ('multiEndpointServer' = 'false') may be required." + }, + "heartBeatInterval": { + "type": "integer", + "minimum": 0, + "maximum": 999999, + "default": 300, + "description": "The recommended value (in seconds) for the heartbeat sent to the queue manager during periods of inactivity. A value of zero means that no heart beats are sent. A value of 1 means that the client will use the value defined by the queue manager. More information on heart beat interval can be found on this page in the IBM MQ Knowledge Center." + }, + "bindingVersion": { + "type": "string", + "enum": [ + "0.1.0" + ], + "description": "The version of this binding." + } + }, + "examples": [ + { + "groupId": "PRODCLSTR1", + "cipherSpec": "ANY_TLS12_OR_HIGHER", + "bindingVersion": "0.1.0" + }, + { + "groupId": "PRODCLSTR1", + "bindingVersion": "0.1.0" + } + ] + }, + "bindings/solace/server": { + "title": "Solace server bindings object", + "description": "This object contains server connection information about the Solace broker. This object contains additional connectivity information not possible to represent within the core AsyncAPI specification.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, + "properties": { + "msvVpn": { + "type": "string", + "description": "The name of the Virtual Private Network to connect to on the Solace broker." + }, + "bindingVersion": { + "type": "string", + "enum": [ + "0.2.0" + ], + "description": "The version of this binding." + } + }, + "examples": [ + { + "msgVpn": "ProdVPN", + "bindingVersion": "0.2.0" + } + ] + }, + "bindings/pulsar/server": { + "title": "Server Schema", + "description": "This object contains server information of Pulsar broker, which covers cluster and tenant admin configuration. This object contains additional information not possible to represent within the core AsyncAPI specification.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, + "properties": { + "tenant": { + "type": "string", + "description": "The pulsar tenant. If omitted, 'public' MUST be assumed." + }, + "bindingVersion": { + "type": "string", + "enum": [ + "0.1.0" + ], + "description": "The version of this binding. If omitted, 'latest' MUST be assumed." + } + }, + "examples": [ + { + "tenant": "contoso", + "bindingVersion": "0.1.0" + } + ] + }, + "channels": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/channel" + } + ] + } + }, + "channel": { + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, + "properties": { + "address": { + "type": [ + "string", + "null" + ], + "description": "An optional string representation of this channel's address. The address is typically the \"topic name\", \"routing key\", \"event type\", or \"path\". When `null` or absent, it MUST be interpreted as unknown. This is useful when the address is generated dynamically at runtime or can't be known upfront. It MAY contain Channel Address Expressions." + }, + "messages": { + "$ref": "#/definitions/channelMessages" + }, + "parameters": { + "$ref": "#/definitions/parameters" + }, + "title": { + "type": "string", + "description": "A human-friendly title for the channel." + }, + "summary": { + "type": "string", + "description": "A brief summary of the channel." + }, + "description": { + "type": "string", + "description": "A longer description of the channel. CommonMark is allowed." + }, + "servers": { + "type": "array", + "description": "The references of the servers on which this channel is available. If absent or empty then this channel must be available on all servers.", + "items": { + "$ref": "#/definitions/Reference" + }, + "uniqueItems": true + }, + "tags": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/tag" + } + ] + }, + "uniqueItems": true + }, + "externalDocs": { + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/externalDocs" + } + ] + }, + "bindings": { + "$ref": "#/definitions/channelBindingsObject" + } + } + }, + "channelMessages": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/messageObject" + } + ] + }, + "description": "A map of the messages that will be sent to this channel by any application at any time. **Every message sent to this channel MUST be valid against one, and only one, of the message objects defined in this map.**" + }, + "messageObject": { + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, + "properties": { + "schemaFormat": { + "type": "string" + }, + "contentType": { + "type": "string" + }, + "headers": { + "allOf": [ + { + "$ref": "#/definitions/schema" + }, + { + "properties": { + "type": { + "const": "object" + } + } + } + ] + }, + "messageId": { + "type": "string" + }, + "payload": {}, + "correlationId": { + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/correlationId" + } + ] + }, + "tags": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/tag" + } + ] + }, + "uniqueItems": true + }, + "summary": { + "type": "string", + "description": "A brief summary of the message." + }, + "name": { + "type": "string", + "description": "Name of the message." + }, + "title": { + "type": "string", + "description": "A human-friendly title for the message." + }, + "description": { + "type": "string", + "description": "A longer description of the message. CommonMark is allowed." + }, + "externalDocs": { + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/externalDocs" + } + ] + }, + "deprecated": { + "type": "boolean", + "default": false + }, + "examples": { + "type": "array", + "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/messageBindingsObject" + }, + "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 + } + ] + } + ] + } + } + }, + "allOf": [ + { + "if": { + "not": { + "required": [ + "schemaFormat" + ] + } + }, + "then": { + "properties": { + "payload": { + "$ref": "#/definitions/schema" + } + } + } + }, + { + "if": { + "required": [ + "schemaFormat" + ], + "properties": { + "schemaFormat": { + "enum": [ + "application/vnd.aai.asyncapi;version=2.0.0", + "application/vnd.aai.asyncapi+json;version=2.0.0", + "application/vnd.aai.asyncapi+yaml;version=2.0.0", + "application/vnd.aai.asyncapi;version=2.1.0", + "application/vnd.aai.asyncapi+json;version=2.1.0", + "application/vnd.aai.asyncapi+yaml;version=2.1.0", + "application/vnd.aai.asyncapi;version=2.2.0", + "application/vnd.aai.asyncapi+json;version=2.2.0", + "application/vnd.aai.asyncapi+yaml;version=2.2.0", + "application/vnd.aai.asyncapi;version=2.3.0", + "application/vnd.aai.asyncapi+json;version=2.3.0", + "application/vnd.aai.asyncapi+yaml;version=2.3.0", + "application/vnd.aai.asyncapi;version=2.4.0", + "application/vnd.aai.asyncapi+json;version=2.4.0", + "application/vnd.aai.asyncapi+yaml;version=2.4.0", + "application/vnd.aai.asyncapi;version=2.5.0", + "application/vnd.aai.asyncapi+json;version=2.5.0", + "application/vnd.aai.asyncapi+yaml;version=2.5.0", + "application/vnd.aai.asyncapi;version=2.6.0", + "application/vnd.aai.asyncapi+json;version=2.6.0", + "application/vnd.aai.asyncapi+yaml;version=2.6.0", + "application/vnd.aai.asyncapi;version=3.0.0", + "application/vnd.aai.asyncapi+json;version=3.0.0", + "application/vnd.aai.asyncapi+yaml;version=3.0.0" + ] + } + } + }, + "then": { + "properties": { + "payload": { + "$ref": "#/definitions/schema" + } + } + } + }, + { + "if": { + "required": [ + "schemaFormat" + ], + "properties": { + "schemaFormat": { + "enum": [ + "application/schema+json;version=draft-07", + "application/schema+yaml;version=draft-07" + ] + } + } + }, + "then": { + "properties": { + "payload": { + "$ref": "#/definitions/json-schema-draft-07-schema" + } + } + } + }, + { + "if": { + "required": [ + "schemaFormat" + ], + "properties": { + "schemaFormat": { + "enum": [ + "application/vnd.oai.openapi;version=3.0.0", + "application/vnd.oai.openapi+json;version=3.0.0", + "application/vnd.oai.openapi+yaml;version=3.0.0" + ] + } + } + }, + "then": { + "properties": { + "payload": { + "$ref": "#/definitions/openapiSchema_3_0" + } + } + } + }, + { + "if": { + "required": [ + "schemaFormat" + ], + "properties": { + "schemaFormat": { + "enum": [ + "application/vnd.apache.avro;version=1.9.0", + "application/vnd.apache.avro+json;version=1.9.0", + "application/vnd.apache.avro+yaml;version=1.9.0" + ] + } + } + }, + "then": { + "properties": { + "payload": { + "$ref": "#/definitions/avroSchema_v1" + } + } + } + } + ] + }, + "correlationId": { + "type": "object", + "required": [ + "location" + ], + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, + "properties": { + "description": { + "type": "string", + "description": "A optional description of the correlation ID. GitHub Flavored Markdown is allowed." + }, + "location": { + "type": "string", + "description": "A runtime expression that specifies the location of the correlation ID", + "pattern": "^\\$message\\.(header|payload)#(\\/(([^\\/~])|(~[01]))*)*" + } + } + }, + "messageBindingsObject": { + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, + "properties": { + "http": { + "properties": { + "bindingVersion": { + "enum": [ + "0.1.0" + ] + } + }, + "allOf": [ + { + "description": "If no bindingVersion specified, use the latest binding", + "if": { + "not": { + "required": [ + "bindingVersion" + ] + } + }, + "then": { + "$ref": "#/definitions/bindings/http/message" + } + }, + { + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.1.0" + } + } + }, + "then": { + "$ref": "#/definitions/bindings/http/message" + } + } + ] + }, + "ws": {}, + "amqp": { + "properties": { + "bindingVersion": { + "enum": [ + "0.2.0" + ] + } + }, + "allOf": [ + { + "description": "If no bindingVersion specified, use the latest binding", + "if": { + "not": { + "required": [ + "bindingVersion" + ] + } + }, + "then": { + "$ref": "#/definitions/bindings/amqp/message" + } + }, + { + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.2.0" + } + } + }, + "then": { + "$ref": "#/definitions/bindings/amqp/message" + } + } + ] + }, + "amqp1": {}, + "mqtt": { + "properties": { + "bindingVersion": { + "enum": [ + "0.1.0" + ] + } + }, + "allOf": [ + { + "description": "If no bindingVersion specified, use the latest binding", + "if": { + "not": { + "required": [ + "bindingVersion" + ] + } + }, + "then": { + "$ref": "#/definitions/bindings/mqtt/message" + } + }, + { + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.1.0" + } + } + }, + "then": { + "$ref": "#/definitions/bindings/mqtt/message" + } + } + ] + }, + "mqtt5": {}, + "kafka": { + "properties": { + "bindingVersion": { + "enum": [ + "0.4.0", + "0.3.0", + "0.1.0" + ] + } + }, + "allOf": [ + { + "description": "If no bindingVersion specified, use the latest binding", + "if": { + "not": { + "required": [ + "bindingVersion" + ] + } + }, + "then": { + "$ref": "#/definitions/bindings/kafka/message" + } + }, + { + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.4.0" + } + } + }, + "then": { + "$ref": "#/definitions/bindings/kafka/message" + } + }, + { + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.3.0" + } + } + }, + "then": { + "$ref": "#/definitions/bindings/kafka/message" + } + }, + { + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.1.0" + } + } + }, + "then": { + "$ref": "#/definitions/bindings/kafka/message" + } + } + ] + }, + "anypointmq": { + "properties": { + "bindingVersion": { + "enum": [ + "0.0.1" + ] + } + }, + "allOf": [ + { + "description": "If no bindingVersion specified, use the latest binding", + "if": { + "not": { + "required": [ + "bindingVersion" + ] + } + }, + "then": { + "$ref": "#/definitions/bindings/anypointmq/message" + } + }, + { + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.0.1" + } + } + }, + "then": { + "$ref": "#/definitions/bindings/anypointmq/message" + } + } + ] + }, + "nats": {}, + "jms": {}, + "sns": {}, + "sqs": {}, + "stomp": {}, + "redis": {}, + "ibmmq": { + "properties": { + "bindingVersion": { + "enum": [ + "0.1.0" + ] + } + }, + "allOf": [ + { + "description": "If no bindingVersion specified, use the latest binding", + "if": { + "not": { + "required": [ + "bindingVersion" + ] + } + }, + "then": { + "$ref": "#/definitions/bindings/ibmmq/message" + } + }, + { + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.1.0" + } + } + }, + "then": { + "$ref": "#/definitions/bindings/ibmmq/message" + } + } + ] + }, + "solace": {}, + "googlepubsub": { + "properties": { + "bindingVersion": { + "enum": [ + "0.1.0" + ] + } + }, + "allOf": [ + { + "description": "If no bindingVersion specified, use the latest binding", + "if": { + "not": { + "required": [ + "bindingVersion" + ] + } + }, + "then": { + "$ref": "#/definitions/bindings/googlepubsub/message" + } + }, + { + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.1.0" + } + } + }, + "then": { + "$ref": "#/definitions/bindings/googlepubsub/message" + } + } + ] + } + } + }, + "bindings/http/message": { + "title": "HTTP message bindings object", + "description": "This object contains information about the message representation in HTTP.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, + "properties": { + "headers": { + "$ref": "#/definitions/schema", + "description": "\tA Schema object containing the definitions for HTTP-specific headers. This schema MUST be of type 'object' and have a 'properties' key." + }, + "bindingVersion": { + "type": "string", + "enum": [ + "0.1.0" + ], + "description": "The version of this binding. If omitted, \"latest\" MUST be assumed." + } + }, + "examples": [ + { + "headers": { + "type": "object", + "properties": { + "Content-Type": { + "type": "string", + "enum": [ + "application/json" + ] + } + } + }, + "bindingVersion": "0.1.0" + } + ] + }, + "bindings/amqp/message": { + "title": "AMQP message bindings object", + "description": "This object contains information about the message representation in AMQP.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, + "properties": { + "contentEncoding": { + "type": "string", + "description": "A MIME encoding for the message content." + }, + "messageType": { + "type": "string", + "description": "Application-specific message type." + }, + "bindingVersion": { + "type": "string", + "enum": [ + "0.2.0" + ], + "description": "The version of this binding. If omitted, \"latest\" MUST be assumed." + } + }, + "examples": [ + { + "contentEncoding": "gzip", + "messageType": "user.signup", + "bindingVersion": "0.2.0" + } + ] + }, + "bindings/mqtt/message": { + "title": "MQTT message bindings object", + "description": "This object contains information about the message representation in MQTT.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, + "properties": { + "bindingVersion": { + "type": "string", + "enum": [ + "0.1.0" + ], + "description": "The version of this binding. If omitted, 'latest' MUST be assumed." + } + }, + "examples": [ + { + "bindingVersion": "0.1.0" + } + ] + }, + "bindings/kafka/message": { + "title": "Kafka message bindings object", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, + "properties": { + "key": { + "$ref": "#/definitions/schema", + "description": "The message key." + }, + "bindingVersion": { + "type": "string", + "enum": [ + "0.1.0" + ], + "description": "The version of this binding. If omitted, 'latest' MUST be assumed." + } + }, + "examples": [ + { + "key": { + "type": "string", + "enum": [ + "myKey" + ] + }, + "bindingVersion": "0.1.0" + }, + { + "key": { + "$ref": "path/to/user-create.avsc#/UserCreate" + }, + "bindingVersion": "0.2.0" + } + ] + }, + "bindings/anypointmq/message": { + "title": "Anypoint MQ message bindings object", + "description": "This object contains configuration for describing an Anypoint MQ message as an AsyncAPI message. This objects only contains configuration that can not be provided in the AsyncAPI standard message object.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, + "properties": { + "headers": { + "$ref": "#/definitions/schema", + "description": "A Schema object containing the definitions for Anypoint MQ-specific headers (protocol headers). This schema MUST be of type 'object' and have a 'properties' key. Examples of Anypoint MQ protocol headers are 'messageId' and 'messageGroupId'." + }, + "bindingVersion": { + "type": "string", + "enum": [ + "0.0.1" + ], + "description": "The version of this binding. If omitted, 'latest' MUST be assumed." + } + }, + "examples": [ + { + "headers": { + "type": "object", + "properties": { + "messageId": { + "type": "string" + } + } + }, + "bindingVersion": "0.0.1" + } + ] + }, + "bindings/ibmmq/message": { + "title": "IBM MQ message bindings object", + "description": "This object contains information about the message representation in IBM MQ.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, + "properties": { + "type": { + "type": "string", + "enum": [ + "string", + "jms", + "binary" + ], + "default": "string", + "description": "The type of the message." + }, + "headers": { + "type": "string", + "description": "Defines the IBM MQ message headers to include with this message. More than one header can be specified as a comma separated list. Supporting information on IBM MQ message formats can be found on this [page](https://www.ibm.com/docs/en/ibm-mq/9.2?topic=mqmd-format-mqchar8) in the IBM MQ Knowledge Center." + }, + "description": { + "type": "string", + "description": "Provides additional information for application developers: describes the message type or format." + }, + "expiry": { + "type": "integer", + "minimum": 0, + "default": 0, + "description": "The recommended setting the client should use for the TTL (Time-To-Live) of the message. This is a period of time expressed in milliseconds and set by the application that puts the message. 'expiry' values are API dependant e.g., MQI and JMS use different units of time and default values for 'unlimited'. General information on IBM MQ message expiry can be found on this [page](https://www.ibm.com/docs/en/ibm-mq/9.2?topic=mqmd-expiry-mqlong) in the IBM MQ Knowledge Center." + }, + "bindingVersion": { + "type": "string", + "enum": [ + "0.1.0" + ], + "description": "The version of this binding." + } + }, + "oneOf": [ + { + "properties": { + "type": { + "const": "binary" + } + } + }, + { + "properties": { + "type": { + "const": "jms" + } + }, + "not": { + "required": [ + "headers" + ] + } + }, + { + "properties": { + "type": { + "const": "string" + } + }, + "not": { + "required": [ + "headers" + ] + } + } + ], + "examples": [ + { + "type": "string", + "bindingVersion": "0.1.0" + }, + { + "type": "jms", + "description": "JMS stream message", + "bindingVersion": "0.1.0" + } + ] + }, + "bindings/googlepubsub/message": { + "title": "Cloud Pub/Sub Channel Schema", + "description": "This object contains information about the message representation for Google Cloud Pub/Sub.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, + "properties": { + "bindingVersion": { + "type": "string", + "enum": [ + "0.1.0" + ], + "description": "The version of this binding." + }, + "attributes": { + "type": "object" + }, + "orderingKey": { + "type": "string" + }, + "schema": { + "type": "object", + "additionalItems": false, + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "required": [ + "name", + "type" + ] + } + }, + "examples": [ + { + "schema": { + "name": "projects/your-project-id/schemas/your-avro-schema-id", + "type": "avro" + } + }, + { + "schema": { + "name": "projects/your-project-id/schemas/your-protobuf-schema-id", + "type": "protobuf" + } + } + ] + }, + "messageTrait": { + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, + "properties": { + "schemaFormat": { + "type": "string" + }, + "contentType": { + "type": "string" + }, + "headers": { + "allOf": [ + { + "$ref": "#/definitions/schema" + }, + { + "properties": { + "type": { + "const": "object" + } + } + } + ] + }, + "messageId": { + "type": "string" + }, + "correlationId": { + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/correlationId" + } + ] + }, + "tags": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/tag" + } + ] + }, + "uniqueItems": true + }, + "summary": { + "type": "string", + "description": "A brief summary of the message." + }, + "name": { + "type": "string", + "description": "Name of the message." + }, + "title": { + "type": "string", + "description": "A human-friendly title for the message." + }, + "description": { + "type": "string", + "description": "A longer description of the message. CommonMark is allowed." + }, + "externalDocs": { + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/externalDocs" + } + ] + }, + "deprecated": { + "type": "boolean", + "default": false + }, + "examples": { + "type": "array", + "items": { + "type": "object" + } + }, + "bindings": { + "$ref": "#/definitions/messageBindingsObject" + } + } + }, + "openapiSchema_3_0": { + "type": "object", + "definitions": { + "ExternalDocumentation": { + "type": "object", + "required": [ + "url" + ], + "properties": { + "description": { + "type": "string" + }, + "url": { + "type": "string", + "format": "uri-reference" + } + }, + "patternProperties": { + "^x-": {} + }, + "additionalProperties": false + }, + "Discriminator": { + "type": "object", + "required": [ + "propertyName" + ], + "properties": { + "propertyName": { + "type": "string" + }, + "mapping": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + }, + "Reference": { + "type": "object", + "required": [ + "$ref" + ], + "patternProperties": { + "^\\$ref$": { + "type": "string", + "format": "uri-reference" + } + } + }, + "XML": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "namespace": { + "type": "string", + "format": "uri" + }, + "prefix": { + "type": "string" + }, + "attribute": { + "type": "boolean", + "default": false + }, + "wrapped": { + "type": "boolean", + "default": false + } + }, + "patternProperties": { + "^x-": {} + }, + "additionalProperties": false + } + }, + "properties": { + "title": { + "type": "string" + }, + "multipleOf": { + "type": "number", + "exclusiveMinimum": 0 + }, + "maximum": { + "type": "number" + }, + "exclusiveMaximum": { + "type": "boolean", + "default": false + }, + "minimum": { + "type": "number" + }, + "exclusiveMinimum": { + "type": "boolean", + "default": false + }, + "maxLength": { + "type": "integer", + "minimum": 0 + }, + "minLength": { + "type": "integer", + "minimum": 0, + "default": 0 + }, + "pattern": { + "type": "string", + "format": "regex" + }, + "maxItems": { + "type": "integer", + "minimum": 0 + }, + "minItems": { + "type": "integer", + "minimum": 0, + "default": 0 + }, + "uniqueItems": { + "type": "boolean", + "default": false + }, + "maxProperties": { + "type": "integer", + "minimum": 0 + }, + "minProperties": { + "type": "integer", + "minimum": 0, + "default": 0 + }, + "required": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 1, + "uniqueItems": true + }, + "enum": { + "type": "array", + "items": true, + "minItems": 1, + "uniqueItems": false + }, + "type": { + "type": "string", + "enum": [ + "array", + "boolean", + "integer", + "number", + "object", + "string" + ] + }, + "not": { + "oneOf": [ + { + "$ref": "#/definitions/openapiSchema_3_0" + }, + { + "$ref": "#/definitions/openapiSchema_3_0/definitions/Reference" + } + ] + }, + "allOf": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/definitions/openapiSchema_3_0" + }, + { + "$ref": "#/definitions/openapiSchema_3_0/definitions/Reference" + } + ] + } + }, + "oneOf": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/definitions/openapiSchema_3_0" + }, + { + "$ref": "#/definitions/openapiSchema_3_0/definitions/Reference" + } + ] + } + }, + "anyOf": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/definitions/openapiSchema_3_0" + }, + { + "$ref": "#/definitions/openapiSchema_3_0/definitions/Reference" + } + ] + } + }, + "items": { + "oneOf": [ + { + "$ref": "#/definitions/openapiSchema_3_0" + }, + { + "$ref": "#/definitions/openapiSchema_3_0/definitions/Reference" + } + ] + }, + "properties": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "$ref": "#/definitions/openapiSchema_3_0" + }, + { + "$ref": "#/definitions/openapiSchema_3_0/definitions/Reference" + } + ] + } + }, + "additionalProperties": { + "oneOf": [ + { + "$ref": "#/definitions/openapiSchema_3_0" + }, + { + "$ref": "#/definitions/openapiSchema_3_0/definitions/Reference" + }, + { + "type": "boolean" + } + ], + "default": true + }, + "description": { + "type": "string" + }, + "format": { + "type": "string" + }, + "default": true, + "nullable": { + "type": "boolean", + "default": false + }, + "discriminator": { + "$ref": "#/definitions/openapiSchema_3_0/definitions/Discriminator" + }, + "readOnly": { + "type": "boolean", + "default": false + }, + "writeOnly": { + "type": "boolean", + "default": false + }, + "example": true, + "externalDocs": { + "$ref": "#/definitions/openapiSchema_3_0/definitions/ExternalDocumentation" + }, + "deprecated": { + "type": "boolean", + "default": false + }, + "xml": { + "$ref": "#/definitions/openapiSchema_3_0/definitions/XML" + } + }, + "patternProperties": { + "^x-": true + }, + "additionalProperties": false + }, + "avroSchema_v1": { + "definitions": { + "avroSchema": { + "title": "Avro Schema", + "description": "Root Schema", + "oneOf": [ + { + "$ref": "#/definitions/avroSchema_v1/definitions/types" + } + ] + }, + "types": { + "title": "Avro Types", + "description": "Allowed Avro types", + "oneOf": [ + { + "$ref": "#/definitions/avroSchema_v1/definitions/primitiveType" + }, + { + "$ref": "#/definitions/avroSchema_v1/definitions/primitiveTypeWithMetadata" + }, + { + "$ref": "#/definitions/avroSchema_v1/definitions/customTypeReference" + }, + { + "$ref": "#/definitions/avroSchema_v1/definitions/avroRecord" + }, + { + "$ref": "#/definitions/avroSchema_v1/definitions/avroEnum" + }, + { + "$ref": "#/definitions/avroSchema_v1/definitions/avroArray" + }, + { + "$ref": "#/definitions/avroSchema_v1/definitions/avroMap" + }, + { + "$ref": "#/definitions/avroSchema_v1/definitions/avroFixed" + }, + { + "$ref": "#/definitions/avroSchema_v1/definitions/avroUnion" + } + ] + }, + "primitiveType": { + "title": "Primitive Type", + "description": "Basic type primitives.", + "type": "string", + "enum": [ + "null", + "boolean", + "int", + "long", + "float", + "double", + "bytes", + "string" + ] + }, + "primitiveTypeWithMetadata": { + "title": "Primitive Type With Metadata", + "description": "A primitive type with metadata attached.", + "type": "object", + "properties": { + "type": { + "$ref": "#/definitions/avroSchema_v1/definitions/primitiveType" + } + }, + "required": [ + "type" + ] + }, + "customTypeReference": { + "title": "Custom Type", + "description": "Reference to a ComplexType", + "not": { + "$ref": "#/definitions/avroSchema_v1/definitions/primitiveType" + }, + "type": "string", + "pattern": "^[A-Za-z_][A-Za-z0-9_]*(\\.[A-Za-z_][A-Za-z0-9_]*)*$" + }, + "avroUnion": { + "title": "Union", + "description": "A Union of types", + "type": "array", + "items": { + "$ref": "#/definitions/avroSchema_v1/definitions/avroSchema" + }, + "minItems": 1 + }, + "avroField": { + "title": "Field", + "description": "A field within a Record", + "type": "object", + "properties": { + "name": { + "$ref": "#/definitions/avroSchema_v1/definitions/name" + }, + "type": { + "$ref": "#/definitions/avroSchema_v1/definitions/types" + }, + "doc": { + "type": "string" + }, + "default": true, + "order": { + "enum": [ + "ascending", + "descending", + "ignore" + ] + }, + "aliases": { + "type": "array", + "items": { + "$ref": "#/definitions/avroSchema_v1/definitions/name" + } + } + }, + "required": [ + "name", + "type" + ] + }, + "avroRecord": { + "title": "Record", + "description": "A Record", + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "record" + }, + "name": { + "$ref": "#/definitions/avroSchema_v1/definitions/name" + }, + "namespace": { + "$ref": "#/definitions/avroSchema_v1/definitions/namespace" + }, + "doc": { + "type": "string" + }, + "aliases": { + "type": "array", + "items": { + "$ref": "#/definitions/avroSchema_v1/definitions/name" + } + }, + "fields": { + "type": "array", + "items": { + "$ref": "#/definitions/avroSchema_v1/definitions/avroField" + } + } + }, + "required": [ + "type", + "name", + "fields" + ] + }, + "avroEnum": { + "title": "Enum", + "description": "An enumeration", + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "enum" + }, + "name": { + "$ref": "#/definitions/avroSchema_v1/definitions/name" + }, + "namespace": { + "$ref": "#/definitions/avroSchema_v1/definitions/namespace" + }, + "doc": { + "type": "string" + }, + "aliases": { + "type": "array", + "items": { + "$ref": "#/definitions/avroSchema_v1/definitions/name" + } + }, + "symbols": { + "type": "array", + "items": { + "$ref": "#/definitions/avroSchema_v1/definitions/name" + } + } + }, + "required": [ + "type", + "name", + "symbols" + ] + }, + "avroArray": { + "title": "Array", + "description": "An array", + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "array" + }, + "name": { + "$ref": "#/definitions/avroSchema_v1/definitions/name" + }, + "namespace": { + "$ref": "#/definitions/avroSchema_v1/definitions/namespace" + }, + "doc": { + "type": "string" + }, + "aliases": { + "type": "array", + "items": { + "$ref": "#/definitions/avroSchema_v1/definitions/name" + } + }, + "items": { + "$ref": "#/definitions/avroSchema_v1/definitions/types" + } + }, + "required": [ + "type", + "items" + ] + }, + "avroMap": { + "title": "Map", + "description": "A map of values", + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "map" + }, + "name": { + "$ref": "#/definitions/avroSchema_v1/definitions/name" + }, + "namespace": { + "$ref": "#/definitions/avroSchema_v1/definitions/namespace" + }, + "doc": { + "type": "string" + }, + "aliases": { + "type": "array", + "items": { + "$ref": "#/definitions/avroSchema_v1/definitions/name" + } + }, + "values": { + "$ref": "#/definitions/avroSchema_v1/definitions/types" + } + }, + "required": [ + "type", + "values" + ] + }, + "avroFixed": { + "title": "Fixed", + "description": "A fixed sized array of bytes", + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "fixed" + }, + "name": { + "$ref": "#/definitions/avroSchema_v1/definitions/name" + }, + "namespace": { + "$ref": "#/definitions/avroSchema_v1/definitions/namespace" + }, + "doc": { + "type": "string" + }, + "aliases": { + "type": "array", + "items": { + "$ref": "#/definitions/avroSchema_v1/definitions/name" + } + }, + "size": { + "type": "number" + } + }, + "required": [ + "type", + "name", + "size" + ] + }, + "name": { + "type": "string", + "pattern": "^[A-Za-z_][A-Za-z0-9_]*$" + }, + "namespace": { + "type": "string", + "pattern": "^([A-Za-z_][A-Za-z0-9_]*(\\.[A-Za-z_][A-Za-z0-9_]*)*)*$" + } + }, + "description": "Json-Schema definition for Avro AVSC files.", + "oneOf": [ + { + "$ref": "#/definitions/avroSchema_v1/definitions/avroSchema" + } + ], + "title": "Avro Schema Definition" + }, + "parameters": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/parameter" + } + ] + }, + "description": "JSON objects describing re-usable channel parameters." + }, + "parameter": { + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, + "properties": { + "description": { + "type": "string", + "description": "A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed." + }, + "schema": { + "$ref": "#/definitions/schema" + }, + "location": { + "type": "string", + "description": "A runtime expression that specifies the location of the parameter value", + "pattern": "^\\$message\\.(header|payload)#(\\/(([^\\/~])|(~[01]))*)*" + }, + "$ref": { + "$ref": "#/definitions/ReferenceObject" + } + } + }, + "channelBindingsObject": { + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, + "properties": { + "http": {}, + "ws": { + "properties": { + "bindingVersion": { + "enum": [ + "0.1.0" + ] + } + }, + "allOf": [ + { + "description": "If no bindingVersion specified, use the latest binding", + "if": { + "not": { + "required": [ + "bindingVersion" + ] + } + }, + "then": { + "$ref": "#/definitions/bindings/websockets/channel" + } + }, + { + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.1.0" + } + } + }, + "then": { + "$ref": "#/definitions/bindings/websockets/channel" + } + } + ] + }, + "amqp": { + "properties": { + "bindingVersion": { + "enum": [ + "0.2.0" + ] + } + }, + "allOf": [ + { + "description": "If no bindingVersion specified, use the latest binding", + "if": { + "not": { + "required": [ + "bindingVersion" + ] + } + }, + "then": { + "$ref": "#/definitions/bindings/amqp/channel" + } + }, + { + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.2.0" + } + } + }, + "then": { + "$ref": "#/definitions/bindings/amqp/channel" + } + } + ] + }, + "amqp1": {}, + "mqtt": {}, + "mqtt5": {}, + "kafka": { + "properties": { + "bindingVersion": { + "enum": [ + "0.4.0", + "0.3.0" + ] + } + }, + "allOf": [ + { + "description": "If no bindingVersion specified, use the latest binding", + "if": { + "not": { + "required": [ + "bindingVersion" + ] + } + }, + "then": { + "$ref": "#/definitions/bindings/kafka/channel" + } + }, + { + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.4.0" + } + } + }, + "then": { + "$ref": "#/definitions/bindings/kafka/channel" + } + }, + { + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.3.0" + } + } + }, + "then": { + "$ref": "#/definitions/bindings/kafka/channel" + } + } + ] + }, + "anypointmq": { + "properties": { + "bindingVersion": { + "enum": [ + "0.0.1" + ] + } + }, + "allOf": [ + { + "description": "If no bindingVersion specified, use the latest binding", + "if": { + "not": { + "required": [ + "bindingVersion" + ] + } + }, + "then": { + "$ref": "#/definitions/bindings/anypointmq/channel" + } + }, + { + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.0.1" + } + } + }, + "then": { + "$ref": "#/definitions/bindings/anypointmq/channel" + } + } + ] + }, + "nats": {}, + "jms": {}, + "sns": {}, + "sqs": {}, + "stomp": {}, + "redis": {}, + "ibmmq": { + "properties": { + "bindingVersion": { + "enum": [ + "0.1.0" + ] + } + }, + "allOf": [ + { + "description": "If no bindingVersion specified, use the latest binding", + "if": { + "not": { + "required": [ + "bindingVersion" + ] + } + }, + "then": { + "$ref": "#/definitions/bindings/ibmmq/channel" + } + }, + { + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.1.0" + } + } + }, + "then": { + "$ref": "#/definitions/bindings/ibmmq/channel" + } + } + ] + }, + "solace": {}, + "googlepubsub": { + "properties": { + "bindingVersion": { + "enum": [ + "0.1.0" + ] + } + }, + "allOf": [ + { + "description": "If no bindingVersion specified, use the latest binding", + "if": { + "not": { + "required": [ + "bindingVersion" + ] + } + }, + "then": { + "$ref": "#/definitions/bindings/googlepubsub/channel" + } + }, + { + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.1.0" + } + } + }, + "then": { + "$ref": "#/definitions/bindings/googlepubsub/channel" + } + } + ] + }, + "pulsar": { + "properties": { + "bindingVersion": { + "enum": [ + "0.1.0" + ] + } + }, + "allOf": [ + { + "description": "If no bindingVersion specified, use the latest binding", + "if": { + "not": { + "required": [ + "bindingVersion" + ] + } + }, + "then": { + "$ref": "#/definitions/bindings/pulsar/channel" + } + }, + { + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.1.0" + } + } + }, + "then": { + "$ref": "#/definitions/bindings/pulsar/channel" + } + } + ] + } + } + }, + "bindings/websockets/channel": { + "title": "WebSockets channel bindings object", + "description": "When using WebSockets, the channel represents the connection. Unlike other protocols that support multiple virtual channels (topics, routing keys, etc.) per connection, WebSockets doesn't support virtual channels or, put it another way, there's only one channel and its characteristics are strongly related to the protocol used for the handshake, i.e., HTTP.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, + "properties": { + "method": { + "type": "string", + "enum": [ + "GET", + "POST" + ], + "description": "The HTTP method to use when establishing the connection. Its value MUST be either 'GET' or 'POST'." + }, + "query": { + "$ref": "#/definitions/schema", + "description": "A Schema object containing the definitions for each query parameter. This schema MUST be of type 'object' and have a 'properties' key." + }, + "headers": { + "$ref": "#/definitions/schema", + "description": "A Schema object containing the definitions of the HTTP headers to use when establishing the connection. This schema MUST be of type 'object' and have a 'properties' key." + }, + "bindingVersion": { + "type": "string", + "enum": [ + "0.1.0" + ], + "description": "The version of this binding. If omitted, 'latest' MUST be assumed." + } + }, + "examples": [ + { + "method": "POST", + "bindingVersion": "0.1.0" + } + ] + }, + "bindings/amqp/channel": { + "title": "AMQP channel bindings object", + "description": "This object contains information about the channel representation in AMQP.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, + "properties": { + "is": { + "type": "string", + "enum": [ + "queue", + "routingKey" + ], + "description": "Defines what type of channel is it. Can be either 'queue' or 'routingKey' (default)." + }, + "exchange": { + "type": "object", + "properties": { + "name": { + "type": "string", + "maxLength": 255, + "description": "The name of the exchange. It MUST NOT exceed 255 characters long." + }, + "type": { + "type": "string", + "enum": [ + "topic", + "direct", + "fanout", + "default", + "headers" + ], + "description": "The type of the exchange. Can be either 'topic', 'direct', 'fanout', 'default' or 'headers'." + }, + "durable": { + "type": "boolean", + "description": "Whether the exchange should survive broker restarts or not." + }, + "autoDelete": { + "type": "boolean", + "description": "Whether the exchange should be deleted when the last queue is unbound from it." + }, + "vhost": { + "type": "string", + "default": "/", + "description": "The virtual host of the exchange. Defaults to '/'." + } + }, + "description": "When is=routingKey, this object defines the exchange properties." + }, + "queue": { + "type": "object", + "properties": { + "name": { + "type": "string", + "maxLength": 255, + "description": "The name of the queue. It MUST NOT exceed 255 characters long." + }, + "durable": { + "type": "boolean", + "description": "Whether the queue should survive broker restarts or not." + }, + "exclusive": { + "type": "boolean", + "description": "Whether the queue should be used only by one connection or not." + }, + "autoDelete": { + "type": "boolean", + "description": "Whether the queue should be deleted when the last consumer unsubscribes." + }, + "vhost": { + "type": "string", + "default": "/", + "description": "The virtual host of the queue. Defaults to '/'." + } + }, + "description": "When is=queue, this object defines the queue properties." + }, + "bindingVersion": { + "type": "string", + "enum": [ + "0.2.0" + ], + "description": "The version of this binding. If omitted, 'latest' MUST be assumed." + } + }, + "oneOf": [ + { + "properties": { + "is": { + "const": "routingKey" + } + }, + "required": [ + "exchange" + ], + "not": { + "required": [ + "queue" + ] + } + }, + { + "properties": { + "is": { + "const": "queue" + } + }, + "required": [ + "queue" + ], + "not": { + "required": [ + "exchange" + ] + } + } + ], + "examples": [ + { + "is": "routingKey", + "exchange": { + "name": "myExchange", + "type": "topic", + "durable": true, + "autoDelete": false, + "vhost": "/" + }, + "bindingVersion": "0.2.0" + }, + { + "is": "queue", + "queue": { + "name": "my-queue-name", + "durable": true, + "exclusive": true, + "autoDelete": false, + "vhost": "/" + }, + "bindingVersion": "0.2.0" + } + ] + }, + "bindings/kafka/channel": { + "title": "Channel Schema", + "description": "This object contains information about the channel representation in Kafka.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, + "properties": { + "topic": { + "type": "string", + "description": "Kafka topic name if different from channel name." + }, + "partitions": { + "type": "integer", + "minimum": 1, + "description": "Number of partitions configured on this topic." + }, + "replicas": { + "type": "integer", + "minimum": 1, + "description": "Number of replicas configured on this topic." + }, + "bindingVersion": { + "type": "string", + "enum": [ + "0.3.0" + ], + "description": "The version of this binding. If omitted, 'latest' MUST be assumed." + } + }, + "examples": [ + { + "topic": "my-specific-topic", + "partitions": 20, + "replicas": 3, + "bindingVersion": "0.3.0" + } + ] + }, + "bindings/anypointmq/channel": { + "title": "Anypoint MQ channel bindings object", + "description": "This object contains configuration for describing an Anypoint MQ exchange, queue, or FIFO queue as an AsyncAPI channel. This objects only contains configuration that can not be provided in the AsyncAPI standard channel object.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, + "properties": { + "destination": { + "type": "string", + "description": "The destination (queue or exchange) name for this channel. SHOULD only be specified if the channel name differs from the actual destination name, such as when the channel name is not a valid destination name in Anypoint MQ. Defaults to the channel name." + }, + "destinationType": { + "type": "string", + "enum": [ + "exchange", + "queue", + "fifo-queue" + ], + "default": "queue", + "description": "The type of destination. SHOULD be specified to document the messaging model (publish/subscribe, point-to-point, strict message ordering) supported by this channel." + }, + "bindingVersion": { + "type": "string", + "enum": [ + "0.0.1" + ], + "description": "The version of this binding. If omitted, 'latest' MUST be assumed." + } + }, + "examples": [ + { + "destination": "user-signup-exchg", + "destinationType": "exchange", + "bindingVersion": "0.0.1" + } + ] + }, + "bindings/ibmmq/channel": { + "title": "IBM MQ channel bindings object", + "description": "This object contains information about the channel representation in IBM MQ. Each channel corresponds to a Queue or Topic within IBM MQ.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, + "properties": { + "destinationType": { + "type": "string", + "enum": [ + "topic", + "queue" + ], + "default": "topic", + "description": "Defines the type of AsyncAPI channel." + }, + "queue": { + "type": "object", + "description": "Defines the properties of a queue.", + "properties": { + "objectName": { + "type": "string", + "maxLength": 48, + "description": "Defines the name of the IBM MQ queue associated with the channel." + }, + "isPartitioned": { + "type": "boolean", + "default": false, + "description": "Defines if the queue is a cluster queue and therefore partitioned. If 'true', a binding option MAY be specified when accessing the queue. More information on binding options can be found on this page in the IBM MQ Knowledge Center." + }, + "exclusive": { + "type": "boolean", + "default": false, + "description": "Specifies if it is recommended to open the queue exclusively." + } + }, + "required": [ + "objectName" + ] + }, + "topic": { + "type": "object", + "description": "Defines the properties of a topic.", + "properties": { + "string": { + "type": "string", + "maxLength": 10240, + "description": "The value of the IBM MQ topic string to be used." + }, + "objectName": { + "type": "string", + "maxLength": 48, + "description": "The name of the IBM MQ topic object." + }, + "durablePermitted": { + "type": "boolean", + "default": true, + "description": "Defines if the subscription may be durable." + }, + "lastMsgRetained": { + "type": "boolean", + "default": false, + "description": "Defines if the last message published will be made available to new subscriptions." + } + } + }, + "maxMsgLength": { + "type": "integer", + "minimum": 0, + "maximum": 104857600, + "description": "The maximum length of the physical message (in bytes) accepted by the Topic or Queue. Messages produced that are greater in size than this value may fail to be delivered. More information on the maximum message length can be found on this [page](https://www.ibm.com/support/knowledgecenter/SSFKSJ_latest/com.ibm.mq.ref.dev.doc/q097520_.html) in the IBM MQ Knowledge Center." + }, + "bindingVersion": { + "type": "string", + "enum": [ + "0.1.0" + ], + "description": "The version of this binding." + } + }, + "oneOf": [ + { + "properties": { + "destinationType": { + "const": "topic" + } + }, + "not": { + "required": [ + "queue" + ] + } + }, + { + "properties": { + "destinationType": { + "const": "queue" + } + }, + "required": [ + "queue" + ], + "not": { + "required": [ + "topic" + ] + } + } + ], + "examples": [ + { + "destinationType": "topic", + "topic": { + "objectName": "myTopicName" + }, + "bindingVersion": "0.1.0" + }, + { + "destinationType": "queue", + "queue": { + "objectName": "myQueueName", + "exclusive": true + }, + "bindingVersion": "0.1.0" + } + ] + }, + "bindings/googlepubsub/channel": { + "title": "Cloud Pub/Sub Channel Schema", + "description": "This object contains information about the channel representation for Google Cloud Pub/Sub.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, + "properties": { + "bindingVersion": { + "type": "string", + "enum": [ + "0.1.0" + ], + "description": "The version of this binding." + }, + "labels": { + "type": "object" + }, + "messageRetentionDuration": { + "type": "string" + }, + "messageStoragePolicy": { + "type": "object", + "additionalProperties": false, + "properties": { + "allowedPersistenceRegions": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "schemaSettings": { + "type": "object", + "additionalItems": false, + "properties": { + "encoding": { + "type": "string" + }, + "firstRevisionId": { + "type": "string" + }, + "lastRevisionId": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "encoding", + "name" + ] + }, + "topic": { + "type": "string" + } + }, + "required": [ + "schemaSettings", + "topic" + ], + "examples": [ + { + "labels": { + "label1": "value1", + "label2": "value2" + }, + "messageRetentionDuration": "86400s", + "messageStoragePolicy": { + "allowedPersistenceRegions": [ + "us-central1", + "us-east1" + ] + }, + "schemaSettings": { + "encoding": "json", + "name": "projects/your-project-id/schemas/your-schema" + } + } + ] + }, + "bindings/pulsar/channel": { + "title": "Channel Schema", + "description": "This object contains information about the channel representation in Pulsar, which covers namespace and topic level admin configuration. This object contains additional information not possible to represent within the core AsyncAPI specification.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, + "required": [ + "namespace", + "persistence" + ], + "properties": { + "namespace": { + "type": "string", + "description": "The namespace, the channel is associated with." + }, + "persistence": { + "type": "string", + "enum": [ + "persistent", + "non-persistent" + ], + "description": "persistence of the topic in Pulsar." + }, + "compaction": { + "type": "integer", + "minimum": 0, + "description": "Topic compaction threshold given in MB" + }, + "geo-replication": { + "type": "array", + "description": "A list of clusters the topic is replicated to.", + "items": { + "type": "string" + } + }, + "retention": { + "type": "object", + "additionalProperties": false, + "properties": { + "time": { + "type": "integer", + "minimum": 0, + "description": "Time given in Minutes. `0` = Disable message retention." + }, + "size": { + "type": "integer", + "minimum": 0, + "description": "Size given in MegaBytes. `0` = Disable message retention." + } + } + }, + "ttl": { + "type": "integer", + "description": "TTL in seconds for the specified topic" + }, + "deduplication": { + "type": "boolean", + "description": "Whether deduplication of events is enabled or not." + }, + "bindingVersion": { + "type": "string", + "enum": [ + "0.1.0" + ], + "description": "The version of this binding. If omitted, 'latest' MUST be assumed." + } + }, + "examples": [ + { + "namespace": "ns1", + "persistence": "persistent", + "compaction": 1000, + "retention": { + "time": 15, + "size": 1000 + }, + "ttl": 360, + "geo-replication": [ + "us-west", + "us-east" + ], + "deduplication": true, + "bindingVersion": "0.1.0" + } + ] + }, + "operations": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/operation" + } + ] + } + }, + "operation": { + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, + "required": [ + "action", + "channel" + ], + "properties": { + "action": { + "type": "string", + "description": "Allowed values are send and receive. Use send when it's expected that the application will send a message to the given channel, and receive when the application should expect receiving messages from the given channel.", + "enum": [ + "send", + "receive" + ] + }, + "channel": { + "$ref": "#/definitions/Reference" + }, + "messages": { + "type": "array", + "items": { + "$ref": "#/definitions/Reference" + } + }, + "reply": { + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/operationReply" + } + ] + }, + "traits": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/operationTrait" + } + ] + } + }, + "title": { + "type": "string", + "description": "A human-friendly title for the operation." + }, + "summary": { + "type": "string", + "description": "A brief summary of the operation." + }, + "description": { + "type": "string", + "description": "A longer description of the operation. CommonMark is allowed." + }, + "security": { + "$ref": "#/definitions/securityRequirements" + }, + "tags": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/tag" + } + ] + }, + "uniqueItems": true + }, + "externalDocs": { + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/externalDocs" + } + ] + }, + "bindings": { + "$ref": "#/definitions/operationBindingsObject" + } + } + }, + "operationReply": { + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, + "properties": { + "address": { + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/operationReplyAddress" + } + ] + }, + "channel": { + "$ref": "#/definitions/Reference" + }, + "messages": { + "type": "array", + "items": { + "$ref": "#/definitions/Reference" + } + } + } + }, + "operationReplyAddress": { + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, + "required": [ + "location" + ], + "properties": { + "location": { + "type": "string", + "description": "A runtime expression that specifies the location of the reply address.", + "pattern": "^\\$message\\.(header|payload)#(\\/(([^\\/~])|(~[01]))*)*" + }, + "description": { + "type": "string", + "description": "An optional description of the address. CommonMark is allowed." + } + } + }, + "operationTrait": { + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, + "properties": { + "title": { + "$ref": "#/definitions/operation#/properties/title" + }, + "summary": { + "$ref": "#/definitions/operation#/properties/summary" + }, + "description": { + "$ref": "#/definitions/operation#/properties/description" + }, + "security": { + "$ref": "#/definitions/operation#/properties/security" + }, + "tags": { + "$ref": "#/definitions/operation#/properties/tags" + }, + "externalDocs": { + "$ref": "#/definitions/operation#/properties/externalDocs" + }, + "bindings": { + "$ref": "#/definitions/operation#/properties/bindings" + } + } + }, + "operationBindingsObject": { + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, + "properties": { + "http": { + "properties": { + "bindingVersion": { + "enum": [ + "0.1.0" + ] + } + }, + "allOf": [ + { + "description": "If no bindingVersion specified, use the latest binding", + "if": { + "not": { + "required": [ + "bindingVersion" + ] + } + }, + "then": { + "$ref": "#/definitions/bindings/http/operation" + } + }, + { + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.1.0" + } + } + }, + "then": { + "$ref": "#/definitions/bindings/http/operation" + } + } + ] + }, + "ws": {}, + "amqp": { + "properties": { + "bindingVersion": { + "enum": [ + "0.2.0" + ] + } + }, + "allOf": [ + { + "description": "If no bindingVersion specified, use the latest binding", + "if": { + "not": { + "required": [ + "bindingVersion" + ] + } + }, + "then": { + "$ref": "#/definitions/bindings/amqp/operation" + } + }, + { + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.2.0" + } + } + }, + "then": { + "$ref": "#/definitions/bindings/amqp/operation" + } + } + ] + }, + "amqp1": {}, + "mqtt": { + "properties": { + "bindingVersion": { + "enum": [ + "0.1.0" + ] + } + }, + "allOf": [ + { + "description": "If no bindingVersion specified, use the latest binding", + "if": { + "not": { + "required": [ + "bindingVersion" + ] + } + }, + "then": { + "$ref": "#/definitions/bindings/mqtt/operation" + } + }, + { + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.1.0" + } + } + }, + "then": { + "$ref": "#/definitions/bindings/mqtt/operation" + } + } + ] + }, + "mqtt5": {}, + "kafka": { + "properties": { + "bindingVersion": { + "enum": [ + "0.4.0", + "0.3.0", + "0.1.0" + ] + } + }, + "allOf": [ + { + "description": "If no bindingVersion specified, use the latest binding", + "if": { + "not": { + "required": [ + "bindingVersion" + ] + } + }, + "then": { + "$ref": "#/definitions/bindings/kafka/operation" + } + }, + { + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.4.0" + } + } + }, + "then": { + "$ref": "#/definitions/bindings/kafka/operation" + } + }, + { + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.3.0" + } + } + }, + "then": { + "$ref": "#/definitions/bindings/kafka/operation" + } + }, + { + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.1.0" + } + } + }, + "then": { + "$ref": "#/definitions/bindings/kafka/operation" + } + } + ] + }, + "anypointmq": {}, + "nats": { + "properties": { + "bindingVersion": { + "enum": [ + "0.1.0" + ] + } + }, + "allOf": [ + { + "description": "If no bindingVersion specified, use the latest binding", + "if": { + "not": { + "required": [ + "bindingVersion" + ] + } + }, + "then": { + "$ref": "#/definitions/bindings/nats/operation" + } + }, + { + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.1.0" + } + } + }, + "then": { + "$ref": "#/definitions/bindings/nats/operation" + } + } + ] + }, + "jms": {}, + "sns": {}, + "sqs": {}, + "stomp": {}, + "redis": {}, + "ibmmq": {}, + "solace": { + "properties": { + "bindingVersion": { + "enum": [ + "0.3.0", + "0.2.0" + ] + } + }, + "allOf": [ + { + "description": "If no bindingVersion specified, use the latest binding", + "if": { + "not": { + "required": [ + "bindingVersion" + ] + } + }, + "then": { + "$ref": "#/definitions/bindings/solace/operation" + } + }, + { + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.3.0" + } + } + }, + "then": { + "$ref": "#/definitions/bindings/solace/operation" + } + }, + { + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.2.0" + } + } + }, + "then": { + "$ref": "#/definitions/bindings/solace/operation" + } + } + ] + }, + "googlepubsub": {} + } + }, + "bindings/http/operation": { + "title": "HTTP operation bindings object", + "description": "This object contains information about the operation representation in HTTP.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, + "properties": { + "type": { + "type": "string", + "enum": [ + "request", + "response" + ], + "description": "Required. Type of operation. Its value MUST be either 'request' or 'response'." + }, + "method": { + "type": "string", + "enum": [ + "GET", + "PUT", + "POST", + "PATCH", + "DELETE", + "HEAD", + "OPTIONS", + "CONNECT", + "TRACE" + ], + "description": "When 'type' is 'request', this is the HTTP method, otherwise it MUST be ignored. Its value MUST be one of 'GET', 'POST', 'PUT', 'PATCH', 'DELETE', 'HEAD', 'OPTIONS', 'CONNECT', and 'TRACE'." + }, + "query": { + "$ref": "#/definitions/schema", + "description": "A Schema object containing the definitions for each query parameter. This schema MUST be of type 'object' and have a properties key." + }, + "bindingVersion": { + "type": "string", + "enum": [ + "0.1.0" + ], + "description": "The version of this binding. If omitted, 'latest' MUST be assumed." + } + }, + "required": [ + "type" + ], + "oneOf": [ + { + "properties": { + "type": { + "const": "request" + } + }, + "required": [ + "method" + ] + }, + { + "properties": { + "is": { + "const": "response" + } + }, + "not": { + "required": [ + "method" + ] + } + } + ], + "examples": [ + { + "type": "response", + "query": { + "type": "object", + "required": [ + "companyId" + ], + "properties": { + "companyId": { + "type": "number", + "minimum": 1, + "description": "The Id of the company." + } + }, + "additionalProperties": false + }, + "bindingVersion": "0.1.0" + }, + { + "type": "request", + "method": "GET", + "query": { + "type": "object", + "required": [ + "companyId" + ], + "properties": { + "companyId": { + "type": "number", + "minimum": 1, + "description": "The Id of the company." + } + }, + "additionalProperties": false + }, + "bindingVersion": "0.1.0" + } + ] + }, + "bindings/amqp/operation": { + "title": "AMQP operation bindings object", + "description": "This object contains information about the operation representation in AMQP.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, + "properties": { + "expiration": { + "type": "integer", + "minimum": 0, + "description": "TTL (Time-To-Live) for the message. It MUST be greater than or equal to zero." + }, + "userId": { + "type": "string", + "description": "Identifies the user who has sent the message." + }, + "cc": { + "type": "array", + "items": { + "type": "string" + }, + "description": "The routing keys the message should be routed to at the time of publishing." + }, + "priority": { + "type": "integer", + "description": "A priority for the message." + }, + "deliveryMode": { + "type": "integer", + "enum": [ + 1, + 2 + ], + "description": "Delivery mode of the message. Its value MUST be either 1 (transient) or 2 (persistent)." + }, + "mandatory": { + "type": "boolean", + "description": "Whether the message is mandatory or not." + }, + "bcc": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Like cc but consumers will not receive this information." + }, + "replyTo": { + "type": "string", + "description": "Name of the queue where the consumer should send the response." + }, + "timestamp": { + "type": "boolean", + "description": "Whether the message should include a timestamp or not." + }, + "ack": { + "type": "boolean", + "description": "Whether the consumer should ack the message or not." + }, + "bindingVersion": { + "type": "string", + "enum": [ + "0.2.0" + ], + "description": "The version of this binding. If omitted, \"latest\" MUST be assumed." + } + }, + "examples": [ + { + "expiration": 100000, + "userId": "guest", + "cc": [ + "user.logs" + ], + "priority": 10, + "deliveryMode": 2, + "mandatory": false, + "bcc": [ + "external.audit" + ], + "replyTo": "user.signedup", + "timestamp": true, + "ack": false, + "bindingVersion": "0.2.0" + } + ] + }, + "bindings/mqtt/operation": { + "title": "MQTT operation bindings object", + "description": "This object contains information about the operation representation in MQTT.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, + "properties": { + "qos": { + "type": "integer", + "description": "Defines the Quality of Service (QoS) levels for the message flow between client and server. Its value MUST be either 0 (At most once delivery), 1 (At least once delivery), or 2 (Exactly once delivery)." + }, + "retain": { + "type": "boolean", + "description": "Whether the broker should retain the message or not." + }, + "bindingVersion": { + "type": "string", + "enum": [ + "0.1.0" + ], + "description": "The version of this binding. If omitted, 'latest' MUST be assumed." + } + }, + "examples": [ + { + "qos": 2, + "retain": true, + "bindingVersion": "0.1.0" + } + ] + }, + "bindings/kafka/operation": { + "title": "Kafka operation message bindings object", + "description": "This object contains information about the operation representation in Kafka.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, + "properties": { + "groupId": { + "$ref": "#/definitions/schema", + "description": "Id of the consumer group." + }, + "clientId": { + "$ref": "#/definitions/schema", + "description": "Id of the consumer inside a consumer group." + }, + "bindingVersion": { + "type": "string", + "enum": [ + "0.1.0" + ], + "description": "The version of this binding. If omitted, 'latest' MUST be assumed." + } + }, + "examples": [ + { + "groupId": { + "type": "string", + "enum": [ + "myGroupId" + ] + }, + "clientId": { + "type": "string", + "enum": [ + "myClientId" + ] + }, + "bindingVersion": "0.1.0" + } + ] + }, + "bindings/nats/operation": { + "title": "NATS operation bindings object", + "description": "This object contains information about the operation representation in NATS.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, + "properties": { + "queue": { + "type": "string", + "description": "Defines the name of the queue to use. It MUST NOT exceed 255 characters.", + "maxLength": 255 + }, + "bindingVersion": { + "type": "string", + "enum": [ + "0.1.0" + ], + "description": "The version of this binding. If omitted, 'latest' MUST be assumed." + } + }, + "examples": [ + { + "queue": "MyCustomQueue", + "bindingVersion": "0.1.0" + } + ] + }, + "bindings/solace/operation": { + "title": "Solace operation bindings object", + "description": "This object contains information about the operation representation in Solace.", + "type": "object", + "additionalProperties": false, + "properties": { + "destinations": { + "description": "The list of Solace destinations referenced in the operation.", + "type": "array", + "items": { + "type": "object", + "properties": { + "deliveryMode": { + "type": "string", + "enum": [ + "direct", + "persistent" + ] + } + }, + "oneOf": [ + { + "properties": { + "destinationType": { + "type": "string", + "const": "queue", + "description": "If the type is queue, then the subscriber can bind to the queue. The queue subscribes to the given topicSubscriptions. If no topicSubscriptions are provied, the queue will subscribe to the topic as represented by the channel name." + }, + "queue": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The name of the queue" + }, + "topicSubscriptions": { + "type": "array", + "description": "The list of topics that the queue subscribes to.", + "items": { + "type": "string" + } + }, + "accessType": { + "type": "string", + "enum": [ + "exclusive", + "nonexclusive" + ] + } + } + } + } + }, + { + "properties": { + "destinationType": { + "type": "string", + "const": "topic", + "description": "If the type is topic, then the subscriber subscribes to the given topicSubscriptions. If no topicSubscriptions are provided, the client will subscribe to the topic as represented by the channel name." + }, + "topicSubscriptions": { + "type": "array", + "description": "The list of topics that the client subscribes to.", + "items": { + "type": "string" + } + } + } + } + ] + } + } + }, + "bindingVersion": { + "type": "string", + "enum": [ + "0.2.0" + ], + "description": "The version of this binding. If omitted, \"latest\" MUST be assumed." + }, + "examples": [ + { + "bindingVersion": "0.2.0", + "destinations": [ + { + "destinationType": "queue", + "queue": { + "name": "sampleQueue", + "topicSubscriptions": [ + "samples/*" + ], + "accessType": "nonexclusive" + } + }, + { + "destinationType": "topic", + "topicSubscriptions": [ + "samples/*" + ] + } + ] + } + ] + }, + "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": { + "type": "object", + "patternProperties": { + "^[\\w\\d\\.\\-_]+$": { + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/schema" + } + ] + } + } + }, + "servers": { + "type": "object", + "patternProperties": { + "^[\\w\\d\\.\\-_]+$": { + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/server" + } + ] + } + } + }, + "channels": { + "type": "object", + "patternProperties": { + "^[\\w\\d\\.\\-_]+$": { + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/channel" + } + ] + } + } + }, + "serverVariables": { + "type": "object", + "patternProperties": { + "^[\\w\\d\\.\\-_]+$": { + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/serverVariable" + } + ] + } + } + }, + "messages": { + "type": "object", + "patternProperties": { + "^[\\w\\d\\.\\-_]+$": { + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/messageObject" + } + ] + } + } + }, + "securitySchemes": { + "type": "object", + "patternProperties": { + "^[\\w\\d\\.\\-_]+$": { + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/SecurityScheme" + } + ] + } + } + }, + "parameters": { + "type": "object", + "patternProperties": { + "^[\\w\\d\\.\\-_]+$": { + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/parameter" + } + ] + } + } + }, + "correlationIds": { + "type": "object", + "patternProperties": { + "^[\\w\\d\\.\\-_]+$": { + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/correlationId" + } + ] + } + } + }, + "operationTraits": { + "type": "object", + "patternProperties": { + "^[\\w\\d\\.\\-_]+$": { + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/operationTrait" + } + ] + } + } + }, + "messageTraits": { + "type": "object", + "patternProperties": { + "^[\\w\\d\\.\\-_]+$": { + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/messageTrait" + } + ] + } + } + }, + "replies": { + "type": "object", + "patternProperties": { + "^[\\w\\d\\.\\-_]+$": { + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/operationReply" + } + ] + } + } + }, + "replyAddresses": { + "type": "object", + "patternProperties": { + "^[\\w\\d\\.\\-_]+$": { + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/operationReplyAddress" + } + ] + } + } + }, + "serverBindings": { + "type": "object", + "patternProperties": { + "^[\\w\\d\\.\\-_]+$": { + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/serverBindingsObject" + } + ] + } + } + }, + "channelBindings": { + "type": "object", + "patternProperties": { + "^[\\w\\d\\.\\-_]+$": { + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/channelBindingsObject" + } + ] + } + } + }, + "operationBindings": { + "type": "object", + "patternProperties": { + "^[\\w\\d\\.\\-_]+$": { + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/operationBindingsObject" + } + ] + } + } + }, + "messageBindings": { + "type": "object", + "patternProperties": { + "^[\\w\\d\\.\\-_]+$": { + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/messageBindingsObject" + } + ] + } + } + }, + "tags": { + "type": "object", + "patternProperties": { + "^[\\w\\d\\.\\-_]+$": { + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/tag" + } + ] + } + } + }, + "externalDocs": { + "type": "object", + "patternProperties": { + "^[\\w\\d\\.\\-_]+$": { + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/externalDocs" + } + ] + } + } + } + } + } + }, + "description": "!!Auto generated!! \n Do not manually edit. " +} \ No newline at end of file diff --git a/tools/bundler/index.js b/tools/bundler/index.js index 3805c247..bfdcf812 100644 --- a/tools/bundler/index.js +++ b/tools/bundler/index.js @@ -1,6 +1,7 @@ const path = require('path'); const fs = require('fs'); const traverse = require('json-schema-traverse'); +const { url } = require('inspector'); const definitionsDirectory = path.resolve(__dirname, '../../definitions'); const bindingsDirectory = path.resolve(__dirname, '../../bindings'); const outputDirectory = path.resolve(__dirname, '../../schemas'); @@ -9,6 +10,12 @@ console.log(`Looking for separate definitions in the following directory: ${defi console.log(`Looking for binding version schemas in the following directory: ${bindingsDirectory}`); console.log(`Using the following output directory: ${outputDirectory}`); +// definitionsRegex is used to transform the name of a definition into a valid one to be used in the -without-$id.json files. +const definitionsRegex = /http:\/\/asyncapi\.com\/definitions\/[^\/]*\/(.+)\.json(.*)/i + +// definitionsRegex is used to transform the name of a binding into a valid one to be used in the -without-$id.json files. +const bindingsRegex = /http:\/\/asyncapi\.com\/(bindings\/[^\/]+)\/[^\/]+\/(.+)\.json(.*)/i + /** * Function to load all the core AsyncAPI spec definition (except the root asyncapi schema, as that will be loaded later) into the bundler. */ @@ -140,9 +147,16 @@ function modifyRefsAndDefinitions(bundledSchema) { */ function getDefinitionName(def) { if (def.startsWith('http://json-schema.org')) return JSON_SCHEMA_PROP_NAME; - - if (path.extname(def) !== '.json') throw new Error(`Original $id values should point to JSON files. There is probably an error in one of the source definitions containing definition: ${def}`); - return path.basename(def, '.json') + if (def.startsWith('http://asyncapi.com/definitions')) { + const result = definitionsRegex.exec(def); + if (result) return result[1] + result[2]; + } + if (def.startsWith('http://asyncapi.com/bindings')) { + const result = bindingsRegex.exec(def); + if (result) return result[1] + '/' + result[2] + result[3]; + } + + return path.basename(def, '.json') // TODO is this really needed? } /** @@ -150,13 +164,11 @@ function getDefinitionName(def) { * it is triggered with every new element of json schema */ function replaceRef(schema) { - //new refs will only work if we remove $id that all point to asyncapi.com delete schema.$id //traversing shoudl take place only in case of schemas with refs if (schema.$ref === undefined ) return; - // updating refs that are related to remote URL refs that need to be update and point to inlined versions if (!schema.$ref.startsWith('#')) schema.$ref = `#/definitions/${getDefinitionName(schema.$ref)}`; } From a037119e39c6608f12f3dab8c1215b919af0728b Mon Sep 17 00:00:00 2001 From: Sergio Moya <1083296+smoya@users.noreply.github.com> Date: Fri, 30 Jun 2023 19:54:48 +0200 Subject: [PATCH 054/102] add missing ajv dep --- package-lock.json | 45 +++++++++++++++++++++++++++++++++++++++++++++ package.json | 1 + 2 files changed, 46 insertions(+) diff --git a/package-lock.json b/package-lock.json index 3194610b..0be2edc7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -371,6 +371,18 @@ "indent-string": "^4.0.0" } }, + "ajv": { + "version": "8.12.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz", + "integrity": "sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==", + "dev": true, + "requires": { + "fast-deep-equal": "^3.1.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2", + "uri-js": "^4.2.2" + } + }, "ansi-colors": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", @@ -623,6 +635,12 @@ "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", "dev": true }, + "fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true + }, "fill-range": { "version": "7.0.1", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", @@ -1083,6 +1101,12 @@ "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", "dev": true }, + "json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", + "dev": true + }, "json5": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.0.tgz", @@ -1748,6 +1772,12 @@ "fromentries": "^1.2.0" } }, + "punycode": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz", + "integrity": "sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==", + "dev": true + }, "randombytes": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", @@ -1781,6 +1811,12 @@ "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", "dev": true }, + "require-from-string": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", + "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", + "dev": true + }, "require-main-filename": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", @@ -1918,6 +1954,15 @@ "is-typedarray": "^1.0.0" } }, + "uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dev": true, + "requires": { + "punycode": "^2.1.0" + } + }, "which": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", diff --git a/package.json b/package.json index eb4beb77..67a923ef 100644 --- a/package.json +++ b/package.json @@ -37,6 +37,7 @@ }, "homepage": "https://github.com/asyncapi/spec-json-schemas#readme", "devDependencies": { + "ajv": "^8.11.2", "mocha": "^10.0.0", "nyc": "^15.1.0" }, From b2b00e82c1e586f3ac3d2e757cfbfd37aacdbb99 Mon Sep 17 00:00:00 2001 From: Sergio Moya <1083296+smoya@users.noreply.github.com> Date: Tue, 11 Jul 2023 11:32:24 +0200 Subject: [PATCH 055/102] do not use slash in definitions or JSON pointers --- schemas/3.0.0-without-$id.json | 655 ++++++++++++++++++++++++++++----- test/schemas.js | 36 +- tools/bundler/index.js | 6 +- 3 files changed, 584 insertions(+), 113 deletions(-) diff --git a/schemas/3.0.0-without-$id.json b/schemas/3.0.0-without-$id.json index c3b99e4a..0fe6d313 100644 --- a/schemas/3.0.0-without-$id.json +++ b/schemas/3.0.0-without-$id.json @@ -943,7 +943,7 @@ } }, "then": { - "$ref": "#/definitions/bindings/mqtt/server" + "$ref": "#/definitions/bindings-mqtt-0.1.0-server" } }, { @@ -958,7 +958,7 @@ } }, "then": { - "$ref": "#/definitions/bindings/mqtt/server" + "$ref": "#/definitions/bindings-mqtt-0.1.0-server" } } ] @@ -982,7 +982,7 @@ } }, "then": { - "$ref": "#/definitions/bindings/mqtt5/server" + "$ref": "#/definitions/bindings-mqtt5-0.2.0-server" } }, { @@ -997,7 +997,7 @@ } }, "then": { - "$ref": "#/definitions/bindings/mqtt5/server" + "$ref": "#/definitions/bindings-mqtt5-0.2.0-server" } } ] @@ -1022,7 +1022,7 @@ } }, "then": { - "$ref": "#/definitions/bindings/kafka/server" + "$ref": "#/definitions/bindings-kafka-0.4.0-server" } }, { @@ -1037,7 +1037,7 @@ } }, "then": { - "$ref": "#/definitions/bindings/kafka/server" + "$ref": "#/definitions/bindings-kafka-0.4.0-server" } }, { @@ -1052,7 +1052,7 @@ } }, "then": { - "$ref": "#/definitions/bindings/kafka/server" + "$ref": "#/definitions/bindings-kafka-0.3.0-server" } } ] @@ -1083,7 +1083,7 @@ } }, "then": { - "$ref": "#/definitions/bindings/ibmmq/server" + "$ref": "#/definitions/bindings-ibmmq-0.1.0-server" } }, { @@ -1098,7 +1098,7 @@ } }, "then": { - "$ref": "#/definitions/bindings/ibmmq/server" + "$ref": "#/definitions/bindings-ibmmq-0.1.0-server" } } ] @@ -1123,7 +1123,7 @@ } }, "then": { - "$ref": "#/definitions/bindings/solace/server" + "$ref": "#/definitions/bindings-solace-0.3.0-server" } }, { @@ -1138,7 +1138,7 @@ } }, "then": { - "$ref": "#/definitions/bindings/solace/server" + "$ref": "#/definitions/bindings-solace-0.3.0-server" } }, { @@ -1153,7 +1153,7 @@ } }, "then": { - "$ref": "#/definitions/bindings/solace/server" + "$ref": "#/definitions/bindings-solace-0.2.0-server" } } ] @@ -1178,7 +1178,7 @@ } }, "then": { - "$ref": "#/definitions/bindings/pulsar/server" + "$ref": "#/definitions/bindings-pulsar-0.1.0-server" } }, { @@ -1193,14 +1193,14 @@ } }, "then": { - "$ref": "#/definitions/bindings/pulsar/server" + "$ref": "#/definitions/bindings-pulsar-0.1.0-server" } } ] } } }, - "bindings/mqtt/server": { + "bindings-mqtt-0.1.0-server": { "title": "MQTT server bindings object", "description": "This object contains information about the server representation in MQTT.", "type": "object", @@ -1273,7 +1273,7 @@ } ] }, - "bindings/mqtt5/server": { + "bindings-mqtt5-0.2.0-server": { "title": "Server Schema", "description": "This object contains information about the server representation in MQTT5.", "type": "object", @@ -1667,7 +1667,42 @@ }, "default": true }, - "bindings/kafka/server": { + "bindings-kafka-0.4.0-server": { + "title": "Server Schema", + "description": "This object contains server connection information to a Kafka broker. This object contains additional information not possible to represent within the core AsyncAPI specification.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, + "properties": { + "schemaRegistryUrl": { + "type": "string", + "description": "API URL for the Schema Registry used when producing Kafka messages (if a Schema Registry was used)." + }, + "schemaRegistryVendor": { + "type": "string", + "description": "The vendor of the Schema Registry and Kafka serdes library that should be used." + }, + "bindingVersion": { + "type": "string", + "enum": [ + "0.4.0" + ], + "description": "The version of this binding." + } + }, + "examples": [ + { + "schemaRegistryUrl": "https://my-schema-registry.com", + "schemaRegistryVendor": "confluent", + "bindingVersion": "0.4.0" + } + ] + }, + "bindings-kafka-0.3.0-server": { "title": "Server Schema", "description": "This object contains server connection information to a Kafka broker. This object contains additional information not possible to represent within the core AsyncAPI specification.", "type": "object", @@ -1702,7 +1737,7 @@ } ] }, - "bindings/ibmmq/server": { + "bindings-ibmmq-0.1.0-server": { "title": "IBM MQ server bindings object", "description": "This object contains server connection information about the IBM MQ server, referred to as an IBM MQ queue manager. This object contains additional connectivity information not possible to represent within the core AsyncAPI specification.", "type": "object", @@ -1758,7 +1793,37 @@ } ] }, - "bindings/solace/server": { + "bindings-solace-0.3.0-server": { + "title": "Solace server bindings object", + "description": "This object contains server connection information about the Solace broker. This object contains additional connectivity information not possible to represent within the core AsyncAPI specification.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, + "properties": { + "msgVpn": { + "type": "string", + "description": "The name of the Virtual Private Network to connect to on the Solace broker." + }, + "bindingVersion": { + "type": "string", + "enum": [ + "0.3.0" + ], + "description": "The version of this binding." + } + }, + "examples": [ + { + "msgVpn": "ProdVPN", + "bindingVersion": "0.3.0" + } + ] + }, + "bindings-solace-0.2.0-server": { "title": "Solace server bindings object", "description": "This object contains server connection information about the Solace broker. This object contains additional connectivity information not possible to represent within the core AsyncAPI specification.", "type": "object", @@ -1788,7 +1853,7 @@ } ] }, - "bindings/pulsar/server": { + "bindings-pulsar-0.1.0-server": { "title": "Server Schema", "description": "This object contains server information of Pulsar broker, which covers cluster and tenant admin configuration. This object contains additional information not possible to represent within the core AsyncAPI specification.", "type": "object", @@ -2254,7 +2319,7 @@ } }, "then": { - "$ref": "#/definitions/bindings/http/message" + "$ref": "#/definitions/bindings-http-0.1.0-message" } }, { @@ -2269,7 +2334,7 @@ } }, "then": { - "$ref": "#/definitions/bindings/http/message" + "$ref": "#/definitions/bindings-http-0.1.0-message" } } ] @@ -2294,7 +2359,7 @@ } }, "then": { - "$ref": "#/definitions/bindings/amqp/message" + "$ref": "#/definitions/bindings-amqp-0.2.0-message" } }, { @@ -2309,7 +2374,7 @@ } }, "then": { - "$ref": "#/definitions/bindings/amqp/message" + "$ref": "#/definitions/bindings-amqp-0.2.0-message" } } ] @@ -2334,7 +2399,7 @@ } }, "then": { - "$ref": "#/definitions/bindings/mqtt/message" + "$ref": "#/definitions/bindings-mqtt-0.1.0-message" } }, { @@ -2349,7 +2414,7 @@ } }, "then": { - "$ref": "#/definitions/bindings/mqtt/message" + "$ref": "#/definitions/bindings-mqtt-0.1.0-message" } } ] @@ -2376,7 +2441,7 @@ } }, "then": { - "$ref": "#/definitions/bindings/kafka/message" + "$ref": "#/definitions/bindings-kafka-0.4.0-message" } }, { @@ -2391,7 +2456,7 @@ } }, "then": { - "$ref": "#/definitions/bindings/kafka/message" + "$ref": "#/definitions/bindings-kafka-0.4.0-message" } }, { @@ -2406,7 +2471,7 @@ } }, "then": { - "$ref": "#/definitions/bindings/kafka/message" + "$ref": "#/definitions/bindings-kafka-0.3.0-message" } }, { @@ -2421,7 +2486,7 @@ } }, "then": { - "$ref": "#/definitions/bindings/kafka/message" + "$ref": "#/definitions/bindings-kafka-0.1.0-message" } } ] @@ -2445,7 +2510,7 @@ } }, "then": { - "$ref": "#/definitions/bindings/anypointmq/message" + "$ref": "#/definitions/bindings-anypointmq-0.0.1-message" } }, { @@ -2460,7 +2525,7 @@ } }, "then": { - "$ref": "#/definitions/bindings/anypointmq/message" + "$ref": "#/definitions/bindings-anypointmq-0.0.1-message" } } ] @@ -2490,7 +2555,7 @@ } }, "then": { - "$ref": "#/definitions/bindings/ibmmq/message" + "$ref": "#/definitions/bindings-ibmmq-0.1.0-message" } }, { @@ -2505,7 +2570,7 @@ } }, "then": { - "$ref": "#/definitions/bindings/ibmmq/message" + "$ref": "#/definitions/bindings-ibmmq-0.1.0-message" } } ] @@ -2530,7 +2595,7 @@ } }, "then": { - "$ref": "#/definitions/bindings/googlepubsub/message" + "$ref": "#/definitions/bindings-googlepubsub-0.1.0-message" } }, { @@ -2545,14 +2610,14 @@ } }, "then": { - "$ref": "#/definitions/bindings/googlepubsub/message" + "$ref": "#/definitions/bindings-googlepubsub-0.1.0-message" } } ] } } }, - "bindings/http/message": { + "bindings-http-0.1.0-message": { "title": "HTTP message bindings object", "description": "This object contains information about the message representation in HTTP.", "type": "object", @@ -2592,7 +2657,7 @@ } ] }, - "bindings/amqp/message": { + "bindings-amqp-0.2.0-message": { "title": "AMQP message bindings object", "description": "This object contains information about the message representation in AMQP.", "type": "object", @@ -2627,7 +2692,7 @@ } ] }, - "bindings/mqtt/message": { + "bindings-mqtt-0.1.0-message": { "title": "MQTT message bindings object", "description": "This object contains information about the message representation in MQTT.", "type": "object", @@ -2652,7 +2717,129 @@ } ] }, - "bindings/kafka/message": { + "bindings-kafka-0.4.0-message": { + "title": "Message Schema", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, + "properties": { + "key": { + "$ref": "#/definitions/schema", + "description": "The message key." + }, + "schemaIdLocation": { + "type": "string", + "description": "If a Schema Registry is used when performing this operation, tells where the id of schema is stored.", + "enum": [ + "header", + "payload" + ] + }, + "schemaIdPayloadEncoding": { + "type": "string", + "description": "Number of bytes or vendor specific values when schema id is encoded in payload." + }, + "schemaLookupStrategy": { + "type": "string", + "description": "Freeform string for any naming strategy class to use. Clients should default to the vendor default if not supplied." + }, + "bindingVersion": { + "type": "string", + "enum": [ + "0.4.0" + ], + "description": "The version of this binding. If omitted, 'latest' MUST be assumed." + } + }, + "examples": [ + { + "key": { + "type": "string", + "enum": [ + "myKey" + ] + }, + "schemaIdLocation": "payload", + "schemaIdPayloadEncoding": "apicurio-new", + "schemaLookupStrategy": "TopicIdStrategy", + "bindingVersion": "0.4.0" + }, + { + "key": { + "$ref": "path/to/user-create.avsc#/UserCreate" + }, + "schemaIdLocation": "payload", + "schemaIdPayloadEncoding": "4", + "bindingVersion": "0.4.0" + } + ] + }, + "bindings-kafka-0.3.0-message": { + "title": "Message Schema", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, + "properties": { + "key": { + "$ref": "#/definitions/schema", + "description": "The message key." + }, + "schemaIdLocation": { + "type": "string", + "description": "If a Schema Registry is used when performing this operation, tells where the id of schema is stored.", + "enum": [ + "header", + "payload" + ] + }, + "schemaIdPayloadEncoding": { + "type": "string", + "description": "Number of bytes or vendor specific values when schema id is encoded in payload." + }, + "schemaLookupStrategy": { + "type": "string", + "description": "Freeform string for any naming strategy class to use. Clients should default to the vendor default if not supplied." + }, + "bindingVersion": { + "type": "string", + "enum": [ + "0.3.0" + ], + "description": "The version of this binding. If omitted, 'latest' MUST be assumed." + } + }, + "examples": [ + { + "key": { + "type": "string", + "enum": [ + "myKey" + ] + }, + "schemaIdLocation": "payload", + "schemaIdPayloadEncoding": "apicurio-new", + "schemaLookupStrategy": "TopicIdStrategy", + "bindingVersion": "0.3.0" + }, + { + "key": { + "$ref": "path/to/user-create.avsc#/UserCreate" + }, + "schemaIdLocation": "payload", + "schemaIdPayloadEncoding": "4", + "bindingVersion": "0.3.0" + } + ] + }, + "bindings-kafka-0.1.0-message": { "title": "Kafka message bindings object", "type": "object", "additionalProperties": false, @@ -2692,7 +2879,7 @@ } ] }, - "bindings/anypointmq/message": { + "bindings-anypointmq-0.0.1-message": { "title": "Anypoint MQ message bindings object", "description": "This object contains configuration for describing an Anypoint MQ message as an AsyncAPI message. This objects only contains configuration that can not be provided in the AsyncAPI standard message object.", "type": "object", @@ -2729,7 +2916,7 @@ } ] }, - "bindings/ibmmq/message": { + "bindings-ibmmq-0.1.0-message": { "title": "IBM MQ message bindings object", "description": "This object contains information about the message representation in IBM MQ.", "type": "object", @@ -2817,7 +3004,7 @@ } ] }, - "bindings/googlepubsub/message": { + "bindings-googlepubsub-0.1.0-message": { "title": "Cloud Pub/Sub Channel Schema", "description": "This object contains information about the message representation for Google Cloud Pub/Sub.", "type": "object", @@ -3639,7 +3826,7 @@ } }, "then": { - "$ref": "#/definitions/bindings/websockets/channel" + "$ref": "#/definitions/bindings-websockets-0.1.0-channel" } }, { @@ -3654,7 +3841,7 @@ } }, "then": { - "$ref": "#/definitions/bindings/websockets/channel" + "$ref": "#/definitions/bindings-websockets-0.1.0-channel" } } ] @@ -3678,7 +3865,7 @@ } }, "then": { - "$ref": "#/definitions/bindings/amqp/channel" + "$ref": "#/definitions/bindings-amqp-0.2.0-channel" } }, { @@ -3693,7 +3880,7 @@ } }, "then": { - "$ref": "#/definitions/bindings/amqp/channel" + "$ref": "#/definitions/bindings-amqp-0.2.0-channel" } } ] @@ -3721,7 +3908,7 @@ } }, "then": { - "$ref": "#/definitions/bindings/kafka/channel" + "$ref": "#/definitions/bindings-kafka-0.4.0-channel" } }, { @@ -3736,7 +3923,7 @@ } }, "then": { - "$ref": "#/definitions/bindings/kafka/channel" + "$ref": "#/definitions/bindings-kafka-0.4.0-channel" } }, { @@ -3751,7 +3938,7 @@ } }, "then": { - "$ref": "#/definitions/bindings/kafka/channel" + "$ref": "#/definitions/bindings-kafka-0.3.0-channel" } } ] @@ -3775,7 +3962,7 @@ } }, "then": { - "$ref": "#/definitions/bindings/anypointmq/channel" + "$ref": "#/definitions/bindings-anypointmq-0.0.1-channel" } }, { @@ -3790,7 +3977,7 @@ } }, "then": { - "$ref": "#/definitions/bindings/anypointmq/channel" + "$ref": "#/definitions/bindings-anypointmq-0.0.1-channel" } } ] @@ -3820,7 +4007,7 @@ } }, "then": { - "$ref": "#/definitions/bindings/ibmmq/channel" + "$ref": "#/definitions/bindings-ibmmq-0.1.0-channel" } }, { @@ -3835,7 +4022,7 @@ } }, "then": { - "$ref": "#/definitions/bindings/ibmmq/channel" + "$ref": "#/definitions/bindings-ibmmq-0.1.0-channel" } } ] @@ -3860,7 +4047,7 @@ } }, "then": { - "$ref": "#/definitions/bindings/googlepubsub/channel" + "$ref": "#/definitions/bindings-googlepubsub-0.1.0-channel" } }, { @@ -3875,7 +4062,7 @@ } }, "then": { - "$ref": "#/definitions/bindings/googlepubsub/channel" + "$ref": "#/definitions/bindings-googlepubsub-0.1.0-channel" } } ] @@ -3899,7 +4086,7 @@ } }, "then": { - "$ref": "#/definitions/bindings/pulsar/channel" + "$ref": "#/definitions/bindings-pulsar-0.1.0-channel" } }, { @@ -3914,14 +4101,14 @@ } }, "then": { - "$ref": "#/definitions/bindings/pulsar/channel" + "$ref": "#/definitions/bindings-pulsar-0.1.0-channel" } } ] } } }, - "bindings/websockets/channel": { + "bindings-websockets-0.1.0-channel": { "title": "WebSockets channel bindings object", "description": "When using WebSockets, the channel represents the connection. Unlike other protocols that support multiple virtual channels (topics, routing keys, etc.) per connection, WebSockets doesn't support virtual channels or, put it another way, there's only one channel and its characteristics are strongly related to the protocol used for the handshake, i.e., HTTP.", "type": "object", @@ -3963,7 +4150,7 @@ } ] }, - "bindings/amqp/channel": { + "bindings-amqp-0.2.0-channel": { "title": "AMQP channel bindings object", "description": "This object contains information about the channel representation in AMQP.", "type": "object", @@ -4110,7 +4297,87 @@ } ] }, - "bindings/kafka/channel": { + "bindings-kafka-0.4.0-channel": { + "title": "Channel Schema", + "description": "This object contains information about the channel representation in Kafka.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, + "properties": { + "topic": { + "type": "string", + "description": "Kafka topic name if different from channel name." + }, + "partitions": { + "type": "integer", + "minimum": 1, + "description": "Number of partitions configured on this topic." + }, + "replicas": { + "type": "integer", + "minimum": 1, + "description": "Number of replicas configured on this topic." + }, + "topicConfiguration": { + "description": "Topic configuration properties that are relevant for the API.", + "type": "object", + "additionalProperties": false, + "properties": { + "cleanup.policy": { + "description": "The [`cleanup.policy`](https://kafka.apache.org/documentation/#topicconfigs_cleanup.policy) configuration option.", + "type": "array", + "items": { + "type": "string", + "enum": [ + "compact", + "delete" + ] + } + }, + "retention.ms": { + "description": "The [`retention.ms`](https://kafka.apache.org/documentation/#topicconfigs_retention.ms) configuration option.", + "type": "integer", + "minimum": -1 + }, + "retention.bytes": { + "description": "The [`retention.bytes`](https://kafka.apache.org/documentation/#topicconfigs_retention.bytes) configuration option.", + "type": "integer", + "minimum": -1 + }, + "delete.retention.ms": { + "description": "The [`delete.retention.ms`](https://kafka.apache.org/documentation/#topicconfigs_delete.retention.ms) configuration option.", + "type": "integer", + "minimum": 0 + }, + "max.message.bytes": { + "description": "The [`max.message.bytes`](https://kafka.apache.org/documentation/#topicconfigs_max.message.bytes) configuration option.", + "type": "integer", + "minimum": 0 + } + } + }, + "bindingVersion": { + "type": "string", + "enum": [ + "0.4.0" + ], + "description": "The version of this binding. If omitted, 'latest' MUST be assumed." + } + }, + "examples": [ + { + "topic": "my-specific-topic", + "partitions": 20, + "replicas": 3, + "bindingVersion": "0.4.0" + } + ] + }, + "bindings-kafka-0.3.0-channel": { "title": "Channel Schema", "description": "This object contains information about the channel representation in Kafka.", "type": "object", @@ -4152,7 +4419,7 @@ } ] }, - "bindings/anypointmq/channel": { + "bindings-anypointmq-0.0.1-channel": { "title": "Anypoint MQ channel bindings object", "description": "This object contains configuration for describing an Anypoint MQ exchange, queue, or FIFO queue as an AsyncAPI channel. This objects only contains configuration that can not be provided in the AsyncAPI standard channel object.", "type": "object", @@ -4193,7 +4460,7 @@ } ] }, - "bindings/ibmmq/channel": { + "bindings-ibmmq-0.1.0-channel": { "title": "IBM MQ channel bindings object", "description": "This object contains information about the channel representation in IBM MQ. Each channel corresponds to a Queue or Topic within IBM MQ.", "type": "object", @@ -4324,7 +4591,7 @@ } ] }, - "bindings/googlepubsub/channel": { + "bindings-googlepubsub-0.1.0-channel": { "title": "Cloud Pub/Sub Channel Schema", "description": "This object contains information about the channel representation for Google Cloud Pub/Sub.", "type": "object", @@ -4410,7 +4677,7 @@ } ] }, - "bindings/pulsar/channel": { + "bindings-pulsar-0.1.0-channel": { "title": "Channel Schema", "description": "This object contains information about the channel representation in Pulsar, which covers namespace and topic level admin configuration. This object contains additional information not possible to represent within the core AsyncAPI specification.", "type": "object", @@ -4673,25 +4940,25 @@ }, "properties": { "title": { - "$ref": "#/definitions/operation#/properties/title" + "$ref": "#/definitions/operation/properties/title" }, "summary": { - "$ref": "#/definitions/operation#/properties/summary" + "$ref": "#/definitions/operation/properties/summary" }, "description": { - "$ref": "#/definitions/operation#/properties/description" + "$ref": "#/definitions/operation/properties/description" }, "security": { - "$ref": "#/definitions/operation#/properties/security" + "$ref": "#/definitions/operation/properties/security" }, "tags": { - "$ref": "#/definitions/operation#/properties/tags" + "$ref": "#/definitions/operation/properties/tags" }, "externalDocs": { - "$ref": "#/definitions/operation#/properties/externalDocs" + "$ref": "#/definitions/operation/properties/externalDocs" }, "bindings": { - "$ref": "#/definitions/operation#/properties/bindings" + "$ref": "#/definitions/operation/properties/bindings" } } }, @@ -4723,7 +4990,7 @@ } }, "then": { - "$ref": "#/definitions/bindings/http/operation" + "$ref": "#/definitions/bindings-http-0.1.0-operation" } }, { @@ -4738,7 +5005,7 @@ } }, "then": { - "$ref": "#/definitions/bindings/http/operation" + "$ref": "#/definitions/bindings-http-0.1.0-operation" } } ] @@ -4763,7 +5030,7 @@ } }, "then": { - "$ref": "#/definitions/bindings/amqp/operation" + "$ref": "#/definitions/bindings-amqp-0.2.0-operation" } }, { @@ -4778,7 +5045,7 @@ } }, "then": { - "$ref": "#/definitions/bindings/amqp/operation" + "$ref": "#/definitions/bindings-amqp-0.2.0-operation" } } ] @@ -4803,7 +5070,7 @@ } }, "then": { - "$ref": "#/definitions/bindings/mqtt/operation" + "$ref": "#/definitions/bindings-mqtt-0.1.0-operation" } }, { @@ -4818,7 +5085,7 @@ } }, "then": { - "$ref": "#/definitions/bindings/mqtt/operation" + "$ref": "#/definitions/bindings-mqtt-0.1.0-operation" } } ] @@ -4845,7 +5112,7 @@ } }, "then": { - "$ref": "#/definitions/bindings/kafka/operation" + "$ref": "#/definitions/bindings-kafka-0.4.0-operation" } }, { @@ -4860,7 +5127,7 @@ } }, "then": { - "$ref": "#/definitions/bindings/kafka/operation" + "$ref": "#/definitions/bindings-kafka-0.4.0-operation" } }, { @@ -4875,7 +5142,7 @@ } }, "then": { - "$ref": "#/definitions/bindings/kafka/operation" + "$ref": "#/definitions/bindings-kafka-0.3.0-operation" } }, { @@ -4890,7 +5157,7 @@ } }, "then": { - "$ref": "#/definitions/bindings/kafka/operation" + "$ref": "#/definitions/bindings-kafka-0.1.0-operation" } } ] @@ -4915,7 +5182,7 @@ } }, "then": { - "$ref": "#/definitions/bindings/nats/operation" + "$ref": "#/definitions/bindings-nats-0.1.0-operation" } }, { @@ -4930,7 +5197,7 @@ } }, "then": { - "$ref": "#/definitions/bindings/nats/operation" + "$ref": "#/definitions/bindings-nats-0.1.0-operation" } } ] @@ -4961,7 +5228,7 @@ } }, "then": { - "$ref": "#/definitions/bindings/solace/operation" + "$ref": "#/definitions/bindings-solace-0.3.0-operation" } }, { @@ -4976,7 +5243,7 @@ } }, "then": { - "$ref": "#/definitions/bindings/solace/operation" + "$ref": "#/definitions/bindings-solace-0.3.0-operation" } }, { @@ -4991,7 +5258,7 @@ } }, "then": { - "$ref": "#/definitions/bindings/solace/operation" + "$ref": "#/definitions/bindings-solace-0.2.0-operation" } } ] @@ -4999,7 +5266,7 @@ "googlepubsub": {} } }, - "bindings/http/operation": { + "bindings-http-0.1.0-operation": { "title": "HTTP operation bindings object", "description": "This object contains information about the operation representation in HTTP.", "type": "object", @@ -5112,7 +5379,7 @@ } ] }, - "bindings/amqp/operation": { + "bindings-amqp-0.2.0-operation": { "title": "AMQP operation bindings object", "description": "This object contains information about the operation representation in AMQP.", "type": "object", @@ -5202,7 +5469,7 @@ } ] }, - "bindings/mqtt/operation": { + "bindings-mqtt-0.1.0-operation": { "title": "MQTT operation bindings object", "description": "This object contains information about the operation representation in MQTT.", "type": "object", @@ -5237,7 +5504,97 @@ } ] }, - "bindings/kafka/operation": { + "bindings-kafka-0.4.0-operation": { + "title": "Operation Schema", + "description": "This object contains information about the operation representation in Kafka.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, + "properties": { + "groupId": { + "$ref": "#/definitions/schema", + "description": "Id of the consumer group." + }, + "clientId": { + "$ref": "#/definitions/schema", + "description": "Id of the consumer inside a consumer group." + }, + "bindingVersion": { + "type": "string", + "enum": [ + "0.4.0" + ], + "description": "The version of this binding. If omitted, 'latest' MUST be assumed." + } + }, + "examples": [ + { + "groupId": { + "type": "string", + "enum": [ + "myGroupId" + ] + }, + "clientId": { + "type": "string", + "enum": [ + "myClientId" + ] + }, + "bindingVersion": "0.4.0" + } + ] + }, + "bindings-kafka-0.3.0-operation": { + "title": "Operation Schema", + "description": "This object contains information about the operation representation in Kafka.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, + "properties": { + "groupId": { + "$ref": "#/definitions/schema", + "description": "Id of the consumer group." + }, + "clientId": { + "$ref": "#/definitions/schema", + "description": "Id of the consumer inside a consumer group." + }, + "bindingVersion": { + "type": "string", + "enum": [ + "0.3.0" + ], + "description": "The version of this binding. If omitted, 'latest' MUST be assumed." + } + }, + "examples": [ + { + "groupId": { + "type": "string", + "enum": [ + "myGroupId" + ] + }, + "clientId": { + "type": "string", + "enum": [ + "myClientId" + ] + }, + "bindingVersion": "0.3.0" + } + ] + }, + "bindings-kafka-0.1.0-operation": { "title": "Kafka operation message bindings object", "description": "This object contains information about the operation representation in Kafka.", "type": "object", @@ -5282,7 +5639,7 @@ } ] }, - "bindings/nats/operation": { + "bindings-nats-0.1.0-operation": { "title": "NATS operation bindings object", "description": "This object contains information about the operation representation in NATS.", "type": "object", @@ -5313,7 +5670,119 @@ } ] }, - "bindings/solace/operation": { + "bindings-solace-0.3.0-operation": { + "title": "Solace operation bindings object", + "description": "This object contains information about the operation representation in Solace.", + "type": "object", + "additionalProperties": false, + "properties": { + "destinations": { + "description": "The list of Solace destinations referenced in the operation.", + "type": "array", + "items": { + "type": "object", + "properties": { + "deliveryMode": { + "type": "string", + "enum": [ + "direct", + "persistent" + ] + } + }, + "oneOf": [ + { + "properties": { + "destinationType": { + "type": "string", + "const": "queue", + "description": "If the type is queue, then the subscriber can bind to the queue. The queue subscribes to the given topicSubscriptions. If no topicSubscriptions are provied, the queue will subscribe to the topic as represented by the channel name." + }, + "queue": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The name of the queue" + }, + "topicSubscriptions": { + "type": "array", + "description": "The list of topics that the queue subscribes to.", + "items": { + "type": "string" + } + }, + "accessType": { + "type": "string", + "enum": [ + "exclusive", + "nonexclusive" + ] + }, + "maxTtl": { + "type": "string", + "description": "The maximum TTL to apply to messages to be spooled." + }, + "maxMsgSpoolUsage": { + "type": "string", + "description": "The maximum amount of message spool that the given queue may use" + } + } + } + } + }, + { + "properties": { + "destinationType": { + "type": "string", + "const": "topic", + "description": "If the type is topic, then the subscriber subscribes to the given topicSubscriptions. If no topicSubscriptions are provided, the client will subscribe to the topic as represented by the channel name." + }, + "topicSubscriptions": { + "type": "array", + "description": "The list of topics that the client subscribes to.", + "items": { + "type": "string" + } + } + } + } + ] + } + } + }, + "bindingVersion": { + "type": "string", + "enum": [ + "0.3.0" + ], + "description": "The version of this binding. If omitted, \"latest\" MUST be assumed." + }, + "examples": [ + { + "bindingVersion": "0.3.0", + "destinations": [ + { + "destinationType": "queue", + "queue": { + "name": "sampleQueue", + "topicSubscriptions": [ + "samples/*" + ], + "accessType": "nonexclusive" + } + }, + { + "destinationType": "topic", + "topicSubscriptions": [ + "samples/*" + ] + } + ] + } + ] + }, + "bindings-solace-0.2.0-operation": { "title": "Solace operation bindings object", "description": "This object contains information about the operation representation in Solace.", "type": "object", diff --git a/test/schemas.js b/test/schemas.js index 1f5a0712..9d01739b 100644 --- a/test/schemas.js +++ b/test/schemas.js @@ -10,25 +10,27 @@ const versionsToTest = [ describe("Should be able to validate", function () { this.timeout(30000); it('all valid documents', () => { + const asyncapi = require('..'); for (const versionToTest of versionsToTest) { const version = versionToTest.version; - const asyncapi = require('..'); - const schema = asyncapi[version]; - delete schema.definitions['http://json-schema.org/draft-07/schema']; - const ajv = new Ajv({ - jsonPointers: true, - allErrors: true, - schemaId: '$id', - logger: false, - validateFormats: false, - strict: false - }); - const documentPaths = fs.readdirSync(path.resolve(__dirname, `./docs/${version}`)).map((pathToDoc) => {return path.resolve(__dirname, `./docs/${version}/${pathToDoc}`)}); - for (const documentPath of documentPaths) { - const document = require(documentPath); - const validate = ajv.compile(schema) - const valid = validate(document) - assert(valid === true, 'Document must be validated correctly: ' + JSON.stringify(validate.errors, null, 4)); + const schemasToTest = [asyncapi.schemas[version], asyncapi.schemasWithoutId[version]]; + for (const schema of schemasToTest) { + delete schema.definitions['http://json-schema.org/draft-07/schema']; + const ajv = new Ajv({ + jsonPointers: true, + allErrors: true, + schemaId: '$id', + logger: false, + validateFormats: false, + strict: false + }); + const documentPaths = fs.readdirSync(path.resolve(__dirname, `./docs/${version}`)).map((pathToDoc) => {return path.resolve(__dirname, `./docs/${version}/${pathToDoc}`)}); + for (const documentPath of documentPaths) { + const document = require(documentPath); + const validate = ajv.compile(schema) + const valid = validate(document) + assert(valid === true, 'Document ' + documentPath + ' must be validated correctly: ' + JSON.stringify(validate.errors, null, 4)); + } } } }); diff --git a/tools/bundler/index.js b/tools/bundler/index.js index bfdcf812..df41ba40 100644 --- a/tools/bundler/index.js +++ b/tools/bundler/index.js @@ -11,10 +11,10 @@ console.log(`Looking for binding version schemas in the following directory: ${b console.log(`Using the following output directory: ${outputDirectory}`); // definitionsRegex is used to transform the name of a definition into a valid one to be used in the -without-$id.json files. -const definitionsRegex = /http:\/\/asyncapi\.com\/definitions\/[^\/]*\/(.+)\.json(.*)/i +const definitionsRegex = /http:\/\/asyncapi\.com\/definitions\/[^\/]*\/(.+)\.json\#?(.*)/i // definitionsRegex is used to transform the name of a binding into a valid one to be used in the -without-$id.json files. -const bindingsRegex = /http:\/\/asyncapi\.com\/(bindings\/[^\/]+)\/[^\/]+\/(.+)\.json(.*)/i +const bindingsRegex = /http:\/\/asyncapi\.com\/(bindings\/[^\/]+)\/([^\/]+)\/(.+)\.json(.*)/i /** * Function to load all the core AsyncAPI spec definition (except the root asyncapi schema, as that will be loaded later) into the bundler. @@ -153,7 +153,7 @@ function getDefinitionName(def) { } if (def.startsWith('http://asyncapi.com/bindings')) { const result = bindingsRegex.exec(def); - if (result) return result[1] + '/' + result[2] + result[3]; + if (result) return `${result[1].replace('/', '-')}-${result[2]}-${result[3]}`; } return path.basename(def, '.json') // TODO is this really needed? From 55dfa57347e7f9eaf998e3c4459d8fb106dbf2f1 Mon Sep 17 00:00:00 2001 From: Sergio Moya <1083296+smoya@users.noreply.github.com> Date: Tue, 11 Jul 2023 13:36:49 +0200 Subject: [PATCH 056/102] also replace / with - for --- tools/bundler/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/bundler/index.js b/tools/bundler/index.js index df41ba40..8211685f 100644 --- a/tools/bundler/index.js +++ b/tools/bundler/index.js @@ -149,7 +149,7 @@ function getDefinitionName(def) { if (def.startsWith('http://json-schema.org')) return JSON_SCHEMA_PROP_NAME; if (def.startsWith('http://asyncapi.com/definitions')) { const result = definitionsRegex.exec(def); - if (result) return result[1] + result[2]; + if (result) return result[1].replace('/', '-') + result[2]; } if (def.startsWith('http://asyncapi.com/bindings')) { const result = bindingsRegex.exec(def); From 257bf6b97cd9ab68877b027e2d8ae95ee5a4cf17 Mon Sep 17 00:00:00 2001 From: asyncapi-bot Date: Tue, 11 Jul 2023 15:28:18 +0200 Subject: [PATCH 057/102] chore(release): v6.0.0-next-major-spec.1 (#407) --- package-lock.json | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index 0be2edc7..f1f9692b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "@asyncapi/specs", - "version": "5.0.0-next-major-spec.21", + "version": "6.0.0-next-major-spec.1", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 67a923ef..037b6561 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@asyncapi/specs", - "version": "5.0.0-next-major-spec.21", + "version": "6.0.0-next-major-spec.1", "description": "AsyncAPI schema versions", "main": "index.js", "types": "index.d.ts", From 6367e1d89279521e03cb7763628082d951709c65 Mon Sep 17 00:00:00 2001 From: Sergio Moya <1083296+smoya@users.noreply.github.com> Date: Thu, 13 Jul 2023 21:31:27 +0200 Subject: [PATCH 058/102] feat!: allow multi format schemas (#370) --- definitions/3.0.0/anySchema.json | 16 + definitions/3.0.0/components.json | 2 +- definitions/3.0.0/messageObject.json | 156 +- definitions/3.0.0/messageTrait.json | 16 +- definitions/3.0.0/multiFormatSchema.json | 157 ++ definitions/3.0.0/schemas.json | 9 - schemas/3.0.0-without-$id.json | 2845 ++++++++++---------- schemas/3.0.0.json | 2865 +++++++++++---------- test/docs/3.0.0/streetlights-avro.json | 369 +-- test/docs/3.0.0/streetlights-openapi.json | 44 +- test/schemas.js | 2 +- tools/bundler/package-lock.json | 2 +- 12 files changed, 3276 insertions(+), 3207 deletions(-) create mode 100644 definitions/3.0.0/anySchema.json create mode 100644 definitions/3.0.0/multiFormatSchema.json delete mode 100644 definitions/3.0.0/schemas.json diff --git a/definitions/3.0.0/anySchema.json b/definitions/3.0.0/anySchema.json new file mode 100644 index 00000000..e8e2cb7f --- /dev/null +++ b/definitions/3.0.0/anySchema.json @@ -0,0 +1,16 @@ +{ + "if": { + "required": [ + "schema" + ] + }, + "then": { + "$ref": "http://asyncapi.com/definitions/3.0.0/multiFormatSchema.json" + }, + "else": { + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" + }, + "description": "An object representing either a schema or a multiFormatSchema based on the existence of the 'schema' property. If the property 'schema' is present, use the multi-format schema. Use the default AsyncAPI Schema otherwise.", + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/3.0.0/anySchema.json" +} \ No newline at end of file diff --git a/definitions/3.0.0/components.json b/definitions/3.0.0/components.json index 9f457fab..3f3589ef 100644 --- a/definitions/3.0.0/components.json +++ b/definitions/3.0.0/components.json @@ -17,7 +17,7 @@ "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" }, { - "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" + "$ref": "http://asyncapi.com/definitions/3.0.0/anySchema.json" } ] } diff --git a/definitions/3.0.0/messageObject.json b/definitions/3.0.0/messageObject.json index e62f0d66..69aeafe4 100644 --- a/definitions/3.0.0/messageObject.json +++ b/definitions/3.0.0/messageObject.json @@ -7,30 +7,18 @@ } }, "properties": { - "schemaFormat": { - "type": "string" - }, "contentType": { "type": "string" }, "headers": { - "allOf": [ - { - "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" - }, - { - "properties": { - "type": { - "const": "object" - } - } - } - ] + "$ref": "http://asyncapi.com/definitions/3.0.0/anySchema.json" }, "messageId": { "type": "string" }, - "payload": {}, + "payload": { + "$ref": "http://asyncapi.com/definitions/3.0.0/anySchema.json" + }, "correlationId": { "oneOf": [ { @@ -112,9 +100,11 @@ "description": "A brief summary of the message example." }, "headers": { - "type": "object" + "$ref": "http://asyncapi.com/definitions/3.0.0/anySchema.json" }, - "payload": {} + "payload": { + "$ref": "http://asyncapi.com/definitions/3.0.0/anySchema.json" + } } } }, @@ -154,136 +144,6 @@ } } }, - "allOf": [ - { - "if": { - "not": { - "required": [ - "schemaFormat" - ] - } - }, - "then": { - "properties": { - "payload": { - "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" - } - } - } - }, - { - "if": { - "required": [ - "schemaFormat" - ], - "properties": { - "schemaFormat": { - "enum": [ - "application/vnd.aai.asyncapi;version=2.0.0", - "application/vnd.aai.asyncapi+json;version=2.0.0", - "application/vnd.aai.asyncapi+yaml;version=2.0.0", - "application/vnd.aai.asyncapi;version=2.1.0", - "application/vnd.aai.asyncapi+json;version=2.1.0", - "application/vnd.aai.asyncapi+yaml;version=2.1.0", - "application/vnd.aai.asyncapi;version=2.2.0", - "application/vnd.aai.asyncapi+json;version=2.2.0", - "application/vnd.aai.asyncapi+yaml;version=2.2.0", - "application/vnd.aai.asyncapi;version=2.3.0", - "application/vnd.aai.asyncapi+json;version=2.3.0", - "application/vnd.aai.asyncapi+yaml;version=2.3.0", - "application/vnd.aai.asyncapi;version=2.4.0", - "application/vnd.aai.asyncapi+json;version=2.4.0", - "application/vnd.aai.asyncapi+yaml;version=2.4.0", - "application/vnd.aai.asyncapi;version=2.5.0", - "application/vnd.aai.asyncapi+json;version=2.5.0", - "application/vnd.aai.asyncapi+yaml;version=2.5.0", - "application/vnd.aai.asyncapi;version=2.6.0", - "application/vnd.aai.asyncapi+json;version=2.6.0", - "application/vnd.aai.asyncapi+yaml;version=2.6.0", - "application/vnd.aai.asyncapi;version=3.0.0", - "application/vnd.aai.asyncapi+json;version=3.0.0", - "application/vnd.aai.asyncapi+yaml;version=3.0.0" - ] - } - } - }, - "then": { - "properties": { - "payload": { - "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" - } - } - } - }, - { - "if": { - "required": [ - "schemaFormat" - ], - "properties": { - "schemaFormat": { - "enum": [ - "application/schema+json;version=draft-07", - "application/schema+yaml;version=draft-07" - ] - } - } - }, - "then": { - "properties": { - "payload": { - "$ref": "http://json-schema.org/draft-07/schema" - } - } - } - }, - { - "if": { - "required": [ - "schemaFormat" - ], - "properties": { - "schemaFormat": { - "enum": [ - "application/vnd.oai.openapi;version=3.0.0", - "application/vnd.oai.openapi+json;version=3.0.0", - "application/vnd.oai.openapi+yaml;version=3.0.0" - ] - } - } - }, - "then": { - "properties": { - "payload": { - "$ref": "http://asyncapi.com/definitions/3.0.0/openapiSchema_3_0.json" - } - } - } - }, - { - "if": { - "required": [ - "schemaFormat" - ], - "properties": { - "schemaFormat": { - "enum": [ - "application/vnd.apache.avro;version=1.9.0", - "application/vnd.apache.avro+json;version=1.9.0", - "application/vnd.apache.avro+yaml;version=1.9.0" - ] - } - } - }, - "then": { - "properties": { - "payload": { - "$ref": "http://asyncapi.com/definitions/3.0.0/avroSchema_v1.json" - } - } - } - } - ], "$schema": "http://json-schema.org/draft-07/schema#", "$id": "http://asyncapi.com/definitions/3.0.0/messageObject.json" } \ No newline at end of file diff --git a/definitions/3.0.0/messageTrait.json b/definitions/3.0.0/messageTrait.json index b6d33df4..fd0f0475 100644 --- a/definitions/3.0.0/messageTrait.json +++ b/definitions/3.0.0/messageTrait.json @@ -7,25 +7,11 @@ } }, "properties": { - "schemaFormat": { - "type": "string" - }, "contentType": { "type": "string" }, "headers": { - "allOf": [ - { - "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" - }, - { - "properties": { - "type": { - "const": "object" - } - } - } - ] + "$ref": "http://asyncapi.com/definitions/3.0.0/anySchema.json" }, "messageId": { "type": "string" diff --git a/definitions/3.0.0/multiFormatSchema.json b/definitions/3.0.0/multiFormatSchema.json new file mode 100644 index 00000000..548dd852 --- /dev/null +++ b/definitions/3.0.0/multiFormatSchema.json @@ -0,0 +1,157 @@ +{ + "if": { + "not": { + "type": "object" + } + }, + "then": { + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" + }, + "else": { + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "properties": { + "schemaFormat": { + "type": "string" + }, + "schema": {} + }, + "allOf": [ + { + "if": { + "not": { + "required": [ + "schemaFormat" + ] + } + }, + "then": { + "properties": { + "schema": { + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" + } + } + } + }, + { + "if": { + "required": [ + "schemaFormat" + ], + "properties": { + "schemaFormat": { + "enum": [ + "application/vnd.aai.asyncapi;version=2.0.0", + "application/vnd.aai.asyncapi+json;version=2.0.0", + "application/vnd.aai.asyncapi+yaml;version=2.0.0", + "application/vnd.aai.asyncapi;version=2.1.0", + "application/vnd.aai.asyncapi+json;version=2.1.0", + "application/vnd.aai.asyncapi+yaml;version=2.1.0", + "application/vnd.aai.asyncapi;version=2.2.0", + "application/vnd.aai.asyncapi+json;version=2.2.0", + "application/vnd.aai.asyncapi+yaml;version=2.2.0", + "application/vnd.aai.asyncapi;version=2.3.0", + "application/vnd.aai.asyncapi+json;version=2.3.0", + "application/vnd.aai.asyncapi+yaml;version=2.3.0", + "application/vnd.aai.asyncapi;version=2.4.0", + "application/vnd.aai.asyncapi+json;version=2.4.0", + "application/vnd.aai.asyncapi+yaml;version=2.4.0", + "application/vnd.aai.asyncapi;version=2.5.0", + "application/vnd.aai.asyncapi+json;version=2.5.0", + "application/vnd.aai.asyncapi+yaml;version=2.5.0", + "application/vnd.aai.asyncapi;version=2.6.0", + "application/vnd.aai.asyncapi+json;version=2.6.0", + "application/vnd.aai.asyncapi+yaml;version=2.6.0", + "application/vnd.aai.asyncapi;version=3.0.0", + "application/vnd.aai.asyncapi+json;version=3.0.0", + "application/vnd.aai.asyncapi+yaml;version=3.0.0" + ] + } + } + }, + "then": { + "properties": { + "schema": { + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" + } + } + } + }, + { + "if": { + "required": [ + "schemaFormat" + ], + "properties": { + "schemaFormat": { + "enum": [ + "application/schema+json;version=draft-07", + "application/schema+yaml;version=draft-07" + ] + } + } + }, + "then": { + "properties": { + "schema": { + "$ref": "http://json-schema.org/draft-07/schema" + } + } + } + }, + { + "if": { + "required": [ + "schemaFormat" + ], + "properties": { + "schemaFormat": { + "enum": [ + "application/vnd.oai.openapi;version=3.0.0", + "application/vnd.oai.openapi+json;version=3.0.0", + "application/vnd.oai.openapi+yaml;version=3.0.0" + ] + } + } + }, + "then": { + "properties": { + "schema": { + "$ref": "http://asyncapi.com/definitions/3.0.0/openapiSchema_3_0.json" + } + } + } + }, + { + "if": { + "required": [ + "schemaFormat" + ], + "properties": { + "schemaFormat": { + "enum": [ + "application/vnd.apache.avro;version=1.9.0", + "application/vnd.apache.avro+json;version=1.9.0", + "application/vnd.apache.avro+yaml;version=1.9.0" + ] + } + } + }, + "then": { + "properties": { + "schema": { + "$ref": "http://asyncapi.com/definitions/3.0.0/avroSchema_v1.json" + } + } + } + } + ] + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/3.0.0/multiFormatSchema.json" +} \ No newline at end of file diff --git a/definitions/3.0.0/schemas.json b/definitions/3.0.0/schemas.json deleted file mode 100644 index fdbe4a81..00000000 --- a/definitions/3.0.0/schemas.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "type": "object", - "additionalProperties": { - "$ref": "http://asyncapi.com/definitions/3.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/3.0.0/schemas.json" -} \ No newline at end of file diff --git a/schemas/3.0.0-without-$id.json b/schemas/3.0.0-without-$id.json index 0fe6d313..baff0ce8 100644 --- a/schemas/3.0.0-without-$id.json +++ b/schemas/3.0.0-without-$id.json @@ -1990,30 +1990,18 @@ } }, "properties": { - "schemaFormat": { - "type": "string" - }, "contentType": { "type": "string" }, "headers": { - "allOf": [ - { - "$ref": "#/definitions/schema" - }, - { - "properties": { - "type": { - "const": "object" - } - } - } - ] + "$ref": "#/definitions/anySchema" }, "messageId": { "type": "string" }, - "payload": {}, + "payload": { + "$ref": "#/definitions/anySchema" + }, "correlationId": { "oneOf": [ { @@ -2095,9 +2083,11 @@ "description": "A brief summary of the message example." }, "headers": { - "type": "object" + "$ref": "#/definitions/anySchema" }, - "payload": {} + "payload": { + "$ref": "#/definitions/anySchema" + } } } }, @@ -2136,1627 +2126,1652 @@ ] } } + } + }, + "anySchema": { + "if": { + "required": [ + "schema" + ] }, - "allOf": [ - { - "if": { - "not": { - "required": [ - "schemaFormat" - ] - } - }, - "then": { - "properties": { - "payload": { - "$ref": "#/definitions/schema" - } - } + "then": { + "$ref": "#/definitions/multiFormatSchema" + }, + "else": { + "$ref": "#/definitions/schema" + }, + "description": "An object representing either a schema or a multiFormatSchema based on the existence of the 'schema' property. If the property 'schema' is present, use the multi-format schema. Use the default AsyncAPI Schema otherwise." + }, + "multiFormatSchema": { + "if": { + "not": { + "type": "object" + } + }, + "then": { + "$ref": "#/definitions/schema" + }, + "else": { + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" } }, - { - "if": { - "required": [ - "schemaFormat" - ], - "properties": { - "schemaFormat": { - "enum": [ - "application/vnd.aai.asyncapi;version=2.0.0", - "application/vnd.aai.asyncapi+json;version=2.0.0", - "application/vnd.aai.asyncapi+yaml;version=2.0.0", - "application/vnd.aai.asyncapi;version=2.1.0", - "application/vnd.aai.asyncapi+json;version=2.1.0", - "application/vnd.aai.asyncapi+yaml;version=2.1.0", - "application/vnd.aai.asyncapi;version=2.2.0", - "application/vnd.aai.asyncapi+json;version=2.2.0", - "application/vnd.aai.asyncapi+yaml;version=2.2.0", - "application/vnd.aai.asyncapi;version=2.3.0", - "application/vnd.aai.asyncapi+json;version=2.3.0", - "application/vnd.aai.asyncapi+yaml;version=2.3.0", - "application/vnd.aai.asyncapi;version=2.4.0", - "application/vnd.aai.asyncapi+json;version=2.4.0", - "application/vnd.aai.asyncapi+yaml;version=2.4.0", - "application/vnd.aai.asyncapi;version=2.5.0", - "application/vnd.aai.asyncapi+json;version=2.5.0", - "application/vnd.aai.asyncapi+yaml;version=2.5.0", - "application/vnd.aai.asyncapi;version=2.6.0", - "application/vnd.aai.asyncapi+json;version=2.6.0", - "application/vnd.aai.asyncapi+yaml;version=2.6.0", - "application/vnd.aai.asyncapi;version=3.0.0", - "application/vnd.aai.asyncapi+json;version=3.0.0", - "application/vnd.aai.asyncapi+yaml;version=3.0.0" - ] - } - } + "properties": { + "schemaFormat": { + "type": "string" }, - "then": { - "properties": { - "payload": { - "$ref": "#/definitions/schema" - } - } - } + "schema": {} }, - { - "if": { - "required": [ - "schemaFormat" - ], - "properties": { - "schemaFormat": { - "enum": [ - "application/schema+json;version=draft-07", - "application/schema+yaml;version=draft-07" + "allOf": [ + { + "if": { + "not": { + "required": [ + "schemaFormat" ] } - } - }, - "then": { - "properties": { - "payload": { - "$ref": "#/definitions/json-schema-draft-07-schema" - } - } - } - }, - { - "if": { - "required": [ - "schemaFormat" - ], - "properties": { - "schemaFormat": { - "enum": [ - "application/vnd.oai.openapi;version=3.0.0", - "application/vnd.oai.openapi+json;version=3.0.0", - "application/vnd.oai.openapi+yaml;version=3.0.0" - ] + }, + "then": { + "properties": { + "schema": { + "$ref": "#/definitions/schema" + } } } }, - "then": { - "properties": { - "payload": { - "$ref": "#/definitions/openapiSchema_3_0" - } - } - } - }, - { - "if": { - "required": [ - "schemaFormat" - ], - "properties": { - "schemaFormat": { - "enum": [ - "application/vnd.apache.avro;version=1.9.0", - "application/vnd.apache.avro+json;version=1.9.0", - "application/vnd.apache.avro+yaml;version=1.9.0" - ] + { + "if": { + "required": [ + "schemaFormat" + ], + "properties": { + "schemaFormat": { + "enum": [ + "application/vnd.aai.asyncapi;version=2.0.0", + "application/vnd.aai.asyncapi+json;version=2.0.0", + "application/vnd.aai.asyncapi+yaml;version=2.0.0", + "application/vnd.aai.asyncapi;version=2.1.0", + "application/vnd.aai.asyncapi+json;version=2.1.0", + "application/vnd.aai.asyncapi+yaml;version=2.1.0", + "application/vnd.aai.asyncapi;version=2.2.0", + "application/vnd.aai.asyncapi+json;version=2.2.0", + "application/vnd.aai.asyncapi+yaml;version=2.2.0", + "application/vnd.aai.asyncapi;version=2.3.0", + "application/vnd.aai.asyncapi+json;version=2.3.0", + "application/vnd.aai.asyncapi+yaml;version=2.3.0", + "application/vnd.aai.asyncapi;version=2.4.0", + "application/vnd.aai.asyncapi+json;version=2.4.0", + "application/vnd.aai.asyncapi+yaml;version=2.4.0", + "application/vnd.aai.asyncapi;version=2.5.0", + "application/vnd.aai.asyncapi+json;version=2.5.0", + "application/vnd.aai.asyncapi+yaml;version=2.5.0", + "application/vnd.aai.asyncapi;version=2.6.0", + "application/vnd.aai.asyncapi+json;version=2.6.0", + "application/vnd.aai.asyncapi+yaml;version=2.6.0", + "application/vnd.aai.asyncapi;version=3.0.0", + "application/vnd.aai.asyncapi+json;version=3.0.0", + "application/vnd.aai.asyncapi+yaml;version=3.0.0" + ] + } } - } - }, - "then": { - "properties": { - "payload": { - "$ref": "#/definitions/avroSchema_v1" + }, + "then": { + "properties": { + "schema": { + "$ref": "#/definitions/schema" + } } } - } - } - ] - }, - "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]))*)*" - } - } - }, - "messageBindingsObject": { - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "properties": { - "http": { - "properties": { - "bindingVersion": { - "enum": [ - "0.1.0" - ] - } }, - "allOf": [ - { - "description": "If no bindingVersion specified, use the latest binding", - "if": { - "not": { - "required": [ - "bindingVersion" + { + "if": { + "required": [ + "schemaFormat" + ], + "properties": { + "schemaFormat": { + "enum": [ + "application/schema+json;version=draft-07", + "application/schema+yaml;version=draft-07" ] } - }, - "then": { - "$ref": "#/definitions/bindings-http-0.1.0-message" } }, - { - "if": { - "required": [ - "bindingVersion" - ], - "properties": { - "bindingVersion": { - "const": "0.1.0" - } + "then": { + "properties": { + "schema": { + "$ref": "#/definitions/json-schema-draft-07-schema" } - }, - "then": { - "$ref": "#/definitions/bindings-http-0.1.0-message" } } - ] - }, - "ws": {}, - "amqp": { - "properties": { - "bindingVersion": { - "enum": [ - "0.2.0" - ] - } }, - "allOf": [ - { - "description": "If no bindingVersion specified, use the latest binding", - "if": { - "not": { - "required": [ - "bindingVersion" + { + "if": { + "required": [ + "schemaFormat" + ], + "properties": { + "schemaFormat": { + "enum": [ + "application/vnd.oai.openapi;version=3.0.0", + "application/vnd.oai.openapi+json;version=3.0.0", + "application/vnd.oai.openapi+yaml;version=3.0.0" ] } - }, - "then": { - "$ref": "#/definitions/bindings-amqp-0.2.0-message" } }, - { - "if": { - "required": [ - "bindingVersion" - ], - "properties": { - "bindingVersion": { - "const": "0.2.0" - } + "then": { + "properties": { + "schema": { + "$ref": "#/definitions/openapiSchema_3_0" } - }, - "then": { - "$ref": "#/definitions/bindings-amqp-0.2.0-message" } } - ] - }, - "amqp1": {}, - "mqtt": { - "properties": { - "bindingVersion": { - "enum": [ - "0.1.0" - ] - } }, - "allOf": [ - { - "description": "If no bindingVersion specified, use the latest binding", - "if": { - "not": { - "required": [ - "bindingVersion" + { + "if": { + "required": [ + "schemaFormat" + ], + "properties": { + "schemaFormat": { + "enum": [ + "application/vnd.apache.avro;version=1.9.0", + "application/vnd.apache.avro+json;version=1.9.0", + "application/vnd.apache.avro+yaml;version=1.9.0" ] } - }, - "then": { - "$ref": "#/definitions/bindings-mqtt-0.1.0-message" } }, - { - "if": { - "required": [ - "bindingVersion" - ], - "properties": { - "bindingVersion": { - "const": "0.1.0" - } + "then": { + "properties": { + "schema": { + "$ref": "#/definitions/avroSchema_v1" } - }, - "then": { - "$ref": "#/definitions/bindings-mqtt-0.1.0-message" } } - ] - }, - "mqtt5": {}, - "kafka": { + } + ] + } + }, + "openapiSchema_3_0": { + "type": "object", + "definitions": { + "ExternalDocumentation": { + "type": "object", + "required": [ + "url" + ], "properties": { - "bindingVersion": { - "enum": [ - "0.4.0", - "0.3.0", - "0.1.0" - ] - } - }, - "allOf": [ - { - "description": "If no bindingVersion specified, use the latest binding", - "if": { - "not": { - "required": [ - "bindingVersion" - ] - } - }, - "then": { - "$ref": "#/definitions/bindings-kafka-0.4.0-message" - } - }, - { - "if": { - "required": [ - "bindingVersion" - ], - "properties": { - "bindingVersion": { - "const": "0.4.0" - } - } - }, - "then": { - "$ref": "#/definitions/bindings-kafka-0.4.0-message" - } - }, - { - "if": { - "required": [ - "bindingVersion" - ], - "properties": { - "bindingVersion": { - "const": "0.3.0" - } - } - }, - "then": { - "$ref": "#/definitions/bindings-kafka-0.3.0-message" - } + "description": { + "type": "string" }, - { - "if": { - "required": [ - "bindingVersion" - ], - "properties": { - "bindingVersion": { - "const": "0.1.0" - } - } - }, - "then": { - "$ref": "#/definitions/bindings-kafka-0.1.0-message" - } + "url": { + "type": "string", + "format": "uri-reference" } - ] + }, + "patternProperties": { + "^x-": {} + }, + "additionalProperties": false }, - "anypointmq": { + "Discriminator": { + "type": "object", + "required": [ + "propertyName" + ], "properties": { - "bindingVersion": { - "enum": [ - "0.0.1" - ] - } - }, - "allOf": [ - { - "description": "If no bindingVersion specified, use the latest binding", - "if": { - "not": { - "required": [ - "bindingVersion" - ] - } - }, - "then": { - "$ref": "#/definitions/bindings-anypointmq-0.0.1-message" - } + "propertyName": { + "type": "string" }, - { - "if": { - "required": [ - "bindingVersion" - ], - "properties": { - "bindingVersion": { - "const": "0.0.1" - } - } - }, - "then": { - "$ref": "#/definitions/bindings-anypointmq-0.0.1-message" + "mapping": { + "type": "object", + "additionalProperties": { + "type": "string" } } - ] + } }, - "nats": {}, - "jms": {}, - "sns": {}, - "sqs": {}, - "stomp": {}, - "redis": {}, - "ibmmq": { - "properties": { - "bindingVersion": { - "enum": [ - "0.1.0" - ] - } - }, - "allOf": [ - { - "description": "If no bindingVersion specified, use the latest binding", - "if": { - "not": { - "required": [ - "bindingVersion" - ] - } - }, - "then": { - "$ref": "#/definitions/bindings-ibmmq-0.1.0-message" - } - }, - { - "if": { - "required": [ - "bindingVersion" - ], - "properties": { - "bindingVersion": { - "const": "0.1.0" - } - } - }, - "then": { - "$ref": "#/definitions/bindings-ibmmq-0.1.0-message" - } + "Reference": { + "type": "object", + "required": [ + "$ref" + ], + "patternProperties": { + "^\\$ref$": { + "type": "string", + "format": "uri-reference" } - ] + } }, - "solace": {}, - "googlepubsub": { + "XML": { + "type": "object", "properties": { - "bindingVersion": { - "enum": [ - "0.1.0" - ] - } - }, - "allOf": [ - { - "description": "If no bindingVersion specified, use the latest binding", - "if": { - "not": { - "required": [ - "bindingVersion" - ] - } - }, - "then": { - "$ref": "#/definitions/bindings-googlepubsub-0.1.0-message" - } + "name": { + "type": "string" }, - { - "if": { - "required": [ - "bindingVersion" - ], - "properties": { - "bindingVersion": { - "const": "0.1.0" - } - } - }, - "then": { - "$ref": "#/definitions/bindings-googlepubsub-0.1.0-message" - } + "namespace": { + "type": "string", + "format": "uri" + }, + "prefix": { + "type": "string" + }, + "attribute": { + "type": "boolean", + "default": false + }, + "wrapped": { + "type": "boolean", + "default": false } - ] - } - } - }, - "bindings-http-0.1.0-message": { - "title": "HTTP message bindings object", - "description": "This object contains information about the message representation in HTTP.", - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" + }, + "patternProperties": { + "^x-": {} + }, + "additionalProperties": false } }, "properties": { - "headers": { - "$ref": "#/definitions/schema", - "description": "\tA Schema object containing the definitions for HTTP-specific headers. This schema MUST be of type 'object' and have a 'properties' key." + "title": { + "type": "string" }, - "bindingVersion": { - "type": "string", - "enum": [ - "0.1.0" - ], - "description": "The version of this binding. If omitted, \"latest\" MUST be assumed." - } - }, - "examples": [ - { - "headers": { - "type": "object", - "properties": { - "Content-Type": { - "type": "string", - "enum": [ - "application/json" - ] - } - } - }, - "bindingVersion": "0.1.0" - } - ] - }, - "bindings-amqp-0.2.0-message": { - "title": "AMQP message bindings object", - "description": "This object contains information about the message representation in AMQP.", - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "properties": { - "contentEncoding": { - "type": "string", - "description": "A MIME encoding for the message content." + "multipleOf": { + "type": "number", + "exclusiveMinimum": 0 }, - "messageType": { - "type": "string", - "description": "Application-specific message type." + "maximum": { + "type": "number" }, - "bindingVersion": { - "type": "string", - "enum": [ - "0.2.0" - ], - "description": "The version of this binding. If omitted, \"latest\" MUST be assumed." - } - }, - "examples": [ - { - "contentEncoding": "gzip", - "messageType": "user.signup", - "bindingVersion": "0.2.0" - } - ] - }, - "bindings-mqtt-0.1.0-message": { - "title": "MQTT message bindings object", - "description": "This object contains information about the message representation in MQTT.", - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "properties": { - "bindingVersion": { - "type": "string", - "enum": [ - "0.1.0" - ], - "description": "The version of this binding. If omitted, 'latest' MUST be assumed." - } - }, - "examples": [ - { - "bindingVersion": "0.1.0" - } - ] - }, - "bindings-kafka-0.4.0-message": { - "title": "Message Schema", - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "properties": { - "key": { - "$ref": "#/definitions/schema", - "description": "The message key." + "exclusiveMaximum": { + "type": "boolean", + "default": false }, - "schemaIdLocation": { - "type": "string", - "description": "If a Schema Registry is used when performing this operation, tells where the id of schema is stored.", - "enum": [ - "header", - "payload" - ] + "minimum": { + "type": "number" }, - "schemaIdPayloadEncoding": { - "type": "string", - "description": "Number of bytes or vendor specific values when schema id is encoded in payload." + "exclusiveMinimum": { + "type": "boolean", + "default": false }, - "schemaLookupStrategy": { - "type": "string", - "description": "Freeform string for any naming strategy class to use. Clients should default to the vendor default if not supplied." + "maxLength": { + "type": "integer", + "minimum": 0 }, - "bindingVersion": { + "minLength": { + "type": "integer", + "minimum": 0, + "default": 0 + }, + "pattern": { "type": "string", - "enum": [ - "0.4.0" - ], - "description": "The version of this binding. If omitted, 'latest' MUST be assumed." - } - }, - "examples": [ - { - "key": { - "type": "string", - "enum": [ - "myKey" - ] - }, - "schemaIdLocation": "payload", - "schemaIdPayloadEncoding": "apicurio-new", - "schemaLookupStrategy": "TopicIdStrategy", - "bindingVersion": "0.4.0" + "format": "regex" }, - { - "key": { - "$ref": "path/to/user-create.avsc#/UserCreate" + "maxItems": { + "type": "integer", + "minimum": 0 + }, + "minItems": { + "type": "integer", + "minimum": 0, + "default": 0 + }, + "uniqueItems": { + "type": "boolean", + "default": false + }, + "maxProperties": { + "type": "integer", + "minimum": 0 + }, + "minProperties": { + "type": "integer", + "minimum": 0, + "default": 0 + }, + "required": { + "type": "array", + "items": { + "type": "string" }, - "schemaIdLocation": "payload", - "schemaIdPayloadEncoding": "4", - "bindingVersion": "0.4.0" - } - ] - }, - "bindings-kafka-0.3.0-message": { - "title": "Message Schema", - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "properties": { - "key": { - "$ref": "#/definitions/schema", - "description": "The message key." + "minItems": 1, + "uniqueItems": true }, - "schemaIdLocation": { + "enum": { + "type": "array", + "items": true, + "minItems": 1, + "uniqueItems": false + }, + "type": { "type": "string", - "description": "If a Schema Registry is used when performing this operation, tells where the id of schema is stored.", "enum": [ - "header", - "payload" + "array", + "boolean", + "integer", + "number", + "object", + "string" ] }, - "schemaIdPayloadEncoding": { - "type": "string", - "description": "Number of bytes or vendor specific values when schema id is encoded in payload." - }, - "schemaLookupStrategy": { - "type": "string", - "description": "Freeform string for any naming strategy class to use. Clients should default to the vendor default if not supplied." + "not": { + "oneOf": [ + { + "$ref": "#/definitions/openapiSchema_3_0" + }, + { + "$ref": "#/definitions/openapiSchema_3_0/definitions/Reference" + } + ] }, - "bindingVersion": { - "type": "string", - "enum": [ - "0.3.0" - ], - "description": "The version of this binding. If omitted, 'latest' MUST be assumed." - } - }, - "examples": [ - { - "key": { - "type": "string", - "enum": [ - "myKey" + "allOf": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/definitions/openapiSchema_3_0" + }, + { + "$ref": "#/definitions/openapiSchema_3_0/definitions/Reference" + } ] - }, - "schemaIdLocation": "payload", - "schemaIdPayloadEncoding": "apicurio-new", - "schemaLookupStrategy": "TopicIdStrategy", - "bindingVersion": "0.3.0" + } }, - { - "key": { - "$ref": "path/to/user-create.avsc#/UserCreate" - }, - "schemaIdLocation": "payload", - "schemaIdPayloadEncoding": "4", - "bindingVersion": "0.3.0" - } - ] - }, - "bindings-kafka-0.1.0-message": { - "title": "Kafka message bindings object", - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "properties": { - "key": { - "$ref": "#/definitions/schema", - "description": "The message key." + "oneOf": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/definitions/openapiSchema_3_0" + }, + { + "$ref": "#/definitions/openapiSchema_3_0/definitions/Reference" + } + ] + } }, - "bindingVersion": { - "type": "string", - "enum": [ - "0.1.0" - ], - "description": "The version of this binding. If omitted, 'latest' MUST be assumed." - } - }, - "examples": [ - { - "key": { - "type": "string", - "enum": [ - "myKey" + "anyOf": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/definitions/openapiSchema_3_0" + }, + { + "$ref": "#/definitions/openapiSchema_3_0/definitions/Reference" + } ] - }, - "bindingVersion": "0.1.0" + } }, - { - "key": { - "$ref": "path/to/user-create.avsc#/UserCreate" - }, - "bindingVersion": "0.2.0" - } - ] - }, - "bindings-anypointmq-0.0.1-message": { - "title": "Anypoint MQ message bindings object", - "description": "This object contains configuration for describing an Anypoint MQ message as an AsyncAPI message. This objects only contains configuration that can not be provided in the AsyncAPI standard message object.", - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "properties": { - "headers": { - "$ref": "#/definitions/schema", - "description": "A Schema object containing the definitions for Anypoint MQ-specific headers (protocol headers). This schema MUST be of type 'object' and have a 'properties' key. Examples of Anypoint MQ protocol headers are 'messageId' and 'messageGroupId'." + "items": { + "oneOf": [ + { + "$ref": "#/definitions/openapiSchema_3_0" + }, + { + "$ref": "#/definitions/openapiSchema_3_0/definitions/Reference" + } + ] }, - "bindingVersion": { - "type": "string", - "enum": [ - "0.0.1" - ], - "description": "The version of this binding. If omitted, 'latest' MUST be assumed." - } - }, - "examples": [ - { - "headers": { - "type": "object", - "properties": { - "messageId": { - "type": "string" + "properties": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "$ref": "#/definitions/openapiSchema_3_0" + }, + { + "$ref": "#/definitions/openapiSchema_3_0/definitions/Reference" } + ] + } + }, + "additionalProperties": { + "oneOf": [ + { + "$ref": "#/definitions/openapiSchema_3_0" + }, + { + "$ref": "#/definitions/openapiSchema_3_0/definitions/Reference" + }, + { + "type": "boolean" } - }, - "bindingVersion": "0.0.1" - } - ] - }, - "bindings-ibmmq-0.1.0-message": { - "title": "IBM MQ message bindings object", - "description": "This object contains information about the message representation in IBM MQ.", - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "properties": { - "type": { - "type": "string", - "enum": [ - "string", - "jms", - "binary" ], - "default": "string", - "description": "The type of the message." - }, - "headers": { - "type": "string", - "description": "Defines the IBM MQ message headers to include with this message. More than one header can be specified as a comma separated list. Supporting information on IBM MQ message formats can be found on this [page](https://www.ibm.com/docs/en/ibm-mq/9.2?topic=mqmd-format-mqchar8) in the IBM MQ Knowledge Center." + "default": true }, "description": { - "type": "string", - "description": "Provides additional information for application developers: describes the message type or format." + "type": "string" }, - "expiry": { - "type": "integer", - "minimum": 0, - "default": 0, - "description": "The recommended setting the client should use for the TTL (Time-To-Live) of the message. This is a period of time expressed in milliseconds and set by the application that puts the message. 'expiry' values are API dependant e.g., MQI and JMS use different units of time and default values for 'unlimited'. General information on IBM MQ message expiry can be found on this [page](https://www.ibm.com/docs/en/ibm-mq/9.2?topic=mqmd-expiry-mqlong) in the IBM MQ Knowledge Center." + "format": { + "type": "string" }, - "bindingVersion": { - "type": "string", - "enum": [ - "0.1.0" - ], - "description": "The version of this binding." + "default": true, + "nullable": { + "type": "boolean", + "default": false + }, + "discriminator": { + "$ref": "#/definitions/openapiSchema_3_0/definitions/Discriminator" + }, + "readOnly": { + "type": "boolean", + "default": false + }, + "writeOnly": { + "type": "boolean", + "default": false + }, + "example": true, + "externalDocs": { + "$ref": "#/definitions/openapiSchema_3_0/definitions/ExternalDocumentation" + }, + "deprecated": { + "type": "boolean", + "default": false + }, + "xml": { + "$ref": "#/definitions/openapiSchema_3_0/definitions/XML" } }, - "oneOf": [ - { - "properties": { - "type": { - "const": "binary" - } - } - }, - { - "properties": { - "type": { - "const": "jms" + "patternProperties": { + "^x-": true + }, + "additionalProperties": false + }, + "avroSchema_v1": { + "definitions": { + "avroSchema": { + "title": "Avro Schema", + "description": "Root Schema", + "oneOf": [ + { + "$ref": "#/definitions/avroSchema_v1/definitions/types" } - }, - "not": { - "required": [ - "headers" - ] - } + ] }, - { - "properties": { - "type": { - "const": "string" + "types": { + "title": "Avro Types", + "description": "Allowed Avro types", + "oneOf": [ + { + "$ref": "#/definitions/avroSchema_v1/definitions/primitiveType" + }, + { + "$ref": "#/definitions/avroSchema_v1/definitions/primitiveTypeWithMetadata" + }, + { + "$ref": "#/definitions/avroSchema_v1/definitions/customTypeReference" + }, + { + "$ref": "#/definitions/avroSchema_v1/definitions/avroRecord" + }, + { + "$ref": "#/definitions/avroSchema_v1/definitions/avroEnum" + }, + { + "$ref": "#/definitions/avroSchema_v1/definitions/avroArray" + }, + { + "$ref": "#/definitions/avroSchema_v1/definitions/avroMap" + }, + { + "$ref": "#/definitions/avroSchema_v1/definitions/avroFixed" + }, + { + "$ref": "#/definitions/avroSchema_v1/definitions/avroUnion" } - }, - "not": { - "required": [ - "headers" - ] - } - } - ], - "examples": [ - { - "type": "string", - "bindingVersion": "0.1.0" + ] }, - { - "type": "jms", - "description": "JMS stream message", - "bindingVersion": "0.1.0" - } - ] - }, - "bindings-googlepubsub-0.1.0-message": { - "title": "Cloud Pub/Sub Channel Schema", - "description": "This object contains information about the message representation for Google Cloud Pub/Sub.", - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "properties": { - "bindingVersion": { + "primitiveType": { + "title": "Primitive Type", + "description": "Basic type primitives.", "type": "string", "enum": [ - "0.1.0" - ], - "description": "The version of this binding." + "null", + "boolean", + "int", + "long", + "float", + "double", + "bytes", + "string" + ] }, - "attributes": { - "type": "object" + "primitiveTypeWithMetadata": { + "title": "Primitive Type With Metadata", + "description": "A primitive type with metadata attached.", + "type": "object", + "properties": { + "type": { + "$ref": "#/definitions/avroSchema_v1/definitions/primitiveType" + } + }, + "required": [ + "type" + ] }, - "orderingKey": { - "type": "string" + "customTypeReference": { + "title": "Custom Type", + "description": "Reference to a ComplexType", + "not": { + "$ref": "#/definitions/avroSchema_v1/definitions/primitiveType" + }, + "type": "string", + "pattern": "^[A-Za-z_][A-Za-z0-9_]*(\\.[A-Za-z_][A-Za-z0-9_]*)*$" }, - "schema": { + "avroUnion": { + "title": "Union", + "description": "A Union of types", + "type": "array", + "items": { + "$ref": "#/definitions/avroSchema_v1/definitions/avroSchema" + }, + "minItems": 1 + }, + "avroField": { + "title": "Field", + "description": "A field within a Record", "type": "object", - "additionalItems": false, "properties": { "name": { - "type": "string" + "$ref": "#/definitions/avroSchema_v1/definitions/name" }, "type": { + "$ref": "#/definitions/avroSchema_v1/definitions/types" + }, + "doc": { "type": "string" + }, + "default": true, + "order": { + "enum": [ + "ascending", + "descending", + "ignore" + ] + }, + "aliases": { + "type": "array", + "items": { + "$ref": "#/definitions/avroSchema_v1/definitions/name" + } } }, "required": [ "name", "type" ] - } - }, - "examples": [ - { - "schema": { - "name": "projects/your-project-id/schemas/your-avro-schema-id", - "type": "avro" - } - }, - { - "schema": { - "name": "projects/your-project-id/schemas/your-protobuf-schema-id", - "type": "protobuf" - } - } - ] - }, - "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" + "avroRecord": { + "title": "Record", + "description": "A Record", + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "record" }, - { - "properties": { - "type": { - "const": "object" - } + "name": { + "$ref": "#/definitions/avroSchema_v1/definitions/name" + }, + "namespace": { + "$ref": "#/definitions/avroSchema_v1/definitions/namespace" + }, + "doc": { + "type": "string" + }, + "aliases": { + "type": "array", + "items": { + "$ref": "#/definitions/avroSchema_v1/definitions/name" + } + }, + "fields": { + "type": "array", + "items": { + "$ref": "#/definitions/avroSchema_v1/definitions/avroField" } } + }, + "required": [ + "type", + "name", + "fields" ] }, - "messageId": { - "type": "string" - }, - "correlationId": { - "oneOf": [ - { - "$ref": "#/definitions/Reference" + "avroEnum": { + "title": "Enum", + "description": "An enumeration", + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "enum" }, - { - "$ref": "#/definitions/correlationId" + "name": { + "$ref": "#/definitions/avroSchema_v1/definitions/name" + }, + "namespace": { + "$ref": "#/definitions/avroSchema_v1/definitions/namespace" + }, + "doc": { + "type": "string" + }, + "aliases": { + "type": "array", + "items": { + "$ref": "#/definitions/avroSchema_v1/definitions/name" + } + }, + "symbols": { + "type": "array", + "items": { + "$ref": "#/definitions/avroSchema_v1/definitions/name" + } } + }, + "required": [ + "type", + "name", + "symbols" ] }, - "tags": { - "type": "array", - "items": { - "oneOf": [ - { - "$ref": "#/definitions/Reference" - }, - { - "$ref": "#/definitions/tag" - } - ] - }, - "uniqueItems": true - }, - "summary": { - "type": "string", - "description": "A brief summary of the message." - }, - "name": { - "type": "string", - "description": "Name of the message." - }, - "title": { - "type": "string", - "description": "A human-friendly title for the message." - }, - "description": { - "type": "string", - "description": "A longer description of the message. CommonMark is allowed." - }, - "externalDocs": { - "oneOf": [ - { - "$ref": "#/definitions/Reference" - }, - { - "$ref": "#/definitions/externalDocs" - } - ] - }, - "deprecated": { - "type": "boolean", - "default": false - }, - "examples": { - "type": "array", - "items": { - "type": "object" - } - }, - "bindings": { - "$ref": "#/definitions/messageBindingsObject" - } - } - }, - "openapiSchema_3_0": { - "type": "object", - "definitions": { - "ExternalDocumentation": { + "avroArray": { + "title": "Array", + "description": "An array", "type": "object", - "required": [ - "url" - ], "properties": { - "description": { + "type": { + "type": "string", + "const": "array" + }, + "name": { + "$ref": "#/definitions/avroSchema_v1/definitions/name" + }, + "namespace": { + "$ref": "#/definitions/avroSchema_v1/definitions/namespace" + }, + "doc": { "type": "string" }, - "url": { - "type": "string", - "format": "uri-reference" + "aliases": { + "type": "array", + "items": { + "$ref": "#/definitions/avroSchema_v1/definitions/name" + } + }, + "items": { + "$ref": "#/definitions/avroSchema_v1/definitions/types" } }, - "patternProperties": { - "^x-": {} - }, - "additionalProperties": false + "required": [ + "type", + "items" + ] }, - "Discriminator": { + "avroMap": { + "title": "Map", + "description": "A map of values", "type": "object", - "required": [ - "propertyName" - ], "properties": { - "propertyName": { + "type": { + "type": "string", + "const": "map" + }, + "name": { + "$ref": "#/definitions/avroSchema_v1/definitions/name" + }, + "namespace": { + "$ref": "#/definitions/avroSchema_v1/definitions/namespace" + }, + "doc": { "type": "string" }, - "mapping": { - "type": "object", - "additionalProperties": { - "type": "string" + "aliases": { + "type": "array", + "items": { + "$ref": "#/definitions/avroSchema_v1/definitions/name" } + }, + "values": { + "$ref": "#/definitions/avroSchema_v1/definitions/types" } - } - }, - "Reference": { - "type": "object", + }, "required": [ - "$ref" - ], - "patternProperties": { - "^\\$ref$": { - "type": "string", - "format": "uri-reference" - } - } + "type", + "values" + ] }, - "XML": { + "avroFixed": { + "title": "Fixed", + "description": "A fixed sized array of bytes", "type": "object", "properties": { + "type": { + "type": "string", + "const": "fixed" + }, "name": { - "type": "string" + "$ref": "#/definitions/avroSchema_v1/definitions/name" }, "namespace": { - "type": "string", - "format": "uri" + "$ref": "#/definitions/avroSchema_v1/definitions/namespace" }, - "prefix": { + "doc": { "type": "string" }, - "attribute": { - "type": "boolean", - "default": false + "aliases": { + "type": "array", + "items": { + "$ref": "#/definitions/avroSchema_v1/definitions/name" + } }, - "wrapped": { - "type": "boolean", - "default": false + "size": { + "type": "number" } }, - "patternProperties": { - "^x-": {} - }, - "additionalProperties": false + "required": [ + "type", + "name", + "size" + ] + }, + "name": { + "type": "string", + "pattern": "^[A-Za-z_][A-Za-z0-9_]*$" + }, + "namespace": { + "type": "string", + "pattern": "^([A-Za-z_][A-Za-z0-9_]*(\\.[A-Za-z_][A-Za-z0-9_]*)*)*$" + } + }, + "description": "Json-Schema definition for Avro AVSC files.", + "oneOf": [ + { + "$ref": "#/definitions/avroSchema_v1/definitions/avroSchema" + } + ], + "title": "Avro Schema Definition" + }, + "correlationId": { + "type": "object", + "required": [ + "location" + ], + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" } }, "properties": { - "title": { - "type": "string" - }, - "multipleOf": { - "type": "number", - "exclusiveMinimum": 0 - }, - "maximum": { - "type": "number" - }, - "exclusiveMaximum": { - "type": "boolean", - "default": false - }, - "minimum": { - "type": "number" - }, - "exclusiveMinimum": { - "type": "boolean", - "default": false - }, - "maxLength": { - "type": "integer", - "minimum": 0 - }, - "minLength": { - "type": "integer", - "minimum": 0, - "default": 0 - }, - "pattern": { + "description": { "type": "string", - "format": "regex" - }, - "maxItems": { - "type": "integer", - "minimum": 0 - }, - "minItems": { - "type": "integer", - "minimum": 0, - "default": 0 - }, - "uniqueItems": { - "type": "boolean", - "default": false - }, - "maxProperties": { - "type": "integer", - "minimum": 0 - }, - "minProperties": { - "type": "integer", - "minimum": 0, - "default": 0 + "description": "A optional description of the correlation ID. GitHub Flavored Markdown is allowed." }, - "required": { - "type": "array", - "items": { - "type": "string" - }, - "minItems": 1, - "uniqueItems": true - }, - "enum": { - "type": "array", - "items": true, - "minItems": 1, - "uniqueItems": false - }, - "type": { + "location": { "type": "string", - "enum": [ - "array", - "boolean", - "integer", - "number", - "object", - "string" - ] - }, - "not": { - "oneOf": [ + "description": "A runtime expression that specifies the location of the correlation ID", + "pattern": "^\\$message\\.(header|payload)#(\\/(([^\\/~])|(~[01]))*)*" + } + } + }, + "messageBindingsObject": { + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, + "properties": { + "http": { + "properties": { + "bindingVersion": { + "enum": [ + "0.1.0" + ] + } + }, + "allOf": [ { - "$ref": "#/definitions/openapiSchema_3_0" + "description": "If no bindingVersion specified, use the latest binding", + "if": { + "not": { + "required": [ + "bindingVersion" + ] + } + }, + "then": { + "$ref": "#/definitions/bindings-http-0.1.0-message" + } }, { - "$ref": "#/definitions/openapiSchema_3_0/definitions/Reference" + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.1.0" + } + } + }, + "then": { + "$ref": "#/definitions/bindings-http-0.1.0-message" + } } ] }, - "allOf": { - "type": "array", - "items": { - "oneOf": [ - { - "$ref": "#/definitions/openapiSchema_3_0" + "ws": {}, + "amqp": { + "properties": { + "bindingVersion": { + "enum": [ + "0.2.0" + ] + } + }, + "allOf": [ + { + "description": "If no bindingVersion specified, use the latest binding", + "if": { + "not": { + "required": [ + "bindingVersion" + ] + } }, - { - "$ref": "#/definitions/openapiSchema_3_0/definitions/Reference" + "then": { + "$ref": "#/definitions/bindings-amqp-0.2.0-message" } - ] - } - }, - "oneOf": { - "type": "array", - "items": { - "oneOf": [ - { - "$ref": "#/definitions/openapiSchema_3_0" + }, + { + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.2.0" + } + } }, - { - "$ref": "#/definitions/openapiSchema_3_0/definitions/Reference" + "then": { + "$ref": "#/definitions/bindings-amqp-0.2.0-message" } - ] - } + } + ] }, - "anyOf": { - "type": "array", - "items": { - "oneOf": [ - { - "$ref": "#/definitions/openapiSchema_3_0" + "amqp1": {}, + "mqtt": { + "properties": { + "bindingVersion": { + "enum": [ + "0.1.0" + ] + } + }, + "allOf": [ + { + "description": "If no bindingVersion specified, use the latest binding", + "if": { + "not": { + "required": [ + "bindingVersion" + ] + } }, - { - "$ref": "#/definitions/openapiSchema_3_0/definitions/Reference" + "then": { + "$ref": "#/definitions/bindings-mqtt-0.1.0-message" } - ] - } - }, - "items": { - "oneOf": [ - { - "$ref": "#/definitions/openapiSchema_3_0" }, { - "$ref": "#/definitions/openapiSchema_3_0/definitions/Reference" + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.1.0" + } + } + }, + "then": { + "$ref": "#/definitions/bindings-mqtt-0.1.0-message" + } } ] }, - "properties": { - "type": "object", - "additionalProperties": { - "oneOf": [ - { - "$ref": "#/definitions/openapiSchema_3_0" + "mqtt5": {}, + "kafka": { + "properties": { + "bindingVersion": { + "enum": [ + "0.4.0", + "0.3.0", + "0.1.0" + ] + } + }, + "allOf": [ + { + "description": "If no bindingVersion specified, use the latest binding", + "if": { + "not": { + "required": [ + "bindingVersion" + ] + } }, - { - "$ref": "#/definitions/openapiSchema_3_0/definitions/Reference" + "then": { + "$ref": "#/definitions/bindings-kafka-0.4.0-message" } - ] - } - }, - "additionalProperties": { - "oneOf": [ + }, { - "$ref": "#/definitions/openapiSchema_3_0" + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.4.0" + } + } + }, + "then": { + "$ref": "#/definitions/bindings-kafka-0.4.0-message" + } }, { - "$ref": "#/definitions/openapiSchema_3_0/definitions/Reference" + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.3.0" + } + } + }, + "then": { + "$ref": "#/definitions/bindings-kafka-0.3.0-message" + } }, { - "type": "boolean" - } - ], - "default": true - }, - "description": { - "type": "string" - }, - "format": { - "type": "string" - }, - "default": true, - "nullable": { - "type": "boolean", - "default": false - }, - "discriminator": { - "$ref": "#/definitions/openapiSchema_3_0/definitions/Discriminator" - }, - "readOnly": { - "type": "boolean", - "default": false - }, - "writeOnly": { - "type": "boolean", - "default": false - }, - "example": true, - "externalDocs": { - "$ref": "#/definitions/openapiSchema_3_0/definitions/ExternalDocumentation" - }, - "deprecated": { - "type": "boolean", - "default": false - }, - "xml": { - "$ref": "#/definitions/openapiSchema_3_0/definitions/XML" - } - }, - "patternProperties": { - "^x-": true - }, - "additionalProperties": false - }, - "avroSchema_v1": { - "definitions": { - "avroSchema": { - "title": "Avro Schema", - "description": "Root Schema", - "oneOf": [ - { - "$ref": "#/definitions/avroSchema_v1/definitions/types" + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.1.0" + } + } + }, + "then": { + "$ref": "#/definitions/bindings-kafka-0.1.0-message" + } } ] }, - "types": { - "title": "Avro Types", - "description": "Allowed Avro types", - "oneOf": [ - { - "$ref": "#/definitions/avroSchema_v1/definitions/primitiveType" - }, - { - "$ref": "#/definitions/avroSchema_v1/definitions/primitiveTypeWithMetadata" - }, - { - "$ref": "#/definitions/avroSchema_v1/definitions/customTypeReference" - }, - { - "$ref": "#/definitions/avroSchema_v1/definitions/avroRecord" - }, - { - "$ref": "#/definitions/avroSchema_v1/definitions/avroEnum" - }, - { - "$ref": "#/definitions/avroSchema_v1/definitions/avroArray" - }, - { - "$ref": "#/definitions/avroSchema_v1/definitions/avroMap" - }, + "anypointmq": { + "properties": { + "bindingVersion": { + "enum": [ + "0.0.1" + ] + } + }, + "allOf": [ { - "$ref": "#/definitions/avroSchema_v1/definitions/avroFixed" + "description": "If no bindingVersion specified, use the latest binding", + "if": { + "not": { + "required": [ + "bindingVersion" + ] + } + }, + "then": { + "$ref": "#/definitions/bindings-anypointmq-0.0.1-message" + } }, { - "$ref": "#/definitions/avroSchema_v1/definitions/avroUnion" - } - ] - }, - "primitiveType": { - "title": "Primitive Type", - "description": "Basic type primitives.", - "type": "string", - "enum": [ - "null", - "boolean", - "int", - "long", - "float", - "double", - "bytes", - "string" - ] - }, - "primitiveTypeWithMetadata": { - "title": "Primitive Type With Metadata", - "description": "A primitive type with metadata attached.", - "type": "object", - "properties": { - "type": { - "$ref": "#/definitions/avroSchema_v1/definitions/primitiveType" + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.0.1" + } + } + }, + "then": { + "$ref": "#/definitions/bindings-anypointmq-0.0.1-message" + } } - }, - "required": [ - "type" ] }, - "customTypeReference": { - "title": "Custom Type", - "description": "Reference to a ComplexType", - "not": { - "$ref": "#/definitions/avroSchema_v1/definitions/primitiveType" - }, - "type": "string", - "pattern": "^[A-Za-z_][A-Za-z0-9_]*(\\.[A-Za-z_][A-Za-z0-9_]*)*$" - }, - "avroUnion": { - "title": "Union", - "description": "A Union of types", - "type": "array", - "items": { - "$ref": "#/definitions/avroSchema_v1/definitions/avroSchema" - }, - "minItems": 1 - }, - "avroField": { - "title": "Field", - "description": "A field within a Record", - "type": "object", + "nats": {}, + "jms": {}, + "sns": {}, + "sqs": {}, + "stomp": {}, + "redis": {}, + "ibmmq": { "properties": { - "name": { - "$ref": "#/definitions/avroSchema_v1/definitions/name" - }, - "type": { - "$ref": "#/definitions/avroSchema_v1/definitions/types" - }, - "doc": { - "type": "string" - }, - "default": true, - "order": { + "bindingVersion": { "enum": [ - "ascending", - "descending", - "ignore" + "0.1.0" ] - }, - "aliases": { - "type": "array", - "items": { - "$ref": "#/definitions/avroSchema_v1/definitions/name" - } } }, - "required": [ - "name", - "type" - ] - }, - "avroRecord": { - "title": "Record", - "description": "A Record", - "type": "object", - "properties": { - "type": { - "type": "string", - "const": "record" - }, - "name": { - "$ref": "#/definitions/avroSchema_v1/definitions/name" - }, - "namespace": { - "$ref": "#/definitions/avroSchema_v1/definitions/namespace" - }, - "doc": { - "type": "string" - }, - "aliases": { - "type": "array", - "items": { - "$ref": "#/definitions/avroSchema_v1/definitions/name" + "allOf": [ + { + "description": "If no bindingVersion specified, use the latest binding", + "if": { + "not": { + "required": [ + "bindingVersion" + ] + } + }, + "then": { + "$ref": "#/definitions/bindings-ibmmq-0.1.0-message" } }, - "fields": { - "type": "array", - "items": { - "$ref": "#/definitions/avroSchema_v1/definitions/avroField" + { + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.1.0" + } + } + }, + "then": { + "$ref": "#/definitions/bindings-ibmmq-0.1.0-message" } } - }, - "required": [ - "type", - "name", - "fields" ] }, - "avroEnum": { - "title": "Enum", - "description": "An enumeration", - "type": "object", + "solace": {}, + "googlepubsub": { "properties": { - "type": { - "type": "string", - "const": "enum" - }, - "name": { - "$ref": "#/definitions/avroSchema_v1/definitions/name" - }, - "namespace": { - "$ref": "#/definitions/avroSchema_v1/definitions/namespace" - }, - "doc": { - "type": "string" - }, - "aliases": { - "type": "array", - "items": { - "$ref": "#/definitions/avroSchema_v1/definitions/name" + "bindingVersion": { + "enum": [ + "0.1.0" + ] + } + }, + "allOf": [ + { + "description": "If no bindingVersion specified, use the latest binding", + "if": { + "not": { + "required": [ + "bindingVersion" + ] + } + }, + "then": { + "$ref": "#/definitions/bindings-googlepubsub-0.1.0-message" } }, - "symbols": { - "type": "array", - "items": { - "$ref": "#/definitions/avroSchema_v1/definitions/name" + { + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.1.0" + } + } + }, + "then": { + "$ref": "#/definitions/bindings-googlepubsub-0.1.0-message" + } + } + ] + } + } + }, + "bindings-http-0.1.0-message": { + "title": "HTTP message bindings object", + "description": "This object contains information about the message representation in HTTP.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, + "properties": { + "headers": { + "$ref": "#/definitions/schema", + "description": "\tA Schema object containing the definitions for HTTP-specific headers. This schema MUST be of type 'object' and have a 'properties' key." + }, + "bindingVersion": { + "type": "string", + "enum": [ + "0.1.0" + ], + "description": "The version of this binding. If omitted, \"latest\" MUST be assumed." + } + }, + "examples": [ + { + "headers": { + "type": "object", + "properties": { + "Content-Type": { + "type": "string", + "enum": [ + "application/json" + ] + } + } + }, + "bindingVersion": "0.1.0" + } + ] + }, + "bindings-amqp-0.2.0-message": { + "title": "AMQP message bindings object", + "description": "This object contains information about the message representation in AMQP.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, + "properties": { + "contentEncoding": { + "type": "string", + "description": "A MIME encoding for the message content." + }, + "messageType": { + "type": "string", + "description": "Application-specific message type." + }, + "bindingVersion": { + "type": "string", + "enum": [ + "0.2.0" + ], + "description": "The version of this binding. If omitted, \"latest\" MUST be assumed." + } + }, + "examples": [ + { + "contentEncoding": "gzip", + "messageType": "user.signup", + "bindingVersion": "0.2.0" + } + ] + }, + "bindings-mqtt-0.1.0-message": { + "title": "MQTT message bindings object", + "description": "This object contains information about the message representation in MQTT.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, + "properties": { + "bindingVersion": { + "type": "string", + "enum": [ + "0.1.0" + ], + "description": "The version of this binding. If omitted, 'latest' MUST be assumed." + } + }, + "examples": [ + { + "bindingVersion": "0.1.0" + } + ] + }, + "bindings-kafka-0.4.0-message": { + "title": "Message Schema", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, + "properties": { + "key": { + "$ref": "#/definitions/schema", + "description": "The message key." + }, + "schemaIdLocation": { + "type": "string", + "description": "If a Schema Registry is used when performing this operation, tells where the id of schema is stored.", + "enum": [ + "header", + "payload" + ] + }, + "schemaIdPayloadEncoding": { + "type": "string", + "description": "Number of bytes or vendor specific values when schema id is encoded in payload." + }, + "schemaLookupStrategy": { + "type": "string", + "description": "Freeform string for any naming strategy class to use. Clients should default to the vendor default if not supplied." + }, + "bindingVersion": { + "type": "string", + "enum": [ + "0.4.0" + ], + "description": "The version of this binding. If omitted, 'latest' MUST be assumed." + } + }, + "examples": [ + { + "key": { + "type": "string", + "enum": [ + "myKey" + ] + }, + "schemaIdLocation": "payload", + "schemaIdPayloadEncoding": "apicurio-new", + "schemaLookupStrategy": "TopicIdStrategy", + "bindingVersion": "0.4.0" + }, + { + "key": { + "$ref": "path/to/user-create.avsc#/UserCreate" + }, + "schemaIdLocation": "payload", + "schemaIdPayloadEncoding": "4", + "bindingVersion": "0.4.0" + } + ] + }, + "bindings-kafka-0.3.0-message": { + "title": "Message Schema", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, + "properties": { + "key": { + "$ref": "#/definitions/schema", + "description": "The message key." + }, + "schemaIdLocation": { + "type": "string", + "description": "If a Schema Registry is used when performing this operation, tells where the id of schema is stored.", + "enum": [ + "header", + "payload" + ] + }, + "schemaIdPayloadEncoding": { + "type": "string", + "description": "Number of bytes or vendor specific values when schema id is encoded in payload." + }, + "schemaLookupStrategy": { + "type": "string", + "description": "Freeform string for any naming strategy class to use. Clients should default to the vendor default if not supplied." + }, + "bindingVersion": { + "type": "string", + "enum": [ + "0.3.0" + ], + "description": "The version of this binding. If omitted, 'latest' MUST be assumed." + } + }, + "examples": [ + { + "key": { + "type": "string", + "enum": [ + "myKey" + ] + }, + "schemaIdLocation": "payload", + "schemaIdPayloadEncoding": "apicurio-new", + "schemaLookupStrategy": "TopicIdStrategy", + "bindingVersion": "0.3.0" + }, + { + "key": { + "$ref": "path/to/user-create.avsc#/UserCreate" + }, + "schemaIdLocation": "payload", + "schemaIdPayloadEncoding": "4", + "bindingVersion": "0.3.0" + } + ] + }, + "bindings-kafka-0.1.0-message": { + "title": "Kafka message bindings object", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, + "properties": { + "key": { + "$ref": "#/definitions/schema", + "description": "The message key." + }, + "bindingVersion": { + "type": "string", + "enum": [ + "0.1.0" + ], + "description": "The version of this binding. If omitted, 'latest' MUST be assumed." + } + }, + "examples": [ + { + "key": { + "type": "string", + "enum": [ + "myKey" + ] + }, + "bindingVersion": "0.1.0" + }, + { + "key": { + "$ref": "path/to/user-create.avsc#/UserCreate" + }, + "bindingVersion": "0.2.0" + } + ] + }, + "bindings-anypointmq-0.0.1-message": { + "title": "Anypoint MQ message bindings object", + "description": "This object contains configuration for describing an Anypoint MQ message as an AsyncAPI message. This objects only contains configuration that can not be provided in the AsyncAPI standard message object.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, + "properties": { + "headers": { + "$ref": "#/definitions/schema", + "description": "A Schema object containing the definitions for Anypoint MQ-specific headers (protocol headers). This schema MUST be of type 'object' and have a 'properties' key. Examples of Anypoint MQ protocol headers are 'messageId' and 'messageGroupId'." + }, + "bindingVersion": { + "type": "string", + "enum": [ + "0.0.1" + ], + "description": "The version of this binding. If omitted, 'latest' MUST be assumed." + } + }, + "examples": [ + { + "headers": { + "type": "object", + "properties": { + "messageId": { + "type": "string" } } - }, - "required": [ - "type", - "name", - "symbols" - ] + }, + "bindingVersion": "0.0.1" + } + ] + }, + "bindings-ibmmq-0.1.0-message": { + "title": "IBM MQ message bindings object", + "description": "This object contains information about the message representation in IBM MQ.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, + "properties": { + "type": { + "type": "string", + "enum": [ + "string", + "jms", + "binary" + ], + "default": "string", + "description": "The type of the message." + }, + "headers": { + "type": "string", + "description": "Defines the IBM MQ message headers to include with this message. More than one header can be specified as a comma separated list. Supporting information on IBM MQ message formats can be found on this [page](https://www.ibm.com/docs/en/ibm-mq/9.2?topic=mqmd-format-mqchar8) in the IBM MQ Knowledge Center." + }, + "description": { + "type": "string", + "description": "Provides additional information for application developers: describes the message type or format." + }, + "expiry": { + "type": "integer", + "minimum": 0, + "default": 0, + "description": "The recommended setting the client should use for the TTL (Time-To-Live) of the message. This is a period of time expressed in milliseconds and set by the application that puts the message. 'expiry' values are API dependant e.g., MQI and JMS use different units of time and default values for 'unlimited'. General information on IBM MQ message expiry can be found on this [page](https://www.ibm.com/docs/en/ibm-mq/9.2?topic=mqmd-expiry-mqlong) in the IBM MQ Knowledge Center." + }, + "bindingVersion": { + "type": "string", + "enum": [ + "0.1.0" + ], + "description": "The version of this binding." + } + }, + "oneOf": [ + { + "properties": { + "type": { + "const": "binary" + } + } }, - "avroArray": { - "title": "Array", - "description": "An array", - "type": "object", + { "properties": { "type": { - "type": "string", - "const": "array" - }, - "name": { - "$ref": "#/definitions/avroSchema_v1/definitions/name" - }, - "namespace": { - "$ref": "#/definitions/avroSchema_v1/definitions/namespace" - }, - "doc": { - "type": "string" - }, - "aliases": { - "type": "array", - "items": { - "$ref": "#/definitions/avroSchema_v1/definitions/name" - } - }, - "items": { - "$ref": "#/definitions/avroSchema_v1/definitions/types" + "const": "jms" } }, - "required": [ - "type", - "items" - ] + "not": { + "required": [ + "headers" + ] + } }, - "avroMap": { - "title": "Map", - "description": "A map of values", - "type": "object", + { "properties": { "type": { - "type": "string", - "const": "map" - }, - "name": { - "$ref": "#/definitions/avroSchema_v1/definitions/name" - }, - "namespace": { - "$ref": "#/definitions/avroSchema_v1/definitions/namespace" - }, - "doc": { - "type": "string" - }, - "aliases": { - "type": "array", - "items": { - "$ref": "#/definitions/avroSchema_v1/definitions/name" - } - }, - "values": { - "$ref": "#/definitions/avroSchema_v1/definitions/types" + "const": "string" } }, - "required": [ - "type", - "values" - ] + "not": { + "required": [ + "headers" + ] + } + } + ], + "examples": [ + { + "type": "string", + "bindingVersion": "0.1.0" }, - "avroFixed": { - "title": "Fixed", - "description": "A fixed sized array of bytes", + { + "type": "jms", + "description": "JMS stream message", + "bindingVersion": "0.1.0" + } + ] + }, + "bindings-googlepubsub-0.1.0-message": { + "title": "Cloud Pub/Sub Channel Schema", + "description": "This object contains information about the message representation for Google Cloud Pub/Sub.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, + "properties": { + "bindingVersion": { + "type": "string", + "enum": [ + "0.1.0" + ], + "description": "The version of this binding." + }, + "attributes": { + "type": "object" + }, + "orderingKey": { + "type": "string" + }, + "schema": { "type": "object", + "additionalItems": false, "properties": { - "type": { - "type": "string", - "const": "fixed" - }, "name": { - "$ref": "#/definitions/avroSchema_v1/definitions/name" - }, - "namespace": { - "$ref": "#/definitions/avroSchema_v1/definitions/namespace" - }, - "doc": { "type": "string" }, - "aliases": { - "type": "array", - "items": { - "$ref": "#/definitions/avroSchema_v1/definitions/name" - } - }, - "size": { - "type": "number" + "type": { + "type": "string" } }, "required": [ - "type", "name", - "size" + "type" + ] + } + }, + "examples": [ + { + "schema": { + "name": "projects/your-project-id/schemas/your-avro-schema-id", + "type": "avro" + } + }, + { + "schema": { + "name": "projects/your-project-id/schemas/your-protobuf-schema-id", + "type": "protobuf" + } + } + ] + }, + "messageTrait": { + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, + "properties": { + "contentType": { + "type": "string" + }, + "headers": { + "$ref": "#/definitions/anySchema" + }, + "messageId": { + "type": "string" + }, + "correlationId": { + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/correlationId" + } ] }, + "tags": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/tag" + } + ] + }, + "uniqueItems": true + }, + "summary": { + "type": "string", + "description": "A brief summary of the message." + }, "name": { "type": "string", - "pattern": "^[A-Za-z_][A-Za-z0-9_]*$" + "description": "Name of the message." }, - "namespace": { + "title": { "type": "string", - "pattern": "^([A-Za-z_][A-Za-z0-9_]*(\\.[A-Za-z_][A-Za-z0-9_]*)*)*$" - } - }, - "description": "Json-Schema definition for Avro AVSC files.", - "oneOf": [ - { - "$ref": "#/definitions/avroSchema_v1/definitions/avroSchema" + "description": "A human-friendly title for the message." + }, + "description": { + "type": "string", + "description": "A longer description of the message. CommonMark is allowed." + }, + "externalDocs": { + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/externalDocs" + } + ] + }, + "deprecated": { + "type": "boolean", + "default": false + }, + "examples": { + "type": "array", + "items": { + "type": "object" + } + }, + "bindings": { + "$ref": "#/definitions/messageBindingsObject" } - ], - "title": "Avro Schema Definition" + } }, "parameters": { "type": "object", @@ -5905,7 +5920,7 @@ "$ref": "#/definitions/Reference" }, { - "$ref": "#/definitions/schema" + "$ref": "#/definitions/anySchema" } ] } diff --git a/schemas/3.0.0.json b/schemas/3.0.0.json index 3a3bc26a..4ed486ec 100644 --- a/schemas/3.0.0.json +++ b/schemas/3.0.0.json @@ -2037,30 +2037,18 @@ } }, "properties": { - "schemaFormat": { - "type": "string" - }, "contentType": { "type": "string" }, "headers": { - "allOf": [ - { - "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" - }, - { - "properties": { - "type": { - "const": "object" - } - } - } - ] + "$ref": "http://asyncapi.com/definitions/3.0.0/anySchema.json" }, "messageId": { "type": "string" }, - "payload": {}, + "payload": { + "$ref": "http://asyncapi.com/definitions/3.0.0/anySchema.json" + }, "correlationId": { "oneOf": [ { @@ -2142,9 +2130,11 @@ "description": "A brief summary of the message example." }, "headers": { - "type": "object" + "$ref": "http://asyncapi.com/definitions/3.0.0/anySchema.json" }, - "payload": {} + "payload": { + "$ref": "http://asyncapi.com/definitions/3.0.0/anySchema.json" + } } } }, @@ -2183,1641 +2173,1668 @@ ] } } + } + }, + "http://asyncapi.com/definitions/3.0.0/anySchema.json": { + "$id": "http://asyncapi.com/definitions/3.0.0/anySchema.json", + "if": { + "required": [ + "schema" + ] }, - "allOf": [ - { - "if": { - "not": { - "required": [ - "schemaFormat" - ] - } - }, - "then": { - "properties": { - "payload": { - "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" - } - } + "then": { + "$ref": "http://asyncapi.com/definitions/3.0.0/multiFormatSchema.json" + }, + "else": { + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" + }, + "description": "An object representing either a schema or a multiFormatSchema based on the existence of the 'schema' property. If the property 'schema' is present, use the multi-format schema. Use the default AsyncAPI Schema otherwise." + }, + "http://asyncapi.com/definitions/3.0.0/multiFormatSchema.json": { + "$id": "http://asyncapi.com/definitions/3.0.0/multiFormatSchema.json", + "if": { + "not": { + "type": "object" + } + }, + "then": { + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" + }, + "else": { + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" } }, - { - "if": { - "required": [ - "schemaFormat" - ], - "properties": { - "schemaFormat": { - "enum": [ - "application/vnd.aai.asyncapi;version=2.0.0", - "application/vnd.aai.asyncapi+json;version=2.0.0", - "application/vnd.aai.asyncapi+yaml;version=2.0.0", - "application/vnd.aai.asyncapi;version=2.1.0", - "application/vnd.aai.asyncapi+json;version=2.1.0", - "application/vnd.aai.asyncapi+yaml;version=2.1.0", - "application/vnd.aai.asyncapi;version=2.2.0", - "application/vnd.aai.asyncapi+json;version=2.2.0", - "application/vnd.aai.asyncapi+yaml;version=2.2.0", - "application/vnd.aai.asyncapi;version=2.3.0", - "application/vnd.aai.asyncapi+json;version=2.3.0", - "application/vnd.aai.asyncapi+yaml;version=2.3.0", - "application/vnd.aai.asyncapi;version=2.4.0", - "application/vnd.aai.asyncapi+json;version=2.4.0", - "application/vnd.aai.asyncapi+yaml;version=2.4.0", - "application/vnd.aai.asyncapi;version=2.5.0", - "application/vnd.aai.asyncapi+json;version=2.5.0", - "application/vnd.aai.asyncapi+yaml;version=2.5.0", - "application/vnd.aai.asyncapi;version=2.6.0", - "application/vnd.aai.asyncapi+json;version=2.6.0", - "application/vnd.aai.asyncapi+yaml;version=2.6.0", - "application/vnd.aai.asyncapi;version=3.0.0", - "application/vnd.aai.asyncapi+json;version=3.0.0", - "application/vnd.aai.asyncapi+yaml;version=3.0.0" - ] - } - } + "properties": { + "schemaFormat": { + "type": "string" }, - "then": { - "properties": { - "payload": { - "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" - } - } - } + "schema": {} }, - { - "if": { - "required": [ - "schemaFormat" - ], - "properties": { - "schemaFormat": { - "enum": [ - "application/schema+json;version=draft-07", - "application/schema+yaml;version=draft-07" + "allOf": [ + { + "if": { + "not": { + "required": [ + "schemaFormat" ] } - } - }, - "then": { - "properties": { - "payload": { - "$ref": "http://json-schema.org/draft-07/schema" - } - } - } - }, - { - "if": { - "required": [ - "schemaFormat" - ], - "properties": { - "schemaFormat": { - "enum": [ - "application/vnd.oai.openapi;version=3.0.0", - "application/vnd.oai.openapi+json;version=3.0.0", - "application/vnd.oai.openapi+yaml;version=3.0.0" - ] + }, + "then": { + "properties": { + "schema": { + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" + } } } }, - "then": { - "properties": { - "payload": { - "$ref": "http://asyncapi.com/definitions/3.0.0/openapiSchema_3_0.json" - } - } - } - }, - { - "if": { - "required": [ - "schemaFormat" - ], - "properties": { - "schemaFormat": { - "enum": [ - "application/vnd.apache.avro;version=1.9.0", - "application/vnd.apache.avro+json;version=1.9.0", - "application/vnd.apache.avro+yaml;version=1.9.0" - ] + { + "if": { + "required": [ + "schemaFormat" + ], + "properties": { + "schemaFormat": { + "enum": [ + "application/vnd.aai.asyncapi;version=2.0.0", + "application/vnd.aai.asyncapi+json;version=2.0.0", + "application/vnd.aai.asyncapi+yaml;version=2.0.0", + "application/vnd.aai.asyncapi;version=2.1.0", + "application/vnd.aai.asyncapi+json;version=2.1.0", + "application/vnd.aai.asyncapi+yaml;version=2.1.0", + "application/vnd.aai.asyncapi;version=2.2.0", + "application/vnd.aai.asyncapi+json;version=2.2.0", + "application/vnd.aai.asyncapi+yaml;version=2.2.0", + "application/vnd.aai.asyncapi;version=2.3.0", + "application/vnd.aai.asyncapi+json;version=2.3.0", + "application/vnd.aai.asyncapi+yaml;version=2.3.0", + "application/vnd.aai.asyncapi;version=2.4.0", + "application/vnd.aai.asyncapi+json;version=2.4.0", + "application/vnd.aai.asyncapi+yaml;version=2.4.0", + "application/vnd.aai.asyncapi;version=2.5.0", + "application/vnd.aai.asyncapi+json;version=2.5.0", + "application/vnd.aai.asyncapi+yaml;version=2.5.0", + "application/vnd.aai.asyncapi;version=2.6.0", + "application/vnd.aai.asyncapi+json;version=2.6.0", + "application/vnd.aai.asyncapi+yaml;version=2.6.0", + "application/vnd.aai.asyncapi;version=3.0.0", + "application/vnd.aai.asyncapi+json;version=3.0.0", + "application/vnd.aai.asyncapi+yaml;version=3.0.0" + ] + } } - } - }, - "then": { - "properties": { - "payload": { - "$ref": "http://asyncapi.com/definitions/3.0.0/avroSchema_v1.json" + }, + "then": { + "properties": { + "schema": { + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" + } } } - } - } - ] - }, - "http://asyncapi.com/definitions/3.0.0/correlationId.json": { - "$id": "http://asyncapi.com/definitions/3.0.0/correlationId.json", - "type": "object", - "required": [ - "location" - ], - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" - } - }, - "properties": { - "description": { - "type": "string", - "description": "A optional description of the correlation ID. GitHub Flavored Markdown is allowed." - }, - "location": { - "type": "string", - "description": "A runtime expression that specifies the location of the correlation ID", - "pattern": "^\\$message\\.(header|payload)#(\\/(([^\\/~])|(~[01]))*)*" - } - } - }, - "http://asyncapi.com/definitions/3.0.0/messageBindingsObject.json": { - "$id": "http://asyncapi.com/definitions/3.0.0/messageBindingsObject.json", - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" - } - }, - "properties": { - "http": { - "properties": { - "bindingVersion": { - "enum": [ - "0.1.0" - ] - } }, - "allOf": [ - { - "description": "If no bindingVersion specified, use the latest binding", - "if": { - "not": { - "required": [ - "bindingVersion" + { + "if": { + "required": [ + "schemaFormat" + ], + "properties": { + "schemaFormat": { + "enum": [ + "application/schema+json;version=draft-07", + "application/schema+yaml;version=draft-07" ] } - }, - "then": { - "$ref": "http://asyncapi.com/bindings/http/0.1.0/message.json" } }, - { - "if": { - "required": [ - "bindingVersion" - ], - "properties": { - "bindingVersion": { - "const": "0.1.0" - } + "then": { + "properties": { + "schema": { + "$ref": "http://json-schema.org/draft-07/schema" } - }, - "then": { - "$ref": "http://asyncapi.com/bindings/http/0.1.0/message.json" } } - ] - }, - "ws": {}, - "amqp": { - "properties": { - "bindingVersion": { - "enum": [ - "0.2.0" - ] - } }, - "allOf": [ - { - "description": "If no bindingVersion specified, use the latest binding", - "if": { - "not": { - "required": [ - "bindingVersion" + { + "if": { + "required": [ + "schemaFormat" + ], + "properties": { + "schemaFormat": { + "enum": [ + "application/vnd.oai.openapi;version=3.0.0", + "application/vnd.oai.openapi+json;version=3.0.0", + "application/vnd.oai.openapi+yaml;version=3.0.0" ] } - }, - "then": { - "$ref": "http://asyncapi.com/bindings/amqp/0.2.0/message.json" } }, - { - "if": { - "required": [ - "bindingVersion" - ], - "properties": { - "bindingVersion": { - "const": "0.2.0" - } + "then": { + "properties": { + "schema": { + "$ref": "http://asyncapi.com/definitions/3.0.0/openapiSchema_3_0.json" } - }, - "then": { - "$ref": "http://asyncapi.com/bindings/amqp/0.2.0/message.json" } } - ] - }, - "amqp1": {}, - "mqtt": { - "properties": { - "bindingVersion": { - "enum": [ - "0.1.0" - ] - } }, - "allOf": [ - { - "description": "If no bindingVersion specified, use the latest binding", - "if": { - "not": { - "required": [ - "bindingVersion" + { + "if": { + "required": [ + "schemaFormat" + ], + "properties": { + "schemaFormat": { + "enum": [ + "application/vnd.apache.avro;version=1.9.0", + "application/vnd.apache.avro+json;version=1.9.0", + "application/vnd.apache.avro+yaml;version=1.9.0" ] } - }, - "then": { - "$ref": "http://asyncapi.com/bindings/mqtt/0.1.0/message.json" } }, - { - "if": { - "required": [ - "bindingVersion" - ], - "properties": { - "bindingVersion": { - "const": "0.1.0" - } + "then": { + "properties": { + "schema": { + "$ref": "http://asyncapi.com/definitions/3.0.0/avroSchema_v1.json" } - }, - "then": { - "$ref": "http://asyncapi.com/bindings/mqtt/0.1.0/message.json" } } - ] - }, - "mqtt5": {}, - "kafka": { + } + ] + } + }, + "http://asyncapi.com/definitions/3.0.0/openapiSchema_3_0.json": { + "$id": "http://asyncapi.com/definitions/3.0.0/openapiSchema_3_0.json", + "type": "object", + "definitions": { + "ExternalDocumentation": { + "type": "object", + "required": [ + "url" + ], "properties": { - "bindingVersion": { - "enum": [ - "0.4.0", - "0.3.0", - "0.1.0" - ] - } - }, - "allOf": [ - { - "description": "If no bindingVersion specified, use the latest binding", - "if": { - "not": { - "required": [ - "bindingVersion" - ] - } - }, - "then": { - "$ref": "http://asyncapi.com/bindings/kafka/0.4.0/message.json" - } - }, - { - "if": { - "required": [ - "bindingVersion" - ], - "properties": { - "bindingVersion": { - "const": "0.4.0" - } - } - }, - "then": { - "$ref": "http://asyncapi.com/bindings/kafka/0.4.0/message.json" - } - }, - { - "if": { - "required": [ - "bindingVersion" - ], - "properties": { - "bindingVersion": { - "const": "0.3.0" - } - } - }, - "then": { - "$ref": "http://asyncapi.com/bindings/kafka/0.3.0/message.json" - } + "description": { + "type": "string" }, - { - "if": { - "required": [ - "bindingVersion" - ], - "properties": { - "bindingVersion": { - "const": "0.1.0" - } - } - }, - "then": { - "$ref": "http://asyncapi.com/bindings/kafka/0.1.0/message.json" - } + "url": { + "type": "string", + "format": "uri-reference" } - ] + }, + "patternProperties": { + "^x-": {} + }, + "additionalProperties": false }, - "anypointmq": { + "Discriminator": { + "type": "object", + "required": [ + "propertyName" + ], "properties": { - "bindingVersion": { - "enum": [ - "0.0.1" - ] - } - }, - "allOf": [ - { - "description": "If no bindingVersion specified, use the latest binding", - "if": { - "not": { - "required": [ - "bindingVersion" - ] - } - }, - "then": { - "$ref": "http://asyncapi.com/bindings/anypointmq/0.0.1/message.json" - } + "propertyName": { + "type": "string" }, - { - "if": { - "required": [ - "bindingVersion" - ], - "properties": { - "bindingVersion": { - "const": "0.0.1" - } - } - }, - "then": { - "$ref": "http://asyncapi.com/bindings/anypointmq/0.0.1/message.json" + "mapping": { + "type": "object", + "additionalProperties": { + "type": "string" } } - ] + } }, - "nats": {}, - "jms": {}, - "sns": {}, - "sqs": {}, - "stomp": {}, - "redis": {}, - "ibmmq": { - "properties": { - "bindingVersion": { - "enum": [ - "0.1.0" - ] - } - }, - "allOf": [ - { - "description": "If no bindingVersion specified, use the latest binding", - "if": { - "not": { - "required": [ - "bindingVersion" - ] - } - }, - "then": { - "$ref": "http://asyncapi.com/bindings/ibmmq/0.1.0/message.json" - } - }, - { - "if": { - "required": [ - "bindingVersion" - ], - "properties": { - "bindingVersion": { - "const": "0.1.0" - } - } - }, - "then": { - "$ref": "http://asyncapi.com/bindings/ibmmq/0.1.0/message.json" - } + "Reference": { + "type": "object", + "required": [ + "$ref" + ], + "patternProperties": { + "^\\$ref$": { + "type": "string", + "format": "uri-reference" } - ] + } }, - "solace": {}, - "googlepubsub": { + "XML": { + "type": "object", "properties": { - "bindingVersion": { - "enum": [ - "0.1.0" - ] - } - }, - "allOf": [ - { - "description": "If no bindingVersion specified, use the latest binding", - "if": { - "not": { - "required": [ - "bindingVersion" - ] - } - }, - "then": { - "$ref": "http://asyncapi.com/bindings/googlepubsub/0.1.0/message.json" - } + "name": { + "type": "string" }, - { - "if": { - "required": [ - "bindingVersion" - ], - "properties": { - "bindingVersion": { - "const": "0.1.0" - } - } - }, - "then": { - "$ref": "http://asyncapi.com/bindings/googlepubsub/0.1.0/message.json" - } + "namespace": { + "type": "string", + "format": "uri" + }, + "prefix": { + "type": "string" + }, + "attribute": { + "type": "boolean", + "default": false + }, + "wrapped": { + "type": "boolean", + "default": false } - ] - } - } - }, - "http://asyncapi.com/bindings/http/0.1.0/message.json": { - "$id": "http://asyncapi.com/bindings/http/0.1.0/message.json", - "title": "HTTP message bindings object", - "description": "This object contains information about the message representation in HTTP.", - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + }, + "patternProperties": { + "^x-": {} + }, + "additionalProperties": false } }, "properties": { - "headers": { - "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json", - "description": "\tA Schema object containing the definitions for HTTP-specific headers. This schema MUST be of type 'object' and have a 'properties' key." + "title": { + "type": "string" }, - "bindingVersion": { - "type": "string", - "enum": [ - "0.1.0" - ], - "description": "The version of this binding. If omitted, \"latest\" MUST be assumed." - } - }, - "examples": [ - { - "headers": { - "type": "object", - "properties": { - "Content-Type": { - "type": "string", - "enum": [ - "application/json" - ] - } - } - }, - "bindingVersion": "0.1.0" - } - ] - }, - "http://asyncapi.com/bindings/amqp/0.2.0/message.json": { - "$id": "http://asyncapi.com/bindings/amqp/0.2.0/message.json", - "title": "AMQP message bindings object", - "description": "This object contains information about the message representation in AMQP.", - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" - } - }, - "properties": { - "contentEncoding": { - "type": "string", - "description": "A MIME encoding for the message content." + "multipleOf": { + "type": "number", + "exclusiveMinimum": 0 }, - "messageType": { - "type": "string", - "description": "Application-specific message type." + "maximum": { + "type": "number" }, - "bindingVersion": { - "type": "string", - "enum": [ - "0.2.0" - ], - "description": "The version of this binding. If omitted, \"latest\" MUST be assumed." - } - }, - "examples": [ - { - "contentEncoding": "gzip", - "messageType": "user.signup", - "bindingVersion": "0.2.0" - } - ] - }, - "http://asyncapi.com/bindings/mqtt/0.1.0/message.json": { - "$id": "http://asyncapi.com/bindings/mqtt/0.1.0/message.json", - "title": "MQTT message bindings object", - "description": "This object contains information about the message representation in MQTT.", - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" - } - }, - "properties": { - "bindingVersion": { - "type": "string", - "enum": [ - "0.1.0" - ], - "description": "The version of this binding. If omitted, 'latest' MUST be assumed." - } - }, - "examples": [ - { - "bindingVersion": "0.1.0" - } - ] - }, - "http://asyncapi.com/bindings/kafka/0.4.0/message.json": { - "$id": "http://asyncapi.com/bindings/kafka/0.4.0/message.json", - "title": "Message Schema", - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" - } - }, - "properties": { - "key": { - "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json", - "description": "The message key." + "exclusiveMaximum": { + "type": "boolean", + "default": false }, - "schemaIdLocation": { - "type": "string", - "description": "If a Schema Registry is used when performing this operation, tells where the id of schema is stored.", - "enum": [ - "header", - "payload" - ] + "minimum": { + "type": "number" }, - "schemaIdPayloadEncoding": { - "type": "string", - "description": "Number of bytes or vendor specific values when schema id is encoded in payload." + "exclusiveMinimum": { + "type": "boolean", + "default": false }, - "schemaLookupStrategy": { - "type": "string", - "description": "Freeform string for any naming strategy class to use. Clients should default to the vendor default if not supplied." + "maxLength": { + "type": "integer", + "minimum": 0 }, - "bindingVersion": { + "minLength": { + "type": "integer", + "minimum": 0, + "default": 0 + }, + "pattern": { "type": "string", - "enum": [ - "0.4.0" - ], - "description": "The version of this binding. If omitted, 'latest' MUST be assumed." - } - }, - "examples": [ - { - "key": { - "type": "string", - "enum": [ - "myKey" - ] - }, - "schemaIdLocation": "payload", - "schemaIdPayloadEncoding": "apicurio-new", - "schemaLookupStrategy": "TopicIdStrategy", - "bindingVersion": "0.4.0" + "format": "regex" }, - { - "key": { - "$ref": "path/to/user-create.avsc#/UserCreate" + "maxItems": { + "type": "integer", + "minimum": 0 + }, + "minItems": { + "type": "integer", + "minimum": 0, + "default": 0 + }, + "uniqueItems": { + "type": "boolean", + "default": false + }, + "maxProperties": { + "type": "integer", + "minimum": 0 + }, + "minProperties": { + "type": "integer", + "minimum": 0, + "default": 0 + }, + "required": { + "type": "array", + "items": { + "type": "string" }, - "schemaIdLocation": "payload", - "schemaIdPayloadEncoding": "4", - "bindingVersion": "0.4.0" - } - ] - }, - "http://asyncapi.com/bindings/kafka/0.3.0/message.json": { - "$id": "http://asyncapi.com/bindings/kafka/0.3.0/message.json", - "title": "Message Schema", - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" - } - }, - "properties": { - "key": { - "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json", - "description": "The message key." + "minItems": 1, + "uniqueItems": true }, - "schemaIdLocation": { + "enum": { + "type": "array", + "items": true, + "minItems": 1, + "uniqueItems": false + }, + "type": { "type": "string", - "description": "If a Schema Registry is used when performing this operation, tells where the id of schema is stored.", "enum": [ - "header", - "payload" + "array", + "boolean", + "integer", + "number", + "object", + "string" ] }, - "schemaIdPayloadEncoding": { - "type": "string", - "description": "Number of bytes or vendor specific values when schema id is encoded in payload." - }, - "schemaLookupStrategy": { - "type": "string", - "description": "Freeform string for any naming strategy class to use. Clients should default to the vendor default if not supplied." + "not": { + "oneOf": [ + { + "$ref": "#" + }, + { + "$ref": "#/definitions/Reference" + } + ] }, - "bindingVersion": { - "type": "string", - "enum": [ - "0.3.0" - ], - "description": "The version of this binding. If omitted, 'latest' MUST be assumed." - } - }, - "examples": [ - { - "key": { - "type": "string", - "enum": [ - "myKey" + "allOf": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#" + }, + { + "$ref": "#/definitions/Reference" + } ] - }, - "schemaIdLocation": "payload", - "schemaIdPayloadEncoding": "apicurio-new", - "schemaLookupStrategy": "TopicIdStrategy", - "bindingVersion": "0.3.0" + } }, - { - "key": { - "$ref": "path/to/user-create.avsc#/UserCreate" - }, - "schemaIdLocation": "payload", - "schemaIdPayloadEncoding": "4", - "bindingVersion": "0.3.0" - } - ] - }, - "http://asyncapi.com/bindings/kafka/0.1.0/message.json": { - "$id": "http://asyncapi.com/bindings/kafka/0.1.0/message.json", - "title": "Kafka message bindings object", - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" - } - }, - "properties": { - "key": { - "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json", - "description": "The message key." + "oneOf": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#" + }, + { + "$ref": "#/definitions/Reference" + } + ] + } }, - "bindingVersion": { - "type": "string", - "enum": [ - "0.1.0" - ], - "description": "The version of this binding. If omitted, 'latest' MUST be assumed." - } - }, - "examples": [ - { - "key": { - "type": "string", - "enum": [ - "myKey" + "anyOf": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#" + }, + { + "$ref": "#/definitions/Reference" + } ] - }, - "bindingVersion": "0.1.0" + } }, - { - "key": { - "$ref": "path/to/user-create.avsc#/UserCreate" - }, - "bindingVersion": "0.2.0" - } - ] - }, - "http://asyncapi.com/bindings/anypointmq/0.0.1/message.json": { - "$id": "http://asyncapi.com/bindings/anypointmq/0.0.1/message.json", - "title": "Anypoint MQ message bindings object", - "description": "This object contains configuration for describing an Anypoint MQ message as an AsyncAPI message. This objects only contains configuration that can not be provided in the AsyncAPI standard message object.", - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" - } - }, - "properties": { - "headers": { - "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json", - "description": "A Schema object containing the definitions for Anypoint MQ-specific headers (protocol headers). This schema MUST be of type 'object' and have a 'properties' key. Examples of Anypoint MQ protocol headers are 'messageId' and 'messageGroupId'." + "items": { + "oneOf": [ + { + "$ref": "#" + }, + { + "$ref": "#/definitions/Reference" + } + ] }, - "bindingVersion": { - "type": "string", - "enum": [ - "0.0.1" - ], - "description": "The version of this binding. If omitted, 'latest' MUST be assumed." - } - }, - "examples": [ - { - "headers": { - "type": "object", - "properties": { - "messageId": { - "type": "string" + "properties": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "$ref": "#" + }, + { + "$ref": "#/definitions/Reference" } + ] + } + }, + "additionalProperties": { + "oneOf": [ + { + "$ref": "#" + }, + { + "$ref": "#/definitions/Reference" + }, + { + "type": "boolean" } - }, - "bindingVersion": "0.0.1" - } - ] - }, - "http://asyncapi.com/bindings/ibmmq/0.1.0/message.json": { - "$id": "http://asyncapi.com/bindings/ibmmq/0.1.0/message.json", - "title": "IBM MQ message bindings object", - "description": "This object contains information about the message representation in IBM MQ.", - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" - } - }, - "properties": { - "type": { - "type": "string", - "enum": [ - "string", - "jms", - "binary" ], - "default": "string", - "description": "The type of the message." - }, - "headers": { - "type": "string", - "description": "Defines the IBM MQ message headers to include with this message. More than one header can be specified as a comma separated list. Supporting information on IBM MQ message formats can be found on this [page](https://www.ibm.com/docs/en/ibm-mq/9.2?topic=mqmd-format-mqchar8) in the IBM MQ Knowledge Center." + "default": true }, "description": { - "type": "string", - "description": "Provides additional information for application developers: describes the message type or format." + "type": "string" }, - "expiry": { - "type": "integer", - "minimum": 0, - "default": 0, - "description": "The recommended setting the client should use for the TTL (Time-To-Live) of the message. This is a period of time expressed in milliseconds and set by the application that puts the message. 'expiry' values are API dependant e.g., MQI and JMS use different units of time and default values for 'unlimited'. General information on IBM MQ message expiry can be found on this [page](https://www.ibm.com/docs/en/ibm-mq/9.2?topic=mqmd-expiry-mqlong) in the IBM MQ Knowledge Center." + "format": { + "type": "string" }, - "bindingVersion": { - "type": "string", - "enum": [ - "0.1.0" - ], - "description": "The version of this binding." + "default": true, + "nullable": { + "type": "boolean", + "default": false + }, + "discriminator": { + "$ref": "#/definitions/Discriminator" + }, + "readOnly": { + "type": "boolean", + "default": false + }, + "writeOnly": { + "type": "boolean", + "default": false + }, + "example": true, + "externalDocs": { + "$ref": "#/definitions/ExternalDocumentation" + }, + "deprecated": { + "type": "boolean", + "default": false + }, + "xml": { + "$ref": "#/definitions/XML" } }, - "oneOf": [ - { - "properties": { - "type": { - "const": "binary" + "patternProperties": { + "^x-": true + }, + "additionalProperties": false + }, + "http://asyncapi.com/definitions/3.0.0/avroSchema_v1.json": { + "$id": "http://asyncapi.com/definitions/3.0.0/avroSchema_v1.json", + "definitions": { + "avroSchema": { + "title": "Avro Schema", + "description": "Root Schema", + "oneOf": [ + { + "$ref": "#/definitions/types" } - } + ] }, - { - "properties": { - "type": { - "const": "jms" - } - }, - "not": { - "required": [ - "headers" - ] - } + "types": { + "title": "Avro Types", + "description": "Allowed Avro types", + "oneOf": [ + { + "$ref": "#/definitions/primitiveType" + }, + { + "$ref": "#/definitions/primitiveTypeWithMetadata" + }, + { + "$ref": "#/definitions/customTypeReference" + }, + { + "$ref": "#/definitions/avroRecord" + }, + { + "$ref": "#/definitions/avroEnum" + }, + { + "$ref": "#/definitions/avroArray" + }, + { + "$ref": "#/definitions/avroMap" + }, + { + "$ref": "#/definitions/avroFixed" + }, + { + "$ref": "#/definitions/avroUnion" + } + ] }, - { + "primitiveType": { + "title": "Primitive Type", + "description": "Basic type primitives.", + "type": "string", + "enum": [ + "null", + "boolean", + "int", + "long", + "float", + "double", + "bytes", + "string" + ] + }, + "primitiveTypeWithMetadata": { + "title": "Primitive Type With Metadata", + "description": "A primitive type with metadata attached.", + "type": "object", "properties": { "type": { - "const": "string" + "$ref": "#/definitions/primitiveType" } }, - "not": { - "required": [ - "headers" - ] - } - } - ], - "examples": [ - { - "type": "string", - "bindingVersion": "0.1.0" + "required": [ + "type" + ] }, - { - "type": "jms", - "description": "JMS stream message", - "bindingVersion": "0.1.0" - } - ] - }, - "http://asyncapi.com/bindings/googlepubsub/0.1.0/message.json": { - "$id": "http://asyncapi.com/bindings/googlepubsub/0.1.0/message.json", - "title": "Cloud Pub/Sub Channel Schema", - "description": "This object contains information about the message representation for Google Cloud Pub/Sub.", - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" - } - }, - "properties": { - "bindingVersion": { + "customTypeReference": { + "title": "Custom Type", + "description": "Reference to a ComplexType", + "not": { + "$ref": "#/definitions/primitiveType" + }, "type": "string", - "enum": [ - "0.1.0" - ], - "description": "The version of this binding." - }, - "attributes": { - "type": "object" + "pattern": "^[A-Za-z_][A-Za-z0-9_]*(\\.[A-Za-z_][A-Za-z0-9_]*)*$" }, - "orderingKey": { - "type": "string" + "avroUnion": { + "title": "Union", + "description": "A Union of types", + "type": "array", + "items": { + "$ref": "#/definitions/avroSchema" + }, + "minItems": 1 }, - "schema": { + "avroField": { + "title": "Field", + "description": "A field within a Record", "type": "object", - "additionalItems": false, "properties": { "name": { - "type": "string" + "$ref": "#/definitions/name" }, "type": { + "$ref": "#/definitions/types" + }, + "doc": { "type": "string" + }, + "default": true, + "order": { + "enum": [ + "ascending", + "descending", + "ignore" + ] + }, + "aliases": { + "type": "array", + "items": { + "$ref": "#/definitions/name" + } } }, "required": [ "name", "type" ] - } - }, - "examples": [ - { - "schema": { - "name": "projects/your-project-id/schemas/your-avro-schema-id", - "type": "avro" - } - }, - { - "schema": { - "name": "projects/your-project-id/schemas/your-protobuf-schema-id", - "type": "protobuf" - } - } - ] - }, - "http://asyncapi.com/definitions/3.0.0/messageTrait.json": { - "$id": "http://asyncapi.com/definitions/3.0.0/messageTrait.json", - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" - } - }, - "properties": { - "schemaFormat": { - "type": "string" - }, - "contentType": { - "type": "string" }, - "headers": { - "allOf": [ - { - "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" + "avroRecord": { + "title": "Record", + "description": "A Record", + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "record" }, - { - "properties": { - "type": { - "const": "object" - } + "name": { + "$ref": "#/definitions/name" + }, + "namespace": { + "$ref": "#/definitions/namespace" + }, + "doc": { + "type": "string" + }, + "aliases": { + "type": "array", + "items": { + "$ref": "#/definitions/name" + } + }, + "fields": { + "type": "array", + "items": { + "$ref": "#/definitions/avroField" } } + }, + "required": [ + "type", + "name", + "fields" ] }, - "messageId": { - "type": "string" - }, - "correlationId": { - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + "avroEnum": { + "title": "Enum", + "description": "An enumeration", + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "enum" }, - { - "$ref": "http://asyncapi.com/definitions/3.0.0/correlationId.json" + "name": { + "$ref": "#/definitions/name" + }, + "namespace": { + "$ref": "#/definitions/namespace" + }, + "doc": { + "type": "string" + }, + "aliases": { + "type": "array", + "items": { + "$ref": "#/definitions/name" + } + }, + "symbols": { + "type": "array", + "items": { + "$ref": "#/definitions/name" + } } + }, + "required": [ + "type", + "name", + "symbols" ] }, - "tags": { - "type": "array", - "items": { - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" - }, - { - "$ref": "http://asyncapi.com/definitions/3.0.0/tag.json" - } - ] - }, - "uniqueItems": true - }, - "summary": { - "type": "string", - "description": "A brief summary of the message." - }, - "name": { - "type": "string", - "description": "Name of the message." - }, - "title": { - "type": "string", - "description": "A human-friendly title for the message." - }, - "description": { - "type": "string", - "description": "A longer description of the message. CommonMark is allowed." - }, - "externalDocs": { - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" - }, - { - "$ref": "http://asyncapi.com/definitions/3.0.0/externalDocs.json" - } - ] - }, - "deprecated": { - "type": "boolean", - "default": false - }, - "examples": { - "type": "array", - "items": { - "type": "object" - } - }, - "bindings": { - "$ref": "http://asyncapi.com/definitions/3.0.0/messageBindingsObject.json" - } - } - }, - "http://asyncapi.com/definitions/3.0.0/openapiSchema_3_0.json": { - "$id": "http://asyncapi.com/definitions/3.0.0/openapiSchema_3_0.json", - "type": "object", - "definitions": { - "ExternalDocumentation": { + "avroArray": { + "title": "Array", + "description": "An array", "type": "object", - "required": [ - "url" - ], "properties": { - "description": { + "type": { + "type": "string", + "const": "array" + }, + "name": { + "$ref": "#/definitions/name" + }, + "namespace": { + "$ref": "#/definitions/namespace" + }, + "doc": { "type": "string" }, - "url": { - "type": "string", - "format": "uri-reference" + "aliases": { + "type": "array", + "items": { + "$ref": "#/definitions/name" + } + }, + "items": { + "$ref": "#/definitions/types" } }, - "patternProperties": { - "^x-": {} - }, - "additionalProperties": false + "required": [ + "type", + "items" + ] }, - "Discriminator": { + "avroMap": { + "title": "Map", + "description": "A map of values", "type": "object", - "required": [ - "propertyName" - ], "properties": { - "propertyName": { + "type": { + "type": "string", + "const": "map" + }, + "name": { + "$ref": "#/definitions/name" + }, + "namespace": { + "$ref": "#/definitions/namespace" + }, + "doc": { "type": "string" }, - "mapping": { - "type": "object", - "additionalProperties": { - "type": "string" + "aliases": { + "type": "array", + "items": { + "$ref": "#/definitions/name" } + }, + "values": { + "$ref": "#/definitions/types" } - } - }, - "Reference": { - "type": "object", + }, "required": [ - "$ref" - ], - "patternProperties": { - "^\\$ref$": { - "type": "string", - "format": "uri-reference" - } - } + "type", + "values" + ] }, - "XML": { + "avroFixed": { + "title": "Fixed", + "description": "A fixed sized array of bytes", "type": "object", "properties": { + "type": { + "type": "string", + "const": "fixed" + }, "name": { - "type": "string" + "$ref": "#/definitions/name" }, "namespace": { - "type": "string", - "format": "uri" + "$ref": "#/definitions/namespace" }, - "prefix": { + "doc": { "type": "string" }, - "attribute": { - "type": "boolean", - "default": false + "aliases": { + "type": "array", + "items": { + "$ref": "#/definitions/name" + } }, - "wrapped": { - "type": "boolean", - "default": false + "size": { + "type": "number" } }, - "patternProperties": { - "^x-": {} - }, - "additionalProperties": false + "required": [ + "type", + "name", + "size" + ] + }, + "name": { + "type": "string", + "pattern": "^[A-Za-z_][A-Za-z0-9_]*$" + }, + "namespace": { + "type": "string", + "pattern": "^([A-Za-z_][A-Za-z0-9_]*(\\.[A-Za-z_][A-Za-z0-9_]*)*)*$" + } + }, + "description": "Json-Schema definition for Avro AVSC files.", + "oneOf": [ + { + "$ref": "#/definitions/avroSchema" + } + ], + "title": "Avro Schema Definition" + }, + "http://asyncapi.com/definitions/3.0.0/correlationId.json": { + "$id": "http://asyncapi.com/definitions/3.0.0/correlationId.json", + "type": "object", + "required": [ + "location" + ], + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" } }, "properties": { - "title": { - "type": "string" - }, - "multipleOf": { - "type": "number", - "exclusiveMinimum": 0 - }, - "maximum": { - "type": "number" - }, - "exclusiveMaximum": { - "type": "boolean", - "default": false - }, - "minimum": { - "type": "number" - }, - "exclusiveMinimum": { - "type": "boolean", - "default": false - }, - "maxLength": { - "type": "integer", - "minimum": 0 - }, - "minLength": { - "type": "integer", - "minimum": 0, - "default": 0 - }, - "pattern": { + "description": { "type": "string", - "format": "regex" - }, - "maxItems": { - "type": "integer", - "minimum": 0 - }, - "minItems": { - "type": "integer", - "minimum": 0, - "default": 0 - }, - "uniqueItems": { - "type": "boolean", - "default": false + "description": "A optional description of the correlation ID. GitHub Flavored Markdown is allowed." }, - "maxProperties": { - "type": "integer", - "minimum": 0 - }, - "minProperties": { - "type": "integer", - "minimum": 0, - "default": 0 - }, - "required": { - "type": "array", - "items": { - "type": "string" - }, - "minItems": 1, - "uniqueItems": true - }, - "enum": { - "type": "array", - "items": true, - "minItems": 1, - "uniqueItems": false - }, - "type": { + "location": { "type": "string", - "enum": [ - "array", - "boolean", - "integer", - "number", - "object", - "string" - ] - }, - "not": { - "oneOf": [ + "description": "A runtime expression that specifies the location of the correlation ID", + "pattern": "^\\$message\\.(header|payload)#(\\/(([^\\/~])|(~[01]))*)*" + } + } + }, + "http://asyncapi.com/definitions/3.0.0/messageBindingsObject.json": { + "$id": "http://asyncapi.com/definitions/3.0.0/messageBindingsObject.json", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "properties": { + "http": { + "properties": { + "bindingVersion": { + "enum": [ + "0.1.0" + ] + } + }, + "allOf": [ { - "$ref": "#" + "description": "If no bindingVersion specified, use the latest binding", + "if": { + "not": { + "required": [ + "bindingVersion" + ] + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/http/0.1.0/message.json" + } }, { - "$ref": "#/definitions/Reference" + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.1.0" + } + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/http/0.1.0/message.json" + } } ] }, - "allOf": { - "type": "array", - "items": { - "oneOf": [ - { - "$ref": "#" + "ws": {}, + "amqp": { + "properties": { + "bindingVersion": { + "enum": [ + "0.2.0" + ] + } + }, + "allOf": [ + { + "description": "If no bindingVersion specified, use the latest binding", + "if": { + "not": { + "required": [ + "bindingVersion" + ] + } }, - { - "$ref": "#/definitions/Reference" + "then": { + "$ref": "http://asyncapi.com/bindings/amqp/0.2.0/message.json" } - ] - } - }, - "oneOf": { - "type": "array", - "items": { - "oneOf": [ - { - "$ref": "#" + }, + { + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.2.0" + } + } }, - { - "$ref": "#/definitions/Reference" + "then": { + "$ref": "http://asyncapi.com/bindings/amqp/0.2.0/message.json" } - ] - } + } + ] }, - "anyOf": { - "type": "array", - "items": { - "oneOf": [ - { - "$ref": "#" + "amqp1": {}, + "mqtt": { + "properties": { + "bindingVersion": { + "enum": [ + "0.1.0" + ] + } + }, + "allOf": [ + { + "description": "If no bindingVersion specified, use the latest binding", + "if": { + "not": { + "required": [ + "bindingVersion" + ] + } }, - { - "$ref": "#/definitions/Reference" + "then": { + "$ref": "http://asyncapi.com/bindings/mqtt/0.1.0/message.json" } - ] - } - }, - "items": { - "oneOf": [ - { - "$ref": "#" }, { - "$ref": "#/definitions/Reference" + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.1.0" + } + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/mqtt/0.1.0/message.json" + } } ] }, - "properties": { - "type": "object", - "additionalProperties": { - "oneOf": [ - { - "$ref": "#" + "mqtt5": {}, + "kafka": { + "properties": { + "bindingVersion": { + "enum": [ + "0.4.0", + "0.3.0", + "0.1.0" + ] + } + }, + "allOf": [ + { + "description": "If no bindingVersion specified, use the latest binding", + "if": { + "not": { + "required": [ + "bindingVersion" + ] + } }, - { - "$ref": "#/definitions/Reference" + "then": { + "$ref": "http://asyncapi.com/bindings/kafka/0.4.0/message.json" } - ] - } - }, - "additionalProperties": { - "oneOf": [ + }, { - "$ref": "#" + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.4.0" + } + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/kafka/0.4.0/message.json" + } }, { - "$ref": "#/definitions/Reference" + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.3.0" + } + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/kafka/0.3.0/message.json" + } }, { - "type": "boolean" - } - ], - "default": true - }, - "description": { - "type": "string" - }, - "format": { - "type": "string" - }, - "default": true, - "nullable": { - "type": "boolean", - "default": false - }, - "discriminator": { - "$ref": "#/definitions/Discriminator" - }, - "readOnly": { - "type": "boolean", - "default": false - }, - "writeOnly": { - "type": "boolean", - "default": false - }, - "example": true, - "externalDocs": { - "$ref": "#/definitions/ExternalDocumentation" - }, - "deprecated": { - "type": "boolean", - "default": false - }, - "xml": { - "$ref": "#/definitions/XML" - } - }, - "patternProperties": { - "^x-": true - }, - "additionalProperties": false - }, - "http://asyncapi.com/definitions/3.0.0/avroSchema_v1.json": { - "$id": "http://asyncapi.com/definitions/3.0.0/avroSchema_v1.json", - "definitions": { - "avroSchema": { - "title": "Avro Schema", - "description": "Root Schema", - "oneOf": [ - { - "$ref": "#/definitions/types" + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.1.0" + } + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/kafka/0.1.0/message.json" + } } ] }, - "types": { - "title": "Avro Types", - "description": "Allowed Avro types", - "oneOf": [ - { - "$ref": "#/definitions/primitiveType" - }, - { - "$ref": "#/definitions/primitiveTypeWithMetadata" - }, - { - "$ref": "#/definitions/customTypeReference" - }, - { - "$ref": "#/definitions/avroRecord" - }, - { - "$ref": "#/definitions/avroEnum" - }, - { - "$ref": "#/definitions/avroArray" - }, - { - "$ref": "#/definitions/avroMap" - }, + "anypointmq": { + "properties": { + "bindingVersion": { + "enum": [ + "0.0.1" + ] + } + }, + "allOf": [ { - "$ref": "#/definitions/avroFixed" + "description": "If no bindingVersion specified, use the latest binding", + "if": { + "not": { + "required": [ + "bindingVersion" + ] + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/anypointmq/0.0.1/message.json" + } }, { - "$ref": "#/definitions/avroUnion" + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.0.1" + } + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/anypointmq/0.0.1/message.json" + } } ] }, - "primitiveType": { - "title": "Primitive Type", - "description": "Basic type primitives.", - "type": "string", - "enum": [ - "null", - "boolean", - "int", - "long", - "float", - "double", - "bytes", - "string" - ] - }, - "primitiveTypeWithMetadata": { - "title": "Primitive Type With Metadata", - "description": "A primitive type with metadata attached.", - "type": "object", + "nats": {}, + "jms": {}, + "sns": {}, + "sqs": {}, + "stomp": {}, + "redis": {}, + "ibmmq": { "properties": { - "type": { - "$ref": "#/definitions/primitiveType" + "bindingVersion": { + "enum": [ + "0.1.0" + ] } }, - "required": [ - "type" + "allOf": [ + { + "description": "If no bindingVersion specified, use the latest binding", + "if": { + "not": { + "required": [ + "bindingVersion" + ] + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/ibmmq/0.1.0/message.json" + } + }, + { + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.1.0" + } + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/ibmmq/0.1.0/message.json" + } + } ] }, - "customTypeReference": { - "title": "Custom Type", - "description": "Reference to a ComplexType", - "not": { - "$ref": "#/definitions/primitiveType" - }, - "type": "string", - "pattern": "^[A-Za-z_][A-Za-z0-9_]*(\\.[A-Za-z_][A-Za-z0-9_]*)*$" - }, - "avroUnion": { - "title": "Union", - "description": "A Union of types", - "type": "array", - "items": { - "$ref": "#/definitions/avroSchema" - }, - "minItems": 1 - }, - "avroField": { - "title": "Field", - "description": "A field within a Record", - "type": "object", + "solace": {}, + "googlepubsub": { "properties": { - "name": { - "$ref": "#/definitions/name" - }, - "type": { - "$ref": "#/definitions/types" - }, - "doc": { - "type": "string" - }, - "default": true, - "order": { + "bindingVersion": { "enum": [ - "ascending", - "descending", - "ignore" + "0.1.0" ] - }, - "aliases": { - "type": "array", - "items": { - "$ref": "#/definitions/name" - } } }, - "required": [ - "name", - "type" - ] - }, - "avroRecord": { - "title": "Record", - "description": "A Record", - "type": "object", - "properties": { - "type": { - "type": "string", - "const": "record" - }, - "name": { - "$ref": "#/definitions/name" - }, - "namespace": { - "$ref": "#/definitions/namespace" - }, - "doc": { - "type": "string" - }, - "aliases": { - "type": "array", - "items": { - "$ref": "#/definitions/name" + "allOf": [ + { + "description": "If no bindingVersion specified, use the latest binding", + "if": { + "not": { + "required": [ + "bindingVersion" + ] + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/googlepubsub/0.1.0/message.json" } }, - "fields": { - "type": "array", - "items": { - "$ref": "#/definitions/avroField" + { + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.1.0" + } + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/googlepubsub/0.1.0/message.json" } } - }, - "required": [ - "type", - "name", - "fields" ] + } + } + }, + "http://asyncapi.com/bindings/http/0.1.0/message.json": { + "$id": "http://asyncapi.com/bindings/http/0.1.0/message.json", + "title": "HTTP message bindings object", + "description": "This object contains information about the message representation in HTTP.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "properties": { + "headers": { + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json", + "description": "\tA Schema object containing the definitions for HTTP-specific headers. This schema MUST be of type 'object' and have a 'properties' key." }, - "avroEnum": { - "title": "Enum", - "description": "An enumeration", - "type": "object", - "properties": { - "type": { - "type": "string", - "const": "enum" - }, - "name": { - "$ref": "#/definitions/name" - }, - "namespace": { - "$ref": "#/definitions/namespace" - }, - "doc": { - "type": "string" - }, - "aliases": { - "type": "array", - "items": { - "$ref": "#/definitions/name" + "bindingVersion": { + "type": "string", + "enum": [ + "0.1.0" + ], + "description": "The version of this binding. If omitted, \"latest\" MUST be assumed." + } + }, + "examples": [ + { + "headers": { + "type": "object", + "properties": { + "Content-Type": { + "type": "string", + "enum": [ + "application/json" + ] } - }, - "symbols": { - "type": "array", - "items": { - "$ref": "#/definitions/name" + } + }, + "bindingVersion": "0.1.0" + } + ] + }, + "http://asyncapi.com/bindings/amqp/0.2.0/message.json": { + "$id": "http://asyncapi.com/bindings/amqp/0.2.0/message.json", + "title": "AMQP message bindings object", + "description": "This object contains information about the message representation in AMQP.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "properties": { + "contentEncoding": { + "type": "string", + "description": "A MIME encoding for the message content." + }, + "messageType": { + "type": "string", + "description": "Application-specific message type." + }, + "bindingVersion": { + "type": "string", + "enum": [ + "0.2.0" + ], + "description": "The version of this binding. If omitted, \"latest\" MUST be assumed." + } + }, + "examples": [ + { + "contentEncoding": "gzip", + "messageType": "user.signup", + "bindingVersion": "0.2.0" + } + ] + }, + "http://asyncapi.com/bindings/mqtt/0.1.0/message.json": { + "$id": "http://asyncapi.com/bindings/mqtt/0.1.0/message.json", + "title": "MQTT message bindings object", + "description": "This object contains information about the message representation in MQTT.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "properties": { + "bindingVersion": { + "type": "string", + "enum": [ + "0.1.0" + ], + "description": "The version of this binding. If omitted, 'latest' MUST be assumed." + } + }, + "examples": [ + { + "bindingVersion": "0.1.0" + } + ] + }, + "http://asyncapi.com/bindings/kafka/0.4.0/message.json": { + "$id": "http://asyncapi.com/bindings/kafka/0.4.0/message.json", + "title": "Message Schema", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "properties": { + "key": { + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json", + "description": "The message key." + }, + "schemaIdLocation": { + "type": "string", + "description": "If a Schema Registry is used when performing this operation, tells where the id of schema is stored.", + "enum": [ + "header", + "payload" + ] + }, + "schemaIdPayloadEncoding": { + "type": "string", + "description": "Number of bytes or vendor specific values when schema id is encoded in payload." + }, + "schemaLookupStrategy": { + "type": "string", + "description": "Freeform string for any naming strategy class to use. Clients should default to the vendor default if not supplied." + }, + "bindingVersion": { + "type": "string", + "enum": [ + "0.4.0" + ], + "description": "The version of this binding. If omitted, 'latest' MUST be assumed." + } + }, + "examples": [ + { + "key": { + "type": "string", + "enum": [ + "myKey" + ] + }, + "schemaIdLocation": "payload", + "schemaIdPayloadEncoding": "apicurio-new", + "schemaLookupStrategy": "TopicIdStrategy", + "bindingVersion": "0.4.0" + }, + { + "key": { + "$ref": "path/to/user-create.avsc#/UserCreate" + }, + "schemaIdLocation": "payload", + "schemaIdPayloadEncoding": "4", + "bindingVersion": "0.4.0" + } + ] + }, + "http://asyncapi.com/bindings/kafka/0.3.0/message.json": { + "$id": "http://asyncapi.com/bindings/kafka/0.3.0/message.json", + "title": "Message Schema", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "properties": { + "key": { + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json", + "description": "The message key." + }, + "schemaIdLocation": { + "type": "string", + "description": "If a Schema Registry is used when performing this operation, tells where the id of schema is stored.", + "enum": [ + "header", + "payload" + ] + }, + "schemaIdPayloadEncoding": { + "type": "string", + "description": "Number of bytes or vendor specific values when schema id is encoded in payload." + }, + "schemaLookupStrategy": { + "type": "string", + "description": "Freeform string for any naming strategy class to use. Clients should default to the vendor default if not supplied." + }, + "bindingVersion": { + "type": "string", + "enum": [ + "0.3.0" + ], + "description": "The version of this binding. If omitted, 'latest' MUST be assumed." + } + }, + "examples": [ + { + "key": { + "type": "string", + "enum": [ + "myKey" + ] + }, + "schemaIdLocation": "payload", + "schemaIdPayloadEncoding": "apicurio-new", + "schemaLookupStrategy": "TopicIdStrategy", + "bindingVersion": "0.3.0" + }, + { + "key": { + "$ref": "path/to/user-create.avsc#/UserCreate" + }, + "schemaIdLocation": "payload", + "schemaIdPayloadEncoding": "4", + "bindingVersion": "0.3.0" + } + ] + }, + "http://asyncapi.com/bindings/kafka/0.1.0/message.json": { + "$id": "http://asyncapi.com/bindings/kafka/0.1.0/message.json", + "title": "Kafka message bindings object", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "properties": { + "key": { + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json", + "description": "The message key." + }, + "bindingVersion": { + "type": "string", + "enum": [ + "0.1.0" + ], + "description": "The version of this binding. If omitted, 'latest' MUST be assumed." + } + }, + "examples": [ + { + "key": { + "type": "string", + "enum": [ + "myKey" + ] + }, + "bindingVersion": "0.1.0" + }, + { + "key": { + "$ref": "path/to/user-create.avsc#/UserCreate" + }, + "bindingVersion": "0.2.0" + } + ] + }, + "http://asyncapi.com/bindings/anypointmq/0.0.1/message.json": { + "$id": "http://asyncapi.com/bindings/anypointmq/0.0.1/message.json", + "title": "Anypoint MQ message bindings object", + "description": "This object contains configuration for describing an Anypoint MQ message as an AsyncAPI message. This objects only contains configuration that can not be provided in the AsyncAPI standard message object.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "properties": { + "headers": { + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json", + "description": "A Schema object containing the definitions for Anypoint MQ-specific headers (protocol headers). This schema MUST be of type 'object' and have a 'properties' key. Examples of Anypoint MQ protocol headers are 'messageId' and 'messageGroupId'." + }, + "bindingVersion": { + "type": "string", + "enum": [ + "0.0.1" + ], + "description": "The version of this binding. If omitted, 'latest' MUST be assumed." + } + }, + "examples": [ + { + "headers": { + "type": "object", + "properties": { + "messageId": { + "type": "string" } } - }, - "required": [ - "type", - "name", - "symbols" - ] + }, + "bindingVersion": "0.0.1" + } + ] + }, + "http://asyncapi.com/bindings/ibmmq/0.1.0/message.json": { + "$id": "http://asyncapi.com/bindings/ibmmq/0.1.0/message.json", + "title": "IBM MQ message bindings object", + "description": "This object contains information about the message representation in IBM MQ.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "properties": { + "type": { + "type": "string", + "enum": [ + "string", + "jms", + "binary" + ], + "default": "string", + "description": "The type of the message." + }, + "headers": { + "type": "string", + "description": "Defines the IBM MQ message headers to include with this message. More than one header can be specified as a comma separated list. Supporting information on IBM MQ message formats can be found on this [page](https://www.ibm.com/docs/en/ibm-mq/9.2?topic=mqmd-format-mqchar8) in the IBM MQ Knowledge Center." + }, + "description": { + "type": "string", + "description": "Provides additional information for application developers: describes the message type or format." + }, + "expiry": { + "type": "integer", + "minimum": 0, + "default": 0, + "description": "The recommended setting the client should use for the TTL (Time-To-Live) of the message. This is a period of time expressed in milliseconds and set by the application that puts the message. 'expiry' values are API dependant e.g., MQI and JMS use different units of time and default values for 'unlimited'. General information on IBM MQ message expiry can be found on this [page](https://www.ibm.com/docs/en/ibm-mq/9.2?topic=mqmd-expiry-mqlong) in the IBM MQ Knowledge Center." + }, + "bindingVersion": { + "type": "string", + "enum": [ + "0.1.0" + ], + "description": "The version of this binding." + } + }, + "oneOf": [ + { + "properties": { + "type": { + "const": "binary" + } + } }, - "avroArray": { - "title": "Array", - "description": "An array", - "type": "object", + { "properties": { "type": { - "type": "string", - "const": "array" - }, - "name": { - "$ref": "#/definitions/name" - }, - "namespace": { - "$ref": "#/definitions/namespace" - }, - "doc": { - "type": "string" - }, - "aliases": { - "type": "array", - "items": { - "$ref": "#/definitions/name" - } - }, - "items": { - "$ref": "#/definitions/types" + "const": "jms" } }, - "required": [ - "type", - "items" - ] + "not": { + "required": [ + "headers" + ] + } }, - "avroMap": { - "title": "Map", - "description": "A map of values", - "type": "object", + { "properties": { "type": { - "type": "string", - "const": "map" - }, - "name": { - "$ref": "#/definitions/name" - }, - "namespace": { - "$ref": "#/definitions/namespace" - }, - "doc": { - "type": "string" - }, - "aliases": { - "type": "array", - "items": { - "$ref": "#/definitions/name" - } - }, - "values": { - "$ref": "#/definitions/types" + "const": "string" } }, - "required": [ - "type", - "values" - ] + "not": { + "required": [ + "headers" + ] + } + } + ], + "examples": [ + { + "type": "string", + "bindingVersion": "0.1.0" }, - "avroFixed": { - "title": "Fixed", - "description": "A fixed sized array of bytes", + { + "type": "jms", + "description": "JMS stream message", + "bindingVersion": "0.1.0" + } + ] + }, + "http://asyncapi.com/bindings/googlepubsub/0.1.0/message.json": { + "$id": "http://asyncapi.com/bindings/googlepubsub/0.1.0/message.json", + "title": "Cloud Pub/Sub Channel Schema", + "description": "This object contains information about the message representation for Google Cloud Pub/Sub.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "properties": { + "bindingVersion": { + "type": "string", + "enum": [ + "0.1.0" + ], + "description": "The version of this binding." + }, + "attributes": { + "type": "object" + }, + "orderingKey": { + "type": "string" + }, + "schema": { "type": "object", + "additionalItems": false, "properties": { - "type": { - "type": "string", - "const": "fixed" - }, "name": { - "$ref": "#/definitions/name" - }, - "namespace": { - "$ref": "#/definitions/namespace" - }, - "doc": { "type": "string" }, - "aliases": { - "type": "array", - "items": { - "$ref": "#/definitions/name" - } - }, - "size": { - "type": "number" + "type": { + "type": "string" } }, "required": [ - "type", "name", - "size" + "type" + ] + } + }, + "examples": [ + { + "schema": { + "name": "projects/your-project-id/schemas/your-avro-schema-id", + "type": "avro" + } + }, + { + "schema": { + "name": "projects/your-project-id/schemas/your-protobuf-schema-id", + "type": "protobuf" + } + } + ] + }, + "http://asyncapi.com/definitions/3.0.0/messageTrait.json": { + "$id": "http://asyncapi.com/definitions/3.0.0/messageTrait.json", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "properties": { + "contentType": { + "type": "string" + }, + "headers": { + "$ref": "http://asyncapi.com/definitions/3.0.0/anySchema.json" + }, + "messageId": { + "type": "string" + }, + "correlationId": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/correlationId.json" + } ] }, + "tags": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/tag.json" + } + ] + }, + "uniqueItems": true + }, + "summary": { + "type": "string", + "description": "A brief summary of the message." + }, "name": { "type": "string", - "pattern": "^[A-Za-z_][A-Za-z0-9_]*$" + "description": "Name of the message." }, - "namespace": { + "title": { "type": "string", - "pattern": "^([A-Za-z_][A-Za-z0-9_]*(\\.[A-Za-z_][A-Za-z0-9_]*)*)*$" - } - }, - "description": "Json-Schema definition for Avro AVSC files.", - "oneOf": [ - { - "$ref": "#/definitions/avroSchema" + "description": "A human-friendly title for the message." + }, + "description": { + "type": "string", + "description": "A longer description of the message. CommonMark is allowed." + }, + "externalDocs": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/externalDocs.json" + } + ] + }, + "deprecated": { + "type": "boolean", + "default": false + }, + "examples": { + "type": "array", + "items": { + "type": "object" + } + }, + "bindings": { + "$ref": "http://asyncapi.com/definitions/3.0.0/messageBindingsObject.json" } - ], - "title": "Avro Schema Definition" + } }, "http://asyncapi.com/definitions/3.0.0/parameters.json": { "$id": "http://asyncapi.com/definitions/3.0.0/parameters.json", @@ -5993,7 +6010,7 @@ "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" }, { - "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" + "$ref": "http://asyncapi.com/definitions/3.0.0/anySchema.json" } ] } diff --git a/test/docs/3.0.0/streetlights-avro.json b/test/docs/3.0.0/streetlights-avro.json index 2e6a2399..4113d94b 100644 --- a/test/docs/3.0.0/streetlights-avro.json +++ b/test/docs/3.0.0/streetlights-avro.json @@ -58,191 +58,216 @@ } }, "components": { - "messages": { - "UserSignedUp": { + "schemas": { + "UserSignedUpHeaders": { "schemaFormat": "application/vnd.apache.avro;version=1.9.0", - "payload": { - "doc": "This is a user record in a fictitious to-do-list management app. It supports arbitrary grouping and nesting of items, and allows you to add items by email or by tweeting.\n\nNote this app doesn't actually exist. The schema is just a demo for [Avrodoc](https://github.com/ept/avrodoc)!", + "schema": { "fields": [ { - "name": "id", - "doc": "System-assigned numeric user ID. Cannot be changed by the user.", - "type": "int" - }, - { - "name": "username", - "doc": "The username chosen by the user. Can be changed by the user.", - "type": "string" - }, - { - "name": "passwordHash", - "doc": "The user's password, hashed using [scrypt](http://www.tarsnap.com/scrypt.html).", - "type": "string" - }, - { - "name": "signupDate", - "doc": "Timestamp (milliseconds since epoch) when the user signed up", - "type": "long" + "name": "applicationInstanceId", + "type": "string" }, { - "name": "emailAddresses", - "doc": "All email addresses on the user's account", - "type": { - "type": "array", - "items": { - "type": "record", - "name": "EmailAddress", - "doc": "Stores details about an email address that a user has associated with their account.", - "fields": [ - { - "name": "address", - "doc": "The email address, e.g. `foo@example.com`", - "type": "string" - }, - { - "name": "verified", - "doc": "true if the user has clicked the link in a confirmation email to this address.", - "type": "boolean", - "default": false - }, - { - "name": "dateAdded", - "doc": "Timestamp (milliseconds since epoch) when the email address was added to the account.", - "type": "long" - }, - { - "name": "dateBounced", - "doc": "Timestamp (milliseconds since epoch) when an email sent to this address last bounced. Reset to null when the address no longer bounces.", - "type": [ - "null", - "long" - ] - } - ] - } - } - }, - { - "name": "twitterAccounts", - "doc": "All Twitter accounts that the user has OAuthed", - "type": { - "type": "array", - "items": { - "type": "record", - "name": "TwitterAccount", - "doc": "Stores access credentials for one Twitter account, as granted to us by the user by OAuth.", - "fields": [ - { - "name": "status", - "doc": "Indicator of whether this authorization is currently active, or has been revoked", - "type": { - "type": "enum", - "name": "OAuthStatus", - "doc": "* `PENDING`: the user has started authorizing, but not yet finished\n* `ACTIVE`: the token should work\n* `DENIED`: the user declined the authorization\n* `EXPIRED`: the token used to work, but now it doesn't\n* `REVOKED`: the user has explicitly revoked the token", - "symbols": [ - "PENDING", - "ACTIVE", - "DENIED", - "EXPIRED", - "REVOKED" + "name": "correlationId", + "type": "string" + } + ], + "name": "UserSignedUpHeaders", + "namespace": "com.example.avro", + "type": "record" + } + } + }, + "messages": { + "UserSignedUp": { + "headers": { + "$ref": "#/components/schemas/UserSignedUpHeaders" + }, + "payload": { + "schemaFormat": "application/vnd.apache.avro;version=1.9.0", + "schema": { + "doc": "This is a user record in a fictitious to-do-list management app. It supports arbitrary grouping and nesting of items, and allows you to add items by email or by tweeting.\n\nNote this app doesn't actually exist. The schema is just a demo for [Avrodoc](https://github.com/ept/avrodoc)!", + "fields": [ + { + "name": "id", + "doc": "System-assigned numeric user ID. Cannot be changed by the user.", + "type": "int" + }, + { + "name": "username", + "doc": "The username chosen by the user. Can be changed by the user.", + "type": "string" + }, + { + "name": "passwordHash", + "doc": "The user's password, hashed using [scrypt](http://www.tarsnap.com/scrypt.html).", + "type": "string" + }, + { + "name": "signupDate", + "doc": "Timestamp (milliseconds since epoch) when the user signed up", + "type": "long" + }, + { + "name": "emailAddresses", + "doc": "All email addresses on the user's account", + "type": { + "type": "array", + "items": { + "type": "record", + "name": "EmailAddress", + "doc": "Stores details about an email address that a user has associated with their account.", + "fields": [ + { + "name": "address", + "doc": "The email address, e.g. `foo@example.com`", + "type": "string" + }, + { + "name": "verified", + "doc": "true if the user has clicked the link in a confirmation email to this address.", + "type": "boolean", + "default": false + }, + { + "name": "dateAdded", + "doc": "Timestamp (milliseconds since epoch) when the email address was added to the account.", + "type": "long" + }, + { + "name": "dateBounced", + "doc": "Timestamp (milliseconds since epoch) when an email sent to this address last bounced. Reset to null when the address no longer bounces.", + "type": [ + "null", + "long" ] } - }, - { - "name": "userId", - "doc": "Twitter's numeric ID for this user", - "type": "long" - }, - { - "name": "screenName", - "doc": "The twitter username for this account (can be changed by the user)", - "type": "string" - }, - { - "name": "oauthToken", - "doc": "The OAuth token for this Twitter account", - "type": "string" - }, - { - "name": "oauthTokenSecret", - "doc": "The OAuth secret, used for signing requests on behalf of this Twitter account. `null` whilst the OAuth flow is not yet complete.", - "type": [ - "null", - "string" - ] - }, - { - "name": "dateAuthorized", - "doc": "Timestamp (milliseconds since epoch) when the user last authorized this Twitter account", - "type": "long" - } - ] + ] + } } - } - }, - { - "name": "toDoItems", - "doc": "The top-level items in the user's to-do list", - "type": { - "type": "array", - "items": { - "type": "record", - "name": "ToDoItem", - "doc": "A record is one node in a To-Do item tree (every record can contain nested sub-records).", - "fields": [ - { - "name": "status", - "doc": "User-selected state for this item (e.g. whether or not it is marked as done)", - "type": { - "type": "enum", - "name": "ToDoStatus", - "doc": "* `HIDDEN`: not currently visible, e.g. because it becomes actionable in future\n* `ACTIONABLE`: appears in the current to-do list\n* `DONE`: marked as done, but still appears in the list\n* `ARCHIVED`: marked as done and no longer visible\n* `DELETED`: not done and removed from list (preserved for undo purposes)", - "symbols": [ - "HIDDEN", - "ACTIONABLE", - "DONE", - "ARCHIVED", - "DELETED" + }, + { + "name": "twitterAccounts", + "doc": "All Twitter accounts that the user has OAuthed", + "type": { + "type": "array", + "items": { + "type": "record", + "name": "TwitterAccount", + "doc": "Stores access credentials for one Twitter account, as granted to us by the user by OAuth.", + "fields": [ + { + "name": "status", + "doc": "Indicator of whether this authorization is currently active, or has been revoked", + "type": { + "type": "enum", + "name": "OAuthStatus", + "doc": "* `PENDING`: the user has started authorizing, but not yet finished\n* `ACTIVE`: the token should work\n* `DENIED`: the user declined the authorization\n* `EXPIRED`: the token used to work, but now it doesn't\n* `REVOKED`: the user has explicitly revoked the token", + "symbols": [ + "PENDING", + "ACTIVE", + "DENIED", + "EXPIRED", + "REVOKED" + ] + } + }, + { + "name": "userId", + "doc": "Twitter's numeric ID for this user", + "type": "long" + }, + { + "name": "screenName", + "doc": "The twitter username for this account (can be changed by the user)", + "type": "string" + }, + { + "name": "oauthToken", + "doc": "The OAuth token for this Twitter account", + "type": "string" + }, + { + "name": "oauthTokenSecret", + "doc": "The OAuth secret, used for signing requests on behalf of this Twitter account. `null` whilst the OAuth flow is not yet complete.", + "type": [ + "null", + "string" ] + }, + { + "name": "dateAuthorized", + "doc": "Timestamp (milliseconds since epoch) when the user last authorized this Twitter account", + "type": "long" } - }, - { - "name": "title", - "doc": "One-line summary of the item", - "type": "string" - }, - { - "name": "description", - "doc": "Detailed description (may contain HTML markup)", - "type": [ - "null", - "string" - ] - }, - { - "name": "snoozeDate", - "doc": "Timestamp (milliseconds since epoch) at which the item should go from `HIDDEN` to `ACTIONABLE` status", - "type": [ - "null", - "long" - ] - }, - { - "name": "subItems", - "doc": "List of children of this to-do tree node", - "type": { - "type": "array", - "items": "ToDoItem" + ] + } + } + }, + { + "name": "toDoItems", + "doc": "The top-level items in the user's to-do list", + "type": { + "type": "array", + "items": { + "type": "record", + "name": "ToDoItem", + "doc": "A record is one node in a To-Do item tree (every record can contain nested sub-records).", + "fields": [ + { + "name": "status", + "doc": "User-selected state for this item (e.g. whether or not it is marked as done)", + "type": { + "type": "enum", + "name": "ToDoStatus", + "doc": "* `HIDDEN`: not currently visible, e.g. because it becomes actionable in future\n* `ACTIONABLE`: appears in the current to-do list\n* `DONE`: marked as done, but still appears in the list\n* `ARCHIVED`: marked as done and no longer visible\n* `DELETED`: not done and removed from list (preserved for undo purposes)", + "symbols": [ + "HIDDEN", + "ACTIONABLE", + "DONE", + "ARCHIVED", + "DELETED" + ] + } + }, + { + "name": "title", + "doc": "One-line summary of the item", + "type": "string" + }, + { + "name": "description", + "doc": "Detailed description (may contain HTML markup)", + "type": [ + "null", + "string" + ] + }, + { + "name": "snoozeDate", + "doc": "Timestamp (milliseconds since epoch) at which the item should go from `HIDDEN` to `ACTIONABLE` status", + "type": [ + "null", + "long" + ] + }, + { + "name": "subItems", + "doc": "List of children of this to-do tree node", + "type": { + "type": "array", + "items": "ToDoItem" + } } - } - ] + ] + } } } - } - ], - "name": "User", - "namespace": "com.example.avro", - "type": "record" + ], + "name": "User", + "namespace": "com.example.avro", + "type": "record" + } } } } diff --git a/test/docs/3.0.0/streetlights-openapi.json b/test/docs/3.0.0/streetlights-openapi.json index 939623c8..b0b799b8 100644 --- a/test/docs/3.0.0/streetlights-openapi.json +++ b/test/docs/3.0.0/streetlights-openapi.json @@ -60,29 +60,31 @@ "components": { "messages": { "UserSignedUp": { - "schemaFormat": "application/vnd.oai.openapi;version=3.0.0", "payload": { - "properties": { - "id": { - "type": "integer" + "schemaFormat": "application/vnd.oai.openapi;version=3.0.0", + "schema": { + "properties": { + "id": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "completed": { + "type": "boolean" + }, + "completed_at": { + "type": "string", + "format": "date-time", + "nullable": true + } }, - "name": { - "type": "string" - }, - "completed": { - "type": "boolean" - }, - "completed_at": { - "type": "string", - "format": "date-time", - "nullable": true - } - }, - "required": [ - "id", - "name", - "completed" - ] + "required": [ + "id", + "name", + "completed" + ] + } } } } diff --git a/test/schemas.js b/test/schemas.js index 9d01739b..3d7c6a72 100644 --- a/test/schemas.js +++ b/test/schemas.js @@ -34,4 +34,4 @@ describe("Should be able to validate", function () { } } }); -}); +}); \ No newline at end of file diff --git a/tools/bundler/package-lock.json b/tools/bundler/package-lock.json index b1fa81ba..e5d6be05 100644 --- a/tools/bundler/package-lock.json +++ b/tools/bundler/package-lock.json @@ -114,4 +114,4 @@ } } } -} +} \ No newline at end of file From 6914a9224c75ba76b7a3a79a2643eb8cc1a7c6d3 Mon Sep 17 00:00:00 2001 From: asyncapi-bot Date: Thu, 13 Jul 2023 21:34:40 +0200 Subject: [PATCH 059/102] chore(release): v6.0.0-next-major-spec.2 (#409) --- package-lock.json | 2 +- package.json | 2 +- tools/bundler/package-lock.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index f1f9692b..e0a10861 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "@asyncapi/specs", - "version": "6.0.0-next-major-spec.1", + "version": "6.0.0-next-major-spec.2", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 037b6561..b9e562b5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@asyncapi/specs", - "version": "6.0.0-next-major-spec.1", + "version": "6.0.0-next-major-spec.2", "description": "AsyncAPI schema versions", "main": "index.js", "types": "index.d.ts", diff --git a/tools/bundler/package-lock.json b/tools/bundler/package-lock.json index e5d6be05..b1fa81ba 100644 --- a/tools/bundler/package-lock.json +++ b/tools/bundler/package-lock.json @@ -114,4 +114,4 @@ } } } -} \ No newline at end of file +} From 5176b29bf2473adb9cfdfb1c673841f6c3d78ede Mon Sep 17 00:00:00 2001 From: Sergio Moya <1083296+smoya@users.noreply.github.com> Date: Mon, 17 Jul 2023 12:59:57 +0200 Subject: [PATCH 060/102] chore: unescape characters in regex + TODO since it is not required (#410) --- tools/bundler/index.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/bundler/index.js b/tools/bundler/index.js index 8211685f..0ff04696 100644 --- a/tools/bundler/index.js +++ b/tools/bundler/index.js @@ -11,10 +11,10 @@ console.log(`Looking for binding version schemas in the following directory: ${b console.log(`Using the following output directory: ${outputDirectory}`); // definitionsRegex is used to transform the name of a definition into a valid one to be used in the -without-$id.json files. -const definitionsRegex = /http:\/\/asyncapi\.com\/definitions\/[^\/]*\/(.+)\.json\#?(.*)/i +const definitionsRegex = /http:\/\/asyncapi\.com\/definitions\/[^/]*\/(.+)\.json#?(.*)/i // definitionsRegex is used to transform the name of a binding into a valid one to be used in the -without-$id.json files. -const bindingsRegex = /http:\/\/asyncapi\.com\/(bindings\/[^\/]+)\/([^\/]+)\/(.+)\.json(.*)/i +const bindingsRegex = /http:\/\/asyncapi\.com\/(bindings\/[^/]+)\/([^/]+)\/(.+)\.json(.*)/i /** * Function to load all the core AsyncAPI spec definition (except the root asyncapi schema, as that will be loaded later) into the bundler. @@ -156,7 +156,7 @@ function getDefinitionName(def) { if (result) return `${result[1].replace('/', '-')}-${result[2]}-${result[3]}`; } - return path.basename(def, '.json') // TODO is this really needed? + return path.basename(def, '.json') } /** From 18c49f7966c6752c544262247c5bdf224cec49f5 Mon Sep 17 00:00:00 2001 From: Sergio Moya <1083296+smoya@users.noreply.github.com> Date: Fri, 21 Jul 2023 21:39:48 +0200 Subject: [PATCH 061/102] fix: allow Reference objects in MultiFormat schema fields (#411) --- definitions/3.0.0/multiFormatSchema.json | 45 ++++++++++++++++++++--- schemas/3.0.0-without-$id.json | 45 ++++++++++++++++++++--- schemas/3.0.0.json | 45 ++++++++++++++++++++--- test/docs/3.0.0/streetlights-all.json | 5 +++ test/docs/3.0.0/streetlights-avro.json | 6 +++ test/docs/3.0.0/streetlights-openapi.json | 8 ++++ 6 files changed, 139 insertions(+), 15 deletions(-) diff --git a/definitions/3.0.0/multiFormatSchema.json b/definitions/3.0.0/multiFormatSchema.json index 548dd852..8f91cc05 100644 --- a/definitions/3.0.0/multiFormatSchema.json +++ b/definitions/3.0.0/multiFormatSchema.json @@ -33,7 +33,14 @@ "then": { "properties": { "schema": { - "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" + } + ] } } } @@ -77,7 +84,14 @@ "then": { "properties": { "schema": { - "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" + } + ] } } } @@ -99,7 +113,14 @@ "then": { "properties": { "schema": { - "$ref": "http://json-schema.org/draft-07/schema" + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://json-schema.org/draft-07/schema" + } + ] } } } @@ -122,7 +143,14 @@ "then": { "properties": { "schema": { - "$ref": "http://asyncapi.com/definitions/3.0.0/openapiSchema_3_0.json" + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/openapiSchema_3_0.json" + } + ] } } } @@ -145,7 +173,14 @@ "then": { "properties": { "schema": { - "$ref": "http://asyncapi.com/definitions/3.0.0/avroSchema_v1.json" + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/avroSchema_v1.json" + } + ] } } } diff --git a/schemas/3.0.0-without-$id.json b/schemas/3.0.0-without-$id.json index baff0ce8..bcc022e4 100644 --- a/schemas/3.0.0-without-$id.json +++ b/schemas/3.0.0-without-$id.json @@ -2177,7 +2177,14 @@ "then": { "properties": { "schema": { - "$ref": "#/definitions/schema" + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/schema" + } + ] } } } @@ -2221,7 +2228,14 @@ "then": { "properties": { "schema": { - "$ref": "#/definitions/schema" + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/schema" + } + ] } } } @@ -2243,7 +2257,14 @@ "then": { "properties": { "schema": { - "$ref": "#/definitions/json-schema-draft-07-schema" + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/json-schema-draft-07-schema" + } + ] } } } @@ -2266,7 +2287,14 @@ "then": { "properties": { "schema": { - "$ref": "#/definitions/openapiSchema_3_0" + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/openapiSchema_3_0" + } + ] } } } @@ -2289,7 +2317,14 @@ "then": { "properties": { "schema": { - "$ref": "#/definitions/avroSchema_v1" + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/avroSchema_v1" + } + ] } } } diff --git a/schemas/3.0.0.json b/schemas/3.0.0.json index 4ed486ec..63849e6e 100644 --- a/schemas/3.0.0.json +++ b/schemas/3.0.0.json @@ -2226,7 +2226,14 @@ "then": { "properties": { "schema": { - "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" + } + ] } } } @@ -2270,7 +2277,14 @@ "then": { "properties": { "schema": { - "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" + } + ] } } } @@ -2292,7 +2306,14 @@ "then": { "properties": { "schema": { - "$ref": "http://json-schema.org/draft-07/schema" + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://json-schema.org/draft-07/schema" + } + ] } } } @@ -2315,7 +2336,14 @@ "then": { "properties": { "schema": { - "$ref": "http://asyncapi.com/definitions/3.0.0/openapiSchema_3_0.json" + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/openapiSchema_3_0.json" + } + ] } } } @@ -2338,7 +2366,14 @@ "then": { "properties": { "schema": { - "$ref": "http://asyncapi.com/definitions/3.0.0/avroSchema_v1.json" + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/avroSchema_v1.json" + } + ] } } } diff --git a/test/docs/3.0.0/streetlights-all.json b/test/docs/3.0.0/streetlights-all.json index 4dd731c9..aabad861 100644 --- a/test/docs/3.0.0/streetlights-all.json +++ b/test/docs/3.0.0/streetlights-all.json @@ -74,6 +74,11 @@ } } } + }, + "UserSignedUpV2": { + "payload": { + "$ref": "external-schema.json" + } } } } diff --git a/test/docs/3.0.0/streetlights-avro.json b/test/docs/3.0.0/streetlights-avro.json index 4113d94b..acbeea2c 100644 --- a/test/docs/3.0.0/streetlights-avro.json +++ b/test/docs/3.0.0/streetlights-avro.json @@ -76,6 +76,12 @@ "namespace": "com.example.avro", "type": "record" } + }, + "ReferencedSchema" : { + "schemaFormat": "application/vnd.apache.avro;version=1.9.0", + "schema": { + "$ref": "reference-to-some-avro-file.avsc" + } } }, "messages": { diff --git a/test/docs/3.0.0/streetlights-openapi.json b/test/docs/3.0.0/streetlights-openapi.json index b0b799b8..84d64449 100644 --- a/test/docs/3.0.0/streetlights-openapi.json +++ b/test/docs/3.0.0/streetlights-openapi.json @@ -58,6 +58,14 @@ } }, "components": { + "schemas": { + "ReferencedSchema" : { + "schemaFormat": "application/vnd.oai.openapi;version=3.0.0", + "schema": { + "$ref": "reference-to-some-openapi-file.json" + } + } + }, "messages": { "UserSignedUp": { "payload": { From b728570a3e68e247f8cb41bfddcdc48d63f6d181 Mon Sep 17 00:00:00 2001 From: asyncapi-bot Date: Fri, 21 Jul 2023 21:43:40 +0200 Subject: [PATCH 062/102] chore(release): v6.0.0-next-major-spec.3 (#412) --- package-lock.json | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index e0a10861..fda84a7a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "@asyncapi/specs", - "version": "6.0.0-next-major-spec.2", + "version": "6.0.0-next-major-spec.3", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index b9e562b5..4a646cd1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@asyncapi/specs", - "version": "6.0.0-next-major-spec.2", + "version": "6.0.0-next-major-spec.3", "description": "AsyncAPI schema versions", "main": "index.js", "types": "index.d.ts", From 1aebba2422c7b942e988c8d8b7b88412d6bde641 Mon Sep 17 00:00:00 2001 From: Jonas Lagoni Date: Tue, 25 Jul 2023 13:21:43 +0200 Subject: [PATCH 063/102] feat: add new simplified parameter (#415) --- definitions/3.0.0/parameter.json | 22 +++++++++++++++++----- test/docs/3.0.0/streetlights-all.json | 16 +++++++++++++++- 2 files changed, 32 insertions(+), 6 deletions(-) diff --git a/definitions/3.0.0/parameter.json b/definitions/3.0.0/parameter.json index f6c81ddd..f483a9c9 100644 --- a/definitions/3.0.0/parameter.json +++ b/definitions/3.0.0/parameter.json @@ -10,16 +10,28 @@ "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/3.0.0/schema.json" + "enum": { + "description": "A list of allowed values for the parameter.", + "type": "array", + "items": { + "type": "string" + } + }, + "default": { + "description": "The default value to use for the parameter.", + "type": "string" + }, + "examples": { + "description": "List of example values to use for the parameter.", + "type": "array", + "items": { + "type": "string" + } }, "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/3.0.0/ReferenceObject.json" } }, "$schema": "http://json-schema.org/draft-07/schema#", diff --git a/test/docs/3.0.0/streetlights-all.json b/test/docs/3.0.0/streetlights-all.json index aabad861..c3a24f83 100644 --- a/test/docs/3.0.0/streetlights-all.json +++ b/test/docs/3.0.0/streetlights-all.json @@ -7,7 +7,21 @@ }, "channels": { "UserSignedUpChannel": { - "address": "user/signedup", + "address": "user/signedup/{test_param}", + "parameters": { + "test_param": { + "enum": [ + "test" + ], + "default": "test", + "description": "Just a test description", + "examples": [ + "test" + ], + "location": "$message.payload#", + "x-custom-extension": "test" + } + }, "messages": { "UserSignedUp": { "$ref": "#/components/messages/UserSignedUp" From 9d493966462b8b2d8c2fe7c7ae5e902bbc043aac Mon Sep 17 00:00:00 2001 From: asyncapi-bot Date: Tue, 25 Jul 2023 13:25:26 +0200 Subject: [PATCH 064/102] chore(release): v6.0.0-next-major-spec.4 (#416) --- package-lock.json | 2 +- package.json | 2 +- schemas/3.0.0-without-$id.json | 22 +++++++++++++++++----- schemas/3.0.0.json | 22 +++++++++++++++++----- 4 files changed, 36 insertions(+), 12 deletions(-) diff --git a/package-lock.json b/package-lock.json index fda84a7a..ce835882 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "@asyncapi/specs", - "version": "6.0.0-next-major-spec.3", + "version": "6.0.0-next-major-spec.4", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 4a646cd1..5e1b21fc 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@asyncapi/specs", - "version": "6.0.0-next-major-spec.3", + "version": "6.0.0-next-major-spec.4", "description": "AsyncAPI schema versions", "main": "index.js", "types": "index.d.ts", diff --git a/schemas/3.0.0-without-$id.json b/schemas/3.0.0-without-$id.json index bcc022e4..e2511835 100644 --- a/schemas/3.0.0-without-$id.json +++ b/schemas/3.0.0-without-$id.json @@ -3834,16 +3834,28 @@ "type": "string", "description": "A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed." }, - "schema": { - "$ref": "#/definitions/schema" + "enum": { + "description": "A list of allowed values for the parameter.", + "type": "array", + "items": { + "type": "string" + } + }, + "default": { + "description": "The default value to use for the parameter.", + "type": "string" + }, + "examples": { + "description": "List of example values to use for the parameter.", + "type": "array", + "items": { + "type": "string" + } }, "location": { "type": "string", "description": "A runtime expression that specifies the location of the parameter value", "pattern": "^\\$message\\.(header|payload)#(\\/(([^\\/~])|(~[01]))*)*" - }, - "$ref": { - "$ref": "#/definitions/ReferenceObject" } } }, diff --git a/schemas/3.0.0.json b/schemas/3.0.0.json index 63849e6e..c2bb5181 100644 --- a/schemas/3.0.0.json +++ b/schemas/3.0.0.json @@ -3899,16 +3899,28 @@ "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/3.0.0/schema.json" + "enum": { + "description": "A list of allowed values for the parameter.", + "type": "array", + "items": { + "type": "string" + } + }, + "default": { + "description": "The default value to use for the parameter.", + "type": "string" + }, + "examples": { + "description": "List of example values to use for the parameter.", + "type": "array", + "items": { + "type": "string" + } }, "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/3.0.0/ReferenceObject.json" } } }, From ba244f8629c0e3ebe1f600d3760b54e0744b830a Mon Sep 17 00:00:00 2001 From: Jonas Lagoni Date: Wed, 26 Jul 2023 16:20:18 +0200 Subject: [PATCH 065/102] feat: add all recommended and must supported schema formats (#365) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Fran Méndez Co-authored-by: Lukasz Gornicki --- definitions/3.0.0/asyncapi.json | 4 +- definitions/3.0.0/multiFormatSchema.json | 33 ++++++++++- scripts/add-new-version.js | 70 +++++++++++++++++++++++- 3 files changed, 100 insertions(+), 7 deletions(-) diff --git a/definitions/3.0.0/asyncapi.json b/definitions/3.0.0/asyncapi.json index 0157a6dd..18a6c39d 100644 --- a/definitions/3.0.0/asyncapi.json +++ b/definitions/3.0.0/asyncapi.json @@ -16,9 +16,7 @@ "properties": { "asyncapi": { "type": "string", - "enum": [ - "3.0.0" - ], + "const": "3.0.0", "description": "The AsyncAPI specification version of this document." }, "id": { diff --git a/definitions/3.0.0/multiFormatSchema.json b/definitions/3.0.0/multiFormatSchema.json index 8f91cc05..fa993a10 100644 --- a/definitions/3.0.0/multiFormatSchema.json +++ b/definitions/3.0.0/multiFormatSchema.json @@ -17,7 +17,36 @@ }, "properties": { "schemaFormat": { - "type": "string" + "anyOf": [ + { + "type": "string" + }, + { + "description": "All the schema formats tooling MUST support", + "enum": [ + "application/schema+json;version=draft-07", + "application/schema+yaml;version=draft-07", + + "application/vnd.aai.asyncapi;version=3.0.0", + "application/vnd.aai.asyncapi+json;version=3.0.0", + "application/vnd.aai.asyncapi+yaml;version=3.0.0" + ] + }, + { + "description": "All the schema formats tools are RECOMMENDED to support", + "enum": [ + "application/vnd.oai.openapi;version=3.0.0", + "application/vnd.oai.openapi+json;version=3.0.0", + "application/vnd.oai.openapi+yaml;version=3.0.0", + + "application/vnd.apache.avro;version=1.9.0", + "application/vnd.apache.avro+json;version=1.9.0", + "application/vnd.apache.avro+yaml;version=1.9.0", + + "application/raml+yaml;version=1.0" + ] + } + ] }, "schema": {} }, @@ -25,6 +54,7 @@ { "if": { "not": { + "description": "If no schemaFormat has been defined, default to schema or reference", "required": [ "schemaFormat" ] @@ -47,6 +77,7 @@ }, { "if": { + "description": "If schemaFormat has been defined check if it's one of the AsyncAPI Schema Object formats", "required": [ "schemaFormat" ], diff --git a/scripts/add-new-version.js b/scripts/add-new-version.js index 947c5df3..6cdeaf8f 100644 --- a/scripts/add-new-version.js +++ b/scripts/add-new-version.js @@ -1,3 +1,4 @@ +const path = require('path'); /** * This script adds a new version of the spec with examples, by copying the latest one as baseline. */ @@ -23,6 +24,63 @@ function execute(command) { }); } +/** + * Add the new AsyncAPI schema object as values to schemaFormat + * + * If a major version change, replaces all old AsyncAPI schemaFormat values with fresh ones + * if minor or fix, it add new ones + */ +function addNewSchemaVersion(newVersion, newVersionDir, latestVersion) { + const newSchemaFormats = [ + `application/vnd.aai.asyncapi;version=${newVersion}`, + `application/vnd.aai.asyncapi+json;version=${newVersion}`, + `application/vnd.aai.asyncapi+yaml;version=${newVersion}` + ]; + //Did the major version (first char) change from last to new version? + const isMajorVersionChange = newVersion.charAt(0) !== latestVersion.charAt(0); + const objFile = path.resolve(newVersionDir, 'multiFormatSchema.json'); + const obj = require(objFile); + + // Adapt all the MUST supported schema formats + let mustSupportedSchemaFormats = [] = obj?.else?.properties?.schemaFormat?.anyOf[1]?.enum; + + //Add new version to the list of available schemaFormat values + if(mustSupportedSchemaFormats) { + if(isMajorVersionChange) { + //Remove all old AsyncAPI schema formats because we want a clean slate + mustSupportedSchemaFormats = mustSupportedSchemaFormats.filter((format) => !format.includes('application/vnd.aai.asyncapi')); + } + //Add new schema formats + mustSupportedSchemaFormats.push(...newSchemaFormats); + obj.else.properties.schemaFormat.anyOf[1].enum = mustSupportedSchemaFormats; + } else { + throw new Error("Could not find object to add schemaFormat values to"); + } + + //Make sure new versions apply the right schema + let enumsForValidatingSchema = [] = obj?.else?.allOf[1]?.if?.properties?.schemaFormat?.enum; + if(enumsForValidatingSchema) { + //Add new schema formats + enumsForValidatingSchema.push(...newSchemaFormats); + obj.else.allOf[1].if.properties.schemaFormat.enum = enumsForValidatingSchema; + } else { + throw new Error("Could not find location for schemaFormats that applies the AsyncAPI Schema object to the schema property"); + } + + fs.writeFileSync(objFile, JSON.stringify(obj, null, 2)); +} + +/** + * Adapt the root title and .asyncapi property + */ +function adaptRootObject(newVersion, newVersionDir) { + const objFile = path.resolve(newVersionDir, 'asyncapi.json'); + const obj = require(objFile); + obj.title = `AsyncAPI ${newVersion} schema.`; + obj.properties.asyncapi.const = newVersion; + fs.writeFileSync(objFile, JSON.stringify(obj, null, 2)); +} + async function addNewVersion(newVersion) { const newVersionDir = `./definitions/${newVersion}`; const newExampleVersionDir = `./examples/${newVersion}`; @@ -38,11 +96,17 @@ async function addNewVersion(newVersion) { await execute(`cp -R ./definitions/${latestVersion} ${newVersionDir}`); const latestExampleVersion = (await execute('ls -d ./examples/* | sort -V -r | head -1 | xargs -n 1 basename')).trim(); - await execute(`cp -R ./definitions/${latestVersion} ${newVersionDir}`); await execute(`cp -R ./examples/${latestExampleVersion} ${newExampleVersionDir}`); - // Replace old version numbers with new - await execute(`find ${newVersionDir} -name '*.json' -exec sed -i '' "s+${latestVersion}+${newVersion}+g" {} +`); + // Replace $ref and $id paths such as `/3.0.0/` with new version (http://asyncapi.com/definitions/3.0.0/specificationExtension.json) + await execute(`find ${newVersionDir} -name '*.json' -exec sed -i '' \"s+\/${latestVersion}\/+\/${newVersion}\/+g\" {} +`); + + // Replace .asyncapi version from old to new version + // Replace old version in title with new version + adaptRootObject(newVersion, newVersionDir); + + // Add new schemaFormat version entries + addNewSchemaVersion(newVersion, newVersionDir, latestVersion); console.log(`New version added to ${newVersionDir}`) } From 081a2497c99eca2796d5b384a986358f6c7b6db9 Mon Sep 17 00:00:00 2001 From: asyncapi-bot Date: Wed, 26 Jul 2023 16:23:35 +0200 Subject: [PATCH 066/102] chore(release): v6.0.0-next-major-spec.5 (#418) --- package-lock.json | 2 +- package.json | 2 +- schemas/3.0.0-without-$id.json | 34 ++++++++++++++++++++++++++++++---- schemas/3.0.0.json | 34 ++++++++++++++++++++++++++++++---- 4 files changed, 62 insertions(+), 10 deletions(-) diff --git a/package-lock.json b/package-lock.json index ce835882..fc988d66 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "@asyncapi/specs", - "version": "6.0.0-next-major-spec.4", + "version": "6.0.0-next-major-spec.5", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 5e1b21fc..73868fe4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@asyncapi/specs", - "version": "6.0.0-next-major-spec.4", + "version": "6.0.0-next-major-spec.5", "description": "AsyncAPI schema versions", "main": "index.js", "types": "index.d.ts", diff --git a/schemas/3.0.0-without-$id.json b/schemas/3.0.0-without-$id.json index e2511835..0b8387f8 100644 --- a/schemas/3.0.0-without-$id.json +++ b/schemas/3.0.0-without-$id.json @@ -15,9 +15,7 @@ "properties": { "asyncapi": { "type": "string", - "enum": [ - "3.0.0" - ], + "const": "3.0.0", "description": "The AsyncAPI specification version of this document." }, "id": { @@ -2161,7 +2159,33 @@ }, "properties": { "schemaFormat": { - "type": "string" + "anyOf": [ + { + "type": "string" + }, + { + "description": "All the schema formats tooling MUST support", + "enum": [ + "application/schema+json;version=draft-07", + "application/schema+yaml;version=draft-07", + "application/vnd.aai.asyncapi;version=3.0.0", + "application/vnd.aai.asyncapi+json;version=3.0.0", + "application/vnd.aai.asyncapi+yaml;version=3.0.0" + ] + }, + { + "description": "All the schema formats tools are RECOMMENDED to support", + "enum": [ + "application/vnd.oai.openapi;version=3.0.0", + "application/vnd.oai.openapi+json;version=3.0.0", + "application/vnd.oai.openapi+yaml;version=3.0.0", + "application/vnd.apache.avro;version=1.9.0", + "application/vnd.apache.avro+json;version=1.9.0", + "application/vnd.apache.avro+yaml;version=1.9.0", + "application/raml+yaml;version=1.0" + ] + } + ] }, "schema": {} }, @@ -2169,6 +2193,7 @@ { "if": { "not": { + "description": "If no schemaFormat has been defined, default to schema or reference", "required": [ "schemaFormat" ] @@ -2191,6 +2216,7 @@ }, { "if": { + "description": "If schemaFormat has been defined check if it's one of the AsyncAPI Schema Object formats", "required": [ "schemaFormat" ], diff --git a/schemas/3.0.0.json b/schemas/3.0.0.json index c2bb5181..a9e52882 100644 --- a/schemas/3.0.0.json +++ b/schemas/3.0.0.json @@ -16,9 +16,7 @@ "properties": { "asyncapi": { "type": "string", - "enum": [ - "3.0.0" - ], + "const": "3.0.0", "description": "The AsyncAPI specification version of this document." }, "id": { @@ -2210,7 +2208,33 @@ }, "properties": { "schemaFormat": { - "type": "string" + "anyOf": [ + { + "type": "string" + }, + { + "description": "All the schema formats tooling MUST support", + "enum": [ + "application/schema+json;version=draft-07", + "application/schema+yaml;version=draft-07", + "application/vnd.aai.asyncapi;version=3.0.0", + "application/vnd.aai.asyncapi+json;version=3.0.0", + "application/vnd.aai.asyncapi+yaml;version=3.0.0" + ] + }, + { + "description": "All the schema formats tools are RECOMMENDED to support", + "enum": [ + "application/vnd.oai.openapi;version=3.0.0", + "application/vnd.oai.openapi+json;version=3.0.0", + "application/vnd.oai.openapi+yaml;version=3.0.0", + "application/vnd.apache.avro;version=1.9.0", + "application/vnd.apache.avro+json;version=1.9.0", + "application/vnd.apache.avro+yaml;version=1.9.0", + "application/raml+yaml;version=1.0" + ] + } + ] }, "schema": {} }, @@ -2218,6 +2242,7 @@ { "if": { "not": { + "description": "If no schemaFormat has been defined, default to schema or reference", "required": [ "schemaFormat" ] @@ -2240,6 +2265,7 @@ }, { "if": { + "description": "If schemaFormat has been defined check if it's one of the AsyncAPI Schema Object formats", "required": [ "schemaFormat" ], From 92e4aefb954be179e6358f704ee87f2df9226a74 Mon Sep 17 00:00:00 2001 From: Jonas Lagoni Date: Wed, 2 Aug 2023 11:09:08 +0200 Subject: [PATCH 067/102] feat: add amqp, mqtt and http bindings for v3 (#417) --- bindings/amqp/0.3.0/channel.json | 136 ++++++++++++++++++ bindings/amqp/0.3.0/message.json | 37 +++++ bindings/amqp/0.3.0/operation.json | 84 +++++++++++ bindings/http/0.2.0/message.json | 42 ++++++ bindings/http/0.2.0/operation.json | 82 +++++++++++ bindings/mqtt/0.2.0/message.json | 27 ++++ bindings/mqtt/0.2.0/operation.json | 37 +++++ bindings/mqtt/0.2.0/server.json | 71 +++++++++ definitions/3.0.0/channelBindingsObject.json | 8 +- definitions/3.0.0/messageBindingsObject.json | 24 ++-- .../3.0.0/operationBindingsObject.json | 24 ++-- definitions/3.0.0/serverBindingsObject.json | 8 +- test/docs/3.0.0/streetlights-all.json | 2 +- test/docs/3.0.0/streetlights-avro.json | 2 +- test/docs/3.0.0/streetlights-openapi.json | 2 +- 15 files changed, 551 insertions(+), 35 deletions(-) create mode 100644 bindings/amqp/0.3.0/channel.json create mode 100644 bindings/amqp/0.3.0/message.json create mode 100644 bindings/amqp/0.3.0/operation.json create mode 100644 bindings/http/0.2.0/message.json create mode 100644 bindings/http/0.2.0/operation.json create mode 100644 bindings/mqtt/0.2.0/message.json create mode 100644 bindings/mqtt/0.2.0/operation.json create mode 100644 bindings/mqtt/0.2.0/server.json diff --git a/bindings/amqp/0.3.0/channel.json b/bindings/amqp/0.3.0/channel.json new file mode 100644 index 00000000..383cd691 --- /dev/null +++ b/bindings/amqp/0.3.0/channel.json @@ -0,0 +1,136 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/bindings/amqp/0.3.0/channel.json", + "title": "AMQP channel bindings object", + "description": "This object contains information about the channel representation in AMQP.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "properties": { + "is": { + "type": "string", + "enum": ["queue", "routingKey"], + "description": "Defines what type of channel is it. Can be either 'queue' or 'routingKey' (default)." + }, + "exchange": { + "type": "object", + "properties": { + "name": { + "type": "string", + "maxLength": 255, + "description": "The name of the exchange. It MUST NOT exceed 255 characters long." + }, + "type": { + "type": "string", + "enum": ["topic", "direct", "fanout", "default", "headers"], + "description": "The type of the exchange. Can be either 'topic', 'direct', 'fanout', 'default' or 'headers'." + }, + "durable": { + "type": "boolean", + "description": "Whether the exchange should survive broker restarts or not." + }, + "autoDelete": { + "type": "boolean", + "description": "Whether the exchange should be deleted when the last queue is unbound from it." + }, + "vhost": { + "type": "string", + "default": "/", + "description": "The virtual host of the exchange. Defaults to '/'." + } + }, + "description": "When is=routingKey, this object defines the exchange properties." + }, + "queue": { + "type": "object", + "properties": { + "name": { + "type": "string", + "maxLength": 255, + "description": "The name of the queue. It MUST NOT exceed 255 characters long." + }, + "durable": { + "type": "boolean", + "description": "Whether the queue should survive broker restarts or not." + }, + "exclusive": { + "type": "boolean", + "description": "Whether the queue should be used only by one connection or not." + }, + "autoDelete": { + "type": "boolean", + "description": "Whether the queue should be deleted when the last consumer unsubscribes." + }, + "vhost": { + "type": "string", + "default": "/", + "description": "The virtual host of the queue. Defaults to '/'." + } + }, + "description": "When is=queue, this object defines the queue properties." + }, + "bindingVersion": { + "type": "string", + "enum": [ + "0.3.0" + ], + "description": "The version of this binding. If omitted, 'latest' MUST be assumed." + } + }, + "oneOf": [ + { + "properties": { + "is": { "const": "routingKey" } + }, + "required": [ + "exchange" + ], + "not": { + "required": [ + "queue" + ] + } + }, + { + "properties": { + "is": { "const": "queue" } + }, + "required": [ + "queue" + ], + "not": { + "required": [ + "exchange" + ] + } + } + ], + "examples": [ + { + "is": "routingKey", + "exchange": { + "name": "myExchange", + "type": "topic", + "durable": true, + "autoDelete": false, + "vhost": "/" + }, + "bindingVersion": "0.3.0" + }, + { + "is": "queue", + "queue": { + "name": "my-queue-name", + "durable": true, + "exclusive": true, + "autoDelete": false, + "vhost": "/" + }, + "bindingVersion": "0.3.0" + } + ] +} diff --git a/bindings/amqp/0.3.0/message.json b/bindings/amqp/0.3.0/message.json new file mode 100644 index 00000000..ba1c7352 --- /dev/null +++ b/bindings/amqp/0.3.0/message.json @@ -0,0 +1,37 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/bindings/amqp/0.3.0/message.json", + "title": "AMQP message bindings object", + "description": "This object contains information about the message representation in AMQP.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "properties": { + "contentEncoding": { + "type": "string", + "description": "A MIME encoding for the message content." + }, + "messageType": { + "type": "string", + "description": "Application-specific message type." + }, + "bindingVersion": { + "type": "string", + "enum": [ + "0.3.0" + ], + "description": "The version of this binding. If omitted, \"latest\" MUST be assumed." + } + }, + "examples": [ + { + "contentEncoding": "gzip", + "messageType": "user.signup", + "bindingVersion": "0.3.0" + } + ] +} diff --git a/bindings/amqp/0.3.0/operation.json b/bindings/amqp/0.3.0/operation.json new file mode 100644 index 00000000..1c359113 --- /dev/null +++ b/bindings/amqp/0.3.0/operation.json @@ -0,0 +1,84 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/bindings/amqp/0.3.0/operation.json", + "title": "AMQP operation bindings object", + "description": "This object contains information about the operation representation in AMQP.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "properties": { + "expiration": { + "type": "integer", + "minimum": 0, + "description": "TTL (Time-To-Live) for the message. It MUST be greater than or equal to zero." + }, + "userId": { + "type": "string", + "description": "Identifies the user who has sent the message." + }, + "cc": { + "type": "array", + "items": { + "type": "string" + }, + "description": "The routing keys the message should be routed to at the time of publishing." + }, + "priority": { + "type": "integer", + "description": "A priority for the message." + }, + "deliveryMode": { + "type": "integer", + "enum": [1,2], + "description": "Delivery mode of the message. Its value MUST be either 1 (transient) or 2 (persistent)." + }, + "mandatory": { + "type": "boolean", + "description": "Whether the message is mandatory or not." + }, + "bcc": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Like cc but consumers will not receive this information." + }, + "timestamp": { + "type": "boolean", + "description": "Whether the message should include a timestamp or not." + }, + "ack": { + "type": "boolean", + "description": "Whether the consumer should ack the message or not." + }, + "bindingVersion": { + "type": "string", + "enum": [ + "0.3.0" + ], + "description": "The version of this binding. If omitted, \"latest\" MUST be assumed." + } + }, + "examples": [ + { + "expiration": 100000, + "userId": "guest", + "cc": [ + "user.logs" + ], + "priority": 10, + "deliveryMode": 2, + "mandatory": false, + "bcc": [ + "external.audit" + ], + "timestamp": true, + "ack": false, + "bindingVersion": "0.3.0" + } + ] +} diff --git a/bindings/http/0.2.0/message.json b/bindings/http/0.2.0/message.json new file mode 100644 index 00000000..722a47db --- /dev/null +++ b/bindings/http/0.2.0/message.json @@ -0,0 +1,42 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/bindings/http/0.2.0/message.json", + "title": "HTTP message bindings object", + "description": "This object contains information about the message representation in HTTP.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "properties": { + "headers": { + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json", + "description": "\tA Schema object containing the definitions for HTTP-specific headers. This schema MUST be of type 'object' and have a 'properties' key." + }, + "bindingVersion": { + "type": "string", + "enum": [ + "0.2.0" + ], + "description": "The version of this binding. If omitted, \"latest\" MUST be assumed." + } + }, + "examples": [ + { + "headers": { + "type": "object", + "properties": { + "Content-Type": { + "type": "string", + "enum": [ + "application/json" + ] + } + } + }, + "bindingVersion": "0.2.0" + } + ] +} diff --git a/bindings/http/0.2.0/operation.json b/bindings/http/0.2.0/operation.json new file mode 100644 index 00000000..dae731f2 --- /dev/null +++ b/bindings/http/0.2.0/operation.json @@ -0,0 +1,82 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/bindings/http/0.2.0/operation.json", + "title": "HTTP operation bindings object", + "description": "This object contains information about the operation representation in HTTP.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "properties": { + "method": { + "type": "string", + "enum": [ + "GET", + "PUT", + "POST", + "PATCH", + "DELETE", + "HEAD", + "OPTIONS", + "CONNECT", + "TRACE" + ], + "description": "When 'type' is 'request', this is the HTTP method, otherwise it MUST be ignored. Its value MUST be one of 'GET', 'POST', 'PUT', 'PATCH', 'DELETE', 'HEAD', 'OPTIONS', 'CONNECT', and 'TRACE'." + }, + "query": { + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json", + "description": "A Schema object containing the definitions for each query parameter. This schema MUST be of type 'object' and have a properties key." + }, + "bindingVersion": { + "type": "string", + "enum": [ + "0.2.0" + ], + "description": "The version of this binding. If omitted, 'latest' MUST be assumed." + } + }, + "examples": [ + { + "query": { + "type": "object", + "required": [ + "companyId" + ], + "properties": { + "companyId": { + "type": "number", + "minimum": 1, + "description": "The Id of the company." + } + }, + "additionalProperties": false + }, + "bindingVersion": "0.2.0" + }, + { + "method": "GET", + "query": { + "type": "object", + "required": [ + "companyId" + ], + "properties": { + "companyId": { + "type": "number", + "minimum": 1, + "description": "The Id of the company." + } + }, + "additionalProperties": false + }, + "bindingVersion": "0.2.0" + } + ] +} + + + + diff --git a/bindings/mqtt/0.2.0/message.json b/bindings/mqtt/0.2.0/message.json new file mode 100644 index 00000000..e2d8f798 --- /dev/null +++ b/bindings/mqtt/0.2.0/message.json @@ -0,0 +1,27 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/bindings/mqtt/0.2.0/message.json", + "title": "MQTT message bindings object", + "description": "This object contains information about the message representation in MQTT.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "properties": { + "bindingVersion": { + "type": "string", + "enum": [ + "0.2.0" + ], + "description": "The version of this binding. If omitted, 'latest' MUST be assumed." + } + }, + "examples": [ + { + "bindingVersion": "0.2.0" + } + ] +} diff --git a/bindings/mqtt/0.2.0/operation.json b/bindings/mqtt/0.2.0/operation.json new file mode 100644 index 00000000..ec042529 --- /dev/null +++ b/bindings/mqtt/0.2.0/operation.json @@ -0,0 +1,37 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/bindings/mqtt/0.2.0/operation.json", + "title": "MQTT operation bindings object", + "description": "This object contains information about the operation representation in MQTT.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "properties": { + "qos": { + "type": "integer", + "description": "Defines the Quality of Service (QoS) levels for the message flow between client and server. Its value MUST be either 0 (At most once delivery), 1 (At least once delivery), or 2 (Exactly once delivery)." + }, + "retain": { + "type": "boolean", + "description": "Whether the broker should retain the message or not." + }, + "bindingVersion": { + "type": "string", + "enum": [ + "0.2.0" + ], + "description": "The version of this binding. If omitted, 'latest' MUST be assumed." + } + }, + "examples": [ + { + "qos": 2, + "retain": true, + "bindingVersion": "0.2.0" + } + ] +} diff --git a/bindings/mqtt/0.2.0/server.json b/bindings/mqtt/0.2.0/server.json new file mode 100644 index 00000000..d45fdb8e --- /dev/null +++ b/bindings/mqtt/0.2.0/server.json @@ -0,0 +1,71 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/bindings/mqtt/0.2.0/server.json", + "title": "MQTT server bindings object", + "description": "This object contains information about the server representation in MQTT.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "properties": { + "clientId": { + "type": "string", + "description": "The client identifier." + }, + "cleanSession": { + "type": "boolean", + "description": "Whether to create a persistent connection or not. When 'false', the connection will be persistent." + }, + "lastWill": { + "type": "object", + "description": "Last Will and Testament configuration.", + "properties": { + "topic": { + "type": "string", + "description": "The topic where the Last Will and Testament message will be sent." + }, + "qos": { + "type": "integer", + "enum": [0,1,2], + "description": "Defines how hard the broker/client will try to ensure that the Last Will and Testament message is received. Its value MUST be either 0, 1 or 2." + }, + "message": { + "type": "string", + "description": "Last Will message." + }, + "retain": { + "type": "boolean", + "description": "Whether the broker should retain the Last Will and Testament message or not." + } + } + }, + "keepAlive": { + "type": "integer", + "description": "Interval in seconds of the longest period of time the broker and the client can endure without sending a message." + }, + "bindingVersion": { + "type": "string", + "enum": [ + "0.2.0" + ], + "description": "The version of this binding. If omitted, 'latest' MUST be assumed." + } + }, + "examples": [ + { + "clientId": "guest", + "cleanSession": true, + "lastWill": { + "topic": "/last-wills", + "qos": 2, + "message": "Guest gone offline.", + "retain": false + }, + "keepAlive": 60, + "bindingVersion": "0.2.0" + } + ] +} diff --git a/definitions/3.0.0/channelBindingsObject.json b/definitions/3.0.0/channelBindingsObject.json index c5941fe5..050f46eb 100644 --- a/definitions/3.0.0/channelBindingsObject.json +++ b/definitions/3.0.0/channelBindingsObject.json @@ -46,7 +46,7 @@ "amqp": { "properties": { "bindingVersion": { - "enum": ["0.2.0"] + "enum": ["0.3.0"] } }, "allOf": [ @@ -60,7 +60,7 @@ } }, "then": { - "$ref": "http://asyncapi.com/bindings/amqp/0.2.0/channel.json" + "$ref": "http://asyncapi.com/bindings/amqp/0.3.0/channel.json" } }, { @@ -68,12 +68,12 @@ "required": [ "bindingVersion" ], "properties": { "bindingVersion": { - "const": "0.2.0" + "const": "0.3.0" } } }, "then": { - "$ref": "http://asyncapi.com/bindings/amqp/0.2.0/channel.json" + "$ref": "http://asyncapi.com/bindings/amqp/0.3.0/channel.json" } } ] diff --git a/definitions/3.0.0/messageBindingsObject.json b/definitions/3.0.0/messageBindingsObject.json index e8813db6..128ddb47 100644 --- a/definitions/3.0.0/messageBindingsObject.json +++ b/definitions/3.0.0/messageBindingsObject.json @@ -10,7 +10,7 @@ "http": { "properties": { "bindingVersion": { - "enum": ["0.1.0"] + "enum": ["0.2.0"] } }, "allOf": [ @@ -24,7 +24,7 @@ } }, "then": { - "$ref": "http://asyncapi.com/bindings/http/0.1.0/message.json" + "$ref": "http://asyncapi.com/bindings/http/0.2.0/message.json" } }, { @@ -32,12 +32,12 @@ "required": [ "bindingVersion" ], "properties": { "bindingVersion": { - "const": "0.1.0" + "const": "0.2.0" } } }, "then": { - "$ref": "http://asyncapi.com/bindings/http/0.1.0/message.json" + "$ref": "http://asyncapi.com/bindings/http/0.2.0/message.json" } } ] @@ -46,7 +46,7 @@ "amqp": { "properties": { "bindingVersion": { - "enum": ["0.2.0"] + "enum": ["0.3.0"] } }, "allOf": [ @@ -60,7 +60,7 @@ } }, "then": { - "$ref": "http://asyncapi.com/bindings/amqp/0.2.0/message.json" + "$ref": "http://asyncapi.com/bindings/amqp/0.3.0/message.json" } }, { @@ -68,12 +68,12 @@ "required": [ "bindingVersion" ], "properties": { "bindingVersion": { - "const": "0.2.0" + "const": "0.3.0" } } }, "then": { - "$ref": "http://asyncapi.com/bindings/amqp/0.2.0/message.json" + "$ref": "http://asyncapi.com/bindings/amqp/0.3.0/message.json" } } ] @@ -82,7 +82,7 @@ "mqtt": { "properties": { "bindingVersion": { - "enum": ["0.1.0"] + "enum": ["0.2.0"] } }, "allOf": [ @@ -96,7 +96,7 @@ } }, "then": { - "$ref": "http://asyncapi.com/bindings/mqtt/0.1.0/message.json" + "$ref": "http://asyncapi.com/bindings/mqtt/0.2.0/message.json" } }, { @@ -104,12 +104,12 @@ "required": [ "bindingVersion" ], "properties": { "bindingVersion": { - "const": "0.1.0" + "const": "0.2.0" } } }, "then": { - "$ref": "http://asyncapi.com/bindings/mqtt/0.1.0/message.json" + "$ref": "http://asyncapi.com/bindings/mqtt/0.2.0/message.json" } } ] diff --git a/definitions/3.0.0/operationBindingsObject.json b/definitions/3.0.0/operationBindingsObject.json index 19157d0d..8f629437 100644 --- a/definitions/3.0.0/operationBindingsObject.json +++ b/definitions/3.0.0/operationBindingsObject.json @@ -10,7 +10,7 @@ "http": { "properties": { "bindingVersion": { - "enum": ["0.1.0"] + "enum": ["0.2.0"] } }, "allOf": [ @@ -24,7 +24,7 @@ } }, "then": { - "$ref": "http://asyncapi.com/bindings/http/0.1.0/operation.json" + "$ref": "http://asyncapi.com/bindings/http/0.2.0/operation.json" } }, { @@ -32,12 +32,12 @@ "required": [ "bindingVersion" ], "properties": { "bindingVersion": { - "const": "0.1.0" + "const": "0.2.0" } } }, "then": { - "$ref": "http://asyncapi.com/bindings/http/0.1.0/operation.json" + "$ref": "http://asyncapi.com/bindings/http/0.2.0/operation.json" } } ] @@ -46,7 +46,7 @@ "amqp": { "properties": { "bindingVersion": { - "enum": ["0.2.0"] + "enum": ["0.3.0"] } }, "allOf": [ @@ -60,7 +60,7 @@ } }, "then": { - "$ref": "http://asyncapi.com/bindings/amqp/0.2.0/operation.json" + "$ref": "http://asyncapi.com/bindings/amqp/0.3.0/operation.json" } }, { @@ -68,12 +68,12 @@ "required": [ "bindingVersion" ], "properties": { "bindingVersion": { - "const": "0.2.0" + "const": "0.3.0" } } }, "then": { - "$ref": "http://asyncapi.com/bindings/amqp/0.2.0/operation.json" + "$ref": "http://asyncapi.com/bindings/amqp/0.3.0/operation.json" } } ] @@ -82,7 +82,7 @@ "mqtt": { "properties": { "bindingVersion": { - "enum": ["0.1.0"] + "enum": ["0.2.0"] } }, "allOf": [ @@ -96,7 +96,7 @@ } }, "then": { - "$ref": "http://asyncapi.com/bindings/mqtt/0.1.0/operation.json" + "$ref": "http://asyncapi.com/bindings/mqtt/0.2.0/operation.json" } }, { @@ -104,12 +104,12 @@ "required": [ "bindingVersion" ], "properties": { "bindingVersion": { - "const": "0.1.0" + "const": "0.2.0" } } }, "then": { - "$ref": "http://asyncapi.com/bindings/mqtt/0.1.0/operation.json" + "$ref": "http://asyncapi.com/bindings/mqtt/0.2.0/operation.json" } } ] diff --git a/definitions/3.0.0/serverBindingsObject.json b/definitions/3.0.0/serverBindingsObject.json index c92b9329..5782a1c5 100644 --- a/definitions/3.0.0/serverBindingsObject.json +++ b/definitions/3.0.0/serverBindingsObject.json @@ -14,7 +14,7 @@ "mqtt": { "properties": { "bindingVersion": { - "enum": ["0.1.0"] + "enum": ["0.2.0"] } }, "allOf": [ @@ -28,7 +28,7 @@ } }, "then": { - "$ref": "http://asyncapi.com/bindings/mqtt/0.1.0/server.json" + "$ref": "http://asyncapi.com/bindings/mqtt/0.2.0/server.json" } }, { @@ -36,12 +36,12 @@ "required": [ "bindingVersion" ], "properties": { "bindingVersion": { - "const": "0.1.0" + "const": "0.2.0" } } }, "then": { - "$ref": "http://asyncapi.com/bindings/mqtt/0.1.0/server.json" + "$ref": "http://asyncapi.com/bindings/mqtt/0.2.0/server.json" } } ] diff --git a/test/docs/3.0.0/streetlights-all.json b/test/docs/3.0.0/streetlights-all.json index c3a24f83..15b7cdc6 100644 --- a/test/docs/3.0.0/streetlights-all.json +++ b/test/docs/3.0.0/streetlights-all.json @@ -37,7 +37,7 @@ }, "bindings": { "mqtt": { - "bindingVersion": "0.1.0", + "bindingVersion": "0.2.0", "qos": 1 }, "kafka": { diff --git a/test/docs/3.0.0/streetlights-avro.json b/test/docs/3.0.0/streetlights-avro.json index acbeea2c..34eed135 100644 --- a/test/docs/3.0.0/streetlights-avro.json +++ b/test/docs/3.0.0/streetlights-avro.json @@ -23,7 +23,7 @@ }, "bindings": { "mqtt": { - "bindingVersion": "0.1.0", + "bindingVersion": "0.2.0", "qos": 1 }, "kafka": { diff --git a/test/docs/3.0.0/streetlights-openapi.json b/test/docs/3.0.0/streetlights-openapi.json index 84d64449..08f25ae4 100644 --- a/test/docs/3.0.0/streetlights-openapi.json +++ b/test/docs/3.0.0/streetlights-openapi.json @@ -23,7 +23,7 @@ }, "bindings": { "mqtt": { - "bindingVersion": "0.1.0", + "bindingVersion": "0.2.0", "qos": 1 }, "kafka": { From 3a5b6ebdf256382f5371d70472b72625150a72c0 Mon Sep 17 00:00:00 2001 From: asyncapi-bot Date: Wed, 2 Aug 2023 11:12:27 +0200 Subject: [PATCH 068/102] chore(release): v6.0.0-next-major-spec.6 (#420) --- package-lock.json | 2 +- package.json | 2 +- schemas/3.0.0-without-$id.json | 158 +++++++++++------------------- schemas/3.0.0.json | 174 +++++++++++++-------------------- 4 files changed, 126 insertions(+), 210 deletions(-) diff --git a/package-lock.json b/package-lock.json index fc988d66..c31a091f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "@asyncapi/specs", - "version": "6.0.0-next-major-spec.5", + "version": "6.0.0-next-major-spec.6", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 73868fe4..a96bcd3f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@asyncapi/specs", - "version": "6.0.0-next-major-spec.5", + "version": "6.0.0-next-major-spec.6", "description": "AsyncAPI schema versions", "main": "index.js", "types": "index.d.ts", diff --git a/schemas/3.0.0-without-$id.json b/schemas/3.0.0-without-$id.json index 0b8387f8..a2654ac5 100644 --- a/schemas/3.0.0-without-$id.json +++ b/schemas/3.0.0-without-$id.json @@ -926,7 +926,7 @@ "properties": { "bindingVersion": { "enum": [ - "0.1.0" + "0.2.0" ] } }, @@ -941,7 +941,7 @@ } }, "then": { - "$ref": "#/definitions/bindings-mqtt-0.1.0-server" + "$ref": "#/definitions/bindings-mqtt-0.2.0-server" } }, { @@ -951,12 +951,12 @@ ], "properties": { "bindingVersion": { - "const": "0.1.0" + "const": "0.2.0" } } }, "then": { - "$ref": "#/definitions/bindings-mqtt-0.1.0-server" + "$ref": "#/definitions/bindings-mqtt-0.2.0-server" } } ] @@ -1198,7 +1198,7 @@ } } }, - "bindings-mqtt-0.1.0-server": { + "bindings-mqtt-0.2.0-server": { "title": "MQTT server bindings object", "description": "This object contains information about the server representation in MQTT.", "type": "object", @@ -1251,7 +1251,7 @@ "bindingVersion": { "type": "string", "enum": [ - "0.1.0" + "0.2.0" ], "description": "The version of this binding. If omitted, 'latest' MUST be assumed." } @@ -1267,7 +1267,7 @@ "retain": false }, "keepAlive": 60, - "bindingVersion": "0.1.0" + "bindingVersion": "0.2.0" } ] }, @@ -2995,7 +2995,7 @@ "properties": { "bindingVersion": { "enum": [ - "0.1.0" + "0.2.0" ] } }, @@ -3010,7 +3010,7 @@ } }, "then": { - "$ref": "#/definitions/bindings-http-0.1.0-message" + "$ref": "#/definitions/bindings-http-0.2.0-message" } }, { @@ -3020,12 +3020,12 @@ ], "properties": { "bindingVersion": { - "const": "0.1.0" + "const": "0.2.0" } } }, "then": { - "$ref": "#/definitions/bindings-http-0.1.0-message" + "$ref": "#/definitions/bindings-http-0.2.0-message" } } ] @@ -3035,7 +3035,7 @@ "properties": { "bindingVersion": { "enum": [ - "0.2.0" + "0.3.0" ] } }, @@ -3050,7 +3050,7 @@ } }, "then": { - "$ref": "#/definitions/bindings-amqp-0.2.0-message" + "$ref": "#/definitions/bindings-amqp-0.3.0-message" } }, { @@ -3060,12 +3060,12 @@ ], "properties": { "bindingVersion": { - "const": "0.2.0" + "const": "0.3.0" } } }, "then": { - "$ref": "#/definitions/bindings-amqp-0.2.0-message" + "$ref": "#/definitions/bindings-amqp-0.3.0-message" } } ] @@ -3075,7 +3075,7 @@ "properties": { "bindingVersion": { "enum": [ - "0.1.0" + "0.2.0" ] } }, @@ -3090,7 +3090,7 @@ } }, "then": { - "$ref": "#/definitions/bindings-mqtt-0.1.0-message" + "$ref": "#/definitions/bindings-mqtt-0.2.0-message" } }, { @@ -3100,12 +3100,12 @@ ], "properties": { "bindingVersion": { - "const": "0.1.0" + "const": "0.2.0" } } }, "then": { - "$ref": "#/definitions/bindings-mqtt-0.1.0-message" + "$ref": "#/definitions/bindings-mqtt-0.2.0-message" } } ] @@ -3308,7 +3308,7 @@ } } }, - "bindings-http-0.1.0-message": { + "bindings-http-0.2.0-message": { "title": "HTTP message bindings object", "description": "This object contains information about the message representation in HTTP.", "type": "object", @@ -3326,7 +3326,7 @@ "bindingVersion": { "type": "string", "enum": [ - "0.1.0" + "0.2.0" ], "description": "The version of this binding. If omitted, \"latest\" MUST be assumed." } @@ -3344,11 +3344,11 @@ } } }, - "bindingVersion": "0.1.0" + "bindingVersion": "0.2.0" } ] }, - "bindings-amqp-0.2.0-message": { + "bindings-amqp-0.3.0-message": { "title": "AMQP message bindings object", "description": "This object contains information about the message representation in AMQP.", "type": "object", @@ -3370,7 +3370,7 @@ "bindingVersion": { "type": "string", "enum": [ - "0.2.0" + "0.3.0" ], "description": "The version of this binding. If omitted, \"latest\" MUST be assumed." } @@ -3379,11 +3379,11 @@ { "contentEncoding": "gzip", "messageType": "user.signup", - "bindingVersion": "0.2.0" + "bindingVersion": "0.3.0" } ] }, - "bindings-mqtt-0.1.0-message": { + "bindings-mqtt-0.2.0-message": { "title": "MQTT message bindings object", "description": "This object contains information about the message representation in MQTT.", "type": "object", @@ -3397,14 +3397,14 @@ "bindingVersion": { "type": "string", "enum": [ - "0.1.0" + "0.2.0" ], "description": "The version of this binding. If omitted, 'latest' MUST be assumed." } }, "examples": [ { - "bindingVersion": "0.1.0" + "bindingVersion": "0.2.0" } ] }, @@ -3938,7 +3938,7 @@ "properties": { "bindingVersion": { "enum": [ - "0.2.0" + "0.3.0" ] } }, @@ -3953,7 +3953,7 @@ } }, "then": { - "$ref": "#/definitions/bindings-amqp-0.2.0-channel" + "$ref": "#/definitions/bindings-amqp-0.3.0-channel" } }, { @@ -3963,12 +3963,12 @@ ], "properties": { "bindingVersion": { - "const": "0.2.0" + "const": "0.3.0" } } }, "then": { - "$ref": "#/definitions/bindings-amqp-0.2.0-channel" + "$ref": "#/definitions/bindings-amqp-0.3.0-channel" } } ] @@ -4238,7 +4238,7 @@ } ] }, - "bindings-amqp-0.2.0-channel": { + "bindings-amqp-0.3.0-channel": { "title": "AMQP channel bindings object", "description": "This object contains information about the channel representation in AMQP.", "type": "object", @@ -4323,7 +4323,7 @@ "bindingVersion": { "type": "string", "enum": [ - "0.2.0" + "0.3.0" ], "description": "The version of this binding. If omitted, 'latest' MUST be assumed." } @@ -4370,7 +4370,7 @@ "autoDelete": false, "vhost": "/" }, - "bindingVersion": "0.2.0" + "bindingVersion": "0.3.0" }, { "is": "queue", @@ -4381,7 +4381,7 @@ "autoDelete": false, "vhost": "/" }, - "bindingVersion": "0.2.0" + "bindingVersion": "0.3.0" } ] }, @@ -5063,7 +5063,7 @@ "properties": { "bindingVersion": { "enum": [ - "0.1.0" + "0.2.0" ] } }, @@ -5078,7 +5078,7 @@ } }, "then": { - "$ref": "#/definitions/bindings-http-0.1.0-operation" + "$ref": "#/definitions/bindings-http-0.2.0-operation" } }, { @@ -5088,12 +5088,12 @@ ], "properties": { "bindingVersion": { - "const": "0.1.0" + "const": "0.2.0" } } }, "then": { - "$ref": "#/definitions/bindings-http-0.1.0-operation" + "$ref": "#/definitions/bindings-http-0.2.0-operation" } } ] @@ -5103,7 +5103,7 @@ "properties": { "bindingVersion": { "enum": [ - "0.2.0" + "0.3.0" ] } }, @@ -5118,7 +5118,7 @@ } }, "then": { - "$ref": "#/definitions/bindings-amqp-0.2.0-operation" + "$ref": "#/definitions/bindings-amqp-0.3.0-operation" } }, { @@ -5128,12 +5128,12 @@ ], "properties": { "bindingVersion": { - "const": "0.2.0" + "const": "0.3.0" } } }, "then": { - "$ref": "#/definitions/bindings-amqp-0.2.0-operation" + "$ref": "#/definitions/bindings-amqp-0.3.0-operation" } } ] @@ -5143,7 +5143,7 @@ "properties": { "bindingVersion": { "enum": [ - "0.1.0" + "0.2.0" ] } }, @@ -5158,7 +5158,7 @@ } }, "then": { - "$ref": "#/definitions/bindings-mqtt-0.1.0-operation" + "$ref": "#/definitions/bindings-mqtt-0.2.0-operation" } }, { @@ -5168,12 +5168,12 @@ ], "properties": { "bindingVersion": { - "const": "0.1.0" + "const": "0.2.0" } } }, "then": { - "$ref": "#/definitions/bindings-mqtt-0.1.0-operation" + "$ref": "#/definitions/bindings-mqtt-0.2.0-operation" } } ] @@ -5354,7 +5354,7 @@ "googlepubsub": {} } }, - "bindings-http-0.1.0-operation": { + "bindings-http-0.2.0-operation": { "title": "HTTP operation bindings object", "description": "This object contains information about the operation representation in HTTP.", "type": "object", @@ -5365,14 +5365,6 @@ } }, "properties": { - "type": { - "type": "string", - "enum": [ - "request", - "response" - ], - "description": "Required. Type of operation. Its value MUST be either 'request' or 'response'." - }, "method": { "type": "string", "enum": [ @@ -5395,41 +5387,13 @@ "bindingVersion": { "type": "string", "enum": [ - "0.1.0" + "0.2.0" ], "description": "The version of this binding. If omitted, 'latest' MUST be assumed." } }, - "required": [ - "type" - ], - "oneOf": [ - { - "properties": { - "type": { - "const": "request" - } - }, - "required": [ - "method" - ] - }, - { - "properties": { - "is": { - "const": "response" - } - }, - "not": { - "required": [ - "method" - ] - } - } - ], "examples": [ { - "type": "response", "query": { "type": "object", "required": [ @@ -5444,10 +5408,9 @@ }, "additionalProperties": false }, - "bindingVersion": "0.1.0" + "bindingVersion": "0.2.0" }, { - "type": "request", "method": "GET", "query": { "type": "object", @@ -5463,11 +5426,11 @@ }, "additionalProperties": false }, - "bindingVersion": "0.1.0" + "bindingVersion": "0.2.0" } ] }, - "bindings-amqp-0.2.0-operation": { + "bindings-amqp-0.3.0-operation": { "title": "AMQP operation bindings object", "description": "This object contains information about the operation representation in AMQP.", "type": "object", @@ -5517,10 +5480,6 @@ }, "description": "Like cc but consumers will not receive this information." }, - "replyTo": { - "type": "string", - "description": "Name of the queue where the consumer should send the response." - }, "timestamp": { "type": "boolean", "description": "Whether the message should include a timestamp or not." @@ -5532,7 +5491,7 @@ "bindingVersion": { "type": "string", "enum": [ - "0.2.0" + "0.3.0" ], "description": "The version of this binding. If omitted, \"latest\" MUST be assumed." } @@ -5550,14 +5509,13 @@ "bcc": [ "external.audit" ], - "replyTo": "user.signedup", "timestamp": true, "ack": false, - "bindingVersion": "0.2.0" + "bindingVersion": "0.3.0" } ] }, - "bindings-mqtt-0.1.0-operation": { + "bindings-mqtt-0.2.0-operation": { "title": "MQTT operation bindings object", "description": "This object contains information about the operation representation in MQTT.", "type": "object", @@ -5579,7 +5537,7 @@ "bindingVersion": { "type": "string", "enum": [ - "0.1.0" + "0.2.0" ], "description": "The version of this binding. If omitted, 'latest' MUST be assumed." } @@ -5588,7 +5546,7 @@ { "qos": 2, "retain": true, - "bindingVersion": "0.1.0" + "bindingVersion": "0.2.0" } ] }, diff --git a/schemas/3.0.0.json b/schemas/3.0.0.json index a9e52882..1c28feb0 100644 --- a/schemas/3.0.0.json +++ b/schemas/3.0.0.json @@ -959,7 +959,7 @@ "properties": { "bindingVersion": { "enum": [ - "0.1.0" + "0.2.0" ] } }, @@ -974,7 +974,7 @@ } }, "then": { - "$ref": "http://asyncapi.com/bindings/mqtt/0.1.0/server.json" + "$ref": "http://asyncapi.com/bindings/mqtt/0.2.0/server.json" } }, { @@ -984,12 +984,12 @@ ], "properties": { "bindingVersion": { - "const": "0.1.0" + "const": "0.2.0" } } }, "then": { - "$ref": "http://asyncapi.com/bindings/mqtt/0.1.0/server.json" + "$ref": "http://asyncapi.com/bindings/mqtt/0.2.0/server.json" } } ] @@ -1231,8 +1231,8 @@ } } }, - "http://asyncapi.com/bindings/mqtt/0.1.0/server.json": { - "$id": "http://asyncapi.com/bindings/mqtt/0.1.0/server.json", + "http://asyncapi.com/bindings/mqtt/0.2.0/server.json": { + "$id": "http://asyncapi.com/bindings/mqtt/0.2.0/server.json", "title": "MQTT server bindings object", "description": "This object contains information about the server representation in MQTT.", "type": "object", @@ -1285,7 +1285,7 @@ "bindingVersion": { "type": "string", "enum": [ - "0.1.0" + "0.2.0" ], "description": "The version of this binding. If omitted, 'latest' MUST be assumed." } @@ -1301,7 +1301,7 @@ "retain": false }, "keepAlive": 60, - "bindingVersion": "0.1.0" + "bindingVersion": "0.2.0" } ] }, @@ -3048,7 +3048,7 @@ "properties": { "bindingVersion": { "enum": [ - "0.1.0" + "0.2.0" ] } }, @@ -3063,7 +3063,7 @@ } }, "then": { - "$ref": "http://asyncapi.com/bindings/http/0.1.0/message.json" + "$ref": "http://asyncapi.com/bindings/http/0.2.0/message.json" } }, { @@ -3073,12 +3073,12 @@ ], "properties": { "bindingVersion": { - "const": "0.1.0" + "const": "0.2.0" } } }, "then": { - "$ref": "http://asyncapi.com/bindings/http/0.1.0/message.json" + "$ref": "http://asyncapi.com/bindings/http/0.2.0/message.json" } } ] @@ -3088,7 +3088,7 @@ "properties": { "bindingVersion": { "enum": [ - "0.2.0" + "0.3.0" ] } }, @@ -3103,7 +3103,7 @@ } }, "then": { - "$ref": "http://asyncapi.com/bindings/amqp/0.2.0/message.json" + "$ref": "http://asyncapi.com/bindings/amqp/0.3.0/message.json" } }, { @@ -3113,12 +3113,12 @@ ], "properties": { "bindingVersion": { - "const": "0.2.0" + "const": "0.3.0" } } }, "then": { - "$ref": "http://asyncapi.com/bindings/amqp/0.2.0/message.json" + "$ref": "http://asyncapi.com/bindings/amqp/0.3.0/message.json" } } ] @@ -3128,7 +3128,7 @@ "properties": { "bindingVersion": { "enum": [ - "0.1.0" + "0.2.0" ] } }, @@ -3143,7 +3143,7 @@ } }, "then": { - "$ref": "http://asyncapi.com/bindings/mqtt/0.1.0/message.json" + "$ref": "http://asyncapi.com/bindings/mqtt/0.2.0/message.json" } }, { @@ -3153,12 +3153,12 @@ ], "properties": { "bindingVersion": { - "const": "0.1.0" + "const": "0.2.0" } } }, "then": { - "$ref": "http://asyncapi.com/bindings/mqtt/0.1.0/message.json" + "$ref": "http://asyncapi.com/bindings/mqtt/0.2.0/message.json" } } ] @@ -3361,8 +3361,8 @@ } } }, - "http://asyncapi.com/bindings/http/0.1.0/message.json": { - "$id": "http://asyncapi.com/bindings/http/0.1.0/message.json", + "http://asyncapi.com/bindings/http/0.2.0/message.json": { + "$id": "http://asyncapi.com/bindings/http/0.2.0/message.json", "title": "HTTP message bindings object", "description": "This object contains information about the message representation in HTTP.", "type": "object", @@ -3380,7 +3380,7 @@ "bindingVersion": { "type": "string", "enum": [ - "0.1.0" + "0.2.0" ], "description": "The version of this binding. If omitted, \"latest\" MUST be assumed." } @@ -3398,12 +3398,12 @@ } } }, - "bindingVersion": "0.1.0" + "bindingVersion": "0.2.0" } ] }, - "http://asyncapi.com/bindings/amqp/0.2.0/message.json": { - "$id": "http://asyncapi.com/bindings/amqp/0.2.0/message.json", + "http://asyncapi.com/bindings/amqp/0.3.0/message.json": { + "$id": "http://asyncapi.com/bindings/amqp/0.3.0/message.json", "title": "AMQP message bindings object", "description": "This object contains information about the message representation in AMQP.", "type": "object", @@ -3425,7 +3425,7 @@ "bindingVersion": { "type": "string", "enum": [ - "0.2.0" + "0.3.0" ], "description": "The version of this binding. If omitted, \"latest\" MUST be assumed." } @@ -3434,12 +3434,12 @@ { "contentEncoding": "gzip", "messageType": "user.signup", - "bindingVersion": "0.2.0" + "bindingVersion": "0.3.0" } ] }, - "http://asyncapi.com/bindings/mqtt/0.1.0/message.json": { - "$id": "http://asyncapi.com/bindings/mqtt/0.1.0/message.json", + "http://asyncapi.com/bindings/mqtt/0.2.0/message.json": { + "$id": "http://asyncapi.com/bindings/mqtt/0.2.0/message.json", "title": "MQTT message bindings object", "description": "This object contains information about the message representation in MQTT.", "type": "object", @@ -3453,14 +3453,14 @@ "bindingVersion": { "type": "string", "enum": [ - "0.1.0" + "0.2.0" ], "description": "The version of this binding. If omitted, 'latest' MUST be assumed." } }, "examples": [ { - "bindingVersion": "0.1.0" + "bindingVersion": "0.2.0" } ] }, @@ -4004,7 +4004,7 @@ "properties": { "bindingVersion": { "enum": [ - "0.2.0" + "0.3.0" ] } }, @@ -4019,7 +4019,7 @@ } }, "then": { - "$ref": "http://asyncapi.com/bindings/amqp/0.2.0/channel.json" + "$ref": "http://asyncapi.com/bindings/amqp/0.3.0/channel.json" } }, { @@ -4029,12 +4029,12 @@ ], "properties": { "bindingVersion": { - "const": "0.2.0" + "const": "0.3.0" } } }, "then": { - "$ref": "http://asyncapi.com/bindings/amqp/0.2.0/channel.json" + "$ref": "http://asyncapi.com/bindings/amqp/0.3.0/channel.json" } } ] @@ -4305,8 +4305,8 @@ } ] }, - "http://asyncapi.com/bindings/amqp/0.2.0/channel.json": { - "$id": "http://asyncapi.com/bindings/amqp/0.2.0/channel.json", + "http://asyncapi.com/bindings/amqp/0.3.0/channel.json": { + "$id": "http://asyncapi.com/bindings/amqp/0.3.0/channel.json", "title": "AMQP channel bindings object", "description": "This object contains information about the channel representation in AMQP.", "type": "object", @@ -4391,7 +4391,7 @@ "bindingVersion": { "type": "string", "enum": [ - "0.2.0" + "0.3.0" ], "description": "The version of this binding. If omitted, 'latest' MUST be assumed." } @@ -4438,7 +4438,7 @@ "autoDelete": false, "vhost": "/" }, - "bindingVersion": "0.2.0" + "bindingVersion": "0.3.0" }, { "is": "queue", @@ -4449,7 +4449,7 @@ "autoDelete": false, "vhost": "/" }, - "bindingVersion": "0.2.0" + "bindingVersion": "0.3.0" } ] }, @@ -5143,7 +5143,7 @@ "properties": { "bindingVersion": { "enum": [ - "0.1.0" + "0.2.0" ] } }, @@ -5158,7 +5158,7 @@ } }, "then": { - "$ref": "http://asyncapi.com/bindings/http/0.1.0/operation.json" + "$ref": "http://asyncapi.com/bindings/http/0.2.0/operation.json" } }, { @@ -5168,12 +5168,12 @@ ], "properties": { "bindingVersion": { - "const": "0.1.0" + "const": "0.2.0" } } }, "then": { - "$ref": "http://asyncapi.com/bindings/http/0.1.0/operation.json" + "$ref": "http://asyncapi.com/bindings/http/0.2.0/operation.json" } } ] @@ -5183,7 +5183,7 @@ "properties": { "bindingVersion": { "enum": [ - "0.2.0" + "0.3.0" ] } }, @@ -5198,7 +5198,7 @@ } }, "then": { - "$ref": "http://asyncapi.com/bindings/amqp/0.2.0/operation.json" + "$ref": "http://asyncapi.com/bindings/amqp/0.3.0/operation.json" } }, { @@ -5208,12 +5208,12 @@ ], "properties": { "bindingVersion": { - "const": "0.2.0" + "const": "0.3.0" } } }, "then": { - "$ref": "http://asyncapi.com/bindings/amqp/0.2.0/operation.json" + "$ref": "http://asyncapi.com/bindings/amqp/0.3.0/operation.json" } } ] @@ -5223,7 +5223,7 @@ "properties": { "bindingVersion": { "enum": [ - "0.1.0" + "0.2.0" ] } }, @@ -5238,7 +5238,7 @@ } }, "then": { - "$ref": "http://asyncapi.com/bindings/mqtt/0.1.0/operation.json" + "$ref": "http://asyncapi.com/bindings/mqtt/0.2.0/operation.json" } }, { @@ -5248,12 +5248,12 @@ ], "properties": { "bindingVersion": { - "const": "0.1.0" + "const": "0.2.0" } } }, "then": { - "$ref": "http://asyncapi.com/bindings/mqtt/0.1.0/operation.json" + "$ref": "http://asyncapi.com/bindings/mqtt/0.2.0/operation.json" } } ] @@ -5434,8 +5434,8 @@ "googlepubsub": {} } }, - "http://asyncapi.com/bindings/http/0.1.0/operation.json": { - "$id": "http://asyncapi.com/bindings/http/0.1.0/operation.json", + "http://asyncapi.com/bindings/http/0.2.0/operation.json": { + "$id": "http://asyncapi.com/bindings/http/0.2.0/operation.json", "title": "HTTP operation bindings object", "description": "This object contains information about the operation representation in HTTP.", "type": "object", @@ -5446,14 +5446,6 @@ } }, "properties": { - "type": { - "type": "string", - "enum": [ - "request", - "response" - ], - "description": "Required. Type of operation. Its value MUST be either 'request' or 'response'." - }, "method": { "type": "string", "enum": [ @@ -5476,41 +5468,13 @@ "bindingVersion": { "type": "string", "enum": [ - "0.1.0" + "0.2.0" ], "description": "The version of this binding. If omitted, 'latest' MUST be assumed." } }, - "required": [ - "type" - ], - "oneOf": [ - { - "properties": { - "type": { - "const": "request" - } - }, - "required": [ - "method" - ] - }, - { - "properties": { - "is": { - "const": "response" - } - }, - "not": { - "required": [ - "method" - ] - } - } - ], "examples": [ { - "type": "response", "query": { "type": "object", "required": [ @@ -5525,10 +5489,9 @@ }, "additionalProperties": false }, - "bindingVersion": "0.1.0" + "bindingVersion": "0.2.0" }, { - "type": "request", "method": "GET", "query": { "type": "object", @@ -5544,12 +5507,12 @@ }, "additionalProperties": false }, - "bindingVersion": "0.1.0" + "bindingVersion": "0.2.0" } ] }, - "http://asyncapi.com/bindings/amqp/0.2.0/operation.json": { - "$id": "http://asyncapi.com/bindings/amqp/0.2.0/operation.json", + "http://asyncapi.com/bindings/amqp/0.3.0/operation.json": { + "$id": "http://asyncapi.com/bindings/amqp/0.3.0/operation.json", "title": "AMQP operation bindings object", "description": "This object contains information about the operation representation in AMQP.", "type": "object", @@ -5599,10 +5562,6 @@ }, "description": "Like cc but consumers will not receive this information." }, - "replyTo": { - "type": "string", - "description": "Name of the queue where the consumer should send the response." - }, "timestamp": { "type": "boolean", "description": "Whether the message should include a timestamp or not." @@ -5614,7 +5573,7 @@ "bindingVersion": { "type": "string", "enum": [ - "0.2.0" + "0.3.0" ], "description": "The version of this binding. If omitted, \"latest\" MUST be assumed." } @@ -5632,15 +5591,14 @@ "bcc": [ "external.audit" ], - "replyTo": "user.signedup", "timestamp": true, "ack": false, - "bindingVersion": "0.2.0" + "bindingVersion": "0.3.0" } ] }, - "http://asyncapi.com/bindings/mqtt/0.1.0/operation.json": { - "$id": "http://asyncapi.com/bindings/mqtt/0.1.0/operation.json", + "http://asyncapi.com/bindings/mqtt/0.2.0/operation.json": { + "$id": "http://asyncapi.com/bindings/mqtt/0.2.0/operation.json", "title": "MQTT operation bindings object", "description": "This object contains information about the operation representation in MQTT.", "type": "object", @@ -5662,7 +5620,7 @@ "bindingVersion": { "type": "string", "enum": [ - "0.1.0" + "0.2.0" ], "description": "The version of this binding. If omitted, 'latest' MUST be assumed." } @@ -5671,7 +5629,7 @@ { "qos": 2, "retain": true, - "bindingVersion": "0.1.0" + "bindingVersion": "0.2.0" } ] }, From bcab68c00a0b5697ea6a31013afd72da3d34a00f Mon Sep 17 00:00:00 2001 From: Jeremy Whitlock Date: Tue, 12 Sep 2023 06:16:41 -0400 Subject: [PATCH 069/102] feat: add googlepubsub bindings for v3 (#419) Co-authored-by: Sergio Moya <1083296+smoya@users.noreply.github.com> --- bindings/googlepubsub/0.2.0/channel.json | 84 ++++++++++++++++++++ bindings/googlepubsub/0.2.0/message.json | 50 ++++++++++++ definitions/3.0.0/channelBindingsObject.json | 8 +- definitions/3.0.0/messageBindingsObject.json | 8 +- 4 files changed, 142 insertions(+), 8 deletions(-) create mode 100644 bindings/googlepubsub/0.2.0/channel.json create mode 100644 bindings/googlepubsub/0.2.0/message.json diff --git a/bindings/googlepubsub/0.2.0/channel.json b/bindings/googlepubsub/0.2.0/channel.json new file mode 100644 index 00000000..3f63e2ab --- /dev/null +++ b/bindings/googlepubsub/0.2.0/channel.json @@ -0,0 +1,84 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/bindings/googlepubsub/0.2.0/channel.json", + "title": "Cloud Pub/Sub Channel Schema", + "description": "This object contains information about the channel representation for Google Cloud Pub/Sub.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "properties": { + "bindingVersion": { + "type": "string", + "enum": [ + "0.2.0" + ], + "description": "The version of this binding." + }, + "labels": { + "type": "object" + }, + "messageRetentionDuration": { + "type": "string" + }, + "messageStoragePolicy": { + "type": "object", + "additionalProperties": false, + "properties": { + "allowedPersistenceRegions": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "schemaSettings": { + "type": "object", + "additionalItems": false, + "properties": { + "encoding": { + "type": "string" + }, + "firstRevisionId": { + "type": "string" + }, + "lastRevisionId": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "encoding", + "name" + ] + } + }, + "required": [ + "schemaSettings" + ], + "examples": [ + { + "labels": { + "label1": "value1", + "label2": "value2" + }, + "messageRetentionDuration": "86400s", + "messageStoragePolicy": { + "allowedPersistenceRegions": [ + "us-central1", + "us-east1" + ] + }, + "schemaSettings": { + "encoding": "json", + "name": "projects/your-project-id/schemas/your-schema" + } + } + ] +} \ No newline at end of file diff --git a/bindings/googlepubsub/0.2.0/message.json b/bindings/googlepubsub/0.2.0/message.json new file mode 100644 index 00000000..4fa0dc44 --- /dev/null +++ b/bindings/googlepubsub/0.2.0/message.json @@ -0,0 +1,50 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/bindings/googlepubsub/0.2.0/message.json", + "title": "Cloud Pub/Sub Channel Schema", + "description": "This object contains information about the message representation for Google Cloud Pub/Sub.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "properties": { + "bindingVersion": { + "type": "string", + "enum": [ + "0.2.0" + ], + "description": "The version of this binding." + }, + "attributes": { + "type": "object" + }, + "orderingKey": { + "type": "string" + }, + "schema": { + "type": "object", + "additionalItems": false, + "properties": { + "name": { + "type": "string" + } + }, + "required": ["name"] + } + }, + "examples": [ + { + "schema": { + "name": "projects/your-project-id/schemas/your-avro-schema-id", + } + }, + { + "schema": { + "name": "projects/your-project-id/schemas/your-protobuf-schema-id", + } + } + ] +} \ No newline at end of file diff --git a/definitions/3.0.0/channelBindingsObject.json b/definitions/3.0.0/channelBindingsObject.json index 050f46eb..21ba2f2c 100644 --- a/definitions/3.0.0/channelBindingsObject.json +++ b/definitions/3.0.0/channelBindingsObject.json @@ -209,7 +209,7 @@ "googlepubsub": { "properties": { "bindingVersion": { - "enum": ["0.1.0"] + "enum": ["0.2.0"] } }, "allOf": [ @@ -223,7 +223,7 @@ } }, "then": { - "$ref": "http://asyncapi.com/bindings/googlepubsub/0.1.0/channel.json" + "$ref": "http://asyncapi.com/bindings/googlepubsub/0.2.0/channel.json" } }, { @@ -231,12 +231,12 @@ "required": [ "bindingVersion" ], "properties": { "bindingVersion": { - "const": "0.1.0" + "const": "0.2.0" } } }, "then": { - "$ref": "http://asyncapi.com/bindings/googlepubsub/0.1.0/channel.json" + "$ref": "http://asyncapi.com/bindings/googlepubsub/0.2.0/channel.json" } } ] diff --git a/definitions/3.0.0/messageBindingsObject.json b/definitions/3.0.0/messageBindingsObject.json index 128ddb47..cfe65074 100644 --- a/definitions/3.0.0/messageBindingsObject.json +++ b/definitions/3.0.0/messageBindingsObject.json @@ -256,7 +256,7 @@ "googlepubsub": { "properties": { "bindingVersion": { - "enum": ["0.1.0"] + "enum": ["0.2.0"] } }, "allOf": [ @@ -270,7 +270,7 @@ } }, "then": { - "$ref": "http://asyncapi.com/bindings/googlepubsub/0.1.0/message.json" + "$ref": "http://asyncapi.com/bindings/googlepubsub/0.2.0/message.json" } }, { @@ -278,12 +278,12 @@ "required": [ "bindingVersion" ], "properties": { "bindingVersion": { - "const": "0.1.0" + "const": "0.2.0" } } }, "then": { - "$ref": "http://asyncapi.com/bindings/googlepubsub/0.1.0/message.json" + "$ref": "http://asyncapi.com/bindings/googlepubsub/0.2.0/message.json" } } ] From 94ac45d3896216a050417102990b03f85d9697b0 Mon Sep 17 00:00:00 2001 From: asyncapi-bot Date: Tue, 12 Sep 2023 12:20:03 +0200 Subject: [PATCH 070/102] chore(release): v6.0.0-next-major-spec.7 (#423) --- package-lock.json | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index c31a091f..b07f25d0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "@asyncapi/specs", - "version": "6.0.0-next-major-spec.6", + "version": "6.0.0-next-major-spec.7", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index a96bcd3f..9dd22630 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@asyncapi/specs", - "version": "6.0.0-next-major-spec.6", + "version": "6.0.0-next-major-spec.7", "description": "AsyncAPI schema versions", "main": "index.js", "types": "index.d.ts", From 61b4f0470c577b6f5a315770ce3461bedd7d233c Mon Sep 17 00:00:00 2001 From: Jonas Lagoni Date: Wed, 4 Oct 2023 08:35:50 +0200 Subject: [PATCH 071/102] fix: kafka key can be reference (#426) --- bindings/kafka/0.4.0/message.json | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/bindings/kafka/0.4.0/message.json b/bindings/kafka/0.4.0/message.json index 88227378..34b53b9c 100644 --- a/bindings/kafka/0.4.0/message.json +++ b/bindings/kafka/0.4.0/message.json @@ -11,7 +11,14 @@ }, "properties": { "key": { - "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json", + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json", + } + ] "description": "The message key." }, "schemaIdLocation": { From ccbb08f72ec7697e6fdffc0ebe5fa9b2f8474880 Mon Sep 17 00:00:00 2001 From: asyncapi-bot Date: Wed, 4 Oct 2023 08:39:22 +0200 Subject: [PATCH 072/102] chore(release): v6.0.0-next-major-spec.8 (#427) --- package-lock.json | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index b07f25d0..b6225e31 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "@asyncapi/specs", - "version": "6.0.0-next-major-spec.7", + "version": "6.0.0-next-major-spec.8", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 9dd22630..da57017d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@asyncapi/specs", - "version": "6.0.0-next-major-spec.7", + "version": "6.0.0-next-major-spec.8", "description": "AsyncAPI schema versions", "main": "index.js", "types": "index.d.ts", From e6e0841f3e280128b72435c45db27888ec873135 Mon Sep 17 00:00:00 2001 From: Ace <40604284+AceTheCreator@users.noreply.github.com> Date: Sat, 7 Oct 2023 17:07:51 -0500 Subject: [PATCH 073/102] fix: remove trailing comma from kafka and googlepubsub bindings for messages (#429) --- bindings/googlepubsub/0.2.0/message.json | 4 +- bindings/kafka/0.4.0/message.json | 4 +- package-lock.json | 2652 +++++++++++++++++++++- tools/bundler/package-lock.json | 161 +- 4 files changed, 2815 insertions(+), 6 deletions(-) diff --git a/bindings/googlepubsub/0.2.0/message.json b/bindings/googlepubsub/0.2.0/message.json index 4fa0dc44..285b0774 100644 --- a/bindings/googlepubsub/0.2.0/message.json +++ b/bindings/googlepubsub/0.2.0/message.json @@ -38,12 +38,12 @@ "examples": [ { "schema": { - "name": "projects/your-project-id/schemas/your-avro-schema-id", + "name": "projects/your-project-id/schemas/your-avro-schema-id" } }, { "schema": { - "name": "projects/your-project-id/schemas/your-protobuf-schema-id", + "name": "projects/your-project-id/schemas/your-protobuf-schema-id" } } ] diff --git a/bindings/kafka/0.4.0/message.json b/bindings/kafka/0.4.0/message.json index 34b53b9c..bee7dc46 100644 --- a/bindings/kafka/0.4.0/message.json +++ b/bindings/kafka/0.4.0/message.json @@ -16,9 +16,9 @@ "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" }, { - "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json", + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" } - ] + ], "description": "The message key." }, "schemaIdLocation": { diff --git a/package-lock.json b/package-lock.json index b6225e31..f61bc35e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,8 +1,2658 @@ { "name": "@asyncapi/specs", "version": "6.0.0-next-major-spec.8", - "lockfileVersion": 1, + "lockfileVersion": 2, "requires": true, + "packages": { + "": { + "name": "@asyncapi/specs", + "version": "6.0.0-next-major-spec.8", + "license": "Apache-2.0", + "dependencies": { + "@types/json-schema": "^7.0.11" + }, + "devDependencies": { + "ajv": "^8.11.2", + "mocha": "^10.0.0", + "nyc": "^15.1.0" + } + }, + "node_modules/@babel/core": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.12.13.tgz", + "integrity": "sha512-BQKE9kXkPlXHPeqissfxo0lySWJcYdEP0hdtJOH/iJfDdhOCcgtNCjftCJg3qqauB4h+lz2N6ixM++b9DN1Tcw==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.12.13", + "@babel/generator": "^7.12.13", + "@babel/helper-module-transforms": "^7.12.13", + "@babel/helpers": "^7.12.13", + "@babel/parser": "^7.12.13", + "@babel/template": "^7.12.13", + "@babel/traverse": "^7.12.13", + "@babel/types": "^7.12.13", + "convert-source-map": "^1.7.0", + "debug": "^4.1.0", + "gensync": "^1.0.0-beta.1", + "json5": "^2.1.2", + "lodash": "^4.17.19", + "semver": "^5.4.1", + "source-map": "^0.5.0" + }, + "engines": { + "node": ">=6.9.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/babel" + } + }, + "node_modules/@babel/core/node_modules/@babel/code-frame": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.13.tgz", + "integrity": "sha512-HV1Cm0Q3ZrpCR93tkWOYiuYIgLxZXZFVG2VgK+MBWjUqZTundupbfx2aXarXuw5Ko5aMcjtJgbSs4vUGBS5v6g==", + "dev": true, + "dependencies": { + "@babel/highlight": "^7.12.13" + } + }, + "node_modules/@babel/core/node_modules/@babel/highlight": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.12.13.tgz", + "integrity": "sha512-kocDQvIbgMKlWxXe9fof3TQ+gkIPOUSEYhJjqUjvKMez3krV7vbzYCDq39Oj11UAVK7JqPVGQPlgE85dPNlQww==", + "dev": true, + "dependencies": { + "@babel/helper-validator-identifier": "^7.12.11", + "chalk": "^2.0.0", + "js-tokens": "^4.0.0" + } + }, + "node_modules/@babel/core/node_modules/semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true, + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/@babel/core/node_modules/source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/@babel/generator": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.12.13.tgz", + "integrity": "sha512-9qQ8Fgo8HaSvHEt6A5+BATP7XktD/AdAnObUeTRz5/e2y3kbrxZgz32qUJJsdmwUvBJzF4AeV21nGTNwv05Mpw==", + "dev": true, + "dependencies": { + "@babel/types": "^7.12.13", + "jsesc": "^2.5.1", + "source-map": "^0.5.0" + } + }, + "node_modules/@babel/generator/node_modules/source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/@babel/helper-function-name": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.12.13.tgz", + "integrity": "sha512-TZvmPn0UOqmvi5G4vvw0qZTpVptGkB1GL61R6lKvrSdIxGm5Pky7Q3fpKiIkQCAtRCBUwB0PaThlx9vebCDSwA==", + "dev": true, + "dependencies": { + "@babel/helper-get-function-arity": "^7.12.13", + "@babel/template": "^7.12.13", + "@babel/types": "^7.12.13" + } + }, + "node_modules/@babel/helper-get-function-arity": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.12.13.tgz", + "integrity": "sha512-DjEVzQNz5LICkzN0REdpD5prGoidvbdYk1BVgRUOINaWJP2t6avB27X1guXK1kXNrX0WMfsrm1A/ZBthYuIMQg==", + "dev": true, + "dependencies": { + "@babel/types": "^7.12.13" + } + }, + "node_modules/@babel/helper-member-expression-to-functions": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.12.13.tgz", + "integrity": "sha512-B+7nN0gIL8FZ8SvMcF+EPyB21KnCcZHQZFczCxbiNGV/O0rsrSBlWGLzmtBJ3GMjSVMIm4lpFhR+VdVBuIsUcQ==", + "dev": true, + "dependencies": { + "@babel/types": "^7.12.13" + } + }, + "node_modules/@babel/helper-module-imports": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.12.13.tgz", + "integrity": "sha512-NGmfvRp9Rqxy0uHSSVP+SRIW1q31a7Ji10cLBcqSDUngGentY4FRiHOFZFE1CLU5eiL0oE8reH7Tg1y99TDM/g==", + "dev": true, + "dependencies": { + "@babel/types": "^7.12.13" + } + }, + "node_modules/@babel/helper-module-transforms": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.12.13.tgz", + "integrity": "sha512-acKF7EjqOR67ASIlDTupwkKM1eUisNAjaSduo5Cz+793ikfnpe7p4Q7B7EWU2PCoSTPWsQkR7hRUWEIZPiVLGA==", + "dev": true, + "dependencies": { + "@babel/helper-module-imports": "^7.12.13", + "@babel/helper-replace-supers": "^7.12.13", + "@babel/helper-simple-access": "^7.12.13", + "@babel/helper-split-export-declaration": "^7.12.13", + "@babel/helper-validator-identifier": "^7.12.11", + "@babel/template": "^7.12.13", + "@babel/traverse": "^7.12.13", + "@babel/types": "^7.12.13", + "lodash": "^4.17.19" + } + }, + "node_modules/@babel/helper-optimise-call-expression": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.12.13.tgz", + "integrity": "sha512-BdWQhoVJkp6nVjB7nkFWcn43dkprYauqtk++Py2eaf/GRDFm5BxRqEIZCiHlZUGAVmtwKcsVL1dC68WmzeFmiA==", + "dev": true, + "dependencies": { + "@babel/types": "^7.12.13" + } + }, + "node_modules/@babel/helper-replace-supers": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.12.13.tgz", + "integrity": "sha512-pctAOIAMVStI2TMLhozPKbf5yTEXc0OJa0eENheb4w09SrgOWEs+P4nTOZYJQCqs8JlErGLDPDJTiGIp3ygbLg==", + "dev": true, + "dependencies": { + "@babel/helper-member-expression-to-functions": "^7.12.13", + "@babel/helper-optimise-call-expression": "^7.12.13", + "@babel/traverse": "^7.12.13", + "@babel/types": "^7.12.13" + } + }, + "node_modules/@babel/helper-simple-access": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.12.13.tgz", + "integrity": "sha512-0ski5dyYIHEfwpWGx5GPWhH35j342JaflmCeQmsPWcrOQDtCN6C1zKAVRFVbK53lPW2c9TsuLLSUDf0tIGJ5hA==", + "dev": true, + "dependencies": { + "@babel/types": "^7.12.13" + } + }, + "node_modules/@babel/helper-split-export-declaration": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.12.13.tgz", + "integrity": "sha512-tCJDltF83htUtXx5NLcaDqRmknv652ZWCHyoTETf1CXYJdPC7nohZohjUgieXhv0hTJdRf2FjDueFehdNucpzg==", + "dev": true, + "dependencies": { + "@babel/types": "^7.12.13" + } + }, + "node_modules/@babel/helper-validator-identifier": { + "version": "7.12.11", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.12.11.tgz", + "integrity": "sha512-np/lG3uARFybkoHokJUmf1QfEvRVCPbmQeUQpKow5cQ3xWrV9i3rUHodKDJPQfTVX61qKi+UdYk8kik84n7XOw==", + "dev": true + }, + "node_modules/@babel/helpers": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.12.13.tgz", + "integrity": "sha512-oohVzLRZ3GQEk4Cjhfs9YkJA4TdIDTObdBEZGrd6F/T0GPSnuV6l22eMcxlvcvzVIPH3VTtxbseudM1zIE+rPQ==", + "dev": true, + "dependencies": { + "@babel/template": "^7.12.13", + "@babel/traverse": "^7.12.13", + "@babel/types": "^7.12.13" + } + }, + "node_modules/@babel/parser": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.12.13.tgz", + "integrity": "sha512-z7n7ybOUzaRc3wwqLpAX8UFIXsrVXUJhtNGBwAnLz6d1KUapqyq7ad2La8gZ6CXhHmGAIL32cop8Tst4/PNWLw==", + "dev": true, + "bin": { + "parser": "bin/babel-parser.js" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@babel/template": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.12.13.tgz", + "integrity": "sha512-/7xxiGA57xMo/P2GVvdEumr8ONhFOhfgq2ihK3h1e6THqzTAkHbkXgB0xI9yeTfIUoH3+oAeHhqm/I43OTbbjA==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.12.13", + "@babel/parser": "^7.12.13", + "@babel/types": "^7.12.13" + } + }, + "node_modules/@babel/template/node_modules/@babel/code-frame": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.13.tgz", + "integrity": "sha512-HV1Cm0Q3ZrpCR93tkWOYiuYIgLxZXZFVG2VgK+MBWjUqZTundupbfx2aXarXuw5Ko5aMcjtJgbSs4vUGBS5v6g==", + "dev": true, + "dependencies": { + "@babel/highlight": "^7.12.13" + } + }, + "node_modules/@babel/template/node_modules/@babel/highlight": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.12.13.tgz", + "integrity": "sha512-kocDQvIbgMKlWxXe9fof3TQ+gkIPOUSEYhJjqUjvKMez3krV7vbzYCDq39Oj11UAVK7JqPVGQPlgE85dPNlQww==", + "dev": true, + "dependencies": { + "@babel/helper-validator-identifier": "^7.12.11", + "chalk": "^2.0.0", + "js-tokens": "^4.0.0" + } + }, + "node_modules/@babel/traverse": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.12.13.tgz", + "integrity": "sha512-3Zb4w7eE/OslI0fTp8c7b286/cQps3+vdLW3UcwC8VSJC6GbKn55aeVVu2QJNuCDoeKyptLOFrPq8WqZZBodyA==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.12.13", + "@babel/generator": "^7.12.13", + "@babel/helper-function-name": "^7.12.13", + "@babel/helper-split-export-declaration": "^7.12.13", + "@babel/parser": "^7.12.13", + "@babel/types": "^7.12.13", + "debug": "^4.1.0", + "globals": "^11.1.0", + "lodash": "^4.17.19" + } + }, + "node_modules/@babel/traverse/node_modules/@babel/code-frame": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.13.tgz", + "integrity": "sha512-HV1Cm0Q3ZrpCR93tkWOYiuYIgLxZXZFVG2VgK+MBWjUqZTundupbfx2aXarXuw5Ko5aMcjtJgbSs4vUGBS5v6g==", + "dev": true, + "dependencies": { + "@babel/highlight": "^7.12.13" + } + }, + "node_modules/@babel/traverse/node_modules/@babel/highlight": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.12.13.tgz", + "integrity": "sha512-kocDQvIbgMKlWxXe9fof3TQ+gkIPOUSEYhJjqUjvKMez3krV7vbzYCDq39Oj11UAVK7JqPVGQPlgE85dPNlQww==", + "dev": true, + "dependencies": { + "@babel/helper-validator-identifier": "^7.12.11", + "chalk": "^2.0.0", + "js-tokens": "^4.0.0" + } + }, + "node_modules/@babel/types": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.12.13.tgz", + "integrity": "sha512-oKrdZTld2im1z8bDwTOQvUbxKwE+854zc16qWZQlcTqMN00pWxHQ4ZeOq0yDMnisOpRykH2/5Qqcrk/OlbAjiQ==", + "dev": true, + "dependencies": { + "@babel/helper-validator-identifier": "^7.12.11", + "lodash": "^4.17.19", + "to-fast-properties": "^2.0.0" + } + }, + "node_modules/@istanbuljs/load-nyc-config": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", + "integrity": "sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==", + "dev": true, + "dependencies": { + "camelcase": "^5.3.1", + "find-up": "^4.1.0", + "get-package-type": "^0.1.0", + "js-yaml": "^3.13.1", + "resolve-from": "^5.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@istanbuljs/load-nyc-config/node_modules/find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "dependencies": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@istanbuljs/load-nyc-config/node_modules/locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "dependencies": { + "p-locate": "^4.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@istanbuljs/load-nyc-config/node_modules/p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@istanbuljs/load-nyc-config/node_modules/p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "dependencies": { + "p-limit": "^2.2.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@istanbuljs/load-nyc-config/node_modules/p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/@istanbuljs/load-nyc-config/node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/@istanbuljs/schema": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.2.tgz", + "integrity": "sha512-tsAQNx32a8CoFhjhijUIhI4kccIAgmGhy8LZMZgGfmXcpMbPRUqn5LWmgRttILi6yeGmBJd2xsPkFMs0PzgPCw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/@types/json-schema": { + "version": "7.0.11", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.11.tgz", + "integrity": "sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==" + }, + "node_modules/@ungap/promise-all-settled": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@ungap/promise-all-settled/-/promise-all-settled-1.1.2.tgz", + "integrity": "sha512-sL/cEvJWAnClXw0wHk85/2L0G6Sj8UB0Ctc1TEMbKSsmpRosqhwj9gWgFRZSrBr2f9tiXISwNhCPmlfqUqyb9Q==", + "dev": true + }, + "node_modules/aggregate-error": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.0.1.tgz", + "integrity": "sha512-quoaXsZ9/BLNae5yiNoUz+Nhkwz83GhWwtYFglcjEQB2NDHCIpApbqXxIFnm4Pq/Nvhrsq5sYJFyohrrxnTGAA==", + "dev": true, + "dependencies": { + "clean-stack": "^2.0.0", + "indent-string": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/ajv": { + "version": "8.12.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz", + "integrity": "sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==", + "dev": true, + "dependencies": { + "fast-deep-equal": "^3.1.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/ansi-colors": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", + "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/anymatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", + "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", + "dev": true, + "dependencies": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/append-transform": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/append-transform/-/append-transform-2.0.0.tgz", + "integrity": "sha512-7yeyCEurROLQJFv5Xj4lEGTy0borxepjFv1g22oAdqFu//SrAlDl1O1Nxx15SH1RoliUml6p8dwJW9jvZughhg==", + "dev": true, + "dependencies": { + "default-require-extensions": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/archy": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/archy/-/archy-1.0.0.tgz", + "integrity": "sha1-+cjBN1fMHde8N5rHeyxipcKGjEA=", + "dev": true + }, + "node_modules/argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "dependencies": { + "sprintf-js": "~1.0.2" + } + }, + "node_modules/balanced-match": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", + "dev": true + }, + "node_modules/binary-extensions": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", + "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dev": true, + "dependencies": { + "fill-range": "^7.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/browser-stdout": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", + "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", + "dev": true + }, + "node_modules/caching-transform": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/caching-transform/-/caching-transform-4.0.0.tgz", + "integrity": "sha512-kpqOvwXnjjN44D89K5ccQC+RUrsy7jB/XLlRrx0D7/2HNcTPqzsb6XgYoErwko6QsV184CA2YgS1fxDiiDZMWA==", + "dev": true, + "dependencies": { + "hasha": "^5.0.0", + "make-dir": "^3.0.0", + "package-hash": "^4.0.0", + "write-file-atomic": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/chalk/node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/chokidar": { + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", + "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + ], + "dependencies": { + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" + }, + "engines": { + "node": ">= 8.10.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, + "node_modules/clean-stack": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", + "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, + "node_modules/commondir": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", + "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=", + "dev": true + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "dev": true + }, + "node_modules/convert-source-map": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.7.0.tgz", + "integrity": "sha512-4FJkXzKXEDB1snCFZlLP4gpC3JILicCpGbzG9f9G7tGqGCzETQ2hWPrcinA9oU4wtf2biUaEH5065UnMeR33oA==", + "dev": true, + "dependencies": { + "safe-buffer": "~5.1.1" + } + }, + "node_modules/debug": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.2.0.tgz", + "integrity": "sha512-IX2ncY78vDTjZMFUdmsvIRFY2Cf4FnD0wRs+nQwJU8Lu99/tPFdb0VybiiMTPe3I6rQmwsqQqRBvxU+bZ/I8sg==", + "deprecated": "Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)", + "dev": true, + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/default-require-extensions": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/default-require-extensions/-/default-require-extensions-3.0.0.tgz", + "integrity": "sha512-ek6DpXq/SCpvjhpFsLFRVtIxJCRw6fUR42lYMVZuUMK7n8eMz4Uh5clckdBjEpLhn/gEBZo7hDJnJcwdKLKQjg==", + "dev": true, + "dependencies": { + "strip-bom": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/default-require-extensions/node_modules/strip-bom": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-4.0.0.tgz", + "integrity": "sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/diff": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-5.0.0.tgz", + "integrity": "sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==", + "dev": true, + "engines": { + "node": ">=0.3.1" + } + }, + "node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "node_modules/es6-error": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/es6-error/-/es6-error-4.1.1.tgz", + "integrity": "sha512-Um/+FxMr9CISWh0bi5Zv0iOD+4cFh5qLeks1qhAopKVAJw3drgKbKySikp7wGhDL0HPeaja0P5ULZrxLkniUVg==", + "dev": true + }, + "node_modules/escalade": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", + "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true, + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true + }, + "node_modules/fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dev": true, + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/find-cache-dir": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.1.tgz", + "integrity": "sha512-t2GDMt3oGC/v+BMwzmllWDuJF/xcDtE5j/fCGbqDD7OLuJkj0cfh1YSA5VKPvwMeLFLNDBkwOKZ2X85jGLVftQ==", + "dev": true, + "dependencies": { + "commondir": "^1.0.1", + "make-dir": "^3.0.2", + "pkg-dir": "^4.1.0" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/avajs/find-cache-dir?sponsor=1" + } + }, + "node_modules/flat": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", + "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", + "dev": true, + "bin": { + "flat": "cli.js" + } + }, + "node_modules/foreground-child": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-2.0.0.tgz", + "integrity": "sha512-dCIq9FpEcyQyXKCkyzmlPTFNgrCzPudOe+mhvJU5zAtlBnGVy2yKxtfsxK2tQBThwq225jcvBjpw1Gr40uzZCA==", + "dev": true, + "dependencies": { + "cross-spawn": "^7.0.0", + "signal-exit": "^3.0.2" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/foreground-child/node_modules/cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "dev": true, + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/foreground-child/node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/foreground-child/node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/foreground-child/node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/foreground-child/node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/fromentries": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/fromentries/-/fromentries-1.3.2.tgz", + "integrity": "sha512-cHEpEQHUg0f8XdtZCc2ZAhrHzKzT0MrFUTcvx+hfxYu7rGMDc5SKoXFh+n4YigxsHXRzc6OrCshdR1bWH6HHyg==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "dev": true + }, + "node_modules/fsevents": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", + "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "dev": true, + "hasInstallScript": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/gensync": { + "version": "1.0.0-beta.2", + "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", + "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true, + "engines": { + "node": "6.* || 8.* || >= 10.*" + } + }, + "node_modules/get-package-type": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/get-package-type/-/get-package-type-0.1.0.tgz", + "integrity": "sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==", + "dev": true, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/glob": { + "version": "7.1.6", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", + "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/globals": { + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", + "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/graceful-fs": { + "version": "4.2.10", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz", + "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==", + "dev": true + }, + "node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/hasha": { + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/hasha/-/hasha-5.2.2.tgz", + "integrity": "sha512-Hrp5vIK/xr5SkeN2onO32H0MgNZ0f17HRNH39WfL0SYUNOTZ5Lz1TJ8Pajo/87dYGEFlLMm7mIc/k/s6Bvz9HQ==", + "dev": true, + "dependencies": { + "is-stream": "^2.0.0", + "type-fest": "^0.8.0" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/hasha/node_modules/is-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.0.tgz", + "integrity": "sha512-XCoy+WlUr7d1+Z8GgSuXmpuUFC9fOhRXglJMx+dwLKTkL44Cjd4W1Z5P+BQZpr+cR93aGP4S/s7Ftw6Nd/kiEw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/hasha/node_modules/type-fest": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", + "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/he": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", + "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", + "dev": true, + "bin": { + "he": "bin/he" + } + }, + "node_modules/html-escaper": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", + "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", + "dev": true + }, + "node_modules/imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", + "dev": true, + "engines": { + "node": ">=0.8.19" + } + }, + "node_modules/indent-string": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", + "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "dev": true, + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true + }, + "node_modules/is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "dev": true, + "dependencies": { + "binary-extensions": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-glob": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", + "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", + "dev": true, + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true, + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/is-typedarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", + "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", + "dev": true + }, + "node_modules/is-unicode-supported": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", + "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-windows": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", + "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", + "dev": true + }, + "node_modules/istanbul-lib-coverage": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.0.0.tgz", + "integrity": "sha512-UiUIqxMgRDET6eR+o5HbfRYP1l0hqkWOs7vNxC/mggutCMUIhWMm8gAHb8tHlyfD3/l6rlgNA5cKdDzEAf6hEg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/istanbul-lib-hook": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-hook/-/istanbul-lib-hook-3.0.0.tgz", + "integrity": "sha512-Pt/uge1Q9s+5VAZ+pCo16TYMWPBIl+oaNIjgLQxcX0itS6ueeaA+pEfThZpH8WxhFgCiEb8sAJY6MdUKgiIWaQ==", + "dev": true, + "dependencies": { + "append-transform": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/istanbul-lib-instrument": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-4.0.3.tgz", + "integrity": "sha512-BXgQl9kf4WTCPCCpmFGoJkz/+uhvm7h7PFKUYxh7qarQd3ER33vHG//qaE8eN25l07YqZPpHXU9I09l/RD5aGQ==", + "dev": true, + "dependencies": { + "@babel/core": "^7.7.5", + "@istanbuljs/schema": "^0.1.2", + "istanbul-lib-coverage": "^3.0.0", + "semver": "^6.3.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/istanbul-lib-instrument/node_modules/semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/istanbul-lib-processinfo": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/istanbul-lib-processinfo/-/istanbul-lib-processinfo-2.0.2.tgz", + "integrity": "sha512-kOwpa7z9hme+IBPZMzQ5vdQj8srYgAtaRqeI48NGmAQ+/5yKiHLV0QbYqQpxsdEF0+w14SoB8YbnHKcXE2KnYw==", + "dev": true, + "dependencies": { + "archy": "^1.0.0", + "cross-spawn": "^7.0.0", + "istanbul-lib-coverage": "^3.0.0-alpha.1", + "make-dir": "^3.0.0", + "p-map": "^3.0.0", + "rimraf": "^3.0.0", + "uuid": "^3.3.3" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/istanbul-lib-processinfo/node_modules/cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "dev": true, + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/istanbul-lib-processinfo/node_modules/p-map": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-map/-/p-map-3.0.0.tgz", + "integrity": "sha512-d3qXVTF/s+W+CdJ5A29wywV2n8CQQYahlgz2bFiA+4eVNJbHJodPZ+/gXwPGh0bOqA+j8S+6+ckmvLGPk1QpxQ==", + "dev": true, + "dependencies": { + "aggregate-error": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/istanbul-lib-processinfo/node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/istanbul-lib-processinfo/node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/istanbul-lib-processinfo/node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/istanbul-lib-processinfo/node_modules/uuid": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", + "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", + "deprecated": "Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.", + "dev": true, + "bin": { + "uuid": "bin/uuid" + } + }, + "node_modules/istanbul-lib-processinfo/node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/istanbul-lib-report": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz", + "integrity": "sha512-wcdi+uAKzfiGT2abPpKZ0hSU1rGQjUQnLvtY5MpQ7QCTahD3VODhcu4wcfY1YtkGaDD5yuydOLINXsfbus9ROw==", + "dev": true, + "dependencies": { + "istanbul-lib-coverage": "^3.0.0", + "make-dir": "^3.0.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/istanbul-lib-report/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/istanbul-lib-report/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/istanbul-lib-source-maps": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.0.tgz", + "integrity": "sha512-c16LpFRkR8vQXyHZ5nLpY35JZtzj1PQY1iZmesUbf1FZHbIupcWfjgOXBY9YHkLEQ6puz1u4Dgj6qmU/DisrZg==", + "dev": true, + "dependencies": { + "debug": "^4.1.1", + "istanbul-lib-coverage": "^3.0.0", + "source-map": "^0.6.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/istanbul-reports": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.0.2.tgz", + "integrity": "sha512-9tZvz7AiR3PEDNGiV9vIouQ/EAcqMXFmkcA1CDFTwOB98OZVDL0PH9glHotf5Ugp6GCOTypfzGWI/OqjWNCRUw==", + "dev": true, + "dependencies": { + "html-escaper": "^2.0.0", + "istanbul-lib-report": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true + }, + "node_modules/js-yaml": { + "version": "3.14.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.0.tgz", + "integrity": "sha512-/4IbIeHcD9VMHFqDR/gQ7EdZdLimOvW2DdcxFjdyyZ9NsbS+ccrXqVWDtab/lRl5AlUqmpBx8EhPaWR+OtY17A==", + "dev": true, + "dependencies": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/jsesc": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", + "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", + "dev": true, + "bin": { + "jsesc": "bin/jsesc" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", + "dev": true + }, + "node_modules/json5": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.0.tgz", + "integrity": "sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA==", + "dev": true, + "dependencies": { + "minimist": "^1.2.5" + }, + "bin": { + "json5": "lib/cli.js" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", + "dev": true + }, + "node_modules/lodash.flattendeep": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/lodash.flattendeep/-/lodash.flattendeep-4.4.0.tgz", + "integrity": "sha1-+wMJF/hqMTTlvJvsDWngAT3f7bI=", + "dev": true + }, + "node_modules/log-symbols": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", + "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", + "dev": true, + "dependencies": { + "chalk": "^4.1.0", + "is-unicode-supported": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/log-symbols/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/log-symbols/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/log-symbols/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/log-symbols/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/log-symbols/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/log-symbols/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/make-dir": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", + "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", + "dev": true, + "dependencies": { + "semver": "^6.0.0" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/make-dir/node_modules/semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/minimist": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz", + "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==", + "dev": true + }, + "node_modules/mocha": { + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.0.0.tgz", + "integrity": "sha512-0Wl+elVUD43Y0BqPZBzZt8Tnkw9CMUdNYnUsTfOM1vuhJVZL+kiesFYsqwBkEEuEixaiPe5ZQdqDgX2jddhmoA==", + "dev": true, + "dependencies": { + "@ungap/promise-all-settled": "1.1.2", + "ansi-colors": "4.1.1", + "browser-stdout": "1.3.1", + "chokidar": "3.5.3", + "debug": "4.3.4", + "diff": "5.0.0", + "escape-string-regexp": "4.0.0", + "find-up": "5.0.0", + "glob": "7.2.0", + "he": "1.2.0", + "js-yaml": "4.1.0", + "log-symbols": "4.1.0", + "minimatch": "5.0.1", + "ms": "2.1.3", + "nanoid": "3.3.3", + "serialize-javascript": "6.0.0", + "strip-json-comments": "3.1.1", + "supports-color": "8.1.1", + "workerpool": "6.2.1", + "yargs": "16.2.0", + "yargs-parser": "20.2.4", + "yargs-unparser": "2.0.0" + }, + "bin": { + "_mocha": "bin/_mocha", + "mocha": "bin/mocha.js" + }, + "engines": { + "node": ">= 14.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/mochajs" + } + }, + "node_modules/mocha/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/mocha/node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true + }, + "node_modules/mocha/node_modules/cliui": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", + "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", + "dev": true, + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.0.0" + } + }, + "node_modules/mocha/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/mocha/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/mocha/node_modules/debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/mocha/node_modules/debug/node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "node_modules/mocha/node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/mocha/node_modules/find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dev": true, + "dependencies": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/mocha/node_modules/glob": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", + "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/mocha/node_modules/glob/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/mocha/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/mocha/node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/mocha/node_modules/locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dev": true, + "dependencies": { + "p-locate": "^5.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/mocha/node_modules/minimatch": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.0.1.tgz", + "integrity": "sha512-nLDxIFRyhDblz3qMuq+SoRZED4+miJ/G+tdDrjkkkRnjAsBexeGpgjLEQ0blJy7rHhR2b93rhQY4SvyWu9v03g==", + "dev": true, + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/mocha/node_modules/minimatch/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/mocha/node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true + }, + "node_modules/mocha/node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/mocha/node_modules/p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, + "dependencies": { + "p-limit": "^3.0.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/mocha/node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/mocha/node_modules/strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/mocha/node_modules/supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" + } + }, + "node_modules/mocha/node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/mocha/node_modules/y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/mocha/node_modules/yargs": { + "version": "16.2.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", + "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", + "dev": true, + "dependencies": { + "cliui": "^7.0.2", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.0", + "y18n": "^5.0.5", + "yargs-parser": "^20.2.2" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/mocha/node_modules/yargs-parser": { + "version": "20.2.4", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz", + "integrity": "sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "node_modules/nanoid": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.3.tgz", + "integrity": "sha512-p1sjXuopFs0xg+fPASzQ28agW1oHD7xDsd9Xkf3T15H3c/cifrFHVwrh74PdoklAPi+i7MdRsE47vm2r6JoB+w==", + "dev": true, + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + } + }, + "node_modules/node-preload": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/node-preload/-/node-preload-0.2.1.tgz", + "integrity": "sha512-RM5oyBy45cLEoHqCeh+MNuFAxO0vTFBLskvQbOKnEE7YTTSN4tbN8QWDIPQ6L+WvKsB/qLEGpYe2ZZ9d4W9OIQ==", + "dev": true, + "dependencies": { + "process-on-spawn": "^1.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/nyc": { + "version": "15.1.0", + "resolved": "https://registry.npmjs.org/nyc/-/nyc-15.1.0.tgz", + "integrity": "sha512-jMW04n9SxKdKi1ZMGhvUTHBN0EICCRkHemEoE5jm6mTYcqcdas0ATzgUgejlQUHMvpnOZqGB5Xxsv9KxJW1j8A==", + "dev": true, + "dependencies": { + "@istanbuljs/load-nyc-config": "^1.0.0", + "@istanbuljs/schema": "^0.1.2", + "caching-transform": "^4.0.0", + "convert-source-map": "^1.7.0", + "decamelize": "^1.2.0", + "find-cache-dir": "^3.2.0", + "find-up": "^4.1.0", + "foreground-child": "^2.0.0", + "get-package-type": "^0.1.0", + "glob": "^7.1.6", + "istanbul-lib-coverage": "^3.0.0", + "istanbul-lib-hook": "^3.0.0", + "istanbul-lib-instrument": "^4.0.0", + "istanbul-lib-processinfo": "^2.0.2", + "istanbul-lib-report": "^3.0.0", + "istanbul-lib-source-maps": "^4.0.0", + "istanbul-reports": "^3.0.2", + "make-dir": "^3.0.0", + "node-preload": "^0.2.1", + "p-map": "^3.0.0", + "process-on-spawn": "^1.0.0", + "resolve-from": "^5.0.0", + "rimraf": "^3.0.0", + "signal-exit": "^3.0.2", + "spawn-wrap": "^2.0.0", + "test-exclude": "^6.0.0", + "yargs": "^15.0.2" + }, + "bin": { + "nyc": "bin/nyc.js" + }, + "engines": { + "node": ">=8.9" + } + }, + "node_modules/nyc/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/nyc/node_modules/cliui": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz", + "integrity": "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==", + "dev": true, + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^6.2.0" + } + }, + "node_modules/nyc/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/nyc/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/nyc/node_modules/find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "dependencies": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/nyc/node_modules/locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "dependencies": { + "p-locate": "^4.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/nyc/node_modules/p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/nyc/node_modules/p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "dependencies": { + "p-limit": "^2.2.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/nyc/node_modules/wrap-ansi": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", + "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/nyc/node_modules/y18n": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz", + "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==", + "dev": true + }, + "node_modules/nyc/node_modules/yargs": { + "version": "15.4.1", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-15.4.1.tgz", + "integrity": "sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==", + "dev": true, + "dependencies": { + "cliui": "^6.0.0", + "decamelize": "^1.2.0", + "find-up": "^4.1.0", + "get-caller-file": "^2.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^2.0.0", + "set-blocking": "^2.0.0", + "string-width": "^4.2.0", + "which-module": "^2.0.0", + "y18n": "^4.0.0", + "yargs-parser": "^18.1.2" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/nyc/node_modules/yargs-parser": { + "version": "18.1.3", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.3.tgz", + "integrity": "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==", + "dev": true, + "dependencies": { + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "dev": true, + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/p-map": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-map/-/p-map-3.0.0.tgz", + "integrity": "sha512-d3qXVTF/s+W+CdJ5A29wywV2n8CQQYahlgz2bFiA+4eVNJbHJodPZ+/gXwPGh0bOqA+j8S+6+ckmvLGPk1QpxQ==", + "dev": true, + "dependencies": { + "aggregate-error": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/package-hash": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/package-hash/-/package-hash-4.0.0.tgz", + "integrity": "sha512-whdkPIooSu/bASggZ96BWVvZTRMOFxnyUG5PnTSGKoJE2gd5mbVNmR2Nj20QFzxYYgAXpoqC+AiXzl+UMRh7zQ==", + "dev": true, + "dependencies": { + "graceful-fs": "^4.1.15", + "hasha": "^5.0.0", + "lodash.flattendeep": "^4.4.0", + "release-zalgo": "^1.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/pkg-dir": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", + "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", + "dev": true, + "dependencies": { + "find-up": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/pkg-dir/node_modules/find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "dependencies": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/pkg-dir/node_modules/locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "dependencies": { + "p-locate": "^4.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/pkg-dir/node_modules/p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/pkg-dir/node_modules/p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "dependencies": { + "p-limit": "^2.2.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/process-on-spawn": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/process-on-spawn/-/process-on-spawn-1.0.0.tgz", + "integrity": "sha512-1WsPDsUSMmZH5LeMLegqkPDrsGgsWwk1Exipy2hvB0o/F0ASzbpIctSCcZIK1ykJvtTJULEH+20WOFjMvGnCTg==", + "dev": true, + "dependencies": { + "fromentries": "^1.2.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/punycode": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz", + "integrity": "sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/randombytes": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", + "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", + "dev": true, + "dependencies": { + "safe-buffer": "^5.1.0" + } + }, + "node_modules/readdirp": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "dev": true, + "dependencies": { + "picomatch": "^2.2.1" + }, + "engines": { + "node": ">=8.10.0" + } + }, + "node_modules/release-zalgo": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/release-zalgo/-/release-zalgo-1.0.0.tgz", + "integrity": "sha1-CXALflB0Mpc5Mw5TXFqQ+2eFFzA=", + "dev": true, + "dependencies": { + "es6-error": "^4.0.1" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/require-from-string": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", + "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/require-main-filename": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", + "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", + "dev": true + }, + "node_modules/resolve-from": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "dev": true, + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + }, + "node_modules/serialize-javascript": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz", + "integrity": "sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==", + "dev": true, + "dependencies": { + "randombytes": "^2.1.0" + } + }, + "node_modules/set-blocking": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", + "dev": true + }, + "node_modules/signal-exit": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", + "dev": true + }, + "node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/spawn-wrap": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/spawn-wrap/-/spawn-wrap-2.0.0.tgz", + "integrity": "sha512-EeajNjfN9zMnULLwhZZQU3GWBoFNkbngTUPfaawT4RkMiviTxcX0qfhVbGey39mfctfDHkWtuecgQ8NJcyQWHg==", + "dev": true, + "dependencies": { + "foreground-child": "^2.0.0", + "is-windows": "^1.0.2", + "make-dir": "^3.0.0", + "rimraf": "^3.0.0", + "signal-exit": "^3.0.2", + "which": "^2.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", + "dev": true + }, + "node_modules/string-width": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz", + "integrity": "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==", + "dev": true, + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/test-exclude": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz", + "integrity": "sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==", + "dev": true, + "dependencies": { + "@istanbuljs/schema": "^0.1.2", + "glob": "^7.1.4", + "minimatch": "^3.0.4" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/to-fast-properties": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", + "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/typedarray-to-buffer": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz", + "integrity": "sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==", + "dev": true, + "dependencies": { + "is-typedarray": "^1.0.0" + } + }, + "node_modules/uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dev": true, + "dependencies": { + "punycode": "^2.1.0" + } + }, + "node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/which-module": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", + "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", + "dev": true + }, + "node_modules/workerpool": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.2.1.tgz", + "integrity": "sha512-ILEIE97kDZvF9Wb9f6h5aXK4swSlKGUcOEGiIYb2OOu/IrDU9iwj0fD//SsA6E5ibwJxpEvhullJY4Sl4GcpAw==", + "dev": true + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", + "dev": true + }, + "node_modules/write-file-atomic": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-3.0.3.tgz", + "integrity": "sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q==", + "dev": true, + "dependencies": { + "imurmurhash": "^0.1.4", + "is-typedarray": "^1.0.0", + "signal-exit": "^3.0.2", + "typedarray-to-buffer": "^3.1.5" + } + }, + "node_modules/yargs-unparser": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-2.0.0.tgz", + "integrity": "sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==", + "dev": true, + "dependencies": { + "camelcase": "^6.0.0", + "decamelize": "^4.0.0", + "flat": "^5.0.2", + "is-plain-obj": "^2.1.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/yargs-unparser/node_modules/camelcase": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", + "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/yargs-unparser/node_modules/decamelize": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz", + "integrity": "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/yargs-unparser/node_modules/is-plain-obj": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", + "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + } + }, "dependencies": { "@babel/core": { "version": "7.12.13", diff --git a/tools/bundler/package-lock.json b/tools/bundler/package-lock.json index b1fa81ba..9fbfd63d 100644 --- a/tools/bundler/package-lock.json +++ b/tools/bundler/package-lock.json @@ -1,8 +1,167 @@ { "name": "bundler", "version": "1.0.0", - "lockfileVersion": 1, + "lockfileVersion": 2, "requires": true, + "packages": { + "": { + "name": "bundler", + "version": "1.0.0", + "license": "Apache-2.0", + "dependencies": { + "@hyperjump/json-schema-bundle": "0.1.3", + "json-schema-traverse": "^1.0.0" + } + }, + "node_modules/@hyperjump/json-pointer": { + "version": "0.9.1", + "resolved": "https://registry.npmjs.org/@hyperjump/json-pointer/-/json-pointer-0.9.1.tgz", + "integrity": "sha512-tiDl/9MOkkiUQ5t+wq4PhtPghgWmFyBwU9Q6xRkXksg2s/6GNxNPcO/MzOjJoDAeCY1XXajNUIkco7wvhNmlOA==", + "dependencies": { + "just-curry-it": "^3.2.1" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/jdesrosiers" + } + }, + "node_modules/@hyperjump/json-schema": { + "version": "0.18.3", + "resolved": "https://registry.npmjs.org/@hyperjump/json-schema/-/json-schema-0.18.3.tgz", + "integrity": "sha512-HKrrsuJOlYdqpHEr/eRU99LCiAe8ZH4LUkQOQOMa/P8pNSgs4FQHMKy3sgkmgLSgdmQbRX2/hA+yn2Ts/gS0lA==", + "dependencies": { + "@hyperjump/json-schema-core": "^0.23.4", + "fastest-stable-stringify": "^2.0.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/jdesrosiers" + } + }, + "node_modules/@hyperjump/json-schema-bundle": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/@hyperjump/json-schema-bundle/-/json-schema-bundle-0.1.3.tgz", + "integrity": "sha512-UjmmtyIgaMXRXKmkJDQhvGAQFSfaPYBRue4tk3qeISrD468vziCWI2Km0RgfeXVxgy5xgqEPyi9DLXUqD4KWDQ==", + "deprecated": "This package was rolled into @hyperjump/json-schema as of v1.2.0", + "dependencies": { + "@hyperjump/json-schema": "^0.18.3", + "uuid": "^8.3.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/jdesrosiers" + } + }, + "node_modules/@hyperjump/json-schema-core": { + "version": "0.23.4", + "resolved": "https://registry.npmjs.org/@hyperjump/json-schema-core/-/json-schema-core-0.23.4.tgz", + "integrity": "sha512-rHORA3qPk2JKOJOgwgXzGkMnad0neoPiHK8tPrITNxCcVM+AwPkTK+ABogNhbFG4lipWVF4gB3XHJ2qxfQuSAw==", + "deprecated": "This package was rolled into @hyperjump/json-schema as of v1.0.0", + "dependencies": { + "@hyperjump/json-pointer": "^0.9.1", + "@hyperjump/pact": "^0.2.0", + "content-type": "^1.0.4", + "node-fetch": "^2.6.5", + "pubsub-js": "^1.9.1", + "url-resolve-browser": "^1.2.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/jdesrosiers" + } + }, + "node_modules/@hyperjump/pact": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/@hyperjump/pact/-/pact-0.2.0.tgz", + "integrity": "sha512-RHt0XRFsADXbqopurGZfCUNL7mPc0695TD2HNDqs4RCK5Db/1lDU2Bhk9EsyFmCBE9N1/boyvdKWjT1UYHIebg==", + "dependencies": { + "just-curry-it": "^3.1.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/jdesrosiers" + } + }, + "node_modules/content-type": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz", + "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/fastest-stable-stringify": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/fastest-stable-stringify/-/fastest-stable-stringify-2.0.2.tgz", + "integrity": "sha512-bijHueCGd0LqqNK9b5oCMHc0MluJAx0cwqASgbWMvkO01lCYgIhacVRLcaDz3QnyYIRNJRDwMb41VuT6pHJ91Q==" + }, + "node_modules/json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==" + }, + "node_modules/just-curry-it": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/just-curry-it/-/just-curry-it-3.2.1.tgz", + "integrity": "sha512-Q8206k8pTY7krW32cdmPsP+DqqLgWx/hYPSj9/+7SYqSqz7UuwPbfSe07lQtvuuaVyiSJveXk0E5RydOuWwsEg==" + }, + "node_modules/node-fetch": { + "version": "2.6.7", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", + "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==", + "dependencies": { + "whatwg-url": "^5.0.0" + }, + "engines": { + "node": "4.x || >=6.0.0" + }, + "peerDependencies": { + "encoding": "^0.1.0" + }, + "peerDependenciesMeta": { + "encoding": { + "optional": true + } + } + }, + "node_modules/pubsub-js": { + "version": "1.9.4", + "resolved": "https://registry.npmjs.org/pubsub-js/-/pubsub-js-1.9.4.tgz", + "integrity": "sha512-hJYpaDvPH4w8ZX/0Fdf9ma1AwRgU353GfbaVfPjfJQf1KxZ2iHaHl3fAUw1qlJIR5dr4F3RzjGaWohYUEyoh7A==" + }, + "node_modules/tr46": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", + "integrity": "sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o=" + }, + "node_modules/url-resolve-browser": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/url-resolve-browser/-/url-resolve-browser-1.2.0.tgz", + "integrity": "sha512-L9PBPnlKNDFzt9ElK4br8I8Tufdm1xgv1GhMeiP7ZC87x0b7mr+4vSh13kmPq5km80JKX+UD2BeEFTCrFZ6xDA==" + }, + "node_modules/uuid": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", + "bin": { + "uuid": "dist/bin/uuid" + } + }, + "node_modules/webidl-conversions": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", + "integrity": "sha1-JFNCdeKnvGvnvIZhHMFq4KVlSHE=" + }, + "node_modules/whatwg-url": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", + "integrity": "sha1-lmRU6HZUYuN2RNNib2dCzotwll0=", + "dependencies": { + "tr46": "~0.0.3", + "webidl-conversions": "^3.0.0" + } + } + }, "dependencies": { "@hyperjump/json-pointer": { "version": "0.9.1", From ae2b0d4c09d9c18d8436ec8355265baf45443445 Mon Sep 17 00:00:00 2001 From: asyncapi-bot Date: Sun, 8 Oct 2023 00:12:29 +0200 Subject: [PATCH 074/102] chore(release): v6.0.0-next-major-spec.9 (#430) --- package-lock.json | 4 +-- package.json | 2 +- schemas/3.0.0-without-$id.json | 51 +++++++++++++++---------------- schemas/3.0.0.json | 55 ++++++++++++++++------------------ 4 files changed, 53 insertions(+), 59 deletions(-) diff --git a/package-lock.json b/package-lock.json index f61bc35e..276c0a77 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@asyncapi/specs", - "version": "6.0.0-next-major-spec.8", + "version": "6.0.0-next-major-spec.9", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@asyncapi/specs", - "version": "6.0.0-next-major-spec.8", + "version": "6.0.0-next-major-spec.9", "license": "Apache-2.0", "dependencies": { "@types/json-schema": "^7.0.11" diff --git a/package.json b/package.json index da57017d..e4527433 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@asyncapi/specs", - "version": "6.0.0-next-major-spec.8", + "version": "6.0.0-next-major-spec.9", "description": "AsyncAPI schema versions", "main": "index.js", "types": "index.d.ts", diff --git a/schemas/3.0.0-without-$id.json b/schemas/3.0.0-without-$id.json index a2654ac5..cc25a968 100644 --- a/schemas/3.0.0-without-$id.json +++ b/schemas/3.0.0-without-$id.json @@ -3271,7 +3271,7 @@ "properties": { "bindingVersion": { "enum": [ - "0.1.0" + "0.2.0" ] } }, @@ -3286,7 +3286,7 @@ } }, "then": { - "$ref": "#/definitions/bindings-googlepubsub-0.1.0-message" + "$ref": "#/definitions/bindings-googlepubsub-0.2.0-message" } }, { @@ -3296,12 +3296,12 @@ ], "properties": { "bindingVersion": { - "const": "0.1.0" + "const": "0.2.0" } } }, "then": { - "$ref": "#/definitions/bindings-googlepubsub-0.1.0-message" + "$ref": "#/definitions/bindings-googlepubsub-0.2.0-message" } } ] @@ -3419,7 +3419,14 @@ }, "properties": { "key": { - "$ref": "#/definitions/schema", + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/schema" + } + ], "description": "The message key." }, "schemaIdLocation": { @@ -3695,7 +3702,7 @@ } ] }, - "bindings-googlepubsub-0.1.0-message": { + "bindings-googlepubsub-0.2.0-message": { "title": "Cloud Pub/Sub Channel Schema", "description": "This object contains information about the message representation for Google Cloud Pub/Sub.", "type": "object", @@ -3709,7 +3716,7 @@ "bindingVersion": { "type": "string", "enum": [ - "0.1.0" + "0.2.0" ], "description": "The version of this binding." }, @@ -3725,28 +3732,22 @@ "properties": { "name": { "type": "string" - }, - "type": { - "type": "string" } }, "required": [ - "name", - "type" + "name" ] } }, "examples": [ { "schema": { - "name": "projects/your-project-id/schemas/your-avro-schema-id", - "type": "avro" + "name": "projects/your-project-id/schemas/your-avro-schema-id" } }, { "schema": { - "name": "projects/your-project-id/schemas/your-protobuf-schema-id", - "type": "protobuf" + "name": "projects/your-project-id/schemas/your-protobuf-schema-id" } } ] @@ -4120,7 +4121,7 @@ "properties": { "bindingVersion": { "enum": [ - "0.1.0" + "0.2.0" ] } }, @@ -4135,7 +4136,7 @@ } }, "then": { - "$ref": "#/definitions/bindings-googlepubsub-0.1.0-channel" + "$ref": "#/definitions/bindings-googlepubsub-0.2.0-channel" } }, { @@ -4145,12 +4146,12 @@ ], "properties": { "bindingVersion": { - "const": "0.1.0" + "const": "0.2.0" } } }, "then": { - "$ref": "#/definitions/bindings-googlepubsub-0.1.0-channel" + "$ref": "#/definitions/bindings-googlepubsub-0.2.0-channel" } } ] @@ -4679,7 +4680,7 @@ } ] }, - "bindings-googlepubsub-0.1.0-channel": { + "bindings-googlepubsub-0.2.0-channel": { "title": "Cloud Pub/Sub Channel Schema", "description": "This object contains information about the channel representation for Google Cloud Pub/Sub.", "type": "object", @@ -4693,7 +4694,7 @@ "bindingVersion": { "type": "string", "enum": [ - "0.1.0" + "0.2.0" ], "description": "The version of this binding." }, @@ -4736,14 +4737,10 @@ "encoding", "name" ] - }, - "topic": { - "type": "string" } }, "required": [ - "schemaSettings", - "topic" + "schemaSettings" ], "examples": [ { diff --git a/schemas/3.0.0.json b/schemas/3.0.0.json index 1c28feb0..3dfba870 100644 --- a/schemas/3.0.0.json +++ b/schemas/3.0.0.json @@ -3324,7 +3324,7 @@ "properties": { "bindingVersion": { "enum": [ - "0.1.0" + "0.2.0" ] } }, @@ -3339,7 +3339,7 @@ } }, "then": { - "$ref": "http://asyncapi.com/bindings/googlepubsub/0.1.0/message.json" + "$ref": "http://asyncapi.com/bindings/googlepubsub/0.2.0/message.json" } }, { @@ -3349,12 +3349,12 @@ ], "properties": { "bindingVersion": { - "const": "0.1.0" + "const": "0.2.0" } } }, "then": { - "$ref": "http://asyncapi.com/bindings/googlepubsub/0.1.0/message.json" + "$ref": "http://asyncapi.com/bindings/googlepubsub/0.2.0/message.json" } } ] @@ -3476,7 +3476,14 @@ }, "properties": { "key": { - "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json", + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" + } + ], "description": "The message key." }, "schemaIdLocation": { @@ -3756,8 +3763,8 @@ } ] }, - "http://asyncapi.com/bindings/googlepubsub/0.1.0/message.json": { - "$id": "http://asyncapi.com/bindings/googlepubsub/0.1.0/message.json", + "http://asyncapi.com/bindings/googlepubsub/0.2.0/message.json": { + "$id": "http://asyncapi.com/bindings/googlepubsub/0.2.0/message.json", "title": "Cloud Pub/Sub Channel Schema", "description": "This object contains information about the message representation for Google Cloud Pub/Sub.", "type": "object", @@ -3771,7 +3778,7 @@ "bindingVersion": { "type": "string", "enum": [ - "0.1.0" + "0.2.0" ], "description": "The version of this binding." }, @@ -3787,28 +3794,22 @@ "properties": { "name": { "type": "string" - }, - "type": { - "type": "string" } }, "required": [ - "name", - "type" + "name" ] } }, "examples": [ { "schema": { - "name": "projects/your-project-id/schemas/your-avro-schema-id", - "type": "avro" + "name": "projects/your-project-id/schemas/your-avro-schema-id" } }, { "schema": { - "name": "projects/your-project-id/schemas/your-protobuf-schema-id", - "type": "protobuf" + "name": "projects/your-project-id/schemas/your-protobuf-schema-id" } } ] @@ -4186,7 +4187,7 @@ "properties": { "bindingVersion": { "enum": [ - "0.1.0" + "0.2.0" ] } }, @@ -4201,7 +4202,7 @@ } }, "then": { - "$ref": "http://asyncapi.com/bindings/googlepubsub/0.1.0/channel.json" + "$ref": "http://asyncapi.com/bindings/googlepubsub/0.2.0/channel.json" } }, { @@ -4211,12 +4212,12 @@ ], "properties": { "bindingVersion": { - "const": "0.1.0" + "const": "0.2.0" } } }, "then": { - "$ref": "http://asyncapi.com/bindings/googlepubsub/0.1.0/channel.json" + "$ref": "http://asyncapi.com/bindings/googlepubsub/0.2.0/channel.json" } } ] @@ -4751,8 +4752,8 @@ } ] }, - "http://asyncapi.com/bindings/googlepubsub/0.1.0/channel.json": { - "$id": "http://asyncapi.com/bindings/googlepubsub/0.1.0/channel.json", + "http://asyncapi.com/bindings/googlepubsub/0.2.0/channel.json": { + "$id": "http://asyncapi.com/bindings/googlepubsub/0.2.0/channel.json", "title": "Cloud Pub/Sub Channel Schema", "description": "This object contains information about the channel representation for Google Cloud Pub/Sub.", "type": "object", @@ -4766,7 +4767,7 @@ "bindingVersion": { "type": "string", "enum": [ - "0.1.0" + "0.2.0" ], "description": "The version of this binding." }, @@ -4809,14 +4810,10 @@ "encoding", "name" ] - }, - "topic": { - "type": "string" } }, "required": [ - "schemaSettings", - "topic" + "schemaSettings" ], "examples": [ { From f80e22e598900e5d7d3dc03681d8d052401b05c9 Mon Sep 17 00:00:00 2001 From: Lukasz Gornicki Date: Wed, 11 Oct 2023 19:46:51 +0200 Subject: [PATCH 075/102] fix: examples of messages should not follow json schema (#434) --- definitions/3.0.0/messageObject.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/definitions/3.0.0/messageObject.json b/definitions/3.0.0/messageObject.json index 69aeafe4..b7719d01 100644 --- a/definitions/3.0.0/messageObject.json +++ b/definitions/3.0.0/messageObject.json @@ -100,10 +100,11 @@ "description": "A brief summary of the message example." }, "headers": { - "$ref": "http://asyncapi.com/definitions/3.0.0/anySchema.json" + "type": "object", + "description": "Example of the application headers. It can be of any type." }, "payload": { - "$ref": "http://asyncapi.com/definitions/3.0.0/anySchema.json" + "description": "Example of the message payload. It can be of any type." } } } From 9eb33e54e4151f4c15ca364f8b09927c1c03c589 Mon Sep 17 00:00:00 2001 From: asyncapi-bot Date: Wed, 11 Oct 2023 19:50:30 +0200 Subject: [PATCH 076/102] chore(release): v6.0.0-next-major-spec.10 (#435) --- package-lock.json | 4 ++-- package.json | 2 +- schemas/3.0.0-without-$id.json | 5 +++-- schemas/3.0.0.json | 5 +++-- 4 files changed, 9 insertions(+), 7 deletions(-) diff --git a/package-lock.json b/package-lock.json index 276c0a77..7ae55380 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@asyncapi/specs", - "version": "6.0.0-next-major-spec.9", + "version": "6.0.0-next-major-spec.10", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@asyncapi/specs", - "version": "6.0.0-next-major-spec.9", + "version": "6.0.0-next-major-spec.10", "license": "Apache-2.0", "dependencies": { "@types/json-schema": "^7.0.11" diff --git a/package.json b/package.json index e4527433..e6be0869 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@asyncapi/specs", - "version": "6.0.0-next-major-spec.9", + "version": "6.0.0-next-major-spec.10", "description": "AsyncAPI schema versions", "main": "index.js", "types": "index.d.ts", diff --git a/schemas/3.0.0-without-$id.json b/schemas/3.0.0-without-$id.json index cc25a968..48afe849 100644 --- a/schemas/3.0.0-without-$id.json +++ b/schemas/3.0.0-without-$id.json @@ -2081,10 +2081,11 @@ "description": "A brief summary of the message example." }, "headers": { - "$ref": "#/definitions/anySchema" + "type": "object", + "description": "Example of the application headers. It can be of any type." }, "payload": { - "$ref": "#/definitions/anySchema" + "description": "Example of the message payload. It can be of any type." } } } diff --git a/schemas/3.0.0.json b/schemas/3.0.0.json index 3dfba870..9f51664e 100644 --- a/schemas/3.0.0.json +++ b/schemas/3.0.0.json @@ -2128,10 +2128,11 @@ "description": "A brief summary of the message example." }, "headers": { - "$ref": "http://asyncapi.com/definitions/3.0.0/anySchema.json" + "type": "object", + "description": "Example of the application headers. It can be of any type." }, "payload": { - "$ref": "http://asyncapi.com/definitions/3.0.0/anySchema.json" + "description": "Example of the message payload. It can be of any type." } } } From c097eb5ea781a0c0721d11daaf2ec29c32107a4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=20M=C3=A9ndez?= Date: Mon, 6 Nov 2023 13:06:01 +0100 Subject: [PATCH 077/102] feat!: remove messageId from Message and MessageTrait objects (#439) --- definitions/3.0.0/messageObject.json | 3 --- definitions/3.0.0/messageTrait.json | 3 --- schemas/3.0.0-without-$id.json | 6 ------ schemas/3.0.0.json | 6 ------ 4 files changed, 18 deletions(-) diff --git a/definitions/3.0.0/messageObject.json b/definitions/3.0.0/messageObject.json index b7719d01..87c066f3 100644 --- a/definitions/3.0.0/messageObject.json +++ b/definitions/3.0.0/messageObject.json @@ -13,9 +13,6 @@ "headers": { "$ref": "http://asyncapi.com/definitions/3.0.0/anySchema.json" }, - "messageId": { - "type": "string" - }, "payload": { "$ref": "http://asyncapi.com/definitions/3.0.0/anySchema.json" }, diff --git a/definitions/3.0.0/messageTrait.json b/definitions/3.0.0/messageTrait.json index fd0f0475..86717cf0 100644 --- a/definitions/3.0.0/messageTrait.json +++ b/definitions/3.0.0/messageTrait.json @@ -13,9 +13,6 @@ "headers": { "$ref": "http://asyncapi.com/definitions/3.0.0/anySchema.json" }, - "messageId": { - "type": "string" - }, "correlationId": { "oneOf": [ { diff --git a/schemas/3.0.0-without-$id.json b/schemas/3.0.0-without-$id.json index 48afe849..d604e3b5 100644 --- a/schemas/3.0.0-without-$id.json +++ b/schemas/3.0.0-without-$id.json @@ -1994,9 +1994,6 @@ "headers": { "$ref": "#/definitions/anySchema" }, - "messageId": { - "type": "string" - }, "payload": { "$ref": "#/definitions/anySchema" }, @@ -3768,9 +3765,6 @@ "headers": { "$ref": "#/definitions/anySchema" }, - "messageId": { - "type": "string" - }, "correlationId": { "oneOf": [ { diff --git a/schemas/3.0.0.json b/schemas/3.0.0.json index 9f51664e..eb8dc85a 100644 --- a/schemas/3.0.0.json +++ b/schemas/3.0.0.json @@ -2041,9 +2041,6 @@ "headers": { "$ref": "http://asyncapi.com/definitions/3.0.0/anySchema.json" }, - "messageId": { - "type": "string" - }, "payload": { "$ref": "http://asyncapi.com/definitions/3.0.0/anySchema.json" }, @@ -3831,9 +3828,6 @@ "headers": { "$ref": "http://asyncapi.com/definitions/3.0.0/anySchema.json" }, - "messageId": { - "type": "string" - }, "correlationId": { "oneOf": [ { From 9639ca9bf25b5bb207fd8a1b37f1c37a3c39ed4e Mon Sep 17 00:00:00 2001 From: asyncapi-bot Date: Mon, 6 Nov 2023 13:09:48 +0100 Subject: [PATCH 078/102] chore(release): v6.0.0-next-major-spec.11 (#440) --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 7ae55380..55ddd172 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@asyncapi/specs", - "version": "6.0.0-next-major-spec.10", + "version": "6.0.0-next-major-spec.11", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@asyncapi/specs", - "version": "6.0.0-next-major-spec.10", + "version": "6.0.0-next-major-spec.11", "license": "Apache-2.0", "dependencies": { "@types/json-schema": "^7.0.11" diff --git a/package.json b/package.json index e6be0869..2813fd6e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@asyncapi/specs", - "version": "6.0.0-next-major-spec.10", + "version": "6.0.0-next-major-spec.11", "description": "AsyncAPI schema versions", "main": "index.js", "types": "index.d.ts", From 29e96d7948edfa8b460d11972cd375a49c71df63 Mon Sep 17 00:00:00 2001 From: Khuda Dad Nomani <32505158+KhudaDad414@users.noreply.github.com> Date: Mon, 13 Nov 2023 10:50:24 +0000 Subject: [PATCH 079/102] fix: add operations to the components section (#445) --- definitions/3.0.0/components.json | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/definitions/3.0.0/components.json b/definitions/3.0.0/components.json index 3f3589ef..537c49bd 100644 --- a/definitions/3.0.0/components.json +++ b/definitions/3.0.0/components.json @@ -68,6 +68,21 @@ } } }, + "operations": { + "type": "object", + "patternProperties": { + "^[\\w\\d\\.\\-_]+$": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/operation.json" + } + ] + } + } + }, "messages": { "type": "object", "patternProperties": { @@ -281,4 +296,4 @@ }, "$schema": "http://json-schema.org/draft-07/schema#", "$id": "http://asyncapi.com/definitions/3.0.0/components.json" -} \ No newline at end of file +} From 3df2a2e1de1b0d719e432e97fe2d5c87538deff3 Mon Sep 17 00:00:00 2001 From: asyncapi-bot Date: Mon, 13 Nov 2023 11:53:18 +0100 Subject: [PATCH 080/102] chore(release): v6.0.0-next-major-spec.12 (#447) --- package-lock.json | 4 ++-- package.json | 2 +- schemas/3.0.0-without-$id.json | 15 +++++++++++++++ schemas/3.0.0.json | 15 +++++++++++++++ 4 files changed, 33 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 55ddd172..8a6462b2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@asyncapi/specs", - "version": "6.0.0-next-major-spec.11", + "version": "6.0.0-next-major-spec.12", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@asyncapi/specs", - "version": "6.0.0-next-major-spec.11", + "version": "6.0.0-next-major-spec.12", "license": "Apache-2.0", "dependencies": { "@types/json-schema": "^7.0.11" diff --git a/package.json b/package.json index 2813fd6e..ff8d5c50 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@asyncapi/specs", - "version": "6.0.0-next-major-spec.11", + "version": "6.0.0-next-major-spec.12", "description": "AsyncAPI schema versions", "main": "index.js", "types": "index.d.ts", diff --git a/schemas/3.0.0-without-$id.json b/schemas/3.0.0-without-$id.json index d604e3b5..7fd84a3d 100644 --- a/schemas/3.0.0-without-$id.json +++ b/schemas/3.0.0-without-$id.json @@ -5994,6 +5994,21 @@ } } }, + "operations": { + "type": "object", + "patternProperties": { + "^[\\w\\d\\.\\-_]+$": { + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/operation" + } + ] + } + } + }, "messages": { "type": "object", "patternProperties": { diff --git a/schemas/3.0.0.json b/schemas/3.0.0.json index eb8dc85a..a4009033 100644 --- a/schemas/3.0.0.json +++ b/schemas/3.0.0.json @@ -6084,6 +6084,21 @@ } } }, + "operations": { + "type": "object", + "patternProperties": { + "^[\\w\\d\\.\\-_]+$": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/operation.json" + } + ] + } + } + }, "messages": { "type": "object", "patternProperties": { From 728f63c2187c1436c9f739b69f1cba3009665607 Mon Sep 17 00:00:00 2001 From: Lukasz Gornicki Date: Mon, 13 Nov 2023 12:01:38 +0100 Subject: [PATCH 081/102] fix: enable `$ref` support for bindings (#442) --- definitions/3.0.0/channel.json | 9 ++++++++- definitions/3.0.0/messageObject.json | 9 ++++++++- definitions/3.0.0/messageTrait.json | 9 ++++++++- definitions/3.0.0/operation.json | 9 ++++++++- definitions/3.0.0/operationTrait.json | 9 ++++++++- definitions/3.0.0/server.json | 9 ++++++++- 6 files changed, 48 insertions(+), 6 deletions(-) diff --git a/definitions/3.0.0/channel.json b/definitions/3.0.0/channel.json index 22a3c4b6..b42c9ae7 100644 --- a/definitions/3.0.0/channel.json +++ b/definitions/3.0.0/channel.json @@ -62,7 +62,14 @@ ] }, "bindings": { - "$ref": "http://asyncapi.com/definitions/3.0.0/channelBindingsObject.json" + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/channelBindingsObject.json" + } + ] } }, "$schema": "http://json-schema.org/draft-07/schema#", diff --git a/definitions/3.0.0/messageObject.json b/definitions/3.0.0/messageObject.json index 87c066f3..f3de84ef 100644 --- a/definitions/3.0.0/messageObject.json +++ b/definitions/3.0.0/messageObject.json @@ -107,7 +107,14 @@ } }, "bindings": { - "$ref": "http://asyncapi.com/definitions/3.0.0/messageBindingsObject.json" + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/messageBindingsObject.json" + } + ] }, "traits": { "type": "array", diff --git a/definitions/3.0.0/messageTrait.json b/definitions/3.0.0/messageTrait.json index 86717cf0..e3aeae2f 100644 --- a/definitions/3.0.0/messageTrait.json +++ b/definitions/3.0.0/messageTrait.json @@ -74,7 +74,14 @@ } }, "bindings": { - "$ref": "http://asyncapi.com/definitions/3.0.0/messageBindingsObject.json" + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/messageBindingsObject.json" + } + ] } }, "$schema": "http://json-schema.org/draft-07/schema#", diff --git a/definitions/3.0.0/operation.json b/definitions/3.0.0/operation.json index 3bcf7fea..2ef195a3 100644 --- a/definitions/3.0.0/operation.json +++ b/definitions/3.0.0/operation.json @@ -88,7 +88,14 @@ ] }, "bindings": { - "$ref": "http://asyncapi.com/definitions/3.0.0/operationBindingsObject.json" + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/operationBindingsObject.json" + } + ] } }, "$schema": "http://json-schema.org/draft-07/schema#", diff --git a/definitions/3.0.0/operationTrait.json b/definitions/3.0.0/operationTrait.json index 986f4796..2a31835f 100644 --- a/definitions/3.0.0/operationTrait.json +++ b/definitions/3.0.0/operationTrait.json @@ -26,7 +26,14 @@ "$ref": "http://asyncapi.com/definitions/3.0.0/operation.json#/properties/externalDocs" }, "bindings": { - "$ref": "http://asyncapi.com/definitions/3.0.0/operation.json#/properties/bindings" + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/operationBindingsObject.json" + } + ] } }, "$schema": "http://json-schema.org/draft-07/schema#", diff --git a/definitions/3.0.0/server.json b/definitions/3.0.0/server.json index 17540811..c875979b 100644 --- a/definitions/3.0.0/server.json +++ b/definitions/3.0.0/server.json @@ -70,7 +70,14 @@ ] }, "bindings": { - "$ref": "http://asyncapi.com/definitions/3.0.0/serverBindingsObject.json" + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/serverBindingsObject.json" + } + ] } }, "$schema": "http://json-schema.org/draft-07/schema#", From 6caf1dca0b06d6dd9ec94c4555e04f8c7299483a Mon Sep 17 00:00:00 2001 From: asyncapi-bot Date: Mon, 13 Nov 2023 12:04:24 +0100 Subject: [PATCH 082/102] chore(release): v6.0.0-next-major-spec.13 (#448) --- package-lock.json | 4 +-- package.json | 2 +- schemas/3.0.0-without-$id.json | 54 ++++++++++++++++++++++++++++++---- schemas/3.0.0.json | 54 ++++++++++++++++++++++++++++++---- 4 files changed, 99 insertions(+), 15 deletions(-) diff --git a/package-lock.json b/package-lock.json index 8a6462b2..bc454b01 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@asyncapi/specs", - "version": "6.0.0-next-major-spec.12", + "version": "6.0.0-next-major-spec.13", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@asyncapi/specs", - "version": "6.0.0-next-major-spec.12", + "version": "6.0.0-next-major-spec.13", "license": "Apache-2.0", "dependencies": { "@types/json-schema": "^7.0.11" diff --git a/package.json b/package.json index ff8d5c50..8969c4ff 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@asyncapi/specs", - "version": "6.0.0-next-major-spec.12", + "version": "6.0.0-next-major-spec.13", "description": "AsyncAPI schema versions", "main": "index.js", "types": "index.d.ts", diff --git a/schemas/3.0.0-without-$id.json b/schemas/3.0.0-without-$id.json index 7fd84a3d..3586d1ec 100644 --- a/schemas/3.0.0-without-$id.json +++ b/schemas/3.0.0-without-$id.json @@ -313,7 +313,14 @@ ] }, "bindings": { - "$ref": "#/definitions/serverBindingsObject" + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/serverBindingsObject" + } + ] } } }, @@ -1961,7 +1968,14 @@ ] }, "bindings": { - "$ref": "#/definitions/channelBindingsObject" + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/channelBindingsObject" + } + ] } } }, @@ -2088,7 +2102,14 @@ } }, "bindings": { - "$ref": "#/definitions/messageBindingsObject" + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/messageBindingsObject" + } + ] }, "traits": { "type": "array", @@ -3826,7 +3847,14 @@ } }, "bindings": { - "$ref": "#/definitions/messageBindingsObject" + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/messageBindingsObject" + } + ] } } }, @@ -4953,7 +4981,14 @@ ] }, "bindings": { - "$ref": "#/definitions/operationBindingsObject" + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/operationBindingsObject" + } + ] } } }, @@ -5038,7 +5073,14 @@ "$ref": "#/definitions/operation/properties/externalDocs" }, "bindings": { - "$ref": "#/definitions/operation/properties/bindings" + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/operationBindingsObject" + } + ] } } }, diff --git a/schemas/3.0.0.json b/schemas/3.0.0.json index a4009033..237fb05d 100644 --- a/schemas/3.0.0.json +++ b/schemas/3.0.0.json @@ -324,7 +324,14 @@ ] }, "bindings": { - "$ref": "http://asyncapi.com/definitions/3.0.0/serverBindingsObject.json" + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/serverBindingsObject.json" + } + ] } } }, @@ -2006,7 +2013,14 @@ ] }, "bindings": { - "$ref": "http://asyncapi.com/definitions/3.0.0/channelBindingsObject.json" + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/channelBindingsObject.json" + } + ] } } }, @@ -2135,7 +2149,14 @@ } }, "bindings": { - "$ref": "http://asyncapi.com/definitions/3.0.0/messageBindingsObject.json" + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/messageBindingsObject.json" + } + ] }, "traits": { "type": "array", @@ -3889,7 +3910,14 @@ } }, "bindings": { - "$ref": "http://asyncapi.com/definitions/3.0.0/messageBindingsObject.json" + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/messageBindingsObject.json" + } + ] } } }, @@ -5029,7 +5057,14 @@ ] }, "bindings": { - "$ref": "http://asyncapi.com/definitions/3.0.0/operationBindingsObject.json" + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/operationBindingsObject.json" + } + ] } } }, @@ -5117,7 +5152,14 @@ "$ref": "http://asyncapi.com/definitions/3.0.0/operation.json#/properties/externalDocs" }, "bindings": { - "$ref": "http://asyncapi.com/definitions/3.0.0/operation.json#/properties/bindings" + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/operationBindingsObject.json" + } + ] } } }, From 93482926ba4764fd3e887183dc435f485126a2a9 Mon Sep 17 00:00:00 2001 From: "jonas-lt@live.dk" Date: Fri, 17 Nov 2023 11:19:26 -1000 Subject: [PATCH 083/102] update codeowners --- CODEOWNERS | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/CODEOWNERS b/CODEOWNERS index 5fc5affa..c0661113 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -8,11 +8,14 @@ * @fmvilas @derberg @dalelane @smoya @char0n @asyncapi-bot-eve +/bindings/anypointmq/ @mboss37 @GeraldLoeffler +/bindings/ibmmq/ @rcoppen +/bindings/jms/ @rcoppen @SrfHead +/bindings/kafka/ @lbroudoux @dalelane +/bindings/googlepubsub/ @whitlockjc +/bindings/solace/ @damaru-inc @CameronRushton +/bindings/pulsar/ @VisualBean +/bindings/sns/ @dpwdec @iancooper +/bindings/sqs/ @dpwdec @iancooper -/bindings/anypointmq/ @GeraldLoeffler -/bindings/ibmmq/ @rcoppen -/bindings/kafka/ @lbroudoux @dalelane -/bindings/googlepubsub/ @whitlockjc -/bindings/solace/ @damaru-inc @CameronRushton -/bindings/*.json @KhudaDad414 -/bindings/pulsar/ @VisualBean \ No newline at end of file +/bindings/*.json @KhudaDad414 \ No newline at end of file From 9e59bb768c707167dac664956a3e7fbcad16064c Mon Sep 17 00:00:00 2001 From: "jonas-lt@live.dk" Date: Fri, 17 Nov 2023 11:24:06 -1000 Subject: [PATCH 084/102] removed unused keep files --- bindings/jms/.keep | 0 bindings/sns/.keep | 0 bindings/sqs/.keep | 0 3 files changed, 0 insertions(+), 0 deletions(-) delete mode 100644 bindings/jms/.keep delete mode 100644 bindings/sns/.keep delete mode 100644 bindings/sqs/.keep diff --git a/bindings/jms/.keep b/bindings/jms/.keep deleted file mode 100644 index e69de29b..00000000 diff --git a/bindings/sns/.keep b/bindings/sns/.keep deleted file mode 100644 index e69de29b..00000000 diff --git a/bindings/sqs/.keep b/bindings/sqs/.keep deleted file mode 100644 index e69de29b..00000000 From bae60d4029b50e48ee0243198c3d05522f765ebc Mon Sep 17 00:00:00 2001 From: "jonas-lt@live.dk" Date: Fri, 17 Nov 2023 11:30:35 -1000 Subject: [PATCH 085/102] adapt websocket binding --- bindings/websockets/0.1.0/channel.json | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/bindings/websockets/0.1.0/channel.json b/bindings/websockets/0.1.0/channel.json index d01abd46..8a8238b4 100644 --- a/bindings/websockets/0.1.0/channel.json +++ b/bindings/websockets/0.1.0/channel.json @@ -20,11 +20,25 @@ "description": "The HTTP method to use when establishing the connection. Its value MUST be either 'GET' or 'POST'." }, "query": { - "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json", + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json", + }, + { + "$ref": "https://asyncapi.com/definitions/3.0.0/Reference.json" + } + ], "description": "A Schema object containing the definitions for each query parameter. This schema MUST be of type 'object' and have a 'properties' key." }, "headers": { - "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json", + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json", + }, + { + "$ref": "https://asyncapi.com/definitions/3.0.0/Reference.json" + } + ], "description": "A Schema object containing the definitions of the HTTP headers to use when establishing the connection. This schema MUST be of type 'object' and have a 'properties' key." }, "bindingVersion": { From c4731378a1436fefbd61a9684066876c83ff7216 Mon Sep 17 00:00:00 2001 From: "jonas-lt@live.dk" Date: Fri, 17 Nov 2023 11:33:23 -1000 Subject: [PATCH 086/102] add sqs bindings --- bindings/sqs/0.2.0/channel.json | 264 ++++++++++++++++++ bindings/sqs/0.2.0/operation.json | 258 +++++++++++++++++ definitions/3.0.0/channelBindingsObject.json | 36 ++- .../3.0.0/operationBindingsObject.json | 36 ++- 4 files changed, 592 insertions(+), 2 deletions(-) create mode 100644 bindings/sqs/0.2.0/channel.json create mode 100644 bindings/sqs/0.2.0/operation.json diff --git a/bindings/sqs/0.2.0/channel.json b/bindings/sqs/0.2.0/channel.json new file mode 100644 index 00000000..6e5279d7 --- /dev/null +++ b/bindings/sqs/0.2.0/channel.json @@ -0,0 +1,264 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/bindings/sqs/channel.json", + "title": "Channel Schema", + "description": "This object contains information about the channel representation in SQS.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\-\\_]+$": { + "$ref": "https://raw.githubusercontent.com/asyncapi/spec-json-schemas/v2.14.0/schemas/2.4.0.json#/definitions/specificationExtension" + } + }, + "properties": { + "queue": { + "description": "A definition of the queue that will be used as the channel.", + "$ref": "#/definitions/queue" + }, + "deadLetterQueue": { + "description": "A definition of the queue that will be used for un-processable messages.", + "$ref": "#/definitions/queue" + }, + "bindingVersion": { + "type": "string", + "enum": [ + "0.1.0", + "0.2.0" + ], + "description": "The version of this binding. If omitted, 'latest' MUST be assumed.", + "default": "latest" + } + }, + "required": [ + "queue" + ], + "definitions": { + "queue": { + "type": "object", + "description": "A definition of a queue.", + "patternProperties": { + "^x-[\\w\\d\\.\\-\\_]+$": { + "$ref": "https://raw.githubusercontent.com/asyncapi/spec-json-schemas/v2.14.0/schemas/2.4.0.json#/definitions/specificationExtension" + } + }, + "properties": { + "name": { + "type": "string", + "description": "The name of the queue. When an SNS Operation Binding Object references an SQS queue by name, the identifier should be the one in this field." + }, + "fifoQueue": { + "type": "boolean", + "description": "Is this a FIFO queue?", + "default": false + }, + "deduplicationScope": { + "type": "string", + "enum": ["queue", "messageGroup"], + "description": "Specifies whether message deduplication occurs at the message group or queue level. Valid values are messageGroup and queue (default).", + "default": "queue" + }, + "fifoThroughputLimit": { + "type": "string", + "enum": ["perQueue", "perMessageGroupId"], + "description": "Specifies whether the FIFO queue throughput quota applies to the entire queue or per message group. Valid values are perQueue (default) and perMessageGroupId.", + "default": "perQueue" + }, + "deliveryDelay": { + "type": "integer", + "description": "The number of seconds to delay before a message sent to the queue can be received. used to create a delay queue.", + "minimum": 0, + "maximum": 15, + "default": 0 + }, + "visibilityTimeout": { + "type": "integer", + "description": "The length of time, in seconds, that a consumer locks a message - hiding it from reads - before it is unlocked and can be read again.", + "minimum": 0, + "maximum": 43200, + "default": 30 + }, + "receiveMessageWaitTime": { + "type": "integer", + "description": "Determines if the queue uses short polling or long polling. Set to zero the queue reads available messages and returns immediately. Set to a non-zero integer, long polling waits the specified number of seconds for messages to arrive before returning.", + "default": 0 + }, + "messageRetentionPeriod": { + "type": "integer", + "description": "How long to retain a message on the queue in seconds, unless deleted.", + "minimum": 60, + "maximum": 1209600, + "default": 345600 + }, + "redrivePolicy": { + "$ref": "#/definitions/redrivePolicy" + }, + "policy": { + "$ref": "#/definitions/policy" + }, + "tags": { + "type": "object", + "description": "Key-value pairs that represent AWS tags on the queue." + } + }, + "required": [ + "name", + "fifoQueue" + ] + }, + "redrivePolicy": { + "type": "object", + "description": "Prevent poison pill messages by moving un-processable messages to an SQS dead letter queue.", + "patternProperties": { + "^x-[\\w\\d\\.\\-\\_]+$": { + "$ref": "https://raw.githubusercontent.com/asyncapi/spec-json-schemas/v2.14.0/schemas/2.4.0.json#/definitions/specificationExtension" + } + }, + "properties": { + "deadLetterQueue": { + "$ref": "#/definitions/identifier" + }, + "maxReceiveCount": { + "type": "integer", + "description": "The number of times a message is delivered to the source queue before being moved to the dead-letter queue.", + "default": 10 + } + }, + "required": [ + "deadLetterQueue" + ] + }, + "identifier": { + "type": "object", + "description": "The SQS queue to use as a dead letter queue (DLQ).", + "patternProperties": { + "^x-[\\w\\d\\.\\-\\_]+$": { + "$ref": "https://raw.githubusercontent.com/asyncapi/spec-json-schemas/v2.14.0/schemas/2.4.0.json#/definitions/specificationExtension" + } + }, + "properties": { + "arn": { + "type": "string", + "description": "The target is an ARN. For example, for SQS, the identifier may be an ARN, which will be of the form: arn:aws:sqs:{region}:{account-id}:{queueName}" + }, + "name": { + "type": "string", + "description": "The endpoint is identified by a name, which corresponds to an identifying field called 'name' of a binding for that protocol on this publish Operation Object. For example, if the protocol is 'sqs' then the name refers to the name field sqs binding." + } + } + }, + "policy": { + "type": "object", + "description": "The security policy for the SQS Queue", + "patternProperties": { + "^x-[\\w\\d\\.\\-\\_]+$": { + "$ref": "https://raw.githubusercontent.com/asyncapi/spec-json-schemas/v2.14.0/schemas/2.4.0.json#/definitions/specificationExtension" + } + }, + "properties": { + "statements": { + "type": "array", + "description": "An array of statement objects, each of which controls a permission for this queue.", + "items": { + "$ref": "#/definitions/statement" + } + } + }, + "required": [ + "statements" + ] + }, + "statement": { + "type": "object", + "patternProperties": { + "^x-[\\w\\d\\.\\-\\_]+$": { + "$ref": "https://raw.githubusercontent.com/asyncapi/spec-json-schemas/v2.14.0/schemas/2.4.0.json#/definitions/specificationExtension" + } + }, + "properties": { + "effect": { + "type": "string", + "enum": [ + "Allow", + "Deny" + ] + }, + "principal": { + "description": "The AWS account or resource ARN that this statement applies to.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "action": { + "description": "The SQS permission being allowed or denied e.g. sqs:ReceiveMessage", + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + } + }, + "required": [ + "effect", + "principal", + "action" + ] + } + }, + "examples": [ + { + "queue": { + "name": "myQueue", + "fifoQueue": true, + "deduplicationScope": "messageGroup", + "fifoThroughputLimit": "perMessageGroupId", + "deliveryDelay": 15, + "visibilityTimeout": 60, + "receiveMessageWaitTime": 0, + "messageRetentionPeriod": 86400, + "redrivePolicy": { + "deadLetterQueue": { + "arn": "arn:aws:SQS:eu-west-1:0000000:123456789" + }, + "maxReceiveCount": 15 + }, + "policy": { + "statements": [ + { + "effect": "Deny", + "principal": "arn:aws:iam::123456789012:user/dec.kolakowski", + "action": [ + "sqs:SendMessage", + "sqs:ReceiveMessage" + ] + } + ] + }, + "tags": { + "owner": "AsyncAPI.NET", + "platform": "AsyncAPIOrg" + } + }, + "deadLetterQueue": { + "name": "myQueue_error", + "deliveryDelay": 0, + "visibilityTimeout": 0, + "receiveMessageWaitTime": 0, + "messageRetentionPeriod": 604800 + } + } + ] +} \ No newline at end of file diff --git a/bindings/sqs/0.2.0/operation.json b/bindings/sqs/0.2.0/operation.json new file mode 100644 index 00000000..9bd1e5bf --- /dev/null +++ b/bindings/sqs/0.2.0/operation.json @@ -0,0 +1,258 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/bindings/sqs/operation.json", + "title": "Operation Schema", + "description": "This object contains information about the operation representation in SQS.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\-\\_]+$": { + "$ref": "https://raw.githubusercontent.com/asyncapi/spec-json-schemas/v2.14.0/schemas/2.4.0.json#/definitions/specificationExtension" + } + }, + "properties": { + "queues": { + "type": "array", + "description": "Queue objects that are either the endpoint for an SNS Operation Binding Object, or the deadLetterQueue of the SQS Operation Binding Object.", + "items": { + "$ref": "#/definitions/queue" + } + }, + "bindingVersion": { + "type": "string", + "enum": [ + "0.1.0", + "0.2.0" + ], + "description": "The version of this binding. If omitted, 'latest' MUST be assumed.", + "default": "latest" + } + }, + "required": [ + "queues" + ], + "definitions": { + "queue": { + "type": "object", + "description": "A definition of a queue.", + "patternProperties": { + "^x-[\\w\\d\\.\\-\\_]+$": { + "$ref": "https://raw.githubusercontent.com/asyncapi/spec-json-schemas/v2.14.0/schemas/2.4.0.json#/definitions/specificationExtension" + } + }, + "properties": { + "$ref": { + "type": "string", + "description": "Allows for an external definition of a queue. The referenced structure MUST be in the format of a Queue. If there are conflicts between the referenced definition and this Queue's definition, the behavior is undefined." + }, + "name": { + "type": "string", + "description": "The name of the queue. When an SNS Operation Binding Object references an SQS queue by name, the identifier should be the one in this field." + }, + "fifoQueue": { + "type": "boolean", + "description": "Is this a FIFO queue?", + "default": false + }, + "deduplicationScope": { + "type": "string", + "enum": ["queue", "messageGroup"], + "description": "Specifies whether message deduplication occurs at the message group or queue level. Valid values are messageGroup and queue (default).", + "default": "queue" + }, + "fifoThroughputLimit": { + "type": "string", + "enum": ["perQueue", "perMessageGroupId"], + "description": "Specifies whether the FIFO queue throughput quota applies to the entire queue or per message group. Valid values are perQueue (default) and perMessageGroupId.", + "default": "perQueue" + }, + "deliveryDelay": { + "type": "integer", + "description": "The number of seconds to delay before a message sent to the queue can be received. Used to create a delay queue.", + "minimum": 0, + "maximum": 15, + "default": 0 + }, + "visibilityTimeout": { + "type": "integer", + "description": "The length of time, in seconds, that a consumer locks a message - hiding it from reads - before it is unlocked and can be read again.", + "minimum": 0, + "maximum": 43200, + "default": 30 + }, + "receiveMessageWaitTime": { + "type": "integer", + "description": "Determines if the queue uses short polling or long polling. Set to zero the queue reads available messages and returns immediately. Set to a non-zero integer, long polling waits the specified number of seconds for messages to arrive before returning.", + "default": 0 + }, + "messageRetentionPeriod": { + "type": "integer", + "description": "How long to retain a message on the queue in seconds, unless deleted.", + "minimum": 60, + "maximum": 1209600, + "default": 345600 + }, + "redrivePolicy": { + "$ref": "#/definitions/redrivePolicy" + }, + "policy": { + "$ref": "#/definitions/policy" + }, + "tags": { + "type": "object", + "description": "Key-value pairs that represent AWS tags on the queue." + } + }, + "required": [ + "name" + ] + }, + "redrivePolicy": { + "type": "object", + "description": "Prevent poison pill messages by moving un-processable messages to an SQS dead letter queue.", + "patternProperties": { + "^x-[\\w\\d\\.\\-\\_]+$": { + "$ref": "https://raw.githubusercontent.com/asyncapi/spec-json-schemas/v2.14.0/schemas/2.4.0.json#/definitions/specificationExtension" + } + }, + "properties": { + "deadLetterQueue": { + "$ref": "#/definitions/identifier" + }, + "maxReceiveCount": { + "type": "integer", + "description": "The number of times a message is delivered to the source queue before being moved to the dead-letter queue.", + "default": 10 + } + }, + "required": [ + "deadLetterQueue" + ] + }, + "identifier": { + "type": "object", + "description": "The SQS queue to use as a dead letter queue (DLQ).", + "patternProperties": { + "^x-[\\w\\d\\.\\-\\_]+$": { + "$ref": "https://raw.githubusercontent.com/asyncapi/spec-json-schemas/v2.14.0/schemas/2.4.0.json#/definitions/specificationExtension" + } + }, + "properties": { + "arn": { + "type": "string", + "description": "The target is an ARN. For example, for SQS, the identifier may be an ARN, which will be of the form: arn:aws:sqs:{region}:{account-id}:{queueName}" + }, + "name": { + "type": "string", + "description": "The endpoint is identified by a name, which corresponds to an identifying field called 'name' of a binding for that protocol on this publish Operation Object. For example, if the protocol is 'sqs' then the name refers to the name field sqs binding." + } + } + }, + "policy": { + "type": "object", + "description": "The security policy for the SQS Queue", + "patternProperties": { + "^x-[\\w\\d\\.\\-\\_]+$": { + "$ref": "https://raw.githubusercontent.com/asyncapi/spec-json-schemas/v2.14.0/schemas/2.4.0.json#/definitions/specificationExtension" + } + }, + "properties": { + "statements": { + "type": "array", + "description": "An array of statement objects, each of which controls a permission for this queue.", + "items": { + "$ref": "#/definitions/statement" + } + } + }, + "required": [ + "statements" + ] + }, + "statement": { + "type": "object", + "patternProperties": { + "^x-[\\w\\d\\.\\-\\_]+$": { + "$ref": "https://raw.githubusercontent.com/asyncapi/spec-json-schemas/v2.14.0/schemas/2.4.0.json#/definitions/specificationExtension" + } + }, + "properties": { + "effect": { + "type": "string", + "enum": [ + "Allow", + "Deny" + ] + }, + "principal": { + "description": "The AWS account or resource ARN that this statement applies to.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "action": { + "description": "The SQS permission being allowed or denied e.g. sqs:ReceiveMessage", + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + } + }, + "required": [ + "effect", + "principal", + "action" + ] + } + }, + "examples": [ + { + "queues": [ + { + "name": "myQueue", + "fifoQueue": true, + "deduplicationScope": "messageGroup", + "fifoThroughputLimit": "perMessageGroupId", + "deliveryDelay": 10, + "redrivePolicy": { + "deadLetterQueue": { + "name": "myQueue_error" + }, + "maxReceiveCount": 15 + }, + "policy": { + "statements": [ + { + "effect": "Deny", + "principal": "arn:aws:iam::123456789012:user/dec.kolakowski", + "action": [ + "sqs:SendMessage", + "sqs:ReceiveMessage" + ] + } + ] + } + }, + { + "name": "myQueue_error", + "deliveryDelay": 10 + } + ] + } + ] +} diff --git a/definitions/3.0.0/channelBindingsObject.json b/definitions/3.0.0/channelBindingsObject.json index 21ba2f2c..d1c44baa 100644 --- a/definitions/3.0.0/channelBindingsObject.json +++ b/definitions/3.0.0/channelBindingsObject.json @@ -167,7 +167,41 @@ "nats": {}, "jms": {}, "sns": {}, - "sqs": {}, + "sqs": { + "properties": { + "bindingVersion": { + "enum": ["0.1.0"] + } + }, + "allOf": [ + { + "description": "If no bindingVersion specified, use the latest binding", + "if": { + "not": { + "required": [ + "bindingVersion" + ] + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/sqs/0.2.0/channel.json" + } + }, + { + "if": { + "required": [ "bindingVersion" ], + "properties": { + "bindingVersion": { + "const": "0.2.0" + } + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/sqs/0.2.0/channel.json" + } + } + ] + }, "stomp": {}, "redis": {}, "ibmmq": { diff --git a/definitions/3.0.0/operationBindingsObject.json b/definitions/3.0.0/operationBindingsObject.json index 8f629437..d8237791 100644 --- a/definitions/3.0.0/operationBindingsObject.json +++ b/definitions/3.0.0/operationBindingsObject.json @@ -214,7 +214,41 @@ }, "jms": {}, "sns": {}, - "sqs": {}, + "sqs": { + "properties": { + "bindingVersion": { + "enum": ["0.2.0"] + } + }, + "allOf": [ + { + "description": "If no bindingVersion specified, use the latest binding", + "if": { + "not": { + "required": [ + "bindingVersion" + ] + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/sqs/0.2.0/operation.json" + } + }, + { + "if": { + "required": [ "bindingVersion" ], + "properties": { + "bindingVersion": { + "const": "0.2.0" + } + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/sqs/0.2.0/operation.json" + } + } + ] + }, "stomp": {}, "redis": {}, "ibmmq": {}, From f1670aaa3858c67936779b2391cee05aba7a1b55 Mon Sep 17 00:00:00 2001 From: "jonas-lt@live.dk" Date: Fri, 17 Nov 2023 11:36:13 -1000 Subject: [PATCH 087/102] add sns bindings --- bindings/sns/0.1.0/channel.json | 150 ++++++++++ bindings/sns/0.1.0/operation.json | 273 ++++++++++++++++++ definitions/3.0.0/channelBindingsObject.json | 38 ++- .../3.0.0/operationBindingsObject.json | 36 ++- 4 files changed, 494 insertions(+), 3 deletions(-) create mode 100644 bindings/sns/0.1.0/channel.json create mode 100644 bindings/sns/0.1.0/operation.json diff --git a/bindings/sns/0.1.0/channel.json b/bindings/sns/0.1.0/channel.json new file mode 100644 index 00000000..6ab5e2f6 --- /dev/null +++ b/bindings/sns/0.1.0/channel.json @@ -0,0 +1,150 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/bindings/sns/channel.json", + "title": "Channel Schema", + "description": "This object contains information about the channel representation in SNS.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\-\\_]+$": { + "$ref": "https://raw.githubusercontent.com/asyncapi/spec-json-schemas/v2.14.0/schemas/2.4.0.json#/definitions/specificationExtension" + } + }, + "properties": { + "name": { + "type": "string", + "description": "The name of the topic. Can be different from the channel name to allow flexibility around AWS resource naming limitations." + }, + "ordering": { + "$ref": "#/definitions/ordering" + }, + "policy": { + "$ref": "#/definitions/policy" + }, + "tags": { + "type": "object", + "description": "Key-value pairs that represent AWS tags on the topic." + }, + "bindingVersion": { + "type": "string", + "description": "The version of this binding.", + "default": "latest" + } + }, + "required": [ + "name" + ], + "definitions": { + "ordering": { + "type": "object", + "description": "By default, we assume an unordered SNS topic. This field allows configuration of a FIFO SNS Topic.", + "patternProperties": { + "^x-[\\w\\d\\.\\-\\_]+$": { + "$ref": "https://raw.githubusercontent.com/asyncapi/spec-json-schemas/v2.14.0/schemas/2.4.0.json#/definitions/specificationExtension" + } + }, + "properties": { + "type": { + "type": "string", + "description": "Defines the type of SNS Topic.", + "enum": [ + "standard", + "FIFO" + ] + }, + "contentBasedDeduplication": { + "type": "boolean", + "description": "True to turn on de-duplication of messages for a channel." + } + }, + "required": [ + "type" + ] + }, + "policy": { + "type": "object", + "description": "The security policy for the SNS Topic.", + "patternProperties": { + "^x-[\\w\\d\\.\\-\\_]+$": { + "$ref": "https://raw.githubusercontent.com/asyncapi/spec-json-schemas/v2.14.0/schemas/2.4.0.json#/definitions/specificationExtension" + } + }, + "properties": { + "statements": { + "type": "array", + "description": "An array of statement objects, each of which controls a permission for this topic", + "items": { + "$ref": "#/definitions/statement" + } + } + }, + "required": [ + "statements" + ] + }, + "statement": { + "type": "object", + "patternProperties": { + "^x-[\\w\\d\\.\\-\\_]+$": { + "$ref": "https://raw.githubusercontent.com/asyncapi/spec-json-schemas/v2.14.0/schemas/2.4.0.json#/definitions/specificationExtension" + } + }, + "properties": { + "effect": { + "type": "string", + "enum": [ + "Allow", + "Deny" + ] + }, + "principal": { + "description": "The AWS account or resource ARN that this statement applies to.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "action": { + "description": "The SNS permission being allowed or denied e.g. sns:Publish", + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + } + }, + "required": [ + "effect", + "principal", + "action" + ] + } + }, + "examples": [ + { + "name": "my-sns-topic", + "policy": { + "statements": [ + { + "effect": "Allow", + "principal": "*", + "action": "SNS:Publish" + } + ] + } + } + ] +} diff --git a/bindings/sns/0.1.0/operation.json b/bindings/sns/0.1.0/operation.json new file mode 100644 index 00000000..25eb5935 --- /dev/null +++ b/bindings/sns/0.1.0/operation.json @@ -0,0 +1,273 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/bindings/sns/operation.json", + "title": "Operation Schema", + "description": "This object contains information about the operation representation in SNS.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\-\\_]+$": { + "$ref": "https://raw.githubusercontent.com/asyncapi/spec-json-schemas/v2.14.0/schemas/2.4.0.json#/definitions/specificationExtension" + } + }, + "properties": { + "topic": { + "$ref": "#/definitions/identifier", + "description": "Often we can assume that the SNS Topic is the channel name-we provide this field in case the you need to supply the ARN, or the Topic name is not the channel name in the AsyncAPI document." + }, + "consumers": { + "type": "array", + "description": "The protocols that listen to this topic and their endpoints.", + "items": { + "$ref": "#/definitions/consumer" + }, + "minItems": 1 + }, + "deliveryPolicy": { + "$ref": "#/definitions/deliveryPolicy", + "description": "Policy for retries to HTTP. The field is the default for HTTP receivers of the SNS Topic which may be overridden by a specific consumer." + }, + "bindingVersion": { + "type": "string", + "description": "The version of this binding.", + "default": "latest" + } + }, + "required": [ + "consumers" + ], + "definitions": { + "identifier": { + "type": "object", + "patternProperties": { + "^x-[\\w\\d\\.\\-\\_]+$": { + "$ref": "https://raw.githubusercontent.com/asyncapi/spec-json-schemas/v2.14.0/schemas/2.4.0.json#/definitions/specificationExtension" + } + }, + "properties": { + "url": { + "type": "string", + "description": "The endpoint is a URL." + }, + "email": { + "type": "string", + "description": "The endpoint is an email adress." + }, + "phone": { + "type": "string", + "description": "The endpoint is a phone number." + }, + "arn": { + "type": "string", + "description": "The target is an ARN. For example, for SQS, the identifier may be an ARN, which will be of the form: arn:aws:sqs:{region}:{account-id}:{queueName}" + }, + "name": { + "type": "string", + "description": "The endpoint is identified by a name, which corresponds to an identifying field called 'name' of a binding for that protocol on this publish Operation Object. For example, if the protocol is 'sqs' then the name refers to the name field sqs binding. We don't use $ref because we are referring, not including." + } + } + }, + "consumer": { + "type": "object", + "patternProperties": { + "^x-[\\w\\d\\.\\-\\_]+$": { + "$ref": "https://raw.githubusercontent.com/asyncapi/spec-json-schemas/v2.14.0/schemas/2.4.0.json#/definitions/specificationExtension" + } + }, + "properties": { + "protocol": { + "description": "The protocol that this endpoint receives messages by.", + "type": "string", + "enum": [ + "http", + "https", + "email", + "email-json", + "sms", + "sqs", + "application", + "lambda", + "firehose" + ] + }, + "endpoint": { + "description": "The endpoint messages are delivered to.", + "$ref": "#/definitions/identifier" + }, + "filterPolicy": { + "type": "object", + "description": "Only receive a subset of messages from the channel, determined by this policy. Depending on the FilterPolicyScope, a map of either a message attribute or message body to an array of possible matches. The match may be a simple string for an exact match, but it may also be an object that represents a constraint and values for that constraint.", + "patternProperties": { + "^x-[\\w\\d\\.\\-\\_]+$": { + "$ref": "https://raw.githubusercontent.com/asyncapi/spec-json-schemas/v2.14.0/schemas/2.4.0.json#/definitions/specificationExtension" + } + }, + "additionalProperties": { + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "string" + }, + { + "type": "object" + } + ] + } + }, + "filterPolicyScope": { + "type": "string", + "description": "Determines whether the FilterPolicy applies to MessageAttributes or MessageBody.", + "enum": [ + "MessageAttributes", + "MessageBody" + ], + "default": "MessageAttributes" + }, + "rawMessageDelivery": { + "type": "boolean", + "description": "If true AWS SNS attributes are removed from the body, and for SQS, SNS message attributes are copied to SQS message attributes. If false the SNS attributes are included in the body." + }, + "redrivePolicy": { + "$ref": "#/definitions/redrivePolicy" + }, + "deliveryPolicy": { + "$ref": "#/definitions/deliveryPolicy", + "description": "Policy for retries to HTTP. The parameter is for that SNS Subscription and overrides any policy on the SNS Topic." + }, + "displayName": { + "type": "string", + "description": "The display name to use with an SNS subscription" + } + }, + "required": [ + "protocol", + "endpoint", + "rawMessageDelivery" + ] + }, + "deliveryPolicy": { + "type": "object", + "patternProperties": { + "^x-[\\w\\d\\.\\-\\_]+$": { + "$ref": "https://raw.githubusercontent.com/asyncapi/spec-json-schemas/v2.14.0/schemas/2.4.0.json#/definitions/specificationExtension" + } + }, + "properties": { + "minDelayTarget": { + "type": "integer", + "description": "The minimum delay for a retry in seconds." + }, + "maxDelayTarget": { + "type": "integer", + "description": "The maximum delay for a retry in seconds." + }, + "numRetries": { + "type": "integer", + "description": "The total number of retries, including immediate, pre-backoff, backoff, and post-backoff retries." + }, + "numNoDelayRetries": { + "type": "integer", + "description": "The number of immediate retries (with no delay)." + }, + "numMinDelayRetries": { + "type": "integer", + "description": "The number of immediate retries (with delay)." + }, + "numMaxDelayRetries": { + "type": "integer", + "description": "The number of post-backoff phase retries, with the maximum delay between retries." + }, + "backoffFunction": { + "type": "string", + "description": "The algorithm for backoff between retries.", + "enum": [ + "arithmetic", + "exponential", + "geometric", + "linear" + ] + }, + "maxReceivesPerSecond": { + "type": "integer", + "description": "The maximum number of deliveries per second, per subscription." + } + } + }, + "redrivePolicy": { + "type": "object", + "description": "Prevent poison pill messages by moving un-processable messages to an SQS dead letter queue.", + "patternProperties": { + "^x-[\\w\\d\\.\\-\\_]+$": { + "$ref": "https://raw.githubusercontent.com/asyncapi/spec-json-schemas/v2.14.0/schemas/2.4.0.json#/definitions/specificationExtension" + } + }, + "properties": { + "deadLetterQueue": { + "$ref": "#/definitions/identifier", + "description": "The SQS queue to use as a dead letter queue (DLQ)." + }, + "maxReceiveCount": { + "type": "integer", + "description": "The number of times a message is delivered to the source queue before being moved to the dead-letter queue.", + "default": 10 + } + }, + "required": [ + "deadLetterQueue" + ] + } + }, + "examples": [ + { + "topic": { + "name": "someTopic" + }, + "consumers": [ + { + "protocol": "sqs", + "endpoint": { + "name": "someQueue" + }, + "filterPolicy": { + "store": [ + "asyncapi_corp" + ], + "event": [ + { + "anything-but": "order_cancelled" + } + ], + "customer_interests": [ + "rugby", + "football", + "baseball" + ] + }, + "filterPolicyScope": "MessageAttributes", + "rawMessageDelivery": false, + "redrivePolicy": { + "deadLetterQueue": { + "arn": "arn:aws:SQS:eu-west-1:0000000:123456789" + }, + "maxReceiveCount": 25 + }, + "deliveryPolicy": { + "minDelayTarget": 10, + "maxDelayTarget": 100, + "numRetries": 5, + "numNoDelayRetries": 2, + "numMinDelayRetries": 3, + "numMaxDelayRetries": 5, + "backoffFunction": "linear", + "maxReceivesPerSecond": 2 + } + } + ] + } + ] +} diff --git a/definitions/3.0.0/channelBindingsObject.json b/definitions/3.0.0/channelBindingsObject.json index d1c44baa..fe2dd301 100644 --- a/definitions/3.0.0/channelBindingsObject.json +++ b/definitions/3.0.0/channelBindingsObject.json @@ -166,13 +166,47 @@ }, "nats": {}, "jms": {}, - "sns": {}, - "sqs": { + "sns": { "properties": { "bindingVersion": { "enum": ["0.1.0"] } }, + "allOf": [ + { + "description": "If no bindingVersion specified, use the latest binding", + "if": { + "not": { + "required": [ + "bindingVersion" + ] + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/sns/0.1.0/channel.json" + } + }, + { + "if": { + "required": [ "bindingVersion" ], + "properties": { + "bindingVersion": { + "const": "0.1.0" + } + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/sns/0.1.0/channel.json" + } + } + ] + }, + "sqs": { + "properties": { + "bindingVersion": { + "enum": ["0.2.0"] + } + }, "allOf": [ { "description": "If no bindingVersion specified, use the latest binding", diff --git a/definitions/3.0.0/operationBindingsObject.json b/definitions/3.0.0/operationBindingsObject.json index d8237791..654ef5cc 100644 --- a/definitions/3.0.0/operationBindingsObject.json +++ b/definitions/3.0.0/operationBindingsObject.json @@ -213,7 +213,41 @@ ] }, "jms": {}, - "sns": {}, + "sns": { + "properties": { + "bindingVersion": { + "enum": ["0.1.0"] + } + }, + "allOf": [ + { + "description": "If no bindingVersion specified, use the latest binding", + "if": { + "not": { + "required": [ + "bindingVersion" + ] + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/sns/0.1.0/operation.json" + } + }, + { + "if": { + "required": [ "bindingVersion" ], + "properties": { + "bindingVersion": { + "const": "0.1.0" + } + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/sns/0.1.0/operation.json" + } + } + ] + }, "sqs": { "properties": { "bindingVersion": { From da043661c9c439d3dd6b3f66deb8c6119aff8655 Mon Sep 17 00:00:00 2001 From: "jonas-lt@live.dk" Date: Fri, 17 Nov 2023 11:37:42 -1000 Subject: [PATCH 088/102] change ids of sns and sqs bindings --- bindings/sns/0.1.0/channel.json | 2 +- bindings/sns/0.1.0/operation.json | 2 +- bindings/sqs/0.2.0/channel.json | 2 +- bindings/sqs/0.2.0/operation.json | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/bindings/sns/0.1.0/channel.json b/bindings/sns/0.1.0/channel.json index 6ab5e2f6..88d62512 100644 --- a/bindings/sns/0.1.0/channel.json +++ b/bindings/sns/0.1.0/channel.json @@ -1,6 +1,6 @@ { "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "http://asyncapi.com/bindings/sns/channel.json", + "$id": "http://asyncapi.com/bindings/sns/0.1.0/channel.json", "title": "Channel Schema", "description": "This object contains information about the channel representation in SNS.", "type": "object", diff --git a/bindings/sns/0.1.0/operation.json b/bindings/sns/0.1.0/operation.json index 25eb5935..0e023e9b 100644 --- a/bindings/sns/0.1.0/operation.json +++ b/bindings/sns/0.1.0/operation.json @@ -1,6 +1,6 @@ { "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "http://asyncapi.com/bindings/sns/operation.json", + "$id": "http://asyncapi.com/bindings/sns/0.1.0/operation.json", "title": "Operation Schema", "description": "This object contains information about the operation representation in SNS.", "type": "object", diff --git a/bindings/sqs/0.2.0/channel.json b/bindings/sqs/0.2.0/channel.json index 6e5279d7..550e7fac 100644 --- a/bindings/sqs/0.2.0/channel.json +++ b/bindings/sqs/0.2.0/channel.json @@ -1,6 +1,6 @@ { "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "http://asyncapi.com/bindings/sqs/channel.json", + "$id": "http://asyncapi.com/bindings/sqs/0.2.0/channel.json", "title": "Channel Schema", "description": "This object contains information about the channel representation in SQS.", "type": "object", diff --git a/bindings/sqs/0.2.0/operation.json b/bindings/sqs/0.2.0/operation.json index 9bd1e5bf..b6d1529b 100644 --- a/bindings/sqs/0.2.0/operation.json +++ b/bindings/sqs/0.2.0/operation.json @@ -1,6 +1,6 @@ { "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "http://asyncapi.com/bindings/sqs/operation.json", + "$id": "http://asyncapi.com/bindings/sqs/0.2.0/operation.json", "title": "Operation Schema", "description": "This object contains information about the operation representation in SQS.", "type": "object", From 4a31bca9e3c1f37b407e88bd514e60afcaba188d Mon Sep 17 00:00:00 2001 From: "jonas-lt@live.dk" Date: Fri, 17 Nov 2023 11:41:26 -1000 Subject: [PATCH 089/102] add jms bindings --- bindings/jms/0.0.1/channel.json | 40 +++++++++++ bindings/jms/0.0.1/message.json | 73 ++++++++++++++++++++ bindings/jms/0.0.1/server.json | 69 ++++++++++++++++++ definitions/3.0.0/channelBindingsObject.json | 36 +++++++++- definitions/3.0.0/messageBindingsObject.json | 36 +++++++++- definitions/3.0.0/serverBindingsObject.json | 36 +++++++++- 6 files changed, 287 insertions(+), 3 deletions(-) create mode 100644 bindings/jms/0.0.1/channel.json create mode 100644 bindings/jms/0.0.1/message.json create mode 100644 bindings/jms/0.0.1/server.json diff --git a/bindings/jms/0.0.1/channel.json b/bindings/jms/0.0.1/channel.json new file mode 100644 index 00000000..174202ef --- /dev/null +++ b/bindings/jms/0.0.1/channel.json @@ -0,0 +1,40 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/bindings/jms/0.0.1/channel.json", + "title": "Channel Schema", + "description": "This object contains configuration for describing a JMS queue, or FIFO queue as an AsyncAPI channel. This objects only contains configuration that can not be provided in the AsyncAPI standard channel object.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\-\\_]+$": { + "$ref": "https://raw.githubusercontent.com/asyncapi/asyncapi-node/v2.7.7/schemas/2.0.0.json#/definitions/specificationExtension" + } + }, + "properties": { + "destination": { + "type": "string", + "description": "The destination (queue) name for this channel. SHOULD only be specified if the channel name differs from the actual destination name, such as when the channel name is not a valid destination name according to the JMS Provider. Defaults to the channel name." + }, + "destinationType": { + "type": "string", + "enum": ["queue", "fifo-queue"], + "default": "queue", + "description": "The type of destination. SHOULD be specified to document the messaging model (point-to-point, or strict message ordering) supported by this channel." + }, + "bindingVersion": { + "type": "string", + "enum": [ + "0.0.1" + ], + "description": "The version of this binding. If omitted, 'latest' MUST be assumed." + } + + }, + "examples": [ + { + "destination": "user-signed-up", + "destinationType": "fifo-queue", + "bindingVersion": "0.0.1" + } + ] +} diff --git a/bindings/jms/0.0.1/message.json b/bindings/jms/0.0.1/message.json new file mode 100644 index 00000000..181b1e56 --- /dev/null +++ b/bindings/jms/0.0.1/message.json @@ -0,0 +1,73 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/bindings/jms/0.0.1/message.json", + "title": "Message Schema", + "description": "This object contains configuration for describing a JMS message as an AsyncAPI message. This objects only contains configuration that can not be provided in the AsyncAPI standard message object.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\-\\_]+$": { + "$ref": "https://raw.githubusercontent.com/asyncapi/asyncapi-node/v2.7.7/schemas/2.0.0.json#/definitions/specificationExtension" + } + }, + "properties": { + "headers": { + "$ref": "https://raw.githubusercontent.com/asyncapi/asyncapi-node/v2.7.7/schemas/2.0.0.json#/definitions/schema", + "description": "A Schema object containing the definitions for JMS headers (protocol headers). This schema MUST be of type 'object' and have a 'properties' key. Examples of JMS protocol headers are 'JMSMessageID', 'JMSTimestamp', and 'JMSCorrelationID'." + }, + "bindingVersion": { + "type": "string", + "enum": [ + "0.0.1" + ], + "description": "The version of this binding. If omitted, 'latest' MUST be assumed." + } + + }, + "examples": [ + { + "headers": { + "type": "object", + "required": ["JMSMessageID"], + "properties": { + "JMSMessageID": { + "type": ["string", "null"], + "description": "A unique message identifier. This may be set by your JMS Provider on your behalf." + }, + "JMSTimestamp": { + "type": "integer", + "description": "The time the message was sent. This may be set by your JMS Provider on your behalf. The time the message was sent. The value of the timestamp is the amount of time, measured in milliseconds, that has elapsed since midnight, January 1, 1970, UTC." + }, + "JMSDeliveryMode": { + "type": "string", + "enum": ["PERSISTENT", "NON_PERSISTENT"], + "default": "PERSISTENT", + "description": "Denotes the delivery mode for the message. This may be set by your JMS Provider on your behalf." + }, + "JMSPriority": { + "type": "integer", + "default": 4, + "description": "The priority of the message. This may be set by your JMS Provider on your behalf." + }, + "JMSExpires": { + "type": "integer", + "description": "The time at which the message expires. This may be set by your JMS Provider on your behalf. A value of zero means that the message does not expire. Any non-zero value is the amount of time, measured in milliseconds, that has elapsed since midnight, January 1, 1970, UTC, at which the message will expire." + }, + "JMSType": { + "type": ["string", "null"], + "description": "The type of message. Some JMS providers use a message repository that contains the definitions of messages sent by applications. The 'JMSType' header field may reference a message's definition in the provider's repository. The JMS API does not define a standard message definition repository, nor does it define a naming policy for the definitions it contains. Some messaging systems require that a message type definition for each application message be created and that each message specify its type. In order to work with such JMS providers, JMS clients should assign a value to 'JMSType', whether the application makes use of it or not. This ensures that the field is properly set for those providers that require it." + }, + "JMSCorrelationID": { + "type": ["string", "null"], + "description": "The correlation identifier of the message. A client can use the 'JMSCorrelationID' header field to link one message with another. A typical use is to link a response message with its request message. Since each message sent by a JMS provider is assigned a message ID value, it is convenient to link messages via message ID, such message ID values must start with the 'ID:' prefix. Conversely, application-specified values must not start with the 'ID:' prefix; this is reserved for provider-generated message ID values." + }, + "JMSReplyTo": { + "type": "string", + "description": "The queue or topic that the message sender expects replies to." + } + } + }, + "bindingVersion": "0.0.1" + } + ] +} diff --git a/bindings/jms/0.0.1/server.json b/bindings/jms/0.0.1/server.json new file mode 100644 index 00000000..1466dade --- /dev/null +++ b/bindings/jms/0.0.1/server.json @@ -0,0 +1,69 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/bindings/jms/0.0.1/server.json", + "title": "Server Schema", + "description": "This object contains configuration for describing a JMS broker as an AsyncAPI server. This objects only contains configuration that can not be provided in the AsyncAPI standard server object.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\-\\_]+$": { + "$ref": "https://raw.githubusercontent.com/asyncapi/asyncapi-node/v2.7.7/schemas/2.0.0.json#/definitions/specificationExtension" + } + }, + "required": ["jmsConnectionFactory"], + "properties": { + "jmsConnectionFactory": { + "type": "string", + "description": "The classname of the ConnectionFactory implementation for the JMS Provider." + }, + "properties": { + "type": "array", + "items": { + "$ref": "#/schemas/property" + }, + "description": "Additional properties to set on the JMS ConnectionFactory implementation for the JMS Provider." + }, + "clientID": { + "type": "string", + "description": "A client identifier for applications that use this JMS connection factory. If the Client ID Policy is set to 'Restricted' (the default), then configuring a Client ID on the ConnectionFactory prevents more than one JMS client from using a connection from this factory." + }, + "bindingVersion": { + "type": "string", + "enum": [ + "0.0.1" + ], + "description": "The version of this binding. If omitted, 'latest' MUST be assumed." + } + + }, + "schemas": { + "property": { + "type": "object", + "required": ["name", "value"], + "properties": { + "name": { + "type": "string", + "description": "The name of a property" + }, + "value": { + "type": ["string", "boolean", "number", "null"], + "description": "The name of a property" + } + } + } + }, + "examples": [ + { + "jmsConnectionFactory": "org.apache.activemq.ActiveMQConnectionFactory", + "properties": [ + { + "name": "disableTimeStampsByDefault", + "value": false + } + ], + "clientID": "my-application-1", + "bindingVersion": "0.0.1" + } + ] + } + \ No newline at end of file diff --git a/definitions/3.0.0/channelBindingsObject.json b/definitions/3.0.0/channelBindingsObject.json index fe2dd301..666212c3 100644 --- a/definitions/3.0.0/channelBindingsObject.json +++ b/definitions/3.0.0/channelBindingsObject.json @@ -165,7 +165,41 @@ ] }, "nats": {}, - "jms": {}, + "jms": { + "properties": { + "bindingVersion": { + "enum": ["0.0.1"] + } + }, + "allOf": [ + { + "description": "If no bindingVersion specified, use the latest binding", + "if": { + "not": { + "required": [ + "bindingVersion" + ] + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/jms/0.0.1/channel.json" + } + }, + { + "if": { + "required": [ "bindingVersion" ], + "properties": { + "bindingVersion": { + "const": "0.0.1" + } + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/jms/0.0.1/channel.json" + } + } + ] + }, "sns": { "properties": { "bindingVersion": { diff --git a/definitions/3.0.0/messageBindingsObject.json b/definitions/3.0.0/messageBindingsObject.json index cfe65074..ea07325e 100644 --- a/definitions/3.0.0/messageBindingsObject.json +++ b/definitions/3.0.0/messageBindingsObject.json @@ -212,7 +212,41 @@ ] }, "nats": {}, - "jms": {}, + "jms": { + "properties": { + "bindingVersion": { + "enum": ["0.0.1"] + } + }, + "allOf": [ + { + "description": "If no bindingVersion specified, use the latest binding", + "if": { + "not": { + "required": [ + "bindingVersion" + ] + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/jms/0.0.1/message.json" + } + }, + { + "if": { + "required": [ "bindingVersion" ], + "properties": { + "bindingVersion": { + "const": "0.0.1" + } + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/jms/0.0.1/message.json" + } + } + ] + }, "sns": {}, "sqs": {}, "stomp": {}, diff --git a/definitions/3.0.0/serverBindingsObject.json b/definitions/3.0.0/serverBindingsObject.json index 5782a1c5..7245f01e 100644 --- a/definitions/3.0.0/serverBindingsObject.json +++ b/definitions/3.0.0/serverBindingsObject.json @@ -131,7 +131,41 @@ }, "anypointmq": {}, "nats": {}, - "jms": {}, + "jms": { + "properties": { + "bindingVersion": { + "enum": ["0.0.1"] + } + }, + "allOf": [ + { + "description": "If no bindingVersion specified, use the latest binding", + "if": { + "not": { + "required": [ + "bindingVersion" + ] + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/jms/0.0.1/server.json" + } + }, + { + "if": { + "required": [ "bindingVersion" ], + "properties": { + "bindingVersion": { + "const": "0.0.1" + } + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/jms/0.0.1/server.json" + } + } + ] + }, "sns": {}, "sqs": {}, "stomp": {}, From e45fb8e5fd8980760a43043dd1f85ef01ef3f216 Mon Sep 17 00:00:00 2001 From: "jonas-lt@live.dk" Date: Fri, 17 Nov 2023 11:43:18 -1000 Subject: [PATCH 090/102] adapt http bindings --- bindings/http/0.1.0/message.json | 9 ++++++++- bindings/http/0.1.0/operation.json | 9 ++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/bindings/http/0.1.0/message.json b/bindings/http/0.1.0/message.json index 7295151a..20b088a2 100644 --- a/bindings/http/0.1.0/message.json +++ b/bindings/http/0.1.0/message.json @@ -12,7 +12,14 @@ }, "properties": { "headers": { - "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json", + "oneOf": [ + { + "$ref": "https://asyncapi.com/definitions/3.0.0/schema.json" + }, + { + "$ref": "https://asyncapi.com/definitions/3.0.0/Reference.json" + } + ], "description": "\tA Schema object containing the definitions for HTTP-specific headers. This schema MUST be of type 'object' and have a 'properties' key." }, "bindingVersion": { diff --git a/bindings/http/0.1.0/operation.json b/bindings/http/0.1.0/operation.json index 61119a7a..ecfb71fd 100644 --- a/bindings/http/0.1.0/operation.json +++ b/bindings/http/0.1.0/operation.json @@ -35,7 +35,14 @@ "description": "When 'type' is 'request', this is the HTTP method, otherwise it MUST be ignored. Its value MUST be one of 'GET', 'POST', 'PUT', 'PATCH', 'DELETE', 'HEAD', 'OPTIONS', 'CONNECT', and 'TRACE'." }, "query": { - "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json", + "oneOf": [ + { + "$ref": "https://asyncapi.com/definitions/3.0.0/schema.json" + }, + { + "$ref": "https://asyncapi.com/definitions/3.0.0/Reference.json" + } + ], "description": "A Schema object containing the definitions for each query parameter. This schema MUST be of type 'object' and have a properties key." }, "bindingVersion": { From 64a69a628ebb02248cadcb04c843cce4419b90fd Mon Sep 17 00:00:00 2001 From: "jonas-lt@live.dk" Date: Fri, 17 Nov 2023 11:44:17 -1000 Subject: [PATCH 091/102] adapt anypointmq bindings --- bindings/anypointmq/0.0.1/message.json | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/bindings/anypointmq/0.0.1/message.json b/bindings/anypointmq/0.0.1/message.json index 16075b90..1ad68c11 100644 --- a/bindings/anypointmq/0.0.1/message.json +++ b/bindings/anypointmq/0.0.1/message.json @@ -12,7 +12,14 @@ }, "properties": { "headers": { - "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json", + "oneOf": [ + { + "$ref": "https://asyncapi.com/definitions/3.0.0/schema.json" + }, + { + "$ref": "https://asyncapi.com/definitions/3.0.0/Reference.json" + } + ], "description": "A Schema object containing the definitions for Anypoint MQ-specific headers (protocol headers). This schema MUST be of type 'object' and have a 'properties' key. Examples of Anypoint MQ protocol headers are 'messageId' and 'messageGroupId'." }, "bindingVersion": { From ec957940dfcf55a74087cf9f1a27d460883d9fba Mon Sep 17 00:00:00 2001 From: "jonas-lt@live.dk" Date: Fri, 17 Nov 2023 11:46:35 -1000 Subject: [PATCH 092/102] adapt all patterns for specification extension --- bindings/jms/0.0.1/channel.json | 2 +- bindings/jms/0.0.1/message.json | 2 +- bindings/jms/0.0.1/server.json | 2 +- bindings/sns/0.1.0/channel.json | 8 ++++---- bindings/sns/0.1.0/operation.json | 12 ++++++------ bindings/sqs/0.2.0/channel.json | 12 ++++++------ bindings/sqs/0.2.0/operation.json | 12 ++++++------ 7 files changed, 25 insertions(+), 25 deletions(-) diff --git a/bindings/jms/0.0.1/channel.json b/bindings/jms/0.0.1/channel.json index 174202ef..874d1ec0 100644 --- a/bindings/jms/0.0.1/channel.json +++ b/bindings/jms/0.0.1/channel.json @@ -6,7 +6,7 @@ "type": "object", "additionalProperties": false, "patternProperties": { - "^x-[\\w\\d\\.\\-\\_]+$": { + "^x-[\\w\\d\\.\\x2d_]+$": { "$ref": "https://raw.githubusercontent.com/asyncapi/asyncapi-node/v2.7.7/schemas/2.0.0.json#/definitions/specificationExtension" } }, diff --git a/bindings/jms/0.0.1/message.json b/bindings/jms/0.0.1/message.json index 181b1e56..ba1909b8 100644 --- a/bindings/jms/0.0.1/message.json +++ b/bindings/jms/0.0.1/message.json @@ -6,7 +6,7 @@ "type": "object", "additionalProperties": false, "patternProperties": { - "^x-[\\w\\d\\.\\-\\_]+$": { + "^x-[\\w\\d\\.\\x2d_]+$": { "$ref": "https://raw.githubusercontent.com/asyncapi/asyncapi-node/v2.7.7/schemas/2.0.0.json#/definitions/specificationExtension" } }, diff --git a/bindings/jms/0.0.1/server.json b/bindings/jms/0.0.1/server.json index 1466dade..85be5fff 100644 --- a/bindings/jms/0.0.1/server.json +++ b/bindings/jms/0.0.1/server.json @@ -6,7 +6,7 @@ "type": "object", "additionalProperties": false, "patternProperties": { - "^x-[\\w\\d\\.\\-\\_]+$": { + "^x-[\\w\\d\\.\\x2d_]+$": { "$ref": "https://raw.githubusercontent.com/asyncapi/asyncapi-node/v2.7.7/schemas/2.0.0.json#/definitions/specificationExtension" } }, diff --git a/bindings/sns/0.1.0/channel.json b/bindings/sns/0.1.0/channel.json index 88d62512..7a0d8a21 100644 --- a/bindings/sns/0.1.0/channel.json +++ b/bindings/sns/0.1.0/channel.json @@ -6,7 +6,7 @@ "type": "object", "additionalProperties": false, "patternProperties": { - "^x-[\\w\\d\\.\\-\\_]+$": { + "^x-[\\w\\d\\.\\x2d_]+$": { "$ref": "https://raw.githubusercontent.com/asyncapi/spec-json-schemas/v2.14.0/schemas/2.4.0.json#/definitions/specificationExtension" } }, @@ -39,7 +39,7 @@ "type": "object", "description": "By default, we assume an unordered SNS topic. This field allows configuration of a FIFO SNS Topic.", "patternProperties": { - "^x-[\\w\\d\\.\\-\\_]+$": { + "^x-[\\w\\d\\.\\x2d_]+$": { "$ref": "https://raw.githubusercontent.com/asyncapi/spec-json-schemas/v2.14.0/schemas/2.4.0.json#/definitions/specificationExtension" } }, @@ -65,7 +65,7 @@ "type": "object", "description": "The security policy for the SNS Topic.", "patternProperties": { - "^x-[\\w\\d\\.\\-\\_]+$": { + "^x-[\\w\\d\\.\\x2d_]+$": { "$ref": "https://raw.githubusercontent.com/asyncapi/spec-json-schemas/v2.14.0/schemas/2.4.0.json#/definitions/specificationExtension" } }, @@ -85,7 +85,7 @@ "statement": { "type": "object", "patternProperties": { - "^x-[\\w\\d\\.\\-\\_]+$": { + "^x-[\\w\\d\\.\\x2d_]+$": { "$ref": "https://raw.githubusercontent.com/asyncapi/spec-json-schemas/v2.14.0/schemas/2.4.0.json#/definitions/specificationExtension" } }, diff --git a/bindings/sns/0.1.0/operation.json b/bindings/sns/0.1.0/operation.json index 0e023e9b..7b95335e 100644 --- a/bindings/sns/0.1.0/operation.json +++ b/bindings/sns/0.1.0/operation.json @@ -6,7 +6,7 @@ "type": "object", "additionalProperties": false, "patternProperties": { - "^x-[\\w\\d\\.\\-\\_]+$": { + "^x-[\\w\\d\\.\\x2d_]+$": { "$ref": "https://raw.githubusercontent.com/asyncapi/spec-json-schemas/v2.14.0/schemas/2.4.0.json#/definitions/specificationExtension" } }, @@ -40,7 +40,7 @@ "identifier": { "type": "object", "patternProperties": { - "^x-[\\w\\d\\.\\-\\_]+$": { + "^x-[\\w\\d\\.\\x2d_]+$": { "$ref": "https://raw.githubusercontent.com/asyncapi/spec-json-schemas/v2.14.0/schemas/2.4.0.json#/definitions/specificationExtension" } }, @@ -70,7 +70,7 @@ "consumer": { "type": "object", "patternProperties": { - "^x-[\\w\\d\\.\\-\\_]+$": { + "^x-[\\w\\d\\.\\x2d_]+$": { "$ref": "https://raw.githubusercontent.com/asyncapi/spec-json-schemas/v2.14.0/schemas/2.4.0.json#/definitions/specificationExtension" } }, @@ -98,7 +98,7 @@ "type": "object", "description": "Only receive a subset of messages from the channel, determined by this policy. Depending on the FilterPolicyScope, a map of either a message attribute or message body to an array of possible matches. The match may be a simple string for an exact match, but it may also be an object that represents a constraint and values for that constraint.", "patternProperties": { - "^x-[\\w\\d\\.\\-\\_]+$": { + "^x-[\\w\\d\\.\\x2d_]+$": { "$ref": "https://raw.githubusercontent.com/asyncapi/spec-json-schemas/v2.14.0/schemas/2.4.0.json#/definitions/specificationExtension" } }, @@ -153,7 +153,7 @@ "deliveryPolicy": { "type": "object", "patternProperties": { - "^x-[\\w\\d\\.\\-\\_]+$": { + "^x-[\\w\\d\\.\\x2d_]+$": { "$ref": "https://raw.githubusercontent.com/asyncapi/spec-json-schemas/v2.14.0/schemas/2.4.0.json#/definitions/specificationExtension" } }, @@ -202,7 +202,7 @@ "type": "object", "description": "Prevent poison pill messages by moving un-processable messages to an SQS dead letter queue.", "patternProperties": { - "^x-[\\w\\d\\.\\-\\_]+$": { + "^x-[\\w\\d\\.\\x2d_]+$": { "$ref": "https://raw.githubusercontent.com/asyncapi/spec-json-schemas/v2.14.0/schemas/2.4.0.json#/definitions/specificationExtension" } }, diff --git a/bindings/sqs/0.2.0/channel.json b/bindings/sqs/0.2.0/channel.json index 550e7fac..426482cf 100644 --- a/bindings/sqs/0.2.0/channel.json +++ b/bindings/sqs/0.2.0/channel.json @@ -6,7 +6,7 @@ "type": "object", "additionalProperties": false, "patternProperties": { - "^x-[\\w\\d\\.\\-\\_]+$": { + "^x-[\\w\\d\\.\\x2d_]+$": { "$ref": "https://raw.githubusercontent.com/asyncapi/spec-json-schemas/v2.14.0/schemas/2.4.0.json#/definitions/specificationExtension" } }, @@ -37,7 +37,7 @@ "type": "object", "description": "A definition of a queue.", "patternProperties": { - "^x-[\\w\\d\\.\\-\\_]+$": { + "^x-[\\w\\d\\.\\x2d_]+$": { "$ref": "https://raw.githubusercontent.com/asyncapi/spec-json-schemas/v2.14.0/schemas/2.4.0.json#/definitions/specificationExtension" } }, @@ -109,7 +109,7 @@ "type": "object", "description": "Prevent poison pill messages by moving un-processable messages to an SQS dead letter queue.", "patternProperties": { - "^x-[\\w\\d\\.\\-\\_]+$": { + "^x-[\\w\\d\\.\\x2d_]+$": { "$ref": "https://raw.githubusercontent.com/asyncapi/spec-json-schemas/v2.14.0/schemas/2.4.0.json#/definitions/specificationExtension" } }, @@ -131,7 +131,7 @@ "type": "object", "description": "The SQS queue to use as a dead letter queue (DLQ).", "patternProperties": { - "^x-[\\w\\d\\.\\-\\_]+$": { + "^x-[\\w\\d\\.\\x2d_]+$": { "$ref": "https://raw.githubusercontent.com/asyncapi/spec-json-schemas/v2.14.0/schemas/2.4.0.json#/definitions/specificationExtension" } }, @@ -150,7 +150,7 @@ "type": "object", "description": "The security policy for the SQS Queue", "patternProperties": { - "^x-[\\w\\d\\.\\-\\_]+$": { + "^x-[\\w\\d\\.\\x2d_]+$": { "$ref": "https://raw.githubusercontent.com/asyncapi/spec-json-schemas/v2.14.0/schemas/2.4.0.json#/definitions/specificationExtension" } }, @@ -170,7 +170,7 @@ "statement": { "type": "object", "patternProperties": { - "^x-[\\w\\d\\.\\-\\_]+$": { + "^x-[\\w\\d\\.\\x2d_]+$": { "$ref": "https://raw.githubusercontent.com/asyncapi/spec-json-schemas/v2.14.0/schemas/2.4.0.json#/definitions/specificationExtension" } }, diff --git a/bindings/sqs/0.2.0/operation.json b/bindings/sqs/0.2.0/operation.json index b6d1529b..8115b40d 100644 --- a/bindings/sqs/0.2.0/operation.json +++ b/bindings/sqs/0.2.0/operation.json @@ -6,7 +6,7 @@ "type": "object", "additionalProperties": false, "patternProperties": { - "^x-[\\w\\d\\.\\-\\_]+$": { + "^x-[\\w\\d\\.\\x2d_]+$": { "$ref": "https://raw.githubusercontent.com/asyncapi/spec-json-schemas/v2.14.0/schemas/2.4.0.json#/definitions/specificationExtension" } }, @@ -36,7 +36,7 @@ "type": "object", "description": "A definition of a queue.", "patternProperties": { - "^x-[\\w\\d\\.\\-\\_]+$": { + "^x-[\\w\\d\\.\\x2d_]+$": { "$ref": "https://raw.githubusercontent.com/asyncapi/spec-json-schemas/v2.14.0/schemas/2.4.0.json#/definitions/specificationExtension" } }, @@ -111,7 +111,7 @@ "type": "object", "description": "Prevent poison pill messages by moving un-processable messages to an SQS dead letter queue.", "patternProperties": { - "^x-[\\w\\d\\.\\-\\_]+$": { + "^x-[\\w\\d\\.\\x2d_]+$": { "$ref": "https://raw.githubusercontent.com/asyncapi/spec-json-schemas/v2.14.0/schemas/2.4.0.json#/definitions/specificationExtension" } }, @@ -133,7 +133,7 @@ "type": "object", "description": "The SQS queue to use as a dead letter queue (DLQ).", "patternProperties": { - "^x-[\\w\\d\\.\\-\\_]+$": { + "^x-[\\w\\d\\.\\x2d_]+$": { "$ref": "https://raw.githubusercontent.com/asyncapi/spec-json-schemas/v2.14.0/schemas/2.4.0.json#/definitions/specificationExtension" } }, @@ -152,7 +152,7 @@ "type": "object", "description": "The security policy for the SQS Queue", "patternProperties": { - "^x-[\\w\\d\\.\\-\\_]+$": { + "^x-[\\w\\d\\.\\x2d_]+$": { "$ref": "https://raw.githubusercontent.com/asyncapi/spec-json-schemas/v2.14.0/schemas/2.4.0.json#/definitions/specificationExtension" } }, @@ -172,7 +172,7 @@ "statement": { "type": "object", "patternProperties": { - "^x-[\\w\\d\\.\\-\\_]+$": { + "^x-[\\w\\d\\.\\x2d_]+$": { "$ref": "https://raw.githubusercontent.com/asyncapi/spec-json-schemas/v2.14.0/schemas/2.4.0.json#/definitions/specificationExtension" } }, From 5615dacd5bcf61987c13978c80b788a9a3518a33 Mon Sep 17 00:00:00 2001 From: "jonas-lt@live.dk" Date: Fri, 17 Nov 2023 11:48:17 -1000 Subject: [PATCH 093/102] adapted all references to use v3 --- bindings/jms/0.0.1/channel.json | 2 +- bindings/jms/0.0.1/message.json | 4 ++-- bindings/jms/0.0.1/server.json | 2 +- bindings/sns/0.1.0/channel.json | 8 ++++---- bindings/sns/0.1.0/operation.json | 12 ++++++------ bindings/sqs/0.2.0/channel.json | 12 ++++++------ bindings/sqs/0.2.0/operation.json | 12 ++++++------ 7 files changed, 26 insertions(+), 26 deletions(-) diff --git a/bindings/jms/0.0.1/channel.json b/bindings/jms/0.0.1/channel.json index 874d1ec0..6e6bde39 100644 --- a/bindings/jms/0.0.1/channel.json +++ b/bindings/jms/0.0.1/channel.json @@ -7,7 +7,7 @@ "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "https://raw.githubusercontent.com/asyncapi/asyncapi-node/v2.7.7/schemas/2.0.0.json#/definitions/specificationExtension" + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" } }, "properties": { diff --git a/bindings/jms/0.0.1/message.json b/bindings/jms/0.0.1/message.json index ba1909b8..daad663f 100644 --- a/bindings/jms/0.0.1/message.json +++ b/bindings/jms/0.0.1/message.json @@ -7,12 +7,12 @@ "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "https://raw.githubusercontent.com/asyncapi/asyncapi-node/v2.7.7/schemas/2.0.0.json#/definitions/specificationExtension" + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" } }, "properties": { "headers": { - "$ref": "https://raw.githubusercontent.com/asyncapi/asyncapi-node/v2.7.7/schemas/2.0.0.json#/definitions/schema", + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json", "description": "A Schema object containing the definitions for JMS headers (protocol headers). This schema MUST be of type 'object' and have a 'properties' key. Examples of JMS protocol headers are 'JMSMessageID', 'JMSTimestamp', and 'JMSCorrelationID'." }, "bindingVersion": { diff --git a/bindings/jms/0.0.1/server.json b/bindings/jms/0.0.1/server.json index 85be5fff..f5e83ab4 100644 --- a/bindings/jms/0.0.1/server.json +++ b/bindings/jms/0.0.1/server.json @@ -7,7 +7,7 @@ "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "https://raw.githubusercontent.com/asyncapi/asyncapi-node/v2.7.7/schemas/2.0.0.json#/definitions/specificationExtension" + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" } }, "required": ["jmsConnectionFactory"], diff --git a/bindings/sns/0.1.0/channel.json b/bindings/sns/0.1.0/channel.json index 7a0d8a21..e4f15738 100644 --- a/bindings/sns/0.1.0/channel.json +++ b/bindings/sns/0.1.0/channel.json @@ -7,7 +7,7 @@ "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "https://raw.githubusercontent.com/asyncapi/spec-json-schemas/v2.14.0/schemas/2.4.0.json#/definitions/specificationExtension" + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" } }, "properties": { @@ -40,7 +40,7 @@ "description": "By default, we assume an unordered SNS topic. This field allows configuration of a FIFO SNS Topic.", "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "https://raw.githubusercontent.com/asyncapi/spec-json-schemas/v2.14.0/schemas/2.4.0.json#/definitions/specificationExtension" + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" } }, "properties": { @@ -66,7 +66,7 @@ "description": "The security policy for the SNS Topic.", "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "https://raw.githubusercontent.com/asyncapi/spec-json-schemas/v2.14.0/schemas/2.4.0.json#/definitions/specificationExtension" + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" } }, "properties": { @@ -86,7 +86,7 @@ "type": "object", "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "https://raw.githubusercontent.com/asyncapi/spec-json-schemas/v2.14.0/schemas/2.4.0.json#/definitions/specificationExtension" + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" } }, "properties": { diff --git a/bindings/sns/0.1.0/operation.json b/bindings/sns/0.1.0/operation.json index 7b95335e..44c2addb 100644 --- a/bindings/sns/0.1.0/operation.json +++ b/bindings/sns/0.1.0/operation.json @@ -7,7 +7,7 @@ "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "https://raw.githubusercontent.com/asyncapi/spec-json-schemas/v2.14.0/schemas/2.4.0.json#/definitions/specificationExtension" + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" } }, "properties": { @@ -41,7 +41,7 @@ "type": "object", "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "https://raw.githubusercontent.com/asyncapi/spec-json-schemas/v2.14.0/schemas/2.4.0.json#/definitions/specificationExtension" + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" } }, "properties": { @@ -71,7 +71,7 @@ "type": "object", "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "https://raw.githubusercontent.com/asyncapi/spec-json-schemas/v2.14.0/schemas/2.4.0.json#/definitions/specificationExtension" + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" } }, "properties": { @@ -99,7 +99,7 @@ "description": "Only receive a subset of messages from the channel, determined by this policy. Depending on the FilterPolicyScope, a map of either a message attribute or message body to an array of possible matches. The match may be a simple string for an exact match, but it may also be an object that represents a constraint and values for that constraint.", "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "https://raw.githubusercontent.com/asyncapi/spec-json-schemas/v2.14.0/schemas/2.4.0.json#/definitions/specificationExtension" + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" } }, "additionalProperties": { @@ -154,7 +154,7 @@ "type": "object", "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "https://raw.githubusercontent.com/asyncapi/spec-json-schemas/v2.14.0/schemas/2.4.0.json#/definitions/specificationExtension" + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" } }, "properties": { @@ -203,7 +203,7 @@ "description": "Prevent poison pill messages by moving un-processable messages to an SQS dead letter queue.", "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "https://raw.githubusercontent.com/asyncapi/spec-json-schemas/v2.14.0/schemas/2.4.0.json#/definitions/specificationExtension" + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" } }, "properties": { diff --git a/bindings/sqs/0.2.0/channel.json b/bindings/sqs/0.2.0/channel.json index 426482cf..ad4f8697 100644 --- a/bindings/sqs/0.2.0/channel.json +++ b/bindings/sqs/0.2.0/channel.json @@ -7,7 +7,7 @@ "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "https://raw.githubusercontent.com/asyncapi/spec-json-schemas/v2.14.0/schemas/2.4.0.json#/definitions/specificationExtension" + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" } }, "properties": { @@ -38,7 +38,7 @@ "description": "A definition of a queue.", "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "https://raw.githubusercontent.com/asyncapi/spec-json-schemas/v2.14.0/schemas/2.4.0.json#/definitions/specificationExtension" + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" } }, "properties": { @@ -110,7 +110,7 @@ "description": "Prevent poison pill messages by moving un-processable messages to an SQS dead letter queue.", "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "https://raw.githubusercontent.com/asyncapi/spec-json-schemas/v2.14.0/schemas/2.4.0.json#/definitions/specificationExtension" + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" } }, "properties": { @@ -132,7 +132,7 @@ "description": "The SQS queue to use as a dead letter queue (DLQ).", "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "https://raw.githubusercontent.com/asyncapi/spec-json-schemas/v2.14.0/schemas/2.4.0.json#/definitions/specificationExtension" + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" } }, "properties": { @@ -151,7 +151,7 @@ "description": "The security policy for the SQS Queue", "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "https://raw.githubusercontent.com/asyncapi/spec-json-schemas/v2.14.0/schemas/2.4.0.json#/definitions/specificationExtension" + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" } }, "properties": { @@ -171,7 +171,7 @@ "type": "object", "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "https://raw.githubusercontent.com/asyncapi/spec-json-schemas/v2.14.0/schemas/2.4.0.json#/definitions/specificationExtension" + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" } }, "properties": { diff --git a/bindings/sqs/0.2.0/operation.json b/bindings/sqs/0.2.0/operation.json index 8115b40d..9279dc51 100644 --- a/bindings/sqs/0.2.0/operation.json +++ b/bindings/sqs/0.2.0/operation.json @@ -7,7 +7,7 @@ "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "https://raw.githubusercontent.com/asyncapi/spec-json-schemas/v2.14.0/schemas/2.4.0.json#/definitions/specificationExtension" + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" } }, "properties": { @@ -37,7 +37,7 @@ "description": "A definition of a queue.", "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "https://raw.githubusercontent.com/asyncapi/spec-json-schemas/v2.14.0/schemas/2.4.0.json#/definitions/specificationExtension" + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" } }, "properties": { @@ -112,7 +112,7 @@ "description": "Prevent poison pill messages by moving un-processable messages to an SQS dead letter queue.", "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "https://raw.githubusercontent.com/asyncapi/spec-json-schemas/v2.14.0/schemas/2.4.0.json#/definitions/specificationExtension" + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" } }, "properties": { @@ -134,7 +134,7 @@ "description": "The SQS queue to use as a dead letter queue (DLQ).", "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "https://raw.githubusercontent.com/asyncapi/spec-json-schemas/v2.14.0/schemas/2.4.0.json#/definitions/specificationExtension" + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" } }, "properties": { @@ -153,7 +153,7 @@ "description": "The security policy for the SQS Queue", "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "https://raw.githubusercontent.com/asyncapi/spec-json-schemas/v2.14.0/schemas/2.4.0.json#/definitions/specificationExtension" + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" } }, "properties": { @@ -173,7 +173,7 @@ "type": "object", "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "https://raw.githubusercontent.com/asyncapi/spec-json-schemas/v2.14.0/schemas/2.4.0.json#/definitions/specificationExtension" + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" } }, "properties": { From 17a6cdcf3701d961308b4b7541c4dc3fc51bcd65 Mon Sep 17 00:00:00 2001 From: "jonas-lt@live.dk" Date: Fri, 17 Nov 2023 11:57:24 -1000 Subject: [PATCH 094/102] update links --- bindings/anypointmq/0.0.1/message.json | 4 ++-- bindings/http/0.1.0/message.json | 4 ++-- bindings/http/0.1.0/operation.json | 4 ++-- bindings/websockets/0.1.0/channel.json | 8 ++++---- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/bindings/anypointmq/0.0.1/message.json b/bindings/anypointmq/0.0.1/message.json index 1ad68c11..34dddaa0 100644 --- a/bindings/anypointmq/0.0.1/message.json +++ b/bindings/anypointmq/0.0.1/message.json @@ -14,10 +14,10 @@ "headers": { "oneOf": [ { - "$ref": "https://asyncapi.com/definitions/3.0.0/schema.json" + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" }, { - "$ref": "https://asyncapi.com/definitions/3.0.0/Reference.json" + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" } ], "description": "A Schema object containing the definitions for Anypoint MQ-specific headers (protocol headers). This schema MUST be of type 'object' and have a 'properties' key. Examples of Anypoint MQ protocol headers are 'messageId' and 'messageGroupId'." diff --git a/bindings/http/0.1.0/message.json b/bindings/http/0.1.0/message.json index 20b088a2..84fbb679 100644 --- a/bindings/http/0.1.0/message.json +++ b/bindings/http/0.1.0/message.json @@ -14,10 +14,10 @@ "headers": { "oneOf": [ { - "$ref": "https://asyncapi.com/definitions/3.0.0/schema.json" + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" }, { - "$ref": "https://asyncapi.com/definitions/3.0.0/Reference.json" + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" } ], "description": "\tA Schema object containing the definitions for HTTP-specific headers. This schema MUST be of type 'object' and have a 'properties' key." diff --git a/bindings/http/0.1.0/operation.json b/bindings/http/0.1.0/operation.json index ecfb71fd..8ba6b903 100644 --- a/bindings/http/0.1.0/operation.json +++ b/bindings/http/0.1.0/operation.json @@ -37,10 +37,10 @@ "query": { "oneOf": [ { - "$ref": "https://asyncapi.com/definitions/3.0.0/schema.json" + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" }, { - "$ref": "https://asyncapi.com/definitions/3.0.0/Reference.json" + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" } ], "description": "A Schema object containing the definitions for each query parameter. This schema MUST be of type 'object' and have a properties key." diff --git a/bindings/websockets/0.1.0/channel.json b/bindings/websockets/0.1.0/channel.json index 8a8238b4..4fa27b0f 100644 --- a/bindings/websockets/0.1.0/channel.json +++ b/bindings/websockets/0.1.0/channel.json @@ -22,10 +22,10 @@ "query": { "oneOf": [ { - "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json", + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" }, { - "$ref": "https://asyncapi.com/definitions/3.0.0/Reference.json" + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" } ], "description": "A Schema object containing the definitions for each query parameter. This schema MUST be of type 'object' and have a 'properties' key." @@ -33,10 +33,10 @@ "headers": { "oneOf": [ { - "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json", + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" }, { - "$ref": "https://asyncapi.com/definitions/3.0.0/Reference.json" + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" } ], "description": "A Schema object containing the definitions of the HTTP headers to use when establishing the connection. This schema MUST be of type 'object' and have a 'properties' key." From 2373a45ff0aae34160b207968be47a6ce7598c62 Mon Sep 17 00:00:00 2001 From: "jonas-lt@live.dk" Date: Fri, 17 Nov 2023 12:09:39 -1000 Subject: [PATCH 095/102] misc changes --- bindings/jms/0.0.1/server.json | 4 +- bindings/sns/0.1.0/channel.json | 6 +- bindings/sns/0.1.0/operation.json | 16 +- bindings/sqs/0.2.0/channel.json | 12 +- bindings/sqs/0.2.0/operation.json | 10 +- schemas/3.0.0-without-$id.json | 2531 ++++++++++++++++++++++------- schemas/3.0.0.json | 2500 ++++++++++++++++++++++------ 7 files changed, 3978 insertions(+), 1101 deletions(-) diff --git a/bindings/jms/0.0.1/server.json b/bindings/jms/0.0.1/server.json index f5e83ab4..2137b913 100644 --- a/bindings/jms/0.0.1/server.json +++ b/bindings/jms/0.0.1/server.json @@ -19,7 +19,7 @@ "properties": { "type": "array", "items": { - "$ref": "#/schemas/property" + "$ref": "http://asyncapi.com/bindings/jms/0.0.1/server.json#/definitions/property" }, "description": "Additional properties to set on the JMS ConnectionFactory implementation for the JMS Provider." }, @@ -36,7 +36,7 @@ } }, - "schemas": { + "definitions": { "property": { "type": "object", "required": ["name", "value"], diff --git a/bindings/sns/0.1.0/channel.json b/bindings/sns/0.1.0/channel.json index e4f15738..552b63e0 100644 --- a/bindings/sns/0.1.0/channel.json +++ b/bindings/sns/0.1.0/channel.json @@ -16,10 +16,10 @@ "description": "The name of the topic. Can be different from the channel name to allow flexibility around AWS resource naming limitations." }, "ordering": { - "$ref": "#/definitions/ordering" + "$ref": "http://asyncapi.com/bindings/sns/0.1.0/channel.json#/definitions/ordering" }, "policy": { - "$ref": "#/definitions/policy" + "$ref": "http://asyncapi.com/bindings/sns/0.1.0/channel.json#/definitions/policy" }, "tags": { "type": "object", @@ -74,7 +74,7 @@ "type": "array", "description": "An array of statement objects, each of which controls a permission for this topic", "items": { - "$ref": "#/definitions/statement" + "$ref": "http://asyncapi.com/bindings/sns/0.1.0/channel.json#/definitions/statement" } } }, diff --git a/bindings/sns/0.1.0/operation.json b/bindings/sns/0.1.0/operation.json index 44c2addb..4c890902 100644 --- a/bindings/sns/0.1.0/operation.json +++ b/bindings/sns/0.1.0/operation.json @@ -12,19 +12,19 @@ }, "properties": { "topic": { - "$ref": "#/definitions/identifier", + "$ref": "http://asyncapi.com/bindings/sns/0.1.0/operation.json#/definitions/identifier", "description": "Often we can assume that the SNS Topic is the channel name-we provide this field in case the you need to supply the ARN, or the Topic name is not the channel name in the AsyncAPI document." }, "consumers": { "type": "array", "description": "The protocols that listen to this topic and their endpoints.", "items": { - "$ref": "#/definitions/consumer" + "$ref": "http://asyncapi.com/bindings/sns/0.1.0/operation.json#/definitions/consumer" }, "minItems": 1 }, "deliveryPolicy": { - "$ref": "#/definitions/deliveryPolicy", + "$ref": "http://asyncapi.com/bindings/sns/0.1.0/operation.json#/definitions/deliveryPolicy", "description": "Policy for retries to HTTP. The field is the default for HTTP receivers of the SNS Topic which may be overridden by a specific consumer." }, "bindingVersion": { @@ -51,7 +51,7 @@ }, "email": { "type": "string", - "description": "The endpoint is an email adress." + "description": "The endpoint is an email address." }, "phone": { "type": "string", @@ -92,7 +92,7 @@ }, "endpoint": { "description": "The endpoint messages are delivered to.", - "$ref": "#/definitions/identifier" + "$ref": "http://asyncapi.com/bindings/sns/0.1.0/operation.json#/definitions/identifier" }, "filterPolicy": { "type": "object", @@ -133,10 +133,10 @@ "description": "If true AWS SNS attributes are removed from the body, and for SQS, SNS message attributes are copied to SQS message attributes. If false the SNS attributes are included in the body." }, "redrivePolicy": { - "$ref": "#/definitions/redrivePolicy" + "$ref": "http://asyncapi.com/bindings/sns/0.1.0/operation.json#/definitions/redrivePolicy" }, "deliveryPolicy": { - "$ref": "#/definitions/deliveryPolicy", + "$ref": "http://asyncapi.com/bindings/sns/0.1.0/operation.json#/definitions/deliveryPolicy", "description": "Policy for retries to HTTP. The parameter is for that SNS Subscription and overrides any policy on the SNS Topic." }, "displayName": { @@ -208,7 +208,7 @@ }, "properties": { "deadLetterQueue": { - "$ref": "#/definitions/identifier", + "$ref": "http://asyncapi.com/bindings/sns/0.1.0/operation.json#/definitions/identifier", "description": "The SQS queue to use as a dead letter queue (DLQ)." }, "maxReceiveCount": { diff --git a/bindings/sqs/0.2.0/channel.json b/bindings/sqs/0.2.0/channel.json index ad4f8697..91431157 100644 --- a/bindings/sqs/0.2.0/channel.json +++ b/bindings/sqs/0.2.0/channel.json @@ -13,11 +13,11 @@ "properties": { "queue": { "description": "A definition of the queue that will be used as the channel.", - "$ref": "#/definitions/queue" + "$ref": "http://asyncapi.com/bindings/sqs/0.2.0/channel.json#/definitions/queue" }, "deadLetterQueue": { "description": "A definition of the queue that will be used for un-processable messages.", - "$ref": "#/definitions/queue" + "$ref": "http://asyncapi.com/bindings/sqs/0.2.0/channel.json#/definitions/queue" }, "bindingVersion": { "type": "string", @@ -90,10 +90,10 @@ "default": 345600 }, "redrivePolicy": { - "$ref": "#/definitions/redrivePolicy" + "$ref": "http://asyncapi.com/bindings/sqs/0.2.0/channel.json#/definitions/redrivePolicy" }, "policy": { - "$ref": "#/definitions/policy" + "$ref": "http://asyncapi.com/bindings/sqs/0.2.0/channel.json#/definitions/policy" }, "tags": { "type": "object", @@ -115,7 +115,7 @@ }, "properties": { "deadLetterQueue": { - "$ref": "#/definitions/identifier" + "$ref": "http://asyncapi.com/bindings/sqs/0.2.0/channel.json#/definitions/identifier" }, "maxReceiveCount": { "type": "integer", @@ -159,7 +159,7 @@ "type": "array", "description": "An array of statement objects, each of which controls a permission for this queue.", "items": { - "$ref": "#/definitions/statement" + "$ref": "http://asyncapi.com/bindings/sqs/0.2.0/channel.json#/definitions/statement" } } }, diff --git a/bindings/sqs/0.2.0/operation.json b/bindings/sqs/0.2.0/operation.json index 9279dc51..f25d4423 100644 --- a/bindings/sqs/0.2.0/operation.json +++ b/bindings/sqs/0.2.0/operation.json @@ -15,7 +15,7 @@ "type": "array", "description": "Queue objects that are either the endpoint for an SNS Operation Binding Object, or the deadLetterQueue of the SQS Operation Binding Object.", "items": { - "$ref": "#/definitions/queue" + "$ref": "http://asyncapi.com/bindings/sqs/0.2.0/operation.json#/definitions/queue" } }, "bindingVersion": { @@ -93,10 +93,10 @@ "default": 345600 }, "redrivePolicy": { - "$ref": "#/definitions/redrivePolicy" + "$ref": "http://asyncapi.com/bindings/sqs/0.2.0/operation.json#/definitions/redrivePolicy" }, "policy": { - "$ref": "#/definitions/policy" + "$ref": "http://asyncapi.com/bindings/sqs/0.2.0/operation.json#/definitions/policy" }, "tags": { "type": "object", @@ -117,7 +117,7 @@ }, "properties": { "deadLetterQueue": { - "$ref": "#/definitions/identifier" + "$ref": "http://asyncapi.com/bindings/sqs/0.2.0/operation.json#/definitions/identifier" }, "maxReceiveCount": { "type": "integer", @@ -161,7 +161,7 @@ "type": "array", "description": "An array of statement objects, each of which controls a permission for this queue.", "items": { - "$ref": "#/definitions/statement" + "$ref": "http://asyncapi.com/bindings/sqs/0.2.0/operation.json#/definitions/statement" } } }, diff --git a/schemas/3.0.0-without-$id.json b/schemas/3.0.0-without-$id.json index 3586d1ec..91629503 100644 --- a/schemas/3.0.0-without-$id.json +++ b/schemas/3.0.0-without-$id.json @@ -1064,7 +1064,45 @@ }, "anypointmq": {}, "nats": {}, - "jms": {}, + "jms": { + "properties": { + "bindingVersion": { + "enum": [ + "0.0.1" + ] + } + }, + "allOf": [ + { + "description": "If no bindingVersion specified, use the latest binding", + "if": { + "not": { + "required": [ + "bindingVersion" + ] + } + }, + "then": { + "$ref": "#/definitions/bindings-jms-0.0.1-server" + } + }, + { + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.0.1" + } + } + }, + "then": { + "$ref": "#/definitions/bindings-jms-0.0.1-server" + } + } + ] + }, "sns": {}, "sqs": {}, "stomp": {}, @@ -1742,6 +1780,81 @@ } ] }, + "bindings-jms-0.0.1-server": { + "title": "Server Schema", + "description": "This object contains configuration for describing a JMS broker as an AsyncAPI server. This objects only contains configuration that can not be provided in the AsyncAPI standard server object.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, + "required": [ + "jmsConnectionFactory" + ], + "properties": { + "jmsConnectionFactory": { + "type": "string", + "description": "The classname of the ConnectionFactory implementation for the JMS Provider." + }, + "properties": { + "type": "array", + "items": { + "$ref": "#/definitions/bindings-jms-0.0.1-server" + }, + "description": "Additional properties to set on the JMS ConnectionFactory implementation for the JMS Provider." + }, + "clientID": { + "type": "string", + "description": "A client identifier for applications that use this JMS connection factory. If the Client ID Policy is set to 'Restricted' (the default), then configuring a Client ID on the ConnectionFactory prevents more than one JMS client from using a connection from this factory." + }, + "bindingVersion": { + "type": "string", + "enum": [ + "0.0.1" + ], + "description": "The version of this binding. If omitted, 'latest' MUST be assumed." + } + }, + "definitions": { + "property": { + "type": "object", + "required": [ + "name", + "value" + ], + "properties": { + "name": { + "type": "string", + "description": "The name of a property" + }, + "value": { + "type": [ + "string", + "boolean", + "number", + "null" + ], + "description": "The name of a property" + } + } + } + }, + "examples": [ + { + "jmsConnectionFactory": "org.apache.activemq.ActiveMQConnectionFactory", + "properties": [ + { + "name": "disableTimeStampsByDefault", + "value": false + } + ], + "clientID": "my-application-1", + "bindingVersion": "0.0.1" + } + ] + }, "bindings-ibmmq-0.1.0-server": { "title": "IBM MQ server bindings object", "description": "This object contains server connection information about the IBM MQ server, referred to as an IBM MQ queue manager. This object contains additional connectivity information not possible to represent within the core AsyncAPI specification.", @@ -3241,7 +3354,45 @@ ] }, "nats": {}, - "jms": {}, + "jms": { + "properties": { + "bindingVersion": { + "enum": [ + "0.0.1" + ] + } + }, + "allOf": [ + { + "description": "If no bindingVersion specified, use the latest binding", + "if": { + "not": { + "required": [ + "bindingVersion" + ] + } + }, + "then": { + "$ref": "#/definitions/bindings-jms-0.0.1-message" + } + }, + { + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.0.1" + } + } + }, + "then": { + "$ref": "#/definitions/bindings-jms-0.0.1-message" + } + } + ] + }, "sns": {}, "sqs": {}, "stomp": {}, @@ -3608,7 +3759,14 @@ }, "properties": { "headers": { - "$ref": "#/definitions/schema", + "oneOf": [ + { + "$ref": "#/definitions/schema" + }, + { + "$ref": "#/definitions/Reference" + } + ], "description": "A Schema object containing the definitions for Anypoint MQ-specific headers (protocol headers). This schema MUST be of type 'object' and have a 'properties' key. Examples of Anypoint MQ protocol headers are 'messageId' and 'messageGroupId'." }, "bindingVersion": { @@ -3633,6 +3791,90 @@ } ] }, + "bindings-jms-0.0.1-message": { + "title": "Message Schema", + "description": "This object contains configuration for describing a JMS message as an AsyncAPI message. This objects only contains configuration that can not be provided in the AsyncAPI standard message object.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, + "properties": { + "headers": { + "$ref": "#/definitions/schema", + "description": "A Schema object containing the definitions for JMS headers (protocol headers). This schema MUST be of type 'object' and have a 'properties' key. Examples of JMS protocol headers are 'JMSMessageID', 'JMSTimestamp', and 'JMSCorrelationID'." + }, + "bindingVersion": { + "type": "string", + "enum": [ + "0.0.1" + ], + "description": "The version of this binding. If omitted, 'latest' MUST be assumed." + } + }, + "examples": [ + { + "headers": { + "type": "object", + "required": [ + "JMSMessageID" + ], + "properties": { + "JMSMessageID": { + "type": [ + "string", + "null" + ], + "description": "A unique message identifier. This may be set by your JMS Provider on your behalf." + }, + "JMSTimestamp": { + "type": "integer", + "description": "The time the message was sent. This may be set by your JMS Provider on your behalf. The time the message was sent. The value of the timestamp is the amount of time, measured in milliseconds, that has elapsed since midnight, January 1, 1970, UTC." + }, + "JMSDeliveryMode": { + "type": "string", + "enum": [ + "PERSISTENT", + "NON_PERSISTENT" + ], + "default": "PERSISTENT", + "description": "Denotes the delivery mode for the message. This may be set by your JMS Provider on your behalf." + }, + "JMSPriority": { + "type": "integer", + "default": 4, + "description": "The priority of the message. This may be set by your JMS Provider on your behalf." + }, + "JMSExpires": { + "type": "integer", + "description": "The time at which the message expires. This may be set by your JMS Provider on your behalf. A value of zero means that the message does not expire. Any non-zero value is the amount of time, measured in milliseconds, that has elapsed since midnight, January 1, 1970, UTC, at which the message will expire." + }, + "JMSType": { + "type": [ + "string", + "null" + ], + "description": "The type of message. Some JMS providers use a message repository that contains the definitions of messages sent by applications. The 'JMSType' header field may reference a message's definition in the provider's repository. The JMS API does not define a standard message definition repository, nor does it define a naming policy for the definitions it contains. Some messaging systems require that a message type definition for each application message be created and that each message specify its type. In order to work with such JMS providers, JMS clients should assign a value to 'JMSType', whether the application makes use of it or not. This ensures that the field is properly set for those providers that require it." + }, + "JMSCorrelationID": { + "type": [ + "string", + "null" + ], + "description": "The correlation identifier of the message. A client can use the 'JMSCorrelationID' header field to link one message with another. A typical use is to link a response message with its request message. Since each message sent by a JMS provider is assigned a message ID value, it is convenient to link messages via message ID, such message ID values must start with the 'ID:' prefix. Conversely, application-specified values must not start with the 'ID:' prefix; this is reserved for provider-generated message ID values." + }, + "JMSReplyTo": { + "type": "string", + "description": "The queue or topic that the message sender expects replies to." + } + } + }, + "bindingVersion": "0.0.1" + } + ] + }, "bindings-ibmmq-0.1.0-message": { "title": "IBM MQ message bindings object", "description": "This object contains information about the message representation in IBM MQ.", @@ -4095,12 +4337,46 @@ ] }, "nats": {}, - "jms": {}, - "sns": {}, - "sqs": {}, - "stomp": {}, - "redis": {}, - "ibmmq": { + "jms": { + "properties": { + "bindingVersion": { + "enum": [ + "0.0.1" + ] + } + }, + "allOf": [ + { + "description": "If no bindingVersion specified, use the latest binding", + "if": { + "not": { + "required": [ + "bindingVersion" + ] + } + }, + "then": { + "$ref": "#/definitions/bindings-jms-0.0.1-channel" + } + }, + { + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.0.1" + } + } + }, + "then": { + "$ref": "#/definitions/bindings-jms-0.0.1-channel" + } + } + ] + }, + "sns": { "properties": { "bindingVersion": { "enum": [ @@ -4119,7 +4395,7 @@ } }, "then": { - "$ref": "#/definitions/bindings-ibmmq-0.1.0-channel" + "$ref": "#/definitions/bindings-sns-0.1.0-channel" } }, { @@ -4134,13 +4410,12 @@ } }, "then": { - "$ref": "#/definitions/bindings-ibmmq-0.1.0-channel" + "$ref": "#/definitions/bindings-sns-0.1.0-channel" } } ] }, - "solace": {}, - "googlepubsub": { + "sqs": { "properties": { "bindingVersion": { "enum": [ @@ -4159,7 +4434,7 @@ } }, "then": { - "$ref": "#/definitions/bindings-googlepubsub-0.2.0-channel" + "$ref": "#/definitions/bindings-sqs-0.2.0-channel" } }, { @@ -4174,12 +4449,14 @@ } }, "then": { - "$ref": "#/definitions/bindings-googlepubsub-0.2.0-channel" + "$ref": "#/definitions/bindings-sqs-0.2.0-channel" } } ] }, - "pulsar": { + "stomp": {}, + "redis": {}, + "ibmmq": { "properties": { "bindingVersion": { "enum": [ @@ -4198,7 +4475,7 @@ } }, "then": { - "$ref": "#/definitions/bindings-pulsar-0.1.0-channel" + "$ref": "#/definitions/bindings-ibmmq-0.1.0-channel" } }, { @@ -4213,38 +4490,131 @@ } }, "then": { - "$ref": "#/definitions/bindings-pulsar-0.1.0-channel" + "$ref": "#/definitions/bindings-ibmmq-0.1.0-channel" } } ] - } - } - }, - "bindings-websockets-0.1.0-channel": { - "title": "WebSockets channel bindings object", - "description": "When using WebSockets, the channel represents the connection. Unlike other protocols that support multiple virtual channels (topics, routing keys, etc.) per connection, WebSockets doesn't support virtual channels or, put it another way, there's only one channel and its characteristics are strongly related to the protocol used for the handshake, i.e., HTTP.", - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "properties": { - "method": { - "type": "string", - "enum": [ - "GET", - "POST" + }, + "solace": {}, + "googlepubsub": { + "properties": { + "bindingVersion": { + "enum": [ + "0.2.0" + ] + } + }, + "allOf": [ + { + "description": "If no bindingVersion specified, use the latest binding", + "if": { + "not": { + "required": [ + "bindingVersion" + ] + } + }, + "then": { + "$ref": "#/definitions/bindings-googlepubsub-0.2.0-channel" + } + }, + { + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.2.0" + } + } + }, + "then": { + "$ref": "#/definitions/bindings-googlepubsub-0.2.0-channel" + } + } + ] + }, + "pulsar": { + "properties": { + "bindingVersion": { + "enum": [ + "0.1.0" + ] + } + }, + "allOf": [ + { + "description": "If no bindingVersion specified, use the latest binding", + "if": { + "not": { + "required": [ + "bindingVersion" + ] + } + }, + "then": { + "$ref": "#/definitions/bindings-pulsar-0.1.0-channel" + } + }, + { + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.1.0" + } + } + }, + "then": { + "$ref": "#/definitions/bindings-pulsar-0.1.0-channel" + } + } + ] + } + } + }, + "bindings-websockets-0.1.0-channel": { + "title": "WebSockets channel bindings object", + "description": "When using WebSockets, the channel represents the connection. Unlike other protocols that support multiple virtual channels (topics, routing keys, etc.) per connection, WebSockets doesn't support virtual channels or, put it another way, there's only one channel and its characteristics are strongly related to the protocol used for the handshake, i.e., HTTP.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, + "properties": { + "method": { + "type": "string", + "enum": [ + "GET", + "POST" ], "description": "The HTTP method to use when establishing the connection. Its value MUST be either 'GET' or 'POST'." }, "query": { - "$ref": "#/definitions/schema", + "oneOf": [ + { + "$ref": "#/definitions/schema" + }, + { + "$ref": "#/definitions/Reference" + } + ], "description": "A Schema object containing the definitions for each query parameter. This schema MUST be of type 'object' and have a 'properties' key." }, "headers": { - "$ref": "#/definitions/schema", + "oneOf": [ + { + "$ref": "#/definitions/schema" + }, + { + "$ref": "#/definitions/Reference" + } + ], "description": "A Schema object containing the definitions of the HTTP headers to use when establishing the connection. This schema MUST be of type 'object' and have a 'properties' key." }, "bindingVersion": { @@ -4572,9 +4942,9 @@ } ] }, - "bindings-ibmmq-0.1.0-channel": { - "title": "IBM MQ channel bindings object", - "description": "This object contains information about the channel representation in IBM MQ. Each channel corresponds to a Queue or Topic within IBM MQ.", + "bindings-jms-0.0.1-channel": { + "title": "Channel Schema", + "description": "This object contains configuration for describing a JMS queue, or FIFO queue as an AsyncAPI channel. This objects only contains configuration that can not be provided in the AsyncAPI standard channel object.", "type": "object", "additionalProperties": false, "patternProperties": { @@ -4583,129 +4953,38 @@ } }, "properties": { + "destination": { + "type": "string", + "description": "The destination (queue) name for this channel. SHOULD only be specified if the channel name differs from the actual destination name, such as when the channel name is not a valid destination name according to the JMS Provider. Defaults to the channel name." + }, "destinationType": { "type": "string", "enum": [ - "topic", - "queue" + "queue", + "fifo-queue" ], - "default": "topic", - "description": "Defines the type of AsyncAPI channel." - }, - "queue": { - "type": "object", - "description": "Defines the properties of a queue.", - "properties": { - "objectName": { - "type": "string", - "maxLength": 48, - "description": "Defines the name of the IBM MQ queue associated with the channel." - }, - "isPartitioned": { - "type": "boolean", - "default": false, - "description": "Defines if the queue is a cluster queue and therefore partitioned. If 'true', a binding option MAY be specified when accessing the queue. More information on binding options can be found on this page in the IBM MQ Knowledge Center." - }, - "exclusive": { - "type": "boolean", - "default": false, - "description": "Specifies if it is recommended to open the queue exclusively." - } - }, - "required": [ - "objectName" - ] - }, - "topic": { - "type": "object", - "description": "Defines the properties of a topic.", - "properties": { - "string": { - "type": "string", - "maxLength": 10240, - "description": "The value of the IBM MQ topic string to be used." - }, - "objectName": { - "type": "string", - "maxLength": 48, - "description": "The name of the IBM MQ topic object." - }, - "durablePermitted": { - "type": "boolean", - "default": true, - "description": "Defines if the subscription may be durable." - }, - "lastMsgRetained": { - "type": "boolean", - "default": false, - "description": "Defines if the last message published will be made available to new subscriptions." - } - } - }, - "maxMsgLength": { - "type": "integer", - "minimum": 0, - "maximum": 104857600, - "description": "The maximum length of the physical message (in bytes) accepted by the Topic or Queue. Messages produced that are greater in size than this value may fail to be delivered. More information on the maximum message length can be found on this [page](https://www.ibm.com/support/knowledgecenter/SSFKSJ_latest/com.ibm.mq.ref.dev.doc/q097520_.html) in the IBM MQ Knowledge Center." + "default": "queue", + "description": "The type of destination. SHOULD be specified to document the messaging model (point-to-point, or strict message ordering) supported by this channel." }, "bindingVersion": { "type": "string", "enum": [ - "0.1.0" + "0.0.1" ], - "description": "The version of this binding." + "description": "The version of this binding. If omitted, 'latest' MUST be assumed." } }, - "oneOf": [ - { - "properties": { - "destinationType": { - "const": "topic" - } - }, - "not": { - "required": [ - "queue" - ] - } - }, - { - "properties": { - "destinationType": { - "const": "queue" - } - }, - "required": [ - "queue" - ], - "not": { - "required": [ - "topic" - ] - } - } - ], "examples": [ { - "destinationType": "topic", - "topic": { - "objectName": "myTopicName" - }, - "bindingVersion": "0.1.0" - }, - { - "destinationType": "queue", - "queue": { - "objectName": "myQueueName", - "exclusive": true - }, - "bindingVersion": "0.1.0" + "destination": "user-signed-up", + "destinationType": "fifo-queue", + "bindingVersion": "0.0.1" } ] }, - "bindings-googlepubsub-0.2.0-channel": { - "title": "Cloud Pub/Sub Channel Schema", - "description": "This object contains information about the channel representation for Google Cloud Pub/Sub.", + "bindings-sns-0.1.0-channel": { + "title": "Channel Schema", + "description": "This object contains information about the channel representation in SNS.", "type": "object", "additionalProperties": false, "patternProperties": { @@ -4714,80 +4993,146 @@ } }, "properties": { - "bindingVersion": { + "name": { "type": "string", - "enum": [ - "0.2.0" - ], - "description": "The version of this binding." + "description": "The name of the topic. Can be different from the channel name to allow flexibility around AWS resource naming limitations." }, - "labels": { - "type": "object" + "ordering": { + "$ref": "#/definitions/bindings-sns-0.1.0-channel" }, - "messageRetentionDuration": { - "type": "string" + "policy": { + "$ref": "#/definitions/bindings-sns-0.1.0-channel" }, - "messageStoragePolicy": { + "tags": { "type": "object", - "additionalProperties": false, - "properties": { - "allowedPersistenceRegions": { - "type": "array", - "items": { - "type": "string" - } - } - } + "description": "Key-value pairs that represent AWS tags on the topic." }, - "schemaSettings": { + "bindingVersion": { + "type": "string", + "description": "The version of this binding.", + "default": "latest" + } + }, + "required": [ + "name" + ], + "definitions": { + "ordering": { "type": "object", - "additionalItems": false, + "description": "By default, we assume an unordered SNS topic. This field allows configuration of a FIFO SNS Topic.", + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, "properties": { - "encoding": { - "type": "string" + "type": { + "type": "string", + "description": "Defines the type of SNS Topic.", + "enum": [ + "standard", + "FIFO" + ] }, - "firstRevisionId": { - "type": "string" + "contentBasedDeduplication": { + "type": "boolean", + "description": "True to turn on de-duplication of messages for a channel." + } + }, + "required": [ + "type" + ] + }, + "policy": { + "type": "object", + "description": "The security policy for the SNS Topic.", + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, + "properties": { + "statements": { + "type": "array", + "description": "An array of statement objects, each of which controls a permission for this topic", + "items": { + "$ref": "#/definitions/bindings-sns-0.1.0-channel" + } + } + }, + "required": [ + "statements" + ] + }, + "statement": { + "type": "object", + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, + "properties": { + "effect": { + "type": "string", + "enum": [ + "Allow", + "Deny" + ] }, - "lastRevisionId": { - "type": "string" + "principal": { + "description": "The AWS account or resource ARN that this statement applies to.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] }, - "name": { - "type": "string" + "action": { + "description": "The SNS permission being allowed or denied e.g. sns:Publish", + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] } }, "required": [ - "encoding", - "name" + "effect", + "principal", + "action" ] } }, - "required": [ - "schemaSettings" - ], "examples": [ { - "labels": { - "label1": "value1", - "label2": "value2" - }, - "messageRetentionDuration": "86400s", - "messageStoragePolicy": { - "allowedPersistenceRegions": [ - "us-central1", - "us-east1" + "name": "my-sns-topic", + "policy": { + "statements": [ + { + "effect": "Allow", + "principal": "*", + "action": "SNS:Publish" + } ] - }, - "schemaSettings": { - "encoding": "json", - "name": "projects/your-project-id/schemas/your-schema" } } ] }, - "bindings-pulsar-0.1.0-channel": { + "bindings-sqs-0.2.0-channel": { "title": "Channel Schema", - "description": "This object contains information about the channel representation in Pulsar, which covers namespace and topic level admin configuration. This object contains additional information not possible to represent within the core AsyncAPI specification.", + "description": "This object contains information about the channel representation in SQS.", "type": "object", "additionalProperties": false, "patternProperties": { @@ -4795,126 +5140,607 @@ "$ref": "#/definitions/specificationExtension" } }, - "required": [ - "namespace", - "persistence" - ], "properties": { - "namespace": { - "type": "string", - "description": "The namespace, the channel is associated with." + "queue": { + "description": "A definition of the queue that will be used as the channel.", + "$ref": "#/definitions/bindings-sqs-0.2.0-channel" }, - "persistence": { + "deadLetterQueue": { + "description": "A definition of the queue that will be used for un-processable messages.", + "$ref": "#/definitions/bindings-sqs-0.2.0-channel" + }, + "bindingVersion": { "type": "string", "enum": [ - "persistent", - "non-persistent" + "0.1.0", + "0.2.0" ], - "description": "persistence of the topic in Pulsar." - }, - "compaction": { - "type": "integer", - "minimum": 0, - "description": "Topic compaction threshold given in MB" - }, - "geo-replication": { - "type": "array", - "description": "A list of clusters the topic is replicated to.", - "items": { - "type": "string" - } - }, - "retention": { + "description": "The version of this binding. If omitted, 'latest' MUST be assumed.", + "default": "latest" + } + }, + "required": [ + "queue" + ], + "definitions": { + "queue": { "type": "object", - "additionalProperties": false, + "description": "A definition of a queue.", + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, "properties": { - "time": { + "name": { + "type": "string", + "description": "The name of the queue. When an SNS Operation Binding Object references an SQS queue by name, the identifier should be the one in this field." + }, + "fifoQueue": { + "type": "boolean", + "description": "Is this a FIFO queue?", + "default": false + }, + "deduplicationScope": { + "type": "string", + "enum": [ + "queue", + "messageGroup" + ], + "description": "Specifies whether message deduplication occurs at the message group or queue level. Valid values are messageGroup and queue (default).", + "default": "queue" + }, + "fifoThroughputLimit": { + "type": "string", + "enum": [ + "perQueue", + "perMessageGroupId" + ], + "description": "Specifies whether the FIFO queue throughput quota applies to the entire queue or per message group. Valid values are perQueue (default) and perMessageGroupId.", + "default": "perQueue" + }, + "deliveryDelay": { "type": "integer", + "description": "The number of seconds to delay before a message sent to the queue can be received. used to create a delay queue.", "minimum": 0, - "description": "Time given in Minutes. `0` = Disable message retention." + "maximum": 15, + "default": 0 }, - "size": { + "visibilityTimeout": { "type": "integer", + "description": "The length of time, in seconds, that a consumer locks a message - hiding it from reads - before it is unlocked and can be read again.", "minimum": 0, - "description": "Size given in MegaBytes. `0` = Disable message retention." + "maximum": 43200, + "default": 30 + }, + "receiveMessageWaitTime": { + "type": "integer", + "description": "Determines if the queue uses short polling or long polling. Set to zero the queue reads available messages and returns immediately. Set to a non-zero integer, long polling waits the specified number of seconds for messages to arrive before returning.", + "default": 0 + }, + "messageRetentionPeriod": { + "type": "integer", + "description": "How long to retain a message on the queue in seconds, unless deleted.", + "minimum": 60, + "maximum": 1209600, + "default": 345600 + }, + "redrivePolicy": { + "$ref": "#/definitions/bindings-sqs-0.2.0-channel" + }, + "policy": { + "$ref": "#/definitions/bindings-sqs-0.2.0-channel" + }, + "tags": { + "type": "object", + "description": "Key-value pairs that represent AWS tags on the queue." } - } - }, - "ttl": { - "type": "integer", - "description": "TTL in seconds for the specified topic" - }, - "deduplication": { - "type": "boolean", - "description": "Whether deduplication of events is enabled or not." + }, + "required": [ + "name", + "fifoQueue" + ] }, - "bindingVersion": { - "type": "string", - "enum": [ - "0.1.0" - ], - "description": "The version of this binding. If omitted, 'latest' MUST be assumed." - } - }, - "examples": [ - { - "namespace": "ns1", - "persistence": "persistent", - "compaction": 1000, - "retention": { - "time": 15, - "size": 1000 + "redrivePolicy": { + "type": "object", + "description": "Prevent poison pill messages by moving un-processable messages to an SQS dead letter queue.", + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } }, - "ttl": 360, - "geo-replication": [ - "us-west", - "us-east" - ], - "deduplication": true, - "bindingVersion": "0.1.0" - } - ] - }, - "operations": { - "type": "object", - "additionalProperties": { - "oneOf": [ - { - "$ref": "#/definitions/Reference" + "properties": { + "deadLetterQueue": { + "$ref": "#/definitions/bindings-sqs-0.2.0-channel" + }, + "maxReceiveCount": { + "type": "integer", + "description": "The number of times a message is delivered to the source queue before being moved to the dead-letter queue.", + "default": 10 + } }, - { - "$ref": "#/definitions/operation" - } - ] - } - }, - "operation": { - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "required": [ - "action", - "channel" - ], - "properties": { - "action": { - "type": "string", - "description": "Allowed values are send and receive. Use send when it's expected that the application will send a message to the given channel, and receive when the application should expect receiving messages from the given channel.", - "enum": [ - "send", - "receive" + "required": [ + "deadLetterQueue" ] }, - "channel": { - "$ref": "#/definitions/Reference" - }, - "messages": { - "type": "array", - "items": { + "identifier": { + "type": "object", + "description": "The SQS queue to use as a dead letter queue (DLQ).", + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, + "properties": { + "arn": { + "type": "string", + "description": "The target is an ARN. For example, for SQS, the identifier may be an ARN, which will be of the form: arn:aws:sqs:{region}:{account-id}:{queueName}" + }, + "name": { + "type": "string", + "description": "The endpoint is identified by a name, which corresponds to an identifying field called 'name' of a binding for that protocol on this publish Operation Object. For example, if the protocol is 'sqs' then the name refers to the name field sqs binding." + } + } + }, + "policy": { + "type": "object", + "description": "The security policy for the SQS Queue", + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, + "properties": { + "statements": { + "type": "array", + "description": "An array of statement objects, each of which controls a permission for this queue.", + "items": { + "$ref": "#/definitions/bindings-sqs-0.2.0-channel" + } + } + }, + "required": [ + "statements" + ] + }, + "statement": { + "type": "object", + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, + "properties": { + "effect": { + "type": "string", + "enum": [ + "Allow", + "Deny" + ] + }, + "principal": { + "description": "The AWS account or resource ARN that this statement applies to.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "action": { + "description": "The SQS permission being allowed or denied e.g. sqs:ReceiveMessage", + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + } + }, + "required": [ + "effect", + "principal", + "action" + ] + } + }, + "examples": [ + { + "queue": { + "name": "myQueue", + "fifoQueue": true, + "deduplicationScope": "messageGroup", + "fifoThroughputLimit": "perMessageGroupId", + "deliveryDelay": 15, + "visibilityTimeout": 60, + "receiveMessageWaitTime": 0, + "messageRetentionPeriod": 86400, + "redrivePolicy": { + "deadLetterQueue": { + "arn": "arn:aws:SQS:eu-west-1:0000000:123456789" + }, + "maxReceiveCount": 15 + }, + "policy": { + "statements": [ + { + "effect": "Deny", + "principal": "arn:aws:iam::123456789012:user/dec.kolakowski", + "action": [ + "sqs:SendMessage", + "sqs:ReceiveMessage" + ] + } + ] + }, + "tags": { + "owner": "AsyncAPI.NET", + "platform": "AsyncAPIOrg" + } + }, + "deadLetterQueue": { + "name": "myQueue_error", + "deliveryDelay": 0, + "visibilityTimeout": 0, + "receiveMessageWaitTime": 0, + "messageRetentionPeriod": 604800 + } + } + ] + }, + "bindings-ibmmq-0.1.0-channel": { + "title": "IBM MQ channel bindings object", + "description": "This object contains information about the channel representation in IBM MQ. Each channel corresponds to a Queue or Topic within IBM MQ.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, + "properties": { + "destinationType": { + "type": "string", + "enum": [ + "topic", + "queue" + ], + "default": "topic", + "description": "Defines the type of AsyncAPI channel." + }, + "queue": { + "type": "object", + "description": "Defines the properties of a queue.", + "properties": { + "objectName": { + "type": "string", + "maxLength": 48, + "description": "Defines the name of the IBM MQ queue associated with the channel." + }, + "isPartitioned": { + "type": "boolean", + "default": false, + "description": "Defines if the queue is a cluster queue and therefore partitioned. If 'true', a binding option MAY be specified when accessing the queue. More information on binding options can be found on this page in the IBM MQ Knowledge Center." + }, + "exclusive": { + "type": "boolean", + "default": false, + "description": "Specifies if it is recommended to open the queue exclusively." + } + }, + "required": [ + "objectName" + ] + }, + "topic": { + "type": "object", + "description": "Defines the properties of a topic.", + "properties": { + "string": { + "type": "string", + "maxLength": 10240, + "description": "The value of the IBM MQ topic string to be used." + }, + "objectName": { + "type": "string", + "maxLength": 48, + "description": "The name of the IBM MQ topic object." + }, + "durablePermitted": { + "type": "boolean", + "default": true, + "description": "Defines if the subscription may be durable." + }, + "lastMsgRetained": { + "type": "boolean", + "default": false, + "description": "Defines if the last message published will be made available to new subscriptions." + } + } + }, + "maxMsgLength": { + "type": "integer", + "minimum": 0, + "maximum": 104857600, + "description": "The maximum length of the physical message (in bytes) accepted by the Topic or Queue. Messages produced that are greater in size than this value may fail to be delivered. More information on the maximum message length can be found on this [page](https://www.ibm.com/support/knowledgecenter/SSFKSJ_latest/com.ibm.mq.ref.dev.doc/q097520_.html) in the IBM MQ Knowledge Center." + }, + "bindingVersion": { + "type": "string", + "enum": [ + "0.1.0" + ], + "description": "The version of this binding." + } + }, + "oneOf": [ + { + "properties": { + "destinationType": { + "const": "topic" + } + }, + "not": { + "required": [ + "queue" + ] + } + }, + { + "properties": { + "destinationType": { + "const": "queue" + } + }, + "required": [ + "queue" + ], + "not": { + "required": [ + "topic" + ] + } + } + ], + "examples": [ + { + "destinationType": "topic", + "topic": { + "objectName": "myTopicName" + }, + "bindingVersion": "0.1.0" + }, + { + "destinationType": "queue", + "queue": { + "objectName": "myQueueName", + "exclusive": true + }, + "bindingVersion": "0.1.0" + } + ] + }, + "bindings-googlepubsub-0.2.0-channel": { + "title": "Cloud Pub/Sub Channel Schema", + "description": "This object contains information about the channel representation for Google Cloud Pub/Sub.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, + "properties": { + "bindingVersion": { + "type": "string", + "enum": [ + "0.2.0" + ], + "description": "The version of this binding." + }, + "labels": { + "type": "object" + }, + "messageRetentionDuration": { + "type": "string" + }, + "messageStoragePolicy": { + "type": "object", + "additionalProperties": false, + "properties": { + "allowedPersistenceRegions": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "schemaSettings": { + "type": "object", + "additionalItems": false, + "properties": { + "encoding": { + "type": "string" + }, + "firstRevisionId": { + "type": "string" + }, + "lastRevisionId": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "encoding", + "name" + ] + } + }, + "required": [ + "schemaSettings" + ], + "examples": [ + { + "labels": { + "label1": "value1", + "label2": "value2" + }, + "messageRetentionDuration": "86400s", + "messageStoragePolicy": { + "allowedPersistenceRegions": [ + "us-central1", + "us-east1" + ] + }, + "schemaSettings": { + "encoding": "json", + "name": "projects/your-project-id/schemas/your-schema" + } + } + ] + }, + "bindings-pulsar-0.1.0-channel": { + "title": "Channel Schema", + "description": "This object contains information about the channel representation in Pulsar, which covers namespace and topic level admin configuration. This object contains additional information not possible to represent within the core AsyncAPI specification.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, + "required": [ + "namespace", + "persistence" + ], + "properties": { + "namespace": { + "type": "string", + "description": "The namespace, the channel is associated with." + }, + "persistence": { + "type": "string", + "enum": [ + "persistent", + "non-persistent" + ], + "description": "persistence of the topic in Pulsar." + }, + "compaction": { + "type": "integer", + "minimum": 0, + "description": "Topic compaction threshold given in MB" + }, + "geo-replication": { + "type": "array", + "description": "A list of clusters the topic is replicated to.", + "items": { + "type": "string" + } + }, + "retention": { + "type": "object", + "additionalProperties": false, + "properties": { + "time": { + "type": "integer", + "minimum": 0, + "description": "Time given in Minutes. `0` = Disable message retention." + }, + "size": { + "type": "integer", + "minimum": 0, + "description": "Size given in MegaBytes. `0` = Disable message retention." + } + } + }, + "ttl": { + "type": "integer", + "description": "TTL in seconds for the specified topic" + }, + "deduplication": { + "type": "boolean", + "description": "Whether deduplication of events is enabled or not." + }, + "bindingVersion": { + "type": "string", + "enum": [ + "0.1.0" + ], + "description": "The version of this binding. If omitted, 'latest' MUST be assumed." + } + }, + "examples": [ + { + "namespace": "ns1", + "persistence": "persistent", + "compaction": 1000, + "retention": { + "time": 15, + "size": 1000 + }, + "ttl": 360, + "geo-replication": [ + "us-west", + "us-east" + ], + "deduplication": true, + "bindingVersion": "0.1.0" + } + ] + }, + "operations": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/operation" + } + ] + } + }, + "operation": { + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, + "required": [ + "action", + "channel" + ], + "properties": { + "action": { + "type": "string", + "description": "Allowed values are send and receive. Use send when it's expected that the application will send a message to the given channel, and receive when the application should expect receiving messages from the given channel.", + "enum": [ + "send", + "receive" + ] + }, + "channel": { + "$ref": "#/definitions/Reference" + }, + "messages": { + "type": "array", + "items": { "$ref": "#/definitions/Reference" } }, @@ -5152,7 +5978,119 @@ } }, "then": { - "$ref": "#/definitions/bindings-amqp-0.3.0-operation" + "$ref": "#/definitions/bindings-amqp-0.3.0-operation" + } + }, + { + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.3.0" + } + } + }, + "then": { + "$ref": "#/definitions/bindings-amqp-0.3.0-operation" + } + } + ] + }, + "amqp1": {}, + "mqtt": { + "properties": { + "bindingVersion": { + "enum": [ + "0.2.0" + ] + } + }, + "allOf": [ + { + "description": "If no bindingVersion specified, use the latest binding", + "if": { + "not": { + "required": [ + "bindingVersion" + ] + } + }, + "then": { + "$ref": "#/definitions/bindings-mqtt-0.2.0-operation" + } + }, + { + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.2.0" + } + } + }, + "then": { + "$ref": "#/definitions/bindings-mqtt-0.2.0-operation" + } + } + ] + }, + "mqtt5": {}, + "kafka": { + "properties": { + "bindingVersion": { + "enum": [ + "0.4.0", + "0.3.0", + "0.1.0" + ] + } + }, + "allOf": [ + { + "description": "If no bindingVersion specified, use the latest binding", + "if": { + "not": { + "required": [ + "bindingVersion" + ] + } + }, + "then": { + "$ref": "#/definitions/bindings-kafka-0.4.0-operation" + } + }, + { + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.4.0" + } + } + }, + "then": { + "$ref": "#/definitions/bindings-kafka-0.4.0-operation" + } + }, + { + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.3.0" + } + } + }, + "then": { + "$ref": "#/definitions/bindings-kafka-0.3.0-operation" } }, { @@ -5162,22 +6100,22 @@ ], "properties": { "bindingVersion": { - "const": "0.3.0" + "const": "0.1.0" } } }, "then": { - "$ref": "#/definitions/bindings-amqp-0.3.0-operation" + "$ref": "#/definitions/bindings-kafka-0.1.0-operation" } } ] }, - "amqp1": {}, - "mqtt": { + "anypointmq": {}, + "nats": { "properties": { "bindingVersion": { "enum": [ - "0.2.0" + "0.1.0" ] } }, @@ -5192,7 +6130,7 @@ } }, "then": { - "$ref": "#/definitions/bindings-mqtt-0.2.0-operation" + "$ref": "#/definitions/bindings-nats-0.1.0-operation" } }, { @@ -5202,23 +6140,21 @@ ], "properties": { "bindingVersion": { - "const": "0.2.0" + "const": "0.1.0" } } }, "then": { - "$ref": "#/definitions/bindings-mqtt-0.2.0-operation" + "$ref": "#/definitions/bindings-nats-0.1.0-operation" } } ] }, - "mqtt5": {}, - "kafka": { + "jms": {}, + "sns": { "properties": { "bindingVersion": { "enum": [ - "0.4.0", - "0.3.0", "0.1.0" ] } @@ -5234,37 +6170,7 @@ } }, "then": { - "$ref": "#/definitions/bindings-kafka-0.4.0-operation" - } - }, - { - "if": { - "required": [ - "bindingVersion" - ], - "properties": { - "bindingVersion": { - "const": "0.4.0" - } - } - }, - "then": { - "$ref": "#/definitions/bindings-kafka-0.4.0-operation" - } - }, - { - "if": { - "required": [ - "bindingVersion" - ], - "properties": { - "bindingVersion": { - "const": "0.3.0" - } - } - }, - "then": { - "$ref": "#/definitions/bindings-kafka-0.3.0-operation" + "$ref": "#/definitions/bindings-sns-0.1.0-operation" } }, { @@ -5279,17 +6185,16 @@ } }, "then": { - "$ref": "#/definitions/bindings-kafka-0.1.0-operation" + "$ref": "#/definitions/bindings-sns-0.1.0-operation" } } ] }, - "anypointmq": {}, - "nats": { + "sqs": { "properties": { "bindingVersion": { "enum": [ - "0.1.0" + "0.2.0" ] } }, @@ -5304,7 +6209,7 @@ } }, "then": { - "$ref": "#/definitions/bindings-nats-0.1.0-operation" + "$ref": "#/definitions/bindings-sqs-0.2.0-operation" } }, { @@ -5314,19 +6219,16 @@ ], "properties": { "bindingVersion": { - "const": "0.1.0" + "const": "0.2.0" } } }, "then": { - "$ref": "#/definitions/bindings-nats-0.1.0-operation" + "$ref": "#/definitions/bindings-sqs-0.2.0-operation" } } ] }, - "jms": {}, - "sns": {}, - "sqs": {}, "stomp": {}, "redis": {}, "ibmmq": {}, @@ -5460,13 +6362,223 @@ }, "additionalProperties": false }, - "bindingVersion": "0.2.0" + "bindingVersion": "0.2.0" + } + ] + }, + "bindings-amqp-0.3.0-operation": { + "title": "AMQP operation bindings object", + "description": "This object contains information about the operation representation in AMQP.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, + "properties": { + "expiration": { + "type": "integer", + "minimum": 0, + "description": "TTL (Time-To-Live) for the message. It MUST be greater than or equal to zero." + }, + "userId": { + "type": "string", + "description": "Identifies the user who has sent the message." + }, + "cc": { + "type": "array", + "items": { + "type": "string" + }, + "description": "The routing keys the message should be routed to at the time of publishing." + }, + "priority": { + "type": "integer", + "description": "A priority for the message." + }, + "deliveryMode": { + "type": "integer", + "enum": [ + 1, + 2 + ], + "description": "Delivery mode of the message. Its value MUST be either 1 (transient) or 2 (persistent)." + }, + "mandatory": { + "type": "boolean", + "description": "Whether the message is mandatory or not." + }, + "bcc": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Like cc but consumers will not receive this information." + }, + "timestamp": { + "type": "boolean", + "description": "Whether the message should include a timestamp or not." + }, + "ack": { + "type": "boolean", + "description": "Whether the consumer should ack the message or not." + }, + "bindingVersion": { + "type": "string", + "enum": [ + "0.3.0" + ], + "description": "The version of this binding. If omitted, \"latest\" MUST be assumed." + } + }, + "examples": [ + { + "expiration": 100000, + "userId": "guest", + "cc": [ + "user.logs" + ], + "priority": 10, + "deliveryMode": 2, + "mandatory": false, + "bcc": [ + "external.audit" + ], + "timestamp": true, + "ack": false, + "bindingVersion": "0.3.0" + } + ] + }, + "bindings-mqtt-0.2.0-operation": { + "title": "MQTT operation bindings object", + "description": "This object contains information about the operation representation in MQTT.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, + "properties": { + "qos": { + "type": "integer", + "description": "Defines the Quality of Service (QoS) levels for the message flow between client and server. Its value MUST be either 0 (At most once delivery), 1 (At least once delivery), or 2 (Exactly once delivery)." + }, + "retain": { + "type": "boolean", + "description": "Whether the broker should retain the message or not." + }, + "bindingVersion": { + "type": "string", + "enum": [ + "0.2.0" + ], + "description": "The version of this binding. If omitted, 'latest' MUST be assumed." + } + }, + "examples": [ + { + "qos": 2, + "retain": true, + "bindingVersion": "0.2.0" + } + ] + }, + "bindings-kafka-0.4.0-operation": { + "title": "Operation Schema", + "description": "This object contains information about the operation representation in Kafka.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, + "properties": { + "groupId": { + "$ref": "#/definitions/schema", + "description": "Id of the consumer group." + }, + "clientId": { + "$ref": "#/definitions/schema", + "description": "Id of the consumer inside a consumer group." + }, + "bindingVersion": { + "type": "string", + "enum": [ + "0.4.0" + ], + "description": "The version of this binding. If omitted, 'latest' MUST be assumed." + } + }, + "examples": [ + { + "groupId": { + "type": "string", + "enum": [ + "myGroupId" + ] + }, + "clientId": { + "type": "string", + "enum": [ + "myClientId" + ] + }, + "bindingVersion": "0.4.0" + } + ] + }, + "bindings-kafka-0.3.0-operation": { + "title": "Operation Schema", + "description": "This object contains information about the operation representation in Kafka.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, + "properties": { + "groupId": { + "$ref": "#/definitions/schema", + "description": "Id of the consumer group." + }, + "clientId": { + "$ref": "#/definitions/schema", + "description": "Id of the consumer inside a consumer group." + }, + "bindingVersion": { + "type": "string", + "enum": [ + "0.3.0" + ], + "description": "The version of this binding. If omitted, 'latest' MUST be assumed." + } + }, + "examples": [ + { + "groupId": { + "type": "string", + "enum": [ + "myGroupId" + ] + }, + "clientId": { + "type": "string", + "enum": [ + "myClientId" + ] + }, + "bindingVersion": "0.3.0" } ] }, - "bindings-amqp-0.3.0-operation": { - "title": "AMQP operation bindings object", - "description": "This object contains information about the operation representation in AMQP.", + "bindings-kafka-0.1.0-operation": { + "title": "Kafka operation message bindings object", + "description": "This object contains information about the operation representation in Kafka.", "type": "object", "additionalProperties": false, "patternProperties": { @@ -5475,83 +6587,43 @@ } }, "properties": { - "expiration": { - "type": "integer", - "minimum": 0, - "description": "TTL (Time-To-Live) for the message. It MUST be greater than or equal to zero." - }, - "userId": { - "type": "string", - "description": "Identifies the user who has sent the message." - }, - "cc": { - "type": "array", - "items": { - "type": "string" - }, - "description": "The routing keys the message should be routed to at the time of publishing." - }, - "priority": { - "type": "integer", - "description": "A priority for the message." - }, - "deliveryMode": { - "type": "integer", - "enum": [ - 1, - 2 - ], - "description": "Delivery mode of the message. Its value MUST be either 1 (transient) or 2 (persistent)." - }, - "mandatory": { - "type": "boolean", - "description": "Whether the message is mandatory or not." - }, - "bcc": { - "type": "array", - "items": { - "type": "string" - }, - "description": "Like cc but consumers will not receive this information." - }, - "timestamp": { - "type": "boolean", - "description": "Whether the message should include a timestamp or not." + "groupId": { + "$ref": "#/definitions/schema", + "description": "Id of the consumer group." }, - "ack": { - "type": "boolean", - "description": "Whether the consumer should ack the message or not." + "clientId": { + "$ref": "#/definitions/schema", + "description": "Id of the consumer inside a consumer group." }, "bindingVersion": { "type": "string", "enum": [ - "0.3.0" + "0.1.0" ], - "description": "The version of this binding. If omitted, \"latest\" MUST be assumed." + "description": "The version of this binding. If omitted, 'latest' MUST be assumed." } }, "examples": [ { - "expiration": 100000, - "userId": "guest", - "cc": [ - "user.logs" - ], - "priority": 10, - "deliveryMode": 2, - "mandatory": false, - "bcc": [ - "external.audit" - ], - "timestamp": true, - "ack": false, - "bindingVersion": "0.3.0" + "groupId": { + "type": "string", + "enum": [ + "myGroupId" + ] + }, + "clientId": { + "type": "string", + "enum": [ + "myClientId" + ] + }, + "bindingVersion": "0.1.0" } ] }, - "bindings-mqtt-0.2.0-operation": { - "title": "MQTT operation bindings object", - "description": "This object contains information about the operation representation in MQTT.", + "bindings-nats-0.1.0-operation": { + "title": "NATS operation bindings object", + "description": "This object contains information about the operation representation in NATS.", "type": "object", "additionalProperties": false, "patternProperties": { @@ -5560,33 +6632,29 @@ } }, "properties": { - "qos": { - "type": "integer", - "description": "Defines the Quality of Service (QoS) levels for the message flow between client and server. Its value MUST be either 0 (At most once delivery), 1 (At least once delivery), or 2 (Exactly once delivery)." - }, - "retain": { - "type": "boolean", - "description": "Whether the broker should retain the message or not." + "queue": { + "type": "string", + "description": "Defines the name of the queue to use. It MUST NOT exceed 255 characters.", + "maxLength": 255 }, "bindingVersion": { "type": "string", "enum": [ - "0.2.0" + "0.1.0" ], "description": "The version of this binding. If omitted, 'latest' MUST be assumed." } }, "examples": [ { - "qos": 2, - "retain": true, - "bindingVersion": "0.2.0" + "queue": "MyCustomQueue", + "bindingVersion": "0.1.0" } ] }, - "bindings-kafka-0.4.0-operation": { + "bindings-sns-0.1.0-operation": { "title": "Operation Schema", - "description": "This object contains information about the operation representation in Kafka.", + "description": "This object contains information about the operation representation in SNS.", "type": "object", "additionalProperties": false, "patternProperties": { @@ -5595,43 +6663,269 @@ } }, "properties": { - "groupId": { - "$ref": "#/definitions/schema", - "description": "Id of the consumer group." + "topic": { + "$ref": "#/definitions/bindings-sns-0.1.0-operation", + "description": "Often we can assume that the SNS Topic is the channel name-we provide this field in case the you need to supply the ARN, or the Topic name is not the channel name in the AsyncAPI document." }, - "clientId": { - "$ref": "#/definitions/schema", - "description": "Id of the consumer inside a consumer group." + "consumers": { + "type": "array", + "description": "The protocols that listen to this topic and their endpoints.", + "items": { + "$ref": "#/definitions/bindings-sns-0.1.0-operation" + }, + "minItems": 1 + }, + "deliveryPolicy": { + "$ref": "#/definitions/bindings-sns-0.1.0-operation", + "description": "Policy for retries to HTTP. The field is the default for HTTP receivers of the SNS Topic which may be overridden by a specific consumer." }, "bindingVersion": { "type": "string", - "enum": [ - "0.4.0" - ], - "description": "The version of this binding. If omitted, 'latest' MUST be assumed." + "description": "The version of this binding.", + "default": "latest" + } + }, + "required": [ + "consumers" + ], + "definitions": { + "identifier": { + "type": "object", + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, + "properties": { + "url": { + "type": "string", + "description": "The endpoint is a URL." + }, + "email": { + "type": "string", + "description": "The endpoint is an email address." + }, + "phone": { + "type": "string", + "description": "The endpoint is a phone number." + }, + "arn": { + "type": "string", + "description": "The target is an ARN. For example, for SQS, the identifier may be an ARN, which will be of the form: arn:aws:sqs:{region}:{account-id}:{queueName}" + }, + "name": { + "type": "string", + "description": "The endpoint is identified by a name, which corresponds to an identifying field called 'name' of a binding for that protocol on this publish Operation Object. For example, if the protocol is 'sqs' then the name refers to the name field sqs binding. We don't use $ref because we are referring, not including." + } + } + }, + "consumer": { + "type": "object", + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, + "properties": { + "protocol": { + "description": "The protocol that this endpoint receives messages by.", + "type": "string", + "enum": [ + "http", + "https", + "email", + "email-json", + "sms", + "sqs", + "application", + "lambda", + "firehose" + ] + }, + "endpoint": { + "description": "The endpoint messages are delivered to.", + "$ref": "#/definitions/bindings-sns-0.1.0-operation" + }, + "filterPolicy": { + "type": "object", + "description": "Only receive a subset of messages from the channel, determined by this policy. Depending on the FilterPolicyScope, a map of either a message attribute or message body to an array of possible matches. The match may be a simple string for an exact match, but it may also be an object that represents a constraint and values for that constraint.", + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, + "additionalProperties": { + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "string" + }, + { + "type": "object" + } + ] + } + }, + "filterPolicyScope": { + "type": "string", + "description": "Determines whether the FilterPolicy applies to MessageAttributes or MessageBody.", + "enum": [ + "MessageAttributes", + "MessageBody" + ], + "default": "MessageAttributes" + }, + "rawMessageDelivery": { + "type": "boolean", + "description": "If true AWS SNS attributes are removed from the body, and for SQS, SNS message attributes are copied to SQS message attributes. If false the SNS attributes are included in the body." + }, + "redrivePolicy": { + "$ref": "#/definitions/bindings-sns-0.1.0-operation" + }, + "deliveryPolicy": { + "$ref": "#/definitions/bindings-sns-0.1.0-operation", + "description": "Policy for retries to HTTP. The parameter is for that SNS Subscription and overrides any policy on the SNS Topic." + }, + "displayName": { + "type": "string", + "description": "The display name to use with an SNS subscription" + } + }, + "required": [ + "protocol", + "endpoint", + "rawMessageDelivery" + ] + }, + "deliveryPolicy": { + "type": "object", + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, + "properties": { + "minDelayTarget": { + "type": "integer", + "description": "The minimum delay for a retry in seconds." + }, + "maxDelayTarget": { + "type": "integer", + "description": "The maximum delay for a retry in seconds." + }, + "numRetries": { + "type": "integer", + "description": "The total number of retries, including immediate, pre-backoff, backoff, and post-backoff retries." + }, + "numNoDelayRetries": { + "type": "integer", + "description": "The number of immediate retries (with no delay)." + }, + "numMinDelayRetries": { + "type": "integer", + "description": "The number of immediate retries (with delay)." + }, + "numMaxDelayRetries": { + "type": "integer", + "description": "The number of post-backoff phase retries, with the maximum delay between retries." + }, + "backoffFunction": { + "type": "string", + "description": "The algorithm for backoff between retries.", + "enum": [ + "arithmetic", + "exponential", + "geometric", + "linear" + ] + }, + "maxReceivesPerSecond": { + "type": "integer", + "description": "The maximum number of deliveries per second, per subscription." + } + } + }, + "redrivePolicy": { + "type": "object", + "description": "Prevent poison pill messages by moving un-processable messages to an SQS dead letter queue.", + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, + "properties": { + "deadLetterQueue": { + "$ref": "#/definitions/bindings-sns-0.1.0-operation", + "description": "The SQS queue to use as a dead letter queue (DLQ)." + }, + "maxReceiveCount": { + "type": "integer", + "description": "The number of times a message is delivered to the source queue before being moved to the dead-letter queue.", + "default": 10 + } + }, + "required": [ + "deadLetterQueue" + ] } }, "examples": [ { - "groupId": { - "type": "string", - "enum": [ - "myGroupId" - ] - }, - "clientId": { - "type": "string", - "enum": [ - "myClientId" - ] + "topic": { + "name": "someTopic" }, - "bindingVersion": "0.4.0" + "consumers": [ + { + "protocol": "sqs", + "endpoint": { + "name": "someQueue" + }, + "filterPolicy": { + "store": [ + "asyncapi_corp" + ], + "event": [ + { + "anything-but": "order_cancelled" + } + ], + "customer_interests": [ + "rugby", + "football", + "baseball" + ] + }, + "filterPolicyScope": "MessageAttributes", + "rawMessageDelivery": false, + "redrivePolicy": { + "deadLetterQueue": { + "arn": "arn:aws:SQS:eu-west-1:0000000:123456789" + }, + "maxReceiveCount": 25 + }, + "deliveryPolicy": { + "minDelayTarget": 10, + "maxDelayTarget": 100, + "numRetries": 5, + "numNoDelayRetries": 2, + "numMinDelayRetries": 3, + "numMaxDelayRetries": 5, + "backoffFunction": "linear", + "maxReceivesPerSecond": 2 + } + } + ] } ] }, - "bindings-kafka-0.3.0-operation": { + "bindings-sqs-0.2.0-operation": { "title": "Operation Schema", - "description": "This object contains information about the operation representation in Kafka.", + "description": "This object contains information about the operation representation in SQS.", "type": "object", "additionalProperties": false, "patternProperties": { @@ -5640,113 +6934,254 @@ } }, "properties": { - "groupId": { - "$ref": "#/definitions/schema", - "description": "Id of the consumer group." - }, - "clientId": { - "$ref": "#/definitions/schema", - "description": "Id of the consumer inside a consumer group." + "queues": { + "type": "array", + "description": "Queue objects that are either the endpoint for an SNS Operation Binding Object, or the deadLetterQueue of the SQS Operation Binding Object.", + "items": { + "$ref": "#/definitions/bindings-sqs-0.2.0-operation" + } }, "bindingVersion": { "type": "string", "enum": [ - "0.3.0" + "0.1.0", + "0.2.0" ], - "description": "The version of this binding. If omitted, 'latest' MUST be assumed." + "description": "The version of this binding. If omitted, 'latest' MUST be assumed.", + "default": "latest" } }, - "examples": [ - { - "groupId": { - "type": "string", - "enum": [ - "myGroupId" - ] + "required": [ + "queues" + ], + "definitions": { + "queue": { + "type": "object", + "description": "A definition of a queue.", + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } }, - "clientId": { - "type": "string", - "enum": [ - "myClientId" - ] + "properties": { + "$ref": { + "type": "string", + "description": "Allows for an external definition of a queue. The referenced structure MUST be in the format of a Queue. If there are conflicts between the referenced definition and this Queue's definition, the behavior is undefined." + }, + "name": { + "type": "string", + "description": "The name of the queue. When an SNS Operation Binding Object references an SQS queue by name, the identifier should be the one in this field." + }, + "fifoQueue": { + "type": "boolean", + "description": "Is this a FIFO queue?", + "default": false + }, + "deduplicationScope": { + "type": "string", + "enum": [ + "queue", + "messageGroup" + ], + "description": "Specifies whether message deduplication occurs at the message group or queue level. Valid values are messageGroup and queue (default).", + "default": "queue" + }, + "fifoThroughputLimit": { + "type": "string", + "enum": [ + "perQueue", + "perMessageGroupId" + ], + "description": "Specifies whether the FIFO queue throughput quota applies to the entire queue or per message group. Valid values are perQueue (default) and perMessageGroupId.", + "default": "perQueue" + }, + "deliveryDelay": { + "type": "integer", + "description": "The number of seconds to delay before a message sent to the queue can be received. Used to create a delay queue.", + "minimum": 0, + "maximum": 15, + "default": 0 + }, + "visibilityTimeout": { + "type": "integer", + "description": "The length of time, in seconds, that a consumer locks a message - hiding it from reads - before it is unlocked and can be read again.", + "minimum": 0, + "maximum": 43200, + "default": 30 + }, + "receiveMessageWaitTime": { + "type": "integer", + "description": "Determines if the queue uses short polling or long polling. Set to zero the queue reads available messages and returns immediately. Set to a non-zero integer, long polling waits the specified number of seconds for messages to arrive before returning.", + "default": 0 + }, + "messageRetentionPeriod": { + "type": "integer", + "description": "How long to retain a message on the queue in seconds, unless deleted.", + "minimum": 60, + "maximum": 1209600, + "default": 345600 + }, + "redrivePolicy": { + "$ref": "#/definitions/bindings-sqs-0.2.0-operation" + }, + "policy": { + "$ref": "#/definitions/bindings-sqs-0.2.0-operation" + }, + "tags": { + "type": "object", + "description": "Key-value pairs that represent AWS tags on the queue." + } }, - "bindingVersion": "0.3.0" - } - ] - }, - "bindings-kafka-0.1.0-operation": { - "title": "Kafka operation message bindings object", - "description": "This object contains information about the operation representation in Kafka.", - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "properties": { - "groupId": { - "$ref": "#/definitions/schema", - "description": "Id of the consumer group." + "required": [ + "name" + ] }, - "clientId": { - "$ref": "#/definitions/schema", - "description": "Id of the consumer inside a consumer group." + "redrivePolicy": { + "type": "object", + "description": "Prevent poison pill messages by moving un-processable messages to an SQS dead letter queue.", + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, + "properties": { + "deadLetterQueue": { + "$ref": "#/definitions/bindings-sqs-0.2.0-operation" + }, + "maxReceiveCount": { + "type": "integer", + "description": "The number of times a message is delivered to the source queue before being moved to the dead-letter queue.", + "default": 10 + } + }, + "required": [ + "deadLetterQueue" + ] }, - "bindingVersion": { - "type": "string", - "enum": [ - "0.1.0" - ], - "description": "The version of this binding. If omitted, 'latest' MUST be assumed." - } - }, - "examples": [ - { - "groupId": { - "type": "string", - "enum": [ - "myGroupId" - ] + "identifier": { + "type": "object", + "description": "The SQS queue to use as a dead letter queue (DLQ).", + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } }, - "clientId": { - "type": "string", - "enum": [ - "myClientId" - ] + "properties": { + "arn": { + "type": "string", + "description": "The target is an ARN. For example, for SQS, the identifier may be an ARN, which will be of the form: arn:aws:sqs:{region}:{account-id}:{queueName}" + }, + "name": { + "type": "string", + "description": "The endpoint is identified by a name, which corresponds to an identifying field called 'name' of a binding for that protocol on this publish Operation Object. For example, if the protocol is 'sqs' then the name refers to the name field sqs binding." + } + } + }, + "policy": { + "type": "object", + "description": "The security policy for the SQS Queue", + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } }, - "bindingVersion": "0.1.0" - } - ] - }, - "bindings-nats-0.1.0-operation": { - "title": "NATS operation bindings object", - "description": "This object contains information about the operation representation in NATS.", - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "properties": { - "queue": { - "type": "string", - "description": "Defines the name of the queue to use. It MUST NOT exceed 255 characters.", - "maxLength": 255 + "properties": { + "statements": { + "type": "array", + "description": "An array of statement objects, each of which controls a permission for this queue.", + "items": { + "$ref": "#/definitions/bindings-sqs-0.2.0-operation" + } + } + }, + "required": [ + "statements" + ] }, - "bindingVersion": { - "type": "string", - "enum": [ - "0.1.0" - ], - "description": "The version of this binding. If omitted, 'latest' MUST be assumed." + "statement": { + "type": "object", + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, + "properties": { + "effect": { + "type": "string", + "enum": [ + "Allow", + "Deny" + ] + }, + "principal": { + "description": "The AWS account or resource ARN that this statement applies to.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "action": { + "description": "The SQS permission being allowed or denied e.g. sqs:ReceiveMessage", + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + } + }, + "required": [ + "effect", + "principal", + "action" + ] } }, "examples": [ { - "queue": "MyCustomQueue", - "bindingVersion": "0.1.0" + "queues": [ + { + "name": "myQueue", + "fifoQueue": true, + "deduplicationScope": "messageGroup", + "fifoThroughputLimit": "perMessageGroupId", + "deliveryDelay": 10, + "redrivePolicy": { + "deadLetterQueue": { + "name": "myQueue_error" + }, + "maxReceiveCount": 15 + }, + "policy": { + "statements": [ + { + "effect": "Deny", + "principal": "arn:aws:iam::123456789012:user/dec.kolakowski", + "action": [ + "sqs:SendMessage", + "sqs:ReceiveMessage" + ] + } + ] + } + }, + { + "name": "myQueue_error", + "deliveryDelay": 10 + } + ] } ] }, diff --git a/schemas/3.0.0.json b/schemas/3.0.0.json index 237fb05d..c5358cf4 100644 --- a/schemas/3.0.0.json +++ b/schemas/3.0.0.json @@ -1097,7 +1097,45 @@ }, "anypointmq": {}, "nats": {}, - "jms": {}, + "jms": { + "properties": { + "bindingVersion": { + "enum": [ + "0.0.1" + ] + } + }, + "allOf": [ + { + "description": "If no bindingVersion specified, use the latest binding", + "if": { + "not": { + "required": [ + "bindingVersion" + ] + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/jms/0.0.1/server.json" + } + }, + { + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.0.1" + } + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/jms/0.0.1/server.json" + } + } + ] + }, "sns": {}, "sqs": {}, "stomp": {}, @@ -1781,6 +1819,82 @@ } ] }, + "http://asyncapi.com/bindings/jms/0.0.1/server.json": { + "$id": "http://asyncapi.com/bindings/jms/0.0.1/server.json", + "title": "Server Schema", + "description": "This object contains configuration for describing a JMS broker as an AsyncAPI server. This objects only contains configuration that can not be provided in the AsyncAPI standard server object.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "required": [ + "jmsConnectionFactory" + ], + "properties": { + "jmsConnectionFactory": { + "type": "string", + "description": "The classname of the ConnectionFactory implementation for the JMS Provider." + }, + "properties": { + "type": "array", + "items": { + "$ref": "http://asyncapi.com/bindings/jms/0.0.1/server.json#/definitions/property" + }, + "description": "Additional properties to set on the JMS ConnectionFactory implementation for the JMS Provider." + }, + "clientID": { + "type": "string", + "description": "A client identifier for applications that use this JMS connection factory. If the Client ID Policy is set to 'Restricted' (the default), then configuring a Client ID on the ConnectionFactory prevents more than one JMS client from using a connection from this factory." + }, + "bindingVersion": { + "type": "string", + "enum": [ + "0.0.1" + ], + "description": "The version of this binding. If omitted, 'latest' MUST be assumed." + } + }, + "definitions": { + "property": { + "type": "object", + "required": [ + "name", + "value" + ], + "properties": { + "name": { + "type": "string", + "description": "The name of a property" + }, + "value": { + "type": [ + "string", + "boolean", + "number", + "null" + ], + "description": "The name of a property" + } + } + } + }, + "examples": [ + { + "jmsConnectionFactory": "org.apache.activemq.ActiveMQConnectionFactory", + "properties": [ + { + "name": "disableTimeStampsByDefault", + "value": false + } + ], + "clientID": "my-application-1", + "bindingVersion": "0.0.1" + } + ] + }, "http://asyncapi.com/bindings/ibmmq/0.1.0/server.json": { "$id": "http://asyncapi.com/bindings/ibmmq/0.1.0/server.json", "title": "IBM MQ server bindings object", @@ -3294,7 +3408,45 @@ ] }, "nats": {}, - "jms": {}, + "jms": { + "properties": { + "bindingVersion": { + "enum": [ + "0.0.1" + ] + } + }, + "allOf": [ + { + "description": "If no bindingVersion specified, use the latest binding", + "if": { + "not": { + "required": [ + "bindingVersion" + ] + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/jms/0.0.1/message.json" + } + }, + { + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.0.1" + } + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/jms/0.0.1/message.json" + } + } + ] + }, "sns": {}, "sqs": {}, "stomp": {}, @@ -3668,7 +3820,14 @@ }, "properties": { "headers": { - "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json", + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + } + ], "description": "A Schema object containing the definitions for Anypoint MQ-specific headers (protocol headers). This schema MUST be of type 'object' and have a 'properties' key. Examples of Anypoint MQ protocol headers are 'messageId' and 'messageGroupId'." }, "bindingVersion": { @@ -3693,6 +3852,91 @@ } ] }, + "http://asyncapi.com/bindings/jms/0.0.1/message.json": { + "$id": "http://asyncapi.com/bindings/jms/0.0.1/message.json", + "title": "Message Schema", + "description": "This object contains configuration for describing a JMS message as an AsyncAPI message. This objects only contains configuration that can not be provided in the AsyncAPI standard message object.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "properties": { + "headers": { + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json", + "description": "A Schema object containing the definitions for JMS headers (protocol headers). This schema MUST be of type 'object' and have a 'properties' key. Examples of JMS protocol headers are 'JMSMessageID', 'JMSTimestamp', and 'JMSCorrelationID'." + }, + "bindingVersion": { + "type": "string", + "enum": [ + "0.0.1" + ], + "description": "The version of this binding. If omitted, 'latest' MUST be assumed." + } + }, + "examples": [ + { + "headers": { + "type": "object", + "required": [ + "JMSMessageID" + ], + "properties": { + "JMSMessageID": { + "type": [ + "string", + "null" + ], + "description": "A unique message identifier. This may be set by your JMS Provider on your behalf." + }, + "JMSTimestamp": { + "type": "integer", + "description": "The time the message was sent. This may be set by your JMS Provider on your behalf. The time the message was sent. The value of the timestamp is the amount of time, measured in milliseconds, that has elapsed since midnight, January 1, 1970, UTC." + }, + "JMSDeliveryMode": { + "type": "string", + "enum": [ + "PERSISTENT", + "NON_PERSISTENT" + ], + "default": "PERSISTENT", + "description": "Denotes the delivery mode for the message. This may be set by your JMS Provider on your behalf." + }, + "JMSPriority": { + "type": "integer", + "default": 4, + "description": "The priority of the message. This may be set by your JMS Provider on your behalf." + }, + "JMSExpires": { + "type": "integer", + "description": "The time at which the message expires. This may be set by your JMS Provider on your behalf. A value of zero means that the message does not expire. Any non-zero value is the amount of time, measured in milliseconds, that has elapsed since midnight, January 1, 1970, UTC, at which the message will expire." + }, + "JMSType": { + "type": [ + "string", + "null" + ], + "description": "The type of message. Some JMS providers use a message repository that contains the definitions of messages sent by applications. The 'JMSType' header field may reference a message's definition in the provider's repository. The JMS API does not define a standard message definition repository, nor does it define a naming policy for the definitions it contains. Some messaging systems require that a message type definition for each application message be created and that each message specify its type. In order to work with such JMS providers, JMS clients should assign a value to 'JMSType', whether the application makes use of it or not. This ensures that the field is properly set for those providers that require it." + }, + "JMSCorrelationID": { + "type": [ + "string", + "null" + ], + "description": "The correlation identifier of the message. A client can use the 'JMSCorrelationID' header field to link one message with another. A typical use is to link a response message with its request message. Since each message sent by a JMS provider is assigned a message ID value, it is convenient to link messages via message ID, such message ID values must start with the 'ID:' prefix. Conversely, application-specified values must not start with the 'ID:' prefix; this is reserved for provider-generated message ID values." + }, + "JMSReplyTo": { + "type": "string", + "description": "The queue or topic that the message sender expects replies to." + } + } + }, + "bindingVersion": "0.0.1" + } + ] + }, "http://asyncapi.com/bindings/ibmmq/0.1.0/message.json": { "$id": "http://asyncapi.com/bindings/ibmmq/0.1.0/message.json", "title": "IBM MQ message bindings object", @@ -4161,12 +4405,46 @@ ] }, "nats": {}, - "jms": {}, - "sns": {}, - "sqs": {}, - "stomp": {}, - "redis": {}, - "ibmmq": { + "jms": { + "properties": { + "bindingVersion": { + "enum": [ + "0.0.1" + ] + } + }, + "allOf": [ + { + "description": "If no bindingVersion specified, use the latest binding", + "if": { + "not": { + "required": [ + "bindingVersion" + ] + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/jms/0.0.1/channel.json" + } + }, + { + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.0.1" + } + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/jms/0.0.1/channel.json" + } + } + ] + }, + "sns": { "properties": { "bindingVersion": { "enum": [ @@ -4185,7 +4463,7 @@ } }, "then": { - "$ref": "http://asyncapi.com/bindings/ibmmq/0.1.0/channel.json" + "$ref": "http://asyncapi.com/bindings/sns/0.1.0/channel.json" } }, { @@ -4200,13 +4478,12 @@ } }, "then": { - "$ref": "http://asyncapi.com/bindings/ibmmq/0.1.0/channel.json" + "$ref": "http://asyncapi.com/bindings/sns/0.1.0/channel.json" } } ] }, - "solace": {}, - "googlepubsub": { + "sqs": { "properties": { "bindingVersion": { "enum": [ @@ -4225,7 +4502,7 @@ } }, "then": { - "$ref": "http://asyncapi.com/bindings/googlepubsub/0.2.0/channel.json" + "$ref": "http://asyncapi.com/bindings/sqs/0.2.0/channel.json" } }, { @@ -4240,12 +4517,14 @@ } }, "then": { - "$ref": "http://asyncapi.com/bindings/googlepubsub/0.2.0/channel.json" + "$ref": "http://asyncapi.com/bindings/sqs/0.2.0/channel.json" } } ] }, - "pulsar": { + "stomp": {}, + "redis": {}, + "ibmmq": { "properties": { "bindingVersion": { "enum": [ @@ -4264,7 +4543,7 @@ } }, "then": { - "$ref": "http://asyncapi.com/bindings/pulsar/0.1.0/channel.json" + "$ref": "http://asyncapi.com/bindings/ibmmq/0.1.0/channel.json" } }, { @@ -4279,39 +4558,132 @@ } }, "then": { - "$ref": "http://asyncapi.com/bindings/pulsar/0.1.0/channel.json" + "$ref": "http://asyncapi.com/bindings/ibmmq/0.1.0/channel.json" } } ] - } - } - }, - "http://asyncapi.com/bindings/websockets/0.1.0/channel.json": { - "$id": "http://asyncapi.com/bindings/websockets/0.1.0/channel.json", - "title": "WebSockets channel bindings object", - "description": "When using WebSockets, the channel represents the connection. Unlike other protocols that support multiple virtual channels (topics, routing keys, etc.) per connection, WebSockets doesn't support virtual channels or, put it another way, there's only one channel and its characteristics are strongly related to the protocol used for the handshake, i.e., HTTP.", - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" - } - }, - "properties": { - "method": { - "type": "string", - "enum": [ - "GET", + }, + "solace": {}, + "googlepubsub": { + "properties": { + "bindingVersion": { + "enum": [ + "0.2.0" + ] + } + }, + "allOf": [ + { + "description": "If no bindingVersion specified, use the latest binding", + "if": { + "not": { + "required": [ + "bindingVersion" + ] + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/googlepubsub/0.2.0/channel.json" + } + }, + { + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.2.0" + } + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/googlepubsub/0.2.0/channel.json" + } + } + ] + }, + "pulsar": { + "properties": { + "bindingVersion": { + "enum": [ + "0.1.0" + ] + } + }, + "allOf": [ + { + "description": "If no bindingVersion specified, use the latest binding", + "if": { + "not": { + "required": [ + "bindingVersion" + ] + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/pulsar/0.1.0/channel.json" + } + }, + { + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.1.0" + } + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/pulsar/0.1.0/channel.json" + } + } + ] + } + } + }, + "http://asyncapi.com/bindings/websockets/0.1.0/channel.json": { + "$id": "http://asyncapi.com/bindings/websockets/0.1.0/channel.json", + "title": "WebSockets channel bindings object", + "description": "When using WebSockets, the channel represents the connection. Unlike other protocols that support multiple virtual channels (topics, routing keys, etc.) per connection, WebSockets doesn't support virtual channels or, put it another way, there's only one channel and its characteristics are strongly related to the protocol used for the handshake, i.e., HTTP.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "properties": { + "method": { + "type": "string", + "enum": [ + "GET", "POST" ], "description": "The HTTP method to use when establishing the connection. Its value MUST be either 'GET' or 'POST'." }, "query": { - "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json", + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + } + ], "description": "A Schema object containing the definitions for each query parameter. This schema MUST be of type 'object' and have a 'properties' key." }, "headers": { - "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json", + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + } + ], "description": "A Schema object containing the definitions of the HTTP headers to use when establishing the connection. This schema MUST be of type 'object' and have a 'properties' key." }, "bindingVersion": { @@ -4643,10 +5015,10 @@ } ] }, - "http://asyncapi.com/bindings/ibmmq/0.1.0/channel.json": { - "$id": "http://asyncapi.com/bindings/ibmmq/0.1.0/channel.json", - "title": "IBM MQ channel bindings object", - "description": "This object contains information about the channel representation in IBM MQ. Each channel corresponds to a Queue or Topic within IBM MQ.", + "http://asyncapi.com/bindings/jms/0.0.1/channel.json": { + "$id": "http://asyncapi.com/bindings/jms/0.0.1/channel.json", + "title": "Channel Schema", + "description": "This object contains configuration for describing a JMS queue, or FIFO queue as an AsyncAPI channel. This objects only contains configuration that can not be provided in the AsyncAPI standard channel object.", "type": "object", "additionalProperties": false, "patternProperties": { @@ -4655,130 +5027,39 @@ } }, "properties": { + "destination": { + "type": "string", + "description": "The destination (queue) name for this channel. SHOULD only be specified if the channel name differs from the actual destination name, such as when the channel name is not a valid destination name according to the JMS Provider. Defaults to the channel name." + }, "destinationType": { "type": "string", "enum": [ - "topic", - "queue" + "queue", + "fifo-queue" ], - "default": "topic", - "description": "Defines the type of AsyncAPI channel." - }, - "queue": { - "type": "object", - "description": "Defines the properties of a queue.", - "properties": { - "objectName": { - "type": "string", - "maxLength": 48, - "description": "Defines the name of the IBM MQ queue associated with the channel." - }, - "isPartitioned": { - "type": "boolean", - "default": false, - "description": "Defines if the queue is a cluster queue and therefore partitioned. If 'true', a binding option MAY be specified when accessing the queue. More information on binding options can be found on this page in the IBM MQ Knowledge Center." - }, - "exclusive": { - "type": "boolean", - "default": false, - "description": "Specifies if it is recommended to open the queue exclusively." - } - }, - "required": [ - "objectName" - ] - }, - "topic": { - "type": "object", - "description": "Defines the properties of a topic.", - "properties": { - "string": { - "type": "string", - "maxLength": 10240, - "description": "The value of the IBM MQ topic string to be used." - }, - "objectName": { - "type": "string", - "maxLength": 48, - "description": "The name of the IBM MQ topic object." - }, - "durablePermitted": { - "type": "boolean", - "default": true, - "description": "Defines if the subscription may be durable." - }, - "lastMsgRetained": { - "type": "boolean", - "default": false, - "description": "Defines if the last message published will be made available to new subscriptions." - } - } - }, - "maxMsgLength": { - "type": "integer", - "minimum": 0, - "maximum": 104857600, - "description": "The maximum length of the physical message (in bytes) accepted by the Topic or Queue. Messages produced that are greater in size than this value may fail to be delivered. More information on the maximum message length can be found on this [page](https://www.ibm.com/support/knowledgecenter/SSFKSJ_latest/com.ibm.mq.ref.dev.doc/q097520_.html) in the IBM MQ Knowledge Center." + "default": "queue", + "description": "The type of destination. SHOULD be specified to document the messaging model (point-to-point, or strict message ordering) supported by this channel." }, "bindingVersion": { "type": "string", "enum": [ - "0.1.0" + "0.0.1" ], - "description": "The version of this binding." + "description": "The version of this binding. If omitted, 'latest' MUST be assumed." } }, - "oneOf": [ - { - "properties": { - "destinationType": { - "const": "topic" - } - }, - "not": { - "required": [ - "queue" - ] - } - }, - { - "properties": { - "destinationType": { - "const": "queue" - } - }, - "required": [ - "queue" - ], - "not": { - "required": [ - "topic" - ] - } - } - ], "examples": [ { - "destinationType": "topic", - "topic": { - "objectName": "myTopicName" - }, - "bindingVersion": "0.1.0" - }, - { - "destinationType": "queue", - "queue": { - "objectName": "myQueueName", - "exclusive": true - }, - "bindingVersion": "0.1.0" + "destination": "user-signed-up", + "destinationType": "fifo-queue", + "bindingVersion": "0.0.1" } ] }, - "http://asyncapi.com/bindings/googlepubsub/0.2.0/channel.json": { - "$id": "http://asyncapi.com/bindings/googlepubsub/0.2.0/channel.json", - "title": "Cloud Pub/Sub Channel Schema", - "description": "This object contains information about the channel representation for Google Cloud Pub/Sub.", + "http://asyncapi.com/bindings/sns/0.1.0/channel.json": { + "$id": "http://asyncapi.com/bindings/sns/0.1.0/channel.json", + "title": "Channel Schema", + "description": "This object contains information about the channel representation in SNS.", "type": "object", "additionalProperties": false, "patternProperties": { @@ -4787,81 +5068,147 @@ } }, "properties": { - "bindingVersion": { + "name": { "type": "string", - "enum": [ - "0.2.0" - ], - "description": "The version of this binding." + "description": "The name of the topic. Can be different from the channel name to allow flexibility around AWS resource naming limitations." }, - "labels": { - "type": "object" + "ordering": { + "$ref": "http://asyncapi.com/bindings/sns/0.1.0/channel.json#/definitions/ordering" }, - "messageRetentionDuration": { - "type": "string" + "policy": { + "$ref": "http://asyncapi.com/bindings/sns/0.1.0/channel.json#/definitions/policy" }, - "messageStoragePolicy": { + "tags": { "type": "object", - "additionalProperties": false, - "properties": { - "allowedPersistenceRegions": { - "type": "array", - "items": { - "type": "string" + "description": "Key-value pairs that represent AWS tags on the topic." + }, + "bindingVersion": { + "type": "string", + "description": "The version of this binding.", + "default": "latest" + } + }, + "required": [ + "name" + ], + "definitions": { + "ordering": { + "type": "object", + "description": "By default, we assume an unordered SNS topic. This field allows configuration of a FIFO SNS Topic.", + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "properties": { + "type": { + "type": "string", + "description": "Defines the type of SNS Topic.", + "enum": [ + "standard", + "FIFO" + ] + }, + "contentBasedDeduplication": { + "type": "boolean", + "description": "True to turn on de-duplication of messages for a channel." + } + }, + "required": [ + "type" + ] + }, + "policy": { + "type": "object", + "description": "The security policy for the SNS Topic.", + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "properties": { + "statements": { + "type": "array", + "description": "An array of statement objects, each of which controls a permission for this topic", + "items": { + "$ref": "http://asyncapi.com/bindings/sns/0.1.0/channel.json#/definitions/statement" } } - } + }, + "required": [ + "statements" + ] }, - "schemaSettings": { + "statement": { "type": "object", - "additionalItems": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, "properties": { - "encoding": { - "type": "string" - }, - "firstRevisionId": { - "type": "string" + "effect": { + "type": "string", + "enum": [ + "Allow", + "Deny" + ] }, - "lastRevisionId": { - "type": "string" + "principal": { + "description": "The AWS account or resource ARN that this statement applies to.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] }, - "name": { - "type": "string" + "action": { + "description": "The SNS permission being allowed or denied e.g. sns:Publish", + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] } }, "required": [ - "encoding", - "name" + "effect", + "principal", + "action" ] } }, - "required": [ - "schemaSettings" - ], "examples": [ { - "labels": { - "label1": "value1", - "label2": "value2" - }, - "messageRetentionDuration": "86400s", - "messageStoragePolicy": { - "allowedPersistenceRegions": [ - "us-central1", - "us-east1" + "name": "my-sns-topic", + "policy": { + "statements": [ + { + "effect": "Allow", + "principal": "*", + "action": "SNS:Publish" + } ] - }, - "schemaSettings": { - "encoding": "json", - "name": "projects/your-project-id/schemas/your-schema" } } ] }, - "http://asyncapi.com/bindings/pulsar/0.1.0/channel.json": { - "$id": "http://asyncapi.com/bindings/pulsar/0.1.0/channel.json", + "http://asyncapi.com/bindings/sqs/0.2.0/channel.json": { + "$id": "http://asyncapi.com/bindings/sqs/0.2.0/channel.json", "title": "Channel Schema", - "description": "This object contains information about the channel representation in Pulsar, which covers namespace and topic level admin configuration. This object contains additional information not possible to represent within the core AsyncAPI specification.", + "description": "This object contains information about the channel representation in SQS.", "type": "object", "additionalProperties": false, "patternProperties": { @@ -4869,125 +5216,609 @@ "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" } }, - "required": [ - "namespace", - "persistence" - ], "properties": { - "namespace": { - "type": "string", - "description": "The namespace, the channel is associated with." + "queue": { + "description": "A definition of the queue that will be used as the channel.", + "$ref": "http://asyncapi.com/bindings/sqs/0.2.0/channel.json#/definitions/queue" }, - "persistence": { + "deadLetterQueue": { + "description": "A definition of the queue that will be used for un-processable messages.", + "$ref": "http://asyncapi.com/bindings/sqs/0.2.0/channel.json#/definitions/queue" + }, + "bindingVersion": { "type": "string", "enum": [ - "persistent", - "non-persistent" + "0.1.0", + "0.2.0" ], - "description": "persistence of the topic in Pulsar." - }, - "compaction": { - "type": "integer", - "minimum": 0, - "description": "Topic compaction threshold given in MB" - }, - "geo-replication": { - "type": "array", - "description": "A list of clusters the topic is replicated to.", - "items": { - "type": "string" - } - }, - "retention": { + "description": "The version of this binding. If omitted, 'latest' MUST be assumed.", + "default": "latest" + } + }, + "required": [ + "queue" + ], + "definitions": { + "queue": { "type": "object", - "additionalProperties": false, + "description": "A definition of a queue.", + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, "properties": { - "time": { + "name": { + "type": "string", + "description": "The name of the queue. When an SNS Operation Binding Object references an SQS queue by name, the identifier should be the one in this field." + }, + "fifoQueue": { + "type": "boolean", + "description": "Is this a FIFO queue?", + "default": false + }, + "deduplicationScope": { + "type": "string", + "enum": [ + "queue", + "messageGroup" + ], + "description": "Specifies whether message deduplication occurs at the message group or queue level. Valid values are messageGroup and queue (default).", + "default": "queue" + }, + "fifoThroughputLimit": { + "type": "string", + "enum": [ + "perQueue", + "perMessageGroupId" + ], + "description": "Specifies whether the FIFO queue throughput quota applies to the entire queue or per message group. Valid values are perQueue (default) and perMessageGroupId.", + "default": "perQueue" + }, + "deliveryDelay": { "type": "integer", + "description": "The number of seconds to delay before a message sent to the queue can be received. used to create a delay queue.", "minimum": 0, - "description": "Time given in Minutes. `0` = Disable message retention." + "maximum": 15, + "default": 0 }, - "size": { + "visibilityTimeout": { "type": "integer", + "description": "The length of time, in seconds, that a consumer locks a message - hiding it from reads - before it is unlocked and can be read again.", "minimum": 0, - "description": "Size given in MegaBytes. `0` = Disable message retention." + "maximum": 43200, + "default": 30 + }, + "receiveMessageWaitTime": { + "type": "integer", + "description": "Determines if the queue uses short polling or long polling. Set to zero the queue reads available messages and returns immediately. Set to a non-zero integer, long polling waits the specified number of seconds for messages to arrive before returning.", + "default": 0 + }, + "messageRetentionPeriod": { + "type": "integer", + "description": "How long to retain a message on the queue in seconds, unless deleted.", + "minimum": 60, + "maximum": 1209600, + "default": 345600 + }, + "redrivePolicy": { + "$ref": "http://asyncapi.com/bindings/sqs/0.2.0/channel.json#/definitions/redrivePolicy" + }, + "policy": { + "$ref": "http://asyncapi.com/bindings/sqs/0.2.0/channel.json#/definitions/policy" + }, + "tags": { + "type": "object", + "description": "Key-value pairs that represent AWS tags on the queue." } - } - }, - "ttl": { - "type": "integer", - "description": "TTL in seconds for the specified topic" - }, - "deduplication": { - "type": "boolean", - "description": "Whether deduplication of events is enabled or not." + }, + "required": [ + "name", + "fifoQueue" + ] }, - "bindingVersion": { - "type": "string", - "enum": [ - "0.1.0" - ], - "description": "The version of this binding. If omitted, 'latest' MUST be assumed." - } - }, - "examples": [ - { - "namespace": "ns1", - "persistence": "persistent", - "compaction": 1000, - "retention": { - "time": 15, - "size": 1000 + "redrivePolicy": { + "type": "object", + "description": "Prevent poison pill messages by moving un-processable messages to an SQS dead letter queue.", + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } }, - "ttl": 360, - "geo-replication": [ - "us-west", - "us-east" - ], - "deduplication": true, - "bindingVersion": "0.1.0" - } - ] - }, - "http://asyncapi.com/definitions/3.0.0/operations.json": { - "$id": "http://asyncapi.com/definitions/3.0.0/operations.json", - "type": "object", - "additionalProperties": { - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + "properties": { + "deadLetterQueue": { + "$ref": "http://asyncapi.com/bindings/sqs/0.2.0/channel.json#/definitions/identifier" + }, + "maxReceiveCount": { + "type": "integer", + "description": "The number of times a message is delivered to the source queue before being moved to the dead-letter queue.", + "default": 10 + } }, - { - "$ref": "http://asyncapi.com/definitions/3.0.0/operation.json" - } - ] - } - }, - "http://asyncapi.com/definitions/3.0.0/operation.json": { - "$id": "http://asyncapi.com/definitions/3.0.0/operation.json", - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" - } - }, - "required": [ - "action", - "channel" - ], - "properties": { - "action": { - "type": "string", - "description": "Allowed values are send and receive. Use send when it's expected that the application will send a message to the given channel, and receive when the application should expect receiving messages from the given channel.", - "enum": [ - "send", - "receive" + "required": [ + "deadLetterQueue" ] }, - "channel": { - "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" - }, + "identifier": { + "type": "object", + "description": "The SQS queue to use as a dead letter queue (DLQ).", + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "properties": { + "arn": { + "type": "string", + "description": "The target is an ARN. For example, for SQS, the identifier may be an ARN, which will be of the form: arn:aws:sqs:{region}:{account-id}:{queueName}" + }, + "name": { + "type": "string", + "description": "The endpoint is identified by a name, which corresponds to an identifying field called 'name' of a binding for that protocol on this publish Operation Object. For example, if the protocol is 'sqs' then the name refers to the name field sqs binding." + } + } + }, + "policy": { + "type": "object", + "description": "The security policy for the SQS Queue", + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "properties": { + "statements": { + "type": "array", + "description": "An array of statement objects, each of which controls a permission for this queue.", + "items": { + "$ref": "http://asyncapi.com/bindings/sqs/0.2.0/channel.json#/definitions/statement" + } + } + }, + "required": [ + "statements" + ] + }, + "statement": { + "type": "object", + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "properties": { + "effect": { + "type": "string", + "enum": [ + "Allow", + "Deny" + ] + }, + "principal": { + "description": "The AWS account or resource ARN that this statement applies to.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "action": { + "description": "The SQS permission being allowed or denied e.g. sqs:ReceiveMessage", + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + } + }, + "required": [ + "effect", + "principal", + "action" + ] + } + }, + "examples": [ + { + "queue": { + "name": "myQueue", + "fifoQueue": true, + "deduplicationScope": "messageGroup", + "fifoThroughputLimit": "perMessageGroupId", + "deliveryDelay": 15, + "visibilityTimeout": 60, + "receiveMessageWaitTime": 0, + "messageRetentionPeriod": 86400, + "redrivePolicy": { + "deadLetterQueue": { + "arn": "arn:aws:SQS:eu-west-1:0000000:123456789" + }, + "maxReceiveCount": 15 + }, + "policy": { + "statements": [ + { + "effect": "Deny", + "principal": "arn:aws:iam::123456789012:user/dec.kolakowski", + "action": [ + "sqs:SendMessage", + "sqs:ReceiveMessage" + ] + } + ] + }, + "tags": { + "owner": "AsyncAPI.NET", + "platform": "AsyncAPIOrg" + } + }, + "deadLetterQueue": { + "name": "myQueue_error", + "deliveryDelay": 0, + "visibilityTimeout": 0, + "receiveMessageWaitTime": 0, + "messageRetentionPeriod": 604800 + } + } + ] + }, + "http://asyncapi.com/bindings/ibmmq/0.1.0/channel.json": { + "$id": "http://asyncapi.com/bindings/ibmmq/0.1.0/channel.json", + "title": "IBM MQ channel bindings object", + "description": "This object contains information about the channel representation in IBM MQ. Each channel corresponds to a Queue or Topic within IBM MQ.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "properties": { + "destinationType": { + "type": "string", + "enum": [ + "topic", + "queue" + ], + "default": "topic", + "description": "Defines the type of AsyncAPI channel." + }, + "queue": { + "type": "object", + "description": "Defines the properties of a queue.", + "properties": { + "objectName": { + "type": "string", + "maxLength": 48, + "description": "Defines the name of the IBM MQ queue associated with the channel." + }, + "isPartitioned": { + "type": "boolean", + "default": false, + "description": "Defines if the queue is a cluster queue and therefore partitioned. If 'true', a binding option MAY be specified when accessing the queue. More information on binding options can be found on this page in the IBM MQ Knowledge Center." + }, + "exclusive": { + "type": "boolean", + "default": false, + "description": "Specifies if it is recommended to open the queue exclusively." + } + }, + "required": [ + "objectName" + ] + }, + "topic": { + "type": "object", + "description": "Defines the properties of a topic.", + "properties": { + "string": { + "type": "string", + "maxLength": 10240, + "description": "The value of the IBM MQ topic string to be used." + }, + "objectName": { + "type": "string", + "maxLength": 48, + "description": "The name of the IBM MQ topic object." + }, + "durablePermitted": { + "type": "boolean", + "default": true, + "description": "Defines if the subscription may be durable." + }, + "lastMsgRetained": { + "type": "boolean", + "default": false, + "description": "Defines if the last message published will be made available to new subscriptions." + } + } + }, + "maxMsgLength": { + "type": "integer", + "minimum": 0, + "maximum": 104857600, + "description": "The maximum length of the physical message (in bytes) accepted by the Topic or Queue. Messages produced that are greater in size than this value may fail to be delivered. More information on the maximum message length can be found on this [page](https://www.ibm.com/support/knowledgecenter/SSFKSJ_latest/com.ibm.mq.ref.dev.doc/q097520_.html) in the IBM MQ Knowledge Center." + }, + "bindingVersion": { + "type": "string", + "enum": [ + "0.1.0" + ], + "description": "The version of this binding." + } + }, + "oneOf": [ + { + "properties": { + "destinationType": { + "const": "topic" + } + }, + "not": { + "required": [ + "queue" + ] + } + }, + { + "properties": { + "destinationType": { + "const": "queue" + } + }, + "required": [ + "queue" + ], + "not": { + "required": [ + "topic" + ] + } + } + ], + "examples": [ + { + "destinationType": "topic", + "topic": { + "objectName": "myTopicName" + }, + "bindingVersion": "0.1.0" + }, + { + "destinationType": "queue", + "queue": { + "objectName": "myQueueName", + "exclusive": true + }, + "bindingVersion": "0.1.0" + } + ] + }, + "http://asyncapi.com/bindings/googlepubsub/0.2.0/channel.json": { + "$id": "http://asyncapi.com/bindings/googlepubsub/0.2.0/channel.json", + "title": "Cloud Pub/Sub Channel Schema", + "description": "This object contains information about the channel representation for Google Cloud Pub/Sub.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "properties": { + "bindingVersion": { + "type": "string", + "enum": [ + "0.2.0" + ], + "description": "The version of this binding." + }, + "labels": { + "type": "object" + }, + "messageRetentionDuration": { + "type": "string" + }, + "messageStoragePolicy": { + "type": "object", + "additionalProperties": false, + "properties": { + "allowedPersistenceRegions": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "schemaSettings": { + "type": "object", + "additionalItems": false, + "properties": { + "encoding": { + "type": "string" + }, + "firstRevisionId": { + "type": "string" + }, + "lastRevisionId": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "encoding", + "name" + ] + } + }, + "required": [ + "schemaSettings" + ], + "examples": [ + { + "labels": { + "label1": "value1", + "label2": "value2" + }, + "messageRetentionDuration": "86400s", + "messageStoragePolicy": { + "allowedPersistenceRegions": [ + "us-central1", + "us-east1" + ] + }, + "schemaSettings": { + "encoding": "json", + "name": "projects/your-project-id/schemas/your-schema" + } + } + ] + }, + "http://asyncapi.com/bindings/pulsar/0.1.0/channel.json": { + "$id": "http://asyncapi.com/bindings/pulsar/0.1.0/channel.json", + "title": "Channel Schema", + "description": "This object contains information about the channel representation in Pulsar, which covers namespace and topic level admin configuration. This object contains additional information not possible to represent within the core AsyncAPI specification.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "required": [ + "namespace", + "persistence" + ], + "properties": { + "namespace": { + "type": "string", + "description": "The namespace, the channel is associated with." + }, + "persistence": { + "type": "string", + "enum": [ + "persistent", + "non-persistent" + ], + "description": "persistence of the topic in Pulsar." + }, + "compaction": { + "type": "integer", + "minimum": 0, + "description": "Topic compaction threshold given in MB" + }, + "geo-replication": { + "type": "array", + "description": "A list of clusters the topic is replicated to.", + "items": { + "type": "string" + } + }, + "retention": { + "type": "object", + "additionalProperties": false, + "properties": { + "time": { + "type": "integer", + "minimum": 0, + "description": "Time given in Minutes. `0` = Disable message retention." + }, + "size": { + "type": "integer", + "minimum": 0, + "description": "Size given in MegaBytes. `0` = Disable message retention." + } + } + }, + "ttl": { + "type": "integer", + "description": "TTL in seconds for the specified topic" + }, + "deduplication": { + "type": "boolean", + "description": "Whether deduplication of events is enabled or not." + }, + "bindingVersion": { + "type": "string", + "enum": [ + "0.1.0" + ], + "description": "The version of this binding. If omitted, 'latest' MUST be assumed." + } + }, + "examples": [ + { + "namespace": "ns1", + "persistence": "persistent", + "compaction": 1000, + "retention": { + "time": 15, + "size": 1000 + }, + "ttl": 360, + "geo-replication": [ + "us-west", + "us-east" + ], + "deduplication": true, + "bindingVersion": "0.1.0" + } + ] + }, + "http://asyncapi.com/definitions/3.0.0/operations.json": { + "$id": "http://asyncapi.com/definitions/3.0.0/operations.json", + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/operation.json" + } + ] + } + }, + "http://asyncapi.com/definitions/3.0.0/operation.json": { + "$id": "http://asyncapi.com/definitions/3.0.0/operation.json", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "required": [ + "action", + "channel" + ], + "properties": { + "action": { + "type": "string", + "description": "Allowed values are send and receive. Use send when it's expected that the application will send a message to the given channel, and receive when the application should expect receiving messages from the given channel.", + "enum": [ + "send", + "receive" + ] + }, + "channel": { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, "messages": { "type": "array", "items": { @@ -5282,23 +6113,93 @@ ], "properties": { "bindingVersion": { - "const": "0.2.0" + "const": "0.2.0" + } + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/mqtt/0.2.0/operation.json" + } + } + ] + }, + "mqtt5": {}, + "kafka": { + "properties": { + "bindingVersion": { + "enum": [ + "0.4.0", + "0.3.0", + "0.1.0" + ] + } + }, + "allOf": [ + { + "description": "If no bindingVersion specified, use the latest binding", + "if": { + "not": { + "required": [ + "bindingVersion" + ] + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/kafka/0.4.0/operation.json" + } + }, + { + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.4.0" + } + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/kafka/0.4.0/operation.json" + } + }, + { + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.3.0" + } + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/kafka/0.3.0/operation.json" + } + }, + { + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.1.0" } } }, "then": { - "$ref": "http://asyncapi.com/bindings/mqtt/0.2.0/operation.json" + "$ref": "http://asyncapi.com/bindings/kafka/0.1.0/operation.json" } } ] }, - "mqtt5": {}, - "kafka": { + "anypointmq": {}, + "nats": { "properties": { "bindingVersion": { "enum": [ - "0.4.0", - "0.3.0", "0.1.0" ] } @@ -5314,7 +6215,7 @@ } }, "then": { - "$ref": "http://asyncapi.com/bindings/kafka/0.4.0/operation.json" + "$ref": "http://asyncapi.com/bindings/nats/0.1.0/operation.json" } }, { @@ -5324,27 +6225,37 @@ ], "properties": { "bindingVersion": { - "const": "0.4.0" + "const": "0.1.0" } } }, "then": { - "$ref": "http://asyncapi.com/bindings/kafka/0.4.0/operation.json" + "$ref": "http://asyncapi.com/bindings/nats/0.1.0/operation.json" } - }, + } + ] + }, + "jms": {}, + "sns": { + "properties": { + "bindingVersion": { + "enum": [ + "0.1.0" + ] + } + }, + "allOf": [ { + "description": "If no bindingVersion specified, use the latest binding", "if": { - "required": [ - "bindingVersion" - ], - "properties": { - "bindingVersion": { - "const": "0.3.0" - } + "not": { + "required": [ + "bindingVersion" + ] } }, "then": { - "$ref": "http://asyncapi.com/bindings/kafka/0.3.0/operation.json" + "$ref": "http://asyncapi.com/bindings/sns/0.1.0/operation.json" } }, { @@ -5359,17 +6270,16 @@ } }, "then": { - "$ref": "http://asyncapi.com/bindings/kafka/0.1.0/operation.json" + "$ref": "http://asyncapi.com/bindings/sns/0.1.0/operation.json" } } ] }, - "anypointmq": {}, - "nats": { + "sqs": { "properties": { "bindingVersion": { "enum": [ - "0.1.0" + "0.2.0" ] } }, @@ -5384,7 +6294,7 @@ } }, "then": { - "$ref": "http://asyncapi.com/bindings/nats/0.1.0/operation.json" + "$ref": "http://asyncapi.com/bindings/sqs/0.2.0/operation.json" } }, { @@ -5394,19 +6304,16 @@ ], "properties": { "bindingVersion": { - "const": "0.1.0" + "const": "0.2.0" } } }, "then": { - "$ref": "http://asyncapi.com/bindings/nats/0.1.0/operation.json" + "$ref": "http://asyncapi.com/bindings/sqs/0.2.0/operation.json" } } ] }, - "jms": {}, - "sns": {}, - "sqs": {}, "stomp": {}, "redis": {}, "ibmmq": {}, @@ -5541,14 +6448,228 @@ }, "additionalProperties": false }, - "bindingVersion": "0.2.0" + "bindingVersion": "0.2.0" + } + ] + }, + "http://asyncapi.com/bindings/amqp/0.3.0/operation.json": { + "$id": "http://asyncapi.com/bindings/amqp/0.3.0/operation.json", + "title": "AMQP operation bindings object", + "description": "This object contains information about the operation representation in AMQP.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "properties": { + "expiration": { + "type": "integer", + "minimum": 0, + "description": "TTL (Time-To-Live) for the message. It MUST be greater than or equal to zero." + }, + "userId": { + "type": "string", + "description": "Identifies the user who has sent the message." + }, + "cc": { + "type": "array", + "items": { + "type": "string" + }, + "description": "The routing keys the message should be routed to at the time of publishing." + }, + "priority": { + "type": "integer", + "description": "A priority for the message." + }, + "deliveryMode": { + "type": "integer", + "enum": [ + 1, + 2 + ], + "description": "Delivery mode of the message. Its value MUST be either 1 (transient) or 2 (persistent)." + }, + "mandatory": { + "type": "boolean", + "description": "Whether the message is mandatory or not." + }, + "bcc": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Like cc but consumers will not receive this information." + }, + "timestamp": { + "type": "boolean", + "description": "Whether the message should include a timestamp or not." + }, + "ack": { + "type": "boolean", + "description": "Whether the consumer should ack the message or not." + }, + "bindingVersion": { + "type": "string", + "enum": [ + "0.3.0" + ], + "description": "The version of this binding. If omitted, \"latest\" MUST be assumed." + } + }, + "examples": [ + { + "expiration": 100000, + "userId": "guest", + "cc": [ + "user.logs" + ], + "priority": 10, + "deliveryMode": 2, + "mandatory": false, + "bcc": [ + "external.audit" + ], + "timestamp": true, + "ack": false, + "bindingVersion": "0.3.0" + } + ] + }, + "http://asyncapi.com/bindings/mqtt/0.2.0/operation.json": { + "$id": "http://asyncapi.com/bindings/mqtt/0.2.0/operation.json", + "title": "MQTT operation bindings object", + "description": "This object contains information about the operation representation in MQTT.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "properties": { + "qos": { + "type": "integer", + "description": "Defines the Quality of Service (QoS) levels for the message flow between client and server. Its value MUST be either 0 (At most once delivery), 1 (At least once delivery), or 2 (Exactly once delivery)." + }, + "retain": { + "type": "boolean", + "description": "Whether the broker should retain the message or not." + }, + "bindingVersion": { + "type": "string", + "enum": [ + "0.2.0" + ], + "description": "The version of this binding. If omitted, 'latest' MUST be assumed." + } + }, + "examples": [ + { + "qos": 2, + "retain": true, + "bindingVersion": "0.2.0" + } + ] + }, + "http://asyncapi.com/bindings/kafka/0.4.0/operation.json": { + "$id": "http://asyncapi.com/bindings/kafka/0.4.0/operation.json", + "title": "Operation Schema", + "description": "This object contains information about the operation representation in Kafka.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "properties": { + "groupId": { + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json", + "description": "Id of the consumer group." + }, + "clientId": { + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json", + "description": "Id of the consumer inside a consumer group." + }, + "bindingVersion": { + "type": "string", + "enum": [ + "0.4.0" + ], + "description": "The version of this binding. If omitted, 'latest' MUST be assumed." + } + }, + "examples": [ + { + "groupId": { + "type": "string", + "enum": [ + "myGroupId" + ] + }, + "clientId": { + "type": "string", + "enum": [ + "myClientId" + ] + }, + "bindingVersion": "0.4.0" + } + ] + }, + "http://asyncapi.com/bindings/kafka/0.3.0/operation.json": { + "$id": "http://asyncapi.com/bindings/kafka/0.3.0/operation.json", + "title": "Operation Schema", + "description": "This object contains information about the operation representation in Kafka.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "properties": { + "groupId": { + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json", + "description": "Id of the consumer group." + }, + "clientId": { + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json", + "description": "Id of the consumer inside a consumer group." + }, + "bindingVersion": { + "type": "string", + "enum": [ + "0.3.0" + ], + "description": "The version of this binding. If omitted, 'latest' MUST be assumed." + } + }, + "examples": [ + { + "groupId": { + "type": "string", + "enum": [ + "myGroupId" + ] + }, + "clientId": { + "type": "string", + "enum": [ + "myClientId" + ] + }, + "bindingVersion": "0.3.0" } ] }, - "http://asyncapi.com/bindings/amqp/0.3.0/operation.json": { - "$id": "http://asyncapi.com/bindings/amqp/0.3.0/operation.json", - "title": "AMQP operation bindings object", - "description": "This object contains information about the operation representation in AMQP.", + "http://asyncapi.com/bindings/kafka/0.1.0/operation.json": { + "$id": "http://asyncapi.com/bindings/kafka/0.1.0/operation.json", + "title": "Kafka operation message bindings object", + "description": "This object contains information about the operation representation in Kafka.", "type": "object", "additionalProperties": false, "patternProperties": { @@ -5557,84 +6678,44 @@ } }, "properties": { - "expiration": { - "type": "integer", - "minimum": 0, - "description": "TTL (Time-To-Live) for the message. It MUST be greater than or equal to zero." - }, - "userId": { - "type": "string", - "description": "Identifies the user who has sent the message." - }, - "cc": { - "type": "array", - "items": { - "type": "string" - }, - "description": "The routing keys the message should be routed to at the time of publishing." - }, - "priority": { - "type": "integer", - "description": "A priority for the message." - }, - "deliveryMode": { - "type": "integer", - "enum": [ - 1, - 2 - ], - "description": "Delivery mode of the message. Its value MUST be either 1 (transient) or 2 (persistent)." - }, - "mandatory": { - "type": "boolean", - "description": "Whether the message is mandatory or not." - }, - "bcc": { - "type": "array", - "items": { - "type": "string" - }, - "description": "Like cc but consumers will not receive this information." - }, - "timestamp": { - "type": "boolean", - "description": "Whether the message should include a timestamp or not." + "groupId": { + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json", + "description": "Id of the consumer group." }, - "ack": { - "type": "boolean", - "description": "Whether the consumer should ack the message or not." + "clientId": { + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json", + "description": "Id of the consumer inside a consumer group." }, "bindingVersion": { "type": "string", "enum": [ - "0.3.0" + "0.1.0" ], - "description": "The version of this binding. If omitted, \"latest\" MUST be assumed." + "description": "The version of this binding. If omitted, 'latest' MUST be assumed." } }, "examples": [ { - "expiration": 100000, - "userId": "guest", - "cc": [ - "user.logs" - ], - "priority": 10, - "deliveryMode": 2, - "mandatory": false, - "bcc": [ - "external.audit" - ], - "timestamp": true, - "ack": false, - "bindingVersion": "0.3.0" + "groupId": { + "type": "string", + "enum": [ + "myGroupId" + ] + }, + "clientId": { + "type": "string", + "enum": [ + "myClientId" + ] + }, + "bindingVersion": "0.1.0" } ] }, - "http://asyncapi.com/bindings/mqtt/0.2.0/operation.json": { - "$id": "http://asyncapi.com/bindings/mqtt/0.2.0/operation.json", - "title": "MQTT operation bindings object", - "description": "This object contains information about the operation representation in MQTT.", + "http://asyncapi.com/bindings/nats/0.1.0/operation.json": { + "$id": "http://asyncapi.com/bindings/nats/0.1.0/operation.json", + "title": "NATS operation bindings object", + "description": "This object contains information about the operation representation in NATS.", "type": "object", "additionalProperties": false, "patternProperties": { @@ -5643,34 +6724,30 @@ } }, "properties": { - "qos": { - "type": "integer", - "description": "Defines the Quality of Service (QoS) levels for the message flow between client and server. Its value MUST be either 0 (At most once delivery), 1 (At least once delivery), or 2 (Exactly once delivery)." - }, - "retain": { - "type": "boolean", - "description": "Whether the broker should retain the message or not." + "queue": { + "type": "string", + "description": "Defines the name of the queue to use. It MUST NOT exceed 255 characters.", + "maxLength": 255 }, "bindingVersion": { "type": "string", "enum": [ - "0.2.0" + "0.1.0" ], "description": "The version of this binding. If omitted, 'latest' MUST be assumed." } }, "examples": [ { - "qos": 2, - "retain": true, - "bindingVersion": "0.2.0" + "queue": "MyCustomQueue", + "bindingVersion": "0.1.0" } ] }, - "http://asyncapi.com/bindings/kafka/0.4.0/operation.json": { - "$id": "http://asyncapi.com/bindings/kafka/0.4.0/operation.json", + "http://asyncapi.com/bindings/sns/0.1.0/operation.json": { + "$id": "http://asyncapi.com/bindings/sns/0.1.0/operation.json", "title": "Operation Schema", - "description": "This object contains information about the operation representation in Kafka.", + "description": "This object contains information about the operation representation in SNS.", "type": "object", "additionalProperties": false, "patternProperties": { @@ -5679,44 +6756,270 @@ } }, "properties": { - "groupId": { - "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json", - "description": "Id of the consumer group." + "topic": { + "$ref": "http://asyncapi.com/bindings/sns/0.1.0/operation.json#/definitions/identifier", + "description": "Often we can assume that the SNS Topic is the channel name-we provide this field in case the you need to supply the ARN, or the Topic name is not the channel name in the AsyncAPI document." }, - "clientId": { - "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json", - "description": "Id of the consumer inside a consumer group." + "consumers": { + "type": "array", + "description": "The protocols that listen to this topic and their endpoints.", + "items": { + "$ref": "http://asyncapi.com/bindings/sns/0.1.0/operation.json#/definitions/consumer" + }, + "minItems": 1 + }, + "deliveryPolicy": { + "$ref": "http://asyncapi.com/bindings/sns/0.1.0/operation.json#/definitions/deliveryPolicy", + "description": "Policy for retries to HTTP. The field is the default for HTTP receivers of the SNS Topic which may be overridden by a specific consumer." }, "bindingVersion": { "type": "string", - "enum": [ - "0.4.0" - ], - "description": "The version of this binding. If omitted, 'latest' MUST be assumed." + "description": "The version of this binding.", + "default": "latest" + } + }, + "required": [ + "consumers" + ], + "definitions": { + "identifier": { + "type": "object", + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "properties": { + "url": { + "type": "string", + "description": "The endpoint is a URL." + }, + "email": { + "type": "string", + "description": "The endpoint is an email address." + }, + "phone": { + "type": "string", + "description": "The endpoint is a phone number." + }, + "arn": { + "type": "string", + "description": "The target is an ARN. For example, for SQS, the identifier may be an ARN, which will be of the form: arn:aws:sqs:{region}:{account-id}:{queueName}" + }, + "name": { + "type": "string", + "description": "The endpoint is identified by a name, which corresponds to an identifying field called 'name' of a binding for that protocol on this publish Operation Object. For example, if the protocol is 'sqs' then the name refers to the name field sqs binding. We don't use $ref because we are referring, not including." + } + } + }, + "consumer": { + "type": "object", + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "properties": { + "protocol": { + "description": "The protocol that this endpoint receives messages by.", + "type": "string", + "enum": [ + "http", + "https", + "email", + "email-json", + "sms", + "sqs", + "application", + "lambda", + "firehose" + ] + }, + "endpoint": { + "description": "The endpoint messages are delivered to.", + "$ref": "http://asyncapi.com/bindings/sns/0.1.0/operation.json#/definitions/identifier" + }, + "filterPolicy": { + "type": "object", + "description": "Only receive a subset of messages from the channel, determined by this policy. Depending on the FilterPolicyScope, a map of either a message attribute or message body to an array of possible matches. The match may be a simple string for an exact match, but it may also be an object that represents a constraint and values for that constraint.", + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "additionalProperties": { + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "string" + }, + { + "type": "object" + } + ] + } + }, + "filterPolicyScope": { + "type": "string", + "description": "Determines whether the FilterPolicy applies to MessageAttributes or MessageBody.", + "enum": [ + "MessageAttributes", + "MessageBody" + ], + "default": "MessageAttributes" + }, + "rawMessageDelivery": { + "type": "boolean", + "description": "If true AWS SNS attributes are removed from the body, and for SQS, SNS message attributes are copied to SQS message attributes. If false the SNS attributes are included in the body." + }, + "redrivePolicy": { + "$ref": "http://asyncapi.com/bindings/sns/0.1.0/operation.json#/definitions/redrivePolicy" + }, + "deliveryPolicy": { + "$ref": "http://asyncapi.com/bindings/sns/0.1.0/operation.json#/definitions/deliveryPolicy", + "description": "Policy for retries to HTTP. The parameter is for that SNS Subscription and overrides any policy on the SNS Topic." + }, + "displayName": { + "type": "string", + "description": "The display name to use with an SNS subscription" + } + }, + "required": [ + "protocol", + "endpoint", + "rawMessageDelivery" + ] + }, + "deliveryPolicy": { + "type": "object", + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "properties": { + "minDelayTarget": { + "type": "integer", + "description": "The minimum delay for a retry in seconds." + }, + "maxDelayTarget": { + "type": "integer", + "description": "The maximum delay for a retry in seconds." + }, + "numRetries": { + "type": "integer", + "description": "The total number of retries, including immediate, pre-backoff, backoff, and post-backoff retries." + }, + "numNoDelayRetries": { + "type": "integer", + "description": "The number of immediate retries (with no delay)." + }, + "numMinDelayRetries": { + "type": "integer", + "description": "The number of immediate retries (with delay)." + }, + "numMaxDelayRetries": { + "type": "integer", + "description": "The number of post-backoff phase retries, with the maximum delay between retries." + }, + "backoffFunction": { + "type": "string", + "description": "The algorithm for backoff between retries.", + "enum": [ + "arithmetic", + "exponential", + "geometric", + "linear" + ] + }, + "maxReceivesPerSecond": { + "type": "integer", + "description": "The maximum number of deliveries per second, per subscription." + } + } + }, + "redrivePolicy": { + "type": "object", + "description": "Prevent poison pill messages by moving un-processable messages to an SQS dead letter queue.", + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "properties": { + "deadLetterQueue": { + "$ref": "http://asyncapi.com/bindings/sns/0.1.0/operation.json#/definitions/identifier", + "description": "The SQS queue to use as a dead letter queue (DLQ)." + }, + "maxReceiveCount": { + "type": "integer", + "description": "The number of times a message is delivered to the source queue before being moved to the dead-letter queue.", + "default": 10 + } + }, + "required": [ + "deadLetterQueue" + ] } }, "examples": [ { - "groupId": { - "type": "string", - "enum": [ - "myGroupId" - ] - }, - "clientId": { - "type": "string", - "enum": [ - "myClientId" - ] + "topic": { + "name": "someTopic" }, - "bindingVersion": "0.4.0" + "consumers": [ + { + "protocol": "sqs", + "endpoint": { + "name": "someQueue" + }, + "filterPolicy": { + "store": [ + "asyncapi_corp" + ], + "event": [ + { + "anything-but": "order_cancelled" + } + ], + "customer_interests": [ + "rugby", + "football", + "baseball" + ] + }, + "filterPolicyScope": "MessageAttributes", + "rawMessageDelivery": false, + "redrivePolicy": { + "deadLetterQueue": { + "arn": "arn:aws:SQS:eu-west-1:0000000:123456789" + }, + "maxReceiveCount": 25 + }, + "deliveryPolicy": { + "minDelayTarget": 10, + "maxDelayTarget": 100, + "numRetries": 5, + "numNoDelayRetries": 2, + "numMinDelayRetries": 3, + "numMaxDelayRetries": 5, + "backoffFunction": "linear", + "maxReceivesPerSecond": 2 + } + } + ] } ] }, - "http://asyncapi.com/bindings/kafka/0.3.0/operation.json": { - "$id": "http://asyncapi.com/bindings/kafka/0.3.0/operation.json", + "http://asyncapi.com/bindings/sqs/0.2.0/operation.json": { + "$id": "http://asyncapi.com/bindings/sqs/0.2.0/operation.json", "title": "Operation Schema", - "description": "This object contains information about the operation representation in Kafka.", + "description": "This object contains information about the operation representation in SQS.", "type": "object", "additionalProperties": false, "patternProperties": { @@ -5725,115 +7028,254 @@ } }, "properties": { - "groupId": { - "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json", - "description": "Id of the consumer group." - }, - "clientId": { - "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json", - "description": "Id of the consumer inside a consumer group." + "queues": { + "type": "array", + "description": "Queue objects that are either the endpoint for an SNS Operation Binding Object, or the deadLetterQueue of the SQS Operation Binding Object.", + "items": { + "$ref": "http://asyncapi.com/bindings/sqs/0.2.0/operation.json#/definitions/queue" + } }, "bindingVersion": { "type": "string", "enum": [ - "0.3.0" + "0.1.0", + "0.2.0" ], - "description": "The version of this binding. If omitted, 'latest' MUST be assumed." + "description": "The version of this binding. If omitted, 'latest' MUST be assumed.", + "default": "latest" } }, - "examples": [ - { - "groupId": { - "type": "string", - "enum": [ - "myGroupId" - ] + "required": [ + "queues" + ], + "definitions": { + "queue": { + "type": "object", + "description": "A definition of a queue.", + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } }, - "clientId": { - "type": "string", - "enum": [ - "myClientId" - ] + "properties": { + "$ref": { + "type": "string", + "description": "Allows for an external definition of a queue. The referenced structure MUST be in the format of a Queue. If there are conflicts between the referenced definition and this Queue's definition, the behavior is undefined." + }, + "name": { + "type": "string", + "description": "The name of the queue. When an SNS Operation Binding Object references an SQS queue by name, the identifier should be the one in this field." + }, + "fifoQueue": { + "type": "boolean", + "description": "Is this a FIFO queue?", + "default": false + }, + "deduplicationScope": { + "type": "string", + "enum": [ + "queue", + "messageGroup" + ], + "description": "Specifies whether message deduplication occurs at the message group or queue level. Valid values are messageGroup and queue (default).", + "default": "queue" + }, + "fifoThroughputLimit": { + "type": "string", + "enum": [ + "perQueue", + "perMessageGroupId" + ], + "description": "Specifies whether the FIFO queue throughput quota applies to the entire queue or per message group. Valid values are perQueue (default) and perMessageGroupId.", + "default": "perQueue" + }, + "deliveryDelay": { + "type": "integer", + "description": "The number of seconds to delay before a message sent to the queue can be received. Used to create a delay queue.", + "minimum": 0, + "maximum": 15, + "default": 0 + }, + "visibilityTimeout": { + "type": "integer", + "description": "The length of time, in seconds, that a consumer locks a message - hiding it from reads - before it is unlocked and can be read again.", + "minimum": 0, + "maximum": 43200, + "default": 30 + }, + "receiveMessageWaitTime": { + "type": "integer", + "description": "Determines if the queue uses short polling or long polling. Set to zero the queue reads available messages and returns immediately. Set to a non-zero integer, long polling waits the specified number of seconds for messages to arrive before returning.", + "default": 0 + }, + "messageRetentionPeriod": { + "type": "integer", + "description": "How long to retain a message on the queue in seconds, unless deleted.", + "minimum": 60, + "maximum": 1209600, + "default": 345600 + }, + "redrivePolicy": { + "$ref": "http://asyncapi.com/bindings/sqs/0.2.0/operation.json#/definitions/redrivePolicy" + }, + "policy": { + "$ref": "http://asyncapi.com/bindings/sqs/0.2.0/operation.json#/definitions/policy" + }, + "tags": { + "type": "object", + "description": "Key-value pairs that represent AWS tags on the queue." + } }, - "bindingVersion": "0.3.0" - } - ] - }, - "http://asyncapi.com/bindings/kafka/0.1.0/operation.json": { - "$id": "http://asyncapi.com/bindings/kafka/0.1.0/operation.json", - "title": "Kafka operation message bindings object", - "description": "This object contains information about the operation representation in Kafka.", - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" - } - }, - "properties": { - "groupId": { - "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json", - "description": "Id of the consumer group." + "required": [ + "name" + ] }, - "clientId": { - "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json", - "description": "Id of the consumer inside a consumer group." + "redrivePolicy": { + "type": "object", + "description": "Prevent poison pill messages by moving un-processable messages to an SQS dead letter queue.", + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "properties": { + "deadLetterQueue": { + "$ref": "http://asyncapi.com/bindings/sqs/0.2.0/operation.json#/definitions/identifier" + }, + "maxReceiveCount": { + "type": "integer", + "description": "The number of times a message is delivered to the source queue before being moved to the dead-letter queue.", + "default": 10 + } + }, + "required": [ + "deadLetterQueue" + ] }, - "bindingVersion": { - "type": "string", - "enum": [ - "0.1.0" - ], - "description": "The version of this binding. If omitted, 'latest' MUST be assumed." - } - }, - "examples": [ - { - "groupId": { - "type": "string", - "enum": [ - "myGroupId" - ] + "identifier": { + "type": "object", + "description": "The SQS queue to use as a dead letter queue (DLQ).", + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } }, - "clientId": { - "type": "string", - "enum": [ - "myClientId" - ] + "properties": { + "arn": { + "type": "string", + "description": "The target is an ARN. For example, for SQS, the identifier may be an ARN, which will be of the form: arn:aws:sqs:{region}:{account-id}:{queueName}" + }, + "name": { + "type": "string", + "description": "The endpoint is identified by a name, which corresponds to an identifying field called 'name' of a binding for that protocol on this publish Operation Object. For example, if the protocol is 'sqs' then the name refers to the name field sqs binding." + } + } + }, + "policy": { + "type": "object", + "description": "The security policy for the SQS Queue", + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } }, - "bindingVersion": "0.1.0" - } - ] - }, - "http://asyncapi.com/bindings/nats/0.1.0/operation.json": { - "$id": "http://asyncapi.com/bindings/nats/0.1.0/operation.json", - "title": "NATS operation bindings object", - "description": "This object contains information about the operation representation in NATS.", - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" - } - }, - "properties": { - "queue": { - "type": "string", - "description": "Defines the name of the queue to use. It MUST NOT exceed 255 characters.", - "maxLength": 255 + "properties": { + "statements": { + "type": "array", + "description": "An array of statement objects, each of which controls a permission for this queue.", + "items": { + "$ref": "http://asyncapi.com/bindings/sqs/0.2.0/operation.json#/definitions/statement" + } + } + }, + "required": [ + "statements" + ] }, - "bindingVersion": { - "type": "string", - "enum": [ - "0.1.0" - ], - "description": "The version of this binding. If omitted, 'latest' MUST be assumed." + "statement": { + "type": "object", + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "properties": { + "effect": { + "type": "string", + "enum": [ + "Allow", + "Deny" + ] + }, + "principal": { + "description": "The AWS account or resource ARN that this statement applies to.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "action": { + "description": "The SQS permission being allowed or denied e.g. sqs:ReceiveMessage", + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + } + }, + "required": [ + "effect", + "principal", + "action" + ] } }, "examples": [ { - "queue": "MyCustomQueue", - "bindingVersion": "0.1.0" + "queues": [ + { + "name": "myQueue", + "fifoQueue": true, + "deduplicationScope": "messageGroup", + "fifoThroughputLimit": "perMessageGroupId", + "deliveryDelay": 10, + "redrivePolicy": { + "deadLetterQueue": { + "name": "myQueue_error" + }, + "maxReceiveCount": 15 + }, + "policy": { + "statements": [ + { + "effect": "Deny", + "principal": "arn:aws:iam::123456789012:user/dec.kolakowski", + "action": [ + "sqs:SendMessage", + "sqs:ReceiveMessage" + ] + } + ] + } + }, + { + "name": "myQueue_error", + "deliveryDelay": 10 + } + ] } ] }, From 75459f2163c55ed669fd6a4cd5681a8c709e030c Mon Sep 17 00:00:00 2001 From: Ace <40604284+AceTheCreator@users.noreply.github.com> Date: Tue, 21 Nov 2023 02:58:46 -0600 Subject: [PATCH 096/102] feat: add object descriptions and examples (#425) Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>%0ACo-authored-by: Florent Baldino %0ACo-authored-by: asyncapi-bot --- .../3.0.0/APIKeyHTTPSecurityScheme.json | 11 +- .../3.0.0/BearerHTTPSecurityScheme.json | 8 +- .../3.0.0/NonBearerHTTPSecurityScheme.json | 8 +- definitions/3.0.0/Reference.json | 5 + .../3.0.0/SaslGssapiSecurityScheme.json | 7 +- .../3.0.0/SaslPlainSecurityScheme.json | 9 +- .../3.0.0/SaslScramSecurityScheme.json | 9 +- definitions/3.0.0/SecurityScheme.json | 4 + definitions/3.0.0/X509.json | 5 +- definitions/3.0.0/anySchema.json | 30 +-- definitions/3.0.0/apiKey.json | 10 +- definitions/3.0.0/asymmetricEncryption.json | 4 +- definitions/3.0.0/asyncapi.json | 3 +- definitions/3.0.0/channel.json | 31 +-- definitions/3.0.0/channelBindingsObject.json | 1 + definitions/3.0.0/channels.json | 14 +- definitions/3.0.0/components.json | 23 +- definitions/3.0.0/contact.json | 7 +- definitions/3.0.0/correlationId.json | 6 +- definitions/3.0.0/externalDocs.json | 11 +- definitions/3.0.0/info.json | 6 +- definitions/3.0.0/license.json | 11 +- definitions/3.0.0/messageBindingsObject.json | 1 + definitions/3.0.0/messageObject.json | 11 +- definitions/3.0.0/messageTrait.json | 10 +- definitions/3.0.0/multiFormatSchema.json | 6 +- definitions/3.0.0/oauth2Flow.json | 18 +- definitions/3.0.0/oauth2Flows.json | 11 +- definitions/3.0.0/openIdConnect.json | 9 +- definitions/3.0.0/operation.json | 9 +- .../3.0.0/operationBindingsObject.json | 1 + definitions/3.0.0/operationReply.json | 2 + definitions/3.0.0/operationReplyAddress.json | 6 +- definitions/3.0.0/operationTrait.json | 15 +- definitions/3.0.0/operations.json | 6 +- definitions/3.0.0/parameter.json | 12 +- definitions/3.0.0/parameters.json | 5 +- definitions/3.0.0/schema.json | 5 +- definitions/3.0.0/server.json | 49 ++-- definitions/3.0.0/serverBindingsObject.json | 1 + definitions/3.0.0/serverVariable.json | 35 +-- definitions/3.0.0/servers.json | 7 +- definitions/3.0.0/symmetricEncryption.json | 5 +- definitions/3.0.0/tag.json | 12 +- definitions/3.0.0/userPassword.json | 5 +- examples/3.0.0/APIKeyHTTPSecurityScheme.json | 7 + examples/3.0.0/ReferenceObject.json | 3 + examples/3.0.0/Sasl.json | 5 + examples/3.0.0/SecurityScheme.json | 5 + examples/3.0.0/X509.json | 5 + examples/3.0.0/apiKey.json | 6 + examples/3.0.0/channel.json | 40 ++++ examples/3.0.0/channels.json | 12 + examples/3.0.0/components.json | 130 +++++++++++ examples/3.0.0/contact.json | 8 + examples/3.0.0/correlationId.json | 4 + examples/3.0.0/externalDocs.json | 4 + examples/3.0.0/info.json | 27 +++ examples/3.0.0/license.json | 7 + examples/3.0.0/messageObject.json | 58 +++++ examples/3.0.0/messageTrait.json | 3 + examples/3.0.0/oauth2Flow.json | 8 + examples/3.0.0/operation.json | 31 +++ examples/3.0.0/operationReplyAddress.json | 4 + examples/3.0.0/operationTrait.json | 7 + examples/3.0.0/operations.json | 18 ++ examples/3.0.0/parameter.json | 9 + examples/3.0.0/parameters.json | 8 + examples/3.0.0/server.json | 14 ++ examples/3.0.0/serverVariable.json | 14 ++ examples/3.0.0/servers.json | 38 ++++ examples/3.0.0/symmetricEncryption.json | 3 + examples/3.0.0/tag.json | 4 + examples/3.0.0/userPassword.json | 5 + package-lock.json | 210 ++++++++++++++---- 75 files changed, 990 insertions(+), 171 deletions(-) create mode 100644 examples/3.0.0/APIKeyHTTPSecurityScheme.json create mode 100644 examples/3.0.0/ReferenceObject.json create mode 100644 examples/3.0.0/Sasl.json create mode 100644 examples/3.0.0/SecurityScheme.json create mode 100644 examples/3.0.0/X509.json create mode 100644 examples/3.0.0/apiKey.json create mode 100644 examples/3.0.0/channel.json create mode 100644 examples/3.0.0/channels.json create mode 100644 examples/3.0.0/components.json create mode 100644 examples/3.0.0/contact.json create mode 100644 examples/3.0.0/correlationId.json create mode 100644 examples/3.0.0/externalDocs.json create mode 100644 examples/3.0.0/info.json create mode 100644 examples/3.0.0/license.json create mode 100644 examples/3.0.0/messageObject.json create mode 100644 examples/3.0.0/messageTrait.json create mode 100644 examples/3.0.0/oauth2Flow.json create mode 100644 examples/3.0.0/operation.json create mode 100644 examples/3.0.0/operationReplyAddress.json create mode 100644 examples/3.0.0/operationTrait.json create mode 100644 examples/3.0.0/operations.json create mode 100644 examples/3.0.0/parameter.json create mode 100644 examples/3.0.0/parameters.json create mode 100644 examples/3.0.0/server.json create mode 100644 examples/3.0.0/serverVariable.json create mode 100644 examples/3.0.0/servers.json create mode 100644 examples/3.0.0/symmetricEncryption.json create mode 100644 examples/3.0.0/tag.json create mode 100644 examples/3.0.0/userPassword.json diff --git a/definitions/3.0.0/APIKeyHTTPSecurityScheme.json b/definitions/3.0.0/APIKeyHTTPSecurityScheme.json index d1472015..33dee593 100644 --- a/definitions/3.0.0/APIKeyHTTPSecurityScheme.json +++ b/definitions/3.0.0/APIKeyHTTPSecurityScheme.json @@ -8,15 +8,18 @@ "properties": { "type": { "type": "string", + "description": "The type of the security scheme.", "enum": [ "httpApiKey" ] }, "name": { - "type": "string" + "type": "string", + "description": "The name of the header, query or cookie parameter to be used." }, "in": { "type": "string", + "description": "The location of the API key", "enum": [ "header", "query", @@ -24,7 +27,8 @@ ] }, "description": { - "type": "string" + "type": "string", + "description": "A short description for security scheme. CommonMark syntax MAY be used for rich text representation." } }, "patternProperties": { @@ -32,6 +36,9 @@ "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" } }, + "example": { + "$ref": "http://asyncapi.com/examples/3.0.0/APIKeyHTTPSecurityScheme.json" + }, "additionalProperties": false, "$schema": "http://json-schema.org/draft-07/schema#", "$id": "http://asyncapi.com/definitions/3.0.0/APIKeyHTTPSecurityScheme.json" diff --git a/definitions/3.0.0/BearerHTTPSecurityScheme.json b/definitions/3.0.0/BearerHTTPSecurityScheme.json index 7a247c3a..3f71902b 100644 --- a/definitions/3.0.0/BearerHTTPSecurityScheme.json +++ b/definitions/3.0.0/BearerHTTPSecurityScheme.json @@ -7,21 +7,25 @@ "properties": { "scheme": { "type": "string", + "description": "The name of the HTTP Authorization scheme to be used in the Authorization header as defined in RFC7235.", "enum": [ "bearer" ] }, "bearerFormat": { - "type": "string" + "type": "string", + "description": "A hint to the client to identify how the bearer token is formatted. Bearer tokens are usually generated by an authorization server, so this information is primarily for documentation purposes." }, "type": { "type": "string", + "description": "The type of the security scheme.", "enum": [ "http" ] }, "description": { - "type": "string" + "type": "string", + "description": "A short description for security scheme. CommonMark syntax MAY be used for rich text representation." } }, "patternProperties": { diff --git a/definitions/3.0.0/NonBearerHTTPSecurityScheme.json b/definitions/3.0.0/NonBearerHTTPSecurityScheme.json index eeadb2d8..3f1a8d76 100644 --- a/definitions/3.0.0/NonBearerHTTPSecurityScheme.json +++ b/definitions/3.0.0/NonBearerHTTPSecurityScheme.json @@ -4,6 +4,7 @@ "properties": { "scheme": { "type": "string", + "description": "A short description for security scheme.", "enum": [ "bearer" ] @@ -17,13 +18,16 @@ ], "properties": { "scheme": { - "type": "string" + "type": "string", + "description": "The name of the HTTP Authorization scheme to be used in the Authorization header as defined in RFC7235." }, "description": { - "type": "string" + "type": "string", + "description": "A short description for security scheme." }, "type": { "type": "string", + "description": "The type of the security scheme.", "enum": [ "http" ] diff --git a/definitions/3.0.0/Reference.json b/definitions/3.0.0/Reference.json index f9e9893a..78f41b69 100644 --- a/definitions/3.0.0/Reference.json +++ b/definitions/3.0.0/Reference.json @@ -1,13 +1,18 @@ { "type": "object", + "description": "A simple object to allow referencing other components in the specification, internally and externally.", "required": [ "$ref" ], "properties": { "$ref": { + "description": "The reference string.", "$ref": "http://asyncapi.com/definitions/3.0.0/ReferenceObject.json" } }, + "example": { + "$ref": "http://asyncapi.com/examples/3.0.0/ReferenceObject.json" + }, "$schema": "http://json-schema.org/draft-07/schema#", "$id": "http://asyncapi.com/definitions/3.0.0/Reference.json" } \ No newline at end of file diff --git a/definitions/3.0.0/SaslGssapiSecurityScheme.json b/definitions/3.0.0/SaslGssapiSecurityScheme.json index f3ef3f35..eb65dcc8 100644 --- a/definitions/3.0.0/SaslGssapiSecurityScheme.json +++ b/definitions/3.0.0/SaslGssapiSecurityScheme.json @@ -6,12 +6,14 @@ "properties": { "type": { "type": "string", + "description": "The type of the security scheme.", "enum": [ "gssapi" ] }, "description": { - "type": "string" + "type": "string", + "description": "A short description for security scheme." } }, "patternProperties": { @@ -19,6 +21,9 @@ "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" } }, + "example": { + "$ref": "http://asyncapi.com/examples/3.0.0/Sasl.json" + }, "additionalProperties": false, "$schema": "http://json-schema.org/draft-07/schema#", "$id": "http://asyncapi.com/definitions/3.0.0/SaslGssapiSecurityScheme.json" diff --git a/definitions/3.0.0/SaslPlainSecurityScheme.json b/definitions/3.0.0/SaslPlainSecurityScheme.json index 6de1b832..e461874f 100644 --- a/definitions/3.0.0/SaslPlainSecurityScheme.json +++ b/definitions/3.0.0/SaslPlainSecurityScheme.json @@ -6,12 +6,14 @@ "properties": { "type": { "type": "string", + "description": "The type of the security scheme. Valid values", "enum": [ "plain" ] }, "description": { - "type": "string" + "type": "string", + "description": "A short description for security scheme." } }, "patternProperties": { @@ -19,7 +21,10 @@ "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" } }, + "example": { + "$ref": "http://asyncapi.com/examples/3.0.0/Sasl.json" + }, "additionalProperties": false, "$schema": "http://json-schema.org/draft-07/schema#", "$id": "http://asyncapi.com/definitions/3.0.0/SaslPlainSecurityScheme.json" -} \ No newline at end of file +} diff --git a/definitions/3.0.0/SaslScramSecurityScheme.json b/definitions/3.0.0/SaslScramSecurityScheme.json index b7b9fc36..6d1f850b 100644 --- a/definitions/3.0.0/SaslScramSecurityScheme.json +++ b/definitions/3.0.0/SaslScramSecurityScheme.json @@ -6,13 +6,15 @@ "properties": { "type": { "type": "string", + "description": "The type of the security scheme.", "enum": [ "scramSha256", "scramSha512" ] }, "description": { - "type": "string" + "type": "string", + "description": "A short description for security scheme." } }, "patternProperties": { @@ -20,7 +22,10 @@ "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" } }, + "example": { + "$ref": "http://asyncapi.com/examples/3.0.0/Sasl.json" + }, "additionalProperties": false, "$schema": "http://json-schema.org/draft-07/schema#", "$id": "http://asyncapi.com/definitions/3.0.0/SaslScramSecurityScheme.json" -} \ No newline at end of file +} diff --git a/definitions/3.0.0/SecurityScheme.json b/definitions/3.0.0/SecurityScheme.json index ee6b9f70..83573217 100644 --- a/definitions/3.0.0/SecurityScheme.json +++ b/definitions/3.0.0/SecurityScheme.json @@ -1,4 +1,5 @@ { + "description": "Defines a security scheme that can be used by the operations.", "oneOf": [ { "$ref": "http://asyncapi.com/definitions/3.0.0/userPassword.json" @@ -28,6 +29,9 @@ "$ref": "http://asyncapi.com/definitions/3.0.0/SaslSecurityScheme.json" } ], + "example": { + "$ref": "http://asyncapi.com/examples/3.0.0/SecurityScheme.json" + }, "$schema": "http://json-schema.org/draft-07/schema#", "$id": "http://asyncapi.com/definitions/3.0.0/SecurityScheme.json" } \ No newline at end of file diff --git a/definitions/3.0.0/X509.json b/definitions/3.0.0/X509.json index 059a1ca0..004db984 100644 --- a/definitions/3.0.0/X509.json +++ b/definitions/3.0.0/X509.json @@ -19,7 +19,10 @@ "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" } }, + "example": { + "$ref": "http://asyncapi.com/examples/3.0.0/X509.json" + }, "additionalProperties": false, "$schema": "http://json-schema.org/draft-07/schema#", "$id": "http://asyncapi.com/definitions/3.0.0/X509.json" -} \ No newline at end of file +} diff --git a/definitions/3.0.0/anySchema.json b/definitions/3.0.0/anySchema.json index e8e2cb7f..4a0bf239 100644 --- a/definitions/3.0.0/anySchema.json +++ b/definitions/3.0.0/anySchema.json @@ -1,16 +1,16 @@ { - "if": { - "required": [ - "schema" - ] - }, - "then": { - "$ref": "http://asyncapi.com/definitions/3.0.0/multiFormatSchema.json" - }, - "else": { - "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" - }, - "description": "An object representing either a schema or a multiFormatSchema based on the existence of the 'schema' property. If the property 'schema' is present, use the multi-format schema. Use the default AsyncAPI Schema otherwise.", - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "http://asyncapi.com/definitions/3.0.0/anySchema.json" -} \ No newline at end of file + "if": { + "required": [ + "schema" + ] + }, + "then": { + "$ref": "http://asyncapi.com/definitions/3.0.0/multiFormatSchema.json" + }, + "else": { + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" + }, + "description": "An object representing either a schema or a multiFormatSchema based on the existence of the 'schema' property. If the property 'schema' is present, use the multi-format schema. Use the default AsyncAPI Schema otherwise.", + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/3.0.0/anySchema.json" +} diff --git a/definitions/3.0.0/apiKey.json b/definitions/3.0.0/apiKey.json index dd4b8af8..daec7eaf 100644 --- a/definitions/3.0.0/apiKey.json +++ b/definitions/3.0.0/apiKey.json @@ -7,19 +7,22 @@ "properties": { "type": { "type": "string", + "description": "The type of the security scheme", "enum": [ "apiKey" ] }, "in": { "type": "string", + "description": " The location of the API key.", "enum": [ "user", "password" ] }, "description": { - "type": "string" + "type": "string", + "description": "A short description for security scheme. CommonMark syntax MAY be used for rich text representation." } }, "patternProperties": { @@ -27,7 +30,10 @@ "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" } }, + "example": { + "$ref": "http://asyncapi.com/examples/3.0.0/apiKey.json" + }, "additionalProperties": false, "$schema": "http://json-schema.org/draft-07/schema#", "$id": "http://asyncapi.com/definitions/3.0.0/apiKey.json" -} \ No newline at end of file +} diff --git a/definitions/3.0.0/asymmetricEncryption.json b/definitions/3.0.0/asymmetricEncryption.json index 58ef8eb1..b52c5dff 100644 --- a/definitions/3.0.0/asymmetricEncryption.json +++ b/definitions/3.0.0/asymmetricEncryption.json @@ -6,12 +6,14 @@ "properties": { "type": { "type": "string", + "description": "The type of the security scheme.", "enum": [ "asymmetricEncryption" ] }, "description": { - "type": "string" + "type": "string", + "description": "A short description for security scheme." } }, "patternProperties": { diff --git a/definitions/3.0.0/asyncapi.json b/definitions/3.0.0/asyncapi.json index 18a6c39d..0af21643 100644 --- a/definitions/3.0.0/asyncapi.json +++ b/definitions/3.0.0/asyncapi.json @@ -31,7 +31,8 @@ "$ref": "http://asyncapi.com/definitions/3.0.0/servers.json" }, "defaultContentType": { - "type": "string" + "type": "string", + "description": "Default content type to use when encoding/decoding a message's payload." }, "channels": { "$ref": "http://asyncapi.com/definitions/3.0.0/channels.json" diff --git a/definitions/3.0.0/channel.json b/definitions/3.0.0/channel.json index b42c9ae7..35567b6d 100644 --- a/definitions/3.0.0/channel.json +++ b/definitions/3.0.0/channel.json @@ -1,5 +1,6 @@ { "type": "object", + "description": "Describes a shared communication channel.", "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { @@ -39,26 +40,27 @@ }, "tags": { "type": "array", + "description": "A list of tags for logical grouping of channels.", "items": { "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" - }, - { - "$ref": "http://asyncapi.com/definitions/3.0.0/tag.json" - } - ] + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/tag.json" + } + ] }, "uniqueItems": true }, "externalDocs": { "oneOf": [ { - "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" - }, - { - "$ref": "http://asyncapi.com/definitions/3.0.0/externalDocs.json" - } + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/externalDocs.json" + } ] }, "bindings": { @@ -72,6 +74,9 @@ ] } }, + "example": { + "$ref": "http://asyncapi.com/examples/3.0.0/channel.json" + }, "$schema": "http://json-schema.org/draft-07/schema#", "$id": "http://asyncapi.com/definitions/3.0.0/channel.json" -} \ No newline at end of file +} diff --git a/definitions/3.0.0/channelBindingsObject.json b/definitions/3.0.0/channelBindingsObject.json index 21ba2f2c..5c5e737f 100644 --- a/definitions/3.0.0/channelBindingsObject.json +++ b/definitions/3.0.0/channelBindingsObject.json @@ -1,5 +1,6 @@ { "type": "object", + "description": "Map describing protocol-specific definitions for a channel.", "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { diff --git a/definitions/3.0.0/channels.json b/definitions/3.0.0/channels.json index a4f4e89d..4169cfc3 100644 --- a/definitions/3.0.0/channels.json +++ b/definitions/3.0.0/channels.json @@ -1,15 +1,19 @@ { "type": "object", + "description": "An object containing all the Channel Object definitions the Application MUST use during runtime.", "additionalProperties": { "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" }, - { - "$ref": "http://asyncapi.com/definitions/3.0.0/channel.json" + { + "$ref": "http://asyncapi.com/definitions/3.0.0/channel.json" } ] }, + "example": { + "$ref": "http://asyncapi.com/examples/3.0.0/channels.json" + }, "$schema": "http://json-schema.org/draft-07/schema#", "$id": "http://asyncapi.com/definitions/3.0.0/channels.json" -} \ No newline at end of file +} diff --git a/definitions/3.0.0/components.json b/definitions/3.0.0/components.json index 537c49bd..2d7b5e2f 100644 --- a/definitions/3.0.0/components.json +++ b/definitions/3.0.0/components.json @@ -1,6 +1,6 @@ { "type": "object", - "description": "An object to hold a set of reusable objects for different aspects of the AsyncAPI Specification.", + "description": "An object to hold a set of reusable objects for different aspects of the AsyncAPI specification. All objects defined within the components object will have no effect on the API unless they are explicitly referenced from properties outside the components object.", "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { @@ -10,6 +10,7 @@ "properties": { "schemas": { "type": "object", + "description": "An object to hold reusable Schema Object. If this is a Schema Object, then the schemaFormat will be assumed to be 'application/vnd.aai.asyncapi+json;version=asyncapi' where the version is equal to the AsyncAPI Version String.", "patternProperties": { "^[\\w\\d\\.\\-_]+$": { "oneOf": [ @@ -25,6 +26,7 @@ }, "servers": { "type": "object", + "description": "An object to hold reusable Server Objects.", "patternProperties": { "^[\\w\\d\\.\\-_]+$": { "oneOf": [ @@ -40,6 +42,7 @@ }, "channels": { "type": "object", + "description": "An object to hold reusable Channel Objects.", "patternProperties": { "^[\\w\\d\\.\\-_]+$": { "oneOf": [ @@ -55,6 +58,7 @@ }, "serverVariables": { "type": "object", + "description": "An object to hold reusable Server Variable Objects.", "patternProperties": { "^[\\w\\d\\.\\-_]+$": { "oneOf": [ @@ -85,6 +89,7 @@ }, "messages": { "type": "object", + "description": "An object to hold reusable Message Objects.", "patternProperties": { "^[\\w\\d\\.\\-_]+$": { "oneOf": [ @@ -100,6 +105,7 @@ }, "securitySchemes": { "type": "object", + "description": "An object to hold reusable Security Scheme Objects.", "patternProperties": { "^[\\w\\d\\.\\-_]+$": { "oneOf": [ @@ -115,6 +121,7 @@ }, "parameters": { "type": "object", + "description": "An object to hold reusable Parameter Objects.", "patternProperties": { "^[\\w\\d\\.\\-_]+$": { "oneOf": [ @@ -130,6 +137,7 @@ }, "correlationIds": { "type": "object", + "description": "An object to hold reusable Correlation ID Objects.", "patternProperties": { "^[\\w\\d\\.\\-_]+$": { "oneOf": [ @@ -145,6 +153,7 @@ }, "operationTraits": { "type": "object", + "description": "An object to hold reusable Operation Trait Objects.", "patternProperties": { "^[\\w\\d\\.\\-_]+$": { "oneOf": [ @@ -160,6 +169,7 @@ }, "messageTraits": { "type": "object", + "description": "An object to hold reusable Message Trait Objects.", "patternProperties": { "^[\\w\\d\\.\\-_]+$": { "oneOf": [ @@ -175,6 +185,7 @@ }, "replies": { "type": "object", + "description": "An object to hold reusable Operation Reply Objects.", "patternProperties": { "^[\\w\\d\\.\\-_]+$": { "oneOf": [ @@ -190,6 +201,7 @@ }, "replyAddresses": { "type": "object", + "description": "An object to hold reusable Operation Reply Address Objects.", "patternProperties": { "^[\\w\\d\\.\\-_]+$": { "oneOf": [ @@ -205,6 +217,7 @@ }, "serverBindings": { "type": "object", + "description": "An object to hold reusable Server Bindings Objects.", "patternProperties": { "^[\\w\\d\\.\\-_]+$": { "oneOf": [ @@ -220,6 +233,7 @@ }, "channelBindings": { "type": "object", + "description": "An object to hold reusable Channel Bindings Objects.", "patternProperties": { "^[\\w\\d\\.\\-_]+$": { "oneOf": [ @@ -235,6 +249,7 @@ }, "operationBindings": { "type": "object", + "description": "An object to hold reusable Operation Bindings Objects.", "patternProperties": { "^[\\w\\d\\.\\-_]+$": { "oneOf": [ @@ -250,6 +265,7 @@ }, "messageBindings": { "type": "object", + "description": "An object to hold reusable Message Bindings Objects.", "patternProperties": { "^[\\w\\d\\.\\-_]+$": { "oneOf": [ @@ -265,6 +281,7 @@ }, "tags": { "type": "object", + "description": "An object to hold reusable Tag Objects.", "patternProperties": { "^[\\w\\d\\.\\-_]+$": { "oneOf": [ @@ -280,6 +297,7 @@ }, "externalDocs": { "type": "object", + "description": "An object to hold reusable External Documentation Objects.", "patternProperties": { "^[\\w\\d\\.\\-_]+$": { "oneOf": [ @@ -294,6 +312,9 @@ } } }, + "example": { + "$ref": "http://asyncapi.com/examples/3.0.0/components.json" + }, "$schema": "http://json-schema.org/draft-07/schema#", "$id": "http://asyncapi.com/definitions/3.0.0/components.json" } diff --git a/definitions/3.0.0/contact.json b/definitions/3.0.0/contact.json index ec226020..5356d4e2 100644 --- a/definitions/3.0.0/contact.json +++ b/definitions/3.0.0/contact.json @@ -1,6 +1,6 @@ { "type": "object", - "description": "Contact information for the owners of the API.", + "description": "Contact information for the exposed API.", "additionalProperties": false, "properties": { "name": { @@ -23,6 +23,9 @@ "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" } }, + "example": { + "$ref": "http://asyncapi.com/examples/3.0.0/contact.json" + }, "$schema": "http://json-schema.org/draft-07/schema#", "$id": "http://asyncapi.com/definitions/3.0.0/contact.json" -} \ No newline at end of file +} diff --git a/definitions/3.0.0/correlationId.json b/definitions/3.0.0/correlationId.json index 03d0a514..18aa99a2 100644 --- a/definitions/3.0.0/correlationId.json +++ b/definitions/3.0.0/correlationId.json @@ -1,5 +1,6 @@ { "type": "object", + "description": "An object that specifies an identifier at design time that can used for message tracing and correlation.", "required": [ "location" ], @@ -20,6 +21,9 @@ "pattern": "^\\$message\\.(header|payload)#(\\/(([^\\/~])|(~[01]))*)*" } }, + "example": { + "$ref": "http://asyncapi.com/examples/3.0.0/correlationId.json" + }, "$schema": "http://json-schema.org/draft-07/schema#", "$id": "http://asyncapi.com/definitions/3.0.0/correlationId.json" -} \ No newline at end of file +} diff --git a/definitions/3.0.0/externalDocs.json b/definitions/3.0.0/externalDocs.json index 0a20754f..3ab83718 100644 --- a/definitions/3.0.0/externalDocs.json +++ b/definitions/3.0.0/externalDocs.json @@ -1,16 +1,18 @@ { "type": "object", "additionalProperties": false, - "description": "information about external documentation", + "description": "Allows referencing an external resource for extended documentation.", "required": [ "url" ], "properties": { "description": { - "type": "string" + "type": "string", + "description": "A short description of the target documentation. CommonMark syntax can be used for rich text representation." }, "url": { "type": "string", + "description": "The URL for the target documentation. This MUST be in the form of an absolute URL.", "format": "uri" } }, @@ -19,6 +21,9 @@ "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" } }, + "example": { + "$ref": "http://asyncapi.com/examples/3.0.0/externalDocs.json" + }, "$schema": "http://json-schema.org/draft-07/schema#", "$id": "http://asyncapi.com/definitions/3.0.0/externalDocs.json" -} \ No newline at end of file +} diff --git a/definitions/3.0.0/info.json b/definitions/3.0.0/info.json index bf8c1491..6c9b70fa 100644 --- a/definitions/3.0.0/info.json +++ b/definitions/3.0.0/info.json @@ -1,6 +1,6 @@ { "type": "object", - "description": "General information about the API.", + "description": "The object provides metadata about the API. The metadata can be used by the clients if needed.", "required": [ "version", "title" @@ -37,6 +37,7 @@ }, "tags": { "type": "array", + "description": "A list of tags for application API documentation control. Tags can be used for logical grouping of applications.", "items": { "oneOf": [ { @@ -60,6 +61,9 @@ ] } }, + "example": { + "$ref": "http://asyncapi.com/examples/3.0.0/info.json" + }, "$schema": "http://json-schema.org/draft-07/schema#", "$id": "http://asyncapi.com/definitions/3.0.0/info.json" } \ No newline at end of file diff --git a/definitions/3.0.0/license.json b/definitions/3.0.0/license.json index 391692c9..06a5518e 100644 --- a/definitions/3.0.0/license.json +++ b/definitions/3.0.0/license.json @@ -1,8 +1,6 @@ { "type": "object", - "required": [ - "name" - ], + "required": ["name"], "additionalProperties": false, "properties": { "name": { @@ -17,9 +15,12 @@ }, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" } }, + "example": { + "$ref": "http://asyncapi.com/examples/3.0.0/license.json" + }, "$schema": "http://json-schema.org/draft-07/schema#", "$id": "http://asyncapi.com/definitions/3.0.0/license.json" -} \ No newline at end of file +} diff --git a/definitions/3.0.0/messageBindingsObject.json b/definitions/3.0.0/messageBindingsObject.json index cfe65074..abfe27bd 100644 --- a/definitions/3.0.0/messageBindingsObject.json +++ b/definitions/3.0.0/messageBindingsObject.json @@ -1,5 +1,6 @@ { "type": "object", + "description": "Map describing protocol-specific definitions for a message.", "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { diff --git a/definitions/3.0.0/messageObject.json b/definitions/3.0.0/messageObject.json index f3de84ef..3c35a299 100644 --- a/definitions/3.0.0/messageObject.json +++ b/definitions/3.0.0/messageObject.json @@ -1,5 +1,6 @@ { "type": "object", + "description": "Describes a message received on a given channel and operation.", "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { @@ -8,7 +9,8 @@ }, "properties": { "contentType": { - "type": "string" + "type": "string", + "description": "The content type to use when encoding/decoding a message's payload. The value MUST be a specific media type (e.g. application/json). When omitted, the value MUST be the one specified on the defaultContentType field." }, "headers": { "$ref": "http://asyncapi.com/definitions/3.0.0/anySchema.json" @@ -72,6 +74,7 @@ }, "examples": { "type": "array", + "description": "List of examples.", "items": { "type": "object", "additionalProperties": false, @@ -118,6 +121,7 @@ }, "traits": { "type": "array", + "description": "A list of traits to apply to the message object. Traits MUST be merged using traits merge mechanism. The resulting object MUST be a valid Message Object.", "items": { "oneOf": [ { @@ -149,6 +153,9 @@ } } }, + "example": { + "$ref": "http://asyncapi.com/examples/3.0.0/messageObject.json" + }, "$schema": "http://json-schema.org/draft-07/schema#", "$id": "http://asyncapi.com/definitions/3.0.0/messageObject.json" -} \ No newline at end of file +} diff --git a/definitions/3.0.0/messageTrait.json b/definitions/3.0.0/messageTrait.json index e3aeae2f..587d140b 100644 --- a/definitions/3.0.0/messageTrait.json +++ b/definitions/3.0.0/messageTrait.json @@ -1,5 +1,6 @@ { "type": "object", + "description": "Describes a trait that MAY be applied to a Message Object. This object MAY contain any property from the Message Object, except payload and traits.", "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { @@ -8,7 +9,8 @@ }, "properties": { "contentType": { - "type": "string" + "type": "string", + "description": "The content type to use when encoding/decoding a message's payload. The value MUST be a specific media type (e.g. application/json). When omitted, the value MUST be the one specified on the defaultContentType field." }, "headers": { "$ref": "http://asyncapi.com/definitions/3.0.0/anySchema.json" @@ -69,6 +71,7 @@ }, "examples": { "type": "array", + "description": "List of examples.", "items": { "type": "object" } @@ -84,6 +87,9 @@ ] } }, + "example": { + "$ref": "http://asyncapi.com/examples/3.0.0/messageTrait.json" + }, "$schema": "http://json-schema.org/draft-07/schema#", "$id": "http://asyncapi.com/definitions/3.0.0/messageTrait.json" -} \ No newline at end of file +} diff --git a/definitions/3.0.0/multiFormatSchema.json b/definitions/3.0.0/multiFormatSchema.json index fa993a10..d4047bb0 100644 --- a/definitions/3.0.0/multiFormatSchema.json +++ b/definitions/3.0.0/multiFormatSchema.json @@ -1,4 +1,5 @@ { + "description": "The Multi Format Schema Object represents a schema definition. It differs from the Schema Object in that it supports multiple schema formats or languages (e.g., JSON Schema, Avro, etc.).", "if": { "not": { "type": "object" @@ -17,6 +18,7 @@ }, "properties": { "schemaFormat": { + "description": "A string containing the name of the schema format that is used to define the information. If schemaFormat is missing, it MUST default to application/vnd.aai.asyncapi+json;version={{asyncapi}} where {{asyncapi}} matches the AsyncAPI Version String. In such a case, this would make the Multi Format Schema Object equivalent to the Schema Object. When using Reference Object within the schema, the schemaFormat of the resource being referenced MUST match the schemaFormat of the schema that contains the initial reference. For example, if you reference Avro schema, then schemaFormat of referencing resource and the resource being reference MUST match.", "anyOf": [ { "type": "string" @@ -48,7 +50,9 @@ } ] }, - "schema": {} + "schema": { + "description": "Definition of the message payload. It can be of any type but defaults to Schema Object. It MUST match the schema format defined in schemaFormat, including the encoding type. E.g., Avro should be inlined as either a YAML or JSON object instead of as a string to be parsed as YAML or JSON. Non-JSON-based schemas (e.g., Protobuf or XSD) MUST be inlined as a string." + } }, "allOf": [ { diff --git a/definitions/3.0.0/oauth2Flow.json b/definitions/3.0.0/oauth2Flow.json index d3ca471b..ef1e7c95 100644 --- a/definitions/3.0.0/oauth2Flow.json +++ b/definitions/3.0.0/oauth2Flow.json @@ -1,20 +1,25 @@ { "type": "object", + "description": "Configuration details for a supported OAuth Flow", "properties": { "authorizationUrl": { "type": "string", - "format": "uri" + "format": "uri", + "description": "The authorization URL to be used for this flow. This MUST be in the form of an absolute URL." }, "tokenUrl": { "type": "string", - "format": "uri" + "format": "uri", + "description": "The token URL to be used for this flow. This MUST be in the form of an absolute URL." }, "refreshUrl": { "type": "string", - "format": "uri" + "format": "uri", + "description": "The URL to be used for obtaining refresh tokens. This MUST be in the form of an absolute URL." }, "availableScopes": { - "$ref": "http://asyncapi.com/definitions/3.0.0/oauth2Scopes.json" + "$ref": "http://asyncapi.com/definitions/3.0.0/oauth2Scopes.json", + "description": "The available scopes for the OAuth2 security scheme. A map between the scope name and a short description for it." } }, "patternProperties": { @@ -22,7 +27,10 @@ "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" } }, + "example": { + "$ref": "http://asyncapi.com/examples/3.0.0/oauth2Flow.json" + }, "additionalProperties": false, "$schema": "http://json-schema.org/draft-07/schema#", "$id": "http://asyncapi.com/definitions/3.0.0/oauth2Flow.json" -} \ No newline at end of file +} diff --git a/definitions/3.0.0/oauth2Flows.json b/definitions/3.0.0/oauth2Flows.json index 735806c8..3cb9cecf 100644 --- a/definitions/3.0.0/oauth2Flows.json +++ b/definitions/3.0.0/oauth2Flows.json @@ -1,5 +1,6 @@ { "type": "object", + "description": "Allows configuration of the supported OAuth Flows.", "required": [ "type", "flows" @@ -7,17 +8,20 @@ "properties": { "type": { "type": "string", + "description": "The type of the security scheme.", "enum": [ "oauth2" ] }, "description": { - "type": "string" + "type": "string", + "description": "A short description for security scheme." }, "flows": { "type": "object", "properties": { "implicit": { + "description": "Configuration for the OAuth Implicit flow.", "allOf": [ { "$ref": "http://asyncapi.com/definitions/3.0.0/oauth2Flow.json" @@ -38,6 +42,7 @@ ] }, "password": { + "description": "Configuration for the OAuth Resource Owner Protected Credentials flow.", "allOf": [ { "$ref": "http://asyncapi.com/definitions/3.0.0/oauth2Flow.json" @@ -58,6 +63,7 @@ ] }, "clientCredentials": { + "description": "Configuration for the OAuth Client Credentials flow.", "allOf": [ { "$ref": "http://asyncapi.com/definitions/3.0.0/oauth2Flow.json" @@ -78,6 +84,7 @@ ] }, "authorizationCode": { + "description": "Configuration for the OAuth Authorization Code flow.", "allOf": [ { "$ref": "http://asyncapi.com/definitions/3.0.0/oauth2Flow.json" @@ -109,4 +116,4 @@ }, "$schema": "http://json-schema.org/draft-07/schema#", "$id": "http://asyncapi.com/definitions/3.0.0/oauth2Flows.json" -} \ No newline at end of file +} diff --git a/definitions/3.0.0/openIdConnect.json b/definitions/3.0.0/openIdConnect.json index 2150ba4d..41b65f5d 100644 --- a/definitions/3.0.0/openIdConnect.json +++ b/definitions/3.0.0/openIdConnect.json @@ -7,20 +7,23 @@ "properties": { "type": { "type": "string", + "description": "The type of the security scheme.", "enum": [ "openIdConnect" ] }, "description": { - "type": "string" + "type": "string", + "description": "A short description for security scheme. CommonMark syntax MAY be used for rich text representation." }, "openIdConnectUrl": { "type": "string", - "format": "uri" + "format": "uri", + "description": "OpenId Connect URL to discover OAuth2 configuration values. This MUST be in the form of an absolute URL." }, "scopes": { "type": "array", - "description": "List of the needed scope names.", + "description": "List of the needed scope names. An empty array means no scopes are needed.", "items": { "type": "string" } diff --git a/definitions/3.0.0/operation.json b/definitions/3.0.0/operation.json index 2ef195a3..529cfbc5 100644 --- a/definitions/3.0.0/operation.json +++ b/definitions/3.0.0/operation.json @@ -1,5 +1,6 @@ { "type": "object", + "description": "Describes a specific operation.", "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { @@ -21,6 +22,7 @@ }, "messages": { "type": "array", + "description": "A list of $ref pointers pointing to the supported Message Objects that can be processed by this operation. It MUST contain a subset of the messages defined in the channel referenced in this operation. Every message processed by this operation MUST be valid against one, and only one, of the message objects referenced in this list. Please note the messages property value MUST be a list of Reference Objects and, therefore, MUST NOT contain Message Objects. However, it is RECOMMENDED that parsers (or other software) dereference this property for a better development experience.", "items": { "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" } @@ -37,6 +39,7 @@ }, "traits": { "type": "array", + "description": "A list of traits to apply to the operation object. Traits MUST be merged using traits merge mechanism. The resulting object MUST be a valid Operation Object.", "items": { "oneOf": [ { @@ -65,6 +68,7 @@ }, "tags": { "type": "array", + "description": "A list of tags for logical grouping and categorization of operations.", "items": { "oneOf": [ { @@ -98,6 +102,9 @@ ] } }, + "example": { + "$ref": "http://asyncapi.com/examples/3.0.0/operation.json" + }, "$schema": "http://json-schema.org/draft-07/schema#", "$id": "http://asyncapi.com/definitions/3.0.0/operation.json" -} \ No newline at end of file +} diff --git a/definitions/3.0.0/operationBindingsObject.json b/definitions/3.0.0/operationBindingsObject.json index 8f629437..32f50c75 100644 --- a/definitions/3.0.0/operationBindingsObject.json +++ b/definitions/3.0.0/operationBindingsObject.json @@ -1,5 +1,6 @@ { "type": "object", + "description": "Map describing protocol-specific definitions for an operation.", "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { diff --git a/definitions/3.0.0/operationReply.json b/definitions/3.0.0/operationReply.json index 2cf7c0e9..fe1491d9 100644 --- a/definitions/3.0.0/operationReply.json +++ b/definitions/3.0.0/operationReply.json @@ -1,5 +1,6 @@ { "type": "object", + "description": "Describes the reply part that MAY be applied to an Operation Object. If an operation implements the request/reply pattern, the reply object represents the response message.", "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { @@ -22,6 +23,7 @@ }, "messages": { "type": "array", + "description": "A list of $ref pointers pointing to the supported Message Objects that can be processed by this operation as reply. It MUST contain a subset of the messages defined in the channel referenced in this operation reply. Every message processed by this operation MUST be valid against one, and only one, of the message objects referenced in this list. Please note the messages property value MUST be a list of Reference Objects and, therefore, MUST NOT contain Message Objects. However, it is RECOMMENDED that parsers (or other software) dereference this property for a better development experience.", "items": { "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" } diff --git a/definitions/3.0.0/operationReplyAddress.json b/definitions/3.0.0/operationReplyAddress.json index dd7d0e2c..ba29ea12 100644 --- a/definitions/3.0.0/operationReplyAddress.json +++ b/definitions/3.0.0/operationReplyAddress.json @@ -1,5 +1,6 @@ { "type": "object", + "description": "An object that specifies where an operation has to send the reply", "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { @@ -20,6 +21,9 @@ "description": "An optional description of the address. CommonMark is allowed." } }, + "example": { + "$ref": "http://asyncapi.com/examples/3.0.0/operationReplyAddress.json" + }, "$schema": "http://json-schema.org/draft-07/schema#", "$id": "http://asyncapi.com/definitions/3.0.0/operationReplyAddress.json" -} \ No newline at end of file +} diff --git a/definitions/3.0.0/operationTrait.json b/definitions/3.0.0/operationTrait.json index 2a31835f..b646001f 100644 --- a/definitions/3.0.0/operationTrait.json +++ b/definitions/3.0.0/operationTrait.json @@ -1,5 +1,6 @@ -{ +{ "type": "object", + "description": "Describes a trait that MAY be applied to an Operation Object. This object MAY contain any property from the Operation Object, except the action, channel and traits ones.", "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { @@ -8,24 +9,31 @@ }, "properties": { "title": { + "description": "A human-friendly title for the operation.", "$ref": "http://asyncapi.com/definitions/3.0.0/operation.json#/properties/title" }, "summary": { + "description": "A short summary of what the operation is about.", "$ref": "http://asyncapi.com/definitions/3.0.0/operation.json#/properties/summary" }, "description": { + "description": "A verbose explanation of the operation. CommonMark syntax can be used for rich text representation.", "$ref": "http://asyncapi.com/definitions/3.0.0/operation.json#/properties/description" }, "security": { + "description": "A declaration of which security schemes are associated with this operation. Only one of the security scheme objects MUST be satisfied to authorize an operation. In cases where Server Security also applies, it MUST also be satisfied.", "$ref": "http://asyncapi.com/definitions/3.0.0/operation.json#/properties/security" }, "tags": { + "description": "A list of tags for logical grouping and categorization of operations.", "$ref": "http://asyncapi.com/definitions/3.0.0/operation.json#/properties/tags" }, "externalDocs": { + "description": "Additional external documentation for this operation.", "$ref": "http://asyncapi.com/definitions/3.0.0/operation.json#/properties/externalDocs" }, "bindings": { + "description": "A map where the keys describe the name of the protocol and the values describe protocol-specific definitions for the operation.", "oneOf": [ { "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" @@ -36,6 +44,9 @@ ] } }, + "example": { + "$ref": "http://asyncapi.com/examples/3.0.0/operationTrait.json" + }, "$schema": "http://json-schema.org/draft-07/schema#", "$id": "http://asyncapi.com/definitions/3.0.0/operationTrait.json" -} \ No newline at end of file +} diff --git a/definitions/3.0.0/operations.json b/definitions/3.0.0/operations.json index 7d44877f..7ca51c39 100644 --- a/definitions/3.0.0/operations.json +++ b/definitions/3.0.0/operations.json @@ -1,5 +1,6 @@ { "type": "object", + "description": "Holds a dictionary with all the operations this application MUST implement.", "additionalProperties": { "oneOf": [ { @@ -10,6 +11,9 @@ } ] }, + "example": { + "$ref": "http://asyncapi.com/examples/3.0.0/operations.json" + }, "$schema": "http://json-schema.org/draft-07/schema#", "$id": "http://asyncapi.com/definitions/3.0.0/operations.json" -} \ No newline at end of file +} diff --git a/definitions/3.0.0/parameter.json b/definitions/3.0.0/parameter.json index f483a9c9..996b6817 100644 --- a/definitions/3.0.0/parameter.json +++ b/definitions/3.0.0/parameter.json @@ -1,4 +1,5 @@ { + "description": "Describes a parameter included in a channel address.", "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { @@ -11,18 +12,18 @@ "description": "A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed." }, "enum": { - "description": "A list of allowed values for the parameter.", + "description": "An enumeration of string values to be used if the substitution options are from a limited set.", "type": "array", "items": { "type": "string" } }, "default": { - "description": "The default value to use for the parameter.", + "description": "The default value to use for substitution, and to send, if an alternate value is not supplied.", "type": "string" }, "examples": { - "description": "List of example values to use for the parameter.", + "description": "An array of examples of the parameter value.", "type": "array", "items": { "type": "string" @@ -34,6 +35,9 @@ "pattern": "^\\$message\\.(header|payload)#(\\/(([^\\/~])|(~[01]))*)*" } }, + "example": { + "$ref": "http://asyncapi.com/examples/3.0.0/parameter.json" + }, "$schema": "http://json-schema.org/draft-07/schema#", "$id": "http://asyncapi.com/definitions/3.0.0/parameter.json" -} \ No newline at end of file +} diff --git a/definitions/3.0.0/parameters.json b/definitions/3.0.0/parameters.json index 19193781..406e7a53 100644 --- a/definitions/3.0.0/parameters.json +++ b/definitions/3.0.0/parameters.json @@ -11,6 +11,9 @@ ] }, "description": "JSON objects describing re-usable channel parameters.", + "example": { + "$ref": "http://asyncapi.com/examples/3.0.0/parameters.json" + }, "$schema": "http://json-schema.org/draft-07/schema#", "$id": "http://asyncapi.com/definitions/3.0.0/parameters.json" -} \ No newline at end of file +} diff --git a/definitions/3.0.0/schema.json b/definitions/3.0.0/schema.json index 7f08ab44..054bbc9b 100644 --- a/definitions/3.0.0/schema.json +++ b/definitions/3.0.0/schema.json @@ -1,4 +1,5 @@ { + "description": "The Schema Object allows the definition of input and output data types. These types can be objects, but also primitives and arrays. This object is a superset of the JSON Schema Specification Draft 07. The empty schema (which allows any instance to validate) MAY be represented by the boolean value true and a schema which allows no instance to validate MAY be represented by the boolean value false.", "allOf": [ { "$ref": "http://json-schema.org/draft-07/schema#" @@ -81,7 +82,8 @@ "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" }, "discriminator": { - "type": "string" + "type": "string", + "description": "Adds support for polymorphism. The discriminator is the schema property name that is used to differentiate between other schema that inherit this schema. The property name used MUST be defined at this schema and it MUST be in the required property list. When used, the value MUST be the name of this schema or any schema that inherits it. See Composition and Inheritance for more details." }, "externalDocs": { "oneOf": [ @@ -95,6 +97,7 @@ }, "deprecated": { "type": "boolean", + "description": "Specifies that a schema is deprecated and SHOULD be transitioned out of usage. Default value is false.", "default": false } } diff --git a/definitions/3.0.0/server.json b/definitions/3.0.0/server.json index c875979b..f51dc063 100644 --- a/definitions/3.0.0/server.json +++ b/definitions/3.0.0/server.json @@ -1,24 +1,21 @@ { "type": "object", - "description": "An object representing a Server.", - "required": [ - "host", - "protocol" - ], + "description": "An object representing a message broker, a server or any other kind of computer program capable of sending and/or receiving data.", + "required": ["host", "protocol"], "additionalProperties": false, - "patternProperties": { + "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" } }, - "properties": { + "properties": { "host": { "type": "string", - "description": "The server host name." + "description": "The server host name. It MAY include the port. This field supports Server Variables. Variable substitutions will be made when a variable is named in {braces}." }, "pathname": { "type": "string", - "description": "The path to a resource in the host." + "description": "The path to a resource in the host. This field supports Server Variables. Variable substitutions will be made when a variable is named in {braces}." }, "title": { "type": "string", @@ -34,10 +31,11 @@ }, "protocol": { "type": "string", - "description": "The transfer protocol." + "description": "The protocol this server supports for connection." }, "protocolVersion": { - "type": "string" + "type": "string", + "description": "An optional string describing the server. CommonMark syntax MAY be used for rich text representation." }, "variables": { "$ref": "http://asyncapi.com/definitions/3.0.0/serverVariables.json" @@ -49,24 +47,24 @@ "type": "array", "items": { "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" - }, - { - "$ref": "http://asyncapi.com/definitions/3.0.0/tag.json" - } - ] + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/tag.json" + } + ] }, "uniqueItems": true }, "externalDocs": { "oneOf": [ { - "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" - }, - { - "$ref": "http://asyncapi.com/definitions/3.0.0/externalDocs.json" - } + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/externalDocs.json" + } ] }, "bindings": { @@ -80,6 +78,9 @@ ] } }, + "example": { + "$ref": "http://asyncapi.com/examples/3.0.0/server.json" + }, "$schema": "http://json-schema.org/draft-07/schema#", "$id": "http://asyncapi.com/definitions/3.0.0/server.json" -} \ No newline at end of file +} diff --git a/definitions/3.0.0/serverBindingsObject.json b/definitions/3.0.0/serverBindingsObject.json index 5782a1c5..8eb72002 100644 --- a/definitions/3.0.0/serverBindingsObject.json +++ b/definitions/3.0.0/serverBindingsObject.json @@ -1,5 +1,6 @@ { "type": "object", + "description": "Map describing protocol-specific definitions for a server.", "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { diff --git a/definitions/3.0.0/serverVariable.json b/definitions/3.0.0/serverVariable.json index 9ef8f966..1bcc5090 100644 --- a/definitions/3.0.0/serverVariable.json +++ b/definitions/3.0.0/serverVariable.json @@ -10,24 +10,31 @@ "properties": { "enum": { "type": "array", + "description": "An enumeration of string values to be used if the substitution options are from a limited set.", "items": { "type": "string" }, - "uniqueItems": true + "uniqueItems": true }, - "default": { - "type": "string" - }, - "description": { - "type": "string" - }, - "examples": { - "type": "array", - "items": { - "type": "string" - } - } + "default": { + "type": "string", + "description": "The default value to use for substitution, and to send, if an alternate value is not supplied." + }, + "description": { + "type": "string", + "description": "An optional description for the server variable. CommonMark syntax MAY be used for rich text representation." + }, + "examples": { + "type": "array", + "description": "An array of examples of the server variable.", + "items": { + "type": "string" + } + } + }, + "example": { + "$ref": "http://asyncapi.com/examples/3.0.0/serverVariable.json" }, "$schema": "http://json-schema.org/draft-07/schema#", "$id": "http://asyncapi.com/definitions/3.0.0/serverVariable.json" -} \ No newline at end of file +} diff --git a/definitions/3.0.0/servers.json b/definitions/3.0.0/servers.json index 921b4ed4..9c6e9486 100644 --- a/definitions/3.0.0/servers.json +++ b/definitions/3.0.0/servers.json @@ -7,10 +7,13 @@ "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" }, { - "$ref": "http://asyncapi.com/definitions/3.0.0/server.json" + "$ref": "http://asyncapi.com/definitions/3.0.0/server.json" } ] }, + "example": { + "$ref": "http://asyncapi.com/examples/3.0.0/servers.json" + }, "$schema": "http://json-schema.org/draft-07/schema#", "$id": "http://asyncapi.com/definitions/3.0.0/servers.json" -} \ No newline at end of file +} diff --git a/definitions/3.0.0/symmetricEncryption.json b/definitions/3.0.0/symmetricEncryption.json index 4fb69278..5cc61ef2 100644 --- a/definitions/3.0.0/symmetricEncryption.json +++ b/definitions/3.0.0/symmetricEncryption.json @@ -19,7 +19,10 @@ "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" } }, + "example": { + "$ref": "http://asyncapi.com/examples/3.0.0/symmetricEncryption.json" + }, "additionalProperties": false, "$schema": "http://json-schema.org/draft-07/schema#", "$id": "http://asyncapi.com/definitions/3.0.0/symmetricEncryption.json" -} \ No newline at end of file +} diff --git a/definitions/3.0.0/tag.json b/definitions/3.0.0/tag.json index 135fd63b..2e5ab3ea 100644 --- a/definitions/3.0.0/tag.json +++ b/definitions/3.0.0/tag.json @@ -1,15 +1,18 @@ { "type": "object", + "description": "Allows adding metadata to a single tag.", "additionalProperties": false, "required": [ "name" ], "properties": { "name": { - "type": "string" + "type": "string", + "description": "The name of the tag." }, "description": { - "type": "string" + "type": "string", + "description": "A short description for the tag. CommonMark syntax can be used for rich text representation." }, "externalDocs": { "oneOf": [ @@ -27,6 +30,9 @@ "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" } }, + "example": { + "$ref": "http://asyncapi.com/examples/3.0.0/tag.json" + }, "$schema": "http://json-schema.org/draft-07/schema#", "$id": "http://asyncapi.com/definitions/3.0.0/tag.json" -} \ No newline at end of file +} diff --git a/definitions/3.0.0/userPassword.json b/definitions/3.0.0/userPassword.json index aeaa22d0..21a2b65a 100644 --- a/definitions/3.0.0/userPassword.json +++ b/definitions/3.0.0/userPassword.json @@ -19,7 +19,10 @@ "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" } }, + "example": { + "$ref": "http://asyncapi.com/examples/3.0.0/userPassword.json" + }, "additionalProperties": false, "$schema": "http://json-schema.org/draft-07/schema#", "$id": "http://asyncapi.com/definitions/3.0.0/userPassword.json" -} \ No newline at end of file +} diff --git a/examples/3.0.0/APIKeyHTTPSecurityScheme.json b/examples/3.0.0/APIKeyHTTPSecurityScheme.json new file mode 100644 index 00000000..e1bddc93 --- /dev/null +++ b/examples/3.0.0/APIKeyHTTPSecurityScheme.json @@ -0,0 +1,7 @@ +[ + { + "type": "httpApiKey", + "name": "api_key", + "in": "header" + } +] \ No newline at end of file diff --git a/examples/3.0.0/ReferenceObject.json b/examples/3.0.0/ReferenceObject.json new file mode 100644 index 00000000..1bc58e64 --- /dev/null +++ b/examples/3.0.0/ReferenceObject.json @@ -0,0 +1,3 @@ +[{ + "$ref": "#/components/schemas/Pet" +}] \ No newline at end of file diff --git a/examples/3.0.0/Sasl.json b/examples/3.0.0/Sasl.json new file mode 100644 index 00000000..85ea380b --- /dev/null +++ b/examples/3.0.0/Sasl.json @@ -0,0 +1,5 @@ +[ + { + "type": "scramSha512" + } +] \ No newline at end of file diff --git a/examples/3.0.0/SecurityScheme.json b/examples/3.0.0/SecurityScheme.json new file mode 100644 index 00000000..eb52bb8b --- /dev/null +++ b/examples/3.0.0/SecurityScheme.json @@ -0,0 +1,5 @@ +[ + { + "type": "userPassword" + } +] \ No newline at end of file diff --git a/examples/3.0.0/X509.json b/examples/3.0.0/X509.json new file mode 100644 index 00000000..690ba0a2 --- /dev/null +++ b/examples/3.0.0/X509.json @@ -0,0 +1,5 @@ +[ + { + "type": "X509" + } +] \ No newline at end of file diff --git a/examples/3.0.0/apiKey.json b/examples/3.0.0/apiKey.json new file mode 100644 index 00000000..5ae19cc0 --- /dev/null +++ b/examples/3.0.0/apiKey.json @@ -0,0 +1,6 @@ +[ + { + "type": "apiKey", + "in": "user" + } +] diff --git a/examples/3.0.0/channel.json b/examples/3.0.0/channel.json new file mode 100644 index 00000000..0fc0dab0 --- /dev/null +++ b/examples/3.0.0/channel.json @@ -0,0 +1,40 @@ +[{ + "address": "users.{userId}", + "title": "Users channel", + "description": "This channel is used to exchange messages about user events.", + "messages": { + "userSignedUp": { + "$ref": "#/components/messages/userSignedUp" + }, + "userCompletedOrder": { + "$ref": "#/components/messages/userCompletedOrder" + } + }, + "parameters": { + "userId": { + "$ref": "#/components/parameters/userId" + } + }, + "servers": [ + { "$ref": "#/servers/rabbitmqInProd" }, + { "$ref": "#/servers/rabbitmqInStaging" } + ], + "bindings": { + "amqp": { + "is": "queue", + "queue": { + "exclusive": true + } + } + }, + "tags": [ + { + "name": "user", + "description": "User-related messages" + } + ], + "externalDocs": { + "description": "Find more info here", + "url": "https://example.com" + } +}] \ No newline at end of file diff --git a/examples/3.0.0/channels.json b/examples/3.0.0/channels.json new file mode 100644 index 00000000..b9aeb6a6 --- /dev/null +++ b/examples/3.0.0/channels.json @@ -0,0 +1,12 @@ +[ + { + "userSignedUp": { + "address": "user.signedup", + "messages": { + "userSignedUp": { + "$ref": "#/components/messages/userSignedUp" + } + } + } + } +] diff --git a/examples/3.0.0/components.json b/examples/3.0.0/components.json new file mode 100644 index 00000000..c0331a88 --- /dev/null +++ b/examples/3.0.0/components.json @@ -0,0 +1,130 @@ +[{ + "components": { + "schemas": { + "Category": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int64" + }, + "name": { + "type": "string" + } + } + }, + "Tag": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int64" + }, + "name": { + "type": "string" + } + } + }, + "AvroExample": { + "schemaFormat": "application/vnd.apache.avro+json;version=1.9.0", + "schema": { + "$ref": "path/to/user-create.avsc#/UserCreate" + } + } + }, + "servers": { + "development": { + "host": "{stage}.in.mycompany.com:{port}", + "description": "RabbitMQ broker", + "protocol": "amqp", + "protocolVersion": "0-9-1", + "variables": { + "stage": { + "$ref": "#/components/serverVariables/stage" + }, + "port": { + "$ref": "#/components/serverVariables/port" + } + } + } + }, + "serverVariables": { + "stage": { + "default": "demo", + "description": "This value is assigned by the service provider, in this example `mycompany.com`" + }, + "port": { + "enum": ["5671", "5672"], + "default": "5672" + } + }, + "channels": { + "user/signedup": { + "subscribe": { + "message": { + "$ref": "#/components/messages/userSignUp" + } + } + } + }, + "messages": { + "userSignUp": { + "summary": "Action to sign a user up.", + "description": "Multiline description of what this action does.\nHere you have another line.\n", + "tags": [ + { + "name": "user" + }, + { + "name": "signup" + } + ], + "headers": { + "type": "object", + "properties": { + "applicationInstanceId": { + "description": "Unique identifier for a given instance of the publishing application", + "type": "string" + } + } + }, + "payload": { + "type": "object", + "properties": { + "user": { + "$ref": "#/components/schemas/userCreate" + }, + "signup": { + "$ref": "#/components/schemas/signup" + } + } + } + } + }, + "parameters": { + "userId": { + "description": "Id of the user." + } + }, + "correlationIds": { + "default": { + "description": "Default Correlation ID", + "location": "$message.header#/correlationId" + } + }, + "messageTraits": { + "commonHeaders": { + "headers": { + "type": "object", + "properties": { + "my-app-header": { + "type": "integer", + "minimum": 0, + "maximum": 100 + } + } + } + } + } + } +}] \ No newline at end of file diff --git a/examples/3.0.0/contact.json b/examples/3.0.0/contact.json new file mode 100644 index 00000000..1c81a963 --- /dev/null +++ b/examples/3.0.0/contact.json @@ -0,0 +1,8 @@ +[ + { + "name": "API Support", + "url": "https://www.example.com/support", + "email": "support@example.com" + } + +] \ No newline at end of file diff --git a/examples/3.0.0/correlationId.json b/examples/3.0.0/correlationId.json new file mode 100644 index 00000000..82d8a96e --- /dev/null +++ b/examples/3.0.0/correlationId.json @@ -0,0 +1,4 @@ +[{ + "description": "Default Correlation ID", + "location": "$message.header#/correlationId" +}] \ No newline at end of file diff --git a/examples/3.0.0/externalDocs.json b/examples/3.0.0/externalDocs.json new file mode 100644 index 00000000..18c3766a --- /dev/null +++ b/examples/3.0.0/externalDocs.json @@ -0,0 +1,4 @@ +[{ + "description": "Find more info here", + "url": "https://example.com" +}] \ No newline at end of file diff --git a/examples/3.0.0/info.json b/examples/3.0.0/info.json new file mode 100644 index 00000000..26bcdf95 --- /dev/null +++ b/examples/3.0.0/info.json @@ -0,0 +1,27 @@ +[ + { + "title": "AsyncAPI Sample App", + "version": "1.0.1", + "description": "This is a sample app.", + "termsOfService": "https://asyncapi.org/terms/", + "contact": { + "name": "API Support", + "url": "https://www.asyncapi.org/support", + "email": "support@asyncapi.org" + }, + "license": { + "name": "Apache 2.0", + "url": "https://www.apache.org/licenses/LICENSE-2.0.html" + }, + "externalDocs": { + "description": "Find more info here", + "url": "https://www.asyncapi.org" + }, + "tags": [ + { + "name": "e-commerce" + } + ] + } + +] \ No newline at end of file diff --git a/examples/3.0.0/license.json b/examples/3.0.0/license.json new file mode 100644 index 00000000..18becf4f --- /dev/null +++ b/examples/3.0.0/license.json @@ -0,0 +1,7 @@ +[ + { + "name": "Apache 2.0", + "url": "https://www.apache.org/licenses/LICENSE-2.0.html" + } + +] \ No newline at end of file diff --git a/examples/3.0.0/messageObject.json b/examples/3.0.0/messageObject.json new file mode 100644 index 00000000..9243d026 --- /dev/null +++ b/examples/3.0.0/messageObject.json @@ -0,0 +1,58 @@ +[ +{ + "messageId": "userSignup", + "name": "UserSignup", + "title": "User signup", + "summary": "Action to sign a user up.", + "description": "A longer description", + "contentType": "application/json", + "tags": [{ "name": "user" }, { "name": "signup" }, { "name": "register" }], + "headers": { + "type": "object", + "properties": { + "correlationId": { + "description": "Correlation ID set by application", + "type": "string" + }, + "applicationInstanceId": { + "description": "Unique identifier for a given instance of the publishing application", + "type": "string" + } + } + }, + "payload": { + "type": "object", + "properties": { + "user": { + "$ref": "#/components/schemas/userCreate" + }, + "signup": { + "$ref": "#/components/schemas/signup" + } + } + }, + "correlationId": { + "description": "Default Correlation ID", + "location": "$message.header#/correlationId" + }, + "traits": [{ "$ref": "#/components/messageTraits/commonHeaders" }], + "examples": [ + { + "name": "SimpleSignup", + "summary": "A simple UserSignup example message", + "headers": { + "correlationId": "my-correlation-id", + "applicationInstanceId": "myInstanceId" + }, + "payload": { + "user": { + "someUserKey": "someUserValue" + }, + "signup": { + "someSignupKey": "someSignupValue" + } + } + } + ] +} +] \ No newline at end of file diff --git a/examples/3.0.0/messageTrait.json b/examples/3.0.0/messageTrait.json new file mode 100644 index 00000000..5126ee4a --- /dev/null +++ b/examples/3.0.0/messageTrait.json @@ -0,0 +1,3 @@ +[ { + "contentType": "application/json" +} ] \ No newline at end of file diff --git a/examples/3.0.0/oauth2Flow.json b/examples/3.0.0/oauth2Flow.json new file mode 100644 index 00000000..0f8b4083 --- /dev/null +++ b/examples/3.0.0/oauth2Flow.json @@ -0,0 +1,8 @@ +[{ + "authorizationUrl": "https://example.com/api/oauth/dialog", + "tokenUrl": "https://example.com/api/oauth/token", + "availableScopes": { + "write:pets": "modify pets in your account", + "read:pets": "read your pets" + } +}] \ No newline at end of file diff --git a/examples/3.0.0/operation.json b/examples/3.0.0/operation.json new file mode 100644 index 00000000..bdddeb81 --- /dev/null +++ b/examples/3.0.0/operation.json @@ -0,0 +1,31 @@ +[{ + "title": "User sign up", + "summary": "Action to sign a user up.", + "description": "A longer description", + "channel": { + "$ref": "#/channels/userSignup" + }, + "action": "send", + "security": [ + { + "petstore_auth": ["write:pets", "read:pets"] + } + ], + "tags": [{ "name": "user" }, { "name": "signup" }, { "name": "register" }], + "bindings": { + "amqp": { + "ack": false + } + }, + "traits": [{ "$ref": "#/components/operationTraits/kafka" }], + "messages": [{ "$ref": "/components/messages/userSignedUp" }], + "reply": { + "address": { + "location": "$message.header#/replyTo" + }, + "channel": { + "$ref": "#/channels/userSignupReply" + }, + "messages": [{ "$ref": "/components/messages/userSignedUpReply" }] + } +}] \ No newline at end of file diff --git a/examples/3.0.0/operationReplyAddress.json b/examples/3.0.0/operationReplyAddress.json new file mode 100644 index 00000000..53a7a78b --- /dev/null +++ b/examples/3.0.0/operationReplyAddress.json @@ -0,0 +1,4 @@ +[{ + "description": "Consumer inbox", + "location": "$message.header#/replyTo" +}] \ No newline at end of file diff --git a/examples/3.0.0/operationTrait.json b/examples/3.0.0/operationTrait.json new file mode 100644 index 00000000..98e8dbf5 --- /dev/null +++ b/examples/3.0.0/operationTrait.json @@ -0,0 +1,7 @@ +[{ + "bindings": { + "amqp": { + "ack": false + } + } +}] \ No newline at end of file diff --git a/examples/3.0.0/operations.json b/examples/3.0.0/operations.json new file mode 100644 index 00000000..a623a01a --- /dev/null +++ b/examples/3.0.0/operations.json @@ -0,0 +1,18 @@ +[{ + "onUserSignUp": { + "title": "User sign up", + "summary": "Action to sign a user up.", + "description": "A longer description", + "channel": { + "$ref": "#/channels/userSignup" + }, + "action": "send", + "tags": [{ "name": "user" }, { "name": "signup" }, { "name": "register" }], + "bindings": { + "amqp": { + "ack": false + } + }, + "traits": [{ "$ref": "#/components/operationTraits/kafka" }] + } +}] \ No newline at end of file diff --git a/examples/3.0.0/parameter.json b/examples/3.0.0/parameter.json new file mode 100644 index 00000000..45e25436 --- /dev/null +++ b/examples/3.0.0/parameter.json @@ -0,0 +1,9 @@ +[{ + "address": "user/{userId}/signedup", + "parameters": { + "userId": { + "description": "Id of the user.", + "location": "$message.payload#/user/id" + } + } +}] \ No newline at end of file diff --git a/examples/3.0.0/parameters.json b/examples/3.0.0/parameters.json new file mode 100644 index 00000000..ad7bc889 --- /dev/null +++ b/examples/3.0.0/parameters.json @@ -0,0 +1,8 @@ +[{ + "address": "user/{userId}/signedup", + "parameters": { + "userId": { + "description": "Id of the user." + } + } +}] \ No newline at end of file diff --git a/examples/3.0.0/server.json b/examples/3.0.0/server.json new file mode 100644 index 00000000..3868a102 --- /dev/null +++ b/examples/3.0.0/server.json @@ -0,0 +1,14 @@ +[ + { + "host": "kafka.in.mycompany.com:9092", + "description": "Production Kafka broker.", + "protocol": "kafka", + "protocolVersion": "3.2" + }, + { + "host": "rabbitmq.in.mycompany.com:5672", + "pathname": "/production", + "protocol": "amqp", + "description": "Production RabbitMQ broker (uses the `production` vhost)." + } +] diff --git a/examples/3.0.0/serverVariable.json b/examples/3.0.0/serverVariable.json new file mode 100644 index 00000000..467af35f --- /dev/null +++ b/examples/3.0.0/serverVariable.json @@ -0,0 +1,14 @@ +[ + { + "host": "rabbitmq.in.mycompany.com:5672", + "pathname": "/{env}", + "protocol": "amqp", + "description": "RabbitMQ broker. Use the `env` variable to point to either `production` or `staging`.", + "variables": { + "env": { + "description": "Environment to connect to. It can be either `production` or `staging`.", + "enum": ["production", "staging"] + } + } + } +] diff --git a/examples/3.0.0/servers.json b/examples/3.0.0/servers.json new file mode 100644 index 00000000..be5bd9a1 --- /dev/null +++ b/examples/3.0.0/servers.json @@ -0,0 +1,38 @@ +[ { + "development": { + "host": "localhost:5672", + "description": "Development AMQP broker.", + "protocol": "amqp", + "protocolVersion": "0-9-1", + "tags": [ + { + "name": "env:development", + "description": "This environment is meant for developers to run their own tests." + } + ] + }, + "staging": { + "host": "rabbitmq-staging.in.mycompany.com:5672", + "description": "RabbitMQ broker for the staging environment.", + "protocol": "amqp", + "protocolVersion": "0-9-1", + "tags": [ + { + "name": "env:staging", + "description": "This environment is a replica of the production environment." + } + ] + }, + "production": { + "host": "rabbitmq.in.mycompany.com:5672", + "description": "RabbitMQ broker for the production environment.", + "protocol": "amqp", + "protocolVersion": "0-9-1", + "tags": [ + { + "name": "env:production", + "description": "This environment is the live environment available for final users." + } + ] + } +} ] \ No newline at end of file diff --git a/examples/3.0.0/symmetricEncryption.json b/examples/3.0.0/symmetricEncryption.json new file mode 100644 index 00000000..cd4a9731 --- /dev/null +++ b/examples/3.0.0/symmetricEncryption.json @@ -0,0 +1,3 @@ +[{ + "type": "symmetricEncryption" +}] \ No newline at end of file diff --git a/examples/3.0.0/tag.json b/examples/3.0.0/tag.json new file mode 100644 index 00000000..4258baa6 --- /dev/null +++ b/examples/3.0.0/tag.json @@ -0,0 +1,4 @@ +[{ + "name": "user", + "description": "User-related messages" +}] \ No newline at end of file diff --git a/examples/3.0.0/userPassword.json b/examples/3.0.0/userPassword.json new file mode 100644 index 00000000..eb52bb8b --- /dev/null +++ b/examples/3.0.0/userPassword.json @@ -0,0 +1,5 @@ +[ + { + "type": "userPassword" + } +] \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index bc454b01..81808e12 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2654,6 +2654,16 @@ } }, "dependencies": { + "@babel/code-frame": { + "version": "7.22.13", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.13.tgz", + "integrity": "sha512-XktuhWlJ5g+3TJXc5upd9Ks1HutSArik6jf2eAjYFyIOf4ej3RN+184cZbzDvbPnuTJIUhPKKJE3cIsYTiAT3w==", + "dev": true, + "requires": { + "@babel/highlight": "^7.22.13", + "chalk": "^2.4.2" + } + }, "@babel/core": { "version": "7.12.13", "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.12.13.tgz", @@ -2730,24 +2740,38 @@ } } }, - "@babel/helper-function-name": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.12.13.tgz", - "integrity": "sha512-TZvmPn0UOqmvi5G4vvw0qZTpVptGkB1GL61R6lKvrSdIxGm5Pky7Q3fpKiIkQCAtRCBUwB0PaThlx9vebCDSwA==", - "dev": true, - "requires": { - "@babel/helper-get-function-arity": "^7.12.13", - "@babel/template": "^7.12.13", - "@babel/types": "^7.12.13" - } + "@babel/helper-environment-visitor": { + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.20.tgz", + "integrity": "sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA==", + "dev": true }, - "@babel/helper-get-function-arity": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.12.13.tgz", - "integrity": "sha512-DjEVzQNz5LICkzN0REdpD5prGoidvbdYk1BVgRUOINaWJP2t6avB27X1guXK1kXNrX0WMfsrm1A/ZBthYuIMQg==", + "@babel/helper-hoist-variables": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.22.5.tgz", + "integrity": "sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==", "dev": true, "requires": { - "@babel/types": "^7.12.13" + "@babel/types": "^7.22.5" + }, + "dependencies": { + "@babel/helper-validator-identifier": { + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz", + "integrity": "sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==", + "dev": true + }, + "@babel/types": { + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.23.0.tgz", + "integrity": "sha512-0oIyUfKoI3mSqMvsxBdclDwxXKXAUA8v/apZbc+iSyARYou1o8ZGDxbUYyLFoW2arqS2jDGqJuZvv1d/io1axg==", + "dev": true, + "requires": { + "@babel/helper-string-parser": "^7.22.5", + "@babel/helper-validator-identifier": "^7.22.20", + "to-fast-properties": "^2.0.0" + } + } } }, "@babel/helper-member-expression-to-functions": { @@ -2824,6 +2848,12 @@ "@babel/types": "^7.12.13" } }, + "@babel/helper-string-parser": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.22.5.tgz", + "integrity": "sha512-mM4COjgZox8U+JcXQwPijIZLElkgEpO5rsERVDJTc2qfCDfERyob6k5WegS14SX18IIjv+XD+GrqNumY5JRCDw==", + "dev": true + }, "@babel/helper-validator-identifier": { "version": "7.12.11", "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.12.11.tgz", @@ -2841,6 +2871,25 @@ "@babel/types": "^7.12.13" } }, + "@babel/highlight": { + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.22.20.tgz", + "integrity": "sha512-dkdMCN3py0+ksCgYmGG8jKeGA/8Tk+gJwSYYlFGxG5lmhfKNoAy004YpLxpS1W2J8m/EK2Ew+yOs9pVRwO89mg==", + "dev": true, + "requires": { + "@babel/helper-validator-identifier": "^7.22.20", + "chalk": "^2.4.2", + "js-tokens": "^4.0.0" + }, + "dependencies": { + "@babel/helper-validator-identifier": { + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz", + "integrity": "sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==", + "dev": true + } + } + }, "@babel/parser": { "version": "7.12.13", "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.12.13.tgz", @@ -2881,40 +2930,86 @@ } }, "@babel/traverse": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.12.13.tgz", - "integrity": "sha512-3Zb4w7eE/OslI0fTp8c7b286/cQps3+vdLW3UcwC8VSJC6GbKn55aeVVu2QJNuCDoeKyptLOFrPq8WqZZBodyA==", + "version": "7.23.2", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.23.2.tgz", + "integrity": "sha512-azpe59SQ48qG6nu2CzcMLbxUudtN+dOM9kDbUqGq3HXUJRlo7i8fvPoxQUzYgLZ4cMVmuZgm8vvBpNeRhd6XSw==", "dev": true, "requires": { - "@babel/code-frame": "^7.12.13", - "@babel/generator": "^7.12.13", - "@babel/helper-function-name": "^7.12.13", - "@babel/helper-split-export-declaration": "^7.12.13", - "@babel/parser": "^7.12.13", - "@babel/types": "^7.12.13", + "@babel/code-frame": "^7.22.13", + "@babel/generator": "^7.23.0", + "@babel/helper-environment-visitor": "^7.22.20", + "@babel/helper-function-name": "^7.23.0", + "@babel/helper-hoist-variables": "^7.22.5", + "@babel/helper-split-export-declaration": "^7.22.6", + "@babel/parser": "^7.23.0", + "@babel/types": "^7.23.0", "debug": "^4.1.0", - "globals": "^11.1.0", - "lodash": "^4.17.19" + "globals": "^11.1.0" }, "dependencies": { - "@babel/code-frame": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.13.tgz", - "integrity": "sha512-HV1Cm0Q3ZrpCR93tkWOYiuYIgLxZXZFVG2VgK+MBWjUqZTundupbfx2aXarXuw5Ko5aMcjtJgbSs4vUGBS5v6g==", + "@babel/generator": { + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.23.0.tgz", + "integrity": "sha512-lN85QRR+5IbYrMWM6Y4pE/noaQtg4pNiqeNGX60eqOfo6gtEj6uw/JagelB8vVztSd7R6M5n1+PQkDbHbBRU4g==", "dev": true, "requires": { - "@babel/highlight": "^7.12.13" + "@babel/types": "^7.23.0", + "@jridgewell/gen-mapping": "^0.3.2", + "@jridgewell/trace-mapping": "^0.3.17", + "jsesc": "^2.5.1" } }, - "@babel/highlight": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.12.13.tgz", - "integrity": "sha512-kocDQvIbgMKlWxXe9fof3TQ+gkIPOUSEYhJjqUjvKMez3krV7vbzYCDq39Oj11UAVK7JqPVGQPlgE85dPNlQww==", + "@babel/helper-function-name": { + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.23.0.tgz", + "integrity": "sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw==", "dev": true, "requires": { - "@babel/helper-validator-identifier": "^7.12.11", - "chalk": "^2.0.0", - "js-tokens": "^4.0.0" + "@babel/template": "^7.22.15", + "@babel/types": "^7.23.0" + } + }, + "@babel/helper-split-export-declaration": { + "version": "7.22.6", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.6.tgz", + "integrity": "sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==", + "dev": true, + "requires": { + "@babel/types": "^7.22.5" + } + }, + "@babel/helper-validator-identifier": { + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz", + "integrity": "sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==", + "dev": true + }, + "@babel/parser": { + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.23.0.tgz", + "integrity": "sha512-vvPKKdMemU85V9WE/l5wZEmImpCtLqbnTvqDS2U1fJ96KrxoW7KrXhNsNCblQlg8Ck4b85yxdTyelsMUgFUXiw==", + "dev": true + }, + "@babel/template": { + "version": "7.22.15", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.22.15.tgz", + "integrity": "sha512-QPErUVm4uyJa60rkI73qneDacvdvzxshT3kksGqlGWYdOTIUOwJ7RDUL8sGqslY1uXWSL6xMFKEXDS3ox2uF0w==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.22.13", + "@babel/parser": "^7.22.15", + "@babel/types": "^7.22.15" + } + }, + "@babel/types": { + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.23.0.tgz", + "integrity": "sha512-0oIyUfKoI3mSqMvsxBdclDwxXKXAUA8v/apZbc+iSyARYou1o8ZGDxbUYyLFoW2arqS2jDGqJuZvv1d/io1axg==", + "dev": true, + "requires": { + "@babel/helper-string-parser": "^7.22.5", + "@babel/helper-validator-identifier": "^7.22.20", + "to-fast-properties": "^2.0.0" } } } @@ -3000,6 +3095,45 @@ "integrity": "sha512-tsAQNx32a8CoFhjhijUIhI4kccIAgmGhy8LZMZgGfmXcpMbPRUqn5LWmgRttILi6yeGmBJd2xsPkFMs0PzgPCw==", "dev": true }, + "@jridgewell/gen-mapping": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz", + "integrity": "sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==", + "dev": true, + "requires": { + "@jridgewell/set-array": "^1.0.1", + "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/trace-mapping": "^0.3.9" + } + }, + "@jridgewell/resolve-uri": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz", + "integrity": "sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==", + "dev": true + }, + "@jridgewell/set-array": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz", + "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==", + "dev": true + }, + "@jridgewell/sourcemap-codec": { + "version": "1.4.15", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", + "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==", + "dev": true + }, + "@jridgewell/trace-mapping": { + "version": "0.3.19", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.19.tgz", + "integrity": "sha512-kf37QtfW+Hwx/buWGMPcR60iF9ziHa6r/CZJIHbmcm4+0qrXiVdxegAH0F6yddEVQ7zdkjcGCgCzUu+BcbhQxw==", + "dev": true, + "requires": { + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" + } + }, "@types/json-schema": { "version": "7.0.11", "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.11.tgz", From 6ecfd5971bc107e651a5b9e31eab8b0aabdcc3ff Mon Sep 17 00:00:00 2001 From: asyncapi-bot Date: Tue, 21 Nov 2023 10:01:23 +0100 Subject: [PATCH 097/102] chore(release): v6.0.0-next-major-spec.14 (#451) --- package-lock.json | 214 ++------- package.json | 2 +- schemas/3.0.0-without-$id.json | 841 ++++++++++++++++++++++++++++++--- schemas/3.0.0.json | 841 ++++++++++++++++++++++++++++++--- 4 files changed, 1581 insertions(+), 317 deletions(-) diff --git a/package-lock.json b/package-lock.json index 81808e12..69ebc9b0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@asyncapi/specs", - "version": "6.0.0-next-major-spec.13", + "version": "6.0.0-next-major-spec.14", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@asyncapi/specs", - "version": "6.0.0-next-major-spec.13", + "version": "6.0.0-next-major-spec.14", "license": "Apache-2.0", "dependencies": { "@types/json-schema": "^7.0.11" @@ -2654,16 +2654,6 @@ } }, "dependencies": { - "@babel/code-frame": { - "version": "7.22.13", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.13.tgz", - "integrity": "sha512-XktuhWlJ5g+3TJXc5upd9Ks1HutSArik6jf2eAjYFyIOf4ej3RN+184cZbzDvbPnuTJIUhPKKJE3cIsYTiAT3w==", - "dev": true, - "requires": { - "@babel/highlight": "^7.22.13", - "chalk": "^2.4.2" - } - }, "@babel/core": { "version": "7.12.13", "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.12.13.tgz", @@ -2740,38 +2730,24 @@ } } }, - "@babel/helper-environment-visitor": { - "version": "7.22.20", - "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.20.tgz", - "integrity": "sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA==", - "dev": true + "@babel/helper-function-name": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.12.13.tgz", + "integrity": "sha512-TZvmPn0UOqmvi5G4vvw0qZTpVptGkB1GL61R6lKvrSdIxGm5Pky7Q3fpKiIkQCAtRCBUwB0PaThlx9vebCDSwA==", + "dev": true, + "requires": { + "@babel/helper-get-function-arity": "^7.12.13", + "@babel/template": "^7.12.13", + "@babel/types": "^7.12.13" + } }, - "@babel/helper-hoist-variables": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.22.5.tgz", - "integrity": "sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==", + "@babel/helper-get-function-arity": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.12.13.tgz", + "integrity": "sha512-DjEVzQNz5LICkzN0REdpD5prGoidvbdYk1BVgRUOINaWJP2t6avB27X1guXK1kXNrX0WMfsrm1A/ZBthYuIMQg==", "dev": true, "requires": { - "@babel/types": "^7.22.5" - }, - "dependencies": { - "@babel/helper-validator-identifier": { - "version": "7.22.20", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz", - "integrity": "sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==", - "dev": true - }, - "@babel/types": { - "version": "7.23.0", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.23.0.tgz", - "integrity": "sha512-0oIyUfKoI3mSqMvsxBdclDwxXKXAUA8v/apZbc+iSyARYou1o8ZGDxbUYyLFoW2arqS2jDGqJuZvv1d/io1axg==", - "dev": true, - "requires": { - "@babel/helper-string-parser": "^7.22.5", - "@babel/helper-validator-identifier": "^7.22.20", - "to-fast-properties": "^2.0.0" - } - } + "@babel/types": "^7.12.13" } }, "@babel/helper-member-expression-to-functions": { @@ -2848,12 +2824,6 @@ "@babel/types": "^7.12.13" } }, - "@babel/helper-string-parser": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.22.5.tgz", - "integrity": "sha512-mM4COjgZox8U+JcXQwPijIZLElkgEpO5rsERVDJTc2qfCDfERyob6k5WegS14SX18IIjv+XD+GrqNumY5JRCDw==", - "dev": true - }, "@babel/helper-validator-identifier": { "version": "7.12.11", "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.12.11.tgz", @@ -2871,25 +2841,6 @@ "@babel/types": "^7.12.13" } }, - "@babel/highlight": { - "version": "7.22.20", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.22.20.tgz", - "integrity": "sha512-dkdMCN3py0+ksCgYmGG8jKeGA/8Tk+gJwSYYlFGxG5lmhfKNoAy004YpLxpS1W2J8m/EK2Ew+yOs9pVRwO89mg==", - "dev": true, - "requires": { - "@babel/helper-validator-identifier": "^7.22.20", - "chalk": "^2.4.2", - "js-tokens": "^4.0.0" - }, - "dependencies": { - "@babel/helper-validator-identifier": { - "version": "7.22.20", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz", - "integrity": "sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==", - "dev": true - } - } - }, "@babel/parser": { "version": "7.12.13", "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.12.13.tgz", @@ -2930,86 +2881,40 @@ } }, "@babel/traverse": { - "version": "7.23.2", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.23.2.tgz", - "integrity": "sha512-azpe59SQ48qG6nu2CzcMLbxUudtN+dOM9kDbUqGq3HXUJRlo7i8fvPoxQUzYgLZ4cMVmuZgm8vvBpNeRhd6XSw==", + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.12.13.tgz", + "integrity": "sha512-3Zb4w7eE/OslI0fTp8c7b286/cQps3+vdLW3UcwC8VSJC6GbKn55aeVVu2QJNuCDoeKyptLOFrPq8WqZZBodyA==", "dev": true, "requires": { - "@babel/code-frame": "^7.22.13", - "@babel/generator": "^7.23.0", - "@babel/helper-environment-visitor": "^7.22.20", - "@babel/helper-function-name": "^7.23.0", - "@babel/helper-hoist-variables": "^7.22.5", - "@babel/helper-split-export-declaration": "^7.22.6", - "@babel/parser": "^7.23.0", - "@babel/types": "^7.23.0", + "@babel/code-frame": "^7.12.13", + "@babel/generator": "^7.12.13", + "@babel/helper-function-name": "^7.12.13", + "@babel/helper-split-export-declaration": "^7.12.13", + "@babel/parser": "^7.12.13", + "@babel/types": "^7.12.13", "debug": "^4.1.0", - "globals": "^11.1.0" + "globals": "^11.1.0", + "lodash": "^4.17.19" }, "dependencies": { - "@babel/generator": { - "version": "7.23.0", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.23.0.tgz", - "integrity": "sha512-lN85QRR+5IbYrMWM6Y4pE/noaQtg4pNiqeNGX60eqOfo6gtEj6uw/JagelB8vVztSd7R6M5n1+PQkDbHbBRU4g==", - "dev": true, - "requires": { - "@babel/types": "^7.23.0", - "@jridgewell/gen-mapping": "^0.3.2", - "@jridgewell/trace-mapping": "^0.3.17", - "jsesc": "^2.5.1" - } - }, - "@babel/helper-function-name": { - "version": "7.23.0", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.23.0.tgz", - "integrity": "sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw==", - "dev": true, - "requires": { - "@babel/template": "^7.22.15", - "@babel/types": "^7.23.0" - } - }, - "@babel/helper-split-export-declaration": { - "version": "7.22.6", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.6.tgz", - "integrity": "sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==", - "dev": true, - "requires": { - "@babel/types": "^7.22.5" - } - }, - "@babel/helper-validator-identifier": { - "version": "7.22.20", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz", - "integrity": "sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==", - "dev": true - }, - "@babel/parser": { - "version": "7.23.0", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.23.0.tgz", - "integrity": "sha512-vvPKKdMemU85V9WE/l5wZEmImpCtLqbnTvqDS2U1fJ96KrxoW7KrXhNsNCblQlg8Ck4b85yxdTyelsMUgFUXiw==", - "dev": true - }, - "@babel/template": { - "version": "7.22.15", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.22.15.tgz", - "integrity": "sha512-QPErUVm4uyJa60rkI73qneDacvdvzxshT3kksGqlGWYdOTIUOwJ7RDUL8sGqslY1uXWSL6xMFKEXDS3ox2uF0w==", + "@babel/code-frame": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.13.tgz", + "integrity": "sha512-HV1Cm0Q3ZrpCR93tkWOYiuYIgLxZXZFVG2VgK+MBWjUqZTundupbfx2aXarXuw5Ko5aMcjtJgbSs4vUGBS5v6g==", "dev": true, "requires": { - "@babel/code-frame": "^7.22.13", - "@babel/parser": "^7.22.15", - "@babel/types": "^7.22.15" + "@babel/highlight": "^7.12.13" } }, - "@babel/types": { - "version": "7.23.0", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.23.0.tgz", - "integrity": "sha512-0oIyUfKoI3mSqMvsxBdclDwxXKXAUA8v/apZbc+iSyARYou1o8ZGDxbUYyLFoW2arqS2jDGqJuZvv1d/io1axg==", + "@babel/highlight": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.12.13.tgz", + "integrity": "sha512-kocDQvIbgMKlWxXe9fof3TQ+gkIPOUSEYhJjqUjvKMez3krV7vbzYCDq39Oj11UAVK7JqPVGQPlgE85dPNlQww==", "dev": true, "requires": { - "@babel/helper-string-parser": "^7.22.5", - "@babel/helper-validator-identifier": "^7.22.20", - "to-fast-properties": "^2.0.0" + "@babel/helper-validator-identifier": "^7.12.11", + "chalk": "^2.0.0", + "js-tokens": "^4.0.0" } } } @@ -3095,45 +3000,6 @@ "integrity": "sha512-tsAQNx32a8CoFhjhijUIhI4kccIAgmGhy8LZMZgGfmXcpMbPRUqn5LWmgRttILi6yeGmBJd2xsPkFMs0PzgPCw==", "dev": true }, - "@jridgewell/gen-mapping": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz", - "integrity": "sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==", - "dev": true, - "requires": { - "@jridgewell/set-array": "^1.0.1", - "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.9" - } - }, - "@jridgewell/resolve-uri": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz", - "integrity": "sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==", - "dev": true - }, - "@jridgewell/set-array": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz", - "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==", - "dev": true - }, - "@jridgewell/sourcemap-codec": { - "version": "1.4.15", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", - "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==", - "dev": true - }, - "@jridgewell/trace-mapping": { - "version": "0.3.19", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.19.tgz", - "integrity": "sha512-kf37QtfW+Hwx/buWGMPcR60iF9ziHa6r/CZJIHbmcm4+0qrXiVdxegAH0F6yddEVQ7zdkjcGCgCzUu+BcbhQxw==", - "dev": true, - "requires": { - "@jridgewell/resolve-uri": "^3.1.0", - "@jridgewell/sourcemap-codec": "^1.4.14" - } - }, "@types/json-schema": { "version": "7.0.11", "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.11.tgz", diff --git a/package.json b/package.json index 8969c4ff..37de273c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@asyncapi/specs", - "version": "6.0.0-next-major-spec.13", + "version": "6.0.0-next-major-spec.14", "description": "AsyncAPI schema versions", "main": "index.js", "types": "index.d.ts", diff --git a/schemas/3.0.0-without-$id.json b/schemas/3.0.0-without-$id.json index 3586d1ec..edb29eb0 100644 --- a/schemas/3.0.0-without-$id.json +++ b/schemas/3.0.0-without-$id.json @@ -30,7 +30,8 @@ "$ref": "#/definitions/servers" }, "defaultContentType": { - "type": "string" + "type": "string", + "description": "Default content type to use when encoding/decoding a message's payload." }, "channels": { "$ref": "#/definitions/channels" @@ -50,7 +51,7 @@ }, "info": { "type": "object", - "description": "General information about the API.", + "description": "The object provides metadata about the API. The metadata can be used by the clients if needed.", "required": [ "version", "title" @@ -87,6 +88,7 @@ }, "tags": { "type": "array", + "description": "A list of tags for application API documentation control. Tags can be used for logical grouping of applications.", "items": { "oneOf": [ { @@ -109,11 +111,37 @@ } ] } - } + }, + "examples": [ + { + "title": "AsyncAPI Sample App", + "version": "1.0.1", + "description": "This is a sample app.", + "termsOfService": "https://asyncapi.org/terms/", + "contact": { + "name": "API Support", + "url": "https://www.asyncapi.org/support", + "email": "support@asyncapi.org" + }, + "license": { + "name": "Apache 2.0", + "url": "https://www.apache.org/licenses/LICENSE-2.0.html" + }, + "externalDocs": { + "description": "Find more info here", + "url": "https://www.asyncapi.org" + }, + "tags": [ + { + "name": "e-commerce" + } + ] + } + ] }, "contact": { "type": "object", - "description": "Contact information for the owners of the API.", + "description": "Contact information for the exposed API.", "additionalProperties": false, "properties": { "name": { @@ -135,7 +163,14 @@ "^x-[\\w\\d\\.\\x2d_]+$": { "$ref": "#/definitions/specificationExtension" } - } + }, + "examples": [ + { + "name": "API Support", + "url": "https://www.example.com/support", + "email": "support@example.com" + } + ] }, "license": { "type": "object", @@ -158,18 +193,31 @@ "^x-[\\w\\d\\.\\x2d_]+$": { "$ref": "#/definitions/specificationExtension" } - } + }, + "examples": [ + { + "name": "Apache 2.0", + "url": "https://www.apache.org/licenses/LICENSE-2.0.html" + } + ] }, "Reference": { "type": "object", + "description": "A simple object to allow referencing other components in the specification, internally and externally.", "required": [ "$ref" ], "properties": { "$ref": { + "description": "The reference string.", "$ref": "#/definitions/ReferenceObject" } - } + }, + "examples": [ + { + "$ref": "#/components/schemas/Pet" + } + ] }, "ReferenceObject": { "type": "string", @@ -177,16 +225,19 @@ }, "tag": { "type": "object", + "description": "Allows adding metadata to a single tag.", "additionalProperties": false, "required": [ "name" ], "properties": { "name": { - "type": "string" + "type": "string", + "description": "The name of the tag." }, "description": { - "type": "string" + "type": "string", + "description": "A short description for the tag. CommonMark syntax can be used for rich text representation." }, "externalDocs": { "oneOf": [ @@ -203,21 +254,29 @@ "^x-[\\w\\d\\.\\x2d_]+$": { "$ref": "#/definitions/specificationExtension" } - } + }, + "examples": [ + { + "name": "user", + "description": "User-related messages" + } + ] }, "externalDocs": { "type": "object", "additionalProperties": false, - "description": "information about external documentation", + "description": "Allows referencing an external resource for extended documentation.", "required": [ "url" ], "properties": { "description": { - "type": "string" + "type": "string", + "description": "A short description of the target documentation. CommonMark syntax can be used for rich text representation." }, "url": { "type": "string", + "description": "The URL for the target documentation. This MUST be in the form of an absolute URL.", "format": "uri" } }, @@ -225,7 +284,13 @@ "^x-[\\w\\d\\.\\x2d_]+$": { "$ref": "#/definitions/specificationExtension" } - } + }, + "examples": [ + { + "description": "Find more info here", + "url": "https://example.com" + } + ] }, "servers": { "description": "An object representing multiple servers.", @@ -239,11 +304,51 @@ "$ref": "#/definitions/server" } ] - } + }, + "examples": [ + { + "development": { + "host": "localhost:5672", + "description": "Development AMQP broker.", + "protocol": "amqp", + "protocolVersion": "0-9-1", + "tags": [ + { + "name": "env:development", + "description": "This environment is meant for developers to run their own tests." + } + ] + }, + "staging": { + "host": "rabbitmq-staging.in.mycompany.com:5672", + "description": "RabbitMQ broker for the staging environment.", + "protocol": "amqp", + "protocolVersion": "0-9-1", + "tags": [ + { + "name": "env:staging", + "description": "This environment is a replica of the production environment." + } + ] + }, + "production": { + "host": "rabbitmq.in.mycompany.com:5672", + "description": "RabbitMQ broker for the production environment.", + "protocol": "amqp", + "protocolVersion": "0-9-1", + "tags": [ + { + "name": "env:production", + "description": "This environment is the live environment available for final users." + } + ] + } + } + ] }, "server": { "type": "object", - "description": "An object representing a Server.", + "description": "An object representing a message broker, a server or any other kind of computer program capable of sending and/or receiving data.", "required": [ "host", "protocol" @@ -257,11 +362,11 @@ "properties": { "host": { "type": "string", - "description": "The server host name." + "description": "The server host name. It MAY include the port. This field supports Server Variables. Variable substitutions will be made when a variable is named in {braces}." }, "pathname": { "type": "string", - "description": "The path to a resource in the host." + "description": "The path to a resource in the host. This field supports Server Variables. Variable substitutions will be made when a variable is named in {braces}." }, "title": { "type": "string", @@ -277,10 +382,11 @@ }, "protocol": { "type": "string", - "description": "The transfer protocol." + "description": "The protocol this server supports for connection." }, "protocolVersion": { - "type": "string" + "type": "string", + "description": "An optional string describing the server. CommonMark syntax MAY be used for rich text representation." }, "variables": { "$ref": "#/definitions/serverVariables" @@ -322,7 +428,21 @@ } ] } - } + }, + "examples": [ + { + "host": "kafka.in.mycompany.com:9092", + "description": "Production Kafka broker.", + "protocol": "kafka", + "protocolVersion": "3.2" + }, + { + "host": "rabbitmq.in.mycompany.com:5672", + "pathname": "/production", + "protocol": "amqp", + "description": "Production RabbitMQ broker (uses the `production` vhost)." + } + ] }, "serverVariables": { "type": "object", @@ -349,24 +469,45 @@ "properties": { "enum": { "type": "array", + "description": "An enumeration of string values to be used if the substitution options are from a limited set.", "items": { "type": "string" }, "uniqueItems": true }, "default": { - "type": "string" + "type": "string", + "description": "The default value to use for substitution, and to send, if an alternate value is not supplied." }, "description": { - "type": "string" + "type": "string", + "description": "An optional description for the server variable. CommonMark syntax MAY be used for rich text representation." }, "examples": { "type": "array", + "description": "An array of examples of the server variable.", "items": { "type": "string" } } - } + }, + "examples": [ + { + "host": "rabbitmq.in.mycompany.com:5672", + "pathname": "/{env}", + "protocol": "amqp", + "description": "RabbitMQ broker. Use the `env` variable to point to either `production` or `staging`.", + "variables": { + "env": { + "description": "Environment to connect to. It can be either `production` or `staging`.", + "enum": [ + "production", + "staging" + ] + } + } + } + ] }, "securityRequirements": { "description": "An array representing security requirements.", @@ -383,6 +524,7 @@ } }, "SecurityScheme": { + "description": "Defines a security scheme that can be used by the operations.", "oneOf": [ { "$ref": "#/definitions/userPassword" @@ -411,6 +553,11 @@ { "$ref": "#/definitions/SaslSecurityScheme" } + ], + "examples": [ + { + "type": "userPassword" + } ] }, "userPassword": { @@ -434,7 +581,12 @@ "$ref": "#/definitions/specificationExtension" } }, - "additionalProperties": false + "additionalProperties": false, + "examples": [ + { + "type": "userPassword" + } + ] }, "apiKey": { "type": "object", @@ -445,19 +597,22 @@ "properties": { "type": { "type": "string", + "description": "The type of the security scheme", "enum": [ "apiKey" ] }, "in": { "type": "string", + "description": " The location of the API key.", "enum": [ "user", "password" ] }, "description": { - "type": "string" + "type": "string", + "description": "A short description for security scheme. CommonMark syntax MAY be used for rich text representation." } }, "patternProperties": { @@ -465,7 +620,13 @@ "$ref": "#/definitions/specificationExtension" } }, - "additionalProperties": false + "additionalProperties": false, + "examples": [ + { + "type": "apiKey", + "in": "user" + } + ] }, "X509": { "type": "object", @@ -488,7 +649,12 @@ "$ref": "#/definitions/specificationExtension" } }, - "additionalProperties": false + "additionalProperties": false, + "examples": [ + { + "type": "X509" + } + ] }, "symmetricEncryption": { "type": "object", @@ -511,7 +677,12 @@ "$ref": "#/definitions/specificationExtension" } }, - "additionalProperties": false + "additionalProperties": false, + "examples": [ + { + "type": "symmetricEncryption" + } + ] }, "asymmetricEncryption": { "type": "object", @@ -521,12 +692,14 @@ "properties": { "type": { "type": "string", + "description": "The type of the security scheme.", "enum": [ "asymmetricEncryption" ] }, "description": { - "type": "string" + "type": "string", + "description": "A short description for security scheme." } }, "patternProperties": { @@ -555,6 +728,7 @@ "properties": { "scheme": { "type": "string", + "description": "A short description for security scheme.", "enum": [ "bearer" ] @@ -568,13 +742,16 @@ ], "properties": { "scheme": { - "type": "string" + "type": "string", + "description": "The name of the HTTP Authorization scheme to be used in the Authorization header as defined in RFC7235." }, "description": { - "type": "string" + "type": "string", + "description": "A short description for security scheme." }, "type": { "type": "string", + "description": "The type of the security scheme.", "enum": [ "http" ] @@ -596,21 +773,25 @@ "properties": { "scheme": { "type": "string", + "description": "The name of the HTTP Authorization scheme to be used in the Authorization header as defined in RFC7235.", "enum": [ "bearer" ] }, "bearerFormat": { - "type": "string" + "type": "string", + "description": "A hint to the client to identify how the bearer token is formatted. Bearer tokens are usually generated by an authorization server, so this information is primarily for documentation purposes." }, "type": { "type": "string", + "description": "The type of the security scheme.", "enum": [ "http" ] }, "description": { - "type": "string" + "type": "string", + "description": "A short description for security scheme. CommonMark syntax MAY be used for rich text representation." } }, "patternProperties": { @@ -630,15 +811,18 @@ "properties": { "type": { "type": "string", + "description": "The type of the security scheme.", "enum": [ "httpApiKey" ] }, "name": { - "type": "string" + "type": "string", + "description": "The name of the header, query or cookie parameter to be used." }, "in": { "type": "string", + "description": "The location of the API key", "enum": [ "header", "query", @@ -646,7 +830,8 @@ ] }, "description": { - "type": "string" + "type": "string", + "description": "A short description for security scheme. CommonMark syntax MAY be used for rich text representation." } }, "patternProperties": { @@ -654,10 +839,18 @@ "$ref": "#/definitions/specificationExtension" } }, - "additionalProperties": false + "additionalProperties": false, + "examples": [ + { + "type": "httpApiKey", + "name": "api_key", + "in": "header" + } + ] }, "oauth2Flows": { "type": "object", + "description": "Allows configuration of the supported OAuth Flows.", "required": [ "type", "flows" @@ -665,17 +858,20 @@ "properties": { "type": { "type": "string", + "description": "The type of the security scheme.", "enum": [ "oauth2" ] }, "description": { - "type": "string" + "type": "string", + "description": "A short description for security scheme." }, "flows": { "type": "object", "properties": { "implicit": { + "description": "Configuration for the OAuth Implicit flow.", "allOf": [ { "$ref": "#/definitions/oauth2Flow" @@ -696,6 +892,7 @@ ] }, "password": { + "description": "Configuration for the OAuth Resource Owner Protected Credentials flow.", "allOf": [ { "$ref": "#/definitions/oauth2Flow" @@ -716,6 +913,7 @@ ] }, "clientCredentials": { + "description": "Configuration for the OAuth Client Credentials flow.", "allOf": [ { "$ref": "#/definitions/oauth2Flow" @@ -736,6 +934,7 @@ ] }, "authorizationCode": { + "description": "Configuration for the OAuth Authorization Code flow.", "allOf": [ { "$ref": "#/definitions/oauth2Flow" @@ -768,21 +967,26 @@ }, "oauth2Flow": { "type": "object", + "description": "Configuration details for a supported OAuth Flow", "properties": { "authorizationUrl": { "type": "string", - "format": "uri" + "format": "uri", + "description": "The authorization URL to be used for this flow. This MUST be in the form of an absolute URL." }, "tokenUrl": { "type": "string", - "format": "uri" + "format": "uri", + "description": "The token URL to be used for this flow. This MUST be in the form of an absolute URL." }, "refreshUrl": { "type": "string", - "format": "uri" + "format": "uri", + "description": "The URL to be used for obtaining refresh tokens. This MUST be in the form of an absolute URL." }, "availableScopes": { - "$ref": "#/definitions/oauth2Scopes" + "$ref": "#/definitions/oauth2Scopes", + "description": "The available scopes for the OAuth2 security scheme. A map between the scope name and a short description for it." } }, "patternProperties": { @@ -790,7 +994,17 @@ "$ref": "#/definitions/specificationExtension" } }, - "additionalProperties": false + "additionalProperties": false, + "examples": [ + { + "authorizationUrl": "https://example.com/api/oauth/dialog", + "tokenUrl": "https://example.com/api/oauth/token", + "availableScopes": { + "write:pets": "modify pets in your account", + "read:pets": "read your pets" + } + } + ] }, "oauth2Scopes": { "type": "object", @@ -807,20 +1021,23 @@ "properties": { "type": { "type": "string", + "description": "The type of the security scheme.", "enum": [ "openIdConnect" ] }, "description": { - "type": "string" + "type": "string", + "description": "A short description for security scheme. CommonMark syntax MAY be used for rich text representation." }, "openIdConnectUrl": { "type": "string", - "format": "uri" + "format": "uri", + "description": "OpenId Connect URL to discover OAuth2 configuration values. This MUST be in the form of an absolute URL." }, "scopes": { "type": "array", - "description": "List of the needed scope names.", + "description": "List of the needed scope names. An empty array means no scopes are needed.", "items": { "type": "string" } @@ -854,12 +1071,14 @@ "properties": { "type": { "type": "string", + "description": "The type of the security scheme. Valid values", "enum": [ "plain" ] }, "description": { - "type": "string" + "type": "string", + "description": "A short description for security scheme." } }, "patternProperties": { @@ -867,7 +1086,12 @@ "$ref": "#/definitions/specificationExtension" } }, - "additionalProperties": false + "additionalProperties": false, + "examples": [ + { + "type": "scramSha512" + } + ] }, "SaslScramSecurityScheme": { "type": "object", @@ -877,13 +1101,15 @@ "properties": { "type": { "type": "string", + "description": "The type of the security scheme.", "enum": [ "scramSha256", "scramSha512" ] }, "description": { - "type": "string" + "type": "string", + "description": "A short description for security scheme." } }, "patternProperties": { @@ -891,7 +1117,12 @@ "$ref": "#/definitions/specificationExtension" } }, - "additionalProperties": false + "additionalProperties": false, + "examples": [ + { + "type": "scramSha512" + } + ] }, "SaslGssapiSecurityScheme": { "type": "object", @@ -901,12 +1132,14 @@ "properties": { "type": { "type": "string", + "description": "The type of the security scheme.", "enum": [ "gssapi" ] }, "description": { - "type": "string" + "type": "string", + "description": "A short description for security scheme." } }, "patternProperties": { @@ -914,10 +1147,16 @@ "$ref": "#/definitions/specificationExtension" } }, - "additionalProperties": false + "additionalProperties": false, + "examples": [ + { + "type": "scramSha512" + } + ] }, "serverBindingsObject": { "type": "object", + "description": "Map describing protocol-specific definitions for a server.", "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { @@ -1327,6 +1566,7 @@ ] }, "schema": { + "description": "The Schema Object allows the definition of input and output data types. These types can be objects, but also primitives and arrays. This object is a superset of the JSON Schema Specification Draft 07. The empty schema (which allows any instance to validate) MAY be represented by the boolean value true and a schema which allows no instance to validate MAY be represented by the boolean value false.", "allOf": [ { "$ref": "#/definitions/json-schema-draft-07-schema" @@ -1409,7 +1649,8 @@ "$ref": "#/definitions/schema" }, "discriminator": { - "type": "string" + "type": "string", + "description": "Adds support for polymorphism. The discriminator is the schema property name that is used to differentiate between other schema that inherit this schema. The property name used MUST be defined at this schema and it MUST be in the required property list. When used, the value MUST be the name of this schema or any schema that inherits it. See Composition and Inheritance for more details." }, "externalDocs": { "oneOf": [ @@ -1423,6 +1664,7 @@ }, "deprecated": { "type": "boolean", + "description": "Specifies that a schema is deprecated and SHOULD be transitioned out of usage. Default value is false.", "default": false } } @@ -1890,6 +2132,7 @@ }, "channels": { "type": "object", + "description": "An object containing all the Channel Object definitions the Application MUST use during runtime.", "additionalProperties": { "oneOf": [ { @@ -1899,10 +2142,23 @@ "$ref": "#/definitions/channel" } ] - } + }, + "examples": [ + { + "userSignedUp": { + "address": "user.signedup", + "messages": { + "userSignedUp": { + "$ref": "#/components/messages/userSignedUp" + } + } + } + } + ] }, "channel": { "type": "object", + "description": "Describes a shared communication channel.", "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { @@ -1945,6 +2201,7 @@ }, "tags": { "type": "array", + "description": "A list of tags for logical grouping of channels.", "items": { "oneOf": [ { @@ -1977,7 +2234,53 @@ } ] } - } + }, + "examples": [ + { + "address": "users.{userId}", + "title": "Users channel", + "description": "This channel is used to exchange messages about user events.", + "messages": { + "userSignedUp": { + "$ref": "#/components/messages/userSignedUp" + }, + "userCompletedOrder": { + "$ref": "#/components/messages/userCompletedOrder" + } + }, + "parameters": { + "userId": { + "$ref": "#/components/parameters/userId" + } + }, + "servers": [ + { + "$ref": "#/servers/rabbitmqInProd" + }, + { + "$ref": "#/servers/rabbitmqInStaging" + } + ], + "bindings": { + "amqp": { + "is": "queue", + "queue": { + "exclusive": true + } + } + }, + "tags": [ + { + "name": "user", + "description": "User-related messages" + } + ], + "externalDocs": { + "description": "Find more info here", + "url": "https://example.com" + } + } + ] }, "channelMessages": { "type": "object", @@ -1995,6 +2298,7 @@ }, "messageObject": { "type": "object", + "description": "Describes a message received on a given channel and operation.", "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { @@ -2003,7 +2307,8 @@ }, "properties": { "contentType": { - "type": "string" + "type": "string", + "description": "The content type to use when encoding/decoding a message's payload. The value MUST be a specific media type (e.g. application/json). When omitted, the value MUST be the one specified on the defaultContentType field." }, "headers": { "$ref": "#/definitions/anySchema" @@ -2067,6 +2372,7 @@ }, "examples": { "type": "array", + "description": "List of examples.", "items": { "type": "object", "additionalProperties": false, @@ -2113,6 +2419,7 @@ }, "traits": { "type": "array", + "description": "A list of traits to apply to the message object. Traits MUST be merged using traits merge mechanism. The resulting object MUST be a valid Message Object.", "items": { "oneOf": [ { @@ -2143,7 +2450,79 @@ ] } } - } + }, + "examples": [ + { + "messageId": "userSignup", + "name": "UserSignup", + "title": "User signup", + "summary": "Action to sign a user up.", + "description": "A longer description", + "contentType": "application/json", + "tags": [ + { + "name": "user" + }, + { + "name": "signup" + }, + { + "name": "register" + } + ], + "headers": { + "type": "object", + "properties": { + "correlationId": { + "description": "Correlation ID set by application", + "type": "string" + }, + "applicationInstanceId": { + "description": "Unique identifier for a given instance of the publishing application", + "type": "string" + } + } + }, + "payload": { + "type": "object", + "properties": { + "user": { + "$ref": "#/components/schemas/userCreate" + }, + "signup": { + "$ref": "#/components/schemas/signup" + } + } + }, + "correlationId": { + "description": "Default Correlation ID", + "location": "$message.header#/correlationId" + }, + "traits": [ + { + "$ref": "#/components/messageTraits/commonHeaders" + } + ], + "examples": [ + { + "name": "SimpleSignup", + "summary": "A simple UserSignup example message", + "headers": { + "correlationId": "my-correlation-id", + "applicationInstanceId": "myInstanceId" + }, + "payload": { + "user": { + "someUserKey": "someUserValue" + }, + "signup": { + "someSignupKey": "someSignupValue" + } + } + } + ] + } + ] }, "anySchema": { "if": { @@ -2160,6 +2539,7 @@ "description": "An object representing either a schema or a multiFormatSchema based on the existence of the 'schema' property. If the property 'schema' is present, use the multi-format schema. Use the default AsyncAPI Schema otherwise." }, "multiFormatSchema": { + "description": "The Multi Format Schema Object represents a schema definition. It differs from the Schema Object in that it supports multiple schema formats or languages (e.g., JSON Schema, Avro, etc.).", "if": { "not": { "type": "object" @@ -2178,6 +2558,7 @@ }, "properties": { "schemaFormat": { + "description": "A string containing the name of the schema format that is used to define the information. If schemaFormat is missing, it MUST default to application/vnd.aai.asyncapi+json;version={{asyncapi}} where {{asyncapi}} matches the AsyncAPI Version String. In such a case, this would make the Multi Format Schema Object equivalent to the Schema Object. When using Reference Object within the schema, the schemaFormat of the resource being referenced MUST match the schemaFormat of the schema that contains the initial reference. For example, if you reference Avro schema, then schemaFormat of referencing resource and the resource being reference MUST match.", "anyOf": [ { "type": "string" @@ -2206,7 +2587,9 @@ } ] }, - "schema": {} + "schema": { + "description": "Definition of the message payload. It can be of any type but defaults to Schema Object. It MUST match the schema format defined in schemaFormat, including the encoding type. E.g., Avro should be inlined as either a YAML or JSON object instead of as a string to be parsed as YAML or JSON. Non-JSON-based schemas (e.g., Protobuf or XSD) MUST be inlined as a string." + } }, "allOf": [ { @@ -2980,6 +3363,7 @@ }, "correlationId": { "type": "object", + "description": "An object that specifies an identifier at design time that can used for message tracing and correlation.", "required": [ "location" ], @@ -2999,10 +3383,17 @@ "description": "A runtime expression that specifies the location of the correlation ID", "pattern": "^\\$message\\.(header|payload)#(\\/(([^\\/~])|(~[01]))*)*" } - } + }, + "examples": [ + { + "description": "Default Correlation ID", + "location": "$message.header#/correlationId" + } + ] }, "messageBindingsObject": { "type": "object", + "description": "Map describing protocol-specific definitions for a message.", "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { @@ -3773,6 +4164,7 @@ }, "messageTrait": { "type": "object", + "description": "Describes a trait that MAY be applied to a Message Object. This object MAY contain any property from the Message Object, except payload and traits.", "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { @@ -3781,7 +4173,8 @@ }, "properties": { "contentType": { - "type": "string" + "type": "string", + "description": "The content type to use when encoding/decoding a message's payload. The value MUST be a specific media type (e.g. application/json). When omitted, the value MUST be the one specified on the defaultContentType field." }, "headers": { "$ref": "#/definitions/anySchema" @@ -3842,6 +4235,7 @@ }, "examples": { "type": "array", + "description": "List of examples.", "items": { "type": "object" } @@ -3856,7 +4250,12 @@ } ] } - } + }, + "examples": [ + { + "contentType": "application/json" + } + ] }, "parameters": { "type": "object", @@ -3870,9 +4269,20 @@ } ] }, - "description": "JSON objects describing re-usable channel parameters." + "description": "JSON objects describing re-usable channel parameters.", + "examples": [ + { + "address": "user/{userId}/signedup", + "parameters": { + "userId": { + "description": "Id of the user." + } + } + } + ] }, "parameter": { + "description": "Describes a parameter included in a channel address.", "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { @@ -3885,18 +4295,18 @@ "description": "A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed." }, "enum": { - "description": "A list of allowed values for the parameter.", + "description": "An enumeration of string values to be used if the substitution options are from a limited set.", "type": "array", "items": { "type": "string" } }, "default": { - "description": "The default value to use for the parameter.", + "description": "The default value to use for substitution, and to send, if an alternate value is not supplied.", "type": "string" }, "examples": { - "description": "List of example values to use for the parameter.", + "description": "An array of examples of the parameter value.", "type": "array", "items": { "type": "string" @@ -3907,10 +4317,22 @@ "description": "A runtime expression that specifies the location of the parameter value", "pattern": "^\\$message\\.(header|payload)#(\\/(([^\\/~])|(~[01]))*)*" } - } + }, + "examples": [ + { + "address": "user/{userId}/signedup", + "parameters": { + "userId": { + "description": "Id of the user.", + "location": "$message.payload#/user/id" + } + } + } + ] }, "channelBindingsObject": { "type": "object", + "description": "Map describing protocol-specific definitions for a channel.", "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { @@ -4877,6 +5299,7 @@ }, "operations": { "type": "object", + "description": "Holds a dictionary with all the operations this application MUST implement.", "additionalProperties": { "oneOf": [ { @@ -4886,10 +5309,45 @@ "$ref": "#/definitions/operation" } ] - } + }, + "examples": [ + { + "onUserSignUp": { + "title": "User sign up", + "summary": "Action to sign a user up.", + "description": "A longer description", + "channel": { + "$ref": "#/channels/userSignup" + }, + "action": "send", + "tags": [ + { + "name": "user" + }, + { + "name": "signup" + }, + { + "name": "register" + } + ], + "bindings": { + "amqp": { + "ack": false + } + }, + "traits": [ + { + "$ref": "#/components/operationTraits/kafka" + } + ] + } + } + ] }, "operation": { "type": "object", + "description": "Describes a specific operation.", "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { @@ -4914,6 +5372,7 @@ }, "messages": { "type": "array", + "description": "A list of $ref pointers pointing to the supported Message Objects that can be processed by this operation. It MUST contain a subset of the messages defined in the channel referenced in this operation. Every message processed by this operation MUST be valid against one, and only one, of the message objects referenced in this list. Please note the messages property value MUST be a list of Reference Objects and, therefore, MUST NOT contain Message Objects. However, it is RECOMMENDED that parsers (or other software) dereference this property for a better development experience.", "items": { "$ref": "#/definitions/Reference" } @@ -4930,6 +5389,7 @@ }, "traits": { "type": "array", + "description": "A list of traits to apply to the operation object. Traits MUST be merged using traits merge mechanism. The resulting object MUST be a valid Operation Object.", "items": { "oneOf": [ { @@ -4958,6 +5418,7 @@ }, "tags": { "type": "array", + "description": "A list of tags for logical grouping and categorization of operations.", "items": { "oneOf": [ { @@ -4990,10 +5451,69 @@ } ] } - } + }, + "examples": [ + { + "title": "User sign up", + "summary": "Action to sign a user up.", + "description": "A longer description", + "channel": { + "$ref": "#/channels/userSignup" + }, + "action": "send", + "security": [ + { + "petstore_auth": [ + "write:pets", + "read:pets" + ] + } + ], + "tags": [ + { + "name": "user" + }, + { + "name": "signup" + }, + { + "name": "register" + } + ], + "bindings": { + "amqp": { + "ack": false + } + }, + "traits": [ + { + "$ref": "#/components/operationTraits/kafka" + } + ], + "messages": [ + { + "$ref": "/components/messages/userSignedUp" + } + ], + "reply": { + "address": { + "location": "$message.header#/replyTo" + }, + "channel": { + "$ref": "#/channels/userSignupReply" + }, + "messages": [ + { + "$ref": "/components/messages/userSignedUpReply" + } + ] + } + } + ] }, "operationReply": { "type": "object", + "description": "Describes the reply part that MAY be applied to an Operation Object. If an operation implements the request/reply pattern, the reply object represents the response message.", "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { @@ -5016,6 +5536,7 @@ }, "messages": { "type": "array", + "description": "A list of $ref pointers pointing to the supported Message Objects that can be processed by this operation as reply. It MUST contain a subset of the messages defined in the channel referenced in this operation reply. Every message processed by this operation MUST be valid against one, and only one, of the message objects referenced in this list. Please note the messages property value MUST be a list of Reference Objects and, therefore, MUST NOT contain Message Objects. However, it is RECOMMENDED that parsers (or other software) dereference this property for a better development experience.", "items": { "$ref": "#/definitions/Reference" } @@ -5024,6 +5545,7 @@ }, "operationReplyAddress": { "type": "object", + "description": "An object that specifies where an operation has to send the reply", "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { @@ -5043,10 +5565,17 @@ "type": "string", "description": "An optional description of the address. CommonMark is allowed." } - } + }, + "examples": [ + { + "description": "Consumer inbox", + "location": "$message.header#/replyTo" + } + ] }, "operationTrait": { "type": "object", + "description": "Describes a trait that MAY be applied to an Operation Object. This object MAY contain any property from the Operation Object, except the action, channel and traits ones.", "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { @@ -5055,24 +5584,31 @@ }, "properties": { "title": { + "description": "A human-friendly title for the operation.", "$ref": "#/definitions/operation/properties/title" }, "summary": { + "description": "A short summary of what the operation is about.", "$ref": "#/definitions/operation/properties/summary" }, "description": { + "description": "A verbose explanation of the operation. CommonMark syntax can be used for rich text representation.", "$ref": "#/definitions/operation/properties/description" }, "security": { + "description": "A declaration of which security schemes are associated with this operation. Only one of the security scheme objects MUST be satisfied to authorize an operation. In cases where Server Security also applies, it MUST also be satisfied.", "$ref": "#/definitions/operation/properties/security" }, "tags": { + "description": "A list of tags for logical grouping and categorization of operations.", "$ref": "#/definitions/operation/properties/tags" }, "externalDocs": { + "description": "Additional external documentation for this operation.", "$ref": "#/definitions/operation/properties/externalDocs" }, "bindings": { + "description": "A map where the keys describe the name of the protocol and the values describe protocol-specific definitions for the operation.", "oneOf": [ { "$ref": "#/definitions/Reference" @@ -5082,10 +5618,20 @@ } ] } - } + }, + "examples": [ + { + "bindings": { + "amqp": { + "ack": false + } + } + } + ] }, "operationBindingsObject": { "type": "object", + "description": "Map describing protocol-specific definitions for an operation.", "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { @@ -5968,7 +6514,7 @@ }, "components": { "type": "object", - "description": "An object to hold a set of reusable objects for different aspects of the AsyncAPI Specification.", + "description": "An object to hold a set of reusable objects for different aspects of the AsyncAPI specification. All objects defined within the components object will have no effect on the API unless they are explicitly referenced from properties outside the components object.", "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { @@ -5978,6 +6524,7 @@ "properties": { "schemas": { "type": "object", + "description": "An object to hold reusable Schema Object. If this is a Schema Object, then the schemaFormat will be assumed to be 'application/vnd.aai.asyncapi+json;version=asyncapi' where the version is equal to the AsyncAPI Version String.", "patternProperties": { "^[\\w\\d\\.\\-_]+$": { "oneOf": [ @@ -5993,6 +6540,7 @@ }, "servers": { "type": "object", + "description": "An object to hold reusable Server Objects.", "patternProperties": { "^[\\w\\d\\.\\-_]+$": { "oneOf": [ @@ -6008,6 +6556,7 @@ }, "channels": { "type": "object", + "description": "An object to hold reusable Channel Objects.", "patternProperties": { "^[\\w\\d\\.\\-_]+$": { "oneOf": [ @@ -6023,6 +6572,7 @@ }, "serverVariables": { "type": "object", + "description": "An object to hold reusable Server Variable Objects.", "patternProperties": { "^[\\w\\d\\.\\-_]+$": { "oneOf": [ @@ -6053,6 +6603,7 @@ }, "messages": { "type": "object", + "description": "An object to hold reusable Message Objects.", "patternProperties": { "^[\\w\\d\\.\\-_]+$": { "oneOf": [ @@ -6068,6 +6619,7 @@ }, "securitySchemes": { "type": "object", + "description": "An object to hold reusable Security Scheme Objects.", "patternProperties": { "^[\\w\\d\\.\\-_]+$": { "oneOf": [ @@ -6083,6 +6635,7 @@ }, "parameters": { "type": "object", + "description": "An object to hold reusable Parameter Objects.", "patternProperties": { "^[\\w\\d\\.\\-_]+$": { "oneOf": [ @@ -6098,6 +6651,7 @@ }, "correlationIds": { "type": "object", + "description": "An object to hold reusable Correlation ID Objects.", "patternProperties": { "^[\\w\\d\\.\\-_]+$": { "oneOf": [ @@ -6113,6 +6667,7 @@ }, "operationTraits": { "type": "object", + "description": "An object to hold reusable Operation Trait Objects.", "patternProperties": { "^[\\w\\d\\.\\-_]+$": { "oneOf": [ @@ -6128,6 +6683,7 @@ }, "messageTraits": { "type": "object", + "description": "An object to hold reusable Message Trait Objects.", "patternProperties": { "^[\\w\\d\\.\\-_]+$": { "oneOf": [ @@ -6143,6 +6699,7 @@ }, "replies": { "type": "object", + "description": "An object to hold reusable Operation Reply Objects.", "patternProperties": { "^[\\w\\d\\.\\-_]+$": { "oneOf": [ @@ -6158,6 +6715,7 @@ }, "replyAddresses": { "type": "object", + "description": "An object to hold reusable Operation Reply Address Objects.", "patternProperties": { "^[\\w\\d\\.\\-_]+$": { "oneOf": [ @@ -6173,6 +6731,7 @@ }, "serverBindings": { "type": "object", + "description": "An object to hold reusable Server Bindings Objects.", "patternProperties": { "^[\\w\\d\\.\\-_]+$": { "oneOf": [ @@ -6188,6 +6747,7 @@ }, "channelBindings": { "type": "object", + "description": "An object to hold reusable Channel Bindings Objects.", "patternProperties": { "^[\\w\\d\\.\\-_]+$": { "oneOf": [ @@ -6203,6 +6763,7 @@ }, "operationBindings": { "type": "object", + "description": "An object to hold reusable Operation Bindings Objects.", "patternProperties": { "^[\\w\\d\\.\\-_]+$": { "oneOf": [ @@ -6218,6 +6779,7 @@ }, "messageBindings": { "type": "object", + "description": "An object to hold reusable Message Bindings Objects.", "patternProperties": { "^[\\w\\d\\.\\-_]+$": { "oneOf": [ @@ -6233,6 +6795,7 @@ }, "tags": { "type": "object", + "description": "An object to hold reusable Tag Objects.", "patternProperties": { "^[\\w\\d\\.\\-_]+$": { "oneOf": [ @@ -6248,6 +6811,7 @@ }, "externalDocs": { "type": "object", + "description": "An object to hold reusable External Documentation Objects.", "patternProperties": { "^[\\w\\d\\.\\-_]+$": { "oneOf": [ @@ -6261,7 +6825,142 @@ } } } - } + }, + "examples": [ + { + "components": { + "schemas": { + "Category": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int64" + }, + "name": { + "type": "string" + } + } + }, + "Tag": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int64" + }, + "name": { + "type": "string" + } + } + }, + "AvroExample": { + "schemaFormat": "application/vnd.apache.avro+json;version=1.9.0", + "schema": { + "$ref": "path/to/user-create.avsc#/UserCreate" + } + } + }, + "servers": { + "development": { + "host": "{stage}.in.mycompany.com:{port}", + "description": "RabbitMQ broker", + "protocol": "amqp", + "protocolVersion": "0-9-1", + "variables": { + "stage": { + "$ref": "#/components/serverVariables/stage" + }, + "port": { + "$ref": "#/components/serverVariables/port" + } + } + } + }, + "serverVariables": { + "stage": { + "default": "demo", + "description": "This value is assigned by the service provider, in this example `mycompany.com`" + }, + "port": { + "enum": [ + "5671", + "5672" + ], + "default": "5672" + } + }, + "channels": { + "user/signedup": { + "subscribe": { + "message": { + "$ref": "#/components/messages/userSignUp" + } + } + } + }, + "messages": { + "userSignUp": { + "summary": "Action to sign a user up.", + "description": "Multiline description of what this action does.\nHere you have another line.\n", + "tags": [ + { + "name": "user" + }, + { + "name": "signup" + } + ], + "headers": { + "type": "object", + "properties": { + "applicationInstanceId": { + "description": "Unique identifier for a given instance of the publishing application", + "type": "string" + } + } + }, + "payload": { + "type": "object", + "properties": { + "user": { + "$ref": "#/components/schemas/userCreate" + }, + "signup": { + "$ref": "#/components/schemas/signup" + } + } + } + } + }, + "parameters": { + "userId": { + "description": "Id of the user." + } + }, + "correlationIds": { + "default": { + "description": "Default Correlation ID", + "location": "$message.header#/correlationId" + } + }, + "messageTraits": { + "commonHeaders": { + "headers": { + "type": "object", + "properties": { + "my-app-header": { + "type": "integer", + "minimum": 0, + "maximum": 100 + } + } + } + } + } + } + } + ] } }, "description": "!!Auto generated!! \n Do not manually edit. " diff --git a/schemas/3.0.0.json b/schemas/3.0.0.json index 237fb05d..7ea6fb64 100644 --- a/schemas/3.0.0.json +++ b/schemas/3.0.0.json @@ -31,7 +31,8 @@ "$ref": "http://asyncapi.com/definitions/3.0.0/servers.json" }, "defaultContentType": { - "type": "string" + "type": "string", + "description": "Default content type to use when encoding/decoding a message's payload." }, "channels": { "$ref": "http://asyncapi.com/definitions/3.0.0/channels.json" @@ -53,7 +54,7 @@ "http://asyncapi.com/definitions/3.0.0/info.json": { "$id": "http://asyncapi.com/definitions/3.0.0/info.json", "type": "object", - "description": "General information about the API.", + "description": "The object provides metadata about the API. The metadata can be used by the clients if needed.", "required": [ "version", "title" @@ -90,6 +91,7 @@ }, "tags": { "type": "array", + "description": "A list of tags for application API documentation control. Tags can be used for logical grouping of applications.", "items": { "oneOf": [ { @@ -112,12 +114,38 @@ } ] } - } + }, + "examples": [ + { + "title": "AsyncAPI Sample App", + "version": "1.0.1", + "description": "This is a sample app.", + "termsOfService": "https://asyncapi.org/terms/", + "contact": { + "name": "API Support", + "url": "https://www.asyncapi.org/support", + "email": "support@asyncapi.org" + }, + "license": { + "name": "Apache 2.0", + "url": "https://www.apache.org/licenses/LICENSE-2.0.html" + }, + "externalDocs": { + "description": "Find more info here", + "url": "https://www.asyncapi.org" + }, + "tags": [ + { + "name": "e-commerce" + } + ] + } + ] }, "http://asyncapi.com/definitions/3.0.0/contact.json": { "$id": "http://asyncapi.com/definitions/3.0.0/contact.json", "type": "object", - "description": "Contact information for the owners of the API.", + "description": "Contact information for the exposed API.", "additionalProperties": false, "properties": { "name": { @@ -139,7 +167,14 @@ "^x-[\\w\\d\\.\\x2d_]+$": { "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" } - } + }, + "examples": [ + { + "name": "API Support", + "url": "https://www.example.com/support", + "email": "support@example.com" + } + ] }, "http://asyncapi.com/definitions/3.0.0/license.json": { "$id": "http://asyncapi.com/definitions/3.0.0/license.json", @@ -163,19 +198,32 @@ "^x-[\\w\\d\\.\\x2d_]+$": { "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" } - } + }, + "examples": [ + { + "name": "Apache 2.0", + "url": "https://www.apache.org/licenses/LICENSE-2.0.html" + } + ] }, "http://asyncapi.com/definitions/3.0.0/Reference.json": { "$id": "http://asyncapi.com/definitions/3.0.0/Reference.json", "type": "object", + "description": "A simple object to allow referencing other components in the specification, internally and externally.", "required": [ "$ref" ], "properties": { "$ref": { + "description": "The reference string.", "$ref": "http://asyncapi.com/definitions/3.0.0/ReferenceObject.json" } - } + }, + "examples": [ + { + "$ref": "#/components/schemas/Pet" + } + ] }, "http://asyncapi.com/definitions/3.0.0/ReferenceObject.json": { "$id": "http://asyncapi.com/definitions/3.0.0/ReferenceObject.json", @@ -185,16 +233,19 @@ "http://asyncapi.com/definitions/3.0.0/tag.json": { "$id": "http://asyncapi.com/definitions/3.0.0/tag.json", "type": "object", + "description": "Allows adding metadata to a single tag.", "additionalProperties": false, "required": [ "name" ], "properties": { "name": { - "type": "string" + "type": "string", + "description": "The name of the tag." }, "description": { - "type": "string" + "type": "string", + "description": "A short description for the tag. CommonMark syntax can be used for rich text representation." }, "externalDocs": { "oneOf": [ @@ -211,22 +262,30 @@ "^x-[\\w\\d\\.\\x2d_]+$": { "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" } - } + }, + "examples": [ + { + "name": "user", + "description": "User-related messages" + } + ] }, "http://asyncapi.com/definitions/3.0.0/externalDocs.json": { "$id": "http://asyncapi.com/definitions/3.0.0/externalDocs.json", "type": "object", "additionalProperties": false, - "description": "information about external documentation", + "description": "Allows referencing an external resource for extended documentation.", "required": [ "url" ], "properties": { "description": { - "type": "string" + "type": "string", + "description": "A short description of the target documentation. CommonMark syntax can be used for rich text representation." }, "url": { "type": "string", + "description": "The URL for the target documentation. This MUST be in the form of an absolute URL.", "format": "uri" } }, @@ -234,7 +293,13 @@ "^x-[\\w\\d\\.\\x2d_]+$": { "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" } - } + }, + "examples": [ + { + "description": "Find more info here", + "url": "https://example.com" + } + ] }, "http://asyncapi.com/definitions/3.0.0/servers.json": { "$id": "http://asyncapi.com/definitions/3.0.0/servers.json", @@ -249,12 +314,52 @@ "$ref": "http://asyncapi.com/definitions/3.0.0/server.json" } ] - } + }, + "examples": [ + { + "development": { + "host": "localhost:5672", + "description": "Development AMQP broker.", + "protocol": "amqp", + "protocolVersion": "0-9-1", + "tags": [ + { + "name": "env:development", + "description": "This environment is meant for developers to run their own tests." + } + ] + }, + "staging": { + "host": "rabbitmq-staging.in.mycompany.com:5672", + "description": "RabbitMQ broker for the staging environment.", + "protocol": "amqp", + "protocolVersion": "0-9-1", + "tags": [ + { + "name": "env:staging", + "description": "This environment is a replica of the production environment." + } + ] + }, + "production": { + "host": "rabbitmq.in.mycompany.com:5672", + "description": "RabbitMQ broker for the production environment.", + "protocol": "amqp", + "protocolVersion": "0-9-1", + "tags": [ + { + "name": "env:production", + "description": "This environment is the live environment available for final users." + } + ] + } + } + ] }, "http://asyncapi.com/definitions/3.0.0/server.json": { "$id": "http://asyncapi.com/definitions/3.0.0/server.json", "type": "object", - "description": "An object representing a Server.", + "description": "An object representing a message broker, a server or any other kind of computer program capable of sending and/or receiving data.", "required": [ "host", "protocol" @@ -268,11 +373,11 @@ "properties": { "host": { "type": "string", - "description": "The server host name." + "description": "The server host name. It MAY include the port. This field supports Server Variables. Variable substitutions will be made when a variable is named in {braces}." }, "pathname": { "type": "string", - "description": "The path to a resource in the host." + "description": "The path to a resource in the host. This field supports Server Variables. Variable substitutions will be made when a variable is named in {braces}." }, "title": { "type": "string", @@ -288,10 +393,11 @@ }, "protocol": { "type": "string", - "description": "The transfer protocol." + "description": "The protocol this server supports for connection." }, "protocolVersion": { - "type": "string" + "type": "string", + "description": "An optional string describing the server. CommonMark syntax MAY be used for rich text representation." }, "variables": { "$ref": "http://asyncapi.com/definitions/3.0.0/serverVariables.json" @@ -333,7 +439,21 @@ } ] } - } + }, + "examples": [ + { + "host": "kafka.in.mycompany.com:9092", + "description": "Production Kafka broker.", + "protocol": "kafka", + "protocolVersion": "3.2" + }, + { + "host": "rabbitmq.in.mycompany.com:5672", + "pathname": "/production", + "protocol": "amqp", + "description": "Production RabbitMQ broker (uses the `production` vhost)." + } + ] }, "http://asyncapi.com/definitions/3.0.0/serverVariables.json": { "$id": "http://asyncapi.com/definitions/3.0.0/serverVariables.json", @@ -362,24 +482,45 @@ "properties": { "enum": { "type": "array", + "description": "An enumeration of string values to be used if the substitution options are from a limited set.", "items": { "type": "string" }, "uniqueItems": true }, "default": { - "type": "string" + "type": "string", + "description": "The default value to use for substitution, and to send, if an alternate value is not supplied." }, "description": { - "type": "string" + "type": "string", + "description": "An optional description for the server variable. CommonMark syntax MAY be used for rich text representation." }, "examples": { "type": "array", + "description": "An array of examples of the server variable.", "items": { "type": "string" } } - } + }, + "examples": [ + { + "host": "rabbitmq.in.mycompany.com:5672", + "pathname": "/{env}", + "protocol": "amqp", + "description": "RabbitMQ broker. Use the `env` variable to point to either `production` or `staging`.", + "variables": { + "env": { + "description": "Environment to connect to. It can be either `production` or `staging`.", + "enum": [ + "production", + "staging" + ] + } + } + } + ] }, "http://asyncapi.com/definitions/3.0.0/securityRequirements.json": { "$id": "http://asyncapi.com/definitions/3.0.0/securityRequirements.json", @@ -398,6 +539,7 @@ }, "http://asyncapi.com/definitions/3.0.0/SecurityScheme.json": { "$id": "http://asyncapi.com/definitions/3.0.0/SecurityScheme.json", + "description": "Defines a security scheme that can be used by the operations.", "oneOf": [ { "$ref": "http://asyncapi.com/definitions/3.0.0/userPassword.json" @@ -426,6 +568,11 @@ { "$ref": "http://asyncapi.com/definitions/3.0.0/SaslSecurityScheme.json" } + ], + "examples": [ + { + "type": "userPassword" + } ] }, "http://asyncapi.com/definitions/3.0.0/userPassword.json": { @@ -450,7 +597,12 @@ "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" } }, - "additionalProperties": false + "additionalProperties": false, + "examples": [ + { + "type": "userPassword" + } + ] }, "http://asyncapi.com/definitions/3.0.0/apiKey.json": { "$id": "http://asyncapi.com/definitions/3.0.0/apiKey.json", @@ -462,19 +614,22 @@ "properties": { "type": { "type": "string", + "description": "The type of the security scheme", "enum": [ "apiKey" ] }, "in": { "type": "string", + "description": " The location of the API key.", "enum": [ "user", "password" ] }, "description": { - "type": "string" + "type": "string", + "description": "A short description for security scheme. CommonMark syntax MAY be used for rich text representation." } }, "patternProperties": { @@ -482,7 +637,13 @@ "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" } }, - "additionalProperties": false + "additionalProperties": false, + "examples": [ + { + "type": "apiKey", + "in": "user" + } + ] }, "http://asyncapi.com/definitions/3.0.0/X509.json": { "$id": "http://asyncapi.com/definitions/3.0.0/X509.json", @@ -506,7 +667,12 @@ "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" } }, - "additionalProperties": false + "additionalProperties": false, + "examples": [ + { + "type": "X509" + } + ] }, "http://asyncapi.com/definitions/3.0.0/symmetricEncryption.json": { "$id": "http://asyncapi.com/definitions/3.0.0/symmetricEncryption.json", @@ -530,7 +696,12 @@ "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" } }, - "additionalProperties": false + "additionalProperties": false, + "examples": [ + { + "type": "symmetricEncryption" + } + ] }, "http://asyncapi.com/definitions/3.0.0/asymmetricEncryption.json": { "$id": "http://asyncapi.com/definitions/3.0.0/asymmetricEncryption.json", @@ -541,12 +712,14 @@ "properties": { "type": { "type": "string", + "description": "The type of the security scheme.", "enum": [ "asymmetricEncryption" ] }, "description": { - "type": "string" + "type": "string", + "description": "A short description for security scheme." } }, "patternProperties": { @@ -577,6 +750,7 @@ "properties": { "scheme": { "type": "string", + "description": "A short description for security scheme.", "enum": [ "bearer" ] @@ -590,13 +764,16 @@ ], "properties": { "scheme": { - "type": "string" + "type": "string", + "description": "The name of the HTTP Authorization scheme to be used in the Authorization header as defined in RFC7235." }, "description": { - "type": "string" + "type": "string", + "description": "A short description for security scheme." }, "type": { "type": "string", + "description": "The type of the security scheme.", "enum": [ "http" ] @@ -619,21 +796,25 @@ "properties": { "scheme": { "type": "string", + "description": "The name of the HTTP Authorization scheme to be used in the Authorization header as defined in RFC7235.", "enum": [ "bearer" ] }, "bearerFormat": { - "type": "string" + "type": "string", + "description": "A hint to the client to identify how the bearer token is formatted. Bearer tokens are usually generated by an authorization server, so this information is primarily for documentation purposes." }, "type": { "type": "string", + "description": "The type of the security scheme.", "enum": [ "http" ] }, "description": { - "type": "string" + "type": "string", + "description": "A short description for security scheme. CommonMark syntax MAY be used for rich text representation." } }, "patternProperties": { @@ -654,15 +835,18 @@ "properties": { "type": { "type": "string", + "description": "The type of the security scheme.", "enum": [ "httpApiKey" ] }, "name": { - "type": "string" + "type": "string", + "description": "The name of the header, query or cookie parameter to be used." }, "in": { "type": "string", + "description": "The location of the API key", "enum": [ "header", "query", @@ -670,7 +854,8 @@ ] }, "description": { - "type": "string" + "type": "string", + "description": "A short description for security scheme. CommonMark syntax MAY be used for rich text representation." } }, "patternProperties": { @@ -678,11 +863,19 @@ "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" } }, - "additionalProperties": false + "additionalProperties": false, + "examples": [ + { + "type": "httpApiKey", + "name": "api_key", + "in": "header" + } + ] }, "http://asyncapi.com/definitions/3.0.0/oauth2Flows.json": { "$id": "http://asyncapi.com/definitions/3.0.0/oauth2Flows.json", "type": "object", + "description": "Allows configuration of the supported OAuth Flows.", "required": [ "type", "flows" @@ -690,17 +883,20 @@ "properties": { "type": { "type": "string", + "description": "The type of the security scheme.", "enum": [ "oauth2" ] }, "description": { - "type": "string" + "type": "string", + "description": "A short description for security scheme." }, "flows": { "type": "object", "properties": { "implicit": { + "description": "Configuration for the OAuth Implicit flow.", "allOf": [ { "$ref": "http://asyncapi.com/definitions/3.0.0/oauth2Flow.json" @@ -721,6 +917,7 @@ ] }, "password": { + "description": "Configuration for the OAuth Resource Owner Protected Credentials flow.", "allOf": [ { "$ref": "http://asyncapi.com/definitions/3.0.0/oauth2Flow.json" @@ -741,6 +938,7 @@ ] }, "clientCredentials": { + "description": "Configuration for the OAuth Client Credentials flow.", "allOf": [ { "$ref": "http://asyncapi.com/definitions/3.0.0/oauth2Flow.json" @@ -761,6 +959,7 @@ ] }, "authorizationCode": { + "description": "Configuration for the OAuth Authorization Code flow.", "allOf": [ { "$ref": "http://asyncapi.com/definitions/3.0.0/oauth2Flow.json" @@ -794,21 +993,26 @@ "http://asyncapi.com/definitions/3.0.0/oauth2Flow.json": { "$id": "http://asyncapi.com/definitions/3.0.0/oauth2Flow.json", "type": "object", + "description": "Configuration details for a supported OAuth Flow", "properties": { "authorizationUrl": { "type": "string", - "format": "uri" + "format": "uri", + "description": "The authorization URL to be used for this flow. This MUST be in the form of an absolute URL." }, "tokenUrl": { "type": "string", - "format": "uri" + "format": "uri", + "description": "The token URL to be used for this flow. This MUST be in the form of an absolute URL." }, "refreshUrl": { "type": "string", - "format": "uri" + "format": "uri", + "description": "The URL to be used for obtaining refresh tokens. This MUST be in the form of an absolute URL." }, "availableScopes": { - "$ref": "http://asyncapi.com/definitions/3.0.0/oauth2Scopes.json" + "$ref": "http://asyncapi.com/definitions/3.0.0/oauth2Scopes.json", + "description": "The available scopes for the OAuth2 security scheme. A map between the scope name and a short description for it." } }, "patternProperties": { @@ -816,7 +1020,17 @@ "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" } }, - "additionalProperties": false + "additionalProperties": false, + "examples": [ + { + "authorizationUrl": "https://example.com/api/oauth/dialog", + "tokenUrl": "https://example.com/api/oauth/token", + "availableScopes": { + "write:pets": "modify pets in your account", + "read:pets": "read your pets" + } + } + ] }, "http://asyncapi.com/definitions/3.0.0/oauth2Scopes.json": { "$id": "http://asyncapi.com/definitions/3.0.0/oauth2Scopes.json", @@ -835,20 +1049,23 @@ "properties": { "type": { "type": "string", + "description": "The type of the security scheme.", "enum": [ "openIdConnect" ] }, "description": { - "type": "string" + "type": "string", + "description": "A short description for security scheme. CommonMark syntax MAY be used for rich text representation." }, "openIdConnectUrl": { "type": "string", - "format": "uri" + "format": "uri", + "description": "OpenId Connect URL to discover OAuth2 configuration values. This MUST be in the form of an absolute URL." }, "scopes": { "type": "array", - "description": "List of the needed scope names.", + "description": "List of the needed scope names. An empty array means no scopes are needed.", "items": { "type": "string" } @@ -884,12 +1101,14 @@ "properties": { "type": { "type": "string", + "description": "The type of the security scheme. Valid values", "enum": [ "plain" ] }, "description": { - "type": "string" + "type": "string", + "description": "A short description for security scheme." } }, "patternProperties": { @@ -897,7 +1116,12 @@ "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" } }, - "additionalProperties": false + "additionalProperties": false, + "examples": [ + { + "type": "scramSha512" + } + ] }, "http://asyncapi.com/definitions/3.0.0/SaslScramSecurityScheme.json": { "$id": "http://asyncapi.com/definitions/3.0.0/SaslScramSecurityScheme.json", @@ -908,13 +1132,15 @@ "properties": { "type": { "type": "string", + "description": "The type of the security scheme.", "enum": [ "scramSha256", "scramSha512" ] }, "description": { - "type": "string" + "type": "string", + "description": "A short description for security scheme." } }, "patternProperties": { @@ -922,7 +1148,12 @@ "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" } }, - "additionalProperties": false + "additionalProperties": false, + "examples": [ + { + "type": "scramSha512" + } + ] }, "http://asyncapi.com/definitions/3.0.0/SaslGssapiSecurityScheme.json": { "$id": "http://asyncapi.com/definitions/3.0.0/SaslGssapiSecurityScheme.json", @@ -933,12 +1164,14 @@ "properties": { "type": { "type": "string", + "description": "The type of the security scheme.", "enum": [ "gssapi" ] }, "description": { - "type": "string" + "type": "string", + "description": "A short description for security scheme." } }, "patternProperties": { @@ -946,11 +1179,17 @@ "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" } }, - "additionalProperties": false + "additionalProperties": false, + "examples": [ + { + "type": "scramSha512" + } + ] }, "http://asyncapi.com/definitions/3.0.0/serverBindingsObject.json": { "$id": "http://asyncapi.com/definitions/3.0.0/serverBindingsObject.json", "type": "object", + "description": "Map describing protocol-specific definitions for a server.", "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { @@ -1363,6 +1602,7 @@ }, "http://asyncapi.com/definitions/3.0.0/schema.json": { "$id": "http://asyncapi.com/definitions/3.0.0/schema.json", + "description": "The Schema Object allows the definition of input and output data types. These types can be objects, but also primitives and arrays. This object is a superset of the JSON Schema Specification Draft 07. The empty schema (which allows any instance to validate) MAY be represented by the boolean value true and a schema which allows no instance to validate MAY be represented by the boolean value false.", "allOf": [ { "$ref": "http://json-schema.org/draft-07/schema#" @@ -1445,7 +1685,8 @@ "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" }, "discriminator": { - "type": "string" + "type": "string", + "description": "Adds support for polymorphism. The discriminator is the schema property name that is used to differentiate between other schema that inherit this schema. The property name used MUST be defined at this schema and it MUST be in the required property list. When used, the value MUST be the name of this schema or any schema that inherits it. See Composition and Inheritance for more details." }, "externalDocs": { "oneOf": [ @@ -1459,6 +1700,7 @@ }, "deprecated": { "type": "boolean", + "description": "Specifies that a schema is deprecated and SHOULD be transitioned out of usage. Default value is false.", "default": false } } @@ -1934,6 +2176,7 @@ "http://asyncapi.com/definitions/3.0.0/channels.json": { "$id": "http://asyncapi.com/definitions/3.0.0/channels.json", "type": "object", + "description": "An object containing all the Channel Object definitions the Application MUST use during runtime.", "additionalProperties": { "oneOf": [ { @@ -1943,11 +2186,24 @@ "$ref": "http://asyncapi.com/definitions/3.0.0/channel.json" } ] - } + }, + "examples": [ + { + "userSignedUp": { + "address": "user.signedup", + "messages": { + "userSignedUp": { + "$ref": "#/components/messages/userSignedUp" + } + } + } + } + ] }, "http://asyncapi.com/definitions/3.0.0/channel.json": { "$id": "http://asyncapi.com/definitions/3.0.0/channel.json", "type": "object", + "description": "Describes a shared communication channel.", "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { @@ -1990,6 +2246,7 @@ }, "tags": { "type": "array", + "description": "A list of tags for logical grouping of channels.", "items": { "oneOf": [ { @@ -2022,7 +2279,53 @@ } ] } - } + }, + "examples": [ + { + "address": "users.{userId}", + "title": "Users channel", + "description": "This channel is used to exchange messages about user events.", + "messages": { + "userSignedUp": { + "$ref": "#/components/messages/userSignedUp" + }, + "userCompletedOrder": { + "$ref": "#/components/messages/userCompletedOrder" + } + }, + "parameters": { + "userId": { + "$ref": "#/components/parameters/userId" + } + }, + "servers": [ + { + "$ref": "#/servers/rabbitmqInProd" + }, + { + "$ref": "#/servers/rabbitmqInStaging" + } + ], + "bindings": { + "amqp": { + "is": "queue", + "queue": { + "exclusive": true + } + } + }, + "tags": [ + { + "name": "user", + "description": "User-related messages" + } + ], + "externalDocs": { + "description": "Find more info here", + "url": "https://example.com" + } + } + ] }, "http://asyncapi.com/definitions/3.0.0/channelMessages.json": { "$id": "http://asyncapi.com/definitions/3.0.0/channelMessages.json", @@ -2042,6 +2345,7 @@ "http://asyncapi.com/definitions/3.0.0/messageObject.json": { "$id": "http://asyncapi.com/definitions/3.0.0/messageObject.json", "type": "object", + "description": "Describes a message received on a given channel and operation.", "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { @@ -2050,7 +2354,8 @@ }, "properties": { "contentType": { - "type": "string" + "type": "string", + "description": "The content type to use when encoding/decoding a message's payload. The value MUST be a specific media type (e.g. application/json). When omitted, the value MUST be the one specified on the defaultContentType field." }, "headers": { "$ref": "http://asyncapi.com/definitions/3.0.0/anySchema.json" @@ -2114,6 +2419,7 @@ }, "examples": { "type": "array", + "description": "List of examples.", "items": { "type": "object", "additionalProperties": false, @@ -2160,6 +2466,7 @@ }, "traits": { "type": "array", + "description": "A list of traits to apply to the message object. Traits MUST be merged using traits merge mechanism. The resulting object MUST be a valid Message Object.", "items": { "oneOf": [ { @@ -2190,7 +2497,79 @@ ] } } - } + }, + "examples": [ + { + "messageId": "userSignup", + "name": "UserSignup", + "title": "User signup", + "summary": "Action to sign a user up.", + "description": "A longer description", + "contentType": "application/json", + "tags": [ + { + "name": "user" + }, + { + "name": "signup" + }, + { + "name": "register" + } + ], + "headers": { + "type": "object", + "properties": { + "correlationId": { + "description": "Correlation ID set by application", + "type": "string" + }, + "applicationInstanceId": { + "description": "Unique identifier for a given instance of the publishing application", + "type": "string" + } + } + }, + "payload": { + "type": "object", + "properties": { + "user": { + "$ref": "#/components/schemas/userCreate" + }, + "signup": { + "$ref": "#/components/schemas/signup" + } + } + }, + "correlationId": { + "description": "Default Correlation ID", + "location": "$message.header#/correlationId" + }, + "traits": [ + { + "$ref": "#/components/messageTraits/commonHeaders" + } + ], + "examples": [ + { + "name": "SimpleSignup", + "summary": "A simple UserSignup example message", + "headers": { + "correlationId": "my-correlation-id", + "applicationInstanceId": "myInstanceId" + }, + "payload": { + "user": { + "someUserKey": "someUserValue" + }, + "signup": { + "someSignupKey": "someSignupValue" + } + } + } + ] + } + ] }, "http://asyncapi.com/definitions/3.0.0/anySchema.json": { "$id": "http://asyncapi.com/definitions/3.0.0/anySchema.json", @@ -2209,6 +2588,7 @@ }, "http://asyncapi.com/definitions/3.0.0/multiFormatSchema.json": { "$id": "http://asyncapi.com/definitions/3.0.0/multiFormatSchema.json", + "description": "The Multi Format Schema Object represents a schema definition. It differs from the Schema Object in that it supports multiple schema formats or languages (e.g., JSON Schema, Avro, etc.).", "if": { "not": { "type": "object" @@ -2227,6 +2607,7 @@ }, "properties": { "schemaFormat": { + "description": "A string containing the name of the schema format that is used to define the information. If schemaFormat is missing, it MUST default to application/vnd.aai.asyncapi+json;version={{asyncapi}} where {{asyncapi}} matches the AsyncAPI Version String. In such a case, this would make the Multi Format Schema Object equivalent to the Schema Object. When using Reference Object within the schema, the schemaFormat of the resource being referenced MUST match the schemaFormat of the schema that contains the initial reference. For example, if you reference Avro schema, then schemaFormat of referencing resource and the resource being reference MUST match.", "anyOf": [ { "type": "string" @@ -2255,7 +2636,9 @@ } ] }, - "schema": {} + "schema": { + "description": "Definition of the message payload. It can be of any type but defaults to Schema Object. It MUST match the schema format defined in schemaFormat, including the encoding type. E.g., Avro should be inlined as either a YAML or JSON object instead of as a string to be parsed as YAML or JSON. Non-JSON-based schemas (e.g., Protobuf or XSD) MUST be inlined as a string." + } }, "allOf": [ { @@ -3032,6 +3415,7 @@ "http://asyncapi.com/definitions/3.0.0/correlationId.json": { "$id": "http://asyncapi.com/definitions/3.0.0/correlationId.json", "type": "object", + "description": "An object that specifies an identifier at design time that can used for message tracing and correlation.", "required": [ "location" ], @@ -3051,11 +3435,18 @@ "description": "A runtime expression that specifies the location of the correlation ID", "pattern": "^\\$message\\.(header|payload)#(\\/(([^\\/~])|(~[01]))*)*" } - } + }, + "examples": [ + { + "description": "Default Correlation ID", + "location": "$message.header#/correlationId" + } + ] }, "http://asyncapi.com/definitions/3.0.0/messageBindingsObject.json": { "$id": "http://asyncapi.com/definitions/3.0.0/messageBindingsObject.json", "type": "object", + "description": "Map describing protocol-specific definitions for a message.", "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { @@ -3836,6 +4227,7 @@ "http://asyncapi.com/definitions/3.0.0/messageTrait.json": { "$id": "http://asyncapi.com/definitions/3.0.0/messageTrait.json", "type": "object", + "description": "Describes a trait that MAY be applied to a Message Object. This object MAY contain any property from the Message Object, except payload and traits.", "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { @@ -3844,7 +4236,8 @@ }, "properties": { "contentType": { - "type": "string" + "type": "string", + "description": "The content type to use when encoding/decoding a message's payload. The value MUST be a specific media type (e.g. application/json). When omitted, the value MUST be the one specified on the defaultContentType field." }, "headers": { "$ref": "http://asyncapi.com/definitions/3.0.0/anySchema.json" @@ -3905,6 +4298,7 @@ }, "examples": { "type": "array", + "description": "List of examples.", "items": { "type": "object" } @@ -3919,7 +4313,12 @@ } ] } - } + }, + "examples": [ + { + "contentType": "application/json" + } + ] }, "http://asyncapi.com/definitions/3.0.0/parameters.json": { "$id": "http://asyncapi.com/definitions/3.0.0/parameters.json", @@ -3934,10 +4333,21 @@ } ] }, - "description": "JSON objects describing re-usable channel parameters." + "description": "JSON objects describing re-usable channel parameters.", + "examples": [ + { + "address": "user/{userId}/signedup", + "parameters": { + "userId": { + "description": "Id of the user." + } + } + } + ] }, "http://asyncapi.com/definitions/3.0.0/parameter.json": { "$id": "http://asyncapi.com/definitions/3.0.0/parameter.json", + "description": "Describes a parameter included in a channel address.", "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { @@ -3950,18 +4360,18 @@ "description": "A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed." }, "enum": { - "description": "A list of allowed values for the parameter.", + "description": "An enumeration of string values to be used if the substitution options are from a limited set.", "type": "array", "items": { "type": "string" } }, "default": { - "description": "The default value to use for the parameter.", + "description": "The default value to use for substitution, and to send, if an alternate value is not supplied.", "type": "string" }, "examples": { - "description": "List of example values to use for the parameter.", + "description": "An array of examples of the parameter value.", "type": "array", "items": { "type": "string" @@ -3972,11 +4382,23 @@ "description": "A runtime expression that specifies the location of the parameter value", "pattern": "^\\$message\\.(header|payload)#(\\/(([^\\/~])|(~[01]))*)*" } - } + }, + "examples": [ + { + "address": "user/{userId}/signedup", + "parameters": { + "userId": { + "description": "Id of the user.", + "location": "$message.payload#/user/id" + } + } + } + ] }, "http://asyncapi.com/definitions/3.0.0/channelBindingsObject.json": { "$id": "http://asyncapi.com/definitions/3.0.0/channelBindingsObject.json", "type": "object", + "description": "Map describing protocol-specific definitions for a channel.", "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { @@ -4952,6 +5374,7 @@ "http://asyncapi.com/definitions/3.0.0/operations.json": { "$id": "http://asyncapi.com/definitions/3.0.0/operations.json", "type": "object", + "description": "Holds a dictionary with all the operations this application MUST implement.", "additionalProperties": { "oneOf": [ { @@ -4961,11 +5384,46 @@ "$ref": "http://asyncapi.com/definitions/3.0.0/operation.json" } ] - } + }, + "examples": [ + { + "onUserSignUp": { + "title": "User sign up", + "summary": "Action to sign a user up.", + "description": "A longer description", + "channel": { + "$ref": "#/channels/userSignup" + }, + "action": "send", + "tags": [ + { + "name": "user" + }, + { + "name": "signup" + }, + { + "name": "register" + } + ], + "bindings": { + "amqp": { + "ack": false + } + }, + "traits": [ + { + "$ref": "#/components/operationTraits/kafka" + } + ] + } + } + ] }, "http://asyncapi.com/definitions/3.0.0/operation.json": { "$id": "http://asyncapi.com/definitions/3.0.0/operation.json", "type": "object", + "description": "Describes a specific operation.", "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { @@ -4990,6 +5448,7 @@ }, "messages": { "type": "array", + "description": "A list of $ref pointers pointing to the supported Message Objects that can be processed by this operation. It MUST contain a subset of the messages defined in the channel referenced in this operation. Every message processed by this operation MUST be valid against one, and only one, of the message objects referenced in this list. Please note the messages property value MUST be a list of Reference Objects and, therefore, MUST NOT contain Message Objects. However, it is RECOMMENDED that parsers (or other software) dereference this property for a better development experience.", "items": { "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" } @@ -5006,6 +5465,7 @@ }, "traits": { "type": "array", + "description": "A list of traits to apply to the operation object. Traits MUST be merged using traits merge mechanism. The resulting object MUST be a valid Operation Object.", "items": { "oneOf": [ { @@ -5034,6 +5494,7 @@ }, "tags": { "type": "array", + "description": "A list of tags for logical grouping and categorization of operations.", "items": { "oneOf": [ { @@ -5066,11 +5527,70 @@ } ] } - } + }, + "examples": [ + { + "title": "User sign up", + "summary": "Action to sign a user up.", + "description": "A longer description", + "channel": { + "$ref": "#/channels/userSignup" + }, + "action": "send", + "security": [ + { + "petstore_auth": [ + "write:pets", + "read:pets" + ] + } + ], + "tags": [ + { + "name": "user" + }, + { + "name": "signup" + }, + { + "name": "register" + } + ], + "bindings": { + "amqp": { + "ack": false + } + }, + "traits": [ + { + "$ref": "#/components/operationTraits/kafka" + } + ], + "messages": [ + { + "$ref": "/components/messages/userSignedUp" + } + ], + "reply": { + "address": { + "location": "$message.header#/replyTo" + }, + "channel": { + "$ref": "#/channels/userSignupReply" + }, + "messages": [ + { + "$ref": "/components/messages/userSignedUpReply" + } + ] + } + } + ] }, "http://asyncapi.com/definitions/3.0.0/operationReply.json": { "$id": "http://asyncapi.com/definitions/3.0.0/operationReply.json", "type": "object", + "description": "Describes the reply part that MAY be applied to an Operation Object. If an operation implements the request/reply pattern, the reply object represents the response message.", "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { @@ -5093,6 +5613,7 @@ }, "messages": { "type": "array", + "description": "A list of $ref pointers pointing to the supported Message Objects that can be processed by this operation as reply. It MUST contain a subset of the messages defined in the channel referenced in this operation reply. Every message processed by this operation MUST be valid against one, and only one, of the message objects referenced in this list. Please note the messages property value MUST be a list of Reference Objects and, therefore, MUST NOT contain Message Objects. However, it is RECOMMENDED that parsers (or other software) dereference this property for a better development experience.", "items": { "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" } @@ -5102,6 +5623,7 @@ "http://asyncapi.com/definitions/3.0.0/operationReplyAddress.json": { "$id": "http://asyncapi.com/definitions/3.0.0/operationReplyAddress.json", "type": "object", + "description": "An object that specifies where an operation has to send the reply", "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { @@ -5121,11 +5643,18 @@ "type": "string", "description": "An optional description of the address. CommonMark is allowed." } - } + }, + "examples": [ + { + "description": "Consumer inbox", + "location": "$message.header#/replyTo" + } + ] }, "http://asyncapi.com/definitions/3.0.0/operationTrait.json": { "$id": "http://asyncapi.com/definitions/3.0.0/operationTrait.json", "type": "object", + "description": "Describes a trait that MAY be applied to an Operation Object. This object MAY contain any property from the Operation Object, except the action, channel and traits ones.", "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { @@ -5134,24 +5663,31 @@ }, "properties": { "title": { + "description": "A human-friendly title for the operation.", "$ref": "http://asyncapi.com/definitions/3.0.0/operation.json#/properties/title" }, "summary": { + "description": "A short summary of what the operation is about.", "$ref": "http://asyncapi.com/definitions/3.0.0/operation.json#/properties/summary" }, "description": { + "description": "A verbose explanation of the operation. CommonMark syntax can be used for rich text representation.", "$ref": "http://asyncapi.com/definitions/3.0.0/operation.json#/properties/description" }, "security": { + "description": "A declaration of which security schemes are associated with this operation. Only one of the security scheme objects MUST be satisfied to authorize an operation. In cases where Server Security also applies, it MUST also be satisfied.", "$ref": "http://asyncapi.com/definitions/3.0.0/operation.json#/properties/security" }, "tags": { + "description": "A list of tags for logical grouping and categorization of operations.", "$ref": "http://asyncapi.com/definitions/3.0.0/operation.json#/properties/tags" }, "externalDocs": { + "description": "Additional external documentation for this operation.", "$ref": "http://asyncapi.com/definitions/3.0.0/operation.json#/properties/externalDocs" }, "bindings": { + "description": "A map where the keys describe the name of the protocol and the values describe protocol-specific definitions for the operation.", "oneOf": [ { "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" @@ -5161,11 +5697,21 @@ } ] } - } + }, + "examples": [ + { + "bindings": { + "amqp": { + "ack": false + } + } + } + ] }, "http://asyncapi.com/definitions/3.0.0/operationBindingsObject.json": { "$id": "http://asyncapi.com/definitions/3.0.0/operationBindingsObject.json", "type": "object", + "description": "Map describing protocol-specific definitions for an operation.", "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { @@ -6058,7 +6604,7 @@ "http://asyncapi.com/definitions/3.0.0/components.json": { "$id": "http://asyncapi.com/definitions/3.0.0/components.json", "type": "object", - "description": "An object to hold a set of reusable objects for different aspects of the AsyncAPI Specification.", + "description": "An object to hold a set of reusable objects for different aspects of the AsyncAPI specification. All objects defined within the components object will have no effect on the API unless they are explicitly referenced from properties outside the components object.", "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { @@ -6068,6 +6614,7 @@ "properties": { "schemas": { "type": "object", + "description": "An object to hold reusable Schema Object. If this is a Schema Object, then the schemaFormat will be assumed to be 'application/vnd.aai.asyncapi+json;version=asyncapi' where the version is equal to the AsyncAPI Version String.", "patternProperties": { "^[\\w\\d\\.\\-_]+$": { "oneOf": [ @@ -6083,6 +6630,7 @@ }, "servers": { "type": "object", + "description": "An object to hold reusable Server Objects.", "patternProperties": { "^[\\w\\d\\.\\-_]+$": { "oneOf": [ @@ -6098,6 +6646,7 @@ }, "channels": { "type": "object", + "description": "An object to hold reusable Channel Objects.", "patternProperties": { "^[\\w\\d\\.\\-_]+$": { "oneOf": [ @@ -6113,6 +6662,7 @@ }, "serverVariables": { "type": "object", + "description": "An object to hold reusable Server Variable Objects.", "patternProperties": { "^[\\w\\d\\.\\-_]+$": { "oneOf": [ @@ -6143,6 +6693,7 @@ }, "messages": { "type": "object", + "description": "An object to hold reusable Message Objects.", "patternProperties": { "^[\\w\\d\\.\\-_]+$": { "oneOf": [ @@ -6158,6 +6709,7 @@ }, "securitySchemes": { "type": "object", + "description": "An object to hold reusable Security Scheme Objects.", "patternProperties": { "^[\\w\\d\\.\\-_]+$": { "oneOf": [ @@ -6173,6 +6725,7 @@ }, "parameters": { "type": "object", + "description": "An object to hold reusable Parameter Objects.", "patternProperties": { "^[\\w\\d\\.\\-_]+$": { "oneOf": [ @@ -6188,6 +6741,7 @@ }, "correlationIds": { "type": "object", + "description": "An object to hold reusable Correlation ID Objects.", "patternProperties": { "^[\\w\\d\\.\\-_]+$": { "oneOf": [ @@ -6203,6 +6757,7 @@ }, "operationTraits": { "type": "object", + "description": "An object to hold reusable Operation Trait Objects.", "patternProperties": { "^[\\w\\d\\.\\-_]+$": { "oneOf": [ @@ -6218,6 +6773,7 @@ }, "messageTraits": { "type": "object", + "description": "An object to hold reusable Message Trait Objects.", "patternProperties": { "^[\\w\\d\\.\\-_]+$": { "oneOf": [ @@ -6233,6 +6789,7 @@ }, "replies": { "type": "object", + "description": "An object to hold reusable Operation Reply Objects.", "patternProperties": { "^[\\w\\d\\.\\-_]+$": { "oneOf": [ @@ -6248,6 +6805,7 @@ }, "replyAddresses": { "type": "object", + "description": "An object to hold reusable Operation Reply Address Objects.", "patternProperties": { "^[\\w\\d\\.\\-_]+$": { "oneOf": [ @@ -6263,6 +6821,7 @@ }, "serverBindings": { "type": "object", + "description": "An object to hold reusable Server Bindings Objects.", "patternProperties": { "^[\\w\\d\\.\\-_]+$": { "oneOf": [ @@ -6278,6 +6837,7 @@ }, "channelBindings": { "type": "object", + "description": "An object to hold reusable Channel Bindings Objects.", "patternProperties": { "^[\\w\\d\\.\\-_]+$": { "oneOf": [ @@ -6293,6 +6853,7 @@ }, "operationBindings": { "type": "object", + "description": "An object to hold reusable Operation Bindings Objects.", "patternProperties": { "^[\\w\\d\\.\\-_]+$": { "oneOf": [ @@ -6308,6 +6869,7 @@ }, "messageBindings": { "type": "object", + "description": "An object to hold reusable Message Bindings Objects.", "patternProperties": { "^[\\w\\d\\.\\-_]+$": { "oneOf": [ @@ -6323,6 +6885,7 @@ }, "tags": { "type": "object", + "description": "An object to hold reusable Tag Objects.", "patternProperties": { "^[\\w\\d\\.\\-_]+$": { "oneOf": [ @@ -6338,6 +6901,7 @@ }, "externalDocs": { "type": "object", + "description": "An object to hold reusable External Documentation Objects.", "patternProperties": { "^[\\w\\d\\.\\-_]+$": { "oneOf": [ @@ -6351,7 +6915,142 @@ } } } - } + }, + "examples": [ + { + "components": { + "schemas": { + "Category": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int64" + }, + "name": { + "type": "string" + } + } + }, + "Tag": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int64" + }, + "name": { + "type": "string" + } + } + }, + "AvroExample": { + "schemaFormat": "application/vnd.apache.avro+json;version=1.9.0", + "schema": { + "$ref": "path/to/user-create.avsc#/UserCreate" + } + } + }, + "servers": { + "development": { + "host": "{stage}.in.mycompany.com:{port}", + "description": "RabbitMQ broker", + "protocol": "amqp", + "protocolVersion": "0-9-1", + "variables": { + "stage": { + "$ref": "#/components/serverVariables/stage" + }, + "port": { + "$ref": "#/components/serverVariables/port" + } + } + } + }, + "serverVariables": { + "stage": { + "default": "demo", + "description": "This value is assigned by the service provider, in this example `mycompany.com`" + }, + "port": { + "enum": [ + "5671", + "5672" + ], + "default": "5672" + } + }, + "channels": { + "user/signedup": { + "subscribe": { + "message": { + "$ref": "#/components/messages/userSignUp" + } + } + } + }, + "messages": { + "userSignUp": { + "summary": "Action to sign a user up.", + "description": "Multiline description of what this action does.\nHere you have another line.\n", + "tags": [ + { + "name": "user" + }, + { + "name": "signup" + } + ], + "headers": { + "type": "object", + "properties": { + "applicationInstanceId": { + "description": "Unique identifier for a given instance of the publishing application", + "type": "string" + } + } + }, + "payload": { + "type": "object", + "properties": { + "user": { + "$ref": "#/components/schemas/userCreate" + }, + "signup": { + "$ref": "#/components/schemas/signup" + } + } + } + } + }, + "parameters": { + "userId": { + "description": "Id of the user." + } + }, + "correlationIds": { + "default": { + "description": "Default Correlation ID", + "location": "$message.header#/correlationId" + } + }, + "messageTraits": { + "commonHeaders": { + "headers": { + "type": "object", + "properties": { + "my-app-header": { + "type": "integer", + "minimum": 0, + "maximum": 100 + } + } + } + } + } + } + } + ] } }, "description": "!!Auto generated!! \n Do not manually edit. " From 81b53c4fab68f03aa508c0efddf44858f5d42a66 Mon Sep 17 00:00:00 2001 From: Laurent Broudoux Date: Tue, 28 Nov 2023 16:40:08 -0600 Subject: [PATCH 098/102] feat: adapt Kafka bindings to v3 - take 2 (#453) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Fran Méndez --- definitions/3.0.0/messageBindingsObject.json | 15 +-------------- definitions/3.0.0/operationBindingsObject.json | 15 +-------------- 2 files changed, 2 insertions(+), 28 deletions(-) diff --git a/definitions/3.0.0/messageBindingsObject.json b/definitions/3.0.0/messageBindingsObject.json index fc2e6fc9..0bbb1e11 100644 --- a/definitions/3.0.0/messageBindingsObject.json +++ b/definitions/3.0.0/messageBindingsObject.json @@ -119,7 +119,7 @@ "kafka": { "properties": { "bindingVersion": { - "enum": ["0.4.0", "0.3.0", "0.1.0"] + "enum": ["0.4.0", "0.3.0"] } }, "allOf": [ @@ -161,19 +161,6 @@ "then": { "$ref": "http://asyncapi.com/bindings/kafka/0.3.0/message.json" } - }, - { - "if": { - "required": [ "bindingVersion" ], - "properties": { - "bindingVersion": { - "const": "0.1.0" - } - } - }, - "then": { - "$ref": "http://asyncapi.com/bindings/kafka/0.1.0/message.json" - } } ] }, diff --git a/definitions/3.0.0/operationBindingsObject.json b/definitions/3.0.0/operationBindingsObject.json index ee31a2bb..5ed6837f 100644 --- a/definitions/3.0.0/operationBindingsObject.json +++ b/definitions/3.0.0/operationBindingsObject.json @@ -119,7 +119,7 @@ "kafka": { "properties": { "bindingVersion": { - "enum": ["0.4.0", "0.3.0", "0.1.0"] + "enum": ["0.4.0", "0.3.0"] } }, "allOf": [ @@ -161,19 +161,6 @@ "then": { "$ref": "http://asyncapi.com/bindings/kafka/0.3.0/operation.json" } - }, - { - "if": { - "required": [ "bindingVersion" ], - "properties": { - "bindingVersion": { - "const": "0.1.0" - } - } - }, - "then": { - "$ref": "http://asyncapi.com/bindings/kafka/0.1.0/operation.json" - } } ] }, From 31f4f9c9cffe2838be58ca0711fcb55c7fb05a87 Mon Sep 17 00:00:00 2001 From: asyncapi-bot Date: Tue, 28 Nov 2023 23:42:34 +0100 Subject: [PATCH 099/102] chore(release): v6.0.0-next-major-spec.15 (#456) --- package-lock.json | 214 ++++++--------------------------- package.json | 2 +- schemas/3.0.0-without-$id.json | 121 +------------------ schemas/3.0.0.json | 123 +------------------ 4 files changed, 45 insertions(+), 415 deletions(-) diff --git a/package-lock.json b/package-lock.json index 5f3e3bed..d2d60d41 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@asyncapi/specs", - "version": "6.0.0-next-major-spec.14", + "version": "6.0.0-next-major-spec.15", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@asyncapi/specs", - "version": "6.0.0-next-major-spec.14", + "version": "6.0.0-next-major-spec.15", "license": "Apache-2.0", "dependencies": { "@types/json-schema": "^7.0.11" @@ -2654,16 +2654,6 @@ } }, "dependencies": { - "@babel/code-frame": { - "version": "7.22.13", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.13.tgz", - "integrity": "sha512-XktuhWlJ5g+3TJXc5upd9Ks1HutSArik6jf2eAjYFyIOf4ej3RN+184cZbzDvbPnuTJIUhPKKJE3cIsYTiAT3w==", - "dev": true, - "requires": { - "@babel/highlight": "^7.22.13", - "chalk": "^2.4.2" - } - }, "@babel/core": { "version": "7.12.13", "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.12.13.tgz", @@ -2740,38 +2730,24 @@ } } }, - "@babel/helper-environment-visitor": { - "version": "7.22.20", - "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.20.tgz", - "integrity": "sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA==", - "dev": true + "@babel/helper-function-name": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.12.13.tgz", + "integrity": "sha512-TZvmPn0UOqmvi5G4vvw0qZTpVptGkB1GL61R6lKvrSdIxGm5Pky7Q3fpKiIkQCAtRCBUwB0PaThlx9vebCDSwA==", + "dev": true, + "requires": { + "@babel/helper-get-function-arity": "^7.12.13", + "@babel/template": "^7.12.13", + "@babel/types": "^7.12.13" + } }, - "@babel/helper-hoist-variables": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.22.5.tgz", - "integrity": "sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==", + "@babel/helper-get-function-arity": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.12.13.tgz", + "integrity": "sha512-DjEVzQNz5LICkzN0REdpD5prGoidvbdYk1BVgRUOINaWJP2t6avB27X1guXK1kXNrX0WMfsrm1A/ZBthYuIMQg==", "dev": true, "requires": { - "@babel/types": "^7.22.5" - }, - "dependencies": { - "@babel/helper-validator-identifier": { - "version": "7.22.20", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz", - "integrity": "sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==", - "dev": true - }, - "@babel/types": { - "version": "7.23.0", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.23.0.tgz", - "integrity": "sha512-0oIyUfKoI3mSqMvsxBdclDwxXKXAUA8v/apZbc+iSyARYou1o8ZGDxbUYyLFoW2arqS2jDGqJuZvv1d/io1axg==", - "dev": true, - "requires": { - "@babel/helper-string-parser": "^7.22.5", - "@babel/helper-validator-identifier": "^7.22.20", - "to-fast-properties": "^2.0.0" - } - } + "@babel/types": "^7.12.13" } }, "@babel/helper-member-expression-to-functions": { @@ -2848,12 +2824,6 @@ "@babel/types": "^7.12.13" } }, - "@babel/helper-string-parser": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.22.5.tgz", - "integrity": "sha512-mM4COjgZox8U+JcXQwPijIZLElkgEpO5rsERVDJTc2qfCDfERyob6k5WegS14SX18IIjv+XD+GrqNumY5JRCDw==", - "dev": true - }, "@babel/helper-validator-identifier": { "version": "7.12.11", "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.12.11.tgz", @@ -2871,25 +2841,6 @@ "@babel/types": "^7.12.13" } }, - "@babel/highlight": { - "version": "7.22.20", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.22.20.tgz", - "integrity": "sha512-dkdMCN3py0+ksCgYmGG8jKeGA/8Tk+gJwSYYlFGxG5lmhfKNoAy004YpLxpS1W2J8m/EK2Ew+yOs9pVRwO89mg==", - "dev": true, - "requires": { - "@babel/helper-validator-identifier": "^7.22.20", - "chalk": "^2.4.2", - "js-tokens": "^4.0.0" - }, - "dependencies": { - "@babel/helper-validator-identifier": { - "version": "7.22.20", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz", - "integrity": "sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==", - "dev": true - } - } - }, "@babel/parser": { "version": "7.12.13", "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.12.13.tgz", @@ -2930,86 +2881,40 @@ } }, "@babel/traverse": { - "version": "7.23.2", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.23.2.tgz", - "integrity": "sha512-azpe59SQ48qG6nu2CzcMLbxUudtN+dOM9kDbUqGq3HXUJRlo7i8fvPoxQUzYgLZ4cMVmuZgm8vvBpNeRhd6XSw==", + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.12.13.tgz", + "integrity": "sha512-3Zb4w7eE/OslI0fTp8c7b286/cQps3+vdLW3UcwC8VSJC6GbKn55aeVVu2QJNuCDoeKyptLOFrPq8WqZZBodyA==", "dev": true, "requires": { - "@babel/code-frame": "^7.22.13", - "@babel/generator": "^7.23.0", - "@babel/helper-environment-visitor": "^7.22.20", - "@babel/helper-function-name": "^7.23.0", - "@babel/helper-hoist-variables": "^7.22.5", - "@babel/helper-split-export-declaration": "^7.22.6", - "@babel/parser": "^7.23.0", - "@babel/types": "^7.23.0", + "@babel/code-frame": "^7.12.13", + "@babel/generator": "^7.12.13", + "@babel/helper-function-name": "^7.12.13", + "@babel/helper-split-export-declaration": "^7.12.13", + "@babel/parser": "^7.12.13", + "@babel/types": "^7.12.13", "debug": "^4.1.0", - "globals": "^11.1.0" + "globals": "^11.1.0", + "lodash": "^4.17.19" }, "dependencies": { - "@babel/generator": { - "version": "7.23.0", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.23.0.tgz", - "integrity": "sha512-lN85QRR+5IbYrMWM6Y4pE/noaQtg4pNiqeNGX60eqOfo6gtEj6uw/JagelB8vVztSd7R6M5n1+PQkDbHbBRU4g==", - "dev": true, - "requires": { - "@babel/types": "^7.23.0", - "@jridgewell/gen-mapping": "^0.3.2", - "@jridgewell/trace-mapping": "^0.3.17", - "jsesc": "^2.5.1" - } - }, - "@babel/helper-function-name": { - "version": "7.23.0", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.23.0.tgz", - "integrity": "sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw==", - "dev": true, - "requires": { - "@babel/template": "^7.22.15", - "@babel/types": "^7.23.0" - } - }, - "@babel/helper-split-export-declaration": { - "version": "7.22.6", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.6.tgz", - "integrity": "sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==", - "dev": true, - "requires": { - "@babel/types": "^7.22.5" - } - }, - "@babel/helper-validator-identifier": { - "version": "7.22.20", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz", - "integrity": "sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==", - "dev": true - }, - "@babel/parser": { - "version": "7.23.0", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.23.0.tgz", - "integrity": "sha512-vvPKKdMemU85V9WE/l5wZEmImpCtLqbnTvqDS2U1fJ96KrxoW7KrXhNsNCblQlg8Ck4b85yxdTyelsMUgFUXiw==", - "dev": true - }, - "@babel/template": { - "version": "7.22.15", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.22.15.tgz", - "integrity": "sha512-QPErUVm4uyJa60rkI73qneDacvdvzxshT3kksGqlGWYdOTIUOwJ7RDUL8sGqslY1uXWSL6xMFKEXDS3ox2uF0w==", + "@babel/code-frame": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.13.tgz", + "integrity": "sha512-HV1Cm0Q3ZrpCR93tkWOYiuYIgLxZXZFVG2VgK+MBWjUqZTundupbfx2aXarXuw5Ko5aMcjtJgbSs4vUGBS5v6g==", "dev": true, "requires": { - "@babel/code-frame": "^7.22.13", - "@babel/parser": "^7.22.15", - "@babel/types": "^7.22.15" + "@babel/highlight": "^7.12.13" } }, - "@babel/types": { - "version": "7.23.0", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.23.0.tgz", - "integrity": "sha512-0oIyUfKoI3mSqMvsxBdclDwxXKXAUA8v/apZbc+iSyARYou1o8ZGDxbUYyLFoW2arqS2jDGqJuZvv1d/io1axg==", + "@babel/highlight": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.12.13.tgz", + "integrity": "sha512-kocDQvIbgMKlWxXe9fof3TQ+gkIPOUSEYhJjqUjvKMez3krV7vbzYCDq39Oj11UAVK7JqPVGQPlgE85dPNlQww==", "dev": true, "requires": { - "@babel/helper-string-parser": "^7.22.5", - "@babel/helper-validator-identifier": "^7.22.20", - "to-fast-properties": "^2.0.0" + "@babel/helper-validator-identifier": "^7.12.11", + "chalk": "^2.0.0", + "js-tokens": "^4.0.0" } } } @@ -3095,45 +3000,6 @@ "integrity": "sha512-tsAQNx32a8CoFhjhijUIhI4kccIAgmGhy8LZMZgGfmXcpMbPRUqn5LWmgRttILi6yeGmBJd2xsPkFMs0PzgPCw==", "dev": true }, - "@jridgewell/gen-mapping": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz", - "integrity": "sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==", - "dev": true, - "requires": { - "@jridgewell/set-array": "^1.0.1", - "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.9" - } - }, - "@jridgewell/resolve-uri": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz", - "integrity": "sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==", - "dev": true - }, - "@jridgewell/set-array": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz", - "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==", - "dev": true - }, - "@jridgewell/sourcemap-codec": { - "version": "1.4.15", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", - "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==", - "dev": true - }, - "@jridgewell/trace-mapping": { - "version": "0.3.19", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.19.tgz", - "integrity": "sha512-kf37QtfW+Hwx/buWGMPcR60iF9ziHa6r/CZJIHbmcm4+0qrXiVdxegAH0F6yddEVQ7zdkjcGCgCzUu+BcbhQxw==", - "dev": true, - "requires": { - "@jridgewell/resolve-uri": "^3.1.0", - "@jridgewell/sourcemap-codec": "^1.4.14" - } - }, "@types/json-schema": { "version": "7.0.11", "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.11.tgz", diff --git a/package.json b/package.json index 37de273c..77e9404f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@asyncapi/specs", - "version": "6.0.0-next-major-spec.14", + "version": "6.0.0-next-major-spec.15", "description": "AsyncAPI schema versions", "main": "index.js", "types": "index.d.ts", diff --git a/schemas/3.0.0-without-$id.json b/schemas/3.0.0-without-$id.json index 0afbfd05..bc4f7974 100644 --- a/schemas/3.0.0-without-$id.json +++ b/schemas/3.0.0-without-$id.json @@ -3639,8 +3639,7 @@ "bindingVersion": { "enum": [ "0.4.0", - "0.3.0", - "0.1.0" + "0.3.0" ] } }, @@ -3687,21 +3686,6 @@ "then": { "$ref": "#/definitions/bindings-kafka-0.3.0-message" } - }, - { - "if": { - "required": [ - "bindingVersion" - ], - "properties": { - "bindingVersion": { - "const": "0.1.0" - } - } - }, - "then": { - "$ref": "#/definitions/bindings-kafka-0.1.0-message" - } } ] }, @@ -4098,46 +4082,6 @@ } ] }, - "bindings-kafka-0.1.0-message": { - "title": "Kafka message bindings object", - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "properties": { - "key": { - "$ref": "#/definitions/schema", - "description": "The message key." - }, - "bindingVersion": { - "type": "string", - "enum": [ - "0.1.0" - ], - "description": "The version of this binding. If omitted, 'latest' MUST be assumed." - } - }, - "examples": [ - { - "key": { - "type": "string", - "enum": [ - "myKey" - ] - }, - "bindingVersion": "0.1.0" - }, - { - "key": { - "$ref": "path/to/user-create.avsc#/UserCreate" - }, - "bindingVersion": "0.2.0" - } - ] - }, "bindings-anypointmq-0.0.1-message": { "title": "Anypoint MQ message bindings object", "description": "This object contains configuration for describing an Anypoint MQ message as an AsyncAPI message. This objects only contains configuration that can not be provided in the AsyncAPI standard message object.", @@ -6590,8 +6534,7 @@ "bindingVersion": { "enum": [ "0.4.0", - "0.3.0", - "0.1.0" + "0.3.0" ] } }, @@ -6638,21 +6581,6 @@ "then": { "$ref": "#/definitions/bindings-kafka-0.3.0-operation" } - }, - { - "if": { - "required": [ - "bindingVersion" - ], - "properties": { - "bindingVersion": { - "const": "0.1.0" - } - } - }, - "then": { - "$ref": "#/definitions/bindings-kafka-0.1.0-operation" - } } ] }, @@ -7122,51 +7050,6 @@ } ] }, - "bindings-kafka-0.1.0-operation": { - "title": "Kafka operation message bindings object", - "description": "This object contains information about the operation representation in Kafka.", - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "properties": { - "groupId": { - "$ref": "#/definitions/schema", - "description": "Id of the consumer group." - }, - "clientId": { - "$ref": "#/definitions/schema", - "description": "Id of the consumer inside a consumer group." - }, - "bindingVersion": { - "type": "string", - "enum": [ - "0.1.0" - ], - "description": "The version of this binding. If omitted, 'latest' MUST be assumed." - } - }, - "examples": [ - { - "groupId": { - "type": "string", - "enum": [ - "myGroupId" - ] - }, - "clientId": { - "type": "string", - "enum": [ - "myClientId" - ] - }, - "bindingVersion": "0.1.0" - } - ] - }, "bindings-nats-0.1.0-operation": { "title": "NATS operation bindings object", "description": "This object contains information about the operation representation in NATS.", diff --git a/schemas/3.0.0.json b/schemas/3.0.0.json index fbb5ab8f..8f80aaa7 100644 --- a/schemas/3.0.0.json +++ b/schemas/3.0.0.json @@ -3693,8 +3693,7 @@ "bindingVersion": { "enum": [ "0.4.0", - "0.3.0", - "0.1.0" + "0.3.0" ] } }, @@ -3741,21 +3740,6 @@ "then": { "$ref": "http://asyncapi.com/bindings/kafka/0.3.0/message.json" } - }, - { - "if": { - "required": [ - "bindingVersion" - ], - "properties": { - "bindingVersion": { - "const": "0.1.0" - } - } - }, - "then": { - "$ref": "http://asyncapi.com/bindings/kafka/0.1.0/message.json" - } } ] }, @@ -4157,47 +4141,6 @@ } ] }, - "http://asyncapi.com/bindings/kafka/0.1.0/message.json": { - "$id": "http://asyncapi.com/bindings/kafka/0.1.0/message.json", - "title": "Kafka message bindings object", - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" - } - }, - "properties": { - "key": { - "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json", - "description": "The message key." - }, - "bindingVersion": { - "type": "string", - "enum": [ - "0.1.0" - ], - "description": "The version of this binding. If omitted, 'latest' MUST be assumed." - } - }, - "examples": [ - { - "key": { - "type": "string", - "enum": [ - "myKey" - ] - }, - "bindingVersion": "0.1.0" - }, - { - "key": { - "$ref": "path/to/user-create.avsc#/UserCreate" - }, - "bindingVersion": "0.2.0" - } - ] - }, "http://asyncapi.com/bindings/anypointmq/0.0.1/message.json": { "$id": "http://asyncapi.com/bindings/anypointmq/0.0.1/message.json", "title": "Anypoint MQ message bindings object", @@ -6675,8 +6618,7 @@ "bindingVersion": { "enum": [ "0.4.0", - "0.3.0", - "0.1.0" + "0.3.0" ] } }, @@ -6723,21 +6665,6 @@ "then": { "$ref": "http://asyncapi.com/bindings/kafka/0.3.0/operation.json" } - }, - { - "if": { - "required": [ - "bindingVersion" - ], - "properties": { - "bindingVersion": { - "const": "0.1.0" - } - } - }, - "then": { - "$ref": "http://asyncapi.com/bindings/kafka/0.1.0/operation.json" - } } ] }, @@ -7212,52 +7139,6 @@ } ] }, - "http://asyncapi.com/bindings/kafka/0.1.0/operation.json": { - "$id": "http://asyncapi.com/bindings/kafka/0.1.0/operation.json", - "title": "Kafka operation message bindings object", - "description": "This object contains information about the operation representation in Kafka.", - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" - } - }, - "properties": { - "groupId": { - "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json", - "description": "Id of the consumer group." - }, - "clientId": { - "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json", - "description": "Id of the consumer inside a consumer group." - }, - "bindingVersion": { - "type": "string", - "enum": [ - "0.1.0" - ], - "description": "The version of this binding. If omitted, 'latest' MUST be assumed." - } - }, - "examples": [ - { - "groupId": { - "type": "string", - "enum": [ - "myGroupId" - ] - }, - "clientId": { - "type": "string", - "enum": [ - "myClientId" - ] - }, - "bindingVersion": "0.1.0" - } - ] - }, "http://asyncapi.com/bindings/nats/0.1.0/operation.json": { "$id": "http://asyncapi.com/bindings/nats/0.1.0/operation.json", "title": "NATS operation bindings object", From 24e105a197bb864ad8dac5d50bfb5450f5676225 Mon Sep 17 00:00:00 2001 From: Jonas Lagoni Date: Thu, 30 Nov 2023 01:10:24 -1000 Subject: [PATCH 100/102] fix: prepare `next-major-spec` for release (#421) Co-authored-by: Sergio Moya <1083296+smoya@users.noreply.github.com> --- README.md | 4 +++- migrations/migrate-to-version-5.md | 28 ++++++++++++++++++++++++++++ migrations/migrate-to-version-6.md | 21 +++++++++++++++++++++ schemas/all.schema-store.json | 14 ++++++++++++++ 4 files changed, 66 insertions(+), 1 deletion(-) create mode 100644 migrations/migrate-to-version-5.md create mode 100644 migrations/migrate-to-version-6.md diff --git a/README.md b/README.md index 97315fb2..9fe26680 100644 --- a/README.md +++ b/README.md @@ -108,6 +108,8 @@ func Do() { If you are currently using version 2, check out [migration guideline to version 3](./migrations/migrate-to-version-3.md). If you are currently using version 3, check out [migration guideline to version 4](./migrations/migrate-to-version-4.md). +If you are currently using version 4, check out [migration guideline to version 5](./migrations/migrate-to-version-5.md). +If you are currently using version 5, check out [migration guideline to version 6](./migrations/migrate-to-version-6.md). ## Repository structure @@ -183,7 +185,7 @@ Whenever a Breaking Change is introduced, the following steps should be taken in ## SchemaStore compatibility testing -AsyncAPI JSON Schema is referenced in [SchemaStore](https://www.schemastore.org/json/). In many IDEs, like VSCode, some extensions integrate with SchemaStore, like [YAML](https://marketplace.visualstudio.com/items?itemName=redhat.vscode-yaml). This way we enable autocompletion, validation and tooltips that helps writing AsyncAPI documents. +AsyncAPI JSON Schema is referenced in [SchemaStore](https://www.schemastore.org/json/). In many IDEs, like VSCode, some extensions integrate with SchemaStore, like [YAML](https://marketplace.visualstudio.com/items?itemName=redhat.vscode-yaml). This way we enable autocompletion, validation and tooltips that help write AsyncAPI documents. Whenever you make changes in AsyncAPI JSON Schema, you should always manually verify that the schema is still supported by [YAML](https://marketplace.visualstudio.com/items?itemName=redhat.vscode-yaml) and that it will be able to fetch and dereference it. diff --git a/migrations/migrate-to-version-5.md b/migrations/migrate-to-version-5.md new file mode 100644 index 00000000..3ea00da2 --- /dev/null +++ b/migrations/migrate-to-version-5.md @@ -0,0 +1,28 @@ +# Migrating to version 5 + +In version 5, we now export two different types of schemas, one using `$id` feature in JSON Schema, and one without. + +In v4, the library would export the schemas as: +```js +module.exports = { + '2.0.0': require('./schemas/2.0.0.json'), + ... +}; +``` + +In v5, you need to access the schemas through `.schemas` instead. + +```js +module.exports = { + 'schemas': { + '2.0.0': require('./schemas/2.0.0.json'), + ... + }, + 'schemasWithoutId': { + '2.0.0': require('./schemas/2.0.0-without-$id.json'), + ... + } +}; +``` + +And if you want the schemas without `$id`, use `schemasWithoutId`. \ No newline at end of file diff --git a/migrations/migrate-to-version-6.md b/migrations/migrate-to-version-6.md new file mode 100644 index 00000000..c246cbdd --- /dev/null +++ b/migrations/migrate-to-version-6.md @@ -0,0 +1,21 @@ +# Migrating to version 6 + +In version 6 and onwards, all pre-release AsyncAPI specification versions will be released as a regular feature request, before the AsyncAPI specification itself is released. + +The pre-release version will be released as if it was not a pre-release, for example for AsyncAPI 3.0, it will be released as normal: +```js +module.exports = { + 'schemas': { + ... + '3.0.0': require('./schemas/3.0.0.json'), + }, + 'schemasWithoutId': { + ... + '3.0.0': require('./schemas/3.0.0-without-$id.json'), + } +}; +``` + +However, while it's still a pre-release, the underlying schemas CAN contain breaking changes from version to version, up until the AsyncAPI specification is released. This means that one AsyncAPI document using v3 in the pre-release stage might be valid in `6.0.0`, but invalid in the `6.1.0`. This ONLY applies to pre-release schemas, and NOT regular ones that are set in stone. + +If you want to make sure you don't use a schema not released yet, you have to whitelist which versions you allow in your tool. \ No newline at end of file diff --git a/schemas/all.schema-store.json b/schemas/all.schema-store.json index e774f6fd..c8241a9e 100644 --- a/schemas/all.schema-store.json +++ b/schemas/all.schema-store.json @@ -172,6 +172,20 @@ "$ref": "http://asyncapi.com/schema-store/2.6.0-without-$id.json" } ] + }, + { + "allOf": [ + { + "properties": { + "asyncapi": { + "const": "3.0.0" + } + } + }, + { + "$ref": "http://asyncapi.com/schema-store/3.0.0-without-$id.json" + } + ] } ] } From 4826a849c989350ae8be672033751f3432f4ef61 Mon Sep 17 00:00:00 2001 From: asyncapi-bot Date: Thu, 30 Nov 2023 12:13:05 +0100 Subject: [PATCH 101/102] chore(release): v6.0.0-next-major-spec.16 (#457) --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index d2d60d41..0ea4ac2c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@asyncapi/specs", - "version": "6.0.0-next-major-spec.15", + "version": "6.0.0-next-major-spec.16", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@asyncapi/specs", - "version": "6.0.0-next-major-spec.15", + "version": "6.0.0-next-major-spec.16", "license": "Apache-2.0", "dependencies": { "@types/json-schema": "^7.0.11" diff --git a/package.json b/package.json index 77e9404f..d33df423 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@asyncapi/specs", - "version": "6.0.0-next-major-spec.15", + "version": "6.0.0-next-major-spec.16", "description": "AsyncAPI schema versions", "main": "index.js", "types": "index.d.ts", From f9fc80f1bdd783d3d6ff933f0178e66698afe1ed Mon Sep 17 00:00:00 2001 From: Lukasz Gornicki Date: Thu, 30 Nov 2023 14:39:56 +0100 Subject: [PATCH 102/102] docs: update readme with new release strategy (#458) --- README.md | 31 ++++++++++++++++++++++-------- migrations/migrate-to-version-6.md | 2 +- 2 files changed, 24 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 9fe26680..0eb6ef1e 100644 --- a/README.md +++ b/README.md @@ -1,24 +1,39 @@ ![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) -# AsyncAPI +## Overview This is a mono repository, which provides all the JSON Schema documents for validating AsyncAPI documents. -## Overview +### Two types of schemas + +This repository contains [JSON Schema](https://json-schema.org) files for all the versions of AsyncAPI specification. There are two types of JSON Schema files, with and without **$id** feature. We need two versions of schemas because of the differences it tooling implementation of JSON Schema `$ref` and `$id` keywords. Some implementations treat `$id` by default as prefix reference for `$ref` and require it, therefore it is needed to properly correlate `$ref` and `$id` values. Unfortunately other tools do not understand `$id` values and fail dereferencing. This is why we need two different versions of schemas, with and without the `$id`. + +### Releases and pre-releases + +This repository contains JSON Schema files for official AsyncAPI releases and also for release candidates. Before you decide to use a specific JSON Schema file in production, make sure a corresponding [official release of AsyncAPI specification](https://github.com/asyncapi/spec/releases) is produced, not a release candidate. + +JSON Schema which describes a version of AsyncAPI specification that is not yet officially released is considered an unstable pre-release that can change anytime and is not considered to be a breaking-change. + +If you want to make sure you only use stable schemas, you have to make sure that you use only certain schema versions, not all by default. + +### JSON Schema vs AsyncAPI specification + +These JSON Schema files do not reflect 1:1 the specification and shouldn't be treated as specification itself but rather as a tool (e.g., for validation). + +These JSON Schema files shouldn't be used as the only tool for validating AsyncAPI documents because some rules described in the AsyncAPI specification can't be described with JSON Schema. + +### Libraries -* This repository contains [JSON Schema](https://json-schema.org) files for all the versions of AsyncAPI specification. There are two types of JSON Schema files, with and without **$id** feature. We need two versions of schemas because of the differences it tooling implementation of JSON Schema `$ref` and `$id` keywords. Some implementations treat `$id` by default as prefix reference for `$ref` and require it, therefore it is needed to properly correlate `$ref` and `$id` values. Unfortunately other tools do not understand `$id` values and fail dereferencing. This is why we need two different versions of schemas, with and without the `$id`. -* These JSON Schema files do not reflect 1:1 the specification and shouldn't be treated as specification itself but rather as a tool (e.g., for validation). -* These JSON Schema files shouldn't be used as the only tool for validating AsyncAPI documents because some rules described in the AsyncAPI specification can't be described with JSON Schema. -* In addition, this repo provides JavaScript and Go modules that make it easier to access JSON Schema files through code. These packages provide access only to schemas with version larger or equal 2.0.0. +In addition, this repo provides JavaScript and Go modules that make it easier to access JSON Schema files through code. These packages provide access only to schemas with version larger or equal 2.0.0. ## Custom Validation Needs If you decide to validate AsyncAPI documents only with the JSON Schema files provided in this repo, your AsyncAPI documents will not be properly validated. It's recommended to use [AsyncAPI JavaScript Parser](https://github.com/asyncapi/parser-js) that uses the AsyncAPI JSON Schema files for validation but also implements additional custom validations. -The following additional custom validations need to be provided: +The following additional custom validations need to be provided for documents prior to `3.0.0`: -* Variables provided in the URL property have a corresponding variable object defined and its example is correct. +* Variables provided in the `url` property have a corresponding variable object defined and its example is correct. * `operationId`s are not duplicated in the document. * `messageId`s are not duplicated in the document. * Server security is declared properly and the name has a corresponding `securitySchemes` definition in `components` with the same name. diff --git a/migrations/migrate-to-version-6.md b/migrations/migrate-to-version-6.md index c246cbdd..24c1a0d1 100644 --- a/migrations/migrate-to-version-6.md +++ b/migrations/migrate-to-version-6.md @@ -16,6 +16,6 @@ module.exports = { }; ``` -However, while it's still a pre-release, the underlying schemas CAN contain breaking changes from version to version, up until the AsyncAPI specification is released. This means that one AsyncAPI document using v3 in the pre-release stage might be valid in `6.0.0`, but invalid in the `6.1.0`. This ONLY applies to pre-release schemas, and NOT regular ones that are set in stone. +However, while it's still a pre-release, the underlying schemas CAN contain breaking changes from version to version, up until [the AsyncAPI specification is released](https://github.com/asyncapi/spec/releases). This means that one AsyncAPI document using v3 in the pre-release stage might be valid in `6.0.0`, but invalid in the `6.1.0`. This ONLY applies to pre-release schemas, and NOT regular ones that are set in stone. If you want to make sure you don't use a schema not released yet, you have to whitelist which versions you allow in your tool. \ No newline at end of file