Open
Description
Consider the query parameter query
in the following request:
https://my.api/api/endpoint?query=some%20query
I could document this parameter like so:
parameters:
- name: query
in: query
description: Search term
schema:
type: string
required: true
Now, our api supports a short alias for the query
parameter, q
:
https://my.api/api/endpoint?q=some%20query
From my research I am unable to find an explicit example of how to document this properly in OAS 3.0.
Is there already a solution to this in the spec that I have missed?
Otherwise I would suggest introducing an aliases
keyword for parameters, like so:
parameters:
- name: query
aliases:
- q
in: query
description: Search term
schema:
type: string
required: true
I expect the name
would be a "primary" alias and that it, together with aliases
would form a list, perhaps in descending order of importance if necessary, of mutually exclusive names/aliases for the given parameter.