Skip to content

Swagger UI does not display minimum / exclusiveMinimum constraints for path and query parameters #10562

@kushalshah5

Description

@kushalshah5

When defining path or query parameter schemas in OpenAPI with constraints such as minimum and exclusiveMinimum, Swagger UI does not render these constraints in the parameter documentation. However, the same parameter validation rules are displayed for request body.

This makes it unclear to API consumers what numeric boundaries are enforced, unless mentioned somewhere else.

/v1/pet/{id}:
  parameters:
    - name: id
      in: path
      required: true
      description: ID.
      schema:
        type: integer
        minimum: 0
        exclusiveMinimum: true

Expected Behavior:

Swagger UI should display constraints (minimum, maximum, exclusiveMinimum, exclusiveMaximum) for parameters in the rendered documentation.

For example, users should see that id must be integer greater than or equal to 0.

Image

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions