jskov / openapi-jaxrs-client

An OpenAPI JAX-RS client code generator
Apache License 2.0
1 stars 4 forks source link

Add option to control use of requirenonnull in POJO constructors #709

Closed jskov-jyskebank-dk closed 1 month ago

jskov-jyskebank-dk commented 2 months ago

Similar to generator-dto-records-use-requirenonnull

For code using the generated DTOs primary as a receiver, a null-input in wire data will cause deserialization to fail. Which causes an unspecified 500 to be returned to the caller. But if the DTO gets created (with a bad null field) it will be passed to the bean validator, which will return a better 4xx with a description of which field is wrong.

(Allan)