Is there any way to document the following query?
GET api/v1/users?name1=value1&name2=value
where the query parameter names are dynamic and will be received from the client.
I'm using the latest Swagger API.
Is there any way to document the following query?
GET api/v1/users?name1=value1&name2=value
where the query parameter names are dynamic and will be received from the client.
I'm using the latest Swagger API.
Free-form query parameters can be described using OpenAPI 3.0, but not OpenAPI 2.0 (Swagger 2.0). The parameter should have
type: object
with the serialization methodstyle: form
andexplode: true
. The object will serialized as?prop1=value1&prop2=value2&...
, where individual prop=value pairs are the object properties.Free-form query parameters are supported in Swagger UI 3.15.0+ and Swagger Editor 3.5.6+. In the parameter editor, enter the parameter names and values in the JSON object format, e.g.
{ "prop1": "value1", "prop2": "value2" }
. "Try it out" will send them asparam=value
query parameters:Not sure about Codegen support though.