Skip to content

Documenting an API with all operations under a single path #3344

Closed Answered by jeremyfiel
willamowius asked this question in Q&A
Discussion options

You must be logged in to vote

Swagger is a tooling vendor for the OpenAPI specification. The OAS specification requires each path is unique up to the point of the ?, the query separator.

The way your api is designed makes it very difficult to construct a human readable OpenAPI description. OAS does not have any "scenario" type of description available. This means all possible query parameters of a single endpoint should be described. But there is no way to distinguish which sets of parameters will provide a different response payload. You can use examples to provide different representations of the payload and you can also provide multiple payloads using composition keywords such as oneOf or anyOf to describe the poss…

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by handrews
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
Moved to Moonwalk Issues that can be closed or migrated as being addressed in Moonwalk request matching Matching requests to URL templates, media types, etc.
4 participants