swagger-api / swagger-api/swagger-ui
Swagger UI does not display minimum / exclusiveMinimum constraints for path and query parameters
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 29k
- Forks
- 9.3k
- Avg merge
- 2d 23h
- Merged PRs (30d)
- 25
Description
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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the OpenAPI path and query parameter example in Swagger UI and trace the parameter documentation rendering entry point. Verify how request-body constraints are displayed, then ensure minimum, maximum, exclusiveMinimum, and exclusiveMaximum appear for rendered parameters and confirm the example shows the expected numeric boundary.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- documentation, frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100