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.
|
{{#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.
|
private {{{datatypeWithEnum}}} {{name}}{{#defaultValue}} = {{{.}}}{{/defaultValue}}; |
In my opinion this should be aligned.
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
This is not the case on client side.
openapi-generator/modules/openapi-generator/src/main/resources/Java/pojo.mustache
Line 61 in 7f36f26
In my opinion this should be aligned.