swagger-api / swagger-api/swagger-codegen
[Spring] Add hibernate validator annotations
Nobody has claimed this yet.
- Dominant language
- Mustache
- Stars
- 17.8k
- Forks
- 6k
- PR merge metrics
- No merged PRs in 30d
Description
Description
Spring server generator should add hibernate.validator annotations like org.hibernate.validator.constraints.Email to generated model class fields.
For Spring the Hibernate Validator is included in spring-boot-starter-web dependencies and there is no reason not to use it. Could add the feature to other Java generators too.
Swagger-codegen version
2.3.0-SNAPSHOT
Swagger declaration file content
email:
type: string
format: "email"
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
The issue names the Spring server generator and generated model class fields, with an email format example; start by locating the Spring generator's model templates and format handling. Done means generated email fields include the requested Hibernate Validator annotation, with coverage for the resulting model output and consideration of the other Java generators mentioned.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, spring, spring-boot
- Domain
- api, backend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100