swagger-api / swagger-api/swagger-codegen-generators
Duplicate codegenContents when requestBody has multiple content types and one of them is a form
Nobody has claimed this yet.
- Dominant language
- Mustache
- Stars
- 299
- Forks
- 439
- PR merge metrics
- No merged PRs in 30d
Description
Given a resource with multiple content types, the generated code will not compile if one or more of these content types is either application/x-www-form-urlencoded or multipart/form-data.
In the case where the requestBody is identical, the following fix seems to work. When the request bodies are different, you'll hit #441.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing code generation for a resource whose requestBody has multiple content types, including application/x-www-form-urlencoded or multipart/form-data, and inspect how codegenContents is emitted. Compare the generated output when request bodies are identical, then verify that the result compiles; differing request bodies are already tracked in #441.
Written by the indexing model from the issue text.
Assessment
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100