Skip to content

Commit d25e149

Browse files
Add description for why the discriminator does not have a nullability-annotation
1 parent 38799c4 commit d25e149

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

modules/openapi-generator/src/main/resources/Java/pojo.mustache

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,9 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens
7070
{{^isDiscriminator}}
7171
{{>nullable_var_annotations}}{{! prevent indent}}
7272
{{/isDiscriminator}}
73+
{{#isDiscriminator}}
74+
// The discriminator does not have Nullability-annotation since it is added during serialization by the @JsonTypeName annotation
75+
{{/isDiscriminator}}
7376
{{#vendorExtensions.x-field-extra-annotation}}
7477
{{{vendorExtensions.x-field-extra-annotation}}}
7578
{{/vendorExtensions.x-field-extra-annotation}}

0 commit comments

Comments
 (0)