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 multi-value prameters are always sent as muliple parameters instances #10023

Open
piotrwalczak1 opened this issue Jun 17, 2024 · 0 comments

Comments

@piotrwalczak1
Copy link

Regardless of collectionFormat setting (default is csv - comman separated), when the parameters are defined as an array of strings, always multiple instances are sent istead of comma separated ones.

Q&A (please complete the following information)

  • OS: WIndows, linux
  • Browser: chrome, firefox
  • Version: 126.0
  • Method of installation: npm
  • Swagger-UI version: 3.0.1
  • Swagger/OpenAPI version: 3.0

Content & configuration

Example Swagger/OpenAPI definition:

 parameters:
        - name: "myParameter"
          in: query
          description: array of items
          required: true
          allowEmptyValue: false
          schema:
            type: array
            collectionFormat: csv
            items:
              type: string
          example:
            - 'ABC'
            - 'DEF'

This is sent as:

check?myParameter=ABC&myParameter=DEF'

Should be sent as

check?myParameter=ABC,DEF
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