swagger-api / swagger-api/swagger-codegen
[JAVA] Spring MVC template missing initBinder
Open
Nobody has claimed this yet.
- Dominant language
- Mustache
- Stars
- 17.8k
- Forks
- 6k
- PR merge metrics
- No merged PRs in 30d
Description
Description
In some case can be useful add initBinder in Spring mvc Controller
Swagger-codegen version
Latest
Swagger declaration file content or url
It is an improvement.
Command line used for generation
Generation with Spring MVC controller do not actually add this line
@InitBinder
public void initBinder(WebDataBinder binder) {
delegate.initBinder(binder);
}
or
@InitBinder
public void initBinder(WebDataBinder binder) {
;
}
Steps to reproduce
In controller missing
Related issues/PRs
No related
Suggest a fix/enhancement
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 at the Spring MVC controller template and compare the generated controller with the proposed @InitBinder examples. Review pull request 9654 for the intended approach; done means generated controllers include the requested binder method and delegate behavior where applicable.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, spring
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100