Pode
Pode copied to clipboard
Open API documenting multiple parameter sets
Question
So lets say I have a route that I want to use OpenAPI on. Now this route has a parameter set that gets passed to the route as part of the body of the request. To put this into powershell terms, the route has two 'parameter sets' where in set 1 certain parameters are required, but in set two there are different parameters required. The Open API can handle this with some JSON schema tricks. Is it possible to do this in Pode, and if so, how?
Hi @robertfshort,
At the moment Pode just allows defining a single "parameter set". Have you got a link to what these schema tricks are in OpenAPI?
This thread is from 2018: https://stackoverflow.com/questions/21134029/how-to-define-mutually-exclusive-query-parameters-in-swagger-openapi
and from the swagger documentation: https://swagger.io/docs/specification/data-models/oneof-anyof-allof-not/
On Thu, May 26, 2022 at 4:16 PM Matthew Kelly @.***> wrote:
Hi @robertfshort https://github.com/robertfshort,
At the moment Pode just allows defining a single "parameter set". Have you got a link to what these schema tricks are in OpenAPI?
— Reply to this email directly, view it on GitHub https://github.com/Badgerati/Pode/issues/967#issuecomment-1138977098, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABSA2QYPTPJ6ZEGID5A3HVLVL7L3BANCNFSM5WZ5TS5Q . You are receiving this because you were mentioned.Message ID: @.***>
This should be possible using the oneOf, allOf, and anyOf. I was thinking by "tricking" it required manipulating the json spec in some way 😂