swagger-api / swagger-api/swagger-codegen
[Java] Automatic client-side BeanValidation
Nobody has claimed this yet.
- Dominant language
- Mustache
- Stars
- 17.8k
- Forks
- 6k
- PR merge metrics
- No merged PRs in 30d
Description
Description
Add a CLI flag to perform an automatic client-side BeanValidation check.
This would also make the current check for required parameters in the generated Api-client classes obsolete (if the CLI beanvalidation flag is turned on):
// verify the required parameter 'name' is set
if (name == null) {
throw new ApiException("Missing the required parameter 'name' when calling sayHello(Async)");
}
Related issues
PR #4003 (BeanValidation added to Java)
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 reading PR #4003, which added BeanValidation to Java, and trace how CLI flags and generated Java Api-client classes are handled. Define what enabling the flag means for automatic client-side validation and verify that the existing required-parameter checks become obsolete when it is enabled.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- cli, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100