From 32dbed811cafc0862c8f214e5793547a574e1df4 Mon Sep 17 00:00:00 2001 From: Lukasz Gornicki Date: Wed, 18 Jan 2023 09:05:23 +0100 Subject: [PATCH 1/5] chore: update `next-spec` with latest `master` (#301) --- .../workflows/add-good-first-issue-labels.yml | 2 + ...d-ready-to-merge-or-do-not-merge-label.yml | 17 +- ...ns-remove-ready-to-merge-label-on-edit.yml | 5 +- .github/workflows/if-go-pr-testing.yml | 69 -- .github/workflows/if-nodejs-pr-testing.yml | 6 +- .github/workflows/if-nodejs-release.yml | 9 + .../workflows/issues-prs-notifications.yml | 104 ++- .github/workflows/link-check-cron.yml | 38 +- .github/workflows/link-check-pr.yml | 27 +- .github/workflows/lint-pr-title.yml | 38 +- .../workflows/notify-tsc-members-mention.yml | 409 ++++++++---- .github/workflows/scripts/README.md | 1 + .../scripts/mailchimp/htmlContent.js | 495 ++++++++++++++ .github/workflows/scripts/mailchimp/index.js | 79 +++ .../scripts/mailchimp/package-lock.json | 612 ++++++++++++++++++ .../workflows/scripts/mailchimp/package.json | 9 + CODEOWNERS | 2 +- README.md | 46 +- definitions/2.5.0/parameter.json | 3 - definitions/2.5.0/parameters.json | 9 +- index.d.ts | 11 + index.js | 5 - ...o version 3.md => migrate-to-version-3.md} | 0 migrations/migrate-to-version-4.md | 3 + package-lock.json | 240 ++++--- package.json | 6 +- schemas/2.5.0.json | 12 +- schemas/all.schema-store.json | 16 +- test/index.js | 2 +- 29 files changed, 1803 insertions(+), 472 deletions(-) delete mode 100644 .github/workflows/if-go-pr-testing.yml create mode 100644 .github/workflows/scripts/README.md create mode 100644 .github/workflows/scripts/mailchimp/htmlContent.js create mode 100644 .github/workflows/scripts/mailchimp/index.js create mode 100644 .github/workflows/scripts/mailchimp/package-lock.json create mode 100644 .github/workflows/scripts/mailchimp/package.json create mode 100644 index.d.ts rename migrations/{Migrate to version 3.md => migrate-to-version-3.md} (100%) create mode 100644 migrations/migrate-to-version-4.md diff --git a/.github/workflows/add-good-first-issue-labels.yml b/.github/workflows/add-good-first-issue-labels.yml index dee10e72..20234526 100644 --- a/.github/workflows/add-good-first-issue-labels.yml +++ b/.github/workflows/add-good-first-issue-labels.yml @@ -28,8 +28,10 @@ jobs: break; case 'js': values[1] = 'javascript'; + break; case 'markdown': values[1] = 'docs'; + break; } if(values.length != 2 || !areas.includes(values[1])){ const message = `Hey @${context.payload.sender.login}, your message doesn't follow the requirements, you can try \`/help\`.` 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 e00a45fa..79c8079e 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 @@ -7,14 +7,14 @@ name: Label PRs # if proper comment added -on: - issue_comment: - types: - - created +on: + issue_comment: + types: + - created jobs: add-ready-to-merge-label: - if: > + if: > github.event.issue.pull_request && github.event.issue.state != 'closed' && github.actor != 'asyncapi-bot' && @@ -25,7 +25,6 @@ jobs: runs-on: ubuntu-latest steps: - - name: Add ready-to-merge label uses: actions/github-script@v5 with: @@ -64,7 +63,7 @@ jobs: Thanks πŸ˜„` }) } - + add-do-not-merge-label: if: > github.event.issue.pull_request && @@ -86,7 +85,7 @@ jobs: owner: context.repo.owner, repo: context.repo.repo, labels: ['do-not-merge'] - }) + }) add-autoupdate-label: if: > github.event.issue.pull_request && @@ -108,4 +107,4 @@ jobs: owner: context.repo.owner, repo: context.repo.repo, labels: ['autoupdate'] - }) + }) diff --git a/.github/workflows/automerge-for-humans-remove-ready-to-merge-label-on-edit.yml b/.github/workflows/automerge-for-humans-remove-ready-to-merge-label-on-edit.yml index f38296c8..b8fc9904 100644 --- a/.github/workflows/automerge-for-humans-remove-ready-to-merge-label-on-edit.yml +++ b/.github/workflows/automerge-for-humans-remove-ready-to-merge-label-on-edit.yml @@ -22,14 +22,11 @@ jobs: script: | const labelToRemove = 'ready-to-merge'; const labels = context.payload.pull_request.labels; - const isLabelPresent = labels.some(label => label.name === labelToRemove) - if(!isLabelPresent) return; - github.rest.issues.removeLabel({ issue_number: context.issue.number, owner: context.repo.owner, repo: context.repo.repo, name: labelToRemove - }) + }) diff --git a/.github/workflows/if-go-pr-testing.yml b/.github/workflows/if-go-pr-testing.yml deleted file mode 100644 index 606e689b..00000000 --- a/.github/workflows/if-go-pr-testing.yml +++ /dev/null @@ -1,69 +0,0 @@ -# This action is centrally managed in https://github.com/asyncapi/.github/ -# Don't make changes to this file in this repo as they will be overwritten with changes made to the same file in above mentioned repo - -# It does magic only if there is go.mod file in the root of the project -name: PR testing - if Go project - -on: - pull_request: - types: [opened, reopened, synchronize, ready_for_review] - -jobs: - lint-go-pr: - name: Lint Go PR - runs-on: ubuntu-latest - steps: - - if: "github.event.pull_request.draft == false &&!((github.actor == 'asyncapi-bot' && startsWith(github.event.pull_request.title, 'ci: update global workflows')) || (github.actor == 'asyncapi-bot' && startsWith(github.event.pull_request.title, 'chore(release):')) || (github.actor == 'allcontributors' && startsWith(github.event.pull_request.title, 'docs: add')))" - id: should_run - name: Should Run - run: echo "::set-output name=shouldrun::true" - - if: steps.should_run.outputs.shouldrun == 'true' - name: Checkout repository - uses: actions/checkout@v2 - - if: steps.should_run.outputs.shouldrun == 'true' - name: Check if Go project and has go.mod - id: gomod - run: test -e ./go.mod && echo "::set-output name=exists::true" || echo "::set-output name=exists::false" - shell: bash - - if: steps.gomod.outputs.exists == 'true' - name: Setup Go - uses: actions/setup-go@v2.1.3 - with: - go-version: 1.16 - - if: steps.gomod.outputs.exists == 'true' - name: golangci-lint - uses: golangci/golangci-lint-action@v2 # golangci-lint version extracted from go.mod. `latest` if missing. - with: - skip-go-installation: true # we wanna control the version of Go in use - - test-go-pr: - name: Test Go PR - ${{ matrix.os }} - runs-on: ${{ matrix.os }} - strategy: - matrix: - os: [ubuntu-latest, macos-latest, windows-latest] - steps: - - if: "github.event.pull_request.draft == false &&!((github.actor == 'asyncapi-bot' && startsWith(github.event.pull_request.title, 'ci: update global workflows')) || (github.actor == 'asyncapi-bot' && startsWith(github.event.pull_request.title, 'chore(release):')) || (github.actor == 'allcontributors' && startsWith(github.event.pull_request.title, 'docs: add')))" - id: should_run - name: Should Run - run: echo "::set-output name=shouldrun::true" - - if: steps.should_run.outputs.shouldrun == 'true' - name: Checkout repository - uses: actions/checkout@v2 - - if: steps.should_run.outputs.shouldrun == 'true' - name: Check if Go project and has go.mod - id: gomod - run: test -e ./go.mod && echo "::set-output name=exists::true" || echo "::set-output name=exists::false" - shell: bash - - if: steps.gomod.outputs.exists == 'true' - name: Setup Go - uses: actions/setup-go@v2.1.3 - with: - go-version: 1.16 - - if: steps.gomod.outputs.exists == 'true' - name: Build - run: go build -v ./... - - if: steps.gomod.outputs.exists == 'true' - name: Test - run: go test -v ./... - diff --git a/.github/workflows/if-nodejs-pr-testing.yml b/.github/workflows/if-nodejs-pr-testing.yml index 1dcccd32..cbe6ddbd 100644 --- a/.github/workflows/if-nodejs-pr-testing.yml +++ b/.github/workflows/if-nodejs-pr-testing.yml @@ -52,10 +52,10 @@ jobs: npm install --loglevel verbose - if: steps.packagejson.outputs.exists == 'true' name: Test - run: npm test + run: npm test --if-present - if: steps.packagejson.outputs.exists == 'true' name: Run linter - run: npm run lint + run: npm run lint --if-present - if: steps.packagejson.outputs.exists == 'true' name: Run release assets generation to make sure PR does not break it - run: npm run generate:assets + run: npm run generate:assets --if-present diff --git a/.github/workflows/if-nodejs-release.yml b/.github/workflows/if-nodejs-release.yml index 948edb89..73bffb04 100644 --- a/.github/workflows/if-nodejs-release.yml +++ b/.github/workflows/if-nodejs-release.yml @@ -19,6 +19,15 @@ on: jobs: test-nodejs: + # We just check the message of first commit as there is always just one commit because we squash into one before merging + # "commits" contains array of objects where one of the properties is commit "message" + # Release workflow will be skipped if release conventional commits are not used + if: | + startsWith( github.repository, 'asyncapi/' ) && + (startsWith( github.event.commits[0].message , 'fix:' ) || + startsWith( github.event.commits[0].message, 'fix!:' ) || + startsWith( github.event.commits[0].message, 'feat:' ) || + startsWith( github.event.commits[0].message, 'feat!:' )) name: Test NodeJS release on ${{ matrix.os }} runs-on: ${{ matrix.os }} strategy: diff --git a/.github/workflows/issues-prs-notifications.yml b/.github/workflows/issues-prs-notifications.yml index 576b2bac..ca665404 100644 --- a/.github/workflows/issues-prs-notifications.yml +++ b/.github/workflows/issues-prs-notifications.yml @@ -5,7 +5,6 @@ name: Notify slack on: - issues: types: [opened, reopened] @@ -16,57 +15,56 @@ on: types: [created] jobs: + issue: + if: github.event_name == 'issues' && github.actor != 'asyncapi-bot' && github.actor != 'dependabot[bot]' && github.actor != 'dependabot-preview[bot]' + name: Notify slack on every new issue + runs-on: ubuntu-latest + steps: + - name: Convert markdown to slack markdown for issue + uses: LoveToKnow/slackify-markdown-action@v1.0.0 + id: issuemarkdown + with: + text: "[${{github.event.issue.title}}](${{github.event.issue.html_url}}) \n ${{github.event.issue.body}}" + - name: Send info about issue + uses: rtCamp/action-slack-notify@v2 + env: + SLACK_WEBHOOK: ${{secrets.SLACK_GITHUB_NEWISSUEPR}} + SLACK_TITLE: πŸ› New Issue in ${{github.repository}} πŸ› + SLACK_MESSAGE: ${{steps.issuemarkdown.outputs.text}} + MSG_MINIMAL: true - issue: - if: github.event_name == 'issues' && github.actor != 'asyncapi-bot' && github.actor != 'dependabot[bot]' && github.actor != 'dependabot-preview[bot]' - name: Notify slack on every new issue - runs-on: ubuntu-latest - steps: - - name: Convert markdown to slack markdown for issue - uses: LoveToKnow/slackify-markdown-action@v1.0.0 - id: issuemarkdown - with: - text: "[${{github.event.issue.title}}](${{github.event.issue.html_url}}) \n ${{github.event.issue.body}}" - - name: Send info about issue - uses: rtCamp/action-slack-notify@v2 - env: - SLACK_WEBHOOK: ${{secrets.SLACK_GITHUB_NEWISSUEPR}} - SLACK_TITLE: πŸ› New Issue in ${{github.repository}} πŸ› - SLACK_MESSAGE: ${{steps.issuemarkdown.outputs.text}} - MSG_MINIMAL: true + pull_request: + if: github.event_name == 'pull_request_target' && github.actor != 'asyncapi-bot' && github.actor != 'dependabot[bot]' && github.actor != 'dependabot-preview[bot]' + name: Notify slack on every new pull request + runs-on: ubuntu-latest + steps: + - name: Convert markdown to slack markdown for pull request + uses: LoveToKnow/slackify-markdown-action@v1.0.0 + id: prmarkdown + with: + text: "[${{github.event.pull_request.title}}](${{github.event.pull_request.html_url}}) \n ${{github.event.pull_request.body}}" + - name: Send info about pull request + uses: rtCamp/action-slack-notify@v2 + env: + SLACK_WEBHOOK: ${{secrets.SLACK_GITHUB_NEWISSUEPR}} + SLACK_TITLE: πŸ’ͺ New Pull Request in ${{github.repository}} πŸ’ͺ + SLACK_MESSAGE: ${{steps.prmarkdown.outputs.text}} + MSG_MINIMAL: true - pull_request: - if: github.event_name == 'pull_request_target' && github.actor != 'asyncapi-bot' && github.actor != 'dependabot[bot]' && github.actor != 'dependabot-preview[bot]' - name: Notify slack on every new pull request - runs-on: ubuntu-latest - steps: - - name: Convert markdown to slack markdown for pull request - uses: LoveToKnow/slackify-markdown-action@v1.0.0 - id: prmarkdown - with: - text: "[${{github.event.pull_request.title}}](${{github.event.pull_request.html_url}}) \n ${{github.event.pull_request.body}}" - - name: Send info about pull request - uses: rtCamp/action-slack-notify@v2 - env: - SLACK_WEBHOOK: ${{secrets.SLACK_GITHUB_NEWISSUEPR}} - SLACK_TITLE: πŸ’ͺ New Pull Request in ${{github.repository}} πŸ’ͺ - SLACK_MESSAGE: ${{steps.prmarkdown.outputs.text}} - MSG_MINIMAL: true - - discussion: - if: github.event_name == 'discussion' && github.actor != 'asyncapi-bot' && github.actor != 'dependabot[bot]' && github.actor != 'dependabot-preview[bot]' - name: Notify slack on every new pull request - runs-on: ubuntu-latest - steps: - - name: Convert markdown to slack markdown for pull request - uses: LoveToKnow/slackify-markdown-action@v1.0.0 - id: discussionmarkdown - with: - text: "[${{github.event.discussion.title}}](${{github.event.discussion.html_url}}) \n ${{github.event.discussion.body}}" - - name: Send info about pull request - uses: rtCamp/action-slack-notify@v2 - env: - SLACK_WEBHOOK: ${{secrets.SLACK_GITHUB_NEWISSUEPR}} - SLACK_TITLE: πŸ’¬ New Discussion in ${{github.repository}} πŸ’¬ - SLACK_MESSAGE: ${{steps.discussionmarkdown.outputs.text}} - MSG_MINIMAL: true + discussion: + if: github.event_name == 'discussion' && github.actor != 'asyncapi-bot' && github.actor != 'dependabot[bot]' && github.actor != 'dependabot-preview[bot]' + name: Notify slack on every new pull request + runs-on: ubuntu-latest + steps: + - name: Convert markdown to slack markdown for pull request + uses: LoveToKnow/slackify-markdown-action@v1.0.0 + id: discussionmarkdown + with: + text: "[${{github.event.discussion.title}}](${{github.event.discussion.html_url}}) \n ${{github.event.discussion.body}}" + - name: Send info about pull request + uses: rtCamp/action-slack-notify@v2 + env: + SLACK_WEBHOOK: ${{secrets.SLACK_GITHUB_NEWISSUEPR}} + SLACK_TITLE: πŸ’¬ New Discussion in ${{github.repository}} πŸ’¬ + SLACK_MESSAGE: ${{steps.discussionmarkdown.outputs.text}} + MSG_MINIMAL: true diff --git a/.github/workflows/link-check-cron.yml b/.github/workflows/link-check-cron.yml index e992e2d6..873d4297 100644 --- a/.github/workflows/link-check-cron.yml +++ b/.github/workflows/link-check-cron.yml @@ -8,30 +8,30 @@ on: schedule: # At 00:00 UTC on every Monday - cron: '0 0 * * 0' - + jobs: External-link-validation-weekly: if: startsWith(github.repository, 'asyncapi/') runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v3 + + # Checks the status of hyperlinks in .md files + - name: Check links + uses: gaurav-nelson/github-action-markdown-link-check@0a51127e9955b855a9bbfa1ff5577f1d1338c9a5 #1.0.14 but pointing to commit for security reasons + with: + use-quiet-mode: 'yes' + use-verbose-mode: 'yes' - # Checks the status of hyperlinks in .md files - - name: Check links - uses: gaurav-nelson/github-action-markdown-link-check@0a51127e9955b855a9bbfa1ff5577f1d1338c9a5 #1.0.14 but pointing to commit for security reasons - with: - use-quiet-mode: 'yes' - use-verbose-mode: 'yes' - - # A configuration file can be included, indicating the properties of the link check action - # More information can be found here: https://github.com/tcort/markdown-link-check#config-file-format - # Create mlc_config.json file in the root of the directory + # A configuration file can be included, indicating the properties of the link check action + # More information can be found here: https://github.com/tcort/markdown-link-check#config-file-format + # Create mlc_config.json file in the root of the directory - - name: Report workflow run status to Slack - uses: 8398a7/action-slack@v3 - with: - status: ${{ job.status }} - fields: repo,action,workflow - env: + - name: Report workflow run status to Slack + uses: 8398a7/action-slack@v3 + with: + status: ${{ job.status }} + fields: repo,action,workflow + env: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_CI_FAIL_NOTIFY }} - if: failure() # Only, on failure, send a message on the 94_bot-failing-ci slack channel + if: failure() # Only, on failure, send a message on the 94_bot-failing-ci slack channel diff --git a/.github/workflows/link-check-pr.yml b/.github/workflows/link-check-pr.yml index deb425cb..51f6cf78 100644 --- a/.github/workflows/link-check-pr.yml +++ b/.github/workflows/link-check-pr.yml @@ -3,7 +3,7 @@ name: Check Markdown links -on: +on: pull_request_target: types: [synchronize, ready_for_review, opened, reopened] paths: @@ -13,15 +13,16 @@ jobs: External-link-validation-on-PR: runs-on: ubuntu-latest steps: - - name: Checkout repo - uses: actions/checkout@v3 - - name: Check links - uses: gaurav-nelson/github-action-markdown-link-check@0a51127e9955b855a9bbfa1ff5577f1d1338c9a5 #1.0.14 but pointing to commit for security reasons - with: - use-quiet-mode: 'yes' - use-verbose-mode: 'yes' - check-modified-files-only: 'yes' # Only modified files are checked on PRs - - # A configuration file can be included, indicating the properties of the link check action - # More information can be found here: https://github.com/tcort/markdown-link-check#config-file-format - # Create mlc_config.json file in the root of the directory + - name: Checkout repo + uses: actions/checkout@v3 + - name: Check links + uses: gaurav-nelson/github-action-markdown-link-check@0a51127e9955b855a9bbfa1ff5577f1d1338c9a5 #1.0.14 but pointing to commit for security reasons + with: + use-quiet-mode: 'yes' + use-verbose-mode: 'yes' + check-modified-files-only: 'yes' # Only modified files are checked on PRs + + + # A configuration file can be included, indicating the properties of the link check action + # More information can be found here: https://github.com/tcort/markdown-link-check#config-file-format + # Create mlc_config.json file in the root of the directory diff --git a/.github/workflows/lint-pr-title.yml b/.github/workflows/lint-pr-title.yml index 61835288..c4a942a9 100644 --- a/.github/workflows/lint-pr-title.yml +++ b/.github/workflows/lint-pr-title.yml @@ -1,22 +1,20 @@ # This action is centrally managed in https://github.com/asyncapi/.github/ # Don't make changes to this file in this repo as they will be overwritten with changes made to the same file in above mentioned repo - - name: Lint PR title on: pull_request_target: types: [opened, reopened, synchronize, edited, ready_for_review] - + jobs: lint-pr-title: - name: Lint PR title - runs-on: ubuntu-latest - steps: + name: Lint PR title + runs-on: ubuntu-latest + steps: # Since this workflow is REQUIRED for a PR to be mergable, we have to have this 'if' statement in step level instead of job level. - if: ${{ !contains(fromJson('["asyncapi-bot", "dependabot[bot]", "dependabot-preview[bot]", "allcontributors"]'), github.actor) }} - uses: amannn/action-semantic-pull-request@505e44b4f33b4c801f063838b3f053990ee46ea7 #version 4.6.0 + uses: amannn/action-semantic-pull-request@505e44b4f33b4c801f063838b3f053990ee46ea7 #version 4.6.0 id: lint_pr_title env: GITHUB_TOKEN: ${{ secrets.GH_TOKEN}} @@ -24,26 +22,26 @@ jobs: subjectPattern: ^(?![A-Z]).+$ subjectPatternError: | The subject "{subject}" found in the pull request title "{title}" should start with a lowercase character. - - # Comments the error message from the above lint_pr_title action - - if: ${{always() && !contains(fromJson('["asyncapi-bot", "dependabot[bot]", "dependabot-preview[bot]", "allcontributors"]'), github.actor)}} + + # Comments the error message from the above lint_pr_title action + - if: ${{ always() && steps.lint_pr_title.outputs.error_message != null && !contains(fromJson('["asyncapi-bot", "dependabot[bot]", "dependabot-preview[bot]", "allcontributors"]'), github.actor)}} name: Comment on PR - uses: marocchino/sticky-pull-request-comment@39c5b5dc7717447d0cba270cd115037d32d28443 #version 2.2 + uses: marocchino/sticky-pull-request-comment@39c5b5dc7717447d0cba270cd115037d32d28443 #version 2.2 with: header: pr-title-lint-error GITHUB_TOKEN: ${{ secrets.GH_TOKEN}} message: | - - We require all PRs to follow [Conventional Commits specification](https://www.conventionalcommits.org/en/v1.0.0/). - More details πŸ‘‡πŸΌ - ``` - ${{ steps.lint_pr_title.outputs.error_message}} - ``` - # deletes the error comment if the title is correct + + We require all PRs to follow [Conventional Commits specification](https://www.conventionalcommits.org/en/v1.0.0/). + More details πŸ‘‡πŸΌ + ``` + ${{ steps.lint_pr_title.outputs.error_message}} + ``` + # deletes the error comment if the title is correct - if: ${{ steps.lint_pr_title.outputs.error_message == null }} name: delete the comment - uses: marocchino/sticky-pull-request-comment@39c5b5dc7717447d0cba270cd115037d32d28443 #version 2.2 - with: + uses: marocchino/sticky-pull-request-comment@39c5b5dc7717447d0cba270cd115037d32d28443 #version 2.2 + with: header: pr-title-lint-error delete: true GITHUB_TOKEN: ${{ secrets.GH_TOKEN}} diff --git a/.github/workflows/notify-tsc-members-mention.yml b/.github/workflows/notify-tsc-members-mention.yml index e33b2625..e681c18a 100644 --- a/.github/workflows/notify-tsc-members-mention.yml +++ b/.github/workflows/notify-tsc-members-mention.yml @@ -2,141 +2,296 @@ # Don't make changes to this file in this repo as they will be overwritten with changes made to the same file in above mentioned repo # This action notifies community on slack whenever there is a new issue, PR or discussion started in given repository -name: Notify slack whenever TSC members are mentioned in GitHub +name: Notify slack and email subscribers whenever TSC members are mentioned in GitHub on: - issue_comment: - types: - - created - - edited - - discussion_comment: - types: - - created - - edited - - issues: - types: - - opened - - reopened + issue_comment: + types: + - created - pull_request_target: - types: - - opened - - reopened - - ready_for_review + discussion_comment: + types: + - created - discussion: - types: - - created - - edited + issues: + types: + - opened + + pull_request_target: + types: + - opened + + discussion: + types: + - created jobs: + issue: + if: github.event_name == 'issues' && contains(github.event.issue.body, '@asyncapi/tsc_members') + name: TSC notification on every new issue + runs-on: ubuntu-latest + steps: + ######### + # Handling Slack notifications + ######### + - name: Convert markdown to slack markdown + uses: LoveToKnow/slackify-markdown-action@v1.0.0 + id: issuemarkdown + with: + text: "[${{github.event.issue.title}}](${{github.event.issue.html_url}}) \n ${{github.event.issue.body}}" + - name: Send info about issue + uses: rtCamp/action-slack-notify@v2 + env: + SLACK_WEBHOOK: ${{secrets.SLACK_TSC_MEMBERS_NOTIFY}} + SLACK_TITLE: πŸ†˜ New issue that requires TSC Members attention πŸ†˜ + SLACK_MESSAGE: ${{steps.issuemarkdown.outputs.text}} + MSG_MINIMAL: true + ######### + # Handling Mailchimp notifications + ######### + - name: Checkout repository + uses: actions/checkout@v2 + - name: Setup Node.js + uses: actions/setup-node@v2 + with: + node-version: 16 + cache: 'npm' + cache-dependency-path: '**/package-lock.json' + - name: Install deps + run: npm install + working-directory: ./.github/workflows/scripts/mailchimp + - name: Send email with MailChimp + uses: actions/github-script@v4 + env: + CALENDAR_ID: ${{ secrets.CALENDAR_ID }} + CALENDAR_SERVICE_ACCOUNT: ${{ secrets.CALENDAR_SERVICE_ACCOUNT }} + MAILCHIMP_API_KEY: ${{ secrets.MAILCHIMP_API_KEY }} + with: + script: | + const sendEmail = require('./.github/workflows/scripts/mailchimp/index.js'); + sendEmail('${{github.event.issue.html_url}}', '${{github.event.issue.title}}'); - issue: - if: github.event_name == 'issues' && contains(github.event.issue.body, '@asyncapi/tsc_members') - name: TSC notification on every new issue - runs-on: ubuntu-latest - steps: - - name: Convert markdown to slack markdown - uses: LoveToKnow/slackify-markdown-action@v1.0.0 - id: issuemarkdown - with: - text: "[${{github.event.issue.title}}](${{github.event.issue.html_url}}) \n ${{github.event.issue.body}}" - - name: Send info about issue - uses: rtCamp/action-slack-notify@v2 - env: - SLACK_WEBHOOK: ${{secrets.SLACK_TSC_MEMBERS_NOTIFY}} - SLACK_TITLE: πŸ†˜ New issue that requires TSC Members attention πŸ†˜ - SLACK_MESSAGE: ${{steps.issuemarkdown.outputs.text}} - MSG_MINIMAL: true + pull_request: + if: github.event_name == 'pull_request_target' && contains(github.event.pull_request.body, '@asyncapi/tsc_members') + name: TSC notification on every new pull request + runs-on: ubuntu-latest + steps: + ######### + # Handling Slack notifications + ######### + - name: Convert markdown to slack markdown + uses: LoveToKnow/slackify-markdown-action@v1.0.0 + id: prmarkdown + with: + text: "[${{github.event.pull_request.title}}](${{github.event.pull_request.html_url}}) \n ${{github.event.pull_request.body}}" + - name: Send info about pull request + uses: rtCamp/action-slack-notify@v2 + env: + SLACK_WEBHOOK: ${{secrets.SLACK_TSC_MEMBERS_NOTIFY}} + SLACK_TITLE: πŸ†˜ New PR that requires TSC Members attention πŸ†˜ + SLACK_MESSAGE: ${{steps.prmarkdown.outputs.text}} + MSG_MINIMAL: true + ######### + # Handling Mailchimp notifications + ######### + - name: Checkout repository + uses: actions/checkout@v2 + - name: Setup Node.js + uses: actions/setup-node@v2 + with: + node-version: 16 + cache: 'npm' + cache-dependency-path: '**/package-lock.json' + - name: Install deps + run: npm install + working-directory: ./.github/workflows/scripts/mailchimp + - name: Send email with MailChimp + uses: actions/github-script@v4 + env: + CALENDAR_ID: ${{ secrets.CALENDAR_ID }} + CALENDAR_SERVICE_ACCOUNT: ${{ secrets.CALENDAR_SERVICE_ACCOUNT }} + MAILCHIMP_API_KEY: ${{ secrets.MAILCHIMP_API_KEY }} + with: + script: | + const sendEmail = require('./.github/workflows/scripts/mailchimp/index.js'); + sendEmail('${{github.event.pull_request.html_url}}', '${{github.event.pull_request.title}}'); - pull_request: - if: github.event_name == 'pull_request_target' && contains(github.event.pull_request.body, '@asyncapi/tsc_members') - name: TSC notification on every new pull request - runs-on: ubuntu-latest - steps: - - name: Convert markdown to slack markdown - uses: LoveToKnow/slackify-markdown-action@v1.0.0 - id: prmarkdown - with: - text: "[${{github.event.pull_request.title}}](${{github.event.pull_request.html_url}}) \n ${{github.event.pull_request.body}}" - - name: Send info about pull request - uses: rtCamp/action-slack-notify@v2 - env: - SLACK_WEBHOOK: ${{secrets.SLACK_TSC_MEMBERS_NOTIFY}} - SLACK_TITLE: πŸ†˜ New PR that requires TSC Members attention πŸ†˜ - SLACK_MESSAGE: ${{steps.prmarkdown.outputs.text}} - MSG_MINIMAL: true - - discussion: - if: github.event_name == 'discussion' && contains(github.event.discussion.body, '@asyncapi/tsc_members') - name: TSC notification on every new discussion - runs-on: ubuntu-latest - steps: - - name: Convert markdown to slack markdown - uses: LoveToKnow/slackify-markdown-action@v1.0.0 - id: discussionmarkdown - with: - text: "[${{github.event.discussion.title}}](${{github.event.discussion.html_url}}) \n ${{github.event.discussion.body}}" - - name: Send info about pull request - uses: rtCamp/action-slack-notify@v2 - env: - SLACK_WEBHOOK: ${{secrets.SLACK_TSC_MEMBERS_NOTIFY}} - SLACK_TITLE: πŸ†˜ New discussion that requires TSC Members attention πŸ†˜ - SLACK_MESSAGE: ${{steps.discussionmarkdown.outputs.text}} - MSG_MINIMAL: true + discussion: + if: github.event_name == 'discussion' && contains(github.event.discussion.body, '@asyncapi/tsc_members') + name: TSC notification on every new discussion + runs-on: ubuntu-latest + steps: + ######### + # Handling Slack notifications + ######### + - name: Convert markdown to slack markdown + uses: LoveToKnow/slackify-markdown-action@v1.0.0 + id: discussionmarkdown + with: + text: "[${{github.event.discussion.title}}](${{github.event.discussion.html_url}}) \n ${{github.event.discussion.body}}" + - name: Send info about pull request + uses: rtCamp/action-slack-notify@v2 + env: + SLACK_WEBHOOK: ${{secrets.SLACK_TSC_MEMBERS_NOTIFY}} + SLACK_TITLE: πŸ†˜ New discussion that requires TSC Members attention πŸ†˜ + SLACK_MESSAGE: ${{steps.discussionmarkdown.outputs.text}} + MSG_MINIMAL: true + ######### + # Handling Mailchimp notifications + ######### + - name: Checkout repository + uses: actions/checkout@v2 + - name: Setup Node.js + uses: actions/setup-node@v2 + with: + node-version: 16 + cache: 'npm' + cache-dependency-path: '**/package-lock.json' + - name: Install deps + run: npm install + working-directory: ./.github/workflows/scripts/mailchimp + - name: Send email with MailChimp + uses: actions/github-script@v4 + env: + CALENDAR_ID: ${{ secrets.CALENDAR_ID }} + CALENDAR_SERVICE_ACCOUNT: ${{ secrets.CALENDAR_SERVICE_ACCOUNT }} + MAILCHIMP_API_KEY: ${{ secrets.MAILCHIMP_API_KEY }} + with: + script: | + const sendEmail = require('./.github/workflows/scripts/mailchimp/index.js'); + sendEmail('${{github.event.discussion.html_url}}', '${{github.event.discussion.title}}'); - issue_comment: - if: ${{ github.event_name == 'issue_comment' && !github.event.issue.pull_request && contains(github.event.comment.body, '@asyncapi/tsc_members') }} - name: TSC notification on every new comment in issue - runs-on: ubuntu-latest - steps: - - name: Convert markdown to slack markdown - uses: LoveToKnow/slackify-markdown-action@v1.0.0 - id: issuemarkdown - with: - text: "[${{github.event.issue.title}}](${{github.event.comment.html_url}}) \n ${{github.event.comment.body}}" - - name: Send info about issue comment - uses: rtCamp/action-slack-notify@v2 - env: - SLACK_WEBHOOK: ${{secrets.SLACK_TSC_MEMBERS_NOTIFY}} - SLACK_TITLE: πŸ†˜ New comment under existing issue that requires TSC Members attention πŸ†˜ - SLACK_MESSAGE: ${{steps.issuemarkdown.outputs.text}} - MSG_MINIMAL: true + issue_comment: + if: ${{ github.event_name == 'issue_comment' && !github.event.issue.pull_request && contains(github.event.comment.body, '@asyncapi/tsc_members') }} + name: TSC notification on every new comment in issue + runs-on: ubuntu-latest + steps: + ######### + # Handling Slack notifications + ######### + - name: Convert markdown to slack markdown + uses: LoveToKnow/slackify-markdown-action@v1.0.0 + id: issuemarkdown + with: + text: "[${{github.event.issue.title}}](${{github.event.comment.html_url}}) \n ${{github.event.comment.body}}" + - name: Send info about issue comment + uses: rtCamp/action-slack-notify@v2 + env: + SLACK_WEBHOOK: ${{secrets.SLACK_TSC_MEMBERS_NOTIFY}} + SLACK_TITLE: πŸ†˜ New comment under existing issue that requires TSC Members attention πŸ†˜ + SLACK_MESSAGE: ${{steps.issuemarkdown.outputs.text}} + MSG_MINIMAL: true + ######### + # Handling Mailchimp notifications + ######### + - name: Checkout repository + uses: actions/checkout@v2 + - name: Setup Node.js + uses: actions/setup-node@v2 + with: + node-version: 16 + cache: 'npm' + cache-dependency-path: '**/package-lock.json' + - name: Install deps + run: npm install + working-directory: ./.github/workflows/scripts/mailchimp + - name: Send email with MailChimp + uses: actions/github-script@v4 + env: + CALENDAR_ID: ${{ secrets.CALENDAR_ID }} + CALENDAR_SERVICE_ACCOUNT: ${{ secrets.CALENDAR_SERVICE_ACCOUNT }} + MAILCHIMP_API_KEY: ${{ secrets.MAILCHIMP_API_KEY }} + with: + script: | + const sendEmail = require('./.github/workflows/scripts/mailchimp/index.js'); + sendEmail('${{github.event.comment.html_url}}', '${{github.event.issue.title}}'); - pr_comment: - if: github.event_name == 'issue_comment' && github.event.issue.pull_request && contains(github.event.comment.body, '@asyncapi/tsc_members') - name: TSC notification on every new comment in pr - runs-on: ubuntu-latest - steps: - - name: Convert markdown to slack markdown - uses: LoveToKnow/slackify-markdown-action@v1.0.0 - id: prmarkdown - with: - text: "[${{github.event.issue.title}}](${{github.event.comment.html_url}}) \n ${{github.event.comment.body}}" - - name: Send info about PR comment - uses: rtCamp/action-slack-notify@v2 - env: - SLACK_WEBHOOK: ${{secrets.SLACK_TSC_MEMBERS_NOTIFY}} - SLACK_TITLE: πŸ†˜ New comment under existing PR that requires TSC Members attention πŸ†˜ - SLACK_MESSAGE: ${{steps.prmarkdown.outputs.text}} - MSG_MINIMAL: true + pr_comment: + if: github.event_name == 'issue_comment' && github.event.issue.pull_request && contains(github.event.comment.body, '@asyncapi/tsc_members') + name: TSC notification on every new comment in pr + runs-on: ubuntu-latest + steps: + ######### + # Handling Slack notifications + ######### + - name: Convert markdown to slack markdown + uses: LoveToKnow/slackify-markdown-action@v1.0.0 + id: prmarkdown + with: + text: "[${{github.event.issue.title}}](${{github.event.comment.html_url}}) \n ${{github.event.comment.body}}" + - name: Send info about PR comment + uses: rtCamp/action-slack-notify@v2 + env: + SLACK_WEBHOOK: ${{secrets.SLACK_TSC_MEMBERS_NOTIFY}} + SLACK_TITLE: πŸ†˜ New comment under existing PR that requires TSC Members attention πŸ†˜ + SLACK_MESSAGE: ${{steps.prmarkdown.outputs.text}} + MSG_MINIMAL: true + ######### + # Handling Mailchimp notifications + ######### + - name: Checkout repository + uses: actions/checkout@v2 + - name: Setup Node.js + uses: actions/setup-node@v2 + with: + node-version: 16 + cache: 'npm' + cache-dependency-path: '**/package-lock.json' + - name: Install deps + run: npm install + working-directory: ./.github/workflows/scripts/mailchimp + - name: Send email with MailChimp + uses: actions/github-script@v4 + env: + CALENDAR_ID: ${{ secrets.CALENDAR_ID }} + CALENDAR_SERVICE_ACCOUNT: ${{ secrets.CALENDAR_SERVICE_ACCOUNT }} + MAILCHIMP_API_KEY: ${{ secrets.MAILCHIMP_API_KEY }} + with: + script: | + const sendEmail = require('./.github/workflows/scripts/mailchimp/index.js'); + sendEmail('${{github.event.comment.html_url}}', '${{github.event.issue.title}}'); - discussion_comment: - if: github.event_name == 'discussion_comment' && contains(github.event.comment.body, '@asyncapi/tsc_members') - name: TSC notification on every new comment in discussion - runs-on: ubuntu-latest - steps: - - name: Convert markdown to slack markdown - uses: LoveToKnow/slackify-markdown-action@v1.0.0 - id: discussionmarkdown - with: - text: "[${{github.event.discussion.title}}](${{github.event.comment.html_url}}) \n ${{github.event.comment.body}}" - - name: Send info about discussion comment - uses: rtCamp/action-slack-notify@v2 - env: - SLACK_WEBHOOK: ${{secrets.SLACK_TSC_MEMBERS_NOTIFY}} - SLACK_TITLE: πŸ†˜ New comment under existing discussion that requires TSC Members attention πŸ†˜ - SLACK_MESSAGE: ${{steps.discussionmarkdown.outputs.text}} - MSG_MINIMAL: true \ No newline at end of file + discussion_comment: + if: github.event_name == 'discussion_comment' && contains(github.event.comment.body, '@asyncapi/tsc_members') + name: TSC notification on every new comment in discussion + runs-on: ubuntu-latest + steps: + ######### + # Handling Slack notifications + ######### + - name: Convert markdown to slack markdown + uses: LoveToKnow/slackify-markdown-action@v1.0.0 + id: discussionmarkdown + with: + text: "[${{github.event.discussion.title}}](${{github.event.comment.html_url}}) \n ${{github.event.comment.body}}" + - name: Send info about discussion comment + uses: rtCamp/action-slack-notify@v2 + env: + SLACK_WEBHOOK: ${{secrets.SLACK_TSC_MEMBERS_NOTIFY}} + SLACK_TITLE: πŸ†˜ New comment under existing discussion that requires TSC Members attention πŸ†˜ + SLACK_MESSAGE: ${{steps.discussionmarkdown.outputs.text}} + MSG_MINIMAL: true + ######### + # Handling Mailchimp notifications + ######### + - name: Checkout repository + uses: actions/checkout@v2 + - name: Setup Node.js + uses: actions/setup-node@v2 + with: + node-version: 16 + cache: 'npm' + cache-dependency-path: '**/package-lock.json' + - name: Install deps + run: npm install + working-directory: ./.github/workflows/scripts/mailchimp + - name: Send email with MailChimp + uses: actions/github-script@v4 + env: + CALENDAR_ID: ${{ secrets.CALENDAR_ID }} + CALENDAR_SERVICE_ACCOUNT: ${{ secrets.CALENDAR_SERVICE_ACCOUNT }} + MAILCHIMP_API_KEY: ${{ secrets.MAILCHIMP_API_KEY }} + with: + script: | + const sendEmail = require('./.github/workflows/scripts/mailchimp/index.js'); + sendEmail('${{github.event.comment.html_url}}', '${{github.event.discussion.title}}'); diff --git a/.github/workflows/scripts/README.md b/.github/workflows/scripts/README.md new file mode 100644 index 00000000..ba97dca0 --- /dev/null +++ b/.github/workflows/scripts/README.md @@ -0,0 +1 @@ +The entire `scripts` directory is centrally managed in [.github](https://github.com/asyncapi/.github/) repository. Any changes in this folder should be done in central repository. \ No newline at end of file diff --git a/.github/workflows/scripts/mailchimp/htmlContent.js b/.github/workflows/scripts/mailchimp/htmlContent.js new file mode 100644 index 00000000..d132c72f --- /dev/null +++ b/.github/workflows/scripts/mailchimp/htmlContent.js @@ -0,0 +1,495 @@ +/** + * This code is centrally managed in https://github.com/asyncapi/.github/ + * Don't make changes to this file in this repo as they will be overwritten with changes made to the same file in above mentioned repo + */ +module.exports = (link, title) => { + + return ` + + + + + + + + *|MC:SUBJECT|* + + + + + + +
+ + + + +
+ + + + + + + + + + + + +
+ + + + + +
+ + + + + + + + +
+ + Hey *|FNAME|*,
+
+There is a new topic at AsyncAPI Initiative that requires Technical Steering Committee attention. +
+Please have a look if it is just something you need to be aware of, or maybe your vote is needed. +
+Topic: ${ title }. +
+ + + +
+ + + + + + + +
+ + + + + + + + +
+ + Cheers,
+AsyncAPI Initiative +
+ + + +
+ + + + + +
+ + + + + + + + +
+ + Want to change how you receive these emails?
+You can update your preferences or unsubscribe from this list.
+  +
+ + + +
+ + +
+
+ + +` +} \ No newline at end of file diff --git a/.github/workflows/scripts/mailchimp/index.js b/.github/workflows/scripts/mailchimp/index.js new file mode 100644 index 00000000..4a200c6c --- /dev/null +++ b/.github/workflows/scripts/mailchimp/index.js @@ -0,0 +1,79 @@ +/** + * This code is centrally managed in https://github.com/asyncapi/.github/ + * Don't make changes to this file in this repo as they will be overwritten with changes made to the same file in above mentioned repo + */ +const mailchimp = require('@mailchimp/mailchimp_marketing'); +const core = require('@actions/core'); +const htmlContent = require('./htmlContent.js'); + +/** + * Sending API request to mailchimp to schedule email to subscribers + * Input is the URL to issue/discussion or other resource + */ +module.exports = async (link, title) => { + + let newCampaign; + + mailchimp.setConfig({ + apiKey: process.env.MAILCHIMP_API_KEY, + server: 'us12' + }); + + /* + * First we create campaign + */ + try { + newCampaign = await mailchimp.campaigns.create({ + type: 'regular', + recipients: { + list_id: '6e3e437abe', + segment_opts: { + match: 'any', + conditions: [{ + condition_type: 'Interests', + field: 'interests-2801e38b9f', + op: 'interestcontains', + value: ['f7204f9b90'] + }] + } + }, + settings: { + subject_line: `TSC attention required: ${ title }`, + preview_text: 'Check out the latest topic that TSC members have to be aware of', + title: `New topic info - ${ new Date(Date.now()).toUTCString()}`, + from_name: 'AsyncAPI Initiative', + reply_to: 'info@asyncapi.io', + } + }); + } catch (error) { + return core.setFailed(`Failed creating campaign: ${ JSON.stringify(error) }`); + } + + /* + * Content of the email is added separately after campaign creation + */ + try { + await mailchimp.campaigns.setContent(newCampaign.id, { html: htmlContent(link, title) }); + } catch (error) { + return core.setFailed(`Failed adding content to campaign: ${ JSON.stringify(error) }`); + } + + /* + * We schedule an email to send it immediately + */ + try { + //schedule for next hour + //so if this code was created by new issue creation at 9:46, the email is scheduled for 10:00 + //is it like this as schedule has limitiations and you cannot schedule email for 9:48 + const scheduleDate = new Date(Date.parse(new Date(Date.now()).toISOString()) + 1 * 1 * 60 * 60 * 1000); + scheduleDate.setUTCMinutes(00); + + await mailchimp.campaigns.schedule(newCampaign.id, { + schedule_time: scheduleDate.toISOString(), + }); + } catch (error) { + return core.setFailed(`Failed scheduling email: ${ JSON.stringify(error) }`); + } + + core.info(`New email campaign created`); +} \ No newline at end of file diff --git a/.github/workflows/scripts/mailchimp/package-lock.json b/.github/workflows/scripts/mailchimp/package-lock.json new file mode 100644 index 00000000..e7f57038 --- /dev/null +++ b/.github/workflows/scripts/mailchimp/package-lock.json @@ -0,0 +1,612 @@ +{ + "name": "schedule-email", + "lockfileVersion": 2, + "requires": true, + "packages": { + "": { + "name": "schedule-email", + "license": "Apache 2.0", + "dependencies": { + "@actions/core": "1.9.1", + "@mailchimp/mailchimp_marketing": "3.0.74" + } + }, + "node_modules/@actions/core": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/@actions/core/-/core-1.9.1.tgz", + "integrity": "sha512-5ad+U2YGrmmiw6du20AQW5XuWo7UKN2052FjSV7MX+Wfjf8sCqcsZe62NfgHys4QI4/Y+vQvLKYL8jWtA1ZBTA==", + "dependencies": { + "@actions/http-client": "^2.0.1", + "uuid": "^8.3.2" + } + }, + "node_modules/@actions/http-client": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-2.0.1.tgz", + "integrity": "sha512-PIXiMVtz6VvyaRsGY268qvj57hXQEpsYogYOu2nrQhlf+XCGmZstmuZBbAybUl1nQGnvS1k1eEsQ69ZoD7xlSw==", + "dependencies": { + "tunnel": "^0.0.6" + } + }, + "node_modules/@mailchimp/mailchimp_marketing": { + "version": "3.0.74", + "resolved": "https://registry.npmjs.org/@mailchimp/mailchimp_marketing/-/mailchimp_marketing-3.0.74.tgz", + "integrity": "sha512-039iu4GRr7wpXqweBLuS05wvOBtPxSa31cjxgftBYSt7031f0sHEi8Up2DicfbSuQK0AynPDeVyuxrb31Lx+yQ==", + "dependencies": { + "dotenv": "^8.2.0", + "superagent": "3.8.1" + }, + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" + }, + "node_modules/call-bind": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", + "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "dependencies": { + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "dependencies": { + "delayed-stream": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/component-emitter": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.0.tgz", + "integrity": "sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg==" + }, + "node_modules/cookiejar": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/cookiejar/-/cookiejar-2.1.3.tgz", + "integrity": "sha512-JxbCBUdrfr6AQjOXrxoTvAMJO4HBTUIlBzslcJPAz+/KT8yk53fXun51u+RenNYvad/+Vc2DIz5o9UxlCDymFQ==" + }, + "node_modules/core-util-is": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", + "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==" + }, + "node_modules/delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/dotenv": { + "version": "8.6.0", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-8.6.0.tgz", + "integrity": "sha512-IrPdXQsk2BbzvCBGBOTmmSH5SodmqZNt4ERAZDmW4CT+tL8VtvinqywuANaFu4bOMWki16nqf0e4oC0QIaDr/g==", + "engines": { + "node": ">=10" + } + }, + "node_modules/extend": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==" + }, + "node_modules/form-data": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.5.1.tgz", + "integrity": "sha512-m21N3WOmEEURgk6B9GLOE4RuWOFf28Lhh9qGYeNlGq4VDXUlJy2th2slBNU8Gp8EzloYZOibZJ7t5ecIrFSjVA==", + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.6", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 0.12" + } + }, + "node_modules/formidable": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/formidable/-/formidable-1.2.6.tgz", + "integrity": "sha512-KcpbcpuLNOwrEjnbpMC0gS+X8ciDoZE1kkqzat4a8vrprf+s9pKNQ/QIwWfbfs4ltgmFl3MD177SNTkve3BwGQ==", + "deprecated": "Please upgrade to latest, formidable@v2 or formidable@v3! Check these notes: https://bit.ly/2ZEqIau", + "funding": { + "url": "https://ko-fi.com/tunnckoCore/commissions" + } + }, + "node_modules/function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" + }, + "node_modules/get-intrinsic": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.1.tgz", + "integrity": "sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q==", + "dependencies": { + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "dependencies": { + "function-bind": "^1.1.1" + }, + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/has-symbols": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "node_modules/isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + }, + "node_modules/methods": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", + "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", + "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", + "bin": { + "mime": "cli.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "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==" + }, + "node_modules/object-inspect": { + "version": "1.12.0", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.0.tgz", + "integrity": "sha512-Ho2z80bVIvJloH+YzRmpZVQe87+qASmBUKZDWgx9cu+KDrX2ZDH/3tMy+gXbZETVGs2M8YdxObOh7XAtim9Y0g==", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/process-nextick-args": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==" + }, + "node_modules/qs": { + "version": "6.10.3", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.10.3.tgz", + "integrity": "sha512-wr7M2E0OFRfIfJZjKGieI8lBKb7fRCH4Fv5KNPEs7gJ8jadvotdsS08PzOKR7opXhZ/Xkjtt3WF9g38drmyRqQ==", + "dependencies": { + "side-channel": "^1.0.4" + }, + "engines": { + "node": ">=0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "node_modules/readable-stream/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==" + }, + "node_modules/side-channel": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", + "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", + "dependencies": { + "call-bind": "^1.0.0", + "get-intrinsic": "^1.0.2", + "object-inspect": "^1.9.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dependencies": { + "safe-buffer": "~5.1.0" + } + }, + "node_modules/string_decoder/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==" + }, + "node_modules/superagent": { + "version": "3.8.1", + "resolved": "https://registry.npmjs.org/superagent/-/superagent-3.8.1.tgz", + "integrity": "sha512-VMBFLYgFuRdfeNQSMLbxGSLfmXL/xc+OO+BZp41Za/NRDBet/BNbkRJrYzCUu0u4GU0i/ml2dtT8b9qgkw9z6Q==", + "deprecated": "Please upgrade to v7.0.2+ of superagent. We have fixed numerous issues with streams, form-data, attach(), filesystem errors not bubbling up (ENOENT on attach()), and all tests are now passing. See the releases tab for more information at .", + "dependencies": { + "component-emitter": "^1.2.0", + "cookiejar": "^2.1.0", + "debug": "^3.1.0", + "extend": "^3.0.0", + "form-data": "^2.3.1", + "formidable": "^1.1.1", + "methods": "^1.1.1", + "mime": "^1.4.1", + "qs": "^6.5.1", + "readable-stream": "^2.0.5" + }, + "engines": { + "node": ">= 4.0" + } + }, + "node_modules/superagent/node_modules/debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dependencies": { + "ms": "^2.1.1" + } + }, + "node_modules/tunnel": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz", + "integrity": "sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==", + "engines": { + "node": ">=0.6.11 <=0.7.0 || >=0.7.3" + } + }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" + }, + "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" + } + } + }, + "dependencies": { + "@actions/core": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/@actions/core/-/core-1.9.1.tgz", + "integrity": "sha512-5ad+U2YGrmmiw6du20AQW5XuWo7UKN2052FjSV7MX+Wfjf8sCqcsZe62NfgHys4QI4/Y+vQvLKYL8jWtA1ZBTA==", + "requires": { + "@actions/http-client": "^2.0.1", + "uuid": "^8.3.2" + } + }, + "@actions/http-client": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-2.0.1.tgz", + "integrity": "sha512-PIXiMVtz6VvyaRsGY268qvj57hXQEpsYogYOu2nrQhlf+XCGmZstmuZBbAybUl1nQGnvS1k1eEsQ69ZoD7xlSw==", + "requires": { + "tunnel": "^0.0.6" + } + }, + "@mailchimp/mailchimp_marketing": { + "version": "3.0.74", + "resolved": "https://registry.npmjs.org/@mailchimp/mailchimp_marketing/-/mailchimp_marketing-3.0.74.tgz", + "integrity": "sha512-039iu4GRr7wpXqweBLuS05wvOBtPxSa31cjxgftBYSt7031f0sHEi8Up2DicfbSuQK0AynPDeVyuxrb31Lx+yQ==", + "requires": { + "dotenv": "^8.2.0", + "superagent": "3.8.1" + } + }, + "asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" + }, + "call-bind": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", + "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "requires": { + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2" + } + }, + "combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "requires": { + "delayed-stream": "~1.0.0" + } + }, + "component-emitter": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.0.tgz", + "integrity": "sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg==" + }, + "cookiejar": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/cookiejar/-/cookiejar-2.1.3.tgz", + "integrity": "sha512-JxbCBUdrfr6AQjOXrxoTvAMJO4HBTUIlBzslcJPAz+/KT8yk53fXun51u+RenNYvad/+Vc2DIz5o9UxlCDymFQ==" + }, + "core-util-is": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", + "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==" + }, + "delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=" + }, + "dotenv": { + "version": "8.6.0", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-8.6.0.tgz", + "integrity": "sha512-IrPdXQsk2BbzvCBGBOTmmSH5SodmqZNt4ERAZDmW4CT+tL8VtvinqywuANaFu4bOMWki16nqf0e4oC0QIaDr/g==" + }, + "extend": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==" + }, + "form-data": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.5.1.tgz", + "integrity": "sha512-m21N3WOmEEURgk6B9GLOE4RuWOFf28Lhh9qGYeNlGq4VDXUlJy2th2slBNU8Gp8EzloYZOibZJ7t5ecIrFSjVA==", + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.6", + "mime-types": "^2.1.12" + } + }, + "formidable": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/formidable/-/formidable-1.2.6.tgz", + "integrity": "sha512-KcpbcpuLNOwrEjnbpMC0gS+X8ciDoZE1kkqzat4a8vrprf+s9pKNQ/QIwWfbfs4ltgmFl3MD177SNTkve3BwGQ==" + }, + "function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" + }, + "get-intrinsic": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.1.tgz", + "integrity": "sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q==", + "requires": { + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.1" + } + }, + "has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "requires": { + "function-bind": "^1.1.1" + } + }, + "has-symbols": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==" + }, + "inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + }, + "methods": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", + "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=" + }, + "mime": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", + "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==" + }, + "mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==" + }, + "mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "requires": { + "mime-db": "1.52.0" + } + }, + "ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" + }, + "object-inspect": { + "version": "1.12.0", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.0.tgz", + "integrity": "sha512-Ho2z80bVIvJloH+YzRmpZVQe87+qASmBUKZDWgx9cu+KDrX2ZDH/3tMy+gXbZETVGs2M8YdxObOh7XAtim9Y0g==" + }, + "process-nextick-args": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==" + }, + "qs": { + "version": "6.10.3", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.10.3.tgz", + "integrity": "sha512-wr7M2E0OFRfIfJZjKGieI8lBKb7fRCH4Fv5KNPEs7gJ8jadvotdsS08PzOKR7opXhZ/Xkjtt3WF9g38drmyRqQ==", + "requires": { + "side-channel": "^1.0.4" + } + }, + "readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + }, + "dependencies": { + "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==" + } + } + }, + "side-channel": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", + "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", + "requires": { + "call-bind": "^1.0.0", + "get-intrinsic": "^1.0.2", + "object-inspect": "^1.9.0" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "requires": { + "safe-buffer": "~5.1.0" + }, + "dependencies": { + "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==" + } + } + }, + "superagent": { + "version": "3.8.1", + "resolved": "https://registry.npmjs.org/superagent/-/superagent-3.8.1.tgz", + "integrity": "sha512-VMBFLYgFuRdfeNQSMLbxGSLfmXL/xc+OO+BZp41Za/NRDBet/BNbkRJrYzCUu0u4GU0i/ml2dtT8b9qgkw9z6Q==", + "requires": { + "component-emitter": "^1.2.0", + "cookiejar": "^2.1.0", + "debug": "^3.1.0", + "extend": "^3.0.0", + "form-data": "^2.3.1", + "formidable": "^1.1.1", + "methods": "^1.1.1", + "mime": "^1.4.1", + "qs": "^6.5.1", + "readable-stream": "^2.0.5" + }, + "dependencies": { + "debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "requires": { + "ms": "^2.1.1" + } + } + } + }, + "tunnel": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz", + "integrity": "sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==" + }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" + }, + "uuid": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==" + } + } +} diff --git a/.github/workflows/scripts/mailchimp/package.json b/.github/workflows/scripts/mailchimp/package.json new file mode 100644 index 00000000..28b447ff --- /dev/null +++ b/.github/workflows/scripts/mailchimp/package.json @@ -0,0 +1,9 @@ +{ + "name": "schedule-email", + "description": "This code is responsible for scheduling an email campaign. This file is centrally managed in https://github.com/asyncapi/.github/", + "license": "Apache 2.0", + "dependencies": { + "@actions/core": "1.9.1", + "@mailchimp/mailchimp_marketing": "3.0.74" + } +} \ No newline at end of file diff --git a/CODEOWNERS b/CODEOWNERS index 864dbb4b..23129c54 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -6,4 +6,4 @@ # 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 @asyncapi-bot-eve \ No newline at end of file +* @fmvilas @derberg @dalelane @smoya @char0n @asyncapi-bot-eve \ No newline at end of file diff --git a/README.md b/README.md index d15d343a..26e3dc99 100644 --- a/README.md +++ b/README.md @@ -1,18 +1,23 @@ ![npm](https://img.shields.io/npm/v/@asyncapi/specs?style=for-the-badge) ![npm](https://img.shields.io/npm/dt/@asyncapi/specs?style=for-the-badge) -> If you are currently using version 2, check out [migration guideline to version 3](./migrations/Migrate%20to%20version%203.md). You might be able to update it without any change. + # AsyncAPI + This is a mono repository, which provides all the JSON Schema documents for validating AsyncAPI documents. + ## Overview + * This repository contains [JSON Schema](https://json-schema.org) files for all the versions of 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. * In addition, this repo provides JavaScript and Go modules that make it easier to access JSON Schema files through code. ## 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: + * Variables provided in the URL property have a corresponding variable object defined and its example is correct. * operationIds are not duplicated in the document. * messageIds are not duplicated in the document. @@ -29,14 +34,19 @@ All test cases and parsers coverage can be found [here](https://asyncapi.github. ## Installation ### NodeJS + ```bash npm install @asyncapi/specs +// OR by Yarn +yarn add @asyncapi/specs ``` ### Go + ```bash go get github.com/asyncapi/spec-json-schemas/v2 ``` + ## Usage ### NodeJS @@ -49,7 +59,7 @@ const asyncapi = require('@asyncapi/specs/schemas/2.0.0'); // Do something with the schema. ``` -Get a list of versions: +Get a list of supported versions: ```js const versions = require('@asyncapi/specs'); @@ -66,7 +76,12 @@ const asyncapi = versions['1.1.0']; // Do something with the schema. ``` + +> **Note** +> The main export of the package provides only supported versions of AsyncAPI (newer or equal to `2.0.0`). To use older ones (e.g. `1.2.0`) please import an absolute path like `@asyncapi/specs/schemas/1.2.0`; + ### Go + Grab a specific AsyncAPI version: ```go @@ -81,13 +96,22 @@ func Do() { // Do something with the schema } ``` + +## Migration guidelines + +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). + ## Repository structure -This is the current project structure explained. + +This is the current project structure explained: + - [./definitions](./definitions) - contain all the individual schemas that will automatically be bundled together to provide the schemas in [./schemas](./schemas). - [./tools/bundler](./tools/bundler) - is the tool that bundles all the individual schemas together. - [./schemas](./schemas) - contain all automatically bundled and complete schemas for each AsyncAPI version. These schemas should **NOT** be manually changed as they are automatically generated. Any changes should be done in [./definitions](./definitions). ## Schema Bundling + Changes should not be done manually to the schemas in [./schemas](./schemas), but instead be done in their individual definitions located in [./definitions](./definitions). These definitions are automatically bundled together on new releases through the npm script `prepublishOnly`, which ensures the project is build. This is where the [bundler](./tools/bundler) is called. @@ -95,10 +119,13 @@ These definitions are automatically bundled together on new releases through the For example, for [2.2.0](./definitions/2.2.0), the [bundler](./tools/bundler/index.js) starts with the [asyncapi.json](definitions/2.2.0/asyncapi.json) file and recursively goes through all references (`$ref`) to create the [appropriate bundled version](./schemas/2.2.0.json). ### Creating a new version + To create a new version, simply run the following command: -``` + +```bash npm run startNewVersion --new-version=x.x.x ``` + Where `x.x.x` is the new version you want to create. The manual process of creating a new version is to: @@ -106,7 +133,9 @@ The manual process of creating a new version is to: 2. Rename the folder to the new version (`x.x.x`). 3. Search and replace in the new duplicated folder for `y.y.y` and replace it with `x.x.x`. 4. Edit the [index.js](./index.js) file adding a new line with the new version. I.e. `'2.5.0': require('./schemas/2.5.0.json'),`. -5. Edit the [schemas/all.schema-store.json](./schemas/all.schema-store.json) file adding a new entry under the `oneOf` keyword with the new version. I.e.: +5. Edit the [index.d.ts](./index.d.ts) file adding a new line with the types for the new version. I.e. `'2.5.0': JSONSchema7,`. +6. Edit the [schemas/all.schema-store.json](./schemas/all.schema-store.json) file adding a new entry under the `oneOf` keyword with the new version. I.e.: + ```json { "allOf":[ @@ -122,7 +151,4 @@ The manual process of creating a new version is to: } ] } - ``` - - - + ``` \ No newline at end of file diff --git a/definitions/2.5.0/parameter.json b/definitions/2.5.0/parameter.json index 3e8d466e..8feb89c1 100644 --- a/definitions/2.5.0/parameter.json +++ b/definitions/2.5.0/parameter.json @@ -17,9 +17,6 @@ "type": "string", "description": "A runtime expression that specifies the location of the parameter value", "pattern": "^\\$message\\.(header|payload)#(\\/(([^\\/~])|(~[01]))*)*" - }, - "$ref": { - "$ref": "http://asyncapi.com/definitions/2.5.0/ReferenceObject.json" } }, "$schema": "http://json-schema.org/draft-07/schema#", diff --git a/definitions/2.5.0/parameters.json b/definitions/2.5.0/parameters.json index 6c4c7549..0b427834 100644 --- a/definitions/2.5.0/parameters.json +++ b/definitions/2.5.0/parameters.json @@ -1,7 +1,14 @@ { "type": "object", "additionalProperties": { - "$ref": "http://asyncapi.com/definitions/2.5.0/parameter.json" + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.5.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.5.0/parameter.json" + } + ] }, "description": "JSON objects describing re-usable channel parameters.", "$schema": "http://json-schema.org/draft-07/schema#", diff --git a/index.d.ts b/index.d.ts new file mode 100644 index 00000000..36e37f47 --- /dev/null +++ b/index.d.ts @@ -0,0 +1,11 @@ +import type { JSONSchema7 } from 'json-schema'; + +declare const _exports: { + '2.0.0': JSONSchema7; + '2.1.0': JSONSchema7; + '2.2.0': JSONSchema7; + '2.3.0': JSONSchema7; + '2.4.0': JSONSchema7; + '2.5.0': JSONSchema7; +}; +export = _exports; diff --git a/index.js b/index.js index db354efb..b19becf1 100644 --- a/index.js +++ b/index.js @@ -1,9 +1,4 @@ module.exports = { - '1.0.0': require('./schemas/1.0.0.json'), - '1.1.0': require('./schemas/1.1.0.json'), - '1.2.0': require('./schemas/1.2.0.json'), - '2.0.0-rc1': require('./schemas/2.0.0-rc1.json'), - '2.0.0-rc2': require('./schemas/2.0.0-rc2.json'), '2.0.0': require('./schemas/2.0.0.json'), '2.1.0': require('./schemas/2.1.0.json'), '2.2.0': require('./schemas/2.2.0.json'), diff --git a/migrations/Migrate to version 3.md b/migrations/migrate-to-version-3.md similarity index 100% rename from migrations/Migrate to version 3.md rename to migrations/migrate-to-version-3.md diff --git a/migrations/migrate-to-version-4.md b/migrations/migrate-to-version-4.md new file mode 100644 index 00000000..a2c61534 --- /dev/null +++ b/migrations/migrate-to-version-4.md @@ -0,0 +1,3 @@ +# Migrating to version 4 + +In version 4, we removed unsupported versions of AsyncAPI from the package: `1.0.0`, `1.1.0`, `1.2.0`, `2.0.0-rc1` and `2.0.0-rc2`. In addition, we added [Typescript](https://www.typescriptlang.org/) types to the existing specifications. diff --git a/package-lock.json b/package-lock.json index c7154adb..8c71dbfa 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "@asyncapi/specs", - "version": "3.2.0-next-spec.1", + "version": "4.0.1", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -627,6 +627,11 @@ "integrity": "sha512-RbzJvlNzmRq5c3O09UipeuXno4tA1FE6ikOjxZK0tuxVv3412l64l5t1W5pj4+rJq9vpkm/kwiR07aZXnsKPxw==", "dev": true }, + "@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==" + }, "@types/minimist": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/@types/minimist/-/minimist-1.2.2.tgz", @@ -783,7 +788,8 @@ "before-after-hook": { "version": "2.2.2", "resolved": "https://registry.npmjs.org/before-after-hook/-/before-after-hook-2.2.2.tgz", - "integrity": "sha512-3pZEU3NT5BFUo/AD5ERPWOgQOCZITni6iavr5AUw5AUwQjMlI0kzu5btnyD39AF0gUEsDPwJT+oY1ORBJijPjQ==" + "integrity": "sha512-3pZEU3NT5BFUo/AD5ERPWOgQOCZITni6iavr5AUw5AUwQjMlI0kzu5btnyD39AF0gUEsDPwJT+oY1ORBJijPjQ==", + "dev": true }, "binary-extensions": { "version": "2.2.0", @@ -942,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", @@ -959,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": { @@ -1237,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", @@ -1905,12 +1946,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", @@ -1932,7 +1967,8 @@ "is-plain-object": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-5.0.0.tgz", - "integrity": "sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q==" + "integrity": "sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q==", + "dev": true }, "is-stream": { "version": "2.0.0", @@ -2196,13 +2232,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", @@ -2537,9 +2570,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" @@ -3286,8 +3319,7 @@ }, "balanced-match": { "version": "1.0.2", - "bundled": true, - "dev": true + "bundled": true }, "bcrypt-pbkdf": { "version": "1.0.2", @@ -3318,7 +3350,6 @@ "brace-expansion": { "version": "1.1.11", "bundled": true, - "dev": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -3501,8 +3532,7 @@ }, "concat-map": { "version": "0.0.1", - "bundled": true, - "dev": true + "bundled": true }, "console-control-strings": { "version": "1.1.0", @@ -4121,14 +4151,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, @@ -4558,11 +4580,6 @@ "bundled": true, "dev": true }, - "qs": { - "version": "6.5.2", - "bundled": true, - "dev": true - }, "read": { "version": "1.0.7", "bundled": true, @@ -5436,6 +5453,12 @@ "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": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", @@ -5731,56 +5754,6 @@ "yargs": "^16.2.0" }, "dependencies": { - "@octokit/core": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/@octokit/core/-/core-4.0.5.tgz", - "integrity": "sha512-4R3HeHTYVHCfzSAi0C6pbGXV8UDI5Rk+k3G7kLVNckswN9mvpOzW9oENfjfH3nEmzg8y3AmKmzs8Sg6pLCeOCA==", - "requires": { - "@octokit/graphql": "^5.0.0", - "@octokit/types": "^7.0.0", - "before-after-hook": "^2.2.0", - "universal-user-agent": "^6.0.0" - } - }, - "@octokit/endpoint": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-7.0.2.tgz", - "integrity": "sha512-8/AUACfE9vpRpehE6ZLfEtzkibe5nfsSwFZVMsG8qabqRt1M81qZYUFRZa1B8w8lP6cdfDJfRq9HWS+MbmR7tw==", - "requires": { - "@octokit/types": "^7.0.0", - "is-plain-object": "^5.0.0", - "universal-user-agent": "^6.0.0" - } - }, - "@octokit/graphql": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-5.0.1.tgz", - "integrity": "sha512-sxmnewSwAixkP1TrLdE6yRG53eEhHhDTYUykUwdV9x8f91WcbhunIHk9x1PZLALdBZKRPUO2HRcm4kezZ79HoA==", - "requires": { - "@octokit/types": "^7.0.0", - "universal-user-agent": "^6.0.0" - } - }, - "@octokit/openapi-types": { - "version": "13.9.1", - "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-13.9.1.tgz", - "integrity": "sha512-98zOxAAR8MDHjXI2xGKgn/qkZLwfcNjHka0baniuEpN1fCv3kDJeh5qc0mBwim5y31eaPaYer9QikzwOkQq3wQ==" - }, - "@octokit/types": { - "version": "7.5.1", - "resolved": "https://registry.npmjs.org/@octokit/types/-/types-7.5.1.tgz", - "integrity": "sha512-Zk4OUMLCSpXNI8KZZn47lVLJSsgMyCimsWWQI5hyjZg7hdYm0kjotaIkbG0Pp8SfU2CofMBzonboTqvzn3FrJA==", - "requires": { - "@octokit/openapi-types": "^13.11.0" - }, - "dependencies": { - "@octokit/openapi-types": { - "version": "13.12.0", - "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-13.12.0.tgz", - "integrity": "sha512-1QYzZrwnn3rTQE7ZoSxXrO8lhu0aIbac1c+qIPOPEaVXBWSaUyLV1x9yt4uDQOwmu6u5ywVS8OJgs+ErDLf6vQ==" - } - } - }, "@semantic-release/commit-analyzer": { "version": "9.0.2", "resolved": "https://registry.npmjs.org/@semantic-release/commit-analyzer/-/commit-analyzer-9.0.2.tgz", @@ -5888,6 +5861,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", @@ -5971,6 +5953,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", @@ -6312,8 +6303,7 @@ }, "balanced-match": { "version": "1.0.2", - "bundled": true, - "dev": true + "bundled": true }, "bin-links": { "version": "3.0.1", @@ -6336,7 +6326,6 @@ "brace-expansion": { "version": "2.0.1", "bundled": true, - "dev": true, "requires": { "balanced-match": "^1.0.0" } @@ -6944,14 +6933,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, @@ -7092,7 +7073,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" @@ -7416,7 +7398,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" @@ -8194,7 +8177,8 @@ "universal-user-agent": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-6.0.0.tgz", - "integrity": "sha512-isyNax3wXoKaulPDZWHQqbmIx1k2tb9fb3GGDBRxCscfYV2Ch7WxPArBsFEG8s/safwXTT7H4QGhaIkTp9447w==" + "integrity": "sha512-isyNax3wXoKaulPDZWHQqbmIx1k2tb9fb3GGDBRxCscfYV2Ch7WxPArBsFEG8s/safwXTT7H4QGhaIkTp9447w==", + "dev": true }, "url-join": { "version": "4.0.1", diff --git a/package.json b/package.json index a82608c8..284f1594 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,9 @@ { "name": "@asyncapi/specs", - "version": "3.2.0-next-spec.1", + "version": "4.0.1", "description": "AsyncAPI schema versions", "main": "index.js", + "types": "index.d.ts", "scripts": { "test": "npm run build && nyc mocha", "build": "npm run bundle", @@ -82,5 +83,8 @@ "@semantic-release/npm", "@semantic-release/github" ] + }, + "dependencies": { + "@types/json-schema": "^7.0.11" } } diff --git a/schemas/2.5.0.json b/schemas/2.5.0.json index d2070555..0d83b1a9 100644 --- a/schemas/2.5.0.json +++ b/schemas/2.5.0.json @@ -437,9 +437,6 @@ "type": "string", "description": "A runtime expression that specifies the location of the parameter value", "pattern": "^\\$message\\.(header|payload)#(\\/(([^\\/~])|(~[01]))*)*" - }, - "$ref": { - "$ref": "http://asyncapi.com/definitions/2.5.0/ReferenceObject.json" } } }, @@ -1832,7 +1829,14 @@ "$id": "http://asyncapi.com/definitions/2.5.0/parameters.json", "type": "object", "additionalProperties": { - "$ref": "http://asyncapi.com/definitions/2.5.0/parameter.json" + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.5.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.5.0/parameter.json" + } + ] }, "description": "JSON objects describing re-usable channel parameters." } diff --git a/schemas/all.schema-store.json b/schemas/all.schema-store.json index 27f71a2b..837813fa 100644 --- a/schemas/all.schema-store.json +++ b/schemas/all.schema-store.json @@ -144,6 +144,20 @@ "$ref": "http://asyncapi.com/schema-store/2.4.0.json" } ] + }, + { + "allOf": [ + { + "properties": { + "asyncapi": { + "const": "2.5.0" + } + } + }, + { + "$ref": "http://asyncapi.com/schema-store/2.5.0.json" + } + ] } ] -} \ No newline at end of file +} diff --git a/test/index.js b/test/index.js index af2b4ad3..c36f8340 100644 --- a/test/index.js +++ b/test/index.js @@ -9,7 +9,7 @@ describe('AsyncAPI', () => { }); it('should check if json schema is exported and if it matches the original file', () => { - const skipFiles = ["README", "all.schema-store"]; + const skipFiles = ["README", "all.schema-store", "1.0.0", "1.1.0", "1.2.0", "2.0.0-rc1", "2.0.0-rc2"]; const files = fs.readdirSync('schemas'); files.forEach(file => { const fileName = path.parse(file).name; From dd506be9f8c277984118c83ae089fd57604b700c Mon Sep 17 00:00:00 2001 From: Ace <40604284+AceTheCreator@users.noreply.github.com> Date: Tue, 24 Jan 2023 15:57:30 +0100 Subject: [PATCH 2/5] chore: create definitions for 2.6.0 version of the spec (#302) --- .../2.6.0/APIKeyHTTPSecurityScheme.json | 38 ++++ .../2.6.0/BearerHTTPSecurityScheme.json | 35 ++++ definitions/2.6.0/HTTPSecurityScheme.json | 15 ++ .../2.6.0/NonBearerHTTPSecurityScheme.json | 40 ++++ definitions/2.6.0/Reference.json | 13 ++ definitions/2.6.0/ReferenceObject.json | 6 + .../2.6.0/SaslGssapiSecurityScheme.json | 25 +++ .../2.6.0/SaslPlainSecurityScheme.json | 25 +++ .../2.6.0/SaslScramSecurityScheme.json | 26 +++ definitions/2.6.0/SaslSecurityScheme.json | 15 ++ definitions/2.6.0/SecurityRequirement.json | 12 ++ definitions/2.6.0/SecurityScheme.json | 33 ++++ definitions/2.6.0/X509.json | 25 +++ definitions/2.6.0/apiKey.json | 33 ++++ definitions/2.6.0/asymmetricEncryption.json | 25 +++ definitions/2.6.0/asyncapi.json | 56 ++++++ definitions/2.6.0/bindingsObject.json | 24 +++ definitions/2.6.0/channelItem.json | 47 +++++ definitions/2.6.0/channels.json | 13 ++ definitions/2.6.0/components.json | 98 ++++++++++ definitions/2.6.0/contact.json | 28 +++ definitions/2.6.0/correlationId.json | 25 +++ definitions/2.6.0/external.json | 5 + definitions/2.6.0/externalDocs.json | 24 +++ definitions/2.6.0/info.json | 41 +++++ definitions/2.6.0/license.json | 25 +++ definitions/2.6.0/message.json | 171 ++++++++++++++++++ definitions/2.6.0/messageTrait.json | 85 +++++++++ definitions/2.6.0/messages.json | 9 + definitions/2.6.0/oauth2Flow.json | 28 +++ definitions/2.6.0/oauth2Flows.json | 105 +++++++++++ definitions/2.6.0/oauth2Scopes.json | 8 + definitions/2.6.0/openIdConnect.json | 30 +++ definitions/2.6.0/operation.json | 76 ++++++++ definitions/2.6.0/operationTrait.json | 41 +++++ definitions/2.6.0/parameter.json | 24 +++ definitions/2.6.0/parameters.json | 16 ++ definitions/2.6.0/schema.json | 98 ++++++++++ definitions/2.6.0/schemas.json | 9 + definitions/2.6.0/server.json | 50 +++++ definitions/2.6.0/serverVariable.json | 33 ++++ definitions/2.6.0/serverVariables.json | 15 ++ definitions/2.6.0/servers.json | 16 ++ definitions/2.6.0/specificationExtension.json | 7 + definitions/2.6.0/symmetricEncryption.json | 25 +++ definitions/2.6.0/tag.json | 25 +++ definitions/2.6.0/userPassword.json | 25 +++ index.d.ts | 1 + index.js | 1 + schemas/all.schema-store.json | 14 ++ 50 files changed, 1664 insertions(+) create mode 100644 definitions/2.6.0/APIKeyHTTPSecurityScheme.json create mode 100644 definitions/2.6.0/BearerHTTPSecurityScheme.json create mode 100644 definitions/2.6.0/HTTPSecurityScheme.json create mode 100644 definitions/2.6.0/NonBearerHTTPSecurityScheme.json create mode 100644 definitions/2.6.0/Reference.json create mode 100644 definitions/2.6.0/ReferenceObject.json create mode 100644 definitions/2.6.0/SaslGssapiSecurityScheme.json create mode 100644 definitions/2.6.0/SaslPlainSecurityScheme.json create mode 100644 definitions/2.6.0/SaslScramSecurityScheme.json create mode 100644 definitions/2.6.0/SaslSecurityScheme.json create mode 100644 definitions/2.6.0/SecurityRequirement.json create mode 100644 definitions/2.6.0/SecurityScheme.json create mode 100644 definitions/2.6.0/X509.json create mode 100644 definitions/2.6.0/apiKey.json create mode 100644 definitions/2.6.0/asymmetricEncryption.json create mode 100644 definitions/2.6.0/asyncapi.json create mode 100644 definitions/2.6.0/bindingsObject.json create mode 100644 definitions/2.6.0/channelItem.json create mode 100644 definitions/2.6.0/channels.json create mode 100644 definitions/2.6.0/components.json create mode 100644 definitions/2.6.0/contact.json create mode 100644 definitions/2.6.0/correlationId.json create mode 100644 definitions/2.6.0/external.json create mode 100644 definitions/2.6.0/externalDocs.json create mode 100644 definitions/2.6.0/info.json create mode 100644 definitions/2.6.0/license.json create mode 100644 definitions/2.6.0/message.json create mode 100644 definitions/2.6.0/messageTrait.json create mode 100644 definitions/2.6.0/messages.json create mode 100644 definitions/2.6.0/oauth2Flow.json create mode 100644 definitions/2.6.0/oauth2Flows.json create mode 100644 definitions/2.6.0/oauth2Scopes.json create mode 100644 definitions/2.6.0/openIdConnect.json create mode 100644 definitions/2.6.0/operation.json create mode 100644 definitions/2.6.0/operationTrait.json create mode 100644 definitions/2.6.0/parameter.json create mode 100644 definitions/2.6.0/parameters.json create mode 100644 definitions/2.6.0/schema.json create mode 100644 definitions/2.6.0/schemas.json create mode 100644 definitions/2.6.0/server.json create mode 100644 definitions/2.6.0/serverVariable.json create mode 100644 definitions/2.6.0/serverVariables.json create mode 100644 definitions/2.6.0/servers.json create mode 100644 definitions/2.6.0/specificationExtension.json create mode 100644 definitions/2.6.0/symmetricEncryption.json create mode 100644 definitions/2.6.0/tag.json create mode 100644 definitions/2.6.0/userPassword.json diff --git a/definitions/2.6.0/APIKeyHTTPSecurityScheme.json b/definitions/2.6.0/APIKeyHTTPSecurityScheme.json new file mode 100644 index 00000000..12773091 --- /dev/null +++ b/definitions/2.6.0/APIKeyHTTPSecurityScheme.json @@ -0,0 +1,38 @@ +{ + "type": "object", + "required": [ + "type", + "name", + "in" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "httpApiKey" + ] + }, + "name": { + "type": "string" + }, + "in": { + "type": "string", + "enum": [ + "header", + "query", + "cookie" + ] + }, + "description": { + "type": "string" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.6.0/specificationExtension.json" + } + }, + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.6.0/APIKeyHTTPSecurityScheme.json" +} \ No newline at end of file diff --git a/definitions/2.6.0/BearerHTTPSecurityScheme.json b/definitions/2.6.0/BearerHTTPSecurityScheme.json new file mode 100644 index 00000000..3eba87ac --- /dev/null +++ b/definitions/2.6.0/BearerHTTPSecurityScheme.json @@ -0,0 +1,35 @@ +{ + "type": "object", + "required": [ + "type", + "scheme" + ], + "properties": { + "scheme": { + "type": "string", + "enum": [ + "bearer" + ] + }, + "bearerFormat": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "http" + ] + }, + "description": { + "type": "string" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.6.0/specificationExtension.json" + } + }, + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.6.0/BearerHTTPSecurityScheme.json" +} \ No newline at end of file diff --git a/definitions/2.6.0/HTTPSecurityScheme.json b/definitions/2.6.0/HTTPSecurityScheme.json new file mode 100644 index 00000000..af1cfbc3 --- /dev/null +++ b/definitions/2.6.0/HTTPSecurityScheme.json @@ -0,0 +1,15 @@ +{ + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.6.0/NonBearerHTTPSecurityScheme.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.6.0/BearerHTTPSecurityScheme.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.6.0/APIKeyHTTPSecurityScheme.json" + } + ], + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.6.0/HTTPSecurityScheme.json" +} \ No newline at end of file diff --git a/definitions/2.6.0/NonBearerHTTPSecurityScheme.json b/definitions/2.6.0/NonBearerHTTPSecurityScheme.json new file mode 100644 index 00000000..a815a1e5 --- /dev/null +++ b/definitions/2.6.0/NonBearerHTTPSecurityScheme.json @@ -0,0 +1,40 @@ +{ + "not": { + "type": "object", + "properties": { + "scheme": { + "type": "string", + "enum": [ + "bearer" + ] + } + } + }, + "type": "object", + "required": [ + "scheme", + "type" + ], + "properties": { + "scheme": { + "type": "string" + }, + "description": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "http" + ] + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.6.0/specificationExtension.json" + } + }, + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.6.0/NonBearerHTTPSecurityScheme.json" +} \ No newline at end of file diff --git a/definitions/2.6.0/Reference.json b/definitions/2.6.0/Reference.json new file mode 100644 index 00000000..b02bba4f --- /dev/null +++ b/definitions/2.6.0/Reference.json @@ -0,0 +1,13 @@ +{ + "type": "object", + "required": [ + "$ref" + ], + "properties": { + "$ref": { + "$ref": "http://asyncapi.com/definitions/2.6.0/ReferenceObject.json" + } + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.6.0/Reference.json" +} \ No newline at end of file diff --git a/definitions/2.6.0/ReferenceObject.json b/definitions/2.6.0/ReferenceObject.json new file mode 100644 index 00000000..82075d2e --- /dev/null +++ b/definitions/2.6.0/ReferenceObject.json @@ -0,0 +1,6 @@ +{ + "type": "string", + "format": "uri-reference", + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.6.0/ReferenceObject.json" +} \ No newline at end of file diff --git a/definitions/2.6.0/SaslGssapiSecurityScheme.json b/definitions/2.6.0/SaslGssapiSecurityScheme.json new file mode 100644 index 00000000..8d58c9d1 --- /dev/null +++ b/definitions/2.6.0/SaslGssapiSecurityScheme.json @@ -0,0 +1,25 @@ +{ + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "gssapi" + ] + }, + "description": { + "type": "string" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.6.0/specificationExtension.json" + } + }, + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.6.0/SaslGssapiSecurityScheme.json" +} \ No newline at end of file diff --git a/definitions/2.6.0/SaslPlainSecurityScheme.json b/definitions/2.6.0/SaslPlainSecurityScheme.json new file mode 100644 index 00000000..766428f7 --- /dev/null +++ b/definitions/2.6.0/SaslPlainSecurityScheme.json @@ -0,0 +1,25 @@ +{ + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "plain" + ] + }, + "description": { + "type": "string" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.6.0/specificationExtension.json" + } + }, + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.6.0/SaslPlainSecurityScheme.json" +} \ No newline at end of file diff --git a/definitions/2.6.0/SaslScramSecurityScheme.json b/definitions/2.6.0/SaslScramSecurityScheme.json new file mode 100644 index 00000000..a60641c5 --- /dev/null +++ b/definitions/2.6.0/SaslScramSecurityScheme.json @@ -0,0 +1,26 @@ +{ + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "scramSha256", + "scramSha512" + ] + }, + "description": { + "type": "string" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.6.0/specificationExtension.json" + } + }, + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.6.0/SaslScramSecurityScheme.json" +} \ No newline at end of file diff --git a/definitions/2.6.0/SaslSecurityScheme.json b/definitions/2.6.0/SaslSecurityScheme.json new file mode 100644 index 00000000..184550f4 --- /dev/null +++ b/definitions/2.6.0/SaslSecurityScheme.json @@ -0,0 +1,15 @@ +{ + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.6.0/SaslPlainSecurityScheme.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.6.0/SaslScramSecurityScheme.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.6.0/SaslGssapiSecurityScheme.json" + } + ], + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.6.0/SaslSecurityScheme.json" +} \ No newline at end of file diff --git a/definitions/2.6.0/SecurityRequirement.json b/definitions/2.6.0/SecurityRequirement.json new file mode 100644 index 00000000..5579d55b --- /dev/null +++ b/definitions/2.6.0/SecurityRequirement.json @@ -0,0 +1,12 @@ +{ + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.6.0/SecurityRequirement.json" +} \ No newline at end of file diff --git a/definitions/2.6.0/SecurityScheme.json b/definitions/2.6.0/SecurityScheme.json new file mode 100644 index 00000000..3c8bc421 --- /dev/null +++ b/definitions/2.6.0/SecurityScheme.json @@ -0,0 +1,33 @@ +{ + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.6.0/userPassword.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.6.0/apiKey.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.6.0/X509.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.6.0/symmetricEncryption.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.6.0/asymmetricEncryption.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.6.0/HTTPSecurityScheme.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.6.0/oauth2Flows.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.6.0/openIdConnect.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.6.0/SaslSecurityScheme.json" + } + ], + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.6.0/SecurityScheme.json" +} \ No newline at end of file diff --git a/definitions/2.6.0/X509.json b/definitions/2.6.0/X509.json new file mode 100644 index 00000000..bcc1b8fb --- /dev/null +++ b/definitions/2.6.0/X509.json @@ -0,0 +1,25 @@ +{ + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "X509" + ] + }, + "description": { + "type": "string" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.6.0/specificationExtension.json" + } + }, + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.6.0/X509.json" +} \ No newline at end of file diff --git a/definitions/2.6.0/apiKey.json b/definitions/2.6.0/apiKey.json new file mode 100644 index 00000000..d5cc1f00 --- /dev/null +++ b/definitions/2.6.0/apiKey.json @@ -0,0 +1,33 @@ +{ + "type": "object", + "required": [ + "type", + "in" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "apiKey" + ] + }, + "in": { + "type": "string", + "enum": [ + "user", + "password" + ] + }, + "description": { + "type": "string" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.6.0/specificationExtension.json" + } + }, + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.6.0/apiKey.json" +} \ No newline at end of file diff --git a/definitions/2.6.0/asymmetricEncryption.json b/definitions/2.6.0/asymmetricEncryption.json new file mode 100644 index 00000000..b4840576 --- /dev/null +++ b/definitions/2.6.0/asymmetricEncryption.json @@ -0,0 +1,25 @@ +{ + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "asymmetricEncryption" + ] + }, + "description": { + "type": "string" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.6.0/specificationExtension.json" + } + }, + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.6.0/asymmetricEncryption.json" +} \ No newline at end of file diff --git a/definitions/2.6.0/asyncapi.json b/definitions/2.6.0/asyncapi.json new file mode 100644 index 00000000..54ec9d91 --- /dev/null +++ b/definitions/2.6.0/asyncapi.json @@ -0,0 +1,56 @@ +{ + "title": "AsyncAPI 2.6.0 schema.", + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.6.0/asyncapi.json", + "type": "object", + "required": [ + "asyncapi", + "info", + "channels" + ], + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.6.0/specificationExtension.json" + } + }, + "properties": { + "asyncapi": { + "type": "string", + "enum": [ + "2.6.0" + ], + "description": "The AsyncAPI specification version of this document." + }, + "id": { + "type": "string", + "description": "A unique id representing the application.", + "format": "uri" + }, + "info": { + "$ref": "http://asyncapi.com/definitions/2.6.0/info.json" + }, + "servers": { + "$ref": "http://asyncapi.com/definitions/2.6.0/servers.json" + }, + "defaultContentType": { + "type": "string" + }, + "channels": { + "$ref": "http://asyncapi.com/definitions/2.6.0/channels.json" + }, + "components": { + "$ref": "http://asyncapi.com/definitions/2.6.0/components.json" + }, + "tags": { + "type": "array", + "items": { + "$ref": "http://asyncapi.com/definitions/2.6.0/tag.json" + }, + "uniqueItems": true + }, + "externalDocs": { + "$ref": "http://asyncapi.com/definitions/2.6.0/externalDocs.json" + } + } +} \ No newline at end of file diff --git a/definitions/2.6.0/bindingsObject.json b/definitions/2.6.0/bindingsObject.json new file mode 100644 index 00000000..47d69cb5 --- /dev/null +++ b/definitions/2.6.0/bindingsObject.json @@ -0,0 +1,24 @@ +{ + "type": "object", + "additionalProperties": true, + "properties": { + "http": {}, + "ws": {}, + "amqp": {}, + "amqp1": {}, + "mqtt": {}, + "mqtt5": {}, + "kafka": {}, + "anypointmq": {}, + "nats": {}, + "jms": {}, + "sns": {}, + "sqs": {}, + "stomp": {}, + "redis": {}, + "ibmmq": {}, + "solace": {} + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.6.0/bindingsObject.json" +} \ No newline at end of file diff --git a/definitions/2.6.0/channelItem.json b/definitions/2.6.0/channelItem.json new file mode 100644 index 00000000..b57ea97c --- /dev/null +++ b/definitions/2.6.0/channelItem.json @@ -0,0 +1,47 @@ +{ + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.6.0/specificationExtension.json" + } + }, + "properties": { + "$ref": { + "$ref": "http://asyncapi.com/definitions/2.6.0/ReferenceObject.json" + }, + "parameters": { + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/2.6.0/parameter.json" + } + }, + "description": { + "type": "string", + "description": "A description of the channel." + }, + "servers": { + "type": "array", + "description": "The names of the servers on which this channel is available. If absent or empty then this channel must be available on all servers.", + "items": { + "type": "string" + }, + "uniqueItems": true + }, + "publish": { + "$ref": "http://asyncapi.com/definitions/2.6.0/operation.json" + }, + "subscribe": { + "$ref": "http://asyncapi.com/definitions/2.6.0/operation.json" + }, + "deprecated": { + "type": "boolean", + "default": false + }, + "bindings": { + "$ref": "http://asyncapi.com/definitions/2.6.0/bindingsObject.json" + } + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.6.0/channelItem.json" +} \ No newline at end of file diff --git a/definitions/2.6.0/channels.json b/definitions/2.6.0/channels.json new file mode 100644 index 00000000..edd1b3c0 --- /dev/null +++ b/definitions/2.6.0/channels.json @@ -0,0 +1,13 @@ +{ + "type": "object", + "propertyNames": { + "type": "string", + "format": "uri-template", + "minLength": 1 + }, + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/2.6.0/channelItem.json" + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.6.0/channels.json" +} \ No newline at end of file diff --git a/definitions/2.6.0/components.json b/definitions/2.6.0/components.json new file mode 100644 index 00000000..4e3b1b28 --- /dev/null +++ b/definitions/2.6.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/2.6.0/specificationExtension.json" + } + }, + "properties": { + "schemas": { + "$ref": "http://asyncapi.com/definitions/2.6.0/schemas.json" + }, + "servers": { + "$ref": "http://asyncapi.com/definitions/2.6.0/servers.json" + }, + "channels": { + "$ref": "http://asyncapi.com/definitions/2.6.0/channels.json" + }, + "serverVariables": { + "$ref": "http://asyncapi.com/definitions/2.6.0/serverVariables.json" + }, + "messages": { + "$ref": "http://asyncapi.com/definitions/2.6.0/messages.json" + }, + "securitySchemes": { + "type": "object", + "patternProperties": { + "^[\\w\\d\\.\\-_]+$": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.6.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.6.0/SecurityScheme.json" + } + ] + } + } + }, + "parameters": { + "$ref": "http://asyncapi.com/definitions/2.6.0/parameters.json" + }, + "correlationIds": { + "type": "object", + "patternProperties": { + "^[\\w\\d\\.\\-_]+$": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.6.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.6.0/correlationId.json" + } + ] + } + } + }, + "operationTraits": { + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/2.6.0/operationTrait.json" + } + }, + "messageTraits": { + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/2.6.0/messageTrait.json" + } + }, + "serverBindings": { + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/2.6.0/bindingsObject.json" + } + }, + "channelBindings": { + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/2.6.0/bindingsObject.json" + } + }, + "operationBindings": { + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/2.6.0/bindingsObject.json" + } + }, + "messageBindings": { + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/2.6.0/bindingsObject.json" + } + } + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.6.0/components.json" +} \ No newline at end of file diff --git a/definitions/2.6.0/contact.json b/definitions/2.6.0/contact.json new file mode 100644 index 00000000..25f6e180 --- /dev/null +++ b/definitions/2.6.0/contact.json @@ -0,0 +1,28 @@ +{ + "type": "object", + "description": "Contact information for the owners of the API.", + "additionalProperties": false, + "properties": { + "name": { + "type": "string", + "description": "The identifying name of the contact person/organization." + }, + "url": { + "type": "string", + "description": "The URL pointing to the contact information.", + "format": "uri" + }, + "email": { + "type": "string", + "description": "The email address of the contact person/organization.", + "format": "email" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.6.0/specificationExtension.json" + } + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.6.0/contact.json" +} \ No newline at end of file diff --git a/definitions/2.6.0/correlationId.json b/definitions/2.6.0/correlationId.json new file mode 100644 index 00000000..1c5df58d --- /dev/null +++ b/definitions/2.6.0/correlationId.json @@ -0,0 +1,25 @@ +{ + "type": "object", + "required": [ + "location" + ], + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.6.0/specificationExtension.json" + } + }, + "properties": { + "description": { + "type": "string", + "description": "A optional description of the correlation ID. GitHub Flavored Markdown is allowed." + }, + "location": { + "type": "string", + "description": "A runtime expression that specifies the location of the correlation ID", + "pattern": "^\\$message\\.(header|payload)#(\\/(([^\\/~])|(~[01]))*)*" + } + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.6.0/correlationId.json" +} \ No newline at end of file diff --git a/definitions/2.6.0/external.json b/definitions/2.6.0/external.json new file mode 100644 index 00000000..ef5d35e8 --- /dev/null +++ b/definitions/2.6.0/external.json @@ -0,0 +1,5 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.6.0/http://something.example.com/schemas/external.json", + "type": "string" + } \ No newline at end of file diff --git a/definitions/2.6.0/externalDocs.json b/definitions/2.6.0/externalDocs.json new file mode 100644 index 00000000..c51a02af --- /dev/null +++ b/definitions/2.6.0/externalDocs.json @@ -0,0 +1,24 @@ +{ + "type": "object", + "additionalProperties": false, + "description": "information about external documentation", + "required": [ + "url" + ], + "properties": { + "description": { + "type": "string" + }, + "url": { + "type": "string", + "format": "uri" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.6.0/specificationExtension.json" + } + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.6.0/externalDocs.json" +} \ No newline at end of file diff --git a/definitions/2.6.0/info.json b/definitions/2.6.0/info.json new file mode 100644 index 00000000..93f5d023 --- /dev/null +++ b/definitions/2.6.0/info.json @@ -0,0 +1,41 @@ +{ + "type": "object", + "description": "General information about the API.", + "required": [ + "version", + "title" + ], + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.6.0/specificationExtension.json" + } + }, + "properties": { + "title": { + "type": "string", + "description": "A unique and precise title of the API." + }, + "version": { + "type": "string", + "description": "A semantic version number of the API." + }, + "description": { + "type": "string", + "description": "A longer description of the API. Should be different from the title. CommonMark is allowed." + }, + "termsOfService": { + "type": "string", + "description": "A URL to the Terms of Service for the API. MUST be in the format of a URL.", + "format": "uri" + }, + "contact": { + "$ref": "http://asyncapi.com/definitions/2.6.0/contact.json" + }, + "license": { + "$ref": "http://asyncapi.com/definitions/2.6.0/license.json" + } + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.6.0/info.json" +} \ No newline at end of file diff --git a/definitions/2.6.0/license.json b/definitions/2.6.0/license.json new file mode 100644 index 00000000..8bd72537 --- /dev/null +++ b/definitions/2.6.0/license.json @@ -0,0 +1,25 @@ +{ + "type": "object", + "required": [ + "name" + ], + "additionalProperties": false, + "properties": { + "name": { + "type": "string", + "description": "The name of the license type. It's encouraged to use an OSI compatible license." + }, + "url": { + "type": "string", + "description": "The URL pointing to the license.", + "format": "uri" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.6.0/specificationExtension.json" + } + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.6.0/license.json" +} \ No newline at end of file diff --git a/definitions/2.6.0/message.json b/definitions/2.6.0/message.json new file mode 100644 index 00000000..57668893 --- /dev/null +++ b/definitions/2.6.0/message.json @@ -0,0 +1,171 @@ +{ + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.6.0/Reference.json" + }, + { + "oneOf": [ + { + "type": "object", + "required": [ + "oneOf" + ], + "additionalProperties": false, + "properties": { + "oneOf": { + "type": "array", + "items": { + "$ref": "http://asyncapi.com/definitions/2.6.0/message.json" + } + } + } + }, + { + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.6.0/specificationExtension.json" + } + }, + "properties": { + "schemaFormat": { + "type": "string" + }, + "contentType": { + "type": "string" + }, + "headers": { + "allOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.6.0/schema.json" + }, + { + "properties": { + "type": { + "const": "object" + } + } + } + ] + }, + "messageId": { + "type": "string" + }, + "payload": {}, + "correlationId": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.6.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.6.0/correlationId.json" + } + ] + }, + "tags": { + "type": "array", + "items": { + "$ref": "http://asyncapi.com/definitions/2.6.0/tag.json" + }, + "uniqueItems": true + }, + "summary": { + "type": "string", + "description": "A brief summary of the message." + }, + "name": { + "type": "string", + "description": "Name of the message." + }, + "title": { + "type": "string", + "description": "A human-friendly title for the message." + }, + "description": { + "type": "string", + "description": "A longer description of the message. CommonMark is allowed." + }, + "externalDocs": { + "$ref": "http://asyncapi.com/definitions/2.6.0/externalDocs.json" + }, + "deprecated": { + "type": "boolean", + "default": false + }, + "examples": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "anyOf": [ + { + "required": [ + "payload" + ] + }, + { + "required": [ + "headers" + ] + } + ], + "properties": { + "name": { + "type": "string", + "description": "Machine readable name of the message example." + }, + "summary": { + "type": "string", + "description": "A brief summary of the message example." + }, + "headers": { + "type": "object" + }, + "payload": {} + } + } + }, + "bindings": { + "$ref": "http://asyncapi.com/definitions/2.6.0/bindingsObject.json" + }, + "traits": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.6.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.6.0/messageTrait.json" + }, + { + "type": "array", + "items": [ + { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.6.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.6.0/messageTrait.json" + } + ] + }, + { + "type": "object", + "additionalItems": true + } + ] + } + ] + } + } + } + } + ] + } + ], + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.6.0/message.json" +} \ No newline at end of file diff --git a/definitions/2.6.0/messageTrait.json b/definitions/2.6.0/messageTrait.json new file mode 100644 index 00000000..6b8bc079 --- /dev/null +++ b/definitions/2.6.0/messageTrait.json @@ -0,0 +1,85 @@ +{ + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.6.0/specificationExtension.json" + } + }, + "properties": { + "schemaFormat": { + "type": "string" + }, + "contentType": { + "type": "string" + }, + "headers": { + "allOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.6.0/schema.json" + }, + { + "properties": { + "type": { + "const": "object" + } + } + } + ] + }, + "messageId": { + "type": "string" + }, + "correlationId": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.6.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.6.0/correlationId.json" + } + ] + }, + "tags": { + "type": "array", + "items": { + "$ref": "http://asyncapi.com/definitions/2.6.0/tag.json" + }, + "uniqueItems": true + }, + "summary": { + "type": "string", + "description": "A brief summary of the message." + }, + "name": { + "type": "string", + "description": "Name of the message." + }, + "title": { + "type": "string", + "description": "A human-friendly title for the message." + }, + "description": { + "type": "string", + "description": "A longer description of the message. CommonMark is allowed." + }, + "externalDocs": { + "$ref": "http://asyncapi.com/definitions/2.6.0/externalDocs.json" + }, + "deprecated": { + "type": "boolean", + "default": false + }, + "examples": { + "type": "array", + "items": { + "type": "object" + } + }, + "bindings": { + "$ref": "http://asyncapi.com/definitions/2.6.0/bindingsObject.json" + } + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.6.0/messageTrait.json" +} \ No newline at end of file diff --git a/definitions/2.6.0/messages.json b/definitions/2.6.0/messages.json new file mode 100644 index 00000000..af94b2aa --- /dev/null +++ b/definitions/2.6.0/messages.json @@ -0,0 +1,9 @@ +{ + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/2.6.0/message.json" + }, + "description": "JSON objects describing the messages being consumed and produced by the API.", + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.6.0/messages.json" +} \ No newline at end of file diff --git a/definitions/2.6.0/oauth2Flow.json b/definitions/2.6.0/oauth2Flow.json new file mode 100644 index 00000000..dca2e747 --- /dev/null +++ b/definitions/2.6.0/oauth2Flow.json @@ -0,0 +1,28 @@ +{ + "type": "object", + "properties": { + "authorizationUrl": { + "type": "string", + "format": "uri" + }, + "tokenUrl": { + "type": "string", + "format": "uri" + }, + "refreshUrl": { + "type": "string", + "format": "uri" + }, + "scopes": { + "$ref": "http://asyncapi.com/definitions/2.6.0/oauth2Scopes.json" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.6.0/specificationExtension.json" + } + }, + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.6.0/oauth2Flow.json" +} \ No newline at end of file diff --git a/definitions/2.6.0/oauth2Flows.json b/definitions/2.6.0/oauth2Flows.json new file mode 100644 index 00000000..8420d253 --- /dev/null +++ b/definitions/2.6.0/oauth2Flows.json @@ -0,0 +1,105 @@ +{ + "type": "object", + "required": [ + "type", + "flows" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "oauth2" + ] + }, + "description": { + "type": "string" + }, + "flows": { + "type": "object", + "properties": { + "implicit": { + "allOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.6.0/oauth2Flow.json" + }, + { + "required": [ + "authorizationUrl", + "scopes" + ] + }, + { + "not": { + "required": [ + "tokenUrl" + ] + } + } + ] + }, + "password": { + "allOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.6.0/oauth2Flow.json" + }, + { + "required": [ + "tokenUrl", + "scopes" + ] + }, + { + "not": { + "required": [ + "authorizationUrl" + ] + } + } + ] + }, + "clientCredentials": { + "allOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.6.0/oauth2Flow.json" + }, + { + "required": [ + "tokenUrl", + "scopes" + ] + }, + { + "not": { + "required": [ + "authorizationUrl" + ] + } + } + ] + }, + "authorizationCode": { + "allOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.6.0/oauth2Flow.json" + }, + { + "required": [ + "authorizationUrl", + "tokenUrl", + "scopes" + ] + } + ] + } + }, + "additionalProperties": false + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.6.0/specificationExtension.json" + } + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.6.0/oauth2Flows.json" +} \ No newline at end of file diff --git a/definitions/2.6.0/oauth2Scopes.json b/definitions/2.6.0/oauth2Scopes.json new file mode 100644 index 00000000..c9ee586c --- /dev/null +++ b/definitions/2.6.0/oauth2Scopes.json @@ -0,0 +1,8 @@ +{ + "type": "object", + "additionalProperties": { + "type": "string" + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.6.0/oauth2Scopes.json" +} \ No newline at end of file diff --git a/definitions/2.6.0/openIdConnect.json b/definitions/2.6.0/openIdConnect.json new file mode 100644 index 00000000..c2700c1e --- /dev/null +++ b/definitions/2.6.0/openIdConnect.json @@ -0,0 +1,30 @@ +{ + "type": "object", + "required": [ + "type", + "openIdConnectUrl" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "openIdConnect" + ] + }, + "description": { + "type": "string" + }, + "openIdConnectUrl": { + "type": "string", + "format": "uri" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.6.0/specificationExtension.json" + } + }, + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.6.0/openIdConnect.json" +} \ No newline at end of file diff --git a/definitions/2.6.0/operation.json b/definitions/2.6.0/operation.json new file mode 100644 index 00000000..a968a59b --- /dev/null +++ b/definitions/2.6.0/operation.json @@ -0,0 +1,76 @@ +{ + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.6.0/specificationExtension.json" + } + }, + "properties": { + "traits": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.6.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.6.0/operationTrait.json" + }, + { + "type": "array", + "items": [ + { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.6.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.6.0/operationTrait.json" + } + ] + }, + { + "type": "object", + "additionalItems": true + } + ] + } + ] + } + }, + "summary": { + "type": "string" + }, + "description": { + "type": "string" + }, + "security": { + "type": "array", + "items": { + "$ref": "http://asyncapi.com/definitions/2.6.0/SecurityRequirement.json" + } + }, + "tags": { + "type": "array", + "items": { + "$ref": "http://asyncapi.com/definitions/2.6.0/tag.json" + }, + "uniqueItems": true + }, + "externalDocs": { + "$ref": "http://asyncapi.com/definitions/2.6.0/externalDocs.json" + }, + "operationId": { + "type": "string" + }, + "bindings": { + "$ref": "http://asyncapi.com/definitions/2.6.0/bindingsObject.json" + }, + "message": { + "$ref": "http://asyncapi.com/definitions/2.6.0/message.json" + } + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.6.0/operation.json" +} \ No newline at end of file diff --git a/definitions/2.6.0/operationTrait.json b/definitions/2.6.0/operationTrait.json new file mode 100644 index 00000000..e4a94062 --- /dev/null +++ b/definitions/2.6.0/operationTrait.json @@ -0,0 +1,41 @@ +{ + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.6.0/specificationExtension.json" + } + }, + "properties": { + "summary": { + "type": "string" + }, + "description": { + "type": "string" + }, + "tags": { + "type": "array", + "items": { + "$ref": "http://asyncapi.com/definitions/2.6.0/tag.json" + }, + "uniqueItems": true + }, + "externalDocs": { + "$ref": "http://asyncapi.com/definitions/2.6.0/externalDocs.json" + }, + "operationId": { + "type": "string" + }, + "security": { + "type": "array", + "items": { + "$ref": "http://asyncapi.com/definitions/2.6.0/SecurityRequirement.json" + } + }, + "bindings": { + "$ref": "http://asyncapi.com/definitions/2.6.0/bindingsObject.json" + } + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.6.0/operationTrait.json" +} \ No newline at end of file diff --git a/definitions/2.6.0/parameter.json b/definitions/2.6.0/parameter.json new file mode 100644 index 00000000..745cd03a --- /dev/null +++ b/definitions/2.6.0/parameter.json @@ -0,0 +1,24 @@ +{ + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.6.0/specificationExtension.json" + } + }, + "properties": { + "description": { + "type": "string", + "description": "A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed." + }, + "schema": { + "$ref": "http://asyncapi.com/definitions/2.6.0/schema.json" + }, + "location": { + "type": "string", + "description": "A runtime expression that specifies the location of the parameter value", + "pattern": "^\\$message\\.(header|payload)#(\\/(([^\\/~])|(~[01]))*)*" + } + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.6.0/parameter.json" +} \ No newline at end of file diff --git a/definitions/2.6.0/parameters.json b/definitions/2.6.0/parameters.json new file mode 100644 index 00000000..a8f38364 --- /dev/null +++ b/definitions/2.6.0/parameters.json @@ -0,0 +1,16 @@ +{ + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.6.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.6.0/parameter.json" + } + ] + }, + "description": "JSON objects describing re-usable channel parameters.", + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.6.0/parameters.json" +} \ No newline at end of file diff --git a/definitions/2.6.0/schema.json b/definitions/2.6.0/schema.json new file mode 100644 index 00000000..c6f2fa8d --- /dev/null +++ b/definitions/2.6.0/schema.json @@ -0,0 +1,98 @@ +{ + "allOf": [ + { + "$ref": "http://json-schema.org/draft-07/schema#" + }, + { + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.6.0/specificationExtension.json" + } + }, + "properties": { + "additionalProperties": { + "anyOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.6.0/schema.json" + }, + { + "type": "boolean" + } + ], + "default": {} + }, + "items": { + "anyOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.6.0/schema.json" + }, + { + "type": "array", + "minItems": 1, + "items": { + "$ref": "http://asyncapi.com/definitions/2.6.0/schema.json" + } + } + ], + "default": {} + }, + "allOf": { + "type": "array", + "minItems": 1, + "items": { + "$ref": "http://asyncapi.com/definitions/2.6.0/schema.json" + } + }, + "oneOf": { + "type": "array", + "minItems": 1, + "items": { + "$ref": "http://asyncapi.com/definitions/2.6.0/schema.json" + } + }, + "anyOf": { + "type": "array", + "minItems": 1, + "items": { + "$ref": "http://asyncapi.com/definitions/2.6.0/schema.json" + } + }, + "not": { + "$ref": "http://asyncapi.com/definitions/2.6.0/schema.json" + }, + "properties": { + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/2.6.0/schema.json" + }, + "default": {} + }, + "patternProperties": { + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/2.6.0/schema.json" + }, + "default": {} + }, + "propertyNames": { + "$ref": "http://asyncapi.com/definitions/2.6.0/schema.json" + }, + "contains": { + "$ref": "http://asyncapi.com/definitions/2.6.0/schema.json" + }, + "discriminator": { + "type": "string" + }, + "externalDocs": { + "$ref": "http://asyncapi.com/definitions/2.6.0/externalDocs.json" + }, + "deprecated": { + "type": "boolean", + "default": false + } + } + } + ], + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.6.0/schema.json" +} \ No newline at end of file diff --git a/definitions/2.6.0/schemas.json b/definitions/2.6.0/schemas.json new file mode 100644 index 00000000..6b54aa1c --- /dev/null +++ b/definitions/2.6.0/schemas.json @@ -0,0 +1,9 @@ +{ + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/2.6.0/schema.json" + }, + "description": "JSON objects describing schemas the API uses.", + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.6.0/schemas.json" +} \ No newline at end of file diff --git a/definitions/2.6.0/server.json b/definitions/2.6.0/server.json new file mode 100644 index 00000000..1cc26d3b --- /dev/null +++ b/definitions/2.6.0/server.json @@ -0,0 +1,50 @@ +{ + "type": "object", + "description": "An object representing a Server.", + "required": [ + "url", + "protocol" + ], + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.6.0/specificationExtension.json" + } + }, + "properties": { + "url": { + "type": "string" + }, + "description": { + "type": "string" + }, + "protocol": { + "type": "string", + "description": "The transfer protocol." + }, + "protocolVersion": { + "type": "string" + }, + "variables": { + "$ref": "http://asyncapi.com/definitions/2.6.0/serverVariables.json" + }, + "security": { + "type": "array", + "items": { + "$ref": "http://asyncapi.com/definitions/2.6.0/SecurityRequirement.json" + } + }, + "bindings": { + "$ref": "http://asyncapi.com/definitions/2.6.0/bindingsObject.json" + }, + "tags": { + "type": "array", + "items": { + "$ref": "http://asyncapi.com/definitions/2.6.0/tag.json" + }, + "uniqueItems": true + } + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.6.0/server.json" +} \ No newline at end of file diff --git a/definitions/2.6.0/serverVariable.json b/definitions/2.6.0/serverVariable.json new file mode 100644 index 00000000..b12f425f --- /dev/null +++ b/definitions/2.6.0/serverVariable.json @@ -0,0 +1,33 @@ +{ + "type": "object", + "description": "An object representing a Server Variable for server URL template substitution.", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.6.0/specificationExtension.json" + } + }, + "properties": { + "enum": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + }, + "default": { + "type": "string" + }, + "description": { + "type": "string" + }, + "examples": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.6.0/serverVariable.json" +} \ No newline at end of file diff --git a/definitions/2.6.0/serverVariables.json b/definitions/2.6.0/serverVariables.json new file mode 100644 index 00000000..23787ac4 --- /dev/null +++ b/definitions/2.6.0/serverVariables.json @@ -0,0 +1,15 @@ +{ + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.6.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.6.0/serverVariable.json" + } + ] + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.6.0/serverVariables.json" +} \ No newline at end of file diff --git a/definitions/2.6.0/servers.json b/definitions/2.6.0/servers.json new file mode 100644 index 00000000..237eb0f7 --- /dev/null +++ b/definitions/2.6.0/servers.json @@ -0,0 +1,16 @@ +{ + "description": "An object representing multiple servers.", + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.6.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.6.0/server.json" + } + ] + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.6.0/servers.json" +} \ No newline at end of file diff --git a/definitions/2.6.0/specificationExtension.json b/definitions/2.6.0/specificationExtension.json new file mode 100644 index 00000000..02846ff4 --- /dev/null +++ b/definitions/2.6.0/specificationExtension.json @@ -0,0 +1,7 @@ +{ + "description": "Any property starting with x- is valid.", + "additionalProperties": true, + "additionalItems": true, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.6.0/specificationExtension.json" +} \ No newline at end of file diff --git a/definitions/2.6.0/symmetricEncryption.json b/definitions/2.6.0/symmetricEncryption.json new file mode 100644 index 00000000..5981dc78 --- /dev/null +++ b/definitions/2.6.0/symmetricEncryption.json @@ -0,0 +1,25 @@ +{ + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "symmetricEncryption" + ] + }, + "description": { + "type": "string" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.6.0/specificationExtension.json" + } + }, + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.6.0/symmetricEncryption.json" +} \ No newline at end of file diff --git a/definitions/2.6.0/tag.json b/definitions/2.6.0/tag.json new file mode 100644 index 00000000..2e0a28ad --- /dev/null +++ b/definitions/2.6.0/tag.json @@ -0,0 +1,25 @@ +{ + "type": "object", + "additionalProperties": false, + "required": [ + "name" + ], + "properties": { + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "externalDocs": { + "$ref": "http://asyncapi.com/definitions/2.6.0/externalDocs.json" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.6.0/specificationExtension.json" + } + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.6.0/tag.json" +} \ No newline at end of file diff --git a/definitions/2.6.0/userPassword.json b/definitions/2.6.0/userPassword.json new file mode 100644 index 00000000..8f1e7a41 --- /dev/null +++ b/definitions/2.6.0/userPassword.json @@ -0,0 +1,25 @@ +{ + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "userPassword" + ] + }, + "description": { + "type": "string" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.6.0/specificationExtension.json" + } + }, + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/2.6.0/userPassword.json" +} \ No newline at end of file diff --git a/index.d.ts b/index.d.ts index 36e37f47..fa45bd57 100644 --- a/index.d.ts +++ b/index.d.ts @@ -7,5 +7,6 @@ declare const _exports: { '2.3.0': JSONSchema7; '2.4.0': JSONSchema7; '2.5.0': JSONSchema7; + '2.6.0': JSONSchema7; }; export = _exports; diff --git a/index.js b/index.js index b19becf1..ab89c9a8 100644 --- a/index.js +++ b/index.js @@ -5,4 +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'), + '2.6.0': require('./schemas/2.6.0.json'), }; diff --git a/schemas/all.schema-store.json b/schemas/all.schema-store.json index 837813fa..60407b69 100644 --- a/schemas/all.schema-store.json +++ b/schemas/all.schema-store.json @@ -158,6 +158,20 @@ "$ref": "http://asyncapi.com/schema-store/2.5.0.json" } ] + }, + { + "allOf": [ + { + "properties": { + "asyncapi": { + "const": "2.6.0" + } + } + }, + { + "$ref": "http://asyncapi.com/schema-store/2.6.0.json" + } + ] } ] } From 9e1a24c47dc8439163362be84f0b3ce226e81d91 Mon Sep 17 00:00:00 2001 From: Alex Wichmann Date: Tue, 31 Jan 2023 10:27:31 +0100 Subject: [PATCH 3/5] feat: add schema for 2.6.0 and pulsar binding to ObjectBinding (#295) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Sergio Moya <1083296+smoya@users.noreply.github.com> Co-authored-by: Tenshi Codes <116377630+codingtenshi@users.noreply.github.com> Co-authored-by: mastdev <44112399+mastdev@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: asyncapi-bot Co-authored-by: Fran MΓ©ndez Co-authored-by: Lukasz Gornicki Co-authored-by: Maciej UrbaΕ„czyk Co-authored-by: Vinicius Reif Biavatti --- definitions/2.6.0/bindingsObject.json | 4 +- schemas/2.6.0.json | 1847 +++++++++++++++++++++++++ 2 files changed, 1850 insertions(+), 1 deletion(-) create mode 100644 schemas/2.6.0.json diff --git a/definitions/2.6.0/bindingsObject.json b/definitions/2.6.0/bindingsObject.json index 47d69cb5..a9c67756 100644 --- a/definitions/2.6.0/bindingsObject.json +++ b/definitions/2.6.0/bindingsObject.json @@ -17,7 +17,9 @@ "stomp": {}, "redis": {}, "ibmmq": {}, - "solace": {} + "solace": {}, + "googlepubsub": {}, + "pulsar": {} }, "$schema": "http://json-schema.org/draft-07/schema#", "$id": "http://asyncapi.com/definitions/2.6.0/bindingsObject.json" diff --git a/schemas/2.6.0.json b/schemas/2.6.0.json new file mode 100644 index 00000000..dede888e --- /dev/null +++ b/schemas/2.6.0.json @@ -0,0 +1,1847 @@ +{ + "$id": "http://asyncapi.com/definitions/2.6.0/asyncapi.json", + "$schema": "http://json-schema.org/draft-07/schema", + "title": "AsyncAPI 2.6.0 schema.", + "type": "object", + "required": [ + "asyncapi", + "info", + "channels" + ], + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.6.0/specificationExtension.json" + } + }, + "properties": { + "asyncapi": { + "type": "string", + "enum": [ + "2.6.0" + ], + "description": "The AsyncAPI specification version of this document." + }, + "id": { + "type": "string", + "description": "A unique id representing the application.", + "format": "uri" + }, + "info": { + "$ref": "http://asyncapi.com/definitions/2.6.0/info.json" + }, + "servers": { + "$ref": "http://asyncapi.com/definitions/2.6.0/servers.json" + }, + "defaultContentType": { + "type": "string" + }, + "channels": { + "$ref": "http://asyncapi.com/definitions/2.6.0/channels.json" + }, + "components": { + "$ref": "http://asyncapi.com/definitions/2.6.0/components.json" + }, + "tags": { + "type": "array", + "items": { + "$ref": "http://asyncapi.com/definitions/2.6.0/tag.json" + }, + "uniqueItems": true + }, + "externalDocs": { + "$ref": "http://asyncapi.com/definitions/2.6.0/externalDocs.json" + } + }, + "definitions": { + "http://asyncapi.com/definitions/2.6.0/specificationExtension.json": { + "$id": "http://asyncapi.com/definitions/2.6.0/specificationExtension.json", + "description": "Any property starting with x- is valid.", + "additionalProperties": true, + "additionalItems": true + }, + "http://asyncapi.com/definitions/2.6.0/info.json": { + "$id": "http://asyncapi.com/definitions/2.6.0/info.json", + "type": "object", + "description": "General information about the API.", + "required": [ + "version", + "title" + ], + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.6.0/specificationExtension.json" + } + }, + "properties": { + "title": { + "type": "string", + "description": "A unique and precise title of the API." + }, + "version": { + "type": "string", + "description": "A semantic version number of the API." + }, + "description": { + "type": "string", + "description": "A longer description of the API. Should be different from the title. CommonMark is allowed." + }, + "termsOfService": { + "type": "string", + "description": "A URL to the Terms of Service for the API. MUST be in the format of a URL.", + "format": "uri" + }, + "contact": { + "$ref": "http://asyncapi.com/definitions/2.6.0/contact.json" + }, + "license": { + "$ref": "http://asyncapi.com/definitions/2.6.0/license.json" + } + } + }, + "http://asyncapi.com/definitions/2.6.0/contact.json": { + "$id": "http://asyncapi.com/definitions/2.6.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/2.6.0/specificationExtension.json" + } + } + }, + "http://asyncapi.com/definitions/2.6.0/license.json": { + "$id": "http://asyncapi.com/definitions/2.6.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/2.6.0/specificationExtension.json" + } + } + }, + "http://asyncapi.com/definitions/2.6.0/servers.json": { + "$id": "http://asyncapi.com/definitions/2.6.0/servers.json", + "description": "An object representing multiple servers.", + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.6.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.6.0/server.json" + } + ] + } + }, + "http://asyncapi.com/definitions/2.6.0/Reference.json": { + "$id": "http://asyncapi.com/definitions/2.6.0/Reference.json", + "type": "object", + "required": [ + "$ref" + ], + "properties": { + "$ref": { + "$ref": "http://asyncapi.com/definitions/2.6.0/ReferenceObject.json" + } + } + }, + "http://asyncapi.com/definitions/2.6.0/ReferenceObject.json": { + "$id": "http://asyncapi.com/definitions/2.6.0/ReferenceObject.json", + "type": "string", + "format": "uri-reference" + }, + "http://asyncapi.com/definitions/2.6.0/server.json": { + "$id": "http://asyncapi.com/definitions/2.6.0/server.json", + "type": "object", + "description": "An object representing a Server.", + "required": [ + "url", + "protocol" + ], + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.6.0/specificationExtension.json" + } + }, + "properties": { + "url": { + "type": "string" + }, + "description": { + "type": "string" + }, + "protocol": { + "type": "string", + "description": "The transfer protocol." + }, + "protocolVersion": { + "type": "string" + }, + "variables": { + "$ref": "http://asyncapi.com/definitions/2.6.0/serverVariables.json" + }, + "security": { + "type": "array", + "items": { + "$ref": "http://asyncapi.com/definitions/2.6.0/SecurityRequirement.json" + } + }, + "bindings": { + "$ref": "http://asyncapi.com/definitions/2.6.0/bindingsObject.json" + }, + "tags": { + "type": "array", + "items": { + "$ref": "http://asyncapi.com/definitions/2.6.0/tag.json" + }, + "uniqueItems": true + } + } + }, + "http://asyncapi.com/definitions/2.6.0/serverVariables.json": { + "$id": "http://asyncapi.com/definitions/2.6.0/serverVariables.json", + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.6.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.6.0/serverVariable.json" + } + ] + } + }, + "http://asyncapi.com/definitions/2.6.0/serverVariable.json": { + "$id": "http://asyncapi.com/definitions/2.6.0/serverVariable.json", + "type": "object", + "description": "An object representing a Server Variable for server URL template substitution.", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.6.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/2.6.0/SecurityRequirement.json": { + "$id": "http://asyncapi.com/definitions/2.6.0/SecurityRequirement.json", + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + } + }, + "http://asyncapi.com/definitions/2.6.0/bindingsObject.json": { + "$id": "http://asyncapi.com/definitions/2.6.0/bindingsObject.json", + "type": "object", + "additionalProperties": true, + "properties": { + "http": {}, + "ws": {}, + "amqp": {}, + "amqp1": {}, + "mqtt": {}, + "mqtt5": {}, + "kafka": {}, + "anypointmq": {}, + "nats": {}, + "jms": {}, + "sns": {}, + "sqs": {}, + "stomp": {}, + "redis": {}, + "ibmmq": {}, + "solace": {}, + "googlepubsub": {}, + "pulsar": {} + } + }, + "http://asyncapi.com/definitions/2.6.0/tag.json": { + "$id": "http://asyncapi.com/definitions/2.6.0/tag.json", + "type": "object", + "additionalProperties": false, + "required": [ + "name" + ], + "properties": { + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "externalDocs": { + "$ref": "http://asyncapi.com/definitions/2.6.0/externalDocs.json" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.6.0/specificationExtension.json" + } + } + }, + "http://asyncapi.com/definitions/2.6.0/externalDocs.json": { + "$id": "http://asyncapi.com/definitions/2.6.0/externalDocs.json", + "type": "object", + "additionalProperties": false, + "description": "information about external documentation", + "required": [ + "url" + ], + "properties": { + "description": { + "type": "string" + }, + "url": { + "type": "string", + "format": "uri" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.6.0/specificationExtension.json" + } + } + }, + "http://asyncapi.com/definitions/2.6.0/channels.json": { + "$id": "http://asyncapi.com/definitions/2.6.0/channels.json", + "type": "object", + "propertyNames": { + "type": "string", + "format": "uri-template", + "minLength": 1 + }, + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/2.6.0/channelItem.json" + } + }, + "http://asyncapi.com/definitions/2.6.0/channelItem.json": { + "$id": "http://asyncapi.com/definitions/2.6.0/channelItem.json", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.6.0/specificationExtension.json" + } + }, + "properties": { + "$ref": { + "$ref": "http://asyncapi.com/definitions/2.6.0/ReferenceObject.json" + }, + "parameters": { + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/2.6.0/parameter.json" + } + }, + "description": { + "type": "string", + "description": "A description of the channel." + }, + "servers": { + "type": "array", + "description": "The names of the servers on which this channel is available. If absent or empty then this channel must be available on all servers.", + "items": { + "type": "string" + }, + "uniqueItems": true + }, + "publish": { + "$ref": "http://asyncapi.com/definitions/2.6.0/operation.json" + }, + "subscribe": { + "$ref": "http://asyncapi.com/definitions/2.6.0/operation.json" + }, + "deprecated": { + "type": "boolean", + "default": false + }, + "bindings": { + "$ref": "http://asyncapi.com/definitions/2.6.0/bindingsObject.json" + } + } + }, + "http://asyncapi.com/definitions/2.6.0/parameter.json": { + "$id": "http://asyncapi.com/definitions/2.6.0/parameter.json", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.6.0/specificationExtension.json" + } + }, + "properties": { + "description": { + "type": "string", + "description": "A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed." + }, + "schema": { + "$ref": "http://asyncapi.com/definitions/2.6.0/schema.json" + }, + "location": { + "type": "string", + "description": "A runtime expression that specifies the location of the parameter value", + "pattern": "^\\$message\\.(header|payload)#(\\/(([^\\/~])|(~[01]))*)*" + } + } + }, + "http://asyncapi.com/definitions/2.6.0/schema.json": { + "$id": "http://asyncapi.com/definitions/2.6.0/schema.json", + "allOf": [ + { + "$ref": "http://json-schema.org/draft-07/schema#" + }, + { + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.6.0/specificationExtension.json" + } + }, + "properties": { + "additionalProperties": { + "anyOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.6.0/schema.json" + }, + { + "type": "boolean" + } + ], + "default": {} + }, + "items": { + "anyOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.6.0/schema.json" + }, + { + "type": "array", + "minItems": 1, + "items": { + "$ref": "http://asyncapi.com/definitions/2.6.0/schema.json" + } + } + ], + "default": {} + }, + "allOf": { + "type": "array", + "minItems": 1, + "items": { + "$ref": "http://asyncapi.com/definitions/2.6.0/schema.json" + } + }, + "oneOf": { + "type": "array", + "minItems": 1, + "items": { + "$ref": "http://asyncapi.com/definitions/2.6.0/schema.json" + } + }, + "anyOf": { + "type": "array", + "minItems": 1, + "items": { + "$ref": "http://asyncapi.com/definitions/2.6.0/schema.json" + } + }, + "not": { + "$ref": "http://asyncapi.com/definitions/2.6.0/schema.json" + }, + "properties": { + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/2.6.0/schema.json" + }, + "default": {} + }, + "patternProperties": { + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/2.6.0/schema.json" + }, + "default": {} + }, + "propertyNames": { + "$ref": "http://asyncapi.com/definitions/2.6.0/schema.json" + }, + "contains": { + "$ref": "http://asyncapi.com/definitions/2.6.0/schema.json" + }, + "discriminator": { + "type": "string" + }, + "externalDocs": { + "$ref": "http://asyncapi.com/definitions/2.6.0/externalDocs.json" + }, + "deprecated": { + "type": "boolean", + "default": false + } + } + } + ] + }, + "http://json-schema.org/draft-07/schema": { + "$id": "http://json-schema.org/draft-07/schema", + "title": "Core schema meta-schema", + "definitions": { + "schemaArray": { + "type": "array", + "minItems": 1, + "items": { + "$ref": "#" + } + }, + "nonNegativeInteger": { + "type": "integer", + "minimum": 0 + }, + "nonNegativeIntegerDefault0": { + "allOf": [ + { + "$ref": "#/definitions/nonNegativeInteger" + }, + { + "default": 0 + } + ] + }, + "simpleTypes": { + "enum": [ + "array", + "boolean", + "integer", + "null", + "number", + "object", + "string" + ] + }, + "stringArray": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true, + "default": [] + } + }, + "type": [ + "object", + "boolean" + ], + "properties": { + "$id": { + "type": "string", + "format": "uri-reference" + }, + "$schema": { + "type": "string", + "format": "uri" + }, + "$ref": { + "type": "string", + "format": "uri-reference" + }, + "$comment": { + "type": "string" + }, + "title": { + "type": "string" + }, + "description": { + "type": "string" + }, + "default": true, + "readOnly": { + "type": "boolean", + "default": false + }, + "writeOnly": { + "type": "boolean", + "default": false + }, + "examples": { + "type": "array", + "items": true + }, + "multipleOf": { + "type": "number", + "exclusiveMinimum": 0 + }, + "maximum": { + "type": "number" + }, + "exclusiveMaximum": { + "type": "number" + }, + "minimum": { + "type": "number" + }, + "exclusiveMinimum": { + "type": "number" + }, + "maxLength": { + "$ref": "#/definitions/nonNegativeInteger" + }, + "minLength": { + "$ref": "#/definitions/nonNegativeIntegerDefault0" + }, + "pattern": { + "type": "string", + "format": "regex" + }, + "additionalItems": { + "$ref": "#" + }, + "items": { + "anyOf": [ + { + "$ref": "#" + }, + { + "$ref": "#/definitions/schemaArray" + } + ], + "default": true + }, + "maxItems": { + "$ref": "#/definitions/nonNegativeInteger" + }, + "minItems": { + "$ref": "#/definitions/nonNegativeIntegerDefault0" + }, + "uniqueItems": { + "type": "boolean", + "default": false + }, + "contains": { + "$ref": "#" + }, + "maxProperties": { + "$ref": "#/definitions/nonNegativeInteger" + }, + "minProperties": { + "$ref": "#/definitions/nonNegativeIntegerDefault0" + }, + "required": { + "$ref": "#/definitions/stringArray" + }, + "additionalProperties": { + "$ref": "#" + }, + "definitions": { + "type": "object", + "additionalProperties": { + "$ref": "#" + }, + "default": {} + }, + "properties": { + "type": "object", + "additionalProperties": { + "$ref": "#" + }, + "default": {} + }, + "patternProperties": { + "type": "object", + "additionalProperties": { + "$ref": "#" + }, + "propertyNames": { + "format": "regex" + }, + "default": {} + }, + "dependencies": { + "type": "object", + "additionalProperties": { + "anyOf": [ + { + "$ref": "#" + }, + { + "$ref": "#/definitions/stringArray" + } + ] + } + }, + "propertyNames": { + "$ref": "#" + }, + "const": true, + "enum": { + "type": "array", + "items": true, + "minItems": 1, + "uniqueItems": true + }, + "type": { + "anyOf": [ + { + "$ref": "#/definitions/simpleTypes" + }, + { + "type": "array", + "items": { + "$ref": "#/definitions/simpleTypes" + }, + "minItems": 1, + "uniqueItems": true + } + ] + }, + "format": { + "type": "string" + }, + "contentMediaType": { + "type": "string" + }, + "contentEncoding": { + "type": "string" + }, + "if": { + "$ref": "#" + }, + "then": { + "$ref": "#" + }, + "else": { + "$ref": "#" + }, + "allOf": { + "$ref": "#/definitions/schemaArray" + }, + "anyOf": { + "$ref": "#/definitions/schemaArray" + }, + "oneOf": { + "$ref": "#/definitions/schemaArray" + }, + "not": { + "$ref": "#" + } + }, + "default": true + }, + "http://asyncapi.com/definitions/2.6.0/operation.json": { + "$id": "http://asyncapi.com/definitions/2.6.0/operation.json", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.6.0/specificationExtension.json" + } + }, + "properties": { + "traits": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.6.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.6.0/operationTrait.json" + }, + { + "type": "array", + "items": [ + { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.6.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.6.0/operationTrait.json" + } + ] + }, + { + "type": "object", + "additionalItems": true + } + ] + } + ] + } + }, + "summary": { + "type": "string" + }, + "description": { + "type": "string" + }, + "security": { + "type": "array", + "items": { + "$ref": "http://asyncapi.com/definitions/2.6.0/SecurityRequirement.json" + } + }, + "tags": { + "type": "array", + "items": { + "$ref": "http://asyncapi.com/definitions/2.6.0/tag.json" + }, + "uniqueItems": true + }, + "externalDocs": { + "$ref": "http://asyncapi.com/definitions/2.6.0/externalDocs.json" + }, + "operationId": { + "type": "string" + }, + "bindings": { + "$ref": "http://asyncapi.com/definitions/2.6.0/bindingsObject.json" + }, + "message": { + "$ref": "http://asyncapi.com/definitions/2.6.0/message.json" + } + } + }, + "http://asyncapi.com/definitions/2.6.0/operationTrait.json": { + "$id": "http://asyncapi.com/definitions/2.6.0/operationTrait.json", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.6.0/specificationExtension.json" + } + }, + "properties": { + "summary": { + "type": "string" + }, + "description": { + "type": "string" + }, + "tags": { + "type": "array", + "items": { + "$ref": "http://asyncapi.com/definitions/2.6.0/tag.json" + }, + "uniqueItems": true + }, + "externalDocs": { + "$ref": "http://asyncapi.com/definitions/2.6.0/externalDocs.json" + }, + "operationId": { + "type": "string" + }, + "security": { + "type": "array", + "items": { + "$ref": "http://asyncapi.com/definitions/2.6.0/SecurityRequirement.json" + } + }, + "bindings": { + "$ref": "http://asyncapi.com/definitions/2.6.0/bindingsObject.json" + } + } + }, + "http://asyncapi.com/definitions/2.6.0/message.json": { + "$id": "http://asyncapi.com/definitions/2.6.0/message.json", + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.6.0/Reference.json" + }, + { + "oneOf": [ + { + "type": "object", + "required": [ + "oneOf" + ], + "additionalProperties": false, + "properties": { + "oneOf": { + "type": "array", + "items": { + "$ref": "http://asyncapi.com/definitions/2.6.0/message.json" + } + } + } + }, + { + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.6.0/specificationExtension.json" + } + }, + "properties": { + "schemaFormat": { + "type": "string" + }, + "contentType": { + "type": "string" + }, + "headers": { + "allOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.6.0/schema.json" + }, + { + "properties": { + "type": { + "const": "object" + } + } + } + ] + }, + "messageId": { + "type": "string" + }, + "payload": {}, + "correlationId": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.6.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.6.0/correlationId.json" + } + ] + }, + "tags": { + "type": "array", + "items": { + "$ref": "http://asyncapi.com/definitions/2.6.0/tag.json" + }, + "uniqueItems": true + }, + "summary": { + "type": "string", + "description": "A brief summary of the message." + }, + "name": { + "type": "string", + "description": "Name of the message." + }, + "title": { + "type": "string", + "description": "A human-friendly title for the message." + }, + "description": { + "type": "string", + "description": "A longer description of the message. CommonMark is allowed." + }, + "externalDocs": { + "$ref": "http://asyncapi.com/definitions/2.6.0/externalDocs.json" + }, + "deprecated": { + "type": "boolean", + "default": false + }, + "examples": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "anyOf": [ + { + "required": [ + "payload" + ] + }, + { + "required": [ + "headers" + ] + } + ], + "properties": { + "name": { + "type": "string", + "description": "Machine readable name of the message example." + }, + "summary": { + "type": "string", + "description": "A brief summary of the message example." + }, + "headers": { + "type": "object" + }, + "payload": {} + } + } + }, + "bindings": { + "$ref": "http://asyncapi.com/definitions/2.6.0/bindingsObject.json" + }, + "traits": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.6.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.6.0/messageTrait.json" + }, + { + "type": "array", + "items": [ + { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.6.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.6.0/messageTrait.json" + } + ] + }, + { + "type": "object", + "additionalItems": true + } + ] + } + ] + } + } + } + } + ] + } + ] + }, + "http://asyncapi.com/definitions/2.6.0/correlationId.json": { + "$id": "http://asyncapi.com/definitions/2.6.0/correlationId.json", + "type": "object", + "required": [ + "location" + ], + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.6.0/specificationExtension.json" + } + }, + "properties": { + "description": { + "type": "string", + "description": "A optional description of the correlation ID. GitHub Flavored Markdown is allowed." + }, + "location": { + "type": "string", + "description": "A runtime expression that specifies the location of the correlation ID", + "pattern": "^\\$message\\.(header|payload)#(\\/(([^\\/~])|(~[01]))*)*" + } + } + }, + "http://asyncapi.com/definitions/2.6.0/messageTrait.json": { + "$id": "http://asyncapi.com/definitions/2.6.0/messageTrait.json", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.6.0/specificationExtension.json" + } + }, + "properties": { + "schemaFormat": { + "type": "string" + }, + "contentType": { + "type": "string" + }, + "headers": { + "allOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.6.0/schema.json" + }, + { + "properties": { + "type": { + "const": "object" + } + } + } + ] + }, + "messageId": { + "type": "string" + }, + "correlationId": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.6.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.6.0/correlationId.json" + } + ] + }, + "tags": { + "type": "array", + "items": { + "$ref": "http://asyncapi.com/definitions/2.6.0/tag.json" + }, + "uniqueItems": true + }, + "summary": { + "type": "string", + "description": "A brief summary of the message." + }, + "name": { + "type": "string", + "description": "Name of the message." + }, + "title": { + "type": "string", + "description": "A human-friendly title for the message." + }, + "description": { + "type": "string", + "description": "A longer description of the message. CommonMark is allowed." + }, + "externalDocs": { + "$ref": "http://asyncapi.com/definitions/2.6.0/externalDocs.json" + }, + "deprecated": { + "type": "boolean", + "default": false + }, + "examples": { + "type": "array", + "items": { + "type": "object" + } + }, + "bindings": { + "$ref": "http://asyncapi.com/definitions/2.6.0/bindingsObject.json" + } + } + }, + "http://asyncapi.com/definitions/2.6.0/components.json": { + "$id": "http://asyncapi.com/definitions/2.6.0/components.json", + "type": "object", + "description": "An object to hold a set of reusable objects for different aspects of the AsyncAPI Specification.", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.6.0/specificationExtension.json" + } + }, + "properties": { + "schemas": { + "$ref": "http://asyncapi.com/definitions/2.6.0/schemas.json" + }, + "servers": { + "$ref": "http://asyncapi.com/definitions/2.6.0/servers.json" + }, + "channels": { + "$ref": "http://asyncapi.com/definitions/2.6.0/channels.json" + }, + "serverVariables": { + "$ref": "http://asyncapi.com/definitions/2.6.0/serverVariables.json" + }, + "messages": { + "$ref": "http://asyncapi.com/definitions/2.6.0/messages.json" + }, + "securitySchemes": { + "type": "object", + "patternProperties": { + "^[\\w\\d\\.\\-_]+$": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.6.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.6.0/SecurityScheme.json" + } + ] + } + } + }, + "parameters": { + "$ref": "http://asyncapi.com/definitions/2.6.0/parameters.json" + }, + "correlationIds": { + "type": "object", + "patternProperties": { + "^[\\w\\d\\.\\-_]+$": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.6.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.6.0/correlationId.json" + } + ] + } + } + }, + "operationTraits": { + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/2.6.0/operationTrait.json" + } + }, + "messageTraits": { + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/2.6.0/messageTrait.json" + } + }, + "serverBindings": { + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/2.6.0/bindingsObject.json" + } + }, + "channelBindings": { + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/2.6.0/bindingsObject.json" + } + }, + "operationBindings": { + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/2.6.0/bindingsObject.json" + } + }, + "messageBindings": { + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/2.6.0/bindingsObject.json" + } + } + } + }, + "http://asyncapi.com/definitions/2.6.0/schemas.json": { + "$id": "http://asyncapi.com/definitions/2.6.0/schemas.json", + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/2.6.0/schema.json" + }, + "description": "JSON objects describing schemas the API uses." + }, + "http://asyncapi.com/definitions/2.6.0/messages.json": { + "$id": "http://asyncapi.com/definitions/2.6.0/messages.json", + "type": "object", + "additionalProperties": { + "$ref": "http://asyncapi.com/definitions/2.6.0/message.json" + }, + "description": "JSON objects describing the messages being consumed and produced by the API." + }, + "http://asyncapi.com/definitions/2.6.0/SecurityScheme.json": { + "$id": "http://asyncapi.com/definitions/2.6.0/SecurityScheme.json", + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.6.0/userPassword.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.6.0/apiKey.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.6.0/X509.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.6.0/symmetricEncryption.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.6.0/asymmetricEncryption.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.6.0/HTTPSecurityScheme.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.6.0/oauth2Flows.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.6.0/openIdConnect.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.6.0/SaslSecurityScheme.json" + } + ] + }, + "http://asyncapi.com/definitions/2.6.0/userPassword.json": { + "$id": "http://asyncapi.com/definitions/2.6.0/userPassword.json", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "userPassword" + ] + }, + "description": { + "type": "string" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.6.0/specificationExtension.json" + } + }, + "additionalProperties": false + }, + "http://asyncapi.com/definitions/2.6.0/apiKey.json": { + "$id": "http://asyncapi.com/definitions/2.6.0/apiKey.json", + "type": "object", + "required": [ + "type", + "in" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "apiKey" + ] + }, + "in": { + "type": "string", + "enum": [ + "user", + "password" + ] + }, + "description": { + "type": "string" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.6.0/specificationExtension.json" + } + }, + "additionalProperties": false + }, + "http://asyncapi.com/definitions/2.6.0/X509.json": { + "$id": "http://asyncapi.com/definitions/2.6.0/X509.json", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "X509" + ] + }, + "description": { + "type": "string" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.6.0/specificationExtension.json" + } + }, + "additionalProperties": false + }, + "http://asyncapi.com/definitions/2.6.0/symmetricEncryption.json": { + "$id": "http://asyncapi.com/definitions/2.6.0/symmetricEncryption.json", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "symmetricEncryption" + ] + }, + "description": { + "type": "string" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.6.0/specificationExtension.json" + } + }, + "additionalProperties": false + }, + "http://asyncapi.com/definitions/2.6.0/asymmetricEncryption.json": { + "$id": "http://asyncapi.com/definitions/2.6.0/asymmetricEncryption.json", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "asymmetricEncryption" + ] + }, + "description": { + "type": "string" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.6.0/specificationExtension.json" + } + }, + "additionalProperties": false + }, + "http://asyncapi.com/definitions/2.6.0/HTTPSecurityScheme.json": { + "$id": "http://asyncapi.com/definitions/2.6.0/HTTPSecurityScheme.json", + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.6.0/NonBearerHTTPSecurityScheme.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.6.0/BearerHTTPSecurityScheme.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.6.0/APIKeyHTTPSecurityScheme.json" + } + ] + }, + "http://asyncapi.com/definitions/2.6.0/NonBearerHTTPSecurityScheme.json": { + "$id": "http://asyncapi.com/definitions/2.6.0/NonBearerHTTPSecurityScheme.json", + "not": { + "type": "object", + "properties": { + "scheme": { + "type": "string", + "enum": [ + "bearer" + ] + } + } + }, + "type": "object", + "required": [ + "scheme", + "type" + ], + "properties": { + "scheme": { + "type": "string" + }, + "description": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "http" + ] + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.6.0/specificationExtension.json" + } + }, + "additionalProperties": false + }, + "http://asyncapi.com/definitions/2.6.0/BearerHTTPSecurityScheme.json": { + "$id": "http://asyncapi.com/definitions/2.6.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/2.6.0/specificationExtension.json" + } + }, + "additionalProperties": false + }, + "http://asyncapi.com/definitions/2.6.0/APIKeyHTTPSecurityScheme.json": { + "$id": "http://asyncapi.com/definitions/2.6.0/APIKeyHTTPSecurityScheme.json", + "type": "object", + "required": [ + "type", + "name", + "in" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "httpApiKey" + ] + }, + "name": { + "type": "string" + }, + "in": { + "type": "string", + "enum": [ + "header", + "query", + "cookie" + ] + }, + "description": { + "type": "string" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.6.0/specificationExtension.json" + } + }, + "additionalProperties": false + }, + "http://asyncapi.com/definitions/2.6.0/oauth2Flows.json": { + "$id": "http://asyncapi.com/definitions/2.6.0/oauth2Flows.json", + "type": "object", + "required": [ + "type", + "flows" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "oauth2" + ] + }, + "description": { + "type": "string" + }, + "flows": { + "type": "object", + "properties": { + "implicit": { + "allOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.6.0/oauth2Flow.json" + }, + { + "required": [ + "authorizationUrl", + "scopes" + ] + }, + { + "not": { + "required": [ + "tokenUrl" + ] + } + } + ] + }, + "password": { + "allOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.6.0/oauth2Flow.json" + }, + { + "required": [ + "tokenUrl", + "scopes" + ] + }, + { + "not": { + "required": [ + "authorizationUrl" + ] + } + } + ] + }, + "clientCredentials": { + "allOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.6.0/oauth2Flow.json" + }, + { + "required": [ + "tokenUrl", + "scopes" + ] + }, + { + "not": { + "required": [ + "authorizationUrl" + ] + } + } + ] + }, + "authorizationCode": { + "allOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.6.0/oauth2Flow.json" + }, + { + "required": [ + "authorizationUrl", + "tokenUrl", + "scopes" + ] + } + ] + } + }, + "additionalProperties": false + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.6.0/specificationExtension.json" + } + } + }, + "http://asyncapi.com/definitions/2.6.0/oauth2Flow.json": { + "$id": "http://asyncapi.com/definitions/2.6.0/oauth2Flow.json", + "type": "object", + "properties": { + "authorizationUrl": { + "type": "string", + "format": "uri" + }, + "tokenUrl": { + "type": "string", + "format": "uri" + }, + "refreshUrl": { + "type": "string", + "format": "uri" + }, + "scopes": { + "$ref": "http://asyncapi.com/definitions/2.6.0/oauth2Scopes.json" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.6.0/specificationExtension.json" + } + }, + "additionalProperties": false + }, + "http://asyncapi.com/definitions/2.6.0/oauth2Scopes.json": { + "$id": "http://asyncapi.com/definitions/2.6.0/oauth2Scopes.json", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "http://asyncapi.com/definitions/2.6.0/openIdConnect.json": { + "$id": "http://asyncapi.com/definitions/2.6.0/openIdConnect.json", + "type": "object", + "required": [ + "type", + "openIdConnectUrl" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "openIdConnect" + ] + }, + "description": { + "type": "string" + }, + "openIdConnectUrl": { + "type": "string", + "format": "uri" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.6.0/specificationExtension.json" + } + }, + "additionalProperties": false + }, + "http://asyncapi.com/definitions/2.6.0/SaslSecurityScheme.json": { + "$id": "http://asyncapi.com/definitions/2.6.0/SaslSecurityScheme.json", + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.6.0/SaslPlainSecurityScheme.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.6.0/SaslScramSecurityScheme.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.6.0/SaslGssapiSecurityScheme.json" + } + ] + }, + "http://asyncapi.com/definitions/2.6.0/SaslPlainSecurityScheme.json": { + "$id": "http://asyncapi.com/definitions/2.6.0/SaslPlainSecurityScheme.json", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "plain" + ] + }, + "description": { + "type": "string" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.6.0/specificationExtension.json" + } + }, + "additionalProperties": false + }, + "http://asyncapi.com/definitions/2.6.0/SaslScramSecurityScheme.json": { + "$id": "http://asyncapi.com/definitions/2.6.0/SaslScramSecurityScheme.json", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "scramSha256", + "scramSha512" + ] + }, + "description": { + "type": "string" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.6.0/specificationExtension.json" + } + }, + "additionalProperties": false + }, + "http://asyncapi.com/definitions/2.6.0/SaslGssapiSecurityScheme.json": { + "$id": "http://asyncapi.com/definitions/2.6.0/SaslGssapiSecurityScheme.json", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "gssapi" + ] + }, + "description": { + "type": "string" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/2.6.0/specificationExtension.json" + } + }, + "additionalProperties": false + }, + "http://asyncapi.com/definitions/2.6.0/parameters.json": { + "$id": "http://asyncapi.com/definitions/2.6.0/parameters.json", + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.6.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.6.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 be841acaad36cdfb347021769d1223094790ab05 Mon Sep 17 00:00:00 2001 From: asyncapi-bot Date: Tue, 31 Jan 2023 10:32:09 +0100 Subject: [PATCH 4/5] chore(release): v3.3.0-next-spec.1 (#305) --- 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 8c71dbfa..d16908d1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "@asyncapi/specs", - "version": "4.0.1", + "version": "3.3.0-next-spec.1", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 284f1594..7910b529 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@asyncapi/specs", - "version": "4.0.1", + "version": "3.3.0-next-spec.1", "description": "AsyncAPI schema versions", "main": "index.js", "types": "index.d.ts", From de29a13bbd5cc9bdf7205df633a0d6ae203357ce Mon Sep 17 00:00:00 2001 From: Ace <40604284+AceTheCreator@users.noreply.github.com> Date: Tue, 31 Jan 2023 14:13:50 +0100 Subject: [PATCH 5/5] chore: update release branch (#306) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Sergio Moya <1083296+smoya@users.noreply.github.com> Co-authored-by: Tenshi Codes <116377630+codingtenshi@users.noreply.github.com> Co-authored-by: mastdev <44112399+mastdev@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: asyncapi-bot Co-authored-by: Fran MΓ©ndez Co-authored-by: Maciej UrbaΕ„czyk Co-authored-by: Vinicius Reif Biavatti --- .../workflows/add-good-first-issue-labels.yml | 29 ++++++++++--------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/.github/workflows/add-good-first-issue-labels.yml b/.github/workflows/add-good-first-issue-labels.yml index 20234526..57db8226 100644 --- a/.github/workflows/add-good-first-issue-labels.yml +++ b/.github/workflows/add-good-first-issue-labels.yml @@ -4,27 +4,28 @@ # Purpose of this workflow is to enable anyone to label issue with 'Good First Issue' and 'area/*' with a single command. name: Add 'Good First Issue' and 'area/*' labels # if proper comment added -on: - issue_comment: - types: - - created +on: + issue_comment: + types: + - created jobs: add-labels: - if: ${{!github.event.issue.pull_request && github.event.issue.state != 'closed' && github.actor != 'asyncapi-bot'}} + if: ${{(!github.event.issue.pull_request && github.event.issue.state != 'closed' && github.actor != 'asyncapi-bot') && (contains(github.event.comment.body, '/good-first-issue') || contains(github.event.comment.body, '/gfi' ))}} runs-on: ubuntu-latest steps: - name: Add label - if: contains(github.event.comment.body, '/good-first-issue') || contains(github.event.comment.body, '/gfi' ) uses: actions/github-script@v5 with: github-token: ${{ secrets.GH_TOKEN }} script: | const areas = ['javascript', 'typescript', 'java' , 'go', 'docs', 'ci-cd', 'design']; - const values = context.payload.comment.body.trim().split(" "); - switch(values[1]){ + const words = context.payload.comment.body.trim().split(" "); + const areaIndex = words.findIndex((word)=> word === '/gfi' || word === '/good-first-issue') + 1 + let area = words[areaIndex]; + switch(area){ case 'ts': - values[1] = 'typescript'; + area = 'typescript'; break; case 'js': values[1] = 'javascript'; @@ -33,7 +34,7 @@ jobs: values[1] = 'docs'; break; } - if(values.length != 2 || !areas.includes(values[1])){ + if(!areas.includes(area)){ const message = `Hey @${context.payload.sender.login}, your message doesn't follow the requirements, you can try \`/help\`.` await github.rest.issues.createComment({ @@ -44,14 +45,14 @@ jobs: }) } else { - //remove complexity and areas if there are any before adding new labels; + // remove area if there is any before adding new labels. const currentLabels = (await github.rest.issues.listLabelsOnIssue({ issue_number: context.issue.number, owner: context.repo.owner, repo: context.repo.repo, })).data.map(label => label.name); - const shouldBeRemoved = currentLabels.filter(label => (label.startsWith('area/') && !label.endsWith(values[1]))); + const shouldBeRemoved = currentLabels.filter(label => (label.startsWith('area/') && !label.endsWith(area)); shouldBeRemoved.forEach(label => { github.rest.issues.deleteLabel({ owner: context.repo.owner, @@ -60,11 +61,11 @@ jobs: }); }); - //add new labels + // Add new labels. github.rest.issues.addLabels({ issue_number: context.issue.number, owner: context.repo.owner, repo: context.repo.repo, - labels: ['good first issue', `area/${values[1]}`] + labels: ['good first issue', `area/${area}`] }); }