[java][client] Don't include nullable attributes twice in serialized JSON (#3923)

* [java][client] Don't include nullable attributes twice in serialized JSON

* Get rid of the extra added whitespace

* Regenerate samples
This commit is contained in:
Slavek Kabrda
2019-10-22 10:17:27 +02:00
committed by William Cheng
parent 00c6e0a64b
commit cf58a427b6
945 changed files with 19 additions and 3349 deletions

View File

@@ -56,7 +56,6 @@ public class AdditionalPropertiesAnyType extends HashMap<String, Object> {
}
public void setName(String name) {
this.name = name;
}

View File

@@ -57,7 +57,6 @@ public class AdditionalPropertiesArray extends HashMap<String, List> {
}
public void setName(String name) {
this.name = name;
}

View File

@@ -56,7 +56,6 @@ public class AdditionalPropertiesBoolean extends HashMap<String, Boolean> {
}
public void setName(String name) {
this.name = name;
}

View File

@@ -106,7 +106,6 @@ public class AdditionalPropertiesClass {
}
public void setMapString(Map<String, String> mapString) {
this.mapString = mapString;
}
@@ -140,7 +139,6 @@ public class AdditionalPropertiesClass {
}
public void setMapNumber(Map<String, BigDecimal> mapNumber) {
this.mapNumber = mapNumber;
}
@@ -174,7 +172,6 @@ public class AdditionalPropertiesClass {
}
public void setMapInteger(Map<String, Integer> mapInteger) {
this.mapInteger = mapInteger;
}
@@ -208,7 +205,6 @@ public class AdditionalPropertiesClass {
}
public void setMapBoolean(Map<String, Boolean> mapBoolean) {
this.mapBoolean = mapBoolean;
}
@@ -242,7 +238,6 @@ public class AdditionalPropertiesClass {
}
public void setMapArrayInteger(Map<String, List<Integer>> mapArrayInteger) {
this.mapArrayInteger = mapArrayInteger;
}
@@ -276,7 +271,6 @@ public class AdditionalPropertiesClass {
}
public void setMapArrayAnytype(Map<String, List<Object>> mapArrayAnytype) {
this.mapArrayAnytype = mapArrayAnytype;
}
@@ -310,7 +304,6 @@ public class AdditionalPropertiesClass {
}
public void setMapMapString(Map<String, Map<String, String>> mapMapString) {
this.mapMapString = mapMapString;
}
@@ -344,7 +337,6 @@ public class AdditionalPropertiesClass {
}
public void setMapMapAnytype(Map<String, Map<String, Object>> mapMapAnytype) {
this.mapMapAnytype = mapMapAnytype;
}
@@ -370,7 +362,6 @@ public class AdditionalPropertiesClass {
}
public void setAnytype1(Object anytype1) {
this.anytype1 = anytype1;
}
@@ -396,7 +387,6 @@ public class AdditionalPropertiesClass {
}
public void setAnytype2(Object anytype2) {
this.anytype2 = anytype2;
}
@@ -422,7 +412,6 @@ public class AdditionalPropertiesClass {
}
public void setAnytype3(Object anytype3) {
this.anytype3 = anytype3;
}

View File

@@ -56,7 +56,6 @@ public class AdditionalPropertiesInteger extends HashMap<String, Integer> {
}
public void setName(String name) {
this.name = name;
}

View File

@@ -57,7 +57,6 @@ public class AdditionalPropertiesNumber extends HashMap<String, BigDecimal> {
}
public void setName(String name) {
this.name = name;
}

View File

@@ -56,7 +56,6 @@ public class AdditionalPropertiesObject extends HashMap<String, Map> {
}
public void setName(String name) {
this.name = name;
}

View File

@@ -56,7 +56,6 @@ public class AdditionalPropertiesString extends HashMap<String, String> {
}
public void setName(String name) {
this.name = name;
}

View File

@@ -65,7 +65,6 @@ public class Animal {
}
public void setClassName(String className) {
this.className = className;
}
@@ -91,7 +90,6 @@ public class Animal {
}
public void setColor(String color) {
this.color = color;
}

View File

@@ -65,7 +65,6 @@ public class ArrayOfArrayOfNumberOnly {
}
public void setArrayArrayNumber(List<List<BigDecimal>> arrayArrayNumber) {
this.arrayArrayNumber = arrayArrayNumber;
}

View File

@@ -65,7 +65,6 @@ public class ArrayOfNumberOnly {
}
public void setArrayNumber(List<BigDecimal> arrayNumber) {
this.arrayNumber = arrayNumber;
}

View File

@@ -73,7 +73,6 @@ public class ArrayTest {
}
public void setArrayOfString(List<String> arrayOfString) {
this.arrayOfString = arrayOfString;
}
@@ -107,7 +106,6 @@ public class ArrayTest {
}
public void setArrayArrayOfInteger(List<List<Long>> arrayArrayOfInteger) {
this.arrayArrayOfInteger = arrayArrayOfInteger;
}
@@ -141,7 +139,6 @@ public class ArrayTest {
}
public void setArrayArrayOfModel(List<List<ReadOnlyFirst>> arrayArrayOfModel) {
this.arrayArrayOfModel = arrayArrayOfModel;
}

View File

@@ -74,7 +74,6 @@ public class Capitalization {
}
public void setSmallCamel(String smallCamel) {
this.smallCamel = smallCamel;
}
@@ -100,7 +99,6 @@ public class Capitalization {
}
public void setCapitalCamel(String capitalCamel) {
this.capitalCamel = capitalCamel;
}
@@ -126,7 +124,6 @@ public class Capitalization {
}
public void setSmallSnake(String smallSnake) {
this.smallSnake = smallSnake;
}
@@ -152,7 +149,6 @@ public class Capitalization {
}
public void setCapitalSnake(String capitalSnake) {
this.capitalSnake = capitalSnake;
}
@@ -178,7 +174,6 @@ public class Capitalization {
}
public void setScAETHFlowPoints(String scAETHFlowPoints) {
this.scAETHFlowPoints = scAETHFlowPoints;
}
@@ -204,7 +199,6 @@ public class Capitalization {
}
public void setATTNAME(String ATT_NAME) {
this.ATT_NAME = ATT_NAME;
}

View File

@@ -56,7 +56,6 @@ public class Cat extends Animal {
}
public void setDeclawed(Boolean declawed) {
this.declawed = declawed;
}

View File

@@ -54,7 +54,6 @@ public class CatAllOf {
}
public void setDeclawed(Boolean declawed) {
this.declawed = declawed;
}

View File

@@ -58,7 +58,6 @@ public class Category {
}
public void setId(Long id) {
this.id = id;
}
@@ -83,7 +82,6 @@ public class Category {
}
public void setName(String name) {
this.name = name;
}

View File

@@ -55,7 +55,6 @@ public class ClassModel {
}
public void setPropertyClass(String propertyClass) {
this.propertyClass = propertyClass;
}

View File

@@ -54,7 +54,6 @@ public class Client {
}
public void setClient(String client) {
this.client = client;
}

View File

@@ -56,7 +56,6 @@ public class Dog extends Animal {
}
public void setBreed(String breed) {
this.breed = breed;
}

View File

@@ -54,7 +54,6 @@ public class DogAllOf {
}
public void setBreed(String breed) {
this.breed = breed;
}

View File

@@ -130,7 +130,6 @@ public class EnumArrays {
}
public void setJustSymbol(JustSymbolEnum justSymbol) {
this.justSymbol = justSymbol;
}
@@ -164,7 +163,6 @@ public class EnumArrays {
}
public void setArrayEnum(List<ArrayEnumEnum> arrayEnum) {
this.arrayEnum = arrayEnum;
}

View File

@@ -215,7 +215,6 @@ public class EnumTest {
}
public void setEnumString(EnumStringEnum enumString) {
this.enumString = enumString;
}
@@ -240,7 +239,6 @@ public class EnumTest {
}
public void setEnumStringRequired(EnumStringRequiredEnum enumStringRequired) {
this.enumStringRequired = enumStringRequired;
}
@@ -266,7 +264,6 @@ public class EnumTest {
}
public void setEnumInteger(EnumIntegerEnum enumInteger) {
this.enumInteger = enumInteger;
}
@@ -292,7 +289,6 @@ public class EnumTest {
}
public void setEnumNumber(EnumNumberEnum enumNumber) {
this.enumNumber = enumNumber;
}
@@ -318,7 +314,6 @@ public class EnumTest {
}
public void setOuterEnum(OuterEnum outerEnum) {
this.outerEnum = outerEnum;
}

View File

@@ -60,7 +60,6 @@ public class FileSchemaTestClass {
}
public void setFile(java.io.File file) {
this.file = file;
}
@@ -94,7 +93,6 @@ public class FileSchemaTestClass {
}
public void setFiles(List<java.io.File> files) {
this.files = files;
}

View File

@@ -113,7 +113,6 @@ public class FormatTest {
}
public void setInteger(Integer integer) {
this.integer = integer;
}
@@ -141,7 +140,6 @@ public class FormatTest {
}
public void setInt32(Integer int32) {
this.int32 = int32;
}
@@ -167,7 +165,6 @@ public class FormatTest {
}
public void setInt64(Long int64) {
this.int64 = int64;
}
@@ -194,7 +191,6 @@ public class FormatTest {
}
public void setNumber(BigDecimal number) {
this.number = number;
}
@@ -222,7 +218,6 @@ public class FormatTest {
}
public void setFloat(Float _float) {
this._float = _float;
}
@@ -250,7 +245,6 @@ public class FormatTest {
}
public void setDouble(Double _double) {
this._double = _double;
}
@@ -276,7 +270,6 @@ public class FormatTest {
}
public void setString(String string) {
this.string = string;
}
@@ -301,7 +294,6 @@ public class FormatTest {
}
public void setByte(byte[] _byte) {
this._byte = _byte;
}
@@ -327,7 +319,6 @@ public class FormatTest {
}
public void setBinary(File binary) {
this.binary = binary;
}
@@ -352,7 +343,6 @@ public class FormatTest {
}
public void setDate(LocalDate date) {
this.date = date;
}
@@ -378,7 +368,6 @@ public class FormatTest {
}
public void setDateTime(OffsetDateTime dateTime) {
this.dateTime = dateTime;
}
@@ -404,7 +393,6 @@ public class FormatTest {
}
public void setUuid(UUID uuid) {
this.uuid = uuid;
}
@@ -429,7 +417,6 @@ public class FormatTest {
}
public void setPassword(String password) {
this.password = password;
}
@@ -455,7 +442,6 @@ public class FormatTest {
}
public void setBigDecimal(BigDecimal bigDecimal) {
this.bigDecimal = bigDecimal;
}

View File

@@ -112,7 +112,6 @@ public class MapTest {
}
public void setMapMapOfString(Map<String, Map<String, String>> mapMapOfString) {
this.mapMapOfString = mapMapOfString;
}
@@ -146,7 +145,6 @@ public class MapTest {
}
public void setMapOfEnumString(Map<String, InnerEnum> mapOfEnumString) {
this.mapOfEnumString = mapOfEnumString;
}
@@ -180,7 +178,6 @@ public class MapTest {
}
public void setDirectMap(Map<String, Boolean> directMap) {
this.directMap = directMap;
}
@@ -214,7 +211,6 @@ public class MapTest {
}
public void setIndirectMap(Map<String, Boolean> indirectMap) {
this.indirectMap = indirectMap;
}

View File

@@ -68,7 +68,6 @@ public class MixedPropertiesAndAdditionalPropertiesClass {
}
public void setUuid(UUID uuid) {
this.uuid = uuid;
}
@@ -94,7 +93,6 @@ public class MixedPropertiesAndAdditionalPropertiesClass {
}
public void setDateTime(OffsetDateTime dateTime) {
this.dateTime = dateTime;
}
@@ -128,7 +126,6 @@ public class MixedPropertiesAndAdditionalPropertiesClass {
}
public void setMap(Map<String, Animal> map) {
this.map = map;
}

View File

@@ -59,7 +59,6 @@ public class Model200Response {
}
public void setName(Integer name) {
this.name = name;
}
@@ -85,7 +84,6 @@ public class Model200Response {
}
public void setPropertyClass(String propertyClass) {
this.propertyClass = propertyClass;
}

View File

@@ -62,7 +62,6 @@ public class ModelApiResponse {
}
public void setCode(Integer code) {
this.code = code;
}
@@ -88,7 +87,6 @@ public class ModelApiResponse {
}
public void setType(String type) {
this.type = type;
}
@@ -114,7 +112,6 @@ public class ModelApiResponse {
}
public void setMessage(String message) {
this.message = message;
}

View File

@@ -55,7 +55,6 @@ public class ModelReturn {
}
public void setReturn(Integer _return) {
this._return = _return;
}

View File

@@ -66,7 +66,6 @@ public class Name {
}
public void setName(Integer name) {
this.name = name;
}
@@ -108,7 +107,6 @@ public class Name {
}
public void setProperty(String property) {
this.property = property;
}

View File

@@ -55,7 +55,6 @@ public class NumberOnly {
}
public void setJustNumber(BigDecimal justNumber) {
this.justNumber = justNumber;
}

View File

@@ -112,7 +112,6 @@ public class Order {
}
public void setId(Long id) {
this.id = id;
}
@@ -138,7 +137,6 @@ public class Order {
}
public void setPetId(Long petId) {
this.petId = petId;
}
@@ -164,7 +162,6 @@ public class Order {
}
public void setQuantity(Integer quantity) {
this.quantity = quantity;
}
@@ -190,7 +187,6 @@ public class Order {
}
public void setShipDate(OffsetDateTime shipDate) {
this.shipDate = shipDate;
}
@@ -216,7 +212,6 @@ public class Order {
}
public void setStatus(StatusEnum status) {
this.status = status;
}
@@ -242,7 +237,6 @@ public class Order {
}
public void setComplete(Boolean complete) {
this.complete = complete;
}

View File

@@ -63,7 +63,6 @@ public class OuterComposite {
}
public void setMyNumber(BigDecimal myNumber) {
this.myNumber = myNumber;
}
@@ -89,7 +88,6 @@ public class OuterComposite {
}
public void setMyString(String myString) {
this.myString = myString;
}
@@ -115,7 +113,6 @@ public class OuterComposite {
}
public void setMyBoolean(Boolean myBoolean) {
this.myBoolean = myBoolean;
}

View File

@@ -115,7 +115,6 @@ public class Pet {
}
public void setId(Long id) {
this.id = id;
}
@@ -141,7 +140,6 @@ public class Pet {
}
public void setCategory(Category category) {
this.category = category;
}
@@ -166,7 +164,6 @@ public class Pet {
}
public void setName(String name) {
this.name = name;
}
@@ -196,7 +193,6 @@ public class Pet {
}
public void setPhotoUrls(List<String> photoUrls) {
this.photoUrls = photoUrls;
}
@@ -230,7 +226,6 @@ public class Pet {
}
public void setTags(List<Tag> tags) {
this.tags = tags;
}
@@ -256,7 +251,6 @@ public class Pet {
}
public void setStatus(StatusEnum status) {
this.status = status;
}

View File

@@ -74,7 +74,6 @@ public class ReadOnlyFirst {
}
public void setBaz(String baz) {
this.baz = baz;
}

View File

@@ -54,7 +54,6 @@ public class SpecialModelName {
}
public void set$SpecialPropertyName(Long $specialPropertyName) {
this.$specialPropertyName = $specialPropertyName;
}

View File

@@ -58,7 +58,6 @@ public class Tag {
}
public void setId(Long id) {
this.id = id;
}
@@ -84,7 +83,6 @@ public class Tag {
}
public void setName(String name) {
this.name = name;
}

View File

@@ -72,7 +72,6 @@ public class TypeHolderDefault {
}
public void setStringItem(String stringItem) {
this.stringItem = stringItem;
}
@@ -97,7 +96,6 @@ public class TypeHolderDefault {
}
public void setNumberItem(BigDecimal numberItem) {
this.numberItem = numberItem;
}
@@ -122,7 +120,6 @@ public class TypeHolderDefault {
}
public void setIntegerItem(Integer integerItem) {
this.integerItem = integerItem;
}
@@ -147,7 +144,6 @@ public class TypeHolderDefault {
}
public void setBoolItem(Boolean boolItem) {
this.boolItem = boolItem;
}
@@ -177,7 +173,6 @@ public class TypeHolderDefault {
}
public void setArrayItem(List<Integer> arrayItem) {
this.arrayItem = arrayItem;
}

View File

@@ -76,7 +76,6 @@ public class TypeHolderExample {
}
public void setStringItem(String stringItem) {
this.stringItem = stringItem;
}
@@ -101,7 +100,6 @@ public class TypeHolderExample {
}
public void setNumberItem(BigDecimal numberItem) {
this.numberItem = numberItem;
}
@@ -126,7 +124,6 @@ public class TypeHolderExample {
}
public void setFloatItem(Float floatItem) {
this.floatItem = floatItem;
}
@@ -151,7 +148,6 @@ public class TypeHolderExample {
}
public void setIntegerItem(Integer integerItem) {
this.integerItem = integerItem;
}
@@ -176,7 +172,6 @@ public class TypeHolderExample {
}
public void setBoolItem(Boolean boolItem) {
this.boolItem = boolItem;
}
@@ -206,7 +201,6 @@ public class TypeHolderExample {
}
public void setArrayItem(List<Integer> arrayItem) {
this.arrayItem = arrayItem;
}

View File

@@ -82,7 +82,6 @@ public class User {
}
public void setId(Long id) {
this.id = id;
}
@@ -108,7 +107,6 @@ public class User {
}
public void setUsername(String username) {
this.username = username;
}
@@ -134,7 +132,6 @@ public class User {
}
public void setFirstName(String firstName) {
this.firstName = firstName;
}
@@ -160,7 +157,6 @@ public class User {
}
public void setLastName(String lastName) {
this.lastName = lastName;
}
@@ -186,7 +182,6 @@ public class User {
}
public void setEmail(String email) {
this.email = email;
}
@@ -212,7 +207,6 @@ public class User {
}
public void setPassword(String password) {
this.password = password;
}
@@ -238,7 +232,6 @@ public class User {
}
public void setPhone(String phone) {
this.phone = phone;
}
@@ -264,7 +257,6 @@ public class User {
}
public void setUserStatus(Integer userStatus) {
this.userStatus = userStatus;
}

View File

@@ -169,7 +169,6 @@ public class XmlItem {
}
public void setAttributeString(String attributeString) {
this.attributeString = attributeString;
}
@@ -195,7 +194,6 @@ public class XmlItem {
}
public void setAttributeNumber(BigDecimal attributeNumber) {
this.attributeNumber = attributeNumber;
}
@@ -221,7 +219,6 @@ public class XmlItem {
}
public void setAttributeInteger(Integer attributeInteger) {
this.attributeInteger = attributeInteger;
}
@@ -247,7 +244,6 @@ public class XmlItem {
}
public void setAttributeBoolean(Boolean attributeBoolean) {
this.attributeBoolean = attributeBoolean;
}
@@ -281,7 +277,6 @@ public class XmlItem {
}
public void setWrappedArray(List<Integer> wrappedArray) {
this.wrappedArray = wrappedArray;
}
@@ -307,7 +302,6 @@ public class XmlItem {
}
public void setNameString(String nameString) {
this.nameString = nameString;
}
@@ -333,7 +327,6 @@ public class XmlItem {
}
public void setNameNumber(BigDecimal nameNumber) {
this.nameNumber = nameNumber;
}
@@ -359,7 +352,6 @@ public class XmlItem {
}
public void setNameInteger(Integer nameInteger) {
this.nameInteger = nameInteger;
}
@@ -385,7 +377,6 @@ public class XmlItem {
}
public void setNameBoolean(Boolean nameBoolean) {
this.nameBoolean = nameBoolean;
}
@@ -419,7 +410,6 @@ public class XmlItem {
}
public void setNameArray(List<Integer> nameArray) {
this.nameArray = nameArray;
}
@@ -453,7 +443,6 @@ public class XmlItem {
}
public void setNameWrappedArray(List<Integer> nameWrappedArray) {
this.nameWrappedArray = nameWrappedArray;
}
@@ -479,7 +468,6 @@ public class XmlItem {
}
public void setPrefixString(String prefixString) {
this.prefixString = prefixString;
}
@@ -505,7 +493,6 @@ public class XmlItem {
}
public void setPrefixNumber(BigDecimal prefixNumber) {
this.prefixNumber = prefixNumber;
}
@@ -531,7 +518,6 @@ public class XmlItem {
}
public void setPrefixInteger(Integer prefixInteger) {
this.prefixInteger = prefixInteger;
}
@@ -557,7 +543,6 @@ public class XmlItem {
}
public void setPrefixBoolean(Boolean prefixBoolean) {
this.prefixBoolean = prefixBoolean;
}
@@ -591,7 +576,6 @@ public class XmlItem {
}
public void setPrefixArray(List<Integer> prefixArray) {
this.prefixArray = prefixArray;
}
@@ -625,7 +609,6 @@ public class XmlItem {
}
public void setPrefixWrappedArray(List<Integer> prefixWrappedArray) {
this.prefixWrappedArray = prefixWrappedArray;
}
@@ -651,7 +634,6 @@ public class XmlItem {
}
public void setNamespaceString(String namespaceString) {
this.namespaceString = namespaceString;
}
@@ -677,7 +659,6 @@ public class XmlItem {
}
public void setNamespaceNumber(BigDecimal namespaceNumber) {
this.namespaceNumber = namespaceNumber;
}
@@ -703,7 +684,6 @@ public class XmlItem {
}
public void setNamespaceInteger(Integer namespaceInteger) {
this.namespaceInteger = namespaceInteger;
}
@@ -729,7 +709,6 @@ public class XmlItem {
}
public void setNamespaceBoolean(Boolean namespaceBoolean) {
this.namespaceBoolean = namespaceBoolean;
}
@@ -763,7 +742,6 @@ public class XmlItem {
}
public void setNamespaceArray(List<Integer> namespaceArray) {
this.namespaceArray = namespaceArray;
}
@@ -797,7 +775,6 @@ public class XmlItem {
}
public void setNamespaceWrappedArray(List<Integer> namespaceWrappedArray) {
this.namespaceWrappedArray = namespaceWrappedArray;
}
@@ -823,7 +800,6 @@ public class XmlItem {
}
public void setPrefixNsString(String prefixNsString) {
this.prefixNsString = prefixNsString;
}
@@ -849,7 +825,6 @@ public class XmlItem {
}
public void setPrefixNsNumber(BigDecimal prefixNsNumber) {
this.prefixNsNumber = prefixNsNumber;
}
@@ -875,7 +850,6 @@ public class XmlItem {
}
public void setPrefixNsInteger(Integer prefixNsInteger) {
this.prefixNsInteger = prefixNsInteger;
}
@@ -901,7 +875,6 @@ public class XmlItem {
}
public void setPrefixNsBoolean(Boolean prefixNsBoolean) {
this.prefixNsBoolean = prefixNsBoolean;
}
@@ -935,7 +908,6 @@ public class XmlItem {
}
public void setPrefixNsArray(List<Integer> prefixNsArray) {
this.prefixNsArray = prefixNsArray;
}
@@ -969,7 +941,6 @@ public class XmlItem {
}
public void setPrefixNsWrappedArray(List<Integer> prefixNsWrappedArray) {
this.prefixNsWrappedArray = prefixNsWrappedArray;
}