-
Notifications
You must be signed in to change notification settings - Fork 30
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
Getting Started Example does not fail on the callback-example #236
Comments
I can confirm that it is possible to reproduce this error. |
@mandybuchhold What are the errors you are seeing in swagger editor? |
I'm really sorry i think i made a mistake when i checked this in the swagger editor, there are no errors. Here I changed the example code so that it fails in the swagger editor but not in the kaizen parser:
I checked the code and
, but with the kaizen parser I don't get any error. |
Any news on this? |
@jdiazgon , @mandybuchhold , I think it's likely that what you're seeing is incomplete validation by KaiZen Parser. In its current state, the parser has a limited set of rules that it enforces. Each rule is in a class that you'll find in this package: There are problems in the example you posted. I suspect that those problems are not detected by the validator. You might want to try modifying the example by introducing a violation of a specific rule that you can see is being enforced by its corresponding validator class in the above-referenced package. If I have time later today, I'll try this myself. And yes, we should update the Getting Started guide so that it includes a failing example to test validation. Thanks! |
Thanks for your quick answer @tedepstein. Ideally, it would be nice to have the same validation rules that we get from editor.swagger.io, just like you can see below: I have been searching how Swagger validates it's files, and it seems they have not exposed any public API to validate files. It's a pitty and I understand it will be very hard from your side to implement all the needed validation rules. |
@jdiazgon , the Swagger Editor uses a combination of JSON schema validation and semantic validation, each of these implemented as plugins to the core editor. Implementing all of the essential validation rules from the OpenAPI specification is on our roadmap, and I don't think it's actually difficult, only time-consuming to build these rules into KaiZen Parser's validator. I cannot promise a time frame to complete this work, as our team is currently occupied on other priorities. If you would like to do some of this work to improve validation in KaiZen Parser, we would welcome the contribution! Please let me know if you're interested, and I'll make sure to provide whatever guidance is needed, and a feedback loop with our team to help you along the way. |
Unfortunately, I also don't have enough time to implement this feature. Anyway, thanks for your help and I will stay up to date with your latest news 👍 |
I tested the example https://github.com/RepreZen/KaiZen-OpenApi-Parser/blob/master/GettingStarted.md and wanted especially to test the callback-example(a file that should fail) so that I can see what error messages I get. But I don't get any errors.
In the code normaly i expect that
model.isValid()
is false, but it is always true when i checked it. I even checked the callback-example in https://editor.swagger.io/, if it is really not valid and it is not valid. I have a similar problem in my project with an other file, that i expected to be invalid, but there i got no error.Does the validation from the KaiZen-OpenApi-Parser work different than in the Swagger Editor?
Reproduction:
I just run this example https://github.com/RepreZen/KaiZen-OpenApi-Parser/blob/master/GettingStarted.md in a new project and get no errors.
The text was updated successfully, but these errors were encountered: