-
-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: support multiple binding versions #312
feat: support multiple binding versions #312
Conversation
Need to double check it validates correctly. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, nice work 🎉
0d7cfce
Had to update with the latest changes, just need a single approval again 🙂 |
Thanks @char0n! /rtm |
@derberg do you know why merging is blocked? https://github.com/asyncapi/spec-json-schemas/actions/runs/4125615904/jobs/7126408523 |
Kudos, SonarCloud Quality Gate passed! |
Lets try again, thanks @dalelane 😄 |
/dnm |
Ahh well, wanted to have #321 released first. Guess it's fine 🙄 |
🎉 This PR is included in version 5.0.0-next-major-spec.10 🎉 The release is available on: Your semantic-release bot 📦🚀 |
🎉 This PR is included in version 6.0.0-next-major-spec.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Description
This PR changes a few things:
latest
version of the bindingsbindingVersion
is explicitly defined.Here is how the binding schema changes work (example with mqtt5 bindings):
Is added to ensure only a specific range of binding versions (if the property
bindingVersion
is set) are valid i.e. it gives you an error if you use"bindingVersion": "0.3.0",
, while still allowing no values.The first entry in the
allOf
is for matching the default version, i.e. when no specificbindingVersion
has been sat. If so it defaults to the newest, in this case, version 0.2.0.The next entry in the
allOf
includes the validation for when the user explicitly states a binding version, i.e. if the propertybindingVersion
has been sat, and is of value0.2.0
we validate againsthttp://asyncapi.com/bindings/mqtt5/0.2.0/server.json
.