Our API has such endpoints that support parameters both from the query
and from the body
at the same time, by merging those two sets of parameters.
For example:
/foo?param1=value1
body: {
param2=value2
}
The resulting set of parameters would contain two, param1
and param2
.
This endpoint could be used as:
/foo?param1=value1¶m2=value2
OR
/foo
body: {
param1=value1,
param2=value2
}
Is there a way how to specify this 'duality' in Swagger?
UPD
I suppose I should define parameter as both: body
and query
in:
- body
- query