diff --git a/deployment/src/main/resources/templates/libraries/microprofile/pojo.qute b/deployment/src/main/resources/templates/libraries/microprofile/pojo.qute index 23f93a30..a1c721ad 100644 --- a/deployment/src/main/resources/templates/libraries/microprofile/pojo.qute +++ b/deployment/src/main/resources/templates/libraries/microprofile/pojo.qute @@ -73,6 +73,9 @@ public class {m.classname} {#if m.parent}extends {m.parent}{/if}{#if m.serializa **/ {#if !withXml} @JsonProperty("{v.baseName}") + {#if !v.required} + @com.fasterxml.jackson.annotation.JsonInclude(com.fasterxml.jackson.annotation.JsonInclude.Include.NON_NULL) + {/if} {/if} {#for ext in v.vendorExtensions.x-extra-annotation.orEmpty} {ext}