swagger-api / swagger-api/swagger-codegen
[JAVA][SPRING-CLOUD] useBeanValidation to false but still needs validation-api dependency
Nobody has claimed this yet.
- Dominant language
- Mustache
- Stars
- 17.8k
- Forks
- 6k
- PR merge metrics
- No merged PRs in 30d
Description
Description
Even though useBeanValidation is set to false, the generated code still has a dependency on the javax.validation:validation-api.
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 javax.validation:validation-api dependency and run mvn clean compile.
Suggest a fix/enhancement
I think it's just the import that's always being included in the generated code?
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
Use the linked swagger-codegen-spring-cloud example and its Maven configuration to reproduce the failure with mvn clean compile after removing javax.validation:validation-api. Inspect the generated Java imports and dependency output; done means compilation succeeds without validation-api when useBeanValidation is false.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, spring
- Domain
- backend, build-system
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100