Repository navigation
feat: integrate v2 ParserJS in validate command - #376
Conversation
|
Kudos, SonarCloud Quality Gate passed!
|
Souvikns
left a comment
There was a problem hiding this comment.
Looks awesome, one thing to add, when we run the validate command and there is a governance issue it says File ./test/specification.yml and/or referenced documents have governance issues. but the file is valid, shouldn't it say that the file is valid but have governance issue.
|
@Souvikns So you wanna see something like: ? |
|
I use cli to quickly check if the spec I am writing is valid, and yeah this would help |
|
@derberg ping 😄 |
derberg
left a comment
There was a problem hiding this comment.
just left 2 comments
other review will do tomorrow
There was a problem hiding this comment.
it is pretty risky to import these helpers from dist of the CLI.....breaking changes may hurt us later
There was a problem hiding this comment.
It will give you errors during the CLI build that these exports don't exist in the path. There is no other way, and creating these functions from scratch or copying them to our codebase is pointless. There is no good solution here and this is the least invasive.
There was a problem hiding this comment.
then we should at least make sure that in package.json we do not allow ^ for spectral-cli dependency
There was a problem hiding this comment.
and here we have the same problem we have with other PR from Jonas. This will be overwritten with next parser release back to 1.18
There was a problem hiding this comment.
good candidate for Parser API 😉
There was a problem hiding this comment.
this one sounds weird, do not play well with what it returns
There was a problem hiding this comment.
when I run diff successfully I do not want to see diagnostics by default. When I run diff I'm interested with diff, unless files that I run through diff have errors and diff cannot run because of it
derberg
left a comment
There was a problem hiding this comment.
since asyncapi/.github#204 the bump.yml workflow is not going to be replicated in repositories that do not have get-global-node-release-workflows. This means that you can now easily update it in parser repository, in the master branch to make sure regular releases will not revert the version update that you did here. So in parser bump workflow you need to add cli to list of ignored repos
52fd3ee to
bb64439
Compare
|
Kudos, SonarCloud Quality Gate passed!
|
|
@derberg Ok, suggestions applied! Could you check again? |
|
@magicmatatjahu can you address code smells? |
|
@derberg You can check that we cannot address such an issues, because Modelina doesn't support in input parsed AsyncAPI document (but only in types) - in the logic we check that. However, that code is in HEAD on master https://github.com/asyncapi/cli/blob/master/src/commands/generate/models.ts#L164 so that code isn't added by my PR. |
derberg
left a comment
There was a problem hiding this comment.
@magicmatatjahu right, thanks for point that out
|
@jonaslagoni Do you wanna check. I changed some code in models generation? |
jonaslagoni
left a comment
There was a problem hiding this comment.
@magicmatatjahu not necessary, but now that I am here LGTM 👍
|
@derberg asyncapi/parser-js#701 and asyncapi/parser-js#702 Could you check? Thanks! |
|
/rtm |
|
🎉 This PR is included in version 0.30.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |








validatecommandgenerate modelsanddiffcommands and determine if command should fail or should perform logic if diagnostics severity is allowed.Example input:
Example output:
Related issue(s)
Part of asyncapi/parser-js#481