swagger-api / swagger-api/swagger-ui

multi-value parameters passed differently for multipart/form-data

Open
#3,494 7 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

P2 type: bug version: 3.x
Dominant language
JavaScript
Stars
29k
Forks
9.3k
Avg merge
2d 23h
Merged PRs (30d)
25

Description

When multipart/form-data is specified as content type, multi-value parameters are formatted as a single parameter with a strange representation (quoted and comma-separated) rather than multiple sections with the same name and raw body.

Try this parameter definition with the latest version deployed on petstore

        required: true
        type: array
        items:
          type: string
        collectionFormat: multi

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the request in the deployed Petstore using the multipart/form-data parameter definition shown in the issue. Trace the JavaScript request-generation path for array parameters and compare the generated multipart sections with the expected repeated parameter name and raw body. Done means multi-value parameters produce separate sections instead of one quoted, comma-separated value.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
api
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.