-
-
Notifications
You must be signed in to change notification settings - Fork 7.4k
Closed
Labels
Description
We are trying to use the same model between our client (using a model serialized with Jackson) and server (JaxRS jersey2).
If a collection is not required, the server model set its value to null.
openapi-generator/modules/openapi-generator/src/main/resources/JavaJaxRS/pojo.mustache
Lines 24 to 29 in 7f36f26
| {{#isContainer}} | |
| private {{{datatypeWithEnum}}} {{name}}{{#required}} = {{{defaultValue}}}{{/required}}{{^required}} = null{{/required}}; | |
| {{/isContainer}} | |
| {{^isContainer}} | |
| private {{{datatypeWithEnum}}} {{name}}{{#defaultValue}} = {{{.}}}{{/defaultValue}}; | |
| {{/isContainer}} |
This is not the case on client side.
openapi-generator/modules/openapi-generator/src/main/resources/Java/pojo.mustache
Line 61 in 7f36f26
| private {{{datatypeWithEnum}}} {{name}}{{#defaultValue}} = {{{.}}}{{/defaultValue}}; |
In my opinion this should be aligned.
Reactions are currently unavailable