swagger-api / swagger-api/swagger-codegen
Lost default values since v3.0.22 codeGen-springboot
Nobody has claimed this yet.
- Dominant language
- Mustache
- Stars
- 17.8k
- Forks
- 6k
- PR merge metrics
- No merged PRs in 30d
Description
I was working on an openAPI v3 specification. There is a few headers added to 'parameters'. The comes up with default values. After running codeGen CLI v 3.0.33, i noticed the default values are not populated for springboot page. I checked up java code. It appears that annotation is correctly generated, but the web page does not render the default values. I also check up previous codeGen versions. Looks this feature is malfunctioned since v3.0.22 swagger v2. I saw the same issue 2 years back, it resurfaces this time. I think OpenAPI v3 codegen implementation introduced the bug.
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 the issue with an OpenAPI v3 specification containing header parameters with default values, using the codeGen CLI and generated Spring Boot page described in the report. Compare behavior between v3.0.22 and v3.0.33, checking the generated Java annotation against the rendered page; the work is done when the default values render correctly.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, openapi, spring-boot
- Domain
- api, documentation
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100