-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Distinguish LIST-only paths in OpenAPI #13643
Distinguish LIST-only paths in OpenAPI #13643
Conversation
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.
LGTM, but I'll let one of the devs approve. You might want to generate our full openapi spec using this branch and pop it into a validator (e.g. I used to use https://editor.swagger.io/) just to make sure we're spec-compliant.
Good catch there. It looked fine to me since it was valid json but now that I paste it in there, I see that it's giving me this for every List-only path:
The output json looks like this:
Should I perhaps remove the newly added enum field and just keep the required: true, since that's still programmatically useful enough to differentiate from a list+read endpoint and makes the validator happy? |
Are you validating as OpenAPI 3 (I don't recall how that is set in the swagger tool)? Because I think the enum you added looks ok, per https://swagger.io/docs/specification/data-models/enums/ ? |
Scratch that. I think the enum needs to move under |
Fixes #12283
Differentiates between paths that only support LIST (including GET w/ list=true query params), and those that support both LIST and plain GET.
According to my testing, at this point in time there are 77 List-only endpoints and 10 that support both.