[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

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

View File

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

View File

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

View File

@@ -147,7 +147,6 @@ public class AdditionalPropertiesClass {
}
public void setMapString(Map<String, String> mapString) {
this.mapString = mapString;
}
@@ -181,7 +180,6 @@ public class AdditionalPropertiesClass {
}
public void setMapNumber(Map<String, BigDecimal> mapNumber) {
this.mapNumber = mapNumber;
}
@@ -215,7 +213,6 @@ public class AdditionalPropertiesClass {
}
public void setMapInteger(Map<String, Integer> mapInteger) {
this.mapInteger = mapInteger;
}
@@ -249,7 +246,6 @@ public class AdditionalPropertiesClass {
}
public void setMapBoolean(Map<String, Boolean> mapBoolean) {
this.mapBoolean = mapBoolean;
}
@@ -283,7 +279,6 @@ public class AdditionalPropertiesClass {
}
public void setMapArrayInteger(Map<String, List<Integer>> mapArrayInteger) {
this.mapArrayInteger = mapArrayInteger;
}
@@ -317,7 +312,6 @@ public class AdditionalPropertiesClass {
}
public void setMapArrayAnytype(Map<String, List<Object>> mapArrayAnytype) {
this.mapArrayAnytype = mapArrayAnytype;
}
@@ -351,7 +345,6 @@ public class AdditionalPropertiesClass {
}
public void setMapMapString(Map<String, Map<String, String>> mapMapString) {
this.mapMapString = mapMapString;
}
@@ -385,7 +378,6 @@ public class AdditionalPropertiesClass {
}
public void setMapMapAnytype(Map<String, Map<String, Object>> mapMapAnytype) {
this.mapMapAnytype = mapMapAnytype;
}
@@ -412,7 +404,6 @@ public class AdditionalPropertiesClass {
}
public void setAnytype1(Object anytype1) {
this.anytype1 = anytype1;
}
@@ -439,7 +430,6 @@ public class AdditionalPropertiesClass {
}
public void setAnytype2(Object anytype2) {
this.anytype2 = anytype2;
}
@@ -466,7 +456,6 @@ public class AdditionalPropertiesClass {
}
public void setAnytype3(Object anytype3) {
this.anytype3 = anytype3;
}

View File

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

View File

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

View File

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

View File

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

View File

@@ -74,7 +74,6 @@ public class Animal {
}
public void setClassName(String className) {
this.className = className;
}
@@ -101,7 +100,6 @@ public class Animal {
}
public void setColor(String color) {
this.color = color;
}

View File

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

View File

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

View File

@@ -91,7 +91,6 @@ public class ArrayTest {
}
public void setArrayOfString(List<String> arrayOfString) {
this.arrayOfString = arrayOfString;
}
@@ -125,7 +124,6 @@ public class ArrayTest {
}
public void setArrayArrayOfInteger(List<List<Long>> arrayArrayOfInteger) {
this.arrayArrayOfInteger = arrayArrayOfInteger;
}
@@ -159,7 +157,6 @@ public class ArrayTest {
}
public void setArrayArrayOfModel(List<List<ReadOnlyFirst>> arrayArrayOfModel) {
this.arrayArrayOfModel = arrayArrayOfModel;
}

View File

@@ -87,7 +87,6 @@ public class Capitalization {
}
public void setSmallCamel(String smallCamel) {
this.smallCamel = smallCamel;
}
@@ -114,7 +113,6 @@ public class Capitalization {
}
public void setCapitalCamel(String capitalCamel) {
this.capitalCamel = capitalCamel;
}
@@ -141,7 +139,6 @@ public class Capitalization {
}
public void setSmallSnake(String smallSnake) {
this.smallSnake = smallSnake;
}
@@ -168,7 +165,6 @@ public class Capitalization {
}
public void setCapitalSnake(String capitalSnake) {
this.capitalSnake = capitalSnake;
}
@@ -195,7 +191,6 @@ public class Capitalization {
}
public void setScAETHFlowPoints(String scAETHFlowPoints) {
this.scAETHFlowPoints = scAETHFlowPoints;
}
@@ -222,7 +217,6 @@ public class Capitalization {
}
public void setATTNAME(String ATT_NAME) {
this.ATT_NAME = ATT_NAME;
}

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -227,7 +227,6 @@ public class EnumTest {
}
public void setEnumString(EnumStringEnum enumString) {
this.enumString = enumString;
}
@@ -253,7 +252,6 @@ public class EnumTest {
}
public void setEnumStringRequired(EnumStringRequiredEnum enumStringRequired) {
this.enumStringRequired = enumStringRequired;
}
@@ -280,7 +278,6 @@ public class EnumTest {
}
public void setEnumInteger(EnumIntegerEnum enumInteger) {
this.enumInteger = enumInteger;
}
@@ -307,7 +304,6 @@ public class EnumTest {
}
public void setEnumNumber(EnumNumberEnum enumNumber) {
this.enumNumber = enumNumber;
}
@@ -334,7 +330,6 @@ public class EnumTest {
}
public void setOuterEnum(OuterEnum outerEnum) {
this.outerEnum = outerEnum;
}

View File

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

View File

@@ -134,7 +134,6 @@ public class FormatTest {
}
public void setInteger(Integer integer) {
this.integer = integer;
}
@@ -163,7 +162,6 @@ public class FormatTest {
}
public void setInt32(Integer int32) {
this.int32 = int32;
}
@@ -190,7 +188,6 @@ public class FormatTest {
}
public void setInt64(Long int64) {
this.int64 = int64;
}
@@ -218,7 +215,6 @@ public class FormatTest {
}
public void setNumber(BigDecimal number) {
this.number = number;
}
@@ -247,7 +243,6 @@ public class FormatTest {
}
public void setFloat(Float _float) {
this._float = _float;
}
@@ -276,7 +271,6 @@ public class FormatTest {
}
public void setDouble(Double _double) {
this._double = _double;
}
@@ -303,7 +297,6 @@ public class FormatTest {
}
public void setString(String string) {
this.string = string;
}
@@ -329,7 +322,6 @@ public class FormatTest {
}
public void setByte(byte[] _byte) {
this._byte = _byte;
}
@@ -356,7 +348,6 @@ public class FormatTest {
}
public void setBinary(File binary) {
this.binary = binary;
}
@@ -382,7 +373,6 @@ public class FormatTest {
}
public void setDate(LocalDate date) {
this.date = date;
}
@@ -409,7 +399,6 @@ public class FormatTest {
}
public void setDateTime(OffsetDateTime dateTime) {
this.dateTime = dateTime;
}
@@ -436,7 +425,6 @@ public class FormatTest {
}
public void setUuid(UUID uuid) {
this.uuid = uuid;
}
@@ -462,7 +450,6 @@ public class FormatTest {
}
public void setPassword(String password) {
this.password = password;
}
@@ -489,7 +476,6 @@ public class FormatTest {
}
public void setBigDecimal(BigDecimal bigDecimal) {
this.bigDecimal = bigDecimal;
}

View File

@@ -134,7 +134,6 @@ public class MapTest {
}
public void setMapMapOfString(Map<String, Map<String, String>> mapMapOfString) {
this.mapMapOfString = mapMapOfString;
}
@@ -168,7 +167,6 @@ public class MapTest {
}
public void setMapOfEnumString(Map<String, InnerEnum> mapOfEnumString) {
this.mapOfEnumString = mapOfEnumString;
}
@@ -202,7 +200,6 @@ public class MapTest {
}
public void setDirectMap(Map<String, Boolean> directMap) {
this.directMap = directMap;
}
@@ -236,7 +233,6 @@ public class MapTest {
}
public void setIndirectMap(Map<String, Boolean> indirectMap) {
this.indirectMap = indirectMap;
}

View File

@@ -81,7 +81,6 @@ public class MixedPropertiesAndAdditionalPropertiesClass {
}
public void setUuid(UUID uuid) {
this.uuid = uuid;
}
@@ -108,7 +107,6 @@ public class MixedPropertiesAndAdditionalPropertiesClass {
}
public void setDateTime(OffsetDateTime dateTime) {
this.dateTime = dateTime;
}
@@ -142,7 +140,6 @@ public class MixedPropertiesAndAdditionalPropertiesClass {
}
public void setMap(Map<String, Animal> map) {
this.map = map;
}

View File

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

View File

@@ -72,7 +72,6 @@ public class ModelApiResponse {
}
public void setCode(Integer code) {
this.code = code;
}
@@ -99,7 +98,6 @@ public class ModelApiResponse {
}
public void setType(String type) {
this.type = type;
}
@@ -126,7 +124,6 @@ public class ModelApiResponse {
}
public void setMessage(String message) {
this.message = message;
}

View File

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

View File

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

View File

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

View File

@@ -125,7 +125,6 @@ public class Order {
}
public void setId(Long id) {
this.id = id;
}
@@ -152,7 +151,6 @@ public class Order {
}
public void setPetId(Long petId) {
this.petId = petId;
}
@@ -179,7 +177,6 @@ public class Order {
}
public void setQuantity(Integer quantity) {
this.quantity = quantity;
}
@@ -206,7 +203,6 @@ public class Order {
}
public void setShipDate(OffsetDateTime shipDate) {
this.shipDate = shipDate;
}
@@ -233,7 +229,6 @@ public class Order {
}
public void setStatus(StatusEnum status) {
this.status = status;
}
@@ -260,7 +255,6 @@ public class Order {
}
public void setComplete(Boolean complete) {
this.complete = complete;
}

View File

@@ -73,7 +73,6 @@ public class OuterComposite {
}
public void setMyNumber(BigDecimal myNumber) {
this.myNumber = myNumber;
}
@@ -100,7 +99,6 @@ public class OuterComposite {
}
public void setMyString(String myString) {
this.myString = myString;
}
@@ -127,7 +125,6 @@ public class OuterComposite {
}
public void setMyBoolean(Boolean myBoolean) {
this.myBoolean = myBoolean;
}

View File

@@ -136,7 +136,6 @@ public class Pet {
}
public void setId(Long id) {
this.id = id;
}
@@ -163,7 +162,6 @@ public class Pet {
}
public void setCategory(Category category) {
this.category = category;
}
@@ -189,7 +187,6 @@ public class Pet {
}
public void setName(String name) {
this.name = name;
}
@@ -221,7 +218,6 @@ public class Pet {
}
public void setPhotoUrls(List<String> photoUrls) {
this.photoUrls = photoUrls;
}
@@ -257,7 +253,6 @@ public class Pet {
}
public void setTags(List<Tag> tags) {
this.tags = tags;
}
@@ -284,7 +279,6 @@ public class Pet {
}
public void setStatus(StatusEnum status) {
this.status = status;
}

View File

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

View File

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

View File

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

View File

@@ -87,7 +87,6 @@ public class TypeHolderDefault {
}
public void setStringItem(String stringItem) {
this.stringItem = stringItem;
}
@@ -113,7 +112,6 @@ public class TypeHolderDefault {
}
public void setNumberItem(BigDecimal numberItem) {
this.numberItem = numberItem;
}
@@ -139,7 +137,6 @@ public class TypeHolderDefault {
}
public void setIntegerItem(Integer integerItem) {
this.integerItem = integerItem;
}
@@ -165,7 +162,6 @@ public class TypeHolderDefault {
}
public void setBoolItem(Boolean boolItem) {
this.boolItem = boolItem;
}
@@ -195,7 +191,6 @@ public class TypeHolderDefault {
}
public void setArrayItem(List<Integer> arrayItem) {
this.arrayItem = arrayItem;
}

View File

@@ -92,7 +92,6 @@ public class TypeHolderExample {
}
public void setStringItem(String stringItem) {
this.stringItem = stringItem;
}
@@ -118,7 +117,6 @@ public class TypeHolderExample {
}
public void setNumberItem(BigDecimal numberItem) {
this.numberItem = numberItem;
}
@@ -144,7 +142,6 @@ public class TypeHolderExample {
}
public void setFloatItem(Float floatItem) {
this.floatItem = floatItem;
}
@@ -170,7 +167,6 @@ public class TypeHolderExample {
}
public void setIntegerItem(Integer integerItem) {
this.integerItem = integerItem;
}
@@ -196,7 +192,6 @@ public class TypeHolderExample {
}
public void setBoolItem(Boolean boolItem) {
this.boolItem = boolItem;
}
@@ -226,7 +221,6 @@ public class TypeHolderExample {
}
public void setArrayItem(List<Integer> arrayItem) {
this.arrayItem = arrayItem;
}

View File

@@ -97,7 +97,6 @@ public class User {
}
public void setId(Long id) {
this.id = id;
}
@@ -124,7 +123,6 @@ public class User {
}
public void setUsername(String username) {
this.username = username;
}
@@ -151,7 +149,6 @@ public class User {
}
public void setFirstName(String firstName) {
this.firstName = firstName;
}
@@ -178,7 +175,6 @@ public class User {
}
public void setLastName(String lastName) {
this.lastName = lastName;
}
@@ -205,7 +201,6 @@ public class User {
}
public void setEmail(String email) {
this.email = email;
}
@@ -232,7 +227,6 @@ public class User {
}
public void setPassword(String password) {
this.password = password;
}
@@ -259,7 +253,6 @@ public class User {
}
public void setPhone(String phone) {
this.phone = phone;
}
@@ -286,7 +279,6 @@ public class User {
}
public void setUserStatus(Integer userStatus) {
this.userStatus = userStatus;
}

View File

@@ -237,7 +237,6 @@ public class XmlItem {
}
public void setAttributeString(String attributeString) {
this.attributeString = attributeString;
}
@@ -264,7 +263,6 @@ public class XmlItem {
}
public void setAttributeNumber(BigDecimal attributeNumber) {
this.attributeNumber = attributeNumber;
}
@@ -291,7 +289,6 @@ public class XmlItem {
}
public void setAttributeInteger(Integer attributeInteger) {
this.attributeInteger = attributeInteger;
}
@@ -318,7 +315,6 @@ public class XmlItem {
}
public void setAttributeBoolean(Boolean attributeBoolean) {
this.attributeBoolean = attributeBoolean;
}
@@ -354,7 +350,6 @@ public class XmlItem {
}
public void setWrappedArray(List<Integer> wrappedArray) {
this.wrappedArray = wrappedArray;
}
@@ -381,7 +376,6 @@ public class XmlItem {
}
public void setNameString(String nameString) {
this.nameString = nameString;
}
@@ -408,7 +402,6 @@ public class XmlItem {
}
public void setNameNumber(BigDecimal nameNumber) {
this.nameNumber = nameNumber;
}
@@ -435,7 +428,6 @@ public class XmlItem {
}
public void setNameInteger(Integer nameInteger) {
this.nameInteger = nameInteger;
}
@@ -462,7 +454,6 @@ public class XmlItem {
}
public void setNameBoolean(Boolean nameBoolean) {
this.nameBoolean = nameBoolean;
}
@@ -496,7 +487,6 @@ public class XmlItem {
}
public void setNameArray(List<Integer> nameArray) {
this.nameArray = nameArray;
}
@@ -532,7 +522,6 @@ public class XmlItem {
}
public void setNameWrappedArray(List<Integer> nameWrappedArray) {
this.nameWrappedArray = nameWrappedArray;
}
@@ -559,7 +548,6 @@ public class XmlItem {
}
public void setPrefixString(String prefixString) {
this.prefixString = prefixString;
}
@@ -586,7 +574,6 @@ public class XmlItem {
}
public void setPrefixNumber(BigDecimal prefixNumber) {
this.prefixNumber = prefixNumber;
}
@@ -613,7 +600,6 @@ public class XmlItem {
}
public void setPrefixInteger(Integer prefixInteger) {
this.prefixInteger = prefixInteger;
}
@@ -640,7 +626,6 @@ public class XmlItem {
}
public void setPrefixBoolean(Boolean prefixBoolean) {
this.prefixBoolean = prefixBoolean;
}
@@ -674,7 +659,6 @@ public class XmlItem {
}
public void setPrefixArray(List<Integer> prefixArray) {
this.prefixArray = prefixArray;
}
@@ -710,7 +694,6 @@ public class XmlItem {
}
public void setPrefixWrappedArray(List<Integer> prefixWrappedArray) {
this.prefixWrappedArray = prefixWrappedArray;
}
@@ -737,7 +720,6 @@ public class XmlItem {
}
public void setNamespaceString(String namespaceString) {
this.namespaceString = namespaceString;
}
@@ -764,7 +746,6 @@ public class XmlItem {
}
public void setNamespaceNumber(BigDecimal namespaceNumber) {
this.namespaceNumber = namespaceNumber;
}
@@ -791,7 +772,6 @@ public class XmlItem {
}
public void setNamespaceInteger(Integer namespaceInteger) {
this.namespaceInteger = namespaceInteger;
}
@@ -818,7 +798,6 @@ public class XmlItem {
}
public void setNamespaceBoolean(Boolean namespaceBoolean) {
this.namespaceBoolean = namespaceBoolean;
}
@@ -852,7 +831,6 @@ public class XmlItem {
}
public void setNamespaceArray(List<Integer> namespaceArray) {
this.namespaceArray = namespaceArray;
}
@@ -888,7 +866,6 @@ public class XmlItem {
}
public void setNamespaceWrappedArray(List<Integer> namespaceWrappedArray) {
this.namespaceWrappedArray = namespaceWrappedArray;
}
@@ -915,7 +892,6 @@ public class XmlItem {
}
public void setPrefixNsString(String prefixNsString) {
this.prefixNsString = prefixNsString;
}
@@ -942,7 +918,6 @@ public class XmlItem {
}
public void setPrefixNsNumber(BigDecimal prefixNsNumber) {
this.prefixNsNumber = prefixNsNumber;
}
@@ -969,7 +944,6 @@ public class XmlItem {
}
public void setPrefixNsInteger(Integer prefixNsInteger) {
this.prefixNsInteger = prefixNsInteger;
}
@@ -996,7 +970,6 @@ public class XmlItem {
}
public void setPrefixNsBoolean(Boolean prefixNsBoolean) {
this.prefixNsBoolean = prefixNsBoolean;
}
@@ -1030,7 +1003,6 @@ public class XmlItem {
}
public void setPrefixNsArray(List<Integer> prefixNsArray) {
this.prefixNsArray = prefixNsArray;
}
@@ -1066,7 +1038,6 @@ public class XmlItem {
}
public void setPrefixNsWrappedArray(List<Integer> prefixNsWrappedArray) {
this.prefixNsWrappedArray = prefixNsWrappedArray;
}