swagger-api / swagger-api/swagger-codegen
Possible bug in code generation for java/springboot/ version 2.X
Open
Nobody has claimed this yet.
- Dominant language
- Mustache
- Stars
- 17.8k
- Forks
- 6k
- PR merge metrics
- No merged PRs in 30d
Description
Description
When generating a server stub for Spring/Springboot 2.X the file application.propseties defines the context path as server.contextPath. This is OK for springboot 1.X. However for 2.X it must be server.servlet.context-path.
Swagger-codegen version
codegen : 3.0.21
Swagger declaration file content or url
Command line used for generation
Steps to reproduce
Related issues/PRs
Suggest a fix/enhancement
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
Locate the Spring Boot server-stub template that emits application.properties and inspect how the context path is configured for Spring Boot 2.x. Generate a Java/Spring Boot 2.x server stub and verify that the emitted property uses server.servlet.context-path rather than server.contextPath.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, spring-boot
- Domain
- backend, tooling
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100