swagger-api / swagger-api/swagger-codegen-generators

JavaSpring API template does not apply @Validated annotation

Open Beginner friendly
#612 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Mustache
Stars
299
Forks
439
PR merge metrics
No merged PRs in 30d

Description

The JavaSpring api.mustache template does not correctly apply the @Validated annotation to api interfaces.

A similar fix has been made to the codegen v2 project here: https://github.com/swagger-api/swagger-codegen/commit/adfe4b6e6c297231cbad20512809ee78a82715c8

Without the @Validated annotation, controllers implementing the api interfaces cannot correctly apply the validations specified

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Locate the JavaSpring api.mustache template and compare its handling of @Validated with the referenced codegen v2 commit. Confirm that generated API interfaces include @Validated and that controllers implementing them can apply the specified validations.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, spring
Domain
api
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
60/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.