swagger-api / swagger-codegen

swagger-codegen contains a template-driven engine to generate documentation, API clients and server stubs in different languages by parsing your OpenAPI / Swagger definition.
http://swagger.io
Apache License 2.0
16.86k stars 6.02k forks source link

[JAVA][SPRING-CLOUD] `ClientConfiguration` always depends on `spring-cloud-security` and `spring-security-oauth2` #6683

Open wjam opened 6 years ago

wjam commented 6 years ago
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.

yelhouti commented 6 years ago

same problem

felhag commented 1 year ago

Might be a little late for the party, but I created a pull request for this issue.