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

Array of (string) enum query parameters are rendered as strings #10211

Open
JMLX42 opened this issue Nov 10, 2024 · 0 comments
Open

Array of (string) enum query parameters are rendered as strings #10211

JMLX42 opened this issue Nov 10, 2024 · 0 comments

Comments

@JMLX42
Copy link

JMLX42 commented Nov 10, 2024

Q&A (please complete the following information)

  • OS: any
  • Browser: any
  • Version: any
  • Method of installation: any
  • Swagger-UI version: v5.18.2
  • Swagger/OpenAPI version: Swagger 2.0, OpenAPI 3.1

Content & configuration

Example Swagger/OpenAPI definition:

openapi: 3.1.0
info:
  title: Swagger Petstore - OpenAPI 3.1
servers:
  - url: https://petstore3.swagger.io/api/v3
paths:
  /pet/findByStatus:
    get:
      tags:
        - pet
      summary: Finds Pets by status
      description: Multiple status values can be provided with comma separated strings
      operationId: findPetsByStatus
      parameters:
        - name: status
          in: query
          description: Status values that need to be considered for filter
          required: false
          explode: true
          schema:
            type:
              - "array"
            items:
              type: "string"
              enum:
                - available
                - pending
                - sold

Describe the bug you're encountering

status is a free text input

image

To reproduce...

  1. Go to https://editor-next.swagger.io/
  2. Edit the schema of the status parameter as documented above
  3. Scroll down to 'GET /pet/findByStatus'

Expected behavior

image

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