Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Supporting of one separate 'required' option for query parameters #2347

Open
Morgunov-Vitaly opened this issue Sep 11, 2020 · 1 comment
Open
Labels
param serialization Issues related to parameter and/or header serialization re-use: globals/defaults Default or global components that can be overridden in some way re-use: traits/merges Selective or modified re-use

Comments

@Morgunov-Vitaly
Copy link

Morgunov-Vitaly commented Sep 11, 2020

Hi!
For example, there are several paths that include similar parameters, but with different required options: in some paths parameters are required, in others they are optional.

If we can specify the required option separately, we can reuse parameter descriptions. Like this:

/api/v1/rootname:
    get:
      summary: 'Path example'
      parameters:
        - $ref: '#/components/parameters/queryFiltersDateFrom'
        - $ref: '#/components/parameters/queryFiltersDateTo'
        - $ref: '#/components/parameters/queryGroups'
        - $ref: '#/components/parameters/queryOrderByColumn'
        - $ref: '#/components/parameters/queryOrderByDirection'
      required:
        - 'filters[date_from]'
        - 'filters[date_to]'
        - 'groups'
        - 'order_by_column'
        - 'order_by_direction'
@hkosova
Copy link
Contributor

hkosova commented Oct 10, 2020

Related (or duplicate): #2026

@handrews handrews added $ref param serialization Issues related to parameter and/or header serialization re-use: traits/merges Selective or modified re-use re-use: globals/defaults Default or global components that can be overridden in some way and removed $ref labels Jan 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
param serialization Issues related to parameter and/or header serialization re-use: globals/defaults Default or global components that can be overridden in some way re-use: traits/merges Selective or modified re-use
Projects
None yet
Development

No branches or pull requests

3 participants