Skip to content

[Java*] BeanValidation for all Java languages #4091

@jfiala

Description

@jfiala
Description

BeanValidation support has been added in #4003 for Java and jaxrs-cxf/jaxrs-cxf-client.
This needs to be added to all other Java languages

  • jaxrs-spec
  • jaxrs (Jersey2 + library jersey1)
  • jaxrs-resteasy
  • jaxrs-cxf-cdi
  • spring (default library spring-boot + library spring-mvc, spring-cloud)
Related issues

PR Beanvalidation annotation for Java and CXF #4003
Issues with language jaxrs-spec #4509

Issues with language jaxrs-spec (see #4509)
  • the api is generated as class, but IMHO this should be an interface!?
  • Jaxrs Response is used instead of the real response data type
  • @apiresponse uses wrong response type (the return type, not the response type of the contract)
  • src/gen/java is not added to the build path
  • "Attachment" is used for attachments, but no import is added for this (I think org.apache.cxf.jaxrs.ext.multipart.Attachment is referenced, but this is CXF-specific)

Update: moved all the issues with jaxrs-spec to #4509

Support for @DecimalMin/@DecimalMax

Also add support for @DecimalMin/@DecimalMax

  • jaxrs-spec
  • jaxrs (Jersey2 + library jersey1)
  • jaxrs-resteasy
  • jaxrs-cxf-cdi
Final Cleanup (PR #4635)
  • move beanvalidation code to AbstractJavaJAXRSServerCodegen.java
    (so it will stay redundant in AbstractJavaJAXRSServerCodegen.java and SpringCodegen.java) or to AbstractJavaCodegen?
  • Backport support for @DecimalMin/@DecimalMax
    backport to languages which already have beanvalidation annotation support:
    • java
    • jaxrs-cxf / jaxrs-cxf-client

Final Cleanup implemented in PR #4635

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions