GeneVincent
3 years agoNew Member
Documenting an API with all operations under a single path
I'm trying to document an existing API that uses a single path with query parameters to specify the different actions:
/api?action=action1&some-param=1
/api?action=action2&other-aparam=2
If I would put all parameters under a single path, that would force all parameters under that path, too and would mix a lot of parameters that are only valid on certain actions.
The Swagger editor doesn't let me create multiple entries for the same path, even if the action parameter is required with a different value on each. and doesn't accept /api?action=action1 as a separate path either.
Is the unique path a requirement from Swagger or from the OpenAPI spec ?
Is there a good workaround how to handle this ?
Thanks!