swagger-api / swagger-api/swagger-codegen
JavaClient Codegen force using @ApiModel
Nobody has claimed this yet.
- Dominant language
- Mustache
- Stars
- 17.8k
- Forks
- 6k
- PR merge metrics
- No merged PRs in 30d
Description
Description
Using any of Java based client generator force using @ApiModel annotation. There is no way to remove.
if(codegenModel.description != null) {
codegenModel.imports.add("ApiModel");
}
This is not fair IMHO. Generators output should be unaware of swagger and features must be added composing and adding, not by hardcoding.
Swagger-codegen version
compile 'io.swagger:swagger-codegen:2.3.0'
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 Java-based client generator code responsible for the shown codegenModel.description check and the ApiModel import. Review how JavaClient codegen templates or generator options add annotations, then determine whether the generated output can avoid hardcoding Swagger annotations. Done means the relevant generators no longer force @ApiModel when it is not requested, with coverage for the changed behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100