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

Client HTML2 doesn't have parameters' defaults #4763

Open
ybbih opened this issue Jan 18, 2024 · 0 comments
Open

Client HTML2 doesn't have parameters' defaults #4763

ybbih opened this issue Jan 18, 2024 · 0 comments

Comments

@ybbih
Copy link

ybbih commented Jan 18, 2024

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:
image

HTML2:
image

To reproduce...

Steps to reproduce the behavior:

  1. Go to https://editor.swagger.io/
  2. Create any route with query parameter and defined default value.
  3. Generate HTML2 for client
  4. See error

Expected behavior

HTML2 output includes default value next to parameter description.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant