Fix: Resolve problem with UUID class not found if there is almost one parameter with format as uuid (#6617)

* feat: java.util.UUID if parameter is UUID

* solve git problem
This commit is contained in:
Guillermo Pastor
2017-11-22 09:54:11 +01:00
committed by William Cheng
parent acefe3f385
commit 65bb761952
24 changed files with 270 additions and 272 deletions
@@ -195,7 +195,7 @@ public class DefaultCodegen {
// TODO Determine what to do if the parent discriminator name == the grandparent discriminator name
while (parent != null) {
if (parent.children == null) {
parent.children = new ArrayList<CodegenModel>();
parent.children = new ArrayList<CodegenModel>();
}
parent.children.add(cm);
if (parent.discriminator == null) {
@@ -981,7 +981,7 @@ public class DefaultCodegen {
String type = additionalProperties2.getType();
if (null == type) {
LOGGER.error("No Type defined for Additional Property " + additionalProperties2 + "\n" //
+ "\tIn Property: " + p);
+ "\tIn Property: " + p);
}
String inner = getSwaggerType(additionalProperties2);
return instantiationTypes.get("map") + "<String, " + inner + ">";
@@ -1322,13 +1322,13 @@ public class DefaultCodegen {
m.isAlias = typeAliases.containsKey(name);
if (model instanceof ModelImpl) {
ModelImpl modelImpl = (ModelImpl) model;
ModelImpl modelImpl = (ModelImpl) model;
m.discriminator = modelImpl.getDiscriminator();
if (modelImpl.getXml() != null) {
m.xmlPrefix = modelImpl.getXml().getPrefix();
m.xmlNamespace = modelImpl.getXml().getNamespace();
m.xmlName = modelImpl.getXml().getName();
m.xmlPrefix = modelImpl.getXml().getPrefix();
m.xmlNamespace = modelImpl.getXml().getNamespace();
m.xmlName = modelImpl.getXml().getName();
}
}
@@ -1353,14 +1353,14 @@ public class DefaultCodegen {
int modelImplCnt = 0; // only one inline object allowed in a ComposedModel
for (Model innerModel: ((ComposedModel)model).getAllOf()) {
if (innerModel instanceof ModelImpl) {
ModelImpl modelImpl = (ModelImpl) innerModel;
ModelImpl modelImpl = (ModelImpl) innerModel;
if (m.discriminator == null) {
m.discriminator = modelImpl.getDiscriminator();
}
if (modelImpl.getXml() != null) {
m.xmlPrefix = modelImpl.getXml().getPrefix();
m.xmlNamespace = modelImpl.getXml().getNamespace();
m.xmlName = modelImpl.getXml().getName();
m.xmlPrefix = modelImpl.getXml().getPrefix();
m.xmlNamespace = modelImpl.getXml().getNamespace();
m.xmlName = modelImpl.getXml().getName();
}
if (modelImplCnt++ > 1) {
LOGGER.warn("More than one inline schema specified in allOf:. Only the first one is recognized. All others are ignored.");
@@ -1557,12 +1557,12 @@ public class DefaultCodegen {
property.isReadOnly = p.getReadOnly();
}
if (p.getXml() != null) {
if (p.getXml().getAttribute() != null) {
property.isXmlAttribute = p.getXml().getAttribute();
}
property.xmlPrefix = p.getXml().getPrefix();
property.xmlName = p.getXml().getName();
property.xmlNamespace = p.getXml().getNamespace();
if (p.getXml().getAttribute() != null) {
property.isXmlAttribute = p.getXml().getAttribute();
}
property.xmlPrefix = p.getXml().getPrefix();
property.xmlName = p.getXml().getName();
property.xmlNamespace = p.getXml().getNamespace();
}
property.vendorExtensions = p.getVendorExtensions();
@@ -1570,18 +1570,18 @@ public class DefaultCodegen {
if (p instanceof AbstractNumericProperty) {
AbstractNumericProperty np = (AbstractNumericProperty) p;
if (np.getMinimum() != null) {
if (p instanceof BaseIntegerProperty) { // int, long
property.minimum = String.valueOf(np.getMinimum().longValue());
} else { // double, decimal
property.minimum = String.valueOf(np.getMinimum());
}
if (p instanceof BaseIntegerProperty) { // int, long
property.minimum = String.valueOf(np.getMinimum().longValue());
} else { // double, decimal
property.minimum = String.valueOf(np.getMinimum());
}
}
if (np.getMaximum() != null) {
if (p instanceof BaseIntegerProperty) { // int, long
property.maximum = String.valueOf(np.getMaximum().longValue());
} else { // double, decimal
property.maximum = String.valueOf(np.getMaximum());
}
if (p instanceof BaseIntegerProperty) { // int, long
property.maximum = String.valueOf(np.getMaximum().longValue());
} else { // double, decimal
property.maximum = String.valueOf(np.getMaximum());
}
}
if (np.getExclusiveMinimum() != null) {
@@ -1605,7 +1605,7 @@ public class DefaultCodegen {
allowableValues.put("max", np.getMaximum());
}
if(allowableValues.size() > 0) {
property.allowableValues = allowableValues;
property.allowableValues = allowableValues;
}
}
@@ -1645,7 +1645,7 @@ public class DefaultCodegen {
List<Integer> _enum = sp.getEnum();
property._enum = new ArrayList<String>();
for(Integer i : _enum) {
property._enum.add(i.toString());
property._enum.add(i.toString());
}
property.isEnum = true;
@@ -1663,7 +1663,7 @@ public class DefaultCodegen {
List<Long> _enum = sp.getEnum();
property._enum = new ArrayList<String>();
for(Long i : _enum) {
property._enum.add(i.toString());
property._enum.add(i.toString());
}
property.isEnum = true;
@@ -1684,9 +1684,9 @@ public class DefaultCodegen {
property.isFile = true;
}
if (p instanceof UUIDProperty) {
property.isString =true;
property.isUuid = true;
// keep isString to true to make it backward compatible
property.isString = true;
}
if (p instanceof ByteArrayProperty) {
property.isByteArray = true;
@@ -1704,7 +1704,7 @@ public class DefaultCodegen {
List<Double> _enum = sp.getEnum();
property._enum = new ArrayList<String>();
for(Double i : _enum) {
property._enum.add(i.toString());
property._enum.add(i.toString());
}
property.isEnum = true;
@@ -1722,7 +1722,7 @@ public class DefaultCodegen {
List<Float> _enum = sp.getEnum();
property._enum = new ArrayList<String>();
for(Float i : _enum) {
property._enum.add(i.toString());
property._enum.add(i.toString());
}
property.isEnum = true;
@@ -1740,7 +1740,7 @@ public class DefaultCodegen {
List<String> _enum = sp.getEnum();
property._enum = new ArrayList<String>();
for(String i : _enum) {
property._enum.add(i);
property._enum.add(i);
}
property.isEnum = true;
@@ -1757,7 +1757,7 @@ public class DefaultCodegen {
List<String> _enum = sp.getEnum();
property._enum = new ArrayList<String>();
for(String i : _enum) {
property._enum.add(i);
property._enum.add(i);
}
property.isEnum = true;
@@ -1780,16 +1780,16 @@ public class DefaultCodegen {
property.baseType = getSwaggerType(p);
if (p instanceof ArrayProperty) {
if (p instanceof ArrayProperty) {
property.isContainer = true;
property.isListContainer = true;
property.containerType = "array";
property.baseType = getSwaggerType(p);
if (p.getXml() != null) {
property.isXmlWrapped = p.getXml().getWrapped() == null ? false : p.getXml().getWrapped();
property.xmlPrefix= p.getXml().getPrefix();
property.xmlNamespace = p.getXml().getNamespace();
property.xmlName = p.getXml().getName();
property.isXmlWrapped = p.getXml().getWrapped() == null ? false : p.getXml().getWrapped();
property.xmlPrefix= p.getXml().getPrefix();
property.xmlNamespace = p.getXml().getNamespace();
property.xmlName = p.getXml().getName();
}
// handle inner property
ArrayProperty ap = (ArrayProperty) p;
@@ -1797,11 +1797,11 @@ public class DefaultCodegen {
property.minItems = ap.getMinItems();
String itemName = (String) p.getVendorExtensions().get("x-item-name");
if (itemName == null) {
itemName = property.name;
itemName = property.name;
}
CodegenProperty cp = fromProperty(itemName, ap.getItems());
updatePropertyForArray(property, cp);
} else if (p instanceof MapProperty) {
} else if (p instanceof MapProperty) {
MapProperty ap = (MapProperty) p;
property.isContainer = true;
@@ -1890,7 +1890,7 @@ public class DefaultCodegen {
protected Boolean isPropertyInnerMostEnum(CodegenProperty property) {
CodegenProperty currentProperty = property;
while (currentProperty != null && (Boolean.TRUE.equals(currentProperty.isMapContainer)
|| Boolean.TRUE.equals(currentProperty.isListContainer))) {
|| Boolean.TRUE.equals(currentProperty.isListContainer))) {
currentProperty = currentProperty.items;
}
@@ -1900,7 +1900,7 @@ public class DefaultCodegen {
protected Map<String, Object> getInnerEnumAllowableValues(CodegenProperty property) {
CodegenProperty currentProperty = property;
while (currentProperty != null && (Boolean.TRUE.equals(currentProperty.isMapContainer)
|| Boolean.TRUE.equals(currentProperty.isListContainer))) {
|| Boolean.TRUE.equals(currentProperty.isListContainer))) {
currentProperty = currentProperty.items;
}
@@ -1915,7 +1915,7 @@ public class DefaultCodegen {
protected void updateDataTypeWithEnumForArray(CodegenProperty property) {
CodegenProperty baseItem = property.items;
while (baseItem != null && (Boolean.TRUE.equals(baseItem.isMapContainer)
|| Boolean.TRUE.equals(baseItem.isListContainer))) {
|| Boolean.TRUE.equals(baseItem.isListContainer))) {
baseItem = baseItem.items;
}
if (baseItem != null) {
@@ -1940,7 +1940,7 @@ public class DefaultCodegen {
protected void updateDataTypeWithEnumForMap(CodegenProperty property) {
CodegenProperty baseItem = property.items;
while (baseItem != null && (Boolean.TRUE.equals(baseItem.isMapContainer)
|| Boolean.TRUE.equals(baseItem.isListContainer))) {
|| Boolean.TRUE.equals(baseItem.isListContainer))) {
baseItem = baseItem.items;
}
@@ -2267,14 +2267,14 @@ public class DefaultCodegen {
// move "required" parameters in front of "optional" parameters
if (sortParamsByRequiredFlag) {
Collections.sort(allParams, new Comparator<CodegenParameter>() {
@Override
public int compare(CodegenParameter one, CodegenParameter another) {
if (one.required == another.required) return 0;
else if (one.required) return -1;
else return 1;
}
});
Collections.sort(allParams, new Comparator<CodegenParameter>() {
@Override
public int compare(CodegenParameter one, CodegenParameter another) {
if (one.required == another.required) return 0;
else if (one.required) return -1;
else return 1;
}
});
}
op.allParams = addHasMore(allParams);
@@ -2345,7 +2345,9 @@ public class DefaultCodegen {
}
r.dataType = cm.datatype;
if (Boolean.TRUE.equals(cm.isByteArray)) {
if (Boolean.TRUE.equals(cm.isString) && Boolean.TRUE.equals(cm.isUuid)) {
r.isUuid = true;
} else if (Boolean.TRUE.equals(cm.isByteArray)) {
r.isByteArray = true;
} else if (Boolean.TRUE.equals(cm.isString)) {
r.isString = true;
@@ -2374,8 +2376,6 @@ public class DefaultCodegen {
r.isDate = true;
} else if (Boolean.TRUE.equals(cm.isDateTime)) {
r.isDateTime = true;
} else if (Boolean.TRUE.equals(cm.isUuid)) {
r.isUuid = true;
} else {
LOGGER.debug("Property type is not primitive: " + cm.datatype);
}
@@ -2679,6 +2679,8 @@ public class DefaultCodegen {
// if not specified in x-example, generate a default value
if (p.vendorExtensions.containsKey("x-example")) {
p.example = Json.pretty(p.vendorExtensions.get("x-example"));
} else if (Boolean.TRUE.equals(p.isUuid) && (Boolean.TRUE.equals(p.isString))) {
p.example = "38400000-8cf0-11bd-b23e-10b96e4ef00d";
} else if (Boolean.TRUE.equals(p.isString)) {
p.example = p.paramName + "_example";
} else if (Boolean.TRUE.equals(p.isBoolean)) {
@@ -2703,8 +2705,6 @@ public class DefaultCodegen {
p.example = "2013-10-20";
} else if (Boolean.TRUE.equals(p.isDateTime)) {
p.example = "2013-10-20T19:20:30+01:00";
} else if (Boolean.TRUE.equals(p.isUuid)) {
p.example = "38400000-8cf0-11bd-b23e-10b96e4ef00d";
} else if (Boolean.TRUE.equals(p.isFile)) {
p.example = "/path/to/file.txt";
}
@@ -2833,10 +2833,10 @@ public class DefaultCodegen {
}
protected void setReservedWordsLowerCase(List<String> words) {
reservedWords = new HashSet<String>();
for (String word : words) {
reservedWords.add(word.toLowerCase());
}
reservedWords = new HashSet<String>();
for (String word : words) {
reservedWords.add(word.toLowerCase());
}
}
protected boolean isReservedWord(String word) {
@@ -3064,7 +3064,7 @@ public class DefaultCodegen {
}
private void addVars(CodegenModel m, Map<String, Property> properties, List<String> required,
Map<String, Property> allProperties, List<String> allRequired) {
Map<String, Property> allProperties, List<String> allRequired) {
m.hasRequired = false;
if (properties != null && !properties.isEmpty()) {
@@ -3581,7 +3581,9 @@ public class DefaultCodegen {
return;
}
if (Boolean.TRUE.equals(property.isByteArray)) {
if (Boolean.TRUE.equals(property.isUuid) && Boolean.TRUE.equals(property.isString)) {
parameter.isUuid = true;
} else if (Boolean.TRUE.equals(property.isByteArray)) {
parameter.isByteArray = true;
parameter.isPrimitiveType = true;
} else if (Boolean.TRUE.equals(property.isString)) {
@@ -3610,10 +3612,6 @@ public class DefaultCodegen {
parameter.isPrimitiveType = true;
} else if (Boolean.TRUE.equals(property.isFile)) {
parameter.isFile = true;
} else if (Boolean.TRUE.equals(property.isUuid)) {
parameter.isUuid = true;
// file is *not* a primitive type
//parameter.isPrimitiveType = true;
} else if (Boolean.TRUE.equals(property.isDate)) {
parameter.isDate = true;
parameter.isPrimitiveType = true;
@@ -3,19 +3,19 @@
# ~~~~
{{#useSwaggerUI}}
GET /api controllers.ApiDocController.api
GET /api controllers.ApiDocController.api
{{/useSwaggerUI}}
{{#apiInfo}}
{{#apis}}
{{#apis}}
#Functions for {{{baseName}}} API
{{#operations}}
{{#operation}}
{{httpMethod}} {{{contextPath}}}{{{path}}} controllers.{{classname}}Controller.{{operationId}}({{#pathParams}}{{paramName}}: {{{dataType}}}{{#hasMore}}, {{/hasMore}}{{/pathParams}})
{{/operation}}
{{/operations}}
{{/apis}}
#Functions for {{{baseName}}} API
{{#operations}}
{{#operation}}
{{httpMethod}} {{{contextPath}}}{{{path}}} controllers.{{classname}}Controller.{{operationId}}({{#pathParams}}{{paramName}}: {{#isUuid}}java.util.UUID{{/isUuid}}{{^isUuid}}{{{dataType}}}{{/isUuid}}{{#hasMore}}, {{/hasMore}}{{/pathParams}})
{{/operation}}
{{/operations}}
{{/apis}}
{{/apiInfo}}
# Map static resources from the /public folder to the /assets URL path
@@ -25,7 +25,7 @@ public class Pet {
private String name = null;
@JsonProperty("photoUrls")
private List<String> photoUrls = new ArrayList<>();
private List<String> photoUrls = new ArrayList<String>();
@JsonProperty("tags")
private List<Tag> tags = null;
@@ -149,7 +149,7 @@ public class Pet {
public Pet addTagsItem(Tag tagsItem) {
if (tags == null) {
tags = new ArrayList<>();
tags = new ArrayList<Tag>();
}
tags.add(tagsItem);
return this;
@@ -2,34 +2,34 @@
# This file defines all application routes (Higher priority routes first)
# ~~~~
GET /api controllers.ApiDocController.api
GET /api controllers.ApiDocController.api
#Functions for Pet API
POST /v2/pet controllers.PetApiController.addPet()
DELETE /v2/pet/:petId controllers.PetApiController.deletePet(petId: Long)
GET /v2/pet/findByStatus controllers.PetApiController.findPetsByStatus()
GET /v2/pet/findByTags controllers.PetApiController.findPetsByTags()
GET /v2/pet/:petId controllers.PetApiController.getPetById(petId: Long)
PUT /v2/pet controllers.PetApiController.updatePet()
POST /v2/pet/:petId controllers.PetApiController.updatePetWithForm(petId: Long)
POST /v2/pet/:petId/uploadImage controllers.PetApiController.uploadFile(petId: Long)
#Functions for Pet API
POST /v2/pet controllers.PetApiController.addPet()
DELETE /v2/pet/:petId controllers.PetApiController.deletePet(petId: Long)
GET /v2/pet/findByStatus controllers.PetApiController.findPetsByStatus()
GET /v2/pet/findByTags controllers.PetApiController.findPetsByTags()
GET /v2/pet/:petId controllers.PetApiController.getPetById(petId: Long)
PUT /v2/pet controllers.PetApiController.updatePet()
POST /v2/pet/:petId controllers.PetApiController.updatePetWithForm(petId: Long)
POST /v2/pet/:petId/uploadImage controllers.PetApiController.uploadFile(petId: Long)
#Functions for Store API
DELETE /v2/store/order/:orderId controllers.StoreApiController.deleteOrder(orderId: String)
GET /v2/store/inventory controllers.StoreApiController.getInventory()
GET /v2/store/order/:orderId controllers.StoreApiController.getOrderById(orderId: Long)
POST /v2/store/order controllers.StoreApiController.placeOrder()
#Functions for Store API
DELETE /v2/store/order/:orderId controllers.StoreApiController.deleteOrder(orderId: String)
GET /v2/store/inventory controllers.StoreApiController.getInventory()
GET /v2/store/order/:orderId controllers.StoreApiController.getOrderById(orderId: Long)
POST /v2/store/order controllers.StoreApiController.placeOrder()
#Functions for User API
POST /v2/user controllers.UserApiController.createUser()
POST /v2/user/createWithArray controllers.UserApiController.createUsersWithArrayInput()
POST /v2/user/createWithList controllers.UserApiController.createUsersWithListInput()
DELETE /v2/user/:username controllers.UserApiController.deleteUser(username: String)
GET /v2/user/:username controllers.UserApiController.getUserByName(username: String)
GET /v2/user/login controllers.UserApiController.loginUser()
GET /v2/user/logout controllers.UserApiController.logoutUser()
PUT /v2/user/:username controllers.UserApiController.updateUser(username: String)
#Functions for User API
POST /v2/user controllers.UserApiController.createUser()
POST /v2/user/createWithArray controllers.UserApiController.createUsersWithArrayInput()
POST /v2/user/createWithList controllers.UserApiController.createUsersWithListInput()
DELETE /v2/user/:username controllers.UserApiController.deleteUser(username: String)
GET /v2/user/:username controllers.UserApiController.getUserByName(username: String)
GET /v2/user/login controllers.UserApiController.loginUser()
GET /v2/user/logout controllers.UserApiController.logoutUser()
PUT /v2/user/:username controllers.UserApiController.updateUser(username: String)
# Map static resources from the /public folder to the /assets URL path
GET /assets/*file controllers.Assets.at(file)
@@ -27,7 +27,7 @@ public class AdditionalPropertiesClass {
public AdditionalPropertiesClass putMapPropertyItem(String key, String mapPropertyItem) {
if (this.mapProperty == null) {
this.mapProperty = new HashMap<>();
this.mapProperty = new HashMap<String, String>();
}
this.mapProperty.put(key, mapPropertyItem);
return this;
@@ -52,7 +52,7 @@ public class AdditionalPropertiesClass {
public AdditionalPropertiesClass putMapOfMapPropertyItem(String key, Map<String, String> mapOfMapPropertyItem) {
if (this.mapOfMapProperty == null) {
this.mapOfMapProperty = new HashMap<>();
this.mapOfMapProperty = new HashMap<String, Map<String, String>>();
}
this.mapOfMapProperty.put(key, mapOfMapPropertyItem);
return this;
@@ -24,7 +24,7 @@ public class ArrayOfArrayOfNumberOnly {
public ArrayOfArrayOfNumberOnly addArrayArrayNumberItem(List<BigDecimal> arrayArrayNumberItem) {
if (arrayArrayNumber == null) {
arrayArrayNumber = new ArrayList<>();
arrayArrayNumber = new ArrayList<List<BigDecimal>>();
}
arrayArrayNumber.add(arrayArrayNumberItem);
return this;
@@ -24,7 +24,7 @@ public class ArrayOfNumberOnly {
public ArrayOfNumberOnly addArrayNumberItem(BigDecimal arrayNumberItem) {
if (arrayNumber == null) {
arrayNumber = new ArrayList<>();
arrayNumber = new ArrayList<BigDecimal>();
}
arrayNumber.add(arrayNumberItem);
return this;
@@ -30,7 +30,7 @@ public class ArrayTest {
public ArrayTest addArrayOfStringItem(String arrayOfStringItem) {
if (arrayOfString == null) {
arrayOfString = new ArrayList<>();
arrayOfString = new ArrayList<String>();
}
arrayOfString.add(arrayOfStringItem);
return this;
@@ -55,7 +55,7 @@ public class ArrayTest {
public ArrayTest addArrayArrayOfIntegerItem(List<Long> arrayArrayOfIntegerItem) {
if (arrayArrayOfInteger == null) {
arrayArrayOfInteger = new ArrayList<>();
arrayArrayOfInteger = new ArrayList<List<Long>>();
}
arrayArrayOfInteger.add(arrayArrayOfIntegerItem);
return this;
@@ -81,7 +81,7 @@ public class ArrayTest {
public ArrayTest addArrayArrayOfModelItem(List<ReadOnlyFirst> arrayArrayOfModelItem) {
if (arrayArrayOfModel == null) {
arrayArrayOfModel = new ArrayList<>();
arrayArrayOfModel = new ArrayList<List<ReadOnlyFirst>>();
}
arrayArrayOfModel.add(arrayArrayOfModelItem);
return this;
@@ -105,7 +105,7 @@ public class EnumArrays {
public EnumArrays addArrayEnumItem(ArrayEnumEnum arrayEnumItem) {
if (arrayEnum == null) {
arrayEnum = new ArrayList<>();
arrayEnum = new ArrayList<ArrayEnumEnum>();
}
arrayEnum.add(arrayEnumItem);
return this;
@@ -58,7 +58,7 @@ public class MapTest {
public MapTest putMapMapOfStringItem(String key, Map<String, String> mapMapOfStringItem) {
if (this.mapMapOfString == null) {
this.mapMapOfString = new HashMap<>();
this.mapMapOfString = new HashMap<String, Map<String, String>>();
}
this.mapMapOfString.put(key, mapMapOfStringItem);
return this;
@@ -84,7 +84,7 @@ public class MapTest {
public MapTest putMapOfEnumStringItem(String key, InnerEnum mapOfEnumStringItem) {
if (this.mapOfEnumString == null) {
this.mapOfEnumString = new HashMap<>();
this.mapOfEnumString = new HashMap<String, InnerEnum>();
}
this.mapOfEnumString.put(key, mapOfEnumStringItem);
return this;
@@ -69,7 +69,7 @@ public class MixedPropertiesAndAdditionalPropertiesClass {
public MixedPropertiesAndAdditionalPropertiesClass putMapItem(String key, Animal mapItem) {
if (this.map == null) {
this.map = new HashMap<>();
this.map = new HashMap<String, Animal>();
}
this.map.put(key, mapItem);
return this;
@@ -25,7 +25,7 @@ public class Pet {
private String name = null;
@JsonProperty("photoUrls")
private List<String> photoUrls = new ArrayList<>();
private List<String> photoUrls = new ArrayList<String>();
@JsonProperty("tags")
private List<Tag> tags = null;
@@ -149,7 +149,7 @@ public class Pet {
public Pet addTagsItem(Tag tagsItem) {
if (tags == null) {
tags = new ArrayList<>();
tags = new ArrayList<Tag>();
}
tags.add(tagsItem);
return this;
@@ -24,7 +24,7 @@ public class Pet {
private String name = null;
@JsonProperty("photoUrls")
private List<String> photoUrls = new ArrayList<>();
private List<String> photoUrls = new ArrayList<String>();
@JsonProperty("tags")
private List<Tag> tags = null;
@@ -145,7 +145,7 @@ public class Pet {
public Pet addTagsItem(Tag tagsItem) {
if (tags == null) {
tags = new ArrayList<>();
tags = new ArrayList<Tag>();
}
tags.add(tagsItem);
return this;
@@ -2,34 +2,34 @@
# This file defines all application routes (Higher priority routes first)
# ~~~~
GET /api controllers.ApiDocController.api
GET /api controllers.ApiDocController.api
#Functions for Pet API
POST /v2/pet controllers.PetApiController.addPet()
DELETE /v2/pet/:petId controllers.PetApiController.deletePet(petId: Long)
GET /v2/pet/findByStatus controllers.PetApiController.findPetsByStatus()
GET /v2/pet/findByTags controllers.PetApiController.findPetsByTags()
GET /v2/pet/:petId controllers.PetApiController.getPetById(petId: Long)
PUT /v2/pet controllers.PetApiController.updatePet()
POST /v2/pet/:petId controllers.PetApiController.updatePetWithForm(petId: Long)
POST /v2/pet/:petId/uploadImage controllers.PetApiController.uploadFile(petId: Long)
#Functions for Pet API
POST /v2/pet controllers.PetApiController.addPet()
DELETE /v2/pet/:petId controllers.PetApiController.deletePet(petId: Long)
GET /v2/pet/findByStatus controllers.PetApiController.findPetsByStatus()
GET /v2/pet/findByTags controllers.PetApiController.findPetsByTags()
GET /v2/pet/:petId controllers.PetApiController.getPetById(petId: Long)
PUT /v2/pet controllers.PetApiController.updatePet()
POST /v2/pet/:petId controllers.PetApiController.updatePetWithForm(petId: Long)
POST /v2/pet/:petId/uploadImage controllers.PetApiController.uploadFile(petId: Long)
#Functions for Store API
DELETE /v2/store/order/:orderId controllers.StoreApiController.deleteOrder(orderId: String)
GET /v2/store/inventory controllers.StoreApiController.getInventory()
GET /v2/store/order/:orderId controllers.StoreApiController.getOrderById(orderId: Long)
POST /v2/store/order controllers.StoreApiController.placeOrder()
#Functions for Store API
DELETE /v2/store/order/:orderId controllers.StoreApiController.deleteOrder(orderId: String)
GET /v2/store/inventory controllers.StoreApiController.getInventory()
GET /v2/store/order/:orderId controllers.StoreApiController.getOrderById(orderId: Long)
POST /v2/store/order controllers.StoreApiController.placeOrder()
#Functions for User API
POST /v2/user controllers.UserApiController.createUser()
POST /v2/user/createWithArray controllers.UserApiController.createUsersWithArrayInput()
POST /v2/user/createWithList controllers.UserApiController.createUsersWithListInput()
DELETE /v2/user/:username controllers.UserApiController.deleteUser(username: String)
GET /v2/user/:username controllers.UserApiController.getUserByName(username: String)
GET /v2/user/login controllers.UserApiController.loginUser()
GET /v2/user/logout controllers.UserApiController.logoutUser()
PUT /v2/user/:username controllers.UserApiController.updateUser(username: String)
#Functions for User API
POST /v2/user controllers.UserApiController.createUser()
POST /v2/user/createWithArray controllers.UserApiController.createUsersWithArrayInput()
POST /v2/user/createWithList controllers.UserApiController.createUsersWithListInput()
DELETE /v2/user/:username controllers.UserApiController.deleteUser(username: String)
GET /v2/user/:username controllers.UserApiController.getUserByName(username: String)
GET /v2/user/login controllers.UserApiController.loginUser()
GET /v2/user/logout controllers.UserApiController.logoutUser()
PUT /v2/user/:username controllers.UserApiController.updateUser(username: String)
# Map static resources from the /public folder to the /assets URL path
GET /assets/*file controllers.Assets.at(file)
@@ -25,7 +25,7 @@ public class Pet {
private String name = null;
@JsonProperty("photoUrls")
private List<String> photoUrls = new ArrayList<>();
private List<String> photoUrls = new ArrayList<String>();
@JsonProperty("tags")
private List<Tag> tags = null;
@@ -149,7 +149,7 @@ public class Pet {
public Pet addTagsItem(Tag tagsItem) {
if (tags == null) {
tags = new ArrayList<>();
tags = new ArrayList<Tag>();
}
tags.add(tagsItem);
return this;
@@ -2,34 +2,34 @@
# This file defines all application routes (Higher priority routes first)
# ~~~~
GET /api controllers.ApiDocController.api
GET /api controllers.ApiDocController.api
#Functions for Pet API
POST /v2/pet controllers.PetApiController.addPet()
DELETE /v2/pet/:petId controllers.PetApiController.deletePet(petId: Long)
GET /v2/pet/findByStatus controllers.PetApiController.findPetsByStatus()
GET /v2/pet/findByTags controllers.PetApiController.findPetsByTags()
GET /v2/pet/:petId controllers.PetApiController.getPetById(petId: Long)
PUT /v2/pet controllers.PetApiController.updatePet()
POST /v2/pet/:petId controllers.PetApiController.updatePetWithForm(petId: Long)
POST /v2/pet/:petId/uploadImage controllers.PetApiController.uploadFile(petId: Long)
#Functions for Pet API
POST /v2/pet controllers.PetApiController.addPet()
DELETE /v2/pet/:petId controllers.PetApiController.deletePet(petId: Long)
GET /v2/pet/findByStatus controllers.PetApiController.findPetsByStatus()
GET /v2/pet/findByTags controllers.PetApiController.findPetsByTags()
GET /v2/pet/:petId controllers.PetApiController.getPetById(petId: Long)
PUT /v2/pet controllers.PetApiController.updatePet()
POST /v2/pet/:petId controllers.PetApiController.updatePetWithForm(petId: Long)
POST /v2/pet/:petId/uploadImage controllers.PetApiController.uploadFile(petId: Long)
#Functions for Store API
DELETE /v2/store/order/:orderId controllers.StoreApiController.deleteOrder(orderId: String)
GET /v2/store/inventory controllers.StoreApiController.getInventory()
GET /v2/store/order/:orderId controllers.StoreApiController.getOrderById(orderId: Long)
POST /v2/store/order controllers.StoreApiController.placeOrder()
#Functions for Store API
DELETE /v2/store/order/:orderId controllers.StoreApiController.deleteOrder(orderId: String)
GET /v2/store/inventory controllers.StoreApiController.getInventory()
GET /v2/store/order/:orderId controllers.StoreApiController.getOrderById(orderId: Long)
POST /v2/store/order controllers.StoreApiController.placeOrder()
#Functions for User API
POST /v2/user controllers.UserApiController.createUser()
POST /v2/user/createWithArray controllers.UserApiController.createUsersWithArrayInput()
POST /v2/user/createWithList controllers.UserApiController.createUsersWithListInput()
DELETE /v2/user/:username controllers.UserApiController.deleteUser(username: String)
GET /v2/user/:username controllers.UserApiController.getUserByName(username: String)
GET /v2/user/login controllers.UserApiController.loginUser()
GET /v2/user/logout controllers.UserApiController.logoutUser()
PUT /v2/user/:username controllers.UserApiController.updateUser(username: String)
#Functions for User API
POST /v2/user controllers.UserApiController.createUser()
POST /v2/user/createWithArray controllers.UserApiController.createUsersWithArrayInput()
POST /v2/user/createWithList controllers.UserApiController.createUsersWithListInput()
DELETE /v2/user/:username controllers.UserApiController.deleteUser(username: String)
GET /v2/user/:username controllers.UserApiController.getUserByName(username: String)
GET /v2/user/login controllers.UserApiController.loginUser()
GET /v2/user/logout controllers.UserApiController.logoutUser()
PUT /v2/user/:username controllers.UserApiController.updateUser(username: String)
# Map static resources from the /public folder to the /assets URL path
GET /assets/*file controllers.Assets.at(file)
@@ -25,7 +25,7 @@ public class Pet {
private String name = null;
@JsonProperty("photoUrls")
private List<String> photoUrls = new ArrayList<>();
private List<String> photoUrls = new ArrayList<String>();
@JsonProperty("tags")
private List<Tag> tags = null;
@@ -149,7 +149,7 @@ public class Pet {
public Pet addTagsItem(Tag tagsItem) {
if (tags == null) {
tags = new ArrayList<>();
tags = new ArrayList<Tag>();
}
tags.add(tagsItem);
return this;
@@ -2,34 +2,34 @@
# This file defines all application routes (Higher priority routes first)
# ~~~~
GET /api controllers.ApiDocController.api
GET /api controllers.ApiDocController.api
#Functions for Pet API
POST /v2/pet controllers.PetApiController.addPet()
DELETE /v2/pet/:petId controllers.PetApiController.deletePet(petId: Long)
GET /v2/pet/findByStatus controllers.PetApiController.findPetsByStatus()
GET /v2/pet/findByTags controllers.PetApiController.findPetsByTags()
GET /v2/pet/:petId controllers.PetApiController.getPetById(petId: Long)
PUT /v2/pet controllers.PetApiController.updatePet()
POST /v2/pet/:petId controllers.PetApiController.updatePetWithForm(petId: Long)
POST /v2/pet/:petId/uploadImage controllers.PetApiController.uploadFile(petId: Long)
#Functions for Pet API
POST /v2/pet controllers.PetApiController.addPet()
DELETE /v2/pet/:petId controllers.PetApiController.deletePet(petId: Long)
GET /v2/pet/findByStatus controllers.PetApiController.findPetsByStatus()
GET /v2/pet/findByTags controllers.PetApiController.findPetsByTags()
GET /v2/pet/:petId controllers.PetApiController.getPetById(petId: Long)
PUT /v2/pet controllers.PetApiController.updatePet()
POST /v2/pet/:petId controllers.PetApiController.updatePetWithForm(petId: Long)
POST /v2/pet/:petId/uploadImage controllers.PetApiController.uploadFile(petId: Long)
#Functions for Store API
DELETE /v2/store/order/:orderId controllers.StoreApiController.deleteOrder(orderId: String)
GET /v2/store/inventory controllers.StoreApiController.getInventory()
GET /v2/store/order/:orderId controllers.StoreApiController.getOrderById(orderId: Long)
POST /v2/store/order controllers.StoreApiController.placeOrder()
#Functions for Store API
DELETE /v2/store/order/:orderId controllers.StoreApiController.deleteOrder(orderId: String)
GET /v2/store/inventory controllers.StoreApiController.getInventory()
GET /v2/store/order/:orderId controllers.StoreApiController.getOrderById(orderId: Long)
POST /v2/store/order controllers.StoreApiController.placeOrder()
#Functions for User API
POST /v2/user controllers.UserApiController.createUser()
POST /v2/user/createWithArray controllers.UserApiController.createUsersWithArrayInput()
POST /v2/user/createWithList controllers.UserApiController.createUsersWithListInput()
DELETE /v2/user/:username controllers.UserApiController.deleteUser(username: String)
GET /v2/user/:username controllers.UserApiController.getUserByName(username: String)
GET /v2/user/login controllers.UserApiController.loginUser()
GET /v2/user/logout controllers.UserApiController.logoutUser()
PUT /v2/user/:username controllers.UserApiController.updateUser(username: String)
#Functions for User API
POST /v2/user controllers.UserApiController.createUser()
POST /v2/user/createWithArray controllers.UserApiController.createUsersWithArrayInput()
POST /v2/user/createWithList controllers.UserApiController.createUsersWithListInput()
DELETE /v2/user/:username controllers.UserApiController.deleteUser(username: String)
GET /v2/user/:username controllers.UserApiController.getUserByName(username: String)
GET /v2/user/login controllers.UserApiController.loginUser()
GET /v2/user/logout controllers.UserApiController.logoutUser()
PUT /v2/user/:username controllers.UserApiController.updateUser(username: String)
# Map static resources from the /public folder to the /assets URL path
GET /assets/*file controllers.Assets.at(file)
@@ -25,7 +25,7 @@ public class Pet {
private String name = null;
@JsonProperty("photoUrls")
private List<String> photoUrls = new ArrayList<>();
private List<String> photoUrls = new ArrayList<String>();
@JsonProperty("tags")
private List<Tag> tags = null;
@@ -149,7 +149,7 @@ public class Pet {
public Pet addTagsItem(Tag tagsItem) {
if (tags == null) {
tags = new ArrayList<>();
tags = new ArrayList<Tag>();
}
tags.add(tagsItem);
return this;
@@ -4,31 +4,31 @@
#Functions for Pet API
POST /v2/pet controllers.PetApiController.addPet()
DELETE /v2/pet/:petId controllers.PetApiController.deletePet(petId: Long)
GET /v2/pet/findByStatus controllers.PetApiController.findPetsByStatus()
GET /v2/pet/findByTags controllers.PetApiController.findPetsByTags()
GET /v2/pet/:petId controllers.PetApiController.getPetById(petId: Long)
PUT /v2/pet controllers.PetApiController.updatePet()
POST /v2/pet/:petId controllers.PetApiController.updatePetWithForm(petId: Long)
POST /v2/pet/:petId/uploadImage controllers.PetApiController.uploadFile(petId: Long)
#Functions for Pet API
POST /v2/pet controllers.PetApiController.addPet()
DELETE /v2/pet/:petId controllers.PetApiController.deletePet(petId: Long)
GET /v2/pet/findByStatus controllers.PetApiController.findPetsByStatus()
GET /v2/pet/findByTags controllers.PetApiController.findPetsByTags()
GET /v2/pet/:petId controllers.PetApiController.getPetById(petId: Long)
PUT /v2/pet controllers.PetApiController.updatePet()
POST /v2/pet/:petId controllers.PetApiController.updatePetWithForm(petId: Long)
POST /v2/pet/:petId/uploadImage controllers.PetApiController.uploadFile(petId: Long)
#Functions for Store API
DELETE /v2/store/order/:orderId controllers.StoreApiController.deleteOrder(orderId: String)
GET /v2/store/inventory controllers.StoreApiController.getInventory()
GET /v2/store/order/:orderId controllers.StoreApiController.getOrderById(orderId: Long)
POST /v2/store/order controllers.StoreApiController.placeOrder()
#Functions for Store API
DELETE /v2/store/order/:orderId controllers.StoreApiController.deleteOrder(orderId: String)
GET /v2/store/inventory controllers.StoreApiController.getInventory()
GET /v2/store/order/:orderId controllers.StoreApiController.getOrderById(orderId: Long)
POST /v2/store/order controllers.StoreApiController.placeOrder()
#Functions for User API
POST /v2/user controllers.UserApiController.createUser()
POST /v2/user/createWithArray controllers.UserApiController.createUsersWithArrayInput()
POST /v2/user/createWithList controllers.UserApiController.createUsersWithListInput()
DELETE /v2/user/:username controllers.UserApiController.deleteUser(username: String)
GET /v2/user/:username controllers.UserApiController.getUserByName(username: String)
GET /v2/user/login controllers.UserApiController.loginUser()
GET /v2/user/logout controllers.UserApiController.logoutUser()
PUT /v2/user/:username controllers.UserApiController.updateUser(username: String)
#Functions for User API
POST /v2/user controllers.UserApiController.createUser()
POST /v2/user/createWithArray controllers.UserApiController.createUsersWithArrayInput()
POST /v2/user/createWithList controllers.UserApiController.createUsersWithListInput()
DELETE /v2/user/:username controllers.UserApiController.deleteUser(username: String)
GET /v2/user/:username controllers.UserApiController.getUserByName(username: String)
GET /v2/user/login controllers.UserApiController.loginUser()
GET /v2/user/logout controllers.UserApiController.logoutUser()
PUT /v2/user/:username controllers.UserApiController.updateUser(username: String)
# Map static resources from the /public folder to the /assets URL path
GET /assets/*file controllers.Assets.at(file)
@@ -25,7 +25,7 @@ public class Pet {
private String name = null;
@JsonProperty("photoUrls")
private List<String> photoUrls = new ArrayList<>();
private List<String> photoUrls = new ArrayList<String>();
@JsonProperty("tags")
private List<Tag> tags = null;
@@ -149,7 +149,7 @@ public class Pet {
public Pet addTagsItem(Tag tagsItem) {
if (tags == null) {
tags = new ArrayList<>();
tags = new ArrayList<Tag>();
}
tags.add(tagsItem);
return this;
@@ -2,34 +2,34 @@
# This file defines all application routes (Higher priority routes first)
# ~~~~
GET /api controllers.ApiDocController.api
GET /api controllers.ApiDocController.api
#Functions for Pet API
POST /v2/pet controllers.PetApiController.addPet()
DELETE /v2/pet/:petId controllers.PetApiController.deletePet(petId: Long)
GET /v2/pet/findByStatus controllers.PetApiController.findPetsByStatus()
GET /v2/pet/findByTags controllers.PetApiController.findPetsByTags()
GET /v2/pet/:petId controllers.PetApiController.getPetById(petId: Long)
PUT /v2/pet controllers.PetApiController.updatePet()
POST /v2/pet/:petId controllers.PetApiController.updatePetWithForm(petId: Long)
POST /v2/pet/:petId/uploadImage controllers.PetApiController.uploadFile(petId: Long)
#Functions for Pet API
POST /v2/pet controllers.PetApiController.addPet()
DELETE /v2/pet/:petId controllers.PetApiController.deletePet(petId: Long)
GET /v2/pet/findByStatus controllers.PetApiController.findPetsByStatus()
GET /v2/pet/findByTags controllers.PetApiController.findPetsByTags()
GET /v2/pet/:petId controllers.PetApiController.getPetById(petId: Long)
PUT /v2/pet controllers.PetApiController.updatePet()
POST /v2/pet/:petId controllers.PetApiController.updatePetWithForm(petId: Long)
POST /v2/pet/:petId/uploadImage controllers.PetApiController.uploadFile(petId: Long)
#Functions for Store API
DELETE /v2/store/order/:orderId controllers.StoreApiController.deleteOrder(orderId: String)
GET /v2/store/inventory controllers.StoreApiController.getInventory()
GET /v2/store/order/:orderId controllers.StoreApiController.getOrderById(orderId: Long)
POST /v2/store/order controllers.StoreApiController.placeOrder()
#Functions for Store API
DELETE /v2/store/order/:orderId controllers.StoreApiController.deleteOrder(orderId: String)
GET /v2/store/inventory controllers.StoreApiController.getInventory()
GET /v2/store/order/:orderId controllers.StoreApiController.getOrderById(orderId: Long)
POST /v2/store/order controllers.StoreApiController.placeOrder()
#Functions for User API
POST /v2/user controllers.UserApiController.createUser()
POST /v2/user/createWithArray controllers.UserApiController.createUsersWithArrayInput()
POST /v2/user/createWithList controllers.UserApiController.createUsersWithListInput()
DELETE /v2/user/:username controllers.UserApiController.deleteUser(username: String)
GET /v2/user/:username controllers.UserApiController.getUserByName(username: String)
GET /v2/user/login controllers.UserApiController.loginUser()
GET /v2/user/logout controllers.UserApiController.logoutUser()
PUT /v2/user/:username controllers.UserApiController.updateUser(username: String)
#Functions for User API
POST /v2/user controllers.UserApiController.createUser()
POST /v2/user/createWithArray controllers.UserApiController.createUsersWithArrayInput()
POST /v2/user/createWithList controllers.UserApiController.createUsersWithListInput()
DELETE /v2/user/:username controllers.UserApiController.deleteUser(username: String)
GET /v2/user/:username controllers.UserApiController.getUserByName(username: String)
GET /v2/user/login controllers.UserApiController.loginUser()
GET /v2/user/logout controllers.UserApiController.logoutUser()
PUT /v2/user/:username controllers.UserApiController.updateUser(username: String)
# Map static resources from the /public folder to the /assets URL path
GET /assets/*file controllers.Assets.at(file)
@@ -25,7 +25,7 @@ public class Pet {
private String name = null;
@JsonProperty("photoUrls")
private List<String> photoUrls = new ArrayList<>();
private List<String> photoUrls = new ArrayList<String>();
@JsonProperty("tags")
private List<Tag> tags = null;
@@ -149,7 +149,7 @@ public class Pet {
public Pet addTagsItem(Tag tagsItem) {
if (tags == null) {
tags = new ArrayList<>();
tags = new ArrayList<Tag>();
}
tags.add(tagsItem);
return this;
@@ -2,34 +2,34 @@
# This file defines all application routes (Higher priority routes first)
# ~~~~
GET /api controllers.ApiDocController.api
GET /api controllers.ApiDocController.api
#Functions for Pet API
POST /v2/pet controllers.PetApiController.addPet()
DELETE /v2/pet/:petId controllers.PetApiController.deletePet(petId: Long)
GET /v2/pet/findByStatus controllers.PetApiController.findPetsByStatus()
GET /v2/pet/findByTags controllers.PetApiController.findPetsByTags()
GET /v2/pet/:petId controllers.PetApiController.getPetById(petId: Long)
PUT /v2/pet controllers.PetApiController.updatePet()
POST /v2/pet/:petId controllers.PetApiController.updatePetWithForm(petId: Long)
POST /v2/pet/:petId/uploadImage controllers.PetApiController.uploadFile(petId: Long)
#Functions for Pet API
POST /v2/pet controllers.PetApiController.addPet()
DELETE /v2/pet/:petId controllers.PetApiController.deletePet(petId: Long)
GET /v2/pet/findByStatus controllers.PetApiController.findPetsByStatus()
GET /v2/pet/findByTags controllers.PetApiController.findPetsByTags()
GET /v2/pet/:petId controllers.PetApiController.getPetById(petId: Long)
PUT /v2/pet controllers.PetApiController.updatePet()
POST /v2/pet/:petId controllers.PetApiController.updatePetWithForm(petId: Long)
POST /v2/pet/:petId/uploadImage controllers.PetApiController.uploadFile(petId: Long)
#Functions for Store API
DELETE /v2/store/order/:orderId controllers.StoreApiController.deleteOrder(orderId: String)
GET /v2/store/inventory controllers.StoreApiController.getInventory()
GET /v2/store/order/:orderId controllers.StoreApiController.getOrderById(orderId: Long)
POST /v2/store/order controllers.StoreApiController.placeOrder()
#Functions for Store API
DELETE /v2/store/order/:orderId controllers.StoreApiController.deleteOrder(orderId: String)
GET /v2/store/inventory controllers.StoreApiController.getInventory()
GET /v2/store/order/:orderId controllers.StoreApiController.getOrderById(orderId: Long)
POST /v2/store/order controllers.StoreApiController.placeOrder()
#Functions for User API
POST /v2/user controllers.UserApiController.createUser()
POST /v2/user/createWithArray controllers.UserApiController.createUsersWithArrayInput()
POST /v2/user/createWithList controllers.UserApiController.createUsersWithListInput()
DELETE /v2/user/:username controllers.UserApiController.deleteUser(username: String)
GET /v2/user/:username controllers.UserApiController.getUserByName(username: String)
GET /v2/user/login controllers.UserApiController.loginUser()
GET /v2/user/logout controllers.UserApiController.logoutUser()
PUT /v2/user/:username controllers.UserApiController.updateUser(username: String)
#Functions for User API
POST /v2/user controllers.UserApiController.createUser()
POST /v2/user/createWithArray controllers.UserApiController.createUsersWithArrayInput()
POST /v2/user/createWithList controllers.UserApiController.createUsersWithListInput()
DELETE /v2/user/:username controllers.UserApiController.deleteUser(username: String)
GET /v2/user/:username controllers.UserApiController.getUserByName(username: String)
GET /v2/user/login controllers.UserApiController.loginUser()
GET /v2/user/logout controllers.UserApiController.logoutUser()
PUT /v2/user/:username controllers.UserApiController.updateUser(username: String)
# Map static resources from the /public folder to the /assets URL path
GET /assets/*file controllers.Assets.at(file)