yym
2 years agoNew Contributor
Using $ref in query parameters definition in OAS
Hi All.
I see that we can use $ref for Common Parameters for Various Paths but is it possible to use the same approach for query parameters?
Background: our data models are quite large and rich in parameters that can also be used in a GET requests as query parameters. That is why the query parameters definition in each OAS looks redundant. The idea is to use $ref, but this is explicitly not defined according to the OAS guide. Can I use such definition for query parameters?
/teams:
get:
summary: Gets a list of teams.
parameters:
- in: query
- $ref: '#/parameters/queryParameters.json'
responses:
'200':
description: OK
Thank you!