-
-
Notifications
You must be signed in to change notification settings - Fork 175
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
Specfile with invalid examples considered valid #925
Comments
Welcome to AsyncAPI. Thanks a lot for reporting your first issue. Please check out our contributors guide and the instructions about a basic recommended setup useful for opening a pull request. |
I think it would be interesting to have a flag in the CLI. Something like |
What version of the parser are you using? I believed the following Spectral rule takes care of such a validation https://github.com/asyncapi/parser-js/blob/master/src/ruleset/v2/ruleset.ts#L119 🤔 I'm afk, so I can't check this atm. |
I'm trying with the latest git version of |
@lovebug356 - Can you please check the YML provided, on validating its giving an error at line #18 ✖ 1 problem (1 error, 0 warnings, 0 infos, 0 hints) If I try to uncomment the refrence to "UserSignedUp" it errors at a later line: ✖ 1 problem (1 error, 0 warnings, 0 infos, 0 hints) |
@PradeepJoshiFreelancer : Updated the example (adapted file generated by |
I see you point to a spectral rule in v2 ruleset. I don't see something similar in v3 ruleset. Could it be that it is only supported for v2 at the moment? |
I think that's right: it worked in v2 but the tools currently aren't validating examples in v3. |
@lovebug356 @PeteAudinate That's right, this example is correctly validated for v2, but not for v3. @smoya Tested with:
|
Yeah, I confirm there is no such rule in place in the Parser for v3 of the spec. Can any of the maintainers of this repo move this issue to the parser-js repository? cc @Souvikns @magicmatatjahu @derberg |
@smoya I can't |
I can't either, only transfer issues between glee, CLI and bundler. |
This issue has been automatically marked as stale because it has not had recent activity 😴 It will be closed in 120 days if no further activity occurs. To unstale this issue, add a comment with a detailed explanation. There can be many reasons why some specific issue has no activity. The most probable cause is lack of time, not lack of interest. AsyncAPI Initiative is a Linux Foundation project not owned by a single for-profit company. It is a community-driven initiative ruled under open governance model. Let us figure out together how to push this issue forward. Connect with us through one of many communication channels we established here. Thank you for your patience ❤️ |
A specfile with invalid examples is considered a valid specfile when validated with
asyncapi validate
.This issue can be reproduced with following example. This file contains an invalid example (missing required field):
The text was updated successfully, but these errors were encountered: