-
Notifications
You must be signed in to change notification settings - Fork 129
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
Linting required flag provides me some errors when should not #513
Comments
This is incorrect:
Do this instead:
Let's leave this issue open because the problem message is incorrect (or unhelpful). A message like:
I'm not coming up with a good message name off-the-top. Update: I understand why it says it is an |
oh ok, thanks for have solved my problem ! The surprising next problem for me is that why it's different between how to define for query parameters and for the body ? Is it normal looking to spec ? Again, many thanks, that solved my problem ! I wasn't able to find an example like your working solution. Each time i found swagger-like (sorry i know it's a competitor) with required into property, not as a sibling. Even Insomnia didn't understand required as an array, sibling of properties. But it understands when it's a member. Strange no? |
Strange? I'll leave that to the community to decide. Different between parameters and schemas? Yes! You got it exactly:
|
I don't know for schemas (I don't use them, I auto generate my openapi file, it was more easy to don't use them). But it's different between query string parameters and body. For the first every param needs a nested required boolean when for the last you need a required array listing fields, as a sibling to list of parameters. Why not use the same way. I'm sure that there a lot of smart people who have work on openapi spec. If they have chosen this way, it's for good reasons |
Thanks for this, both of you! I don't see that there's actions to take on Redocly CLI so I'm closing the issue. |
I tried to lint an openapi spec file and got some strange errors. Maybe I'm wrong but when i check into samples, i think i'm not.
Steps to reproduce the behavior:
npx openapi lint openapi.yml
openapi spec: 3.0.0
openapi-cli: 1.0.0-beta.69
node: 14.18.1
Am i wrong ?
Many thanks for your work, it's great to have a tool like this one !
The text was updated successfully, but these errors were encountered: