Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,12 @@ public {{>sealed}}class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#v
{{#gson}}
@SerializedName(SERIALIZED_NAME_{{nameInSnakeCase}})
{{/gson}}
{{^isDiscriminator}}
{{>nullable_var_annotations}}{{! prevent indent}}
{{/isDiscriminator}}
{{#isDiscriminator}}
// The discriminator does not have Nullability-annotation since it is added during serialization by the @JsonTypeName annotation
{{/isDiscriminator}}
{{#vendorExtensions.x-field-extra-annotation}}
{{{vendorExtensions.x-field-extra-annotation}}}
{{/vendorExtensions.x-field-extra-annotation}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,12 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens
{{#gson}}
@SerializedName(SERIALIZED_NAME_{{nameInSnakeCase}})
{{/gson}}
{{^isDiscriminator}}
{{>nullable_var_annotations}}{{! prevent indent}}
{{/isDiscriminator}}
{{#isDiscriminator}}
// The discriminator does not have Nullability-annotation since it is added during serialization by the @JsonTypeName annotation
{{/isDiscriminator}}
{{#vendorExtensions.x-field-extra-annotation}}
{{{vendorExtensions.x-field-extra-annotation}}}
{{/vendorExtensions.x-field-extra-annotation}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,12 @@ public {{>sealed}}class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#v
{{#gson}}
@SerializedName(SERIALIZED_NAME_{{nameInSnakeCase}})
{{/gson}}
{{^isDiscriminator}}
{{>nullable_var_annotations}}{{! prevent indent}}
{{/isDiscriminator}}
{{#isDiscriminator}}
// The discriminator does not have Nullability-annotation since it is added during serialization by the @JsonTypeName annotation
{{/isDiscriminator}}
{{#vendorExtensions.x-field-extra-annotation}}
{{{vendorExtensions.x-field-extra-annotation}}}
{{/vendorExtensions.x-field-extra-annotation}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public final class Apple implements Fruit {
private Integer seeds;

public static final String JSON_PROPERTY_FRUIT_TYPE = "fruitType";
@javax.annotation.Nonnull
// The discriminator does not have Nullability-annotation since it is added during serialization by the @JsonTypeName annotation
private FruitType fruitType;

public Apple() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public final class Banana implements Fruit {
private Integer length;

public static final String JSON_PROPERTY_FRUIT_TYPE = "fruitType";
@javax.annotation.Nonnull
// The discriminator does not have Nullability-annotation since it is added during serialization by the @JsonTypeName annotation
private FruitType fruitType;

public Banana() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public class Entity {
protected String atBaseType;

public static final String JSON_PROPERTY_AT_TYPE = "@type";
@javax.annotation.Nonnull
// The discriminator does not have Nullability-annotation since it is added during serialization by the @JsonTypeName annotation
protected String atType;

public Entity() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public class EntityRef {
protected String atBaseType;

public static final String JSON_PROPERTY_AT_TYPE = "@type";
@javax.annotation.Nonnull
// The discriminator does not have Nullability-annotation since it is added during serialization by the @JsonTypeName annotation
protected String atType;

public EntityRef() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@

public class Animal {
public static final String JSON_PROPERTY_CLASS_NAME = "className";
@jakarta.annotation.Nonnull
// The discriminator does not have Nullability-annotation since it is added during serialization by the @JsonTypeName annotation
protected String className;

public static final String JSON_PROPERTY_COLOR = "color";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public static TypeEnum fromValue(String value) {
}

public static final String JSON_PROPERTY_TYPE = "type";
@jakarta.annotation.Nullable
// The discriminator does not have Nullability-annotation since it is added during serialization by the @JsonTypeName annotation
protected TypeEnum type;

public static final String JSON_PROPERTY_NULLABLE_PROPERTY = "nullableProperty";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@

public class Animal {
public static final String JSON_PROPERTY_CLASS_NAME = "className";
@jakarta.annotation.Nonnull
// The discriminator does not have Nullability-annotation since it is added during serialization by the @JsonTypeName annotation
protected String className;

public static final String JSON_PROPERTY_COLOR = "color";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public static TypeEnum fromValue(String value) {
}

public static final String JSON_PROPERTY_TYPE = "type";
@jakarta.annotation.Nullable
// The discriminator does not have Nullability-annotation since it is added during serialization by the @JsonTypeName annotation
protected TypeEnum type;

public static final String JSON_PROPERTY_NULLABLE_PROPERTY = "nullableProperty";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@

public class Animal {
public static final String JSON_PROPERTY_CLASS_NAME = "className";
@jakarta.annotation.Nonnull
// The discriminator does not have Nullability-annotation since it is added during serialization by the @JsonTypeName annotation
protected String className;

public static final String JSON_PROPERTY_COLOR = "color";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public static TypeEnum fromValue(String value) {
}

public static final String JSON_PROPERTY_TYPE = "type";
@jakarta.annotation.Nullable
// The discriminator does not have Nullability-annotation since it is added during serialization by the @JsonTypeName annotation
protected TypeEnum type;

public static final String JSON_PROPERTY_NULLABLE_PROPERTY = "nullableProperty";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@

public class Animal {
public static final String JSON_PROPERTY_CLASS_NAME = "className";
@jakarta.annotation.Nonnull
// The discriminator does not have Nullability-annotation since it is added during serialization by the @JsonTypeName annotation
protected String className;

public static final String JSON_PROPERTY_COLOR = "color";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public static TypeEnum fromValue(String value) {
}

public static final String JSON_PROPERTY_TYPE = "type";
@jakarta.annotation.Nullable
// The discriminator does not have Nullability-annotation since it is added during serialization by the @JsonTypeName annotation
protected TypeEnum type;

public static final String JSON_PROPERTY_NULLABLE_PROPERTY = "nullableProperty";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
public class Animal {
public static final String JSON_PROPERTY_CLASS_NAME = "className";
@XmlElement(name = "className")
@javax.annotation.Nonnull
// The discriminator does not have Nullability-annotation since it is added during serialization by the @JsonTypeName annotation
protected String className;

public static final String JSON_PROPERTY_COLOR = "color";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ public static TypeEnum fromValue(String value) {

public static final String JSON_PROPERTY_TYPE = "type";
@XmlElement(name = "type")
@javax.annotation.Nullable
// The discriminator does not have Nullability-annotation since it is added during serialization by the @JsonTypeName annotation
protected TypeEnum type;

public static final String JSON_PROPERTY_NULLABLE_PROPERTY = "nullableProperty";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@

public class Animal {
public static final String JSON_PROPERTY_CLASS_NAME = "className";
@javax.annotation.Nonnull
// The discriminator does not have Nullability-annotation since it is added during serialization by the @JsonTypeName annotation
protected String className;

public static final String JSON_PROPERTY_COLOR = "color";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public static TypeEnum fromValue(String value) {
}

public static final String JSON_PROPERTY_TYPE = "type";
@javax.annotation.Nullable
// The discriminator does not have Nullability-annotation since it is added during serialization by the @JsonTypeName annotation
protected TypeEnum type;

public static final String JSON_PROPERTY_NULLABLE_PROPERTY = "nullableProperty";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@

public class Animal {
public static final String JSON_PROPERTY_CLASS_NAME = "className";
@jakarta.annotation.Nonnull
// The discriminator does not have Nullability-annotation since it is added during serialization by the @JsonTypeName annotation
protected String className;

public static final String JSON_PROPERTY_COLOR = "color";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public static TypeEnum fromValue(String value) {
}

public static final String JSON_PROPERTY_TYPE = "type";
@jakarta.annotation.Nullable
// The discriminator does not have Nullability-annotation since it is added during serialization by the @JsonTypeName annotation
protected TypeEnum type;

public static final String JSON_PROPERTY_NULLABLE_PROPERTY = "nullableProperty";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@

public class Animal {
public static final String JSON_PROPERTY_CLASS_NAME = "className";
@javax.annotation.Nonnull
// The discriminator does not have Nullability-annotation since it is added during serialization by the @JsonTypeName annotation
protected String className;

public static final String JSON_PROPERTY_COLOR = "color";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public static TypeEnum fromValue(String value) {
}

public static final String JSON_PROPERTY_TYPE = "type";
@javax.annotation.Nullable
// The discriminator does not have Nullability-annotation since it is added during serialization by the @JsonTypeName annotation
protected TypeEnum type;

public static final String JSON_PROPERTY_NULLABLE_PROPERTY = "nullableProperty";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@

public class Animal {
public static final String JSON_PROPERTY_CLASS_NAME = "className";
@javax.annotation.Nonnull
// The discriminator does not have Nullability-annotation since it is added during serialization by the @JsonTypeName annotation
protected String className;

public static final String JSON_PROPERTY_COLOR = "color";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public static TypeEnum fromValue(String value) {
}

public static final String JSON_PROPERTY_TYPE = "type";
@javax.annotation.Nullable
// The discriminator does not have Nullability-annotation since it is added during serialization by the @JsonTypeName annotation
protected TypeEnum type;

public static final String JSON_PROPERTY_NULLABLE_PROPERTY = "nullableProperty";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@

public class Animal {
public static final String JSON_PROPERTY_CLASS_NAME = "className";
@javax.annotation.Nonnull
// The discriminator does not have Nullability-annotation since it is added during serialization by the @JsonTypeName annotation
protected String className;

public static final String JSON_PROPERTY_COLOR = "color";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public static TypeEnum fromValue(String value) {
}

public static final String JSON_PROPERTY_TYPE = "type";
@javax.annotation.Nullable
// The discriminator does not have Nullability-annotation since it is added during serialization by the @JsonTypeName annotation
protected TypeEnum type;

public static final String JSON_PROPERTY_NULLABLE_PROPERTY = "nullableProperty";
Expand Down
Loading