OpenAPITools / OpenAPITools/openapi-generator
[REQ] Java - Only import ApiIgnore class when used
Open
Nobody has claimed this yet.
Enhancement: Feature
- Dominant language
- Java
- Stars
- 26.8k
- Forks
- 7.7k
- PR merge metrics
- PR metrics pending
Description
Is your feature request related to a problem? Please describe.
ApiIgnore is imported even if not used. This forces projects to import springfox even if it is not otherwise used.
Describe the solution you'd like
2 potential solutions:
- Only import ApiIgnore if needed. In JavaSpring/api.mustache, ApiIgnore is only used if
reactiveofvendorExtensions.x-spring-paginatedis enabled - Add an option to allow enabling/disabling springfox
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 in JavaSpring/api.mustache and inspect how the ApiIgnore import relates to the reactive vendor extension. Confirm which of the two proposed solutions fits the generator's existing template behavior, then verify that generated Java Spring code does not require the springfox import when the annotation is unused.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100