update petstore samples

This commit is contained in:
wing328 2017-08-14 16:54:33 +08:00
parent 23d0fedc9c
commit 958ad9af87
8 changed files with 13 additions and 13 deletions

View File

@ -41,7 +41,7 @@ public class AdditionalPropertiesClass {
public AdditionalPropertiesClass putMapPropertyItem(String key, String mapPropertyItem) { public AdditionalPropertiesClass putMapPropertyItem(String key, String mapPropertyItem) {
if (this.mapProperty == null) { if (this.mapProperty == null) {
this.mapProperty = new HashMap<String, String>(); this.mapProperty = new HashMap<>();
} }
this.mapProperty.put(key, mapPropertyItem); this.mapProperty.put(key, mapPropertyItem);
return this; return this;
@ -67,7 +67,7 @@ public class AdditionalPropertiesClass {
public AdditionalPropertiesClass putMapOfMapPropertyItem(String key, Map<String, String> mapOfMapPropertyItem) { public AdditionalPropertiesClass putMapOfMapPropertyItem(String key, Map<String, String> mapOfMapPropertyItem) {
if (this.mapOfMapProperty == null) { if (this.mapOfMapProperty == null) {
this.mapOfMapProperty = new HashMap<String, Map<String, String>>(); this.mapOfMapProperty = new HashMap<>();
} }
this.mapOfMapProperty.put(key, mapOfMapPropertyItem); this.mapOfMapProperty.put(key, mapOfMapPropertyItem);
return this; return this;

View File

@ -38,7 +38,7 @@ public class ArrayOfArrayOfNumberOnly {
public ArrayOfArrayOfNumberOnly addArrayArrayNumberItem(List<BigDecimal> arrayArrayNumberItem) { public ArrayOfArrayOfNumberOnly addArrayArrayNumberItem(List<BigDecimal> arrayArrayNumberItem) {
if (this.arrayArrayNumber == null) { if (this.arrayArrayNumber == null) {
this.arrayArrayNumber = new ArrayList<List<BigDecimal>>(); this.arrayArrayNumber = new ArrayList<>();
} }
this.arrayArrayNumber.add(arrayArrayNumberItem); this.arrayArrayNumber.add(arrayArrayNumberItem);
return this; return this;

View File

@ -38,7 +38,7 @@ public class ArrayOfNumberOnly {
public ArrayOfNumberOnly addArrayNumberItem(BigDecimal arrayNumberItem) { public ArrayOfNumberOnly addArrayNumberItem(BigDecimal arrayNumberItem) {
if (this.arrayNumber == null) { if (this.arrayNumber == null) {
this.arrayNumber = new ArrayList<BigDecimal>(); this.arrayNumber = new ArrayList<>();
} }
this.arrayNumber.add(arrayNumberItem); this.arrayNumber.add(arrayNumberItem);
return this; return this;

View File

@ -44,7 +44,7 @@ public class ArrayTest {
public ArrayTest addArrayOfStringItem(String arrayOfStringItem) { public ArrayTest addArrayOfStringItem(String arrayOfStringItem) {
if (this.arrayOfString == null) { if (this.arrayOfString == null) {
this.arrayOfString = new ArrayList<String>(); this.arrayOfString = new ArrayList<>();
} }
this.arrayOfString.add(arrayOfStringItem); this.arrayOfString.add(arrayOfStringItem);
return this; return this;
@ -70,7 +70,7 @@ public class ArrayTest {
public ArrayTest addArrayArrayOfIntegerItem(List<Long> arrayArrayOfIntegerItem) { public ArrayTest addArrayArrayOfIntegerItem(List<Long> arrayArrayOfIntegerItem) {
if (this.arrayArrayOfInteger == null) { if (this.arrayArrayOfInteger == null) {
this.arrayArrayOfInteger = new ArrayList<List<Long>>(); this.arrayArrayOfInteger = new ArrayList<>();
} }
this.arrayArrayOfInteger.add(arrayArrayOfIntegerItem); this.arrayArrayOfInteger.add(arrayArrayOfIntegerItem);
return this; return this;
@ -96,7 +96,7 @@ public class ArrayTest {
public ArrayTest addArrayArrayOfModelItem(List<ReadOnlyFirst> arrayArrayOfModelItem) { public ArrayTest addArrayArrayOfModelItem(List<ReadOnlyFirst> arrayArrayOfModelItem) {
if (this.arrayArrayOfModel == null) { if (this.arrayArrayOfModel == null) {
this.arrayArrayOfModel = new ArrayList<List<ReadOnlyFirst>>(); this.arrayArrayOfModel = new ArrayList<>();
} }
this.arrayArrayOfModel.add(arrayArrayOfModelItem); this.arrayArrayOfModel.add(arrayArrayOfModelItem);
return this; return this;

View File

@ -128,7 +128,7 @@ public class EnumArrays {
public EnumArrays addArrayEnumItem(ArrayEnumEnum arrayEnumItem) { public EnumArrays addArrayEnumItem(ArrayEnumEnum arrayEnumItem) {
if (this.arrayEnum == null) { if (this.arrayEnum == null) {
this.arrayEnum = new ArrayList<ArrayEnumEnum>(); this.arrayEnum = new ArrayList<>();
} }
this.arrayEnum.add(arrayEnumItem); this.arrayEnum.add(arrayEnumItem);
return this; return this;

View File

@ -76,7 +76,7 @@ public class MapTest {
public MapTest putMapMapOfStringItem(String key, Map<String, String> mapMapOfStringItem) { public MapTest putMapMapOfStringItem(String key, Map<String, String> mapMapOfStringItem) {
if (this.mapMapOfString == null) { if (this.mapMapOfString == null) {
this.mapMapOfString = new HashMap<String, Map<String, String>>(); this.mapMapOfString = new HashMap<>();
} }
this.mapMapOfString.put(key, mapMapOfStringItem); this.mapMapOfString.put(key, mapMapOfStringItem);
return this; return this;
@ -102,7 +102,7 @@ public class MapTest {
public MapTest putMapOfEnumStringItem(String key, InnerEnum mapOfEnumStringItem) { public MapTest putMapOfEnumStringItem(String key, InnerEnum mapOfEnumStringItem) {
if (this.mapOfEnumString == null) { if (this.mapOfEnumString == null) {
this.mapOfEnumString = new HashMap<String, InnerEnum>(); this.mapOfEnumString = new HashMap<>();
} }
this.mapOfEnumString.put(key, mapOfEnumStringItem); this.mapOfEnumString.put(key, mapOfEnumStringItem);
return this; return this;

View File

@ -83,7 +83,7 @@ public class MixedPropertiesAndAdditionalPropertiesClass {
public MixedPropertiesAndAdditionalPropertiesClass putMapItem(String key, Animal mapItem) { public MixedPropertiesAndAdditionalPropertiesClass putMapItem(String key, Animal mapItem) {
if (this.map == null) { if (this.map == null) {
this.map = new HashMap<String, Animal>(); this.map = new HashMap<>();
} }
this.map.put(key, mapItem); this.map.put(key, mapItem);
return this; return this;

View File

@ -39,7 +39,7 @@ public class Pet {
private String name = null; private String name = null;
@JsonProperty("photoUrls") @JsonProperty("photoUrls")
private List<String> photoUrls = new ArrayList<String>(); private List<String> photoUrls = new ArrayList<>();
@JsonProperty("tags") @JsonProperty("tags")
private List<Tag> tags = null; private List<Tag> tags = null;
@ -168,7 +168,7 @@ public class Pet {
public Pet addTagsItem(Tag tagsItem) { public Pet addTagsItem(Tag tagsItem) {
if (this.tags == null) { if (this.tags == null) {
this.tags = new ArrayList<Tag>(); this.tags = new ArrayList<>();
} }
this.tags.add(tagsItem); this.tags.add(tagsItem);
return this; return this;