swagger-editor
swagger-editor copied to clipboard
Client HTML2 doesn't have parameters' defaults
Q&A
- OS: Ubuntu 22.04
- Browser: Google Chrome
- Version: 120.0.6099.224 (x64)
- Method of installation: Online demo (https://editor.swagger.io/)
- Swagger-Editor version: latest available on demo
- Swagger/OpenAPI version: latest available on demo
Content & configuration
Example Swagger/OpenAPI definition:
components:
parameters:
limitParam:
in: query
name: limit
required: false
schema:
type: integer
minimum: 1
maximum: 500
default: 100
description: The numbers of items to return.
Swagger-Editor configuration options: Default from https://editor.swagger.io/
Describe the bug you're encountering
When generating for client to HTML, default parameter value is shown but when choosing HTML2, default value is not visible.
HTML:
HTML2:
To reproduce...
Steps to reproduce the behavior:
- Go to https://editor.swagger.io/
- Create any route with query parameter and defined default value.
- Generate HTML2 for client
- See error
Expected behavior
HTML2 output includes default value next to parameter description.