swagger-api / swagger-api/swagger-codegen
[JAVA][SPRING-CLOUD] `ClientConfiguration` always depends on `spring-cloud-security` and `spring-security-oauth2`
Nobody has claimed this yet.
- Dominant language
- Mustache
- Stars
- 17.8k
- Forks
- 6k
- PR merge metrics
- No merged PRs in 30d
Description
Description
The generated ClientConfiguration class always imports from spring-cloud-security and spring-security-oauth2 even if these imports are unused.
Swagger-codegen version
2.2.3
Swagger declaration file content or url
Example can be found at https://github.com/wjam/swagger-codegen-spring-cloud
Command line used for generation
Maven library used. Configuration is in the GitHub repo mentioned above
Steps to reproduce
Remove the line **/ClientConfiguration.java from the .swagger-codegen-ignore file and run mvn clean compile
Suggest a fix/enhancement
Only include those imports when they are actually required.
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 locating the generator template that produces ClientConfiguration.java, then reproduce the issue with the referenced swagger-codegen-spring-cloud example and mvn clean compile after removing the ignore entry. Done means generated ClientConfiguration.java no longer requires unused spring-cloud-security or spring-security-oauth2 imports and the example still compiles.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, spring
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100