From b1837693b1fa4420c49a34f40f5db91a70db15ad Mon Sep 17 00:00:00 2001 From: Prakhar Gupta Date: Sat, 27 Mar 2021 11:29:49 +0530 Subject: [PATCH] [JAVA][jaxrs-spec] Added custom methods to add/remove elements from Java Collections (#6468) --- .../resources/JavaJaxRS/spec/pojo.mustache | 40 ++- .../model/AdditionalPropertiesAnyType.java | 1 + .../model/AdditionalPropertiesArray.java | 1 + .../model/AdditionalPropertiesBoolean.java | 1 + .../model/AdditionalPropertiesClass.java | 169 +++++++++++- .../model/AdditionalPropertiesInteger.java | 1 + .../model/AdditionalPropertiesNumber.java | 1 + .../model/AdditionalPropertiesObject.java | 1 + .../model/AdditionalPropertiesString.java | 1 + .../java/org/openapitools/model/Animal.java | 5 +- .../model/ArrayOfArrayOfNumberOnly.java | 17 ++ .../openapitools/model/ArrayOfNumberOnly.java | 17 ++ .../org/openapitools/model/ArrayTest.java | 57 +++- .../java/org/openapitools/model/BigCat.java | 1 + .../org/openapitools/model/BigCatAllOf.java | 1 + .../openapitools/model/Capitalization.java | 21 +- .../gen/java/org/openapitools/model/Cat.java | 1 + .../java/org/openapitools/model/CatAllOf.java | 1 + .../java/org/openapitools/model/Category.java | 5 +- .../org/openapitools/model/ClassModel.java | 1 + .../java/org/openapitools/model/Client.java | 1 + .../gen/java/org/openapitools/model/Dog.java | 1 + .../java/org/openapitools/model/DogAllOf.java | 1 + .../org/openapitools/model/EnumArrays.java | 21 +- .../java/org/openapitools/model/EnumTest.java | 17 +- .../model/FileSchemaTestClass.java | 21 +- .../org/openapitools/model/FormatTest.java | 53 +++- .../openapitools/model/HasOnlyReadOnly.java | 5 +- .../java/org/openapitools/model/MapTest.java | 77 +++++- ...ropertiesAndAdditionalPropertiesClass.java | 25 +- .../openapitools/model/Model200Response.java | 5 +- .../openapitools/model/ModelApiResponse.java | 9 +- .../org/openapitools/model/ModelReturn.java | 1 + .../gen/java/org/openapitools/model/Name.java | 13 +- .../org/openapitools/model/NumberOnly.java | 1 + .../java/org/openapitools/model/Order.java | 21 +- .../openapitools/model/OuterComposite.java | 9 +- .../gen/java/org/openapitools/model/Pet.java | 53 +++- .../org/openapitools/model/ReadOnlyFirst.java | 5 +- .../openapitools/model/SpecialModelName.java | 1 + .../gen/java/org/openapitools/model/Tag.java | 5 +- .../openapitools/model/TypeHolderDefault.java | 33 ++- .../openapitools/model/TypeHolderExample.java | 37 ++- .../gen/java/org/openapitools/model/User.java | 29 +- .../java/org/openapitools/model/XmlItem.java | 257 ++++++++++++++++-- .../api/FakeClassnameTags123Api.java | 32 --- .../model/AdditionalPropertiesAnyType.java | 1 + .../model/AdditionalPropertiesArray.java | 1 + .../model/AdditionalPropertiesBoolean.java | 1 + .../model/AdditionalPropertiesClass.java | 169 +++++++++++- .../model/AdditionalPropertiesInteger.java | 1 + .../model/AdditionalPropertiesNumber.java | 1 + .../model/AdditionalPropertiesObject.java | 1 + .../model/AdditionalPropertiesString.java | 1 + .../java/org/openapitools/model/Animal.java | 5 +- .../org/openapitools/model/AnimalFarm.java | 59 ---- .../model/ArrayOfArrayOfNumberOnly.java | 17 ++ .../openapitools/model/ArrayOfNumberOnly.java | 17 ++ .../org/openapitools/model/ArrayTest.java | 57 +++- .../java/org/openapitools/model/BigCat.java | 1 + .../org/openapitools/model/BigCatAllOf.java | 1 + .../openapitools/model/Capitalization.java | 21 +- .../gen/java/org/openapitools/model/Cat.java | 1 + .../java/org/openapitools/model/CatAllOf.java | 1 + .../java/org/openapitools/model/Category.java | 5 +- .../org/openapitools/model/ClassModel.java | 1 + .../java/org/openapitools/model/Client.java | 1 + .../gen/java/org/openapitools/model/Dog.java | 1 + .../java/org/openapitools/model/DogAllOf.java | 1 + .../org/openapitools/model/EnumArrays.java | 21 +- .../java/org/openapitools/model/EnumTest.java | 17 +- .../model/FileSchemaTestClass.java | 21 +- .../org/openapitools/model/FormatTest.java | 53 +++- .../openapitools/model/HasOnlyReadOnly.java | 5 +- .../java/org/openapitools/model/MapTest.java | 77 +++++- ...ropertiesAndAdditionalPropertiesClass.java | 25 +- .../openapitools/model/Model200Response.java | 5 +- .../openapitools/model/ModelApiResponse.java | 9 +- .../org/openapitools/model/ModelReturn.java | 1 + .../gen/java/org/openapitools/model/Name.java | 13 +- .../org/openapitools/model/NumberOnly.java | 1 + .../java/org/openapitools/model/Order.java | 21 +- .../openapitools/model/OuterComposite.java | 9 +- .../gen/java/org/openapitools/model/Pet.java | 53 +++- .../org/openapitools/model/ReadOnlyFirst.java | 5 +- .../openapitools/model/SpecialModelName.java | 1 + .../openapitools/model/StringBooleanMap.java | 58 ---- .../gen/java/org/openapitools/model/Tag.java | 5 +- .../openapitools/model/TypeHolderDefault.java | 33 ++- .../openapitools/model/TypeHolderExample.java | 37 ++- .../gen/java/org/openapitools/model/User.java | 29 +- .../java/org/openapitools/model/XmlItem.java | 257 ++++++++++++++++-- 92 files changed, 1831 insertions(+), 366 deletions(-) delete mode 100644 samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/api/FakeClassnameTags123Api.java delete mode 100644 samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/AnimalFarm.java delete mode 100644 samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/StringBooleanMap.java diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/pojo.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/pojo.mustache index 91c23b9635f..90430584ba7 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/pojo.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/pojo.mustache @@ -49,7 +49,45 @@ import com.fasterxml.jackson.annotation.JsonValue; public void {{setter}}({{{datatypeWithEnum}}} {{name}}) { this.{{name}} = {{name}}; - }{{/vars}} + } + + {{#isListContainer}} + public {{classname}} add{{nameInCamelCase}}Item({{{items.datatypeWithEnum}}} {{name}}Item) { + if (this.{{name}} == null) { + this.{{name}} = {{{defaultValue}}}; + } + + this.{{name}}.add({{name}}Item); + return this; + } + + public {{classname}} remove{{nameInCamelCase}}Item({{{items.datatypeWithEnum}}} {{name}}Item) { + if ({{name}}Item != null && this.{{name}} != null) { + this.{{name}}.remove({{name}}Item); + } + + return this; + } + {{/isListContainer}} + {{#isMapContainer}} + public {{classname}} put{{nameInCamelCase}}Item(String key, {{{items.datatypeWithEnum}}} {{name}}Item) { + if (this.{{name}} == null) { + this.{{name}} = {{{defaultValue}}}; + } + + this.{{name}}.put(key, {{name}}Item); + return this; + } + + public {{classname}} remove{{nameInCamelCase}}Item({{{items.datatypeWithEnum}}} {{name}}Item) { + if ({{name}}Item != null && this.{{name}} != null) { + this.{{name}}.remove({{name}}Item); + } + + return this; + } + {{/isMapContainer}} + {{/vars}} @Override public boolean equals(Object o) { diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/AdditionalPropertiesAnyType.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/AdditionalPropertiesAnyType.java index f2521988441..6b9dcfa1ac6 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/AdditionalPropertiesAnyType.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/AdditionalPropertiesAnyType.java @@ -40,6 +40,7 @@ import com.fasterxml.jackson.annotation.JsonValue; this.name = name; } + @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/AdditionalPropertiesArray.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/AdditionalPropertiesArray.java index 7cc3e609972..1b504c15f4e 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/AdditionalPropertiesArray.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/AdditionalPropertiesArray.java @@ -41,6 +41,7 @@ import com.fasterxml.jackson.annotation.JsonValue; this.name = name; } + @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/AdditionalPropertiesBoolean.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/AdditionalPropertiesBoolean.java index 172c5f42dad..d842728a186 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/AdditionalPropertiesBoolean.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/AdditionalPropertiesBoolean.java @@ -40,6 +40,7 @@ import com.fasterxml.jackson.annotation.JsonValue; this.name = name; } + @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/AdditionalPropertiesClass.java index b646cfb0b0d..e745b6846af 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -50,7 +50,25 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setMapString(Map mapString) { this.mapString = mapString; - }/** + } + + public AdditionalPropertiesClass putMapStringItem(String key, String mapStringItem) { + if (this.mapString == null) { + this.mapString = new HashMap(); + } + + this.mapString.put(key, mapStringItem); + return this; + } + + public AdditionalPropertiesClass removeMapStringItem(String mapStringItem) { + if (mapStringItem != null && this.mapString != null) { + this.mapString.remove(mapStringItem); + } + + return this; + } +/** **/ public AdditionalPropertiesClass mapNumber(Map mapNumber) { this.mapNumber = mapNumber; @@ -68,7 +86,25 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setMapNumber(Map mapNumber) { this.mapNumber = mapNumber; - }/** + } + + public AdditionalPropertiesClass putMapNumberItem(String key, BigDecimal mapNumberItem) { + if (this.mapNumber == null) { + this.mapNumber = new HashMap(); + } + + this.mapNumber.put(key, mapNumberItem); + return this; + } + + public AdditionalPropertiesClass removeMapNumberItem(BigDecimal mapNumberItem) { + if (mapNumberItem != null && this.mapNumber != null) { + this.mapNumber.remove(mapNumberItem); + } + + return this; + } +/** **/ public AdditionalPropertiesClass mapInteger(Map mapInteger) { this.mapInteger = mapInteger; @@ -86,7 +122,25 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setMapInteger(Map mapInteger) { this.mapInteger = mapInteger; - }/** + } + + public AdditionalPropertiesClass putMapIntegerItem(String key, Integer mapIntegerItem) { + if (this.mapInteger == null) { + this.mapInteger = new HashMap(); + } + + this.mapInteger.put(key, mapIntegerItem); + return this; + } + + public AdditionalPropertiesClass removeMapIntegerItem(Integer mapIntegerItem) { + if (mapIntegerItem != null && this.mapInteger != null) { + this.mapInteger.remove(mapIntegerItem); + } + + return this; + } +/** **/ public AdditionalPropertiesClass mapBoolean(Map mapBoolean) { this.mapBoolean = mapBoolean; @@ -104,7 +158,25 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setMapBoolean(Map mapBoolean) { this.mapBoolean = mapBoolean; - }/** + } + + public AdditionalPropertiesClass putMapBooleanItem(String key, Boolean mapBooleanItem) { + if (this.mapBoolean == null) { + this.mapBoolean = new HashMap(); + } + + this.mapBoolean.put(key, mapBooleanItem); + return this; + } + + public AdditionalPropertiesClass removeMapBooleanItem(Boolean mapBooleanItem) { + if (mapBooleanItem != null && this.mapBoolean != null) { + this.mapBoolean.remove(mapBooleanItem); + } + + return this; + } +/** **/ public AdditionalPropertiesClass mapArrayInteger(Map> mapArrayInteger) { this.mapArrayInteger = mapArrayInteger; @@ -122,7 +194,25 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setMapArrayInteger(Map> mapArrayInteger) { this.mapArrayInteger = mapArrayInteger; - }/** + } + + public AdditionalPropertiesClass putMapArrayIntegerItem(String key, List mapArrayIntegerItem) { + if (this.mapArrayInteger == null) { + this.mapArrayInteger = new HashMap>(); + } + + this.mapArrayInteger.put(key, mapArrayIntegerItem); + return this; + } + + public AdditionalPropertiesClass removeMapArrayIntegerItem(List mapArrayIntegerItem) { + if (mapArrayIntegerItem != null && this.mapArrayInteger != null) { + this.mapArrayInteger.remove(mapArrayIntegerItem); + } + + return this; + } +/** **/ public AdditionalPropertiesClass mapArrayAnytype(Map> mapArrayAnytype) { this.mapArrayAnytype = mapArrayAnytype; @@ -140,7 +230,25 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setMapArrayAnytype(Map> mapArrayAnytype) { this.mapArrayAnytype = mapArrayAnytype; - }/** + } + + public AdditionalPropertiesClass putMapArrayAnytypeItem(String key, List mapArrayAnytypeItem) { + if (this.mapArrayAnytype == null) { + this.mapArrayAnytype = new HashMap>(); + } + + this.mapArrayAnytype.put(key, mapArrayAnytypeItem); + return this; + } + + public AdditionalPropertiesClass removeMapArrayAnytypeItem(List mapArrayAnytypeItem) { + if (mapArrayAnytypeItem != null && this.mapArrayAnytype != null) { + this.mapArrayAnytype.remove(mapArrayAnytypeItem); + } + + return this; + } +/** **/ public AdditionalPropertiesClass mapMapString(Map> mapMapString) { this.mapMapString = mapMapString; @@ -158,7 +266,25 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setMapMapString(Map> mapMapString) { this.mapMapString = mapMapString; - }/** + } + + public AdditionalPropertiesClass putMapMapStringItem(String key, Map mapMapStringItem) { + if (this.mapMapString == null) { + this.mapMapString = new HashMap>(); + } + + this.mapMapString.put(key, mapMapStringItem); + return this; + } + + public AdditionalPropertiesClass removeMapMapStringItem(Map mapMapStringItem) { + if (mapMapStringItem != null && this.mapMapString != null) { + this.mapMapString.remove(mapMapStringItem); + } + + return this; + } +/** **/ public AdditionalPropertiesClass mapMapAnytype(Map> mapMapAnytype) { this.mapMapAnytype = mapMapAnytype; @@ -176,7 +302,25 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setMapMapAnytype(Map> mapMapAnytype) { this.mapMapAnytype = mapMapAnytype; - }/** + } + + public AdditionalPropertiesClass putMapMapAnytypeItem(String key, Map mapMapAnytypeItem) { + if (this.mapMapAnytype == null) { + this.mapMapAnytype = new HashMap>(); + } + + this.mapMapAnytype.put(key, mapMapAnytypeItem); + return this; + } + + public AdditionalPropertiesClass removeMapMapAnytypeItem(Map mapMapAnytypeItem) { + if (mapMapAnytypeItem != null && this.mapMapAnytype != null) { + this.mapMapAnytype.remove(mapMapAnytypeItem); + } + + return this; + } +/** **/ public AdditionalPropertiesClass anytype1(Object anytype1) { this.anytype1 = anytype1; @@ -194,7 +338,9 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setAnytype1(Object anytype1) { this.anytype1 = anytype1; - }/** + } + +/** **/ public AdditionalPropertiesClass anytype2(Object anytype2) { this.anytype2 = anytype2; @@ -212,7 +358,9 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setAnytype2(Object anytype2) { this.anytype2 = anytype2; - }/** + } + +/** **/ public AdditionalPropertiesClass anytype3(Object anytype3) { this.anytype3 = anytype3; @@ -232,6 +380,7 @@ import com.fasterxml.jackson.annotation.JsonValue; this.anytype3 = anytype3; } + @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/AdditionalPropertiesInteger.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/AdditionalPropertiesInteger.java index 2c2e51fb83b..6f925720aba 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/AdditionalPropertiesInteger.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/AdditionalPropertiesInteger.java @@ -40,6 +40,7 @@ import com.fasterxml.jackson.annotation.JsonValue; this.name = name; } + @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/AdditionalPropertiesNumber.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/AdditionalPropertiesNumber.java index 4735b0fd5bd..884577dcdd0 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/AdditionalPropertiesNumber.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/AdditionalPropertiesNumber.java @@ -41,6 +41,7 @@ import com.fasterxml.jackson.annotation.JsonValue; this.name = name; } + @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/AdditionalPropertiesObject.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/AdditionalPropertiesObject.java index 05f7408f9a8..cbe4428f3e3 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/AdditionalPropertiesObject.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/AdditionalPropertiesObject.java @@ -40,6 +40,7 @@ import com.fasterxml.jackson.annotation.JsonValue; this.name = name; } + @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/AdditionalPropertiesString.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/AdditionalPropertiesString.java index 03739679cd0..16f6a60afd1 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/AdditionalPropertiesString.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/AdditionalPropertiesString.java @@ -40,6 +40,7 @@ import com.fasterxml.jackson.annotation.JsonValue; this.name = name; } + @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Animal.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Animal.java index 1f0f1e31647..8ddd9ed2f8c 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Animal.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Animal.java @@ -46,7 +46,9 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setClassName(String className) { this.className = className; - }/** + } + +/** **/ public Animal color(String color) { this.color = color; @@ -66,6 +68,7 @@ import com.fasterxml.jackson.annotation.JsonValue; this.color = color; } + @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java index 77a46a2186a..7460869a0d0 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java @@ -41,6 +41,23 @@ import com.fasterxml.jackson.annotation.JsonValue; this.arrayArrayNumber = arrayArrayNumber; } + public ArrayOfArrayOfNumberOnly addArrayArrayNumberItem(List arrayArrayNumberItem) { + if (this.arrayArrayNumber == null) { + this.arrayArrayNumber = new ArrayList>(); + } + + this.arrayArrayNumber.add(arrayArrayNumberItem); + return this; + } + + public ArrayOfArrayOfNumberOnly removeArrayArrayNumberItem(List arrayArrayNumberItem) { + if (arrayArrayNumberItem != null && this.arrayArrayNumber != null) { + this.arrayArrayNumber.remove(arrayArrayNumberItem); + } + + return this; + } + @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/ArrayOfNumberOnly.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/ArrayOfNumberOnly.java index 36039422cf3..2a02c2c74fa 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/ArrayOfNumberOnly.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/ArrayOfNumberOnly.java @@ -41,6 +41,23 @@ import com.fasterxml.jackson.annotation.JsonValue; this.arrayNumber = arrayNumber; } + public ArrayOfNumberOnly addArrayNumberItem(BigDecimal arrayNumberItem) { + if (this.arrayNumber == null) { + this.arrayNumber = new ArrayList(); + } + + this.arrayNumber.add(arrayNumberItem); + return this; + } + + public ArrayOfNumberOnly removeArrayNumberItem(BigDecimal arrayNumberItem) { + if (arrayNumberItem != null && this.arrayNumber != null) { + this.arrayNumber.remove(arrayNumberItem); + } + + return this; + } + @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/ArrayTest.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/ArrayTest.java index 374527d8ad5..f4c67f4dccb 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/ArrayTest.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/ArrayTest.java @@ -41,7 +41,25 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setArrayOfString(List arrayOfString) { this.arrayOfString = arrayOfString; - }/** + } + + public ArrayTest addArrayOfStringItem(String arrayOfStringItem) { + if (this.arrayOfString == null) { + this.arrayOfString = new ArrayList(); + } + + this.arrayOfString.add(arrayOfStringItem); + return this; + } + + public ArrayTest removeArrayOfStringItem(String arrayOfStringItem) { + if (arrayOfStringItem != null && this.arrayOfString != null) { + this.arrayOfString.remove(arrayOfStringItem); + } + + return this; + } +/** **/ public ArrayTest arrayArrayOfInteger(List> arrayArrayOfInteger) { this.arrayArrayOfInteger = arrayArrayOfInteger; @@ -59,7 +77,25 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setArrayArrayOfInteger(List> arrayArrayOfInteger) { this.arrayArrayOfInteger = arrayArrayOfInteger; - }/** + } + + public ArrayTest addArrayArrayOfIntegerItem(List arrayArrayOfIntegerItem) { + if (this.arrayArrayOfInteger == null) { + this.arrayArrayOfInteger = new ArrayList>(); + } + + this.arrayArrayOfInteger.add(arrayArrayOfIntegerItem); + return this; + } + + public ArrayTest removeArrayArrayOfIntegerItem(List arrayArrayOfIntegerItem) { + if (arrayArrayOfIntegerItem != null && this.arrayArrayOfInteger != null) { + this.arrayArrayOfInteger.remove(arrayArrayOfIntegerItem); + } + + return this; + } +/** **/ public ArrayTest arrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; @@ -79,6 +115,23 @@ import com.fasterxml.jackson.annotation.JsonValue; this.arrayArrayOfModel = arrayArrayOfModel; } + public ArrayTest addArrayArrayOfModelItem(List arrayArrayOfModelItem) { + if (this.arrayArrayOfModel == null) { + this.arrayArrayOfModel = new ArrayList>(); + } + + this.arrayArrayOfModel.add(arrayArrayOfModelItem); + return this; + } + + public ArrayTest removeArrayArrayOfModelItem(List arrayArrayOfModelItem) { + if (arrayArrayOfModelItem != null && this.arrayArrayOfModel != null) { + this.arrayArrayOfModel.remove(arrayArrayOfModelItem); + } + + return this; + } + @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/BigCat.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/BigCat.java index 33dff05e836..1a3ddba789b 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/BigCat.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/BigCat.java @@ -73,6 +73,7 @@ public enum KindEnum { this.kind = kind; } + @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/BigCatAllOf.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/BigCatAllOf.java index 0b5a153a074..080e86afaca 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/BigCatAllOf.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/BigCatAllOf.java @@ -71,6 +71,7 @@ public enum KindEnum { this.kind = kind; } + @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Capitalization.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Capitalization.java index 27f378125da..a65c79d984e 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Capitalization.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Capitalization.java @@ -41,7 +41,9 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setSmallCamel(String smallCamel) { this.smallCamel = smallCamel; - }/** + } + +/** **/ public Capitalization capitalCamel(String capitalCamel) { this.capitalCamel = capitalCamel; @@ -59,7 +61,9 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setCapitalCamel(String capitalCamel) { this.capitalCamel = capitalCamel; - }/** + } + +/** **/ public Capitalization smallSnake(String smallSnake) { this.smallSnake = smallSnake; @@ -77,7 +81,9 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setSmallSnake(String smallSnake) { this.smallSnake = smallSnake; - }/** + } + +/** **/ public Capitalization capitalSnake(String capitalSnake) { this.capitalSnake = capitalSnake; @@ -95,7 +101,9 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setCapitalSnake(String capitalSnake) { this.capitalSnake = capitalSnake; - }/** + } + +/** **/ public Capitalization scAETHFlowPoints(String scAETHFlowPoints) { this.scAETHFlowPoints = scAETHFlowPoints; @@ -113,7 +121,9 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setScAETHFlowPoints(String scAETHFlowPoints) { this.scAETHFlowPoints = scAETHFlowPoints; - }/** + } + +/** * Name of the pet **/ public Capitalization ATT_NAME(String ATT_NAME) { @@ -134,6 +144,7 @@ import com.fasterxml.jackson.annotation.JsonValue; this.ATT_NAME = ATT_NAME; } + @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Cat.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Cat.java index b0a2eacada2..4cc078e2235 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Cat.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Cat.java @@ -40,6 +40,7 @@ import com.fasterxml.jackson.annotation.JsonValue; this.declawed = declawed; } + @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/CatAllOf.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/CatAllOf.java index f405b41e872..e56df72d3be 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/CatAllOf.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/CatAllOf.java @@ -38,6 +38,7 @@ import com.fasterxml.jackson.annotation.JsonValue; this.declawed = declawed; } + @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Category.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Category.java index 32076613c9d..9af6f93c7c4 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Category.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Category.java @@ -37,7 +37,9 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setId(Long id) { this.id = id; - }/** + } + +/** **/ public Category name(String name) { this.name = name; @@ -58,6 +60,7 @@ import com.fasterxml.jackson.annotation.JsonValue; this.name = name; } + @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/ClassModel.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/ClassModel.java index e3153a9f03e..f050e12bb25 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/ClassModel.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/ClassModel.java @@ -40,6 +40,7 @@ import com.fasterxml.jackson.annotation.JsonValue; this.propertyClass = propertyClass; } + @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Client.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Client.java index 81a1033e052..4cdbbef940d 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Client.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Client.java @@ -38,6 +38,7 @@ import com.fasterxml.jackson.annotation.JsonValue; this.client = client; } + @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Dog.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Dog.java index 01e256a23d0..87c3a825ba8 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Dog.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Dog.java @@ -40,6 +40,7 @@ import com.fasterxml.jackson.annotation.JsonValue; this.breed = breed; } + @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/DogAllOf.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/DogAllOf.java index 3291b8f7c78..5496e3c8915 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/DogAllOf.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/DogAllOf.java @@ -38,6 +38,7 @@ import com.fasterxml.jackson.annotation.JsonValue; this.breed = breed; } + @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/EnumArrays.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/EnumArrays.java index c7ceed68c70..a033bca0071 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/EnumArrays.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/EnumArrays.java @@ -105,7 +105,9 @@ public enum ArrayEnumEnum { public void setJustSymbol(JustSymbolEnum justSymbol) { this.justSymbol = justSymbol; - }/** + } + +/** **/ public EnumArrays arrayEnum(List arrayEnum) { this.arrayEnum = arrayEnum; @@ -125,6 +127,23 @@ public enum ArrayEnumEnum { this.arrayEnum = arrayEnum; } + public EnumArrays addArrayEnumItem(ArrayEnumEnum arrayEnumItem) { + if (this.arrayEnum == null) { + this.arrayEnum = new ArrayList(); + } + + this.arrayEnum.add(arrayEnumItem); + return this; + } + + public EnumArrays removeArrayEnumItem(ArrayEnumEnum arrayEnumItem) { + if (arrayEnumItem != null && this.arrayEnum != null) { + this.arrayEnum.remove(arrayEnumItem); + } + + return this; + } + @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/EnumTest.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/EnumTest.java index d74cb2ff037..6c02f0647c9 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/EnumTest.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/EnumTest.java @@ -173,7 +173,9 @@ public enum EnumNumberEnum { public void setEnumString(EnumStringEnum enumString) { this.enumString = enumString; - }/** + } + +/** **/ public EnumTest enumStringRequired(EnumStringRequiredEnum enumStringRequired) { this.enumStringRequired = enumStringRequired; @@ -192,7 +194,9 @@ public enum EnumNumberEnum { public void setEnumStringRequired(EnumStringRequiredEnum enumStringRequired) { this.enumStringRequired = enumStringRequired; - }/** + } + +/** **/ public EnumTest enumInteger(EnumIntegerEnum enumInteger) { this.enumInteger = enumInteger; @@ -210,7 +214,9 @@ public enum EnumNumberEnum { public void setEnumInteger(EnumIntegerEnum enumInteger) { this.enumInteger = enumInteger; - }/** + } + +/** **/ public EnumTest enumNumber(EnumNumberEnum enumNumber) { this.enumNumber = enumNumber; @@ -228,7 +234,9 @@ public enum EnumNumberEnum { public void setEnumNumber(EnumNumberEnum enumNumber) { this.enumNumber = enumNumber; - }/** + } + +/** **/ public EnumTest outerEnum(OuterEnum outerEnum) { this.outerEnum = outerEnum; @@ -248,6 +256,7 @@ public enum EnumNumberEnum { this.outerEnum = outerEnum; } + @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/FileSchemaTestClass.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/FileSchemaTestClass.java index 8aa815da794..5ad48e02171 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/FileSchemaTestClass.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/FileSchemaTestClass.java @@ -39,7 +39,9 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setFile(java.io.File file) { this.file = file; - }/** + } + +/** **/ public FileSchemaTestClass files(List files) { this.files = files; @@ -59,6 +61,23 @@ import com.fasterxml.jackson.annotation.JsonValue; this.files = files; } + public FileSchemaTestClass addFilesItem(java.io.File filesItem) { + if (this.files == null) { + this.files = new ArrayList(); + } + + this.files.add(filesItem); + return this; + } + + public FileSchemaTestClass removeFilesItem(java.io.File filesItem) { + if (filesItem != null && this.files != null) { + this.files.remove(filesItem); + } + + return this; + } + @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/FormatTest.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/FormatTest.java index 70a7eed2fdd..ca11645f9ae 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/FormatTest.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/FormatTest.java @@ -56,7 +56,9 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setInteger(Integer integer) { this.integer = integer; - }/** + } + +/** * minimum: 20 * maximum: 200 **/ @@ -76,7 +78,9 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setInt32(Integer int32) { this.int32 = int32; - }/** + } + +/** **/ public FormatTest int64(Long int64) { this.int64 = int64; @@ -94,7 +98,9 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setInt64(Long int64) { this.int64 = int64; - }/** + } + +/** * minimum: 32.1 * maximum: 543.2 **/ @@ -115,7 +121,9 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setNumber(BigDecimal number) { this.number = number; - }/** + } + +/** * minimum: 54.3 * maximum: 987.6 **/ @@ -135,7 +143,9 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setFloat(Float _float) { this._float = _float; - }/** + } + +/** * minimum: 67.8 * maximum: 123.4 **/ @@ -155,7 +165,9 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setDouble(Double _double) { this._double = _double; - }/** + } + +/** **/ public FormatTest string(String string) { this.string = string; @@ -173,7 +185,9 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setString(String string) { this.string = string; - }/** + } + +/** **/ public FormatTest _byte(byte[] _byte) { this._byte = _byte; @@ -192,7 +206,9 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setByte(byte[] _byte) { this._byte = _byte; - }/** + } + +/** **/ public FormatTest binary(File binary) { this.binary = binary; @@ -210,7 +226,9 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setBinary(File binary) { this.binary = binary; - }/** + } + +/** **/ public FormatTest date(LocalDate date) { this.date = date; @@ -229,7 +247,9 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setDate(LocalDate date) { this.date = date; - }/** + } + +/** **/ public FormatTest dateTime(Date dateTime) { this.dateTime = dateTime; @@ -247,7 +267,9 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setDateTime(Date dateTime) { this.dateTime = dateTime; - }/** + } + +/** **/ public FormatTest uuid(UUID uuid) { this.uuid = uuid; @@ -265,7 +287,9 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setUuid(UUID uuid) { this.uuid = uuid; - }/** + } + +/** **/ public FormatTest password(String password) { this.password = password; @@ -284,7 +308,9 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setPassword(String password) { this.password = password; - }/** + } + +/** **/ public FormatTest bigDecimal(BigDecimal bigDecimal) { this.bigDecimal = bigDecimal; @@ -304,6 +330,7 @@ import com.fasterxml.jackson.annotation.JsonValue; this.bigDecimal = bigDecimal; } + @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/HasOnlyReadOnly.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/HasOnlyReadOnly.java index cebb1bb512b..6438846d569 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/HasOnlyReadOnly.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/HasOnlyReadOnly.java @@ -37,7 +37,9 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setBar(String bar) { this.bar = bar; - }/** + } + +/** **/ public HasOnlyReadOnly foo(String foo) { this.foo = foo; @@ -57,6 +59,7 @@ import com.fasterxml.jackson.annotation.JsonValue; this.foo = foo; } + @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/MapTest.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/MapTest.java index be225de067d..0462e9f525d 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/MapTest.java @@ -75,7 +75,25 @@ public enum InnerEnum { public void setMapMapOfString(Map> mapMapOfString) { this.mapMapOfString = mapMapOfString; - }/** + } + + public MapTest putMapMapOfStringItem(String key, Map mapMapOfStringItem) { + if (this.mapMapOfString == null) { + this.mapMapOfString = new HashMap>(); + } + + this.mapMapOfString.put(key, mapMapOfStringItem); + return this; + } + + public MapTest removeMapMapOfStringItem(Map mapMapOfStringItem) { + if (mapMapOfStringItem != null && this.mapMapOfString != null) { + this.mapMapOfString.remove(mapMapOfStringItem); + } + + return this; + } +/** **/ public MapTest mapOfEnumString(Map mapOfEnumString) { this.mapOfEnumString = mapOfEnumString; @@ -93,7 +111,25 @@ public enum InnerEnum { public void setMapOfEnumString(Map mapOfEnumString) { this.mapOfEnumString = mapOfEnumString; - }/** + } + + public MapTest putMapOfEnumStringItem(String key, InnerEnum mapOfEnumStringItem) { + if (this.mapOfEnumString == null) { + this.mapOfEnumString = new HashMap(); + } + + this.mapOfEnumString.put(key, mapOfEnumStringItem); + return this; + } + + public MapTest removeMapOfEnumStringItem(InnerEnum mapOfEnumStringItem) { + if (mapOfEnumStringItem != null && this.mapOfEnumString != null) { + this.mapOfEnumString.remove(mapOfEnumStringItem); + } + + return this; + } +/** **/ public MapTest directMap(Map directMap) { this.directMap = directMap; @@ -111,7 +147,25 @@ public enum InnerEnum { public void setDirectMap(Map directMap) { this.directMap = directMap; - }/** + } + + public MapTest putDirectMapItem(String key, Boolean directMapItem) { + if (this.directMap == null) { + this.directMap = new HashMap(); + } + + this.directMap.put(key, directMapItem); + return this; + } + + public MapTest removeDirectMapItem(Boolean directMapItem) { + if (directMapItem != null && this.directMap != null) { + this.directMap.remove(directMapItem); + } + + return this; + } +/** **/ public MapTest indirectMap(Map indirectMap) { this.indirectMap = indirectMap; @@ -131,6 +185,23 @@ public enum InnerEnum { this.indirectMap = indirectMap; } + public MapTest putIndirectMapItem(String key, Boolean indirectMapItem) { + if (this.indirectMap == null) { + this.indirectMap = new HashMap(); + } + + this.indirectMap.put(key, indirectMapItem); + return this; + } + + public MapTest removeIndirectMapItem(Boolean indirectMapItem) { + if (indirectMapItem != null && this.indirectMap != null) { + this.indirectMap.remove(indirectMapItem); + } + + return this; + } + @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java index 136a4fab119..344620b6850 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -44,7 +44,9 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setUuid(UUID uuid) { this.uuid = uuid; - }/** + } + +/** **/ public MixedPropertiesAndAdditionalPropertiesClass dateTime(Date dateTime) { this.dateTime = dateTime; @@ -62,7 +64,9 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setDateTime(Date dateTime) { this.dateTime = dateTime; - }/** + } + +/** **/ public MixedPropertiesAndAdditionalPropertiesClass map(Map map) { this.map = map; @@ -82,6 +86,23 @@ import com.fasterxml.jackson.annotation.JsonValue; this.map = map; } + public MixedPropertiesAndAdditionalPropertiesClass putMapItem(String key, Animal mapItem) { + if (this.map == null) { + this.map = new HashMap(); + } + + this.map.put(key, mapItem); + return this; + } + + public MixedPropertiesAndAdditionalPropertiesClass removeMapItem(Animal mapItem) { + if (mapItem != null && this.map != null) { + this.map.remove(mapItem); + } + + return this; + } + @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Model200Response.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Model200Response.java index 3a8a04baa8f..d96df1aceae 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Model200Response.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Model200Response.java @@ -39,7 +39,9 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setName(Integer name) { this.name = name; - }/** + } + +/** **/ public Model200Response propertyClass(String propertyClass) { this.propertyClass = propertyClass; @@ -59,6 +61,7 @@ import com.fasterxml.jackson.annotation.JsonValue; this.propertyClass = propertyClass; } + @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/ModelApiResponse.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/ModelApiResponse.java index f382361e58c..952439560b5 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/ModelApiResponse.java @@ -38,7 +38,9 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setCode(Integer code) { this.code = code; - }/** + } + +/** **/ public ModelApiResponse type(String type) { this.type = type; @@ -56,7 +58,9 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setType(String type) { this.type = type; - }/** + } + +/** **/ public ModelApiResponse message(String message) { this.message = message; @@ -76,6 +80,7 @@ import com.fasterxml.jackson.annotation.JsonValue; this.message = message; } + @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/ModelReturn.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/ModelReturn.java index 30180e1f251..6d6cb5b806f 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/ModelReturn.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/ModelReturn.java @@ -40,6 +40,7 @@ import com.fasterxml.jackson.annotation.JsonValue; this._return = _return; } + @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Name.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Name.java index 199e9772bf0..6fd504dbe9d 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Name.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Name.java @@ -42,7 +42,9 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setName(Integer name) { this.name = name; - }/** + } + +/** **/ public Name snakeCase(Integer snakeCase) { this.snakeCase = snakeCase; @@ -60,7 +62,9 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setSnakeCase(Integer snakeCase) { this.snakeCase = snakeCase; - }/** + } + +/** **/ public Name property(String property) { this.property = property; @@ -78,7 +82,9 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setProperty(String property) { this.property = property; - }/** + } + +/** **/ public Name _123number(Integer _123number) { this._123number = _123number; @@ -98,6 +104,7 @@ import com.fasterxml.jackson.annotation.JsonValue; this._123number = _123number; } + @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/NumberOnly.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/NumberOnly.java index 6e62b0792c7..07a70cd9da5 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/NumberOnly.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/NumberOnly.java @@ -39,6 +39,7 @@ import com.fasterxml.jackson.annotation.JsonValue; this.justNumber = justNumber; } + @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Order.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Order.java index 6a877eda5db..9929a0d5043 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Order.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Order.java @@ -75,7 +75,9 @@ public enum StatusEnum { public void setId(Long id) { this.id = id; - }/** + } + +/** **/ public Order petId(Long petId) { this.petId = petId; @@ -93,7 +95,9 @@ public enum StatusEnum { public void setPetId(Long petId) { this.petId = petId; - }/** + } + +/** **/ public Order quantity(Integer quantity) { this.quantity = quantity; @@ -111,7 +115,9 @@ public enum StatusEnum { public void setQuantity(Integer quantity) { this.quantity = quantity; - }/** + } + +/** **/ public Order shipDate(Date shipDate) { this.shipDate = shipDate; @@ -129,7 +135,9 @@ public enum StatusEnum { public void setShipDate(Date shipDate) { this.shipDate = shipDate; - }/** + } + +/** * Order Status **/ public Order status(StatusEnum status) { @@ -148,7 +156,9 @@ public enum StatusEnum { public void setStatus(StatusEnum status) { this.status = status; - }/** + } + +/** **/ public Order complete(Boolean complete) { this.complete = complete; @@ -168,6 +178,7 @@ public enum StatusEnum { this.complete = complete; } + @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/OuterComposite.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/OuterComposite.java index 118a92239cb..6e34a0e0a80 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/OuterComposite.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/OuterComposite.java @@ -39,7 +39,9 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setMyNumber(BigDecimal myNumber) { this.myNumber = myNumber; - }/** + } + +/** **/ public OuterComposite myString(String myString) { this.myString = myString; @@ -57,7 +59,9 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setMyString(String myString) { this.myString = myString; - }/** + } + +/** **/ public OuterComposite myBoolean(Boolean myBoolean) { this.myBoolean = myBoolean; @@ -77,6 +81,7 @@ import com.fasterxml.jackson.annotation.JsonValue; this.myBoolean = myBoolean; } + @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Pet.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Pet.java index c0e131f545d..b009a3df92b 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Pet.java @@ -80,7 +80,9 @@ public enum StatusEnum { public void setId(Long id) { this.id = id; - }/** + } + +/** **/ public Pet category(Category category) { this.category = category; @@ -98,7 +100,9 @@ public enum StatusEnum { public void setCategory(Category category) { this.category = category; - }/** + } + +/** **/ public Pet name(String name) { this.name = name; @@ -117,7 +121,9 @@ public enum StatusEnum { public void setName(String name) { this.name = name; - }/** + } + +/** **/ public Pet photoUrls(Set photoUrls) { this.photoUrls = photoUrls; @@ -136,7 +142,25 @@ public enum StatusEnum { public void setPhotoUrls(Set photoUrls) { this.photoUrls = photoUrls; - }/** + } + + public Pet addPhotoUrlsItem(String photoUrlsItem) { + if (this.photoUrls == null) { + this.photoUrls = new LinkedHashSet(); + } + + this.photoUrls.add(photoUrlsItem); + return this; + } + + public Pet removePhotoUrlsItem(String photoUrlsItem) { + if (photoUrlsItem != null && this.photoUrls != null) { + this.photoUrls.remove(photoUrlsItem); + } + + return this; + } +/** **/ public Pet tags(List tags) { this.tags = tags; @@ -154,7 +178,25 @@ public enum StatusEnum { public void setTags(List tags) { this.tags = tags; - }/** + } + + public Pet addTagsItem(Tag tagsItem) { + if (this.tags == null) { + this.tags = new ArrayList(); + } + + this.tags.add(tagsItem); + return this; + } + + public Pet removeTagsItem(Tag tagsItem) { + if (tagsItem != null && this.tags != null) { + this.tags.remove(tagsItem); + } + + return this; + } +/** * pet status in the store **/ public Pet status(StatusEnum status) { @@ -175,6 +217,7 @@ public enum StatusEnum { this.status = status; } + @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/ReadOnlyFirst.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/ReadOnlyFirst.java index 8ab6292e7f6..72efcebf52c 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/ReadOnlyFirst.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/ReadOnlyFirst.java @@ -37,7 +37,9 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setBar(String bar) { this.bar = bar; - }/** + } + +/** **/ public ReadOnlyFirst baz(String baz) { this.baz = baz; @@ -57,6 +59,7 @@ import com.fasterxml.jackson.annotation.JsonValue; this.baz = baz; } + @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/SpecialModelName.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/SpecialModelName.java index 61f7ae1e722..ece6b68dc3a 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/SpecialModelName.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/SpecialModelName.java @@ -38,6 +38,7 @@ import com.fasterxml.jackson.annotation.JsonValue; this.$specialPropertyName = $specialPropertyName; } + @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Tag.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Tag.java index 5f855730981..1c7c5198894 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Tag.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Tag.java @@ -37,7 +37,9 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setId(Long id) { this.id = id; - }/** + } + +/** **/ public Tag name(String name) { this.name = name; @@ -57,6 +59,7 @@ import com.fasterxml.jackson.annotation.JsonValue; this.name = name; } + @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/TypeHolderDefault.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/TypeHolderDefault.java index 8ad93d7553d..07a1d5d87e9 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/TypeHolderDefault.java @@ -44,7 +44,9 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setStringItem(String stringItem) { this.stringItem = stringItem; - }/** + } + +/** **/ public TypeHolderDefault numberItem(BigDecimal numberItem) { this.numberItem = numberItem; @@ -63,7 +65,9 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setNumberItem(BigDecimal numberItem) { this.numberItem = numberItem; - }/** + } + +/** **/ public TypeHolderDefault integerItem(Integer integerItem) { this.integerItem = integerItem; @@ -82,7 +86,9 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setIntegerItem(Integer integerItem) { this.integerItem = integerItem; - }/** + } + +/** **/ public TypeHolderDefault boolItem(Boolean boolItem) { this.boolItem = boolItem; @@ -101,7 +107,9 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setBoolItem(Boolean boolItem) { this.boolItem = boolItem; - }/** + } + +/** **/ public TypeHolderDefault arrayItem(List arrayItem) { this.arrayItem = arrayItem; @@ -122,6 +130,23 @@ import com.fasterxml.jackson.annotation.JsonValue; this.arrayItem = arrayItem; } + public TypeHolderDefault addArrayItemItem(Integer arrayItemItem) { + if (this.arrayItem == null) { + this.arrayItem = new ArrayList(); + } + + this.arrayItem.add(arrayItemItem); + return this; + } + + public TypeHolderDefault removeArrayItemItem(Integer arrayItemItem) { + if (arrayItemItem != null && this.arrayItem != null) { + this.arrayItem.remove(arrayItemItem); + } + + return this; + } + @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/TypeHolderExample.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/TypeHolderExample.java index fe7be2d28e3..38951dee343 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/TypeHolderExample.java @@ -45,7 +45,9 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setStringItem(String stringItem) { this.stringItem = stringItem; - }/** + } + +/** **/ public TypeHolderExample numberItem(BigDecimal numberItem) { this.numberItem = numberItem; @@ -64,7 +66,9 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setNumberItem(BigDecimal numberItem) { this.numberItem = numberItem; - }/** + } + +/** **/ public TypeHolderExample floatItem(Float floatItem) { this.floatItem = floatItem; @@ -83,7 +87,9 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setFloatItem(Float floatItem) { this.floatItem = floatItem; - }/** + } + +/** **/ public TypeHolderExample integerItem(Integer integerItem) { this.integerItem = integerItem; @@ -102,7 +108,9 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setIntegerItem(Integer integerItem) { this.integerItem = integerItem; - }/** + } + +/** **/ public TypeHolderExample boolItem(Boolean boolItem) { this.boolItem = boolItem; @@ -121,7 +129,9 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setBoolItem(Boolean boolItem) { this.boolItem = boolItem; - }/** + } + +/** **/ public TypeHolderExample arrayItem(List arrayItem) { this.arrayItem = arrayItem; @@ -142,6 +152,23 @@ import com.fasterxml.jackson.annotation.JsonValue; this.arrayItem = arrayItem; } + public TypeHolderExample addArrayItemItem(Integer arrayItemItem) { + if (this.arrayItem == null) { + this.arrayItem = new ArrayList(); + } + + this.arrayItem.add(arrayItemItem); + return this; + } + + public TypeHolderExample removeArrayItemItem(Integer arrayItemItem) { + if (arrayItemItem != null && this.arrayItem != null) { + this.arrayItem.remove(arrayItemItem); + } + + return this; + } + @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/User.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/User.java index 6e82dd75fed..ad16074f63b 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/User.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/User.java @@ -43,7 +43,9 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setId(Long id) { this.id = id; - }/** + } + +/** **/ public User username(String username) { this.username = username; @@ -61,7 +63,9 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setUsername(String username) { this.username = username; - }/** + } + +/** **/ public User firstName(String firstName) { this.firstName = firstName; @@ -79,7 +83,9 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setFirstName(String firstName) { this.firstName = firstName; - }/** + } + +/** **/ public User lastName(String lastName) { this.lastName = lastName; @@ -97,7 +103,9 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setLastName(String lastName) { this.lastName = lastName; - }/** + } + +/** **/ public User email(String email) { this.email = email; @@ -115,7 +123,9 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setEmail(String email) { this.email = email; - }/** + } + +/** **/ public User password(String password) { this.password = password; @@ -133,7 +143,9 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setPassword(String password) { this.password = password; - }/** + } + +/** **/ public User phone(String phone) { this.phone = phone; @@ -151,7 +163,9 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setPhone(String phone) { this.phone = phone; - }/** + } + +/** * User Status **/ public User userStatus(Integer userStatus) { @@ -172,6 +186,7 @@ import com.fasterxml.jackson.annotation.JsonValue; this.userStatus = userStatus; } + @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/XmlItem.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/XmlItem.java index 596002cf3a0..b45dded1558 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/XmlItem.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/XmlItem.java @@ -67,7 +67,9 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setAttributeString(String attributeString) { this.attributeString = attributeString; - }/** + } + +/** **/ public XmlItem attributeNumber(BigDecimal attributeNumber) { this.attributeNumber = attributeNumber; @@ -85,7 +87,9 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setAttributeNumber(BigDecimal attributeNumber) { this.attributeNumber = attributeNumber; - }/** + } + +/** **/ public XmlItem attributeInteger(Integer attributeInteger) { this.attributeInteger = attributeInteger; @@ -103,7 +107,9 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setAttributeInteger(Integer attributeInteger) { this.attributeInteger = attributeInteger; - }/** + } + +/** **/ public XmlItem attributeBoolean(Boolean attributeBoolean) { this.attributeBoolean = attributeBoolean; @@ -121,7 +127,9 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setAttributeBoolean(Boolean attributeBoolean) { this.attributeBoolean = attributeBoolean; - }/** + } + +/** **/ public XmlItem wrappedArray(List wrappedArray) { this.wrappedArray = wrappedArray; @@ -139,7 +147,25 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setWrappedArray(List wrappedArray) { this.wrappedArray = wrappedArray; - }/** + } + + public XmlItem addWrappedArrayItem(Integer wrappedArrayItem) { + if (this.wrappedArray == null) { + this.wrappedArray = new ArrayList(); + } + + this.wrappedArray.add(wrappedArrayItem); + return this; + } + + public XmlItem removeWrappedArrayItem(Integer wrappedArrayItem) { + if (wrappedArrayItem != null && this.wrappedArray != null) { + this.wrappedArray.remove(wrappedArrayItem); + } + + return this; + } +/** **/ public XmlItem nameString(String nameString) { this.nameString = nameString; @@ -157,7 +183,9 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setNameString(String nameString) { this.nameString = nameString; - }/** + } + +/** **/ public XmlItem nameNumber(BigDecimal nameNumber) { this.nameNumber = nameNumber; @@ -175,7 +203,9 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setNameNumber(BigDecimal nameNumber) { this.nameNumber = nameNumber; - }/** + } + +/** **/ public XmlItem nameInteger(Integer nameInteger) { this.nameInteger = nameInteger; @@ -193,7 +223,9 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setNameInteger(Integer nameInteger) { this.nameInteger = nameInteger; - }/** + } + +/** **/ public XmlItem nameBoolean(Boolean nameBoolean) { this.nameBoolean = nameBoolean; @@ -211,7 +243,9 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setNameBoolean(Boolean nameBoolean) { this.nameBoolean = nameBoolean; - }/** + } + +/** **/ public XmlItem nameArray(List nameArray) { this.nameArray = nameArray; @@ -229,7 +263,25 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setNameArray(List nameArray) { this.nameArray = nameArray; - }/** + } + + public XmlItem addNameArrayItem(Integer nameArrayItem) { + if (this.nameArray == null) { + this.nameArray = new ArrayList(); + } + + this.nameArray.add(nameArrayItem); + return this; + } + + public XmlItem removeNameArrayItem(Integer nameArrayItem) { + if (nameArrayItem != null && this.nameArray != null) { + this.nameArray.remove(nameArrayItem); + } + + return this; + } +/** **/ public XmlItem nameWrappedArray(List nameWrappedArray) { this.nameWrappedArray = nameWrappedArray; @@ -247,7 +299,25 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setNameWrappedArray(List nameWrappedArray) { this.nameWrappedArray = nameWrappedArray; - }/** + } + + public XmlItem addNameWrappedArrayItem(Integer nameWrappedArrayItem) { + if (this.nameWrappedArray == null) { + this.nameWrappedArray = new ArrayList(); + } + + this.nameWrappedArray.add(nameWrappedArrayItem); + return this; + } + + public XmlItem removeNameWrappedArrayItem(Integer nameWrappedArrayItem) { + if (nameWrappedArrayItem != null && this.nameWrappedArray != null) { + this.nameWrappedArray.remove(nameWrappedArrayItem); + } + + return this; + } +/** **/ public XmlItem prefixString(String prefixString) { this.prefixString = prefixString; @@ -265,7 +335,9 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setPrefixString(String prefixString) { this.prefixString = prefixString; - }/** + } + +/** **/ public XmlItem prefixNumber(BigDecimal prefixNumber) { this.prefixNumber = prefixNumber; @@ -283,7 +355,9 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setPrefixNumber(BigDecimal prefixNumber) { this.prefixNumber = prefixNumber; - }/** + } + +/** **/ public XmlItem prefixInteger(Integer prefixInteger) { this.prefixInteger = prefixInteger; @@ -301,7 +375,9 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setPrefixInteger(Integer prefixInteger) { this.prefixInteger = prefixInteger; - }/** + } + +/** **/ public XmlItem prefixBoolean(Boolean prefixBoolean) { this.prefixBoolean = prefixBoolean; @@ -319,7 +395,9 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setPrefixBoolean(Boolean prefixBoolean) { this.prefixBoolean = prefixBoolean; - }/** + } + +/** **/ public XmlItem prefixArray(List prefixArray) { this.prefixArray = prefixArray; @@ -337,7 +415,25 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setPrefixArray(List prefixArray) { this.prefixArray = prefixArray; - }/** + } + + public XmlItem addPrefixArrayItem(Integer prefixArrayItem) { + if (this.prefixArray == null) { + this.prefixArray = new ArrayList(); + } + + this.prefixArray.add(prefixArrayItem); + return this; + } + + public XmlItem removePrefixArrayItem(Integer prefixArrayItem) { + if (prefixArrayItem != null && this.prefixArray != null) { + this.prefixArray.remove(prefixArrayItem); + } + + return this; + } +/** **/ public XmlItem prefixWrappedArray(List prefixWrappedArray) { this.prefixWrappedArray = prefixWrappedArray; @@ -355,7 +451,25 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setPrefixWrappedArray(List prefixWrappedArray) { this.prefixWrappedArray = prefixWrappedArray; - }/** + } + + public XmlItem addPrefixWrappedArrayItem(Integer prefixWrappedArrayItem) { + if (this.prefixWrappedArray == null) { + this.prefixWrappedArray = new ArrayList(); + } + + this.prefixWrappedArray.add(prefixWrappedArrayItem); + return this; + } + + public XmlItem removePrefixWrappedArrayItem(Integer prefixWrappedArrayItem) { + if (prefixWrappedArrayItem != null && this.prefixWrappedArray != null) { + this.prefixWrappedArray.remove(prefixWrappedArrayItem); + } + + return this; + } +/** **/ public XmlItem namespaceString(String namespaceString) { this.namespaceString = namespaceString; @@ -373,7 +487,9 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setNamespaceString(String namespaceString) { this.namespaceString = namespaceString; - }/** + } + +/** **/ public XmlItem namespaceNumber(BigDecimal namespaceNumber) { this.namespaceNumber = namespaceNumber; @@ -391,7 +507,9 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setNamespaceNumber(BigDecimal namespaceNumber) { this.namespaceNumber = namespaceNumber; - }/** + } + +/** **/ public XmlItem namespaceInteger(Integer namespaceInteger) { this.namespaceInteger = namespaceInteger; @@ -409,7 +527,9 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setNamespaceInteger(Integer namespaceInteger) { this.namespaceInteger = namespaceInteger; - }/** + } + +/** **/ public XmlItem namespaceBoolean(Boolean namespaceBoolean) { this.namespaceBoolean = namespaceBoolean; @@ -427,7 +547,9 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setNamespaceBoolean(Boolean namespaceBoolean) { this.namespaceBoolean = namespaceBoolean; - }/** + } + +/** **/ public XmlItem namespaceArray(List namespaceArray) { this.namespaceArray = namespaceArray; @@ -445,7 +567,25 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setNamespaceArray(List namespaceArray) { this.namespaceArray = namespaceArray; - }/** + } + + public XmlItem addNamespaceArrayItem(Integer namespaceArrayItem) { + if (this.namespaceArray == null) { + this.namespaceArray = new ArrayList(); + } + + this.namespaceArray.add(namespaceArrayItem); + return this; + } + + public XmlItem removeNamespaceArrayItem(Integer namespaceArrayItem) { + if (namespaceArrayItem != null && this.namespaceArray != null) { + this.namespaceArray.remove(namespaceArrayItem); + } + + return this; + } +/** **/ public XmlItem namespaceWrappedArray(List namespaceWrappedArray) { this.namespaceWrappedArray = namespaceWrappedArray; @@ -463,7 +603,25 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setNamespaceWrappedArray(List namespaceWrappedArray) { this.namespaceWrappedArray = namespaceWrappedArray; - }/** + } + + public XmlItem addNamespaceWrappedArrayItem(Integer namespaceWrappedArrayItem) { + if (this.namespaceWrappedArray == null) { + this.namespaceWrappedArray = new ArrayList(); + } + + this.namespaceWrappedArray.add(namespaceWrappedArrayItem); + return this; + } + + public XmlItem removeNamespaceWrappedArrayItem(Integer namespaceWrappedArrayItem) { + if (namespaceWrappedArrayItem != null && this.namespaceWrappedArray != null) { + this.namespaceWrappedArray.remove(namespaceWrappedArrayItem); + } + + return this; + } +/** **/ public XmlItem prefixNsString(String prefixNsString) { this.prefixNsString = prefixNsString; @@ -481,7 +639,9 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setPrefixNsString(String prefixNsString) { this.prefixNsString = prefixNsString; - }/** + } + +/** **/ public XmlItem prefixNsNumber(BigDecimal prefixNsNumber) { this.prefixNsNumber = prefixNsNumber; @@ -499,7 +659,9 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setPrefixNsNumber(BigDecimal prefixNsNumber) { this.prefixNsNumber = prefixNsNumber; - }/** + } + +/** **/ public XmlItem prefixNsInteger(Integer prefixNsInteger) { this.prefixNsInteger = prefixNsInteger; @@ -517,7 +679,9 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setPrefixNsInteger(Integer prefixNsInteger) { this.prefixNsInteger = prefixNsInteger; - }/** + } + +/** **/ public XmlItem prefixNsBoolean(Boolean prefixNsBoolean) { this.prefixNsBoolean = prefixNsBoolean; @@ -535,7 +699,9 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setPrefixNsBoolean(Boolean prefixNsBoolean) { this.prefixNsBoolean = prefixNsBoolean; - }/** + } + +/** **/ public XmlItem prefixNsArray(List prefixNsArray) { this.prefixNsArray = prefixNsArray; @@ -553,7 +719,25 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setPrefixNsArray(List prefixNsArray) { this.prefixNsArray = prefixNsArray; - }/** + } + + public XmlItem addPrefixNsArrayItem(Integer prefixNsArrayItem) { + if (this.prefixNsArray == null) { + this.prefixNsArray = new ArrayList(); + } + + this.prefixNsArray.add(prefixNsArrayItem); + return this; + } + + public XmlItem removePrefixNsArrayItem(Integer prefixNsArrayItem) { + if (prefixNsArrayItem != null && this.prefixNsArray != null) { + this.prefixNsArray.remove(prefixNsArrayItem); + } + + return this; + } +/** **/ public XmlItem prefixNsWrappedArray(List prefixNsWrappedArray) { this.prefixNsWrappedArray = prefixNsWrappedArray; @@ -573,6 +757,23 @@ import com.fasterxml.jackson.annotation.JsonValue; this.prefixNsWrappedArray = prefixNsWrappedArray; } + public XmlItem addPrefixNsWrappedArrayItem(Integer prefixNsWrappedArrayItem) { + if (this.prefixNsWrappedArray == null) { + this.prefixNsWrappedArray = new ArrayList(); + } + + this.prefixNsWrappedArray.add(prefixNsWrappedArrayItem); + return this; + } + + public XmlItem removePrefixNsWrappedArrayItem(Integer prefixNsWrappedArrayItem) { + if (prefixNsWrappedArrayItem != null && this.prefixNsWrappedArray != null) { + this.prefixNsWrappedArray.remove(prefixNsWrappedArrayItem); + } + + return this; + } + @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/api/FakeClassnameTags123Api.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/api/FakeClassnameTags123Api.java deleted file mode 100644 index 85ee119616a..00000000000 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/api/FakeClassnameTags123Api.java +++ /dev/null @@ -1,32 +0,0 @@ -package org.openapitools.api; - -import org.openapitools.model.Client; - -import javax.ws.rs.*; -import javax.ws.rs.core.Response; - -import io.swagger.annotations.*; - -import java.io.InputStream; -import java.util.Map; -import java.util.List; -import javax.validation.constraints.*; -import javax.validation.Valid; - -@Path("/FakeClassnameTags123") -@Api(description = "the FakeClassnameTags123 API") -public class FakeClassnameTags123Api { - - @PATCH - @Consumes({ "application/json" }) - @Produces({ "application/json" }) - @ApiOperation(value = "To test class name in snake case", notes = "To test class name in snake case", response = Client.class, authorizations = { - @Authorization(value = "api_key_query") - }, tags={ "fake_classname_tags 123#$%^" }) - @ApiResponses(value = { - @ApiResponse(code = 200, message = "successful operation", response = Client.class) - }) - public Response testClassname(@Valid Client body) { - return Response.ok().entity("magic!").build(); - } -} diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/AdditionalPropertiesAnyType.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/AdditionalPropertiesAnyType.java index f2521988441..6b9dcfa1ac6 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/AdditionalPropertiesAnyType.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/AdditionalPropertiesAnyType.java @@ -40,6 +40,7 @@ import com.fasterxml.jackson.annotation.JsonValue; this.name = name; } + @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/AdditionalPropertiesArray.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/AdditionalPropertiesArray.java index 7cc3e609972..1b504c15f4e 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/AdditionalPropertiesArray.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/AdditionalPropertiesArray.java @@ -41,6 +41,7 @@ import com.fasterxml.jackson.annotation.JsonValue; this.name = name; } + @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/AdditionalPropertiesBoolean.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/AdditionalPropertiesBoolean.java index 172c5f42dad..d842728a186 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/AdditionalPropertiesBoolean.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/AdditionalPropertiesBoolean.java @@ -40,6 +40,7 @@ import com.fasterxml.jackson.annotation.JsonValue; this.name = name; } + @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/AdditionalPropertiesClass.java index b646cfb0b0d..e745b6846af 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -50,7 +50,25 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setMapString(Map mapString) { this.mapString = mapString; - }/** + } + + public AdditionalPropertiesClass putMapStringItem(String key, String mapStringItem) { + if (this.mapString == null) { + this.mapString = new HashMap(); + } + + this.mapString.put(key, mapStringItem); + return this; + } + + public AdditionalPropertiesClass removeMapStringItem(String mapStringItem) { + if (mapStringItem != null && this.mapString != null) { + this.mapString.remove(mapStringItem); + } + + return this; + } +/** **/ public AdditionalPropertiesClass mapNumber(Map mapNumber) { this.mapNumber = mapNumber; @@ -68,7 +86,25 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setMapNumber(Map mapNumber) { this.mapNumber = mapNumber; - }/** + } + + public AdditionalPropertiesClass putMapNumberItem(String key, BigDecimal mapNumberItem) { + if (this.mapNumber == null) { + this.mapNumber = new HashMap(); + } + + this.mapNumber.put(key, mapNumberItem); + return this; + } + + public AdditionalPropertiesClass removeMapNumberItem(BigDecimal mapNumberItem) { + if (mapNumberItem != null && this.mapNumber != null) { + this.mapNumber.remove(mapNumberItem); + } + + return this; + } +/** **/ public AdditionalPropertiesClass mapInteger(Map mapInteger) { this.mapInteger = mapInteger; @@ -86,7 +122,25 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setMapInteger(Map mapInteger) { this.mapInteger = mapInteger; - }/** + } + + public AdditionalPropertiesClass putMapIntegerItem(String key, Integer mapIntegerItem) { + if (this.mapInteger == null) { + this.mapInteger = new HashMap(); + } + + this.mapInteger.put(key, mapIntegerItem); + return this; + } + + public AdditionalPropertiesClass removeMapIntegerItem(Integer mapIntegerItem) { + if (mapIntegerItem != null && this.mapInteger != null) { + this.mapInteger.remove(mapIntegerItem); + } + + return this; + } +/** **/ public AdditionalPropertiesClass mapBoolean(Map mapBoolean) { this.mapBoolean = mapBoolean; @@ -104,7 +158,25 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setMapBoolean(Map mapBoolean) { this.mapBoolean = mapBoolean; - }/** + } + + public AdditionalPropertiesClass putMapBooleanItem(String key, Boolean mapBooleanItem) { + if (this.mapBoolean == null) { + this.mapBoolean = new HashMap(); + } + + this.mapBoolean.put(key, mapBooleanItem); + return this; + } + + public AdditionalPropertiesClass removeMapBooleanItem(Boolean mapBooleanItem) { + if (mapBooleanItem != null && this.mapBoolean != null) { + this.mapBoolean.remove(mapBooleanItem); + } + + return this; + } +/** **/ public AdditionalPropertiesClass mapArrayInteger(Map> mapArrayInteger) { this.mapArrayInteger = mapArrayInteger; @@ -122,7 +194,25 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setMapArrayInteger(Map> mapArrayInteger) { this.mapArrayInteger = mapArrayInteger; - }/** + } + + public AdditionalPropertiesClass putMapArrayIntegerItem(String key, List mapArrayIntegerItem) { + if (this.mapArrayInteger == null) { + this.mapArrayInteger = new HashMap>(); + } + + this.mapArrayInteger.put(key, mapArrayIntegerItem); + return this; + } + + public AdditionalPropertiesClass removeMapArrayIntegerItem(List mapArrayIntegerItem) { + if (mapArrayIntegerItem != null && this.mapArrayInteger != null) { + this.mapArrayInteger.remove(mapArrayIntegerItem); + } + + return this; + } +/** **/ public AdditionalPropertiesClass mapArrayAnytype(Map> mapArrayAnytype) { this.mapArrayAnytype = mapArrayAnytype; @@ -140,7 +230,25 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setMapArrayAnytype(Map> mapArrayAnytype) { this.mapArrayAnytype = mapArrayAnytype; - }/** + } + + public AdditionalPropertiesClass putMapArrayAnytypeItem(String key, List mapArrayAnytypeItem) { + if (this.mapArrayAnytype == null) { + this.mapArrayAnytype = new HashMap>(); + } + + this.mapArrayAnytype.put(key, mapArrayAnytypeItem); + return this; + } + + public AdditionalPropertiesClass removeMapArrayAnytypeItem(List mapArrayAnytypeItem) { + if (mapArrayAnytypeItem != null && this.mapArrayAnytype != null) { + this.mapArrayAnytype.remove(mapArrayAnytypeItem); + } + + return this; + } +/** **/ public AdditionalPropertiesClass mapMapString(Map> mapMapString) { this.mapMapString = mapMapString; @@ -158,7 +266,25 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setMapMapString(Map> mapMapString) { this.mapMapString = mapMapString; - }/** + } + + public AdditionalPropertiesClass putMapMapStringItem(String key, Map mapMapStringItem) { + if (this.mapMapString == null) { + this.mapMapString = new HashMap>(); + } + + this.mapMapString.put(key, mapMapStringItem); + return this; + } + + public AdditionalPropertiesClass removeMapMapStringItem(Map mapMapStringItem) { + if (mapMapStringItem != null && this.mapMapString != null) { + this.mapMapString.remove(mapMapStringItem); + } + + return this; + } +/** **/ public AdditionalPropertiesClass mapMapAnytype(Map> mapMapAnytype) { this.mapMapAnytype = mapMapAnytype; @@ -176,7 +302,25 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setMapMapAnytype(Map> mapMapAnytype) { this.mapMapAnytype = mapMapAnytype; - }/** + } + + public AdditionalPropertiesClass putMapMapAnytypeItem(String key, Map mapMapAnytypeItem) { + if (this.mapMapAnytype == null) { + this.mapMapAnytype = new HashMap>(); + } + + this.mapMapAnytype.put(key, mapMapAnytypeItem); + return this; + } + + public AdditionalPropertiesClass removeMapMapAnytypeItem(Map mapMapAnytypeItem) { + if (mapMapAnytypeItem != null && this.mapMapAnytype != null) { + this.mapMapAnytype.remove(mapMapAnytypeItem); + } + + return this; + } +/** **/ public AdditionalPropertiesClass anytype1(Object anytype1) { this.anytype1 = anytype1; @@ -194,7 +338,9 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setAnytype1(Object anytype1) { this.anytype1 = anytype1; - }/** + } + +/** **/ public AdditionalPropertiesClass anytype2(Object anytype2) { this.anytype2 = anytype2; @@ -212,7 +358,9 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setAnytype2(Object anytype2) { this.anytype2 = anytype2; - }/** + } + +/** **/ public AdditionalPropertiesClass anytype3(Object anytype3) { this.anytype3 = anytype3; @@ -232,6 +380,7 @@ import com.fasterxml.jackson.annotation.JsonValue; this.anytype3 = anytype3; } + @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/AdditionalPropertiesInteger.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/AdditionalPropertiesInteger.java index 2c2e51fb83b..6f925720aba 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/AdditionalPropertiesInteger.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/AdditionalPropertiesInteger.java @@ -40,6 +40,7 @@ import com.fasterxml.jackson.annotation.JsonValue; this.name = name; } + @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/AdditionalPropertiesNumber.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/AdditionalPropertiesNumber.java index 4735b0fd5bd..884577dcdd0 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/AdditionalPropertiesNumber.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/AdditionalPropertiesNumber.java @@ -41,6 +41,7 @@ import com.fasterxml.jackson.annotation.JsonValue; this.name = name; } + @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/AdditionalPropertiesObject.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/AdditionalPropertiesObject.java index 05f7408f9a8..cbe4428f3e3 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/AdditionalPropertiesObject.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/AdditionalPropertiesObject.java @@ -40,6 +40,7 @@ import com.fasterxml.jackson.annotation.JsonValue; this.name = name; } + @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/AdditionalPropertiesString.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/AdditionalPropertiesString.java index 03739679cd0..16f6a60afd1 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/AdditionalPropertiesString.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/AdditionalPropertiesString.java @@ -40,6 +40,7 @@ import com.fasterxml.jackson.annotation.JsonValue; this.name = name; } + @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Animal.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Animal.java index 1f0f1e31647..8ddd9ed2f8c 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Animal.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Animal.java @@ -46,7 +46,9 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setClassName(String className) { this.className = className; - }/** + } + +/** **/ public Animal color(String color) { this.color = color; @@ -66,6 +68,7 @@ import com.fasterxml.jackson.annotation.JsonValue; this.color = color; } + @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/AnimalFarm.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/AnimalFarm.java deleted file mode 100644 index 810e56085b5..00000000000 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/AnimalFarm.java +++ /dev/null @@ -1,59 +0,0 @@ -package org.openapitools.model; - -import java.util.ArrayList; -import java.util.List; -import org.openapitools.model.Animal; -import java.io.Serializable; -import javax.validation.constraints.*; -import javax.validation.Valid; - -import io.swagger.annotations.*; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - - - -public class AnimalFarm extends ArrayList implements Serializable { - - - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AnimalFarm animalFarm = (AnimalFarm) o; - return true; - } - - @Override - public int hashCode() { - return Objects.hash(); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AnimalFarm {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java index 77a46a2186a..7460869a0d0 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java @@ -41,6 +41,23 @@ import com.fasterxml.jackson.annotation.JsonValue; this.arrayArrayNumber = arrayArrayNumber; } + public ArrayOfArrayOfNumberOnly addArrayArrayNumberItem(List arrayArrayNumberItem) { + if (this.arrayArrayNumber == null) { + this.arrayArrayNumber = new ArrayList>(); + } + + this.arrayArrayNumber.add(arrayArrayNumberItem); + return this; + } + + public ArrayOfArrayOfNumberOnly removeArrayArrayNumberItem(List arrayArrayNumberItem) { + if (arrayArrayNumberItem != null && this.arrayArrayNumber != null) { + this.arrayArrayNumber.remove(arrayArrayNumberItem); + } + + return this; + } + @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/ArrayOfNumberOnly.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/ArrayOfNumberOnly.java index 36039422cf3..2a02c2c74fa 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/ArrayOfNumberOnly.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/ArrayOfNumberOnly.java @@ -41,6 +41,23 @@ import com.fasterxml.jackson.annotation.JsonValue; this.arrayNumber = arrayNumber; } + public ArrayOfNumberOnly addArrayNumberItem(BigDecimal arrayNumberItem) { + if (this.arrayNumber == null) { + this.arrayNumber = new ArrayList(); + } + + this.arrayNumber.add(arrayNumberItem); + return this; + } + + public ArrayOfNumberOnly removeArrayNumberItem(BigDecimal arrayNumberItem) { + if (arrayNumberItem != null && this.arrayNumber != null) { + this.arrayNumber.remove(arrayNumberItem); + } + + return this; + } + @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/ArrayTest.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/ArrayTest.java index 374527d8ad5..f4c67f4dccb 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/ArrayTest.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/ArrayTest.java @@ -41,7 +41,25 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setArrayOfString(List arrayOfString) { this.arrayOfString = arrayOfString; - }/** + } + + public ArrayTest addArrayOfStringItem(String arrayOfStringItem) { + if (this.arrayOfString == null) { + this.arrayOfString = new ArrayList(); + } + + this.arrayOfString.add(arrayOfStringItem); + return this; + } + + public ArrayTest removeArrayOfStringItem(String arrayOfStringItem) { + if (arrayOfStringItem != null && this.arrayOfString != null) { + this.arrayOfString.remove(arrayOfStringItem); + } + + return this; + } +/** **/ public ArrayTest arrayArrayOfInteger(List> arrayArrayOfInteger) { this.arrayArrayOfInteger = arrayArrayOfInteger; @@ -59,7 +77,25 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setArrayArrayOfInteger(List> arrayArrayOfInteger) { this.arrayArrayOfInteger = arrayArrayOfInteger; - }/** + } + + public ArrayTest addArrayArrayOfIntegerItem(List arrayArrayOfIntegerItem) { + if (this.arrayArrayOfInteger == null) { + this.arrayArrayOfInteger = new ArrayList>(); + } + + this.arrayArrayOfInteger.add(arrayArrayOfIntegerItem); + return this; + } + + public ArrayTest removeArrayArrayOfIntegerItem(List arrayArrayOfIntegerItem) { + if (arrayArrayOfIntegerItem != null && this.arrayArrayOfInteger != null) { + this.arrayArrayOfInteger.remove(arrayArrayOfIntegerItem); + } + + return this; + } +/** **/ public ArrayTest arrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; @@ -79,6 +115,23 @@ import com.fasterxml.jackson.annotation.JsonValue; this.arrayArrayOfModel = arrayArrayOfModel; } + public ArrayTest addArrayArrayOfModelItem(List arrayArrayOfModelItem) { + if (this.arrayArrayOfModel == null) { + this.arrayArrayOfModel = new ArrayList>(); + } + + this.arrayArrayOfModel.add(arrayArrayOfModelItem); + return this; + } + + public ArrayTest removeArrayArrayOfModelItem(List arrayArrayOfModelItem) { + if (arrayArrayOfModelItem != null && this.arrayArrayOfModel != null) { + this.arrayArrayOfModel.remove(arrayArrayOfModelItem); + } + + return this; + } + @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/BigCat.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/BigCat.java index 33dff05e836..1a3ddba789b 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/BigCat.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/BigCat.java @@ -73,6 +73,7 @@ public enum KindEnum { this.kind = kind; } + @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/BigCatAllOf.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/BigCatAllOf.java index 0b5a153a074..080e86afaca 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/BigCatAllOf.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/BigCatAllOf.java @@ -71,6 +71,7 @@ public enum KindEnum { this.kind = kind; } + @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Capitalization.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Capitalization.java index 27f378125da..a65c79d984e 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Capitalization.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Capitalization.java @@ -41,7 +41,9 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setSmallCamel(String smallCamel) { this.smallCamel = smallCamel; - }/** + } + +/** **/ public Capitalization capitalCamel(String capitalCamel) { this.capitalCamel = capitalCamel; @@ -59,7 +61,9 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setCapitalCamel(String capitalCamel) { this.capitalCamel = capitalCamel; - }/** + } + +/** **/ public Capitalization smallSnake(String smallSnake) { this.smallSnake = smallSnake; @@ -77,7 +81,9 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setSmallSnake(String smallSnake) { this.smallSnake = smallSnake; - }/** + } + +/** **/ public Capitalization capitalSnake(String capitalSnake) { this.capitalSnake = capitalSnake; @@ -95,7 +101,9 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setCapitalSnake(String capitalSnake) { this.capitalSnake = capitalSnake; - }/** + } + +/** **/ public Capitalization scAETHFlowPoints(String scAETHFlowPoints) { this.scAETHFlowPoints = scAETHFlowPoints; @@ -113,7 +121,9 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setScAETHFlowPoints(String scAETHFlowPoints) { this.scAETHFlowPoints = scAETHFlowPoints; - }/** + } + +/** * Name of the pet **/ public Capitalization ATT_NAME(String ATT_NAME) { @@ -134,6 +144,7 @@ import com.fasterxml.jackson.annotation.JsonValue; this.ATT_NAME = ATT_NAME; } + @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Cat.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Cat.java index b0a2eacada2..4cc078e2235 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Cat.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Cat.java @@ -40,6 +40,7 @@ import com.fasterxml.jackson.annotation.JsonValue; this.declawed = declawed; } + @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/CatAllOf.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/CatAllOf.java index f405b41e872..e56df72d3be 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/CatAllOf.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/CatAllOf.java @@ -38,6 +38,7 @@ import com.fasterxml.jackson.annotation.JsonValue; this.declawed = declawed; } + @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Category.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Category.java index 32076613c9d..9af6f93c7c4 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Category.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Category.java @@ -37,7 +37,9 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setId(Long id) { this.id = id; - }/** + } + +/** **/ public Category name(String name) { this.name = name; @@ -58,6 +60,7 @@ import com.fasterxml.jackson.annotation.JsonValue; this.name = name; } + @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/ClassModel.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/ClassModel.java index e3153a9f03e..f050e12bb25 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/ClassModel.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/ClassModel.java @@ -40,6 +40,7 @@ import com.fasterxml.jackson.annotation.JsonValue; this.propertyClass = propertyClass; } + @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Client.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Client.java index 81a1033e052..4cdbbef940d 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Client.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Client.java @@ -38,6 +38,7 @@ import com.fasterxml.jackson.annotation.JsonValue; this.client = client; } + @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Dog.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Dog.java index 01e256a23d0..87c3a825ba8 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Dog.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Dog.java @@ -40,6 +40,7 @@ import com.fasterxml.jackson.annotation.JsonValue; this.breed = breed; } + @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/DogAllOf.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/DogAllOf.java index 3291b8f7c78..5496e3c8915 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/DogAllOf.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/DogAllOf.java @@ -38,6 +38,7 @@ import com.fasterxml.jackson.annotation.JsonValue; this.breed = breed; } + @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/EnumArrays.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/EnumArrays.java index c7ceed68c70..a033bca0071 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/EnumArrays.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/EnumArrays.java @@ -105,7 +105,9 @@ public enum ArrayEnumEnum { public void setJustSymbol(JustSymbolEnum justSymbol) { this.justSymbol = justSymbol; - }/** + } + +/** **/ public EnumArrays arrayEnum(List arrayEnum) { this.arrayEnum = arrayEnum; @@ -125,6 +127,23 @@ public enum ArrayEnumEnum { this.arrayEnum = arrayEnum; } + public EnumArrays addArrayEnumItem(ArrayEnumEnum arrayEnumItem) { + if (this.arrayEnum == null) { + this.arrayEnum = new ArrayList(); + } + + this.arrayEnum.add(arrayEnumItem); + return this; + } + + public EnumArrays removeArrayEnumItem(ArrayEnumEnum arrayEnumItem) { + if (arrayEnumItem != null && this.arrayEnum != null) { + this.arrayEnum.remove(arrayEnumItem); + } + + return this; + } + @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/EnumTest.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/EnumTest.java index d74cb2ff037..6c02f0647c9 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/EnumTest.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/EnumTest.java @@ -173,7 +173,9 @@ public enum EnumNumberEnum { public void setEnumString(EnumStringEnum enumString) { this.enumString = enumString; - }/** + } + +/** **/ public EnumTest enumStringRequired(EnumStringRequiredEnum enumStringRequired) { this.enumStringRequired = enumStringRequired; @@ -192,7 +194,9 @@ public enum EnumNumberEnum { public void setEnumStringRequired(EnumStringRequiredEnum enumStringRequired) { this.enumStringRequired = enumStringRequired; - }/** + } + +/** **/ public EnumTest enumInteger(EnumIntegerEnum enumInteger) { this.enumInteger = enumInteger; @@ -210,7 +214,9 @@ public enum EnumNumberEnum { public void setEnumInteger(EnumIntegerEnum enumInteger) { this.enumInteger = enumInteger; - }/** + } + +/** **/ public EnumTest enumNumber(EnumNumberEnum enumNumber) { this.enumNumber = enumNumber; @@ -228,7 +234,9 @@ public enum EnumNumberEnum { public void setEnumNumber(EnumNumberEnum enumNumber) { this.enumNumber = enumNumber; - }/** + } + +/** **/ public EnumTest outerEnum(OuterEnum outerEnum) { this.outerEnum = outerEnum; @@ -248,6 +256,7 @@ public enum EnumNumberEnum { this.outerEnum = outerEnum; } + @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/FileSchemaTestClass.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/FileSchemaTestClass.java index 8aa815da794..5ad48e02171 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/FileSchemaTestClass.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/FileSchemaTestClass.java @@ -39,7 +39,9 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setFile(java.io.File file) { this.file = file; - }/** + } + +/** **/ public FileSchemaTestClass files(List files) { this.files = files; @@ -59,6 +61,23 @@ import com.fasterxml.jackson.annotation.JsonValue; this.files = files; } + public FileSchemaTestClass addFilesItem(java.io.File filesItem) { + if (this.files == null) { + this.files = new ArrayList(); + } + + this.files.add(filesItem); + return this; + } + + public FileSchemaTestClass removeFilesItem(java.io.File filesItem) { + if (filesItem != null && this.files != null) { + this.files.remove(filesItem); + } + + return this; + } + @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/FormatTest.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/FormatTest.java index 70a7eed2fdd..ca11645f9ae 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/FormatTest.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/FormatTest.java @@ -56,7 +56,9 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setInteger(Integer integer) { this.integer = integer; - }/** + } + +/** * minimum: 20 * maximum: 200 **/ @@ -76,7 +78,9 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setInt32(Integer int32) { this.int32 = int32; - }/** + } + +/** **/ public FormatTest int64(Long int64) { this.int64 = int64; @@ -94,7 +98,9 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setInt64(Long int64) { this.int64 = int64; - }/** + } + +/** * minimum: 32.1 * maximum: 543.2 **/ @@ -115,7 +121,9 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setNumber(BigDecimal number) { this.number = number; - }/** + } + +/** * minimum: 54.3 * maximum: 987.6 **/ @@ -135,7 +143,9 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setFloat(Float _float) { this._float = _float; - }/** + } + +/** * minimum: 67.8 * maximum: 123.4 **/ @@ -155,7 +165,9 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setDouble(Double _double) { this._double = _double; - }/** + } + +/** **/ public FormatTest string(String string) { this.string = string; @@ -173,7 +185,9 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setString(String string) { this.string = string; - }/** + } + +/** **/ public FormatTest _byte(byte[] _byte) { this._byte = _byte; @@ -192,7 +206,9 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setByte(byte[] _byte) { this._byte = _byte; - }/** + } + +/** **/ public FormatTest binary(File binary) { this.binary = binary; @@ -210,7 +226,9 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setBinary(File binary) { this.binary = binary; - }/** + } + +/** **/ public FormatTest date(LocalDate date) { this.date = date; @@ -229,7 +247,9 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setDate(LocalDate date) { this.date = date; - }/** + } + +/** **/ public FormatTest dateTime(Date dateTime) { this.dateTime = dateTime; @@ -247,7 +267,9 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setDateTime(Date dateTime) { this.dateTime = dateTime; - }/** + } + +/** **/ public FormatTest uuid(UUID uuid) { this.uuid = uuid; @@ -265,7 +287,9 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setUuid(UUID uuid) { this.uuid = uuid; - }/** + } + +/** **/ public FormatTest password(String password) { this.password = password; @@ -284,7 +308,9 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setPassword(String password) { this.password = password; - }/** + } + +/** **/ public FormatTest bigDecimal(BigDecimal bigDecimal) { this.bigDecimal = bigDecimal; @@ -304,6 +330,7 @@ import com.fasterxml.jackson.annotation.JsonValue; this.bigDecimal = bigDecimal; } + @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/HasOnlyReadOnly.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/HasOnlyReadOnly.java index cebb1bb512b..6438846d569 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/HasOnlyReadOnly.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/HasOnlyReadOnly.java @@ -37,7 +37,9 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setBar(String bar) { this.bar = bar; - }/** + } + +/** **/ public HasOnlyReadOnly foo(String foo) { this.foo = foo; @@ -57,6 +59,7 @@ import com.fasterxml.jackson.annotation.JsonValue; this.foo = foo; } + @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/MapTest.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/MapTest.java index be225de067d..0462e9f525d 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/MapTest.java @@ -75,7 +75,25 @@ public enum InnerEnum { public void setMapMapOfString(Map> mapMapOfString) { this.mapMapOfString = mapMapOfString; - }/** + } + + public MapTest putMapMapOfStringItem(String key, Map mapMapOfStringItem) { + if (this.mapMapOfString == null) { + this.mapMapOfString = new HashMap>(); + } + + this.mapMapOfString.put(key, mapMapOfStringItem); + return this; + } + + public MapTest removeMapMapOfStringItem(Map mapMapOfStringItem) { + if (mapMapOfStringItem != null && this.mapMapOfString != null) { + this.mapMapOfString.remove(mapMapOfStringItem); + } + + return this; + } +/** **/ public MapTest mapOfEnumString(Map mapOfEnumString) { this.mapOfEnumString = mapOfEnumString; @@ -93,7 +111,25 @@ public enum InnerEnum { public void setMapOfEnumString(Map mapOfEnumString) { this.mapOfEnumString = mapOfEnumString; - }/** + } + + public MapTest putMapOfEnumStringItem(String key, InnerEnum mapOfEnumStringItem) { + if (this.mapOfEnumString == null) { + this.mapOfEnumString = new HashMap(); + } + + this.mapOfEnumString.put(key, mapOfEnumStringItem); + return this; + } + + public MapTest removeMapOfEnumStringItem(InnerEnum mapOfEnumStringItem) { + if (mapOfEnumStringItem != null && this.mapOfEnumString != null) { + this.mapOfEnumString.remove(mapOfEnumStringItem); + } + + return this; + } +/** **/ public MapTest directMap(Map directMap) { this.directMap = directMap; @@ -111,7 +147,25 @@ public enum InnerEnum { public void setDirectMap(Map directMap) { this.directMap = directMap; - }/** + } + + public MapTest putDirectMapItem(String key, Boolean directMapItem) { + if (this.directMap == null) { + this.directMap = new HashMap(); + } + + this.directMap.put(key, directMapItem); + return this; + } + + public MapTest removeDirectMapItem(Boolean directMapItem) { + if (directMapItem != null && this.directMap != null) { + this.directMap.remove(directMapItem); + } + + return this; + } +/** **/ public MapTest indirectMap(Map indirectMap) { this.indirectMap = indirectMap; @@ -131,6 +185,23 @@ public enum InnerEnum { this.indirectMap = indirectMap; } + public MapTest putIndirectMapItem(String key, Boolean indirectMapItem) { + if (this.indirectMap == null) { + this.indirectMap = new HashMap(); + } + + this.indirectMap.put(key, indirectMapItem); + return this; + } + + public MapTest removeIndirectMapItem(Boolean indirectMapItem) { + if (indirectMapItem != null && this.indirectMap != null) { + this.indirectMap.remove(indirectMapItem); + } + + return this; + } + @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java index 136a4fab119..344620b6850 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -44,7 +44,9 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setUuid(UUID uuid) { this.uuid = uuid; - }/** + } + +/** **/ public MixedPropertiesAndAdditionalPropertiesClass dateTime(Date dateTime) { this.dateTime = dateTime; @@ -62,7 +64,9 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setDateTime(Date dateTime) { this.dateTime = dateTime; - }/** + } + +/** **/ public MixedPropertiesAndAdditionalPropertiesClass map(Map map) { this.map = map; @@ -82,6 +86,23 @@ import com.fasterxml.jackson.annotation.JsonValue; this.map = map; } + public MixedPropertiesAndAdditionalPropertiesClass putMapItem(String key, Animal mapItem) { + if (this.map == null) { + this.map = new HashMap(); + } + + this.map.put(key, mapItem); + return this; + } + + public MixedPropertiesAndAdditionalPropertiesClass removeMapItem(Animal mapItem) { + if (mapItem != null && this.map != null) { + this.map.remove(mapItem); + } + + return this; + } + @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Model200Response.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Model200Response.java index 3a8a04baa8f..d96df1aceae 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Model200Response.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Model200Response.java @@ -39,7 +39,9 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setName(Integer name) { this.name = name; - }/** + } + +/** **/ public Model200Response propertyClass(String propertyClass) { this.propertyClass = propertyClass; @@ -59,6 +61,7 @@ import com.fasterxml.jackson.annotation.JsonValue; this.propertyClass = propertyClass; } + @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/ModelApiResponse.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/ModelApiResponse.java index f382361e58c..952439560b5 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/ModelApiResponse.java @@ -38,7 +38,9 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setCode(Integer code) { this.code = code; - }/** + } + +/** **/ public ModelApiResponse type(String type) { this.type = type; @@ -56,7 +58,9 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setType(String type) { this.type = type; - }/** + } + +/** **/ public ModelApiResponse message(String message) { this.message = message; @@ -76,6 +80,7 @@ import com.fasterxml.jackson.annotation.JsonValue; this.message = message; } + @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/ModelReturn.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/ModelReturn.java index 30180e1f251..6d6cb5b806f 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/ModelReturn.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/ModelReturn.java @@ -40,6 +40,7 @@ import com.fasterxml.jackson.annotation.JsonValue; this._return = _return; } + @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Name.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Name.java index 199e9772bf0..6fd504dbe9d 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Name.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Name.java @@ -42,7 +42,9 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setName(Integer name) { this.name = name; - }/** + } + +/** **/ public Name snakeCase(Integer snakeCase) { this.snakeCase = snakeCase; @@ -60,7 +62,9 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setSnakeCase(Integer snakeCase) { this.snakeCase = snakeCase; - }/** + } + +/** **/ public Name property(String property) { this.property = property; @@ -78,7 +82,9 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setProperty(String property) { this.property = property; - }/** + } + +/** **/ public Name _123number(Integer _123number) { this._123number = _123number; @@ -98,6 +104,7 @@ import com.fasterxml.jackson.annotation.JsonValue; this._123number = _123number; } + @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/NumberOnly.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/NumberOnly.java index 6e62b0792c7..07a70cd9da5 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/NumberOnly.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/NumberOnly.java @@ -39,6 +39,7 @@ import com.fasterxml.jackson.annotation.JsonValue; this.justNumber = justNumber; } + @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Order.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Order.java index 6a877eda5db..9929a0d5043 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Order.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Order.java @@ -75,7 +75,9 @@ public enum StatusEnum { public void setId(Long id) { this.id = id; - }/** + } + +/** **/ public Order petId(Long petId) { this.petId = petId; @@ -93,7 +95,9 @@ public enum StatusEnum { public void setPetId(Long petId) { this.petId = petId; - }/** + } + +/** **/ public Order quantity(Integer quantity) { this.quantity = quantity; @@ -111,7 +115,9 @@ public enum StatusEnum { public void setQuantity(Integer quantity) { this.quantity = quantity; - }/** + } + +/** **/ public Order shipDate(Date shipDate) { this.shipDate = shipDate; @@ -129,7 +135,9 @@ public enum StatusEnum { public void setShipDate(Date shipDate) { this.shipDate = shipDate; - }/** + } + +/** * Order Status **/ public Order status(StatusEnum status) { @@ -148,7 +156,9 @@ public enum StatusEnum { public void setStatus(StatusEnum status) { this.status = status; - }/** + } + +/** **/ public Order complete(Boolean complete) { this.complete = complete; @@ -168,6 +178,7 @@ public enum StatusEnum { this.complete = complete; } + @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/OuterComposite.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/OuterComposite.java index 118a92239cb..6e34a0e0a80 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/OuterComposite.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/OuterComposite.java @@ -39,7 +39,9 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setMyNumber(BigDecimal myNumber) { this.myNumber = myNumber; - }/** + } + +/** **/ public OuterComposite myString(String myString) { this.myString = myString; @@ -57,7 +59,9 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setMyString(String myString) { this.myString = myString; - }/** + } + +/** **/ public OuterComposite myBoolean(Boolean myBoolean) { this.myBoolean = myBoolean; @@ -77,6 +81,7 @@ import com.fasterxml.jackson.annotation.JsonValue; this.myBoolean = myBoolean; } + @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Pet.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Pet.java index c0e131f545d..b009a3df92b 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Pet.java @@ -80,7 +80,9 @@ public enum StatusEnum { public void setId(Long id) { this.id = id; - }/** + } + +/** **/ public Pet category(Category category) { this.category = category; @@ -98,7 +100,9 @@ public enum StatusEnum { public void setCategory(Category category) { this.category = category; - }/** + } + +/** **/ public Pet name(String name) { this.name = name; @@ -117,7 +121,9 @@ public enum StatusEnum { public void setName(String name) { this.name = name; - }/** + } + +/** **/ public Pet photoUrls(Set photoUrls) { this.photoUrls = photoUrls; @@ -136,7 +142,25 @@ public enum StatusEnum { public void setPhotoUrls(Set photoUrls) { this.photoUrls = photoUrls; - }/** + } + + public Pet addPhotoUrlsItem(String photoUrlsItem) { + if (this.photoUrls == null) { + this.photoUrls = new LinkedHashSet(); + } + + this.photoUrls.add(photoUrlsItem); + return this; + } + + public Pet removePhotoUrlsItem(String photoUrlsItem) { + if (photoUrlsItem != null && this.photoUrls != null) { + this.photoUrls.remove(photoUrlsItem); + } + + return this; + } +/** **/ public Pet tags(List tags) { this.tags = tags; @@ -154,7 +178,25 @@ public enum StatusEnum { public void setTags(List tags) { this.tags = tags; - }/** + } + + public Pet addTagsItem(Tag tagsItem) { + if (this.tags == null) { + this.tags = new ArrayList(); + } + + this.tags.add(tagsItem); + return this; + } + + public Pet removeTagsItem(Tag tagsItem) { + if (tagsItem != null && this.tags != null) { + this.tags.remove(tagsItem); + } + + return this; + } +/** * pet status in the store **/ public Pet status(StatusEnum status) { @@ -175,6 +217,7 @@ public enum StatusEnum { this.status = status; } + @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/ReadOnlyFirst.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/ReadOnlyFirst.java index 8ab6292e7f6..72efcebf52c 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/ReadOnlyFirst.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/ReadOnlyFirst.java @@ -37,7 +37,9 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setBar(String bar) { this.bar = bar; - }/** + } + +/** **/ public ReadOnlyFirst baz(String baz) { this.baz = baz; @@ -57,6 +59,7 @@ import com.fasterxml.jackson.annotation.JsonValue; this.baz = baz; } + @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/SpecialModelName.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/SpecialModelName.java index 61f7ae1e722..ece6b68dc3a 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/SpecialModelName.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/SpecialModelName.java @@ -38,6 +38,7 @@ import com.fasterxml.jackson.annotation.JsonValue; this.$specialPropertyName = $specialPropertyName; } + @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/StringBooleanMap.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/StringBooleanMap.java deleted file mode 100644 index e48ad0840ac..00000000000 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/StringBooleanMap.java +++ /dev/null @@ -1,58 +0,0 @@ -package org.openapitools.model; - -import java.util.HashMap; -import java.util.Map; -import java.io.Serializable; -import javax.validation.constraints.*; -import javax.validation.Valid; - -import io.swagger.annotations.*; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - - - -public class StringBooleanMap extends HashMap implements Serializable { - - - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - StringBooleanMap stringBooleanMap = (StringBooleanMap) o; - return true; - } - - @Override - public int hashCode() { - return Objects.hash(); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class StringBooleanMap {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Tag.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Tag.java index 5f855730981..1c7c5198894 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Tag.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Tag.java @@ -37,7 +37,9 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setId(Long id) { this.id = id; - }/** + } + +/** **/ public Tag name(String name) { this.name = name; @@ -57,6 +59,7 @@ import com.fasterxml.jackson.annotation.JsonValue; this.name = name; } + @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/TypeHolderDefault.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/TypeHolderDefault.java index 8ad93d7553d..07a1d5d87e9 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/TypeHolderDefault.java @@ -44,7 +44,9 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setStringItem(String stringItem) { this.stringItem = stringItem; - }/** + } + +/** **/ public TypeHolderDefault numberItem(BigDecimal numberItem) { this.numberItem = numberItem; @@ -63,7 +65,9 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setNumberItem(BigDecimal numberItem) { this.numberItem = numberItem; - }/** + } + +/** **/ public TypeHolderDefault integerItem(Integer integerItem) { this.integerItem = integerItem; @@ -82,7 +86,9 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setIntegerItem(Integer integerItem) { this.integerItem = integerItem; - }/** + } + +/** **/ public TypeHolderDefault boolItem(Boolean boolItem) { this.boolItem = boolItem; @@ -101,7 +107,9 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setBoolItem(Boolean boolItem) { this.boolItem = boolItem; - }/** + } + +/** **/ public TypeHolderDefault arrayItem(List arrayItem) { this.arrayItem = arrayItem; @@ -122,6 +130,23 @@ import com.fasterxml.jackson.annotation.JsonValue; this.arrayItem = arrayItem; } + public TypeHolderDefault addArrayItemItem(Integer arrayItemItem) { + if (this.arrayItem == null) { + this.arrayItem = new ArrayList(); + } + + this.arrayItem.add(arrayItemItem); + return this; + } + + public TypeHolderDefault removeArrayItemItem(Integer arrayItemItem) { + if (arrayItemItem != null && this.arrayItem != null) { + this.arrayItem.remove(arrayItemItem); + } + + return this; + } + @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/TypeHolderExample.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/TypeHolderExample.java index fe7be2d28e3..38951dee343 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/TypeHolderExample.java @@ -45,7 +45,9 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setStringItem(String stringItem) { this.stringItem = stringItem; - }/** + } + +/** **/ public TypeHolderExample numberItem(BigDecimal numberItem) { this.numberItem = numberItem; @@ -64,7 +66,9 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setNumberItem(BigDecimal numberItem) { this.numberItem = numberItem; - }/** + } + +/** **/ public TypeHolderExample floatItem(Float floatItem) { this.floatItem = floatItem; @@ -83,7 +87,9 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setFloatItem(Float floatItem) { this.floatItem = floatItem; - }/** + } + +/** **/ public TypeHolderExample integerItem(Integer integerItem) { this.integerItem = integerItem; @@ -102,7 +108,9 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setIntegerItem(Integer integerItem) { this.integerItem = integerItem; - }/** + } + +/** **/ public TypeHolderExample boolItem(Boolean boolItem) { this.boolItem = boolItem; @@ -121,7 +129,9 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setBoolItem(Boolean boolItem) { this.boolItem = boolItem; - }/** + } + +/** **/ public TypeHolderExample arrayItem(List arrayItem) { this.arrayItem = arrayItem; @@ -142,6 +152,23 @@ import com.fasterxml.jackson.annotation.JsonValue; this.arrayItem = arrayItem; } + public TypeHolderExample addArrayItemItem(Integer arrayItemItem) { + if (this.arrayItem == null) { + this.arrayItem = new ArrayList(); + } + + this.arrayItem.add(arrayItemItem); + return this; + } + + public TypeHolderExample removeArrayItemItem(Integer arrayItemItem) { + if (arrayItemItem != null && this.arrayItem != null) { + this.arrayItem.remove(arrayItemItem); + } + + return this; + } + @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/User.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/User.java index 6e82dd75fed..ad16074f63b 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/User.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/User.java @@ -43,7 +43,9 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setId(Long id) { this.id = id; - }/** + } + +/** **/ public User username(String username) { this.username = username; @@ -61,7 +63,9 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setUsername(String username) { this.username = username; - }/** + } + +/** **/ public User firstName(String firstName) { this.firstName = firstName; @@ -79,7 +83,9 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setFirstName(String firstName) { this.firstName = firstName; - }/** + } + +/** **/ public User lastName(String lastName) { this.lastName = lastName; @@ -97,7 +103,9 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setLastName(String lastName) { this.lastName = lastName; - }/** + } + +/** **/ public User email(String email) { this.email = email; @@ -115,7 +123,9 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setEmail(String email) { this.email = email; - }/** + } + +/** **/ public User password(String password) { this.password = password; @@ -133,7 +143,9 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setPassword(String password) { this.password = password; - }/** + } + +/** **/ public User phone(String phone) { this.phone = phone; @@ -151,7 +163,9 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setPhone(String phone) { this.phone = phone; - }/** + } + +/** * User Status **/ public User userStatus(Integer userStatus) { @@ -172,6 +186,7 @@ import com.fasterxml.jackson.annotation.JsonValue; this.userStatus = userStatus; } + @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/XmlItem.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/XmlItem.java index 596002cf3a0..b45dded1558 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/XmlItem.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/XmlItem.java @@ -67,7 +67,9 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setAttributeString(String attributeString) { this.attributeString = attributeString; - }/** + } + +/** **/ public XmlItem attributeNumber(BigDecimal attributeNumber) { this.attributeNumber = attributeNumber; @@ -85,7 +87,9 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setAttributeNumber(BigDecimal attributeNumber) { this.attributeNumber = attributeNumber; - }/** + } + +/** **/ public XmlItem attributeInteger(Integer attributeInteger) { this.attributeInteger = attributeInteger; @@ -103,7 +107,9 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setAttributeInteger(Integer attributeInteger) { this.attributeInteger = attributeInteger; - }/** + } + +/** **/ public XmlItem attributeBoolean(Boolean attributeBoolean) { this.attributeBoolean = attributeBoolean; @@ -121,7 +127,9 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setAttributeBoolean(Boolean attributeBoolean) { this.attributeBoolean = attributeBoolean; - }/** + } + +/** **/ public XmlItem wrappedArray(List wrappedArray) { this.wrappedArray = wrappedArray; @@ -139,7 +147,25 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setWrappedArray(List wrappedArray) { this.wrappedArray = wrappedArray; - }/** + } + + public XmlItem addWrappedArrayItem(Integer wrappedArrayItem) { + if (this.wrappedArray == null) { + this.wrappedArray = new ArrayList(); + } + + this.wrappedArray.add(wrappedArrayItem); + return this; + } + + public XmlItem removeWrappedArrayItem(Integer wrappedArrayItem) { + if (wrappedArrayItem != null && this.wrappedArray != null) { + this.wrappedArray.remove(wrappedArrayItem); + } + + return this; + } +/** **/ public XmlItem nameString(String nameString) { this.nameString = nameString; @@ -157,7 +183,9 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setNameString(String nameString) { this.nameString = nameString; - }/** + } + +/** **/ public XmlItem nameNumber(BigDecimal nameNumber) { this.nameNumber = nameNumber; @@ -175,7 +203,9 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setNameNumber(BigDecimal nameNumber) { this.nameNumber = nameNumber; - }/** + } + +/** **/ public XmlItem nameInteger(Integer nameInteger) { this.nameInteger = nameInteger; @@ -193,7 +223,9 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setNameInteger(Integer nameInteger) { this.nameInteger = nameInteger; - }/** + } + +/** **/ public XmlItem nameBoolean(Boolean nameBoolean) { this.nameBoolean = nameBoolean; @@ -211,7 +243,9 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setNameBoolean(Boolean nameBoolean) { this.nameBoolean = nameBoolean; - }/** + } + +/** **/ public XmlItem nameArray(List nameArray) { this.nameArray = nameArray; @@ -229,7 +263,25 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setNameArray(List nameArray) { this.nameArray = nameArray; - }/** + } + + public XmlItem addNameArrayItem(Integer nameArrayItem) { + if (this.nameArray == null) { + this.nameArray = new ArrayList(); + } + + this.nameArray.add(nameArrayItem); + return this; + } + + public XmlItem removeNameArrayItem(Integer nameArrayItem) { + if (nameArrayItem != null && this.nameArray != null) { + this.nameArray.remove(nameArrayItem); + } + + return this; + } +/** **/ public XmlItem nameWrappedArray(List nameWrappedArray) { this.nameWrappedArray = nameWrappedArray; @@ -247,7 +299,25 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setNameWrappedArray(List nameWrappedArray) { this.nameWrappedArray = nameWrappedArray; - }/** + } + + public XmlItem addNameWrappedArrayItem(Integer nameWrappedArrayItem) { + if (this.nameWrappedArray == null) { + this.nameWrappedArray = new ArrayList(); + } + + this.nameWrappedArray.add(nameWrappedArrayItem); + return this; + } + + public XmlItem removeNameWrappedArrayItem(Integer nameWrappedArrayItem) { + if (nameWrappedArrayItem != null && this.nameWrappedArray != null) { + this.nameWrappedArray.remove(nameWrappedArrayItem); + } + + return this; + } +/** **/ public XmlItem prefixString(String prefixString) { this.prefixString = prefixString; @@ -265,7 +335,9 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setPrefixString(String prefixString) { this.prefixString = prefixString; - }/** + } + +/** **/ public XmlItem prefixNumber(BigDecimal prefixNumber) { this.prefixNumber = prefixNumber; @@ -283,7 +355,9 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setPrefixNumber(BigDecimal prefixNumber) { this.prefixNumber = prefixNumber; - }/** + } + +/** **/ public XmlItem prefixInteger(Integer prefixInteger) { this.prefixInteger = prefixInteger; @@ -301,7 +375,9 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setPrefixInteger(Integer prefixInteger) { this.prefixInteger = prefixInteger; - }/** + } + +/** **/ public XmlItem prefixBoolean(Boolean prefixBoolean) { this.prefixBoolean = prefixBoolean; @@ -319,7 +395,9 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setPrefixBoolean(Boolean prefixBoolean) { this.prefixBoolean = prefixBoolean; - }/** + } + +/** **/ public XmlItem prefixArray(List prefixArray) { this.prefixArray = prefixArray; @@ -337,7 +415,25 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setPrefixArray(List prefixArray) { this.prefixArray = prefixArray; - }/** + } + + public XmlItem addPrefixArrayItem(Integer prefixArrayItem) { + if (this.prefixArray == null) { + this.prefixArray = new ArrayList(); + } + + this.prefixArray.add(prefixArrayItem); + return this; + } + + public XmlItem removePrefixArrayItem(Integer prefixArrayItem) { + if (prefixArrayItem != null && this.prefixArray != null) { + this.prefixArray.remove(prefixArrayItem); + } + + return this; + } +/** **/ public XmlItem prefixWrappedArray(List prefixWrappedArray) { this.prefixWrappedArray = prefixWrappedArray; @@ -355,7 +451,25 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setPrefixWrappedArray(List prefixWrappedArray) { this.prefixWrappedArray = prefixWrappedArray; - }/** + } + + public XmlItem addPrefixWrappedArrayItem(Integer prefixWrappedArrayItem) { + if (this.prefixWrappedArray == null) { + this.prefixWrappedArray = new ArrayList(); + } + + this.prefixWrappedArray.add(prefixWrappedArrayItem); + return this; + } + + public XmlItem removePrefixWrappedArrayItem(Integer prefixWrappedArrayItem) { + if (prefixWrappedArrayItem != null && this.prefixWrappedArray != null) { + this.prefixWrappedArray.remove(prefixWrappedArrayItem); + } + + return this; + } +/** **/ public XmlItem namespaceString(String namespaceString) { this.namespaceString = namespaceString; @@ -373,7 +487,9 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setNamespaceString(String namespaceString) { this.namespaceString = namespaceString; - }/** + } + +/** **/ public XmlItem namespaceNumber(BigDecimal namespaceNumber) { this.namespaceNumber = namespaceNumber; @@ -391,7 +507,9 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setNamespaceNumber(BigDecimal namespaceNumber) { this.namespaceNumber = namespaceNumber; - }/** + } + +/** **/ public XmlItem namespaceInteger(Integer namespaceInteger) { this.namespaceInteger = namespaceInteger; @@ -409,7 +527,9 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setNamespaceInteger(Integer namespaceInteger) { this.namespaceInteger = namespaceInteger; - }/** + } + +/** **/ public XmlItem namespaceBoolean(Boolean namespaceBoolean) { this.namespaceBoolean = namespaceBoolean; @@ -427,7 +547,9 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setNamespaceBoolean(Boolean namespaceBoolean) { this.namespaceBoolean = namespaceBoolean; - }/** + } + +/** **/ public XmlItem namespaceArray(List namespaceArray) { this.namespaceArray = namespaceArray; @@ -445,7 +567,25 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setNamespaceArray(List namespaceArray) { this.namespaceArray = namespaceArray; - }/** + } + + public XmlItem addNamespaceArrayItem(Integer namespaceArrayItem) { + if (this.namespaceArray == null) { + this.namespaceArray = new ArrayList(); + } + + this.namespaceArray.add(namespaceArrayItem); + return this; + } + + public XmlItem removeNamespaceArrayItem(Integer namespaceArrayItem) { + if (namespaceArrayItem != null && this.namespaceArray != null) { + this.namespaceArray.remove(namespaceArrayItem); + } + + return this; + } +/** **/ public XmlItem namespaceWrappedArray(List namespaceWrappedArray) { this.namespaceWrappedArray = namespaceWrappedArray; @@ -463,7 +603,25 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setNamespaceWrappedArray(List namespaceWrappedArray) { this.namespaceWrappedArray = namespaceWrappedArray; - }/** + } + + public XmlItem addNamespaceWrappedArrayItem(Integer namespaceWrappedArrayItem) { + if (this.namespaceWrappedArray == null) { + this.namespaceWrappedArray = new ArrayList(); + } + + this.namespaceWrappedArray.add(namespaceWrappedArrayItem); + return this; + } + + public XmlItem removeNamespaceWrappedArrayItem(Integer namespaceWrappedArrayItem) { + if (namespaceWrappedArrayItem != null && this.namespaceWrappedArray != null) { + this.namespaceWrappedArray.remove(namespaceWrappedArrayItem); + } + + return this; + } +/** **/ public XmlItem prefixNsString(String prefixNsString) { this.prefixNsString = prefixNsString; @@ -481,7 +639,9 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setPrefixNsString(String prefixNsString) { this.prefixNsString = prefixNsString; - }/** + } + +/** **/ public XmlItem prefixNsNumber(BigDecimal prefixNsNumber) { this.prefixNsNumber = prefixNsNumber; @@ -499,7 +659,9 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setPrefixNsNumber(BigDecimal prefixNsNumber) { this.prefixNsNumber = prefixNsNumber; - }/** + } + +/** **/ public XmlItem prefixNsInteger(Integer prefixNsInteger) { this.prefixNsInteger = prefixNsInteger; @@ -517,7 +679,9 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setPrefixNsInteger(Integer prefixNsInteger) { this.prefixNsInteger = prefixNsInteger; - }/** + } + +/** **/ public XmlItem prefixNsBoolean(Boolean prefixNsBoolean) { this.prefixNsBoolean = prefixNsBoolean; @@ -535,7 +699,9 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setPrefixNsBoolean(Boolean prefixNsBoolean) { this.prefixNsBoolean = prefixNsBoolean; - }/** + } + +/** **/ public XmlItem prefixNsArray(List prefixNsArray) { this.prefixNsArray = prefixNsArray; @@ -553,7 +719,25 @@ import com.fasterxml.jackson.annotation.JsonValue; public void setPrefixNsArray(List prefixNsArray) { this.prefixNsArray = prefixNsArray; - }/** + } + + public XmlItem addPrefixNsArrayItem(Integer prefixNsArrayItem) { + if (this.prefixNsArray == null) { + this.prefixNsArray = new ArrayList(); + } + + this.prefixNsArray.add(prefixNsArrayItem); + return this; + } + + public XmlItem removePrefixNsArrayItem(Integer prefixNsArrayItem) { + if (prefixNsArrayItem != null && this.prefixNsArray != null) { + this.prefixNsArray.remove(prefixNsArrayItem); + } + + return this; + } +/** **/ public XmlItem prefixNsWrappedArray(List prefixNsWrappedArray) { this.prefixNsWrappedArray = prefixNsWrappedArray; @@ -573,6 +757,23 @@ import com.fasterxml.jackson.annotation.JsonValue; this.prefixNsWrappedArray = prefixNsWrappedArray; } + public XmlItem addPrefixNsWrappedArrayItem(Integer prefixNsWrappedArrayItem) { + if (this.prefixNsWrappedArray == null) { + this.prefixNsWrappedArray = new ArrayList(); + } + + this.prefixNsWrappedArray.add(prefixNsWrappedArrayItem); + return this; + } + + public XmlItem removePrefixNsWrappedArrayItem(Integer prefixNsWrappedArrayItem) { + if (prefixNsWrappedArrayItem != null && this.prefixNsWrappedArray != null) { + this.prefixNsWrappedArray.remove(prefixNsWrappedArrayItem); + } + + return this; + } + @Override public boolean equals(Object o) { if (this == o) {