-
-
Notifications
You must be signed in to change notification settings - Fork 167
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: enable validation of AsyncAPI Spec v3 documents in validate command #780
Conversation
package.json
Outdated
"@asyncapi/raml-dt-schema-parser": "^4.0.3", | ||
"@asyncapi/studio": "^0.17.3", | ||
"@oclif/core": "^1.26.2", | ||
"@oclif/errors": "^1.3.6", | ||
"@oclif/plugin-not-found": "^2.3.22", | ||
"@smoya/multi-parser": "^2.0.0", |
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.
This lib can eventually go into AsyncAPI org, it is just a matter of starting the "donation" process.
package.json
Outdated
@@ -16,12 +16,13 @@ | |||
"@asyncapi/modelina": "^1.9.0", | |||
"@asyncapi/openapi-schema-parser": "^3.0.3", | |||
"@asyncapi/optimizer": "^0.2.1", | |||
"@asyncapi/parser": "^2.1.0", | |||
"@asyncapi/parser": "^3.0.0-next-major-spec.1", |
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.
We have two options as far as I can see here:
- Hold this PR until the Parser-JS v3 version gets released, then upgrade to that version and merge.
- As Studio did already, work with the pre-release version.
I vote for the second option (as Studio did) so we can enable that ASAP, give value to the users who might want to play with Spec v3 now and also help us finding possible bugs in our tooling.
Owners should decide here.
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.
I'd go for the second option too 👍
c6e5aea
to
8bd990e
Compare
8bd990e
to
0527ff0
Compare
@Shurtu-gal I fixed the tests location. |
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.
Test folder LGTM 🚀
test.asyncapi-cli
Outdated
@@ -0,0 +1 @@ | |||
{"store":{}} |
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.
Is this needed @Souvikns ?
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.
I think we can add it to the gitignore
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.
Done!
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
/rtm |
🎉 This PR is included in version 0.56.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Description
Fixes #770
This PR enables validation of AsyncAPI v3 documents through the
validate
command.In order to not break model generation (that uses the future version of Parser-JS v3, which breaks the API), It uses a new independent library (https://github.com/smoya/multi-parser-js) that is temporarily needed for "downgrading" the parsed document to previous Parser-API version (v1.0.0) so it's aligned with the one in use by Modelina parser version. It is needed until asyncapi/modelina#1493 gets fixed
Related issue(s)
#770
cc @jonaslagoni