Skip to content

[Java][Jersey] Add support for BeanValidation @Valid annotation #1018

Description

@fuj1g0n
Description

Java Jersey generator has same issue with swagger-api/swagger-codegen#4738 (fixed by swagger-api/swagger-codegen#7807 for jaxrs-cxf)

Without @Valid, constraint annotations will not be evaluated.
So we need to add not only constraint annotations such as @NotNull, but also @Valid.

openapi-generator version

current master (2d99836)

OpenAPI declaration file content or url

N/A

Command line used for generation

N/A

Steps to reproduce

just read the generated sample.

Related issues/PRs
Suggest a fix/enhancement

https://github.com/fujigon/openapi-generator/commits/feature/java-jersey-validation-pojos

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions