I have some parameter defined in the root parameters
parameters:
fooParam:
name: foo
in: query
description: Foo foo foo.
required: false
type: number
format: int32
Now I reference it in a path
/pathOne:
get:
parameters:
- $ref: "#/parameters/fooParam"
Let say I want to use that parameter in another path or method, but I want it to be required (required: true)
/pathTwo:
get:
parameters:
- ?????????????????
Is there a way to reference the same parameter and override one or more of its properties?
No, there isn't. This is a limitation of JSON References rather than a limitation of Swagger.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With