Skip to content

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

Description

@Morgunov-Vitaly

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'

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    param serializationIssues related to parameter and/or header serializationre-use: globals/defaultsDefault or global components that can be overridden in some wayre-use: traits/mergesSelective or modified re-use

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions