Skip to content

[Java] add nullable support to the clients #3453

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 26, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,14 @@ public class {{classname}} {{#parent}}extends {{{parent}}} {{/parent}}{{#parcela
{{/maximum}}
* @return {{name}}
**/
{{^required}} @javax.annotation.Nullable {{/required}}
{{#required}}
{{#isNullable}}
@javax.annotation.Nullable
{{/isNullable}}
{{/required}}
{{^required}}
@javax.annotation.Nullable
{{/required}}
{{#useBeanValidation}}{{>beanValidation}}{{/useBeanValidation}} @ApiModelProperty({{#example}}example = "{{{example}}}", {{/example}}{{#required}}required = {{required}}, {{/required}}value = "{{{description}}}")
{{#vendorExtensions.extraAnnotation}}
{{{vendorExtensions.extraAnnotation}}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public AdditionalPropertiesAnyType name(String name) {
* Get name
* @return name
**/
@javax.annotation.Nullable
@javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getName() {
return name;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public AdditionalPropertiesArray name(String name) {
* Get name
* @return name
**/
@javax.annotation.Nullable
@javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getName() {
return name;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public AdditionalPropertiesBoolean name(String name) {
* Get name
* @return name
**/
@javax.annotation.Nullable
@javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getName() {
return name;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public AdditionalPropertiesClass putMapStringItem(String key, String mapStringIt
* Get mapString
* @return mapString
**/
@javax.annotation.Nullable
@javax.annotation.Nullable
@ApiModelProperty(value = "")
public Map<String, String> getMapString() {
return mapString;
Expand All @@ -107,7 +107,7 @@ public AdditionalPropertiesClass putMapNumberItem(String key, BigDecimal mapNumb
* Get mapNumber
* @return mapNumber
**/
@javax.annotation.Nullable
@javax.annotation.Nullable
@ApiModelProperty(value = "")
public Map<String, BigDecimal> getMapNumber() {
return mapNumber;
Expand All @@ -134,7 +134,7 @@ public AdditionalPropertiesClass putMapIntegerItem(String key, Integer mapIntege
* Get mapInteger
* @return mapInteger
**/
@javax.annotation.Nullable
@javax.annotation.Nullable
@ApiModelProperty(value = "")
public Map<String, Integer> getMapInteger() {
return mapInteger;
Expand All @@ -161,7 +161,7 @@ public AdditionalPropertiesClass putMapBooleanItem(String key, Boolean mapBoolea
* Get mapBoolean
* @return mapBoolean
**/
@javax.annotation.Nullable
@javax.annotation.Nullable
@ApiModelProperty(value = "")
public Map<String, Boolean> getMapBoolean() {
return mapBoolean;
Expand All @@ -188,7 +188,7 @@ public AdditionalPropertiesClass putMapArrayIntegerItem(String key, List<Integer
* Get mapArrayInteger
* @return mapArrayInteger
**/
@javax.annotation.Nullable
@javax.annotation.Nullable
@ApiModelProperty(value = "")
public Map<String, List<Integer>> getMapArrayInteger() {
return mapArrayInteger;
Expand All @@ -215,7 +215,7 @@ public AdditionalPropertiesClass putMapArrayAnytypeItem(String key, List<Object>
* Get mapArrayAnytype
* @return mapArrayAnytype
**/
@javax.annotation.Nullable
@javax.annotation.Nullable
@ApiModelProperty(value = "")
public Map<String, List<Object>> getMapArrayAnytype() {
return mapArrayAnytype;
Expand All @@ -242,7 +242,7 @@ public AdditionalPropertiesClass putMapMapStringItem(String key, Map<String, Str
* Get mapMapString
* @return mapMapString
**/
@javax.annotation.Nullable
@javax.annotation.Nullable
@ApiModelProperty(value = "")
public Map<String, Map<String, String>> getMapMapString() {
return mapMapString;
Expand All @@ -269,7 +269,7 @@ public AdditionalPropertiesClass putMapMapAnytypeItem(String key, Map<String, Ob
* Get mapMapAnytype
* @return mapMapAnytype
**/
@javax.annotation.Nullable
@javax.annotation.Nullable
@ApiModelProperty(value = "")
public Map<String, Map<String, Object>> getMapMapAnytype() {
return mapMapAnytype;
Expand All @@ -288,7 +288,7 @@ public AdditionalPropertiesClass anytype1(Object anytype1) {
* Get anytype1
* @return anytype1
**/
@javax.annotation.Nullable
@javax.annotation.Nullable
@ApiModelProperty(value = "")
public Object getAnytype1() {
return anytype1;
Expand All @@ -307,7 +307,7 @@ public AdditionalPropertiesClass anytype2(Object anytype2) {
* Get anytype2
* @return anytype2
**/
@javax.annotation.Nullable
@javax.annotation.Nullable
@ApiModelProperty(value = "")
public Object getAnytype2() {
return anytype2;
Expand All @@ -326,7 +326,7 @@ public AdditionalPropertiesClass anytype3(Object anytype3) {
* Get anytype3
* @return anytype3
**/
@javax.annotation.Nullable
@javax.annotation.Nullable
@ApiModelProperty(value = "")
public Object getAnytype3() {
return anytype3;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public AdditionalPropertiesInteger name(String name) {
* Get name
* @return name
**/
@javax.annotation.Nullable
@javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getName() {
return name;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public AdditionalPropertiesNumber name(String name) {
* Get name
* @return name
**/
@javax.annotation.Nullable
@javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getName() {
return name;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public AdditionalPropertiesObject name(String name) {
* Get name
* @return name
**/
@javax.annotation.Nullable
@javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getName() {
return name;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public AdditionalPropertiesString name(String name) {
* Get name
* @return name
**/
@javax.annotation.Nullable
@javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getName() {
return name;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ public Animal className(String className) {
* Get className
* @return className
**/

@ApiModelProperty(required = true, value = "")
public String getClassName() {
return className;
Expand All @@ -68,7 +67,7 @@ public Animal color(String color) {
* Get color
* @return color
**/
@javax.annotation.Nullable
@javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getColor() {
return color;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public ArrayOfArrayOfNumberOnly addArrayArrayNumberItem(List<BigDecimal> arrayAr
* Get arrayArrayNumber
* @return arrayArrayNumber
**/
@javax.annotation.Nullable
@javax.annotation.Nullable
@ApiModelProperty(value = "")
public List<List<BigDecimal>> getArrayArrayNumber() {
return arrayArrayNumber;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public ArrayOfNumberOnly addArrayNumberItem(BigDecimal arrayNumberItem) {
* Get arrayNumber
* @return arrayNumber
**/
@javax.annotation.Nullable
@javax.annotation.Nullable
@ApiModelProperty(value = "")
public List<BigDecimal> getArrayNumber() {
return arrayNumber;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public ArrayTest addArrayOfStringItem(String arrayOfStringItem) {
* Get arrayOfString
* @return arrayOfString
**/
@javax.annotation.Nullable
@javax.annotation.Nullable
@ApiModelProperty(value = "")
public List<String> getArrayOfString() {
return arrayOfString;
Expand All @@ -82,7 +82,7 @@ public ArrayTest addArrayArrayOfIntegerItem(List<Long> arrayArrayOfIntegerItem)
* Get arrayArrayOfInteger
* @return arrayArrayOfInteger
**/
@javax.annotation.Nullable
@javax.annotation.Nullable
@ApiModelProperty(value = "")
public List<List<Long>> getArrayArrayOfInteger() {
return arrayArrayOfInteger;
Expand All @@ -109,7 +109,7 @@ public ArrayTest addArrayArrayOfModelItem(List<ReadOnlyFirst> arrayArrayOfModelI
* Get arrayArrayOfModel
* @return arrayArrayOfModel
**/
@javax.annotation.Nullable
@javax.annotation.Nullable
@ApiModelProperty(value = "")
public List<List<ReadOnlyFirst>> getArrayArrayOfModel() {
return arrayArrayOfModel;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public Capitalization smallCamel(String smallCamel) {
* Get smallCamel
* @return smallCamel
**/
@javax.annotation.Nullable
@javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getSmallCamel() {
return smallCamel;
Expand All @@ -72,7 +72,7 @@ public Capitalization capitalCamel(String capitalCamel) {
* Get capitalCamel
* @return capitalCamel
**/
@javax.annotation.Nullable
@javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getCapitalCamel() {
return capitalCamel;
Expand All @@ -91,7 +91,7 @@ public Capitalization smallSnake(String smallSnake) {
* Get smallSnake
* @return smallSnake
**/
@javax.annotation.Nullable
@javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getSmallSnake() {
return smallSnake;
Expand All @@ -110,7 +110,7 @@ public Capitalization capitalSnake(String capitalSnake) {
* Get capitalSnake
* @return capitalSnake
**/
@javax.annotation.Nullable
@javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getCapitalSnake() {
return capitalSnake;
Expand All @@ -129,7 +129,7 @@ public Capitalization scAETHFlowPoints(String scAETHFlowPoints) {
* Get scAETHFlowPoints
* @return scAETHFlowPoints
**/
@javax.annotation.Nullable
@javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getScAETHFlowPoints() {
return scAETHFlowPoints;
Expand All @@ -148,7 +148,7 @@ public Capitalization ATT_NAME(String ATT_NAME) {
* Name of the pet
* @return ATT_NAME
**/
@javax.annotation.Nullable
@javax.annotation.Nullable
@ApiModelProperty(value = "Name of the pet ")
public String getATTNAME() {
return ATT_NAME;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public Cat declawed(Boolean declawed) {
* Get declawed
* @return declawed
**/
@javax.annotation.Nullable
@javax.annotation.Nullable
@ApiModelProperty(value = "")
public Boolean isDeclawed() {
return declawed;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public CatAllOf declawed(Boolean declawed) {
* Get declawed
* @return declawed
**/
@javax.annotation.Nullable
@javax.annotation.Nullable
@ApiModelProperty(value = "")
public Boolean isDeclawed() {
return declawed;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public Category id(Long id) {
* Get id
* @return id
**/
@javax.annotation.Nullable
@javax.annotation.Nullable
@ApiModelProperty(value = "")
public Long getId() {
return id;
Expand All @@ -60,7 +60,6 @@ public Category name(String name) {
* Get name
* @return name
**/

@ApiModelProperty(required = true, value = "")
public String getName() {
return name;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public ClassModel propertyClass(String propertyClass) {
* Get propertyClass
* @return propertyClass
**/
@javax.annotation.Nullable
@javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getPropertyClass() {
return propertyClass;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public Client client(String client) {
* Get client
* @return client
**/
@javax.annotation.Nullable
@javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getClient() {
return client;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public Dog breed(String breed) {
* Get breed
* @return breed
**/
@javax.annotation.Nullable
@javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getBreed() {
return breed;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public DogAllOf breed(String breed) {
* Get breed
* @return breed
**/
@javax.annotation.Nullable
@javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getBreed() {
return breed;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ public EnumArrays justSymbol(JustSymbolEnum justSymbol) {
* Get justSymbol
* @return justSymbol
**/
@javax.annotation.Nullable
@javax.annotation.Nullable
@ApiModelProperty(value = "")
public JustSymbolEnum getJustSymbol() {
return justSymbol;
Expand All @@ -140,7 +140,7 @@ public EnumArrays addArrayEnumItem(ArrayEnumEnum arrayEnumItem) {
* Get arrayEnum
* @return arrayEnum
**/
@javax.annotation.Nullable
@javax.annotation.Nullable
@ApiModelProperty(value = "")
public List<ArrayEnumEnum> getArrayEnum() {
return arrayEnum;
Expand Down
Loading