[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

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

View File

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

View File

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

View File

@@ -104,7 +104,6 @@ public class AdditionalPropertiesClass {
}
public void setMapString(Map<String, String> mapString) {
this.mapString = mapString;
}
@@ -136,7 +135,6 @@ public class AdditionalPropertiesClass {
}
public void setMapNumber(Map<String, BigDecimal> mapNumber) {
this.mapNumber = mapNumber;
}
@@ -168,7 +166,6 @@ public class AdditionalPropertiesClass {
}
public void setMapInteger(Map<String, Integer> mapInteger) {
this.mapInteger = mapInteger;
}
@@ -200,7 +197,6 @@ public class AdditionalPropertiesClass {
}
public void setMapBoolean(Map<String, Boolean> mapBoolean) {
this.mapBoolean = mapBoolean;
}
@@ -232,7 +228,6 @@ public class AdditionalPropertiesClass {
}
public void setMapArrayInteger(Map<String, List<Integer>> mapArrayInteger) {
this.mapArrayInteger = mapArrayInteger;
}
@@ -264,7 +259,6 @@ public class AdditionalPropertiesClass {
}
public void setMapArrayAnytype(Map<String, List<Object>> mapArrayAnytype) {
this.mapArrayAnytype = mapArrayAnytype;
}
@@ -296,7 +290,6 @@ public class AdditionalPropertiesClass {
}
public void setMapMapString(Map<String, Map<String, String>> mapMapString) {
this.mapMapString = mapMapString;
}
@@ -328,7 +321,6 @@ public class AdditionalPropertiesClass {
}
public void setMapMapAnytype(Map<String, Map<String, Object>> mapMapAnytype) {
this.mapMapAnytype = mapMapAnytype;
}
@@ -352,7 +344,6 @@ public class AdditionalPropertiesClass {
}
public void setAnytype1(Object anytype1) {
this.anytype1 = anytype1;
}
@@ -376,7 +367,6 @@ public class AdditionalPropertiesClass {
}
public void setAnytype2(Object anytype2) {
this.anytype2 = anytype2;
}
@@ -400,7 +390,6 @@ public class AdditionalPropertiesClass {
}
public void setAnytype3(Object anytype3) {
this.anytype3 = anytype3;
}

View File

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

View File

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

View File

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

View File

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

View File

@@ -59,7 +59,6 @@ public class Animal {
}
public void setClassName(String className) {
this.className = className;
}
@@ -83,7 +82,6 @@ public class Animal {
}
public void setColor(String color) {
this.color = color;
}

View File

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

View File

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

View File

@@ -71,7 +71,6 @@ public class ArrayTest {
}
public void setArrayOfString(List<String> arrayOfString) {
this.arrayOfString = arrayOfString;
}
@@ -103,7 +102,6 @@ public class ArrayTest {
}
public void setArrayArrayOfInteger(List<List<Long>> arrayArrayOfInteger) {
this.arrayArrayOfInteger = arrayArrayOfInteger;
}
@@ -135,7 +133,6 @@ public class ArrayTest {
}
public void setArrayArrayOfModel(List<List<ReadOnlyFirst>> arrayArrayOfModel) {
this.arrayArrayOfModel = arrayArrayOfModel;
}

View File

@@ -72,7 +72,6 @@ public class Capitalization {
}
public void setSmallCamel(String smallCamel) {
this.smallCamel = smallCamel;
}
@@ -96,7 +95,6 @@ public class Capitalization {
}
public void setCapitalCamel(String capitalCamel) {
this.capitalCamel = capitalCamel;
}
@@ -120,7 +118,6 @@ public class Capitalization {
}
public void setSmallSnake(String smallSnake) {
this.smallSnake = smallSnake;
}
@@ -144,7 +141,6 @@ public class Capitalization {
}
public void setCapitalSnake(String capitalSnake) {
this.capitalSnake = capitalSnake;
}
@@ -168,7 +164,6 @@ public class Capitalization {
}
public void setScAETHFlowPoints(String scAETHFlowPoints) {
this.scAETHFlowPoints = scAETHFlowPoints;
}
@@ -192,7 +187,6 @@ public class Capitalization {
}
public void setATTNAME(String ATT_NAME) {
this.ATT_NAME = ATT_NAME;
}

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -261,7 +261,6 @@ public class EnumTest {
}
public void setEnumString(EnumStringEnum enumString) {
this.enumString = enumString;
}
@@ -284,7 +283,6 @@ public class EnumTest {
}
public void setEnumStringRequired(EnumStringRequiredEnum enumStringRequired) {
this.enumStringRequired = enumStringRequired;
}
@@ -308,7 +306,6 @@ public class EnumTest {
}
public void setEnumInteger(EnumIntegerEnum enumInteger) {
this.enumInteger = enumInteger;
}
@@ -332,7 +329,6 @@ public class EnumTest {
}
public void setEnumNumber(EnumNumberEnum enumNumber) {
this.enumNumber = enumNumber;
}
@@ -356,7 +352,6 @@ public class EnumTest {
}
public void setOuterEnum(OuterEnum outerEnum) {
this.outerEnum = outerEnum;
}

View File

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

View File

@@ -111,7 +111,6 @@ public class FormatTest {
}
public void setInteger(Integer integer) {
this.integer = integer;
}
@@ -137,7 +136,6 @@ public class FormatTest {
}
public void setInt32(Integer int32) {
this.int32 = int32;
}
@@ -161,7 +159,6 @@ public class FormatTest {
}
public void setInt64(Long int64) {
this.int64 = int64;
}
@@ -186,7 +183,6 @@ public class FormatTest {
}
public void setNumber(BigDecimal number) {
this.number = number;
}
@@ -212,7 +208,6 @@ public class FormatTest {
}
public void setFloat(Float _float) {
this._float = _float;
}
@@ -238,7 +233,6 @@ public class FormatTest {
}
public void setDouble(Double _double) {
this._double = _double;
}
@@ -262,7 +256,6 @@ public class FormatTest {
}
public void setString(String string) {
this.string = string;
}
@@ -285,7 +278,6 @@ public class FormatTest {
}
public void setByte(byte[] _byte) {
this._byte = _byte;
}
@@ -309,7 +301,6 @@ public class FormatTest {
}
public void setBinary(File binary) {
this.binary = binary;
}
@@ -332,7 +323,6 @@ public class FormatTest {
}
public void setDate(LocalDate date) {
this.date = date;
}
@@ -356,7 +346,6 @@ public class FormatTest {
}
public void setDateTime(DateTime dateTime) {
this.dateTime = dateTime;
}
@@ -380,7 +369,6 @@ public class FormatTest {
}
public void setUuid(UUID uuid) {
this.uuid = uuid;
}
@@ -403,7 +391,6 @@ public class FormatTest {
}
public void setPassword(String password) {
this.password = password;
}
@@ -427,7 +414,6 @@ public class FormatTest {
}
public void setBigDecimal(BigDecimal bigDecimal) {
this.bigDecimal = bigDecimal;
}

View File

@@ -122,7 +122,6 @@ public class MapTest {
}
public void setMapMapOfString(Map<String, Map<String, String>> mapMapOfString) {
this.mapMapOfString = mapMapOfString;
}
@@ -154,7 +153,6 @@ public class MapTest {
}
public void setMapOfEnumString(Map<String, InnerEnum> mapOfEnumString) {
this.mapOfEnumString = mapOfEnumString;
}
@@ -186,7 +184,6 @@ public class MapTest {
}
public void setDirectMap(Map<String, Boolean> directMap) {
this.directMap = directMap;
}
@@ -218,7 +215,6 @@ public class MapTest {
}
public void setIndirectMap(Map<String, Boolean> indirectMap) {
this.indirectMap = indirectMap;
}

View File

@@ -66,7 +66,6 @@ public class MixedPropertiesAndAdditionalPropertiesClass {
}
public void setUuid(UUID uuid) {
this.uuid = uuid;
}
@@ -90,7 +89,6 @@ public class MixedPropertiesAndAdditionalPropertiesClass {
}
public void setDateTime(DateTime dateTime) {
this.dateTime = dateTime;
}
@@ -122,7 +120,6 @@ public class MixedPropertiesAndAdditionalPropertiesClass {
}
public void setMap(Map<String, Animal> map) {
this.map = map;
}

View File

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

View File

@@ -60,7 +60,6 @@ public class ModelApiResponse {
}
public void setCode(Integer code) {
this.code = code;
}
@@ -84,7 +83,6 @@ public class ModelApiResponse {
}
public void setType(String type) {
this.type = type;
}
@@ -108,7 +106,6 @@ public class ModelApiResponse {
}
public void setMessage(String message) {
this.message = message;
}

View File

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

View File

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

View File

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

View File

@@ -122,7 +122,6 @@ public class Order {
}
public void setId(Long id) {
this.id = id;
}
@@ -146,7 +145,6 @@ public class Order {
}
public void setPetId(Long petId) {
this.petId = petId;
}
@@ -170,7 +168,6 @@ public class Order {
}
public void setQuantity(Integer quantity) {
this.quantity = quantity;
}
@@ -194,7 +191,6 @@ public class Order {
}
public void setShipDate(DateTime shipDate) {
this.shipDate = shipDate;
}
@@ -218,7 +214,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

@@ -61,7 +61,6 @@ public class OuterComposite {
}
public void setMyNumber(BigDecimal myNumber) {
this.myNumber = myNumber;
}
@@ -85,7 +84,6 @@ public class OuterComposite {
}
public void setMyString(String myString) {
this.myString = myString;
}
@@ -109,7 +107,6 @@ public class OuterComposite {
}
public void setMyBoolean(Boolean myBoolean) {
this.myBoolean = myBoolean;
}

View File

@@ -125,7 +125,6 @@ public class Pet {
}
public void setId(Long id) {
this.id = id;
}
@@ -149,7 +148,6 @@ public class Pet {
}
public void setCategory(Category category) {
this.category = category;
}
@@ -172,7 +170,6 @@ public class Pet {
}
public void setName(String name) {
this.name = name;
}
@@ -200,7 +197,6 @@ public class Pet {
}
public void setPhotoUrls(List<String> photoUrls) {
this.photoUrls = photoUrls;
}
@@ -232,7 +228,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

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

View File

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

View File

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

View File

@@ -70,7 +70,6 @@ public class TypeHolderDefault {
}
public void setStringItem(String stringItem) {
this.stringItem = stringItem;
}
@@ -93,7 +92,6 @@ public class TypeHolderDefault {
}
public void setNumberItem(BigDecimal numberItem) {
this.numberItem = numberItem;
}
@@ -116,7 +114,6 @@ public class TypeHolderDefault {
}
public void setIntegerItem(Integer integerItem) {
this.integerItem = integerItem;
}
@@ -139,7 +136,6 @@ public class TypeHolderDefault {
}
public void setBoolItem(Boolean boolItem) {
this.boolItem = boolItem;
}
@@ -167,7 +163,6 @@ public class TypeHolderDefault {
}
public void setArrayItem(List<Integer> arrayItem) {
this.arrayItem = arrayItem;
}

View File

@@ -74,7 +74,6 @@ public class TypeHolderExample {
}
public void setStringItem(String stringItem) {
this.stringItem = stringItem;
}
@@ -97,7 +96,6 @@ public class TypeHolderExample {
}
public void setNumberItem(BigDecimal numberItem) {
this.numberItem = numberItem;
}
@@ -120,7 +118,6 @@ public class TypeHolderExample {
}
public void setFloatItem(Float floatItem) {
this.floatItem = floatItem;
}
@@ -143,7 +140,6 @@ public class TypeHolderExample {
}
public void setIntegerItem(Integer integerItem) {
this.integerItem = integerItem;
}
@@ -166,7 +162,6 @@ public class TypeHolderExample {
}
public void setBoolItem(Boolean boolItem) {
this.boolItem = boolItem;
}
@@ -194,7 +189,6 @@ public class TypeHolderExample {
}
public void setArrayItem(List<Integer> arrayItem) {
this.arrayItem = arrayItem;
}

View File

@@ -80,7 +80,6 @@ public class User {
}
public void setId(Long id) {
this.id = id;
}
@@ -104,7 +103,6 @@ public class User {
}
public void setUsername(String username) {
this.username = username;
}
@@ -128,7 +126,6 @@ public class User {
}
public void setFirstName(String firstName) {
this.firstName = firstName;
}
@@ -152,7 +149,6 @@ public class User {
}
public void setLastName(String lastName) {
this.lastName = lastName;
}
@@ -176,7 +172,6 @@ public class User {
}
public void setEmail(String email) {
this.email = email;
}
@@ -200,7 +195,6 @@ public class User {
}
public void setPassword(String password) {
this.password = password;
}
@@ -224,7 +218,6 @@ public class User {
}
public void setPhone(String phone) {
this.phone = phone;
}
@@ -248,7 +241,6 @@ public class User {
}
public void setUserStatus(Integer userStatus) {
this.userStatus = userStatus;
}

View File

@@ -167,7 +167,6 @@ public class XmlItem {
}
public void setAttributeString(String attributeString) {
this.attributeString = attributeString;
}
@@ -191,7 +190,6 @@ public class XmlItem {
}
public void setAttributeNumber(BigDecimal attributeNumber) {
this.attributeNumber = attributeNumber;
}
@@ -215,7 +213,6 @@ public class XmlItem {
}
public void setAttributeInteger(Integer attributeInteger) {
this.attributeInteger = attributeInteger;
}
@@ -239,7 +236,6 @@ public class XmlItem {
}
public void setAttributeBoolean(Boolean attributeBoolean) {
this.attributeBoolean = attributeBoolean;
}
@@ -271,7 +267,6 @@ public class XmlItem {
}
public void setWrappedArray(List<Integer> wrappedArray) {
this.wrappedArray = wrappedArray;
}
@@ -295,7 +290,6 @@ public class XmlItem {
}
public void setNameString(String nameString) {
this.nameString = nameString;
}
@@ -319,7 +313,6 @@ public class XmlItem {
}
public void setNameNumber(BigDecimal nameNumber) {
this.nameNumber = nameNumber;
}
@@ -343,7 +336,6 @@ public class XmlItem {
}
public void setNameInteger(Integer nameInteger) {
this.nameInteger = nameInteger;
}
@@ -367,7 +359,6 @@ public class XmlItem {
}
public void setNameBoolean(Boolean nameBoolean) {
this.nameBoolean = nameBoolean;
}
@@ -399,7 +390,6 @@ public class XmlItem {
}
public void setNameArray(List<Integer> nameArray) {
this.nameArray = nameArray;
}
@@ -431,7 +421,6 @@ public class XmlItem {
}
public void setNameWrappedArray(List<Integer> nameWrappedArray) {
this.nameWrappedArray = nameWrappedArray;
}
@@ -455,7 +444,6 @@ public class XmlItem {
}
public void setPrefixString(String prefixString) {
this.prefixString = prefixString;
}
@@ -479,7 +467,6 @@ public class XmlItem {
}
public void setPrefixNumber(BigDecimal prefixNumber) {
this.prefixNumber = prefixNumber;
}
@@ -503,7 +490,6 @@ public class XmlItem {
}
public void setPrefixInteger(Integer prefixInteger) {
this.prefixInteger = prefixInteger;
}
@@ -527,7 +513,6 @@ public class XmlItem {
}
public void setPrefixBoolean(Boolean prefixBoolean) {
this.prefixBoolean = prefixBoolean;
}
@@ -559,7 +544,6 @@ public class XmlItem {
}
public void setPrefixArray(List<Integer> prefixArray) {
this.prefixArray = prefixArray;
}
@@ -591,7 +575,6 @@ public class XmlItem {
}
public void setPrefixWrappedArray(List<Integer> prefixWrappedArray) {
this.prefixWrappedArray = prefixWrappedArray;
}
@@ -615,7 +598,6 @@ public class XmlItem {
}
public void setNamespaceString(String namespaceString) {
this.namespaceString = namespaceString;
}
@@ -639,7 +621,6 @@ public class XmlItem {
}
public void setNamespaceNumber(BigDecimal namespaceNumber) {
this.namespaceNumber = namespaceNumber;
}
@@ -663,7 +644,6 @@ public class XmlItem {
}
public void setNamespaceInteger(Integer namespaceInteger) {
this.namespaceInteger = namespaceInteger;
}
@@ -687,7 +667,6 @@ public class XmlItem {
}
public void setNamespaceBoolean(Boolean namespaceBoolean) {
this.namespaceBoolean = namespaceBoolean;
}
@@ -719,7 +698,6 @@ public class XmlItem {
}
public void setNamespaceArray(List<Integer> namespaceArray) {
this.namespaceArray = namespaceArray;
}
@@ -751,7 +729,6 @@ public class XmlItem {
}
public void setNamespaceWrappedArray(List<Integer> namespaceWrappedArray) {
this.namespaceWrappedArray = namespaceWrappedArray;
}
@@ -775,7 +752,6 @@ public class XmlItem {
}
public void setPrefixNsString(String prefixNsString) {
this.prefixNsString = prefixNsString;
}
@@ -799,7 +775,6 @@ public class XmlItem {
}
public void setPrefixNsNumber(BigDecimal prefixNsNumber) {
this.prefixNsNumber = prefixNsNumber;
}
@@ -823,7 +798,6 @@ public class XmlItem {
}
public void setPrefixNsInteger(Integer prefixNsInteger) {
this.prefixNsInteger = prefixNsInteger;
}
@@ -847,7 +821,6 @@ public class XmlItem {
}
public void setPrefixNsBoolean(Boolean prefixNsBoolean) {
this.prefixNsBoolean = prefixNsBoolean;
}
@@ -879,7 +852,6 @@ public class XmlItem {
}
public void setPrefixNsArray(List<Integer> prefixNsArray) {
this.prefixNsArray = prefixNsArray;
}
@@ -911,7 +883,6 @@ public class XmlItem {
}
public void setPrefixNsWrappedArray(List<Integer> prefixNsWrappedArray) {
this.prefixNsWrappedArray = prefixNsWrappedArray;
}