diff --git a/modules/swagger-codegen/src/main/java/io/swagger/codegen/DefaultCodegen.java b/modules/swagger-codegen/src/main/java/io/swagger/codegen/DefaultCodegen.java index f53b5943e19d..dfdcf14e9961 100644 --- a/modules/swagger-codegen/src/main/java/io/swagger/codegen/DefaultCodegen.java +++ b/modules/swagger-codegen/src/main/java/io/swagger/codegen/DefaultCodegen.java @@ -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(); + parent.children = new ArrayList(); } 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") + ""; @@ -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 _enum = sp.getEnum(); property._enum = new ArrayList(); 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 _enum = sp.getEnum(); property._enum = new ArrayList(); 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 _enum = sp.getEnum(); property._enum = new ArrayList(); 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 _enum = sp.getEnum(); property._enum = new ArrayList(); 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 _enum = sp.getEnum(); property._enum = new ArrayList(); for(String i : _enum) { - property._enum.add(i); + property._enum.add(i); } property.isEnum = true; @@ -1757,7 +1757,7 @@ public class DefaultCodegen { List _enum = sp.getEnum(); property._enum = new ArrayList(); 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 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() { - @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() { + @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 words) { - reservedWords = new HashSet(); - for (String word : words) { - reservedWords.add(word.toLowerCase()); - } + reservedWords = new HashSet(); + 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 properties, List required, - Map allProperties, List allRequired) { + Map allProperties, List 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; diff --git a/modules/swagger-codegen/src/main/resources/JavaPlayFramework/routes.mustache b/modules/swagger-codegen/src/main/resources/JavaPlayFramework/routes.mustache index 8303ec77af31..9ab016de8c7c 100644 --- a/modules/swagger-codegen/src/main/resources/JavaPlayFramework/routes.mustache +++ b/modules/swagger-codegen/src/main/resources/JavaPlayFramework/routes.mustache @@ -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 diff --git a/samples/server/petstore/java-play-framework-controller-only/app/apimodels/Pet.java b/samples/server/petstore/java-play-framework-controller-only/app/apimodels/Pet.java index 5e5ff3762945..fc3103131809 100644 --- a/samples/server/petstore/java-play-framework-controller-only/app/apimodels/Pet.java +++ b/samples/server/petstore/java-play-framework-controller-only/app/apimodels/Pet.java @@ -25,7 +25,7 @@ public class Pet { private String name = null; @JsonProperty("photoUrls") - private List photoUrls = new ArrayList<>(); + private List photoUrls = new ArrayList(); @JsonProperty("tags") private List tags = null; @@ -149,7 +149,7 @@ public class Pet { public Pet addTagsItem(Tag tagsItem) { if (tags == null) { - tags = new ArrayList<>(); + tags = new ArrayList(); } tags.add(tagsItem); return this; diff --git a/samples/server/petstore/java-play-framework-controller-only/conf/routes b/samples/server/petstore/java-play-framework-controller-only/conf/routes index 775497a59fcb..80725da2d0da 100644 --- a/samples/server/petstore/java-play-framework-controller-only/conf/routes +++ b/samples/server/petstore/java-play-framework-controller-only/conf/routes @@ -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) diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/AdditionalPropertiesClass.java b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/AdditionalPropertiesClass.java index 0d1d7a1fd98e..106b4d4f02c4 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/AdditionalPropertiesClass.java +++ b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/AdditionalPropertiesClass.java @@ -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(); } this.mapProperty.put(key, mapPropertyItem); return this; @@ -52,7 +52,7 @@ public class AdditionalPropertiesClass { public AdditionalPropertiesClass putMapOfMapPropertyItem(String key, Map mapOfMapPropertyItem) { if (this.mapOfMapProperty == null) { - this.mapOfMapProperty = new HashMap<>(); + this.mapOfMapProperty = new HashMap>(); } this.mapOfMapProperty.put(key, mapOfMapPropertyItem); return this; diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/ArrayOfArrayOfNumberOnly.java b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/ArrayOfArrayOfNumberOnly.java index ebeb622cd165..e1e1bb6038ce 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/ArrayOfArrayOfNumberOnly.java +++ b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/ArrayOfArrayOfNumberOnly.java @@ -24,7 +24,7 @@ public class ArrayOfArrayOfNumberOnly { public ArrayOfArrayOfNumberOnly addArrayArrayNumberItem(List arrayArrayNumberItem) { if (arrayArrayNumber == null) { - arrayArrayNumber = new ArrayList<>(); + arrayArrayNumber = new ArrayList>(); } arrayArrayNumber.add(arrayArrayNumberItem); return this; diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/ArrayOfNumberOnly.java b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/ArrayOfNumberOnly.java index 193c2f77177b..52a1a985cdc1 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/ArrayOfNumberOnly.java +++ b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/ArrayOfNumberOnly.java @@ -24,7 +24,7 @@ public class ArrayOfNumberOnly { public ArrayOfNumberOnly addArrayNumberItem(BigDecimal arrayNumberItem) { if (arrayNumber == null) { - arrayNumber = new ArrayList<>(); + arrayNumber = new ArrayList(); } arrayNumber.add(arrayNumberItem); return this; diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/ArrayTest.java b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/ArrayTest.java index 80cefa109d66..0825d79da846 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/ArrayTest.java +++ b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/ArrayTest.java @@ -30,7 +30,7 @@ public class ArrayTest { public ArrayTest addArrayOfStringItem(String arrayOfStringItem) { if (arrayOfString == null) { - arrayOfString = new ArrayList<>(); + arrayOfString = new ArrayList(); } arrayOfString.add(arrayOfStringItem); return this; @@ -55,7 +55,7 @@ public class ArrayTest { public ArrayTest addArrayArrayOfIntegerItem(List arrayArrayOfIntegerItem) { if (arrayArrayOfInteger == null) { - arrayArrayOfInteger = new ArrayList<>(); + arrayArrayOfInteger = new ArrayList>(); } arrayArrayOfInteger.add(arrayArrayOfIntegerItem); return this; @@ -81,7 +81,7 @@ public class ArrayTest { public ArrayTest addArrayArrayOfModelItem(List arrayArrayOfModelItem) { if (arrayArrayOfModel == null) { - arrayArrayOfModel = new ArrayList<>(); + arrayArrayOfModel = new ArrayList>(); } arrayArrayOfModel.add(arrayArrayOfModelItem); return this; diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/EnumArrays.java b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/EnumArrays.java index a82c9ee422d7..5aec904bbaa6 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/EnumArrays.java +++ b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/EnumArrays.java @@ -105,7 +105,7 @@ public class EnumArrays { public EnumArrays addArrayEnumItem(ArrayEnumEnum arrayEnumItem) { if (arrayEnum == null) { - arrayEnum = new ArrayList<>(); + arrayEnum = new ArrayList(); } arrayEnum.add(arrayEnumItem); return this; diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/MapTest.java b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/MapTest.java index 7cd05af295f7..80b7e64410f0 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/MapTest.java +++ b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/MapTest.java @@ -58,7 +58,7 @@ public class MapTest { public MapTest putMapMapOfStringItem(String key, Map mapMapOfStringItem) { if (this.mapMapOfString == null) { - this.mapMapOfString = new HashMap<>(); + this.mapMapOfString = new HashMap>(); } 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(); } this.mapOfEnumString.put(key, mapOfEnumStringItem); return this; diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/MixedPropertiesAndAdditionalPropertiesClass.java index e52678fa5c45..0706c0eb6f62 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/MixedPropertiesAndAdditionalPropertiesClass.java @@ -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(); } this.map.put(key, mapItem); return this; diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/Pet.java b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/Pet.java index aaa139c566df..faa93cbc881f 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/Pet.java +++ b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/Pet.java @@ -25,7 +25,7 @@ public class Pet { private String name = null; @JsonProperty("photoUrls") - private List photoUrls = new ArrayList<>(); + private List photoUrls = new ArrayList(); @JsonProperty("tags") private List tags = null; @@ -149,7 +149,7 @@ public class Pet { public Pet addTagsItem(Tag tagsItem) { if (tags == null) { - tags = new ArrayList<>(); + tags = new ArrayList(); } tags.add(tagsItem); return this; diff --git a/samples/server/petstore/java-play-framework-no-bean-validation/app/apimodels/Pet.java b/samples/server/petstore/java-play-framework-no-bean-validation/app/apimodels/Pet.java index ec14d76b41f8..de2facfd58fc 100644 --- a/samples/server/petstore/java-play-framework-no-bean-validation/app/apimodels/Pet.java +++ b/samples/server/petstore/java-play-framework-no-bean-validation/app/apimodels/Pet.java @@ -24,7 +24,7 @@ public class Pet { private String name = null; @JsonProperty("photoUrls") - private List photoUrls = new ArrayList<>(); + private List photoUrls = new ArrayList(); @JsonProperty("tags") private List tags = null; @@ -145,7 +145,7 @@ public class Pet { public Pet addTagsItem(Tag tagsItem) { if (tags == null) { - tags = new ArrayList<>(); + tags = new ArrayList(); } tags.add(tagsItem); return this; diff --git a/samples/server/petstore/java-play-framework-no-bean-validation/conf/routes b/samples/server/petstore/java-play-framework-no-bean-validation/conf/routes index 775497a59fcb..80725da2d0da 100644 --- a/samples/server/petstore/java-play-framework-no-bean-validation/conf/routes +++ b/samples/server/petstore/java-play-framework-no-bean-validation/conf/routes @@ -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) diff --git a/samples/server/petstore/java-play-framework-no-exception-handling/app/apimodels/Pet.java b/samples/server/petstore/java-play-framework-no-exception-handling/app/apimodels/Pet.java index 5e5ff3762945..fc3103131809 100644 --- a/samples/server/petstore/java-play-framework-no-exception-handling/app/apimodels/Pet.java +++ b/samples/server/petstore/java-play-framework-no-exception-handling/app/apimodels/Pet.java @@ -25,7 +25,7 @@ public class Pet { private String name = null; @JsonProperty("photoUrls") - private List photoUrls = new ArrayList<>(); + private List photoUrls = new ArrayList(); @JsonProperty("tags") private List tags = null; @@ -149,7 +149,7 @@ public class Pet { public Pet addTagsItem(Tag tagsItem) { if (tags == null) { - tags = new ArrayList<>(); + tags = new ArrayList(); } tags.add(tagsItem); return this; diff --git a/samples/server/petstore/java-play-framework-no-exception-handling/conf/routes b/samples/server/petstore/java-play-framework-no-exception-handling/conf/routes index 775497a59fcb..80725da2d0da 100644 --- a/samples/server/petstore/java-play-framework-no-exception-handling/conf/routes +++ b/samples/server/petstore/java-play-framework-no-exception-handling/conf/routes @@ -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) diff --git a/samples/server/petstore/java-play-framework-no-interface/app/apimodels/Pet.java b/samples/server/petstore/java-play-framework-no-interface/app/apimodels/Pet.java index 5e5ff3762945..fc3103131809 100644 --- a/samples/server/petstore/java-play-framework-no-interface/app/apimodels/Pet.java +++ b/samples/server/petstore/java-play-framework-no-interface/app/apimodels/Pet.java @@ -25,7 +25,7 @@ public class Pet { private String name = null; @JsonProperty("photoUrls") - private List photoUrls = new ArrayList<>(); + private List photoUrls = new ArrayList(); @JsonProperty("tags") private List tags = null; @@ -149,7 +149,7 @@ public class Pet { public Pet addTagsItem(Tag tagsItem) { if (tags == null) { - tags = new ArrayList<>(); + tags = new ArrayList(); } tags.add(tagsItem); return this; diff --git a/samples/server/petstore/java-play-framework-no-interface/conf/routes b/samples/server/petstore/java-play-framework-no-interface/conf/routes index 775497a59fcb..80725da2d0da 100644 --- a/samples/server/petstore/java-play-framework-no-interface/conf/routes +++ b/samples/server/petstore/java-play-framework-no-interface/conf/routes @@ -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) diff --git a/samples/server/petstore/java-play-framework-no-swagger-ui/app/apimodels/Pet.java b/samples/server/petstore/java-play-framework-no-swagger-ui/app/apimodels/Pet.java index 5e5ff3762945..fc3103131809 100644 --- a/samples/server/petstore/java-play-framework-no-swagger-ui/app/apimodels/Pet.java +++ b/samples/server/petstore/java-play-framework-no-swagger-ui/app/apimodels/Pet.java @@ -25,7 +25,7 @@ public class Pet { private String name = null; @JsonProperty("photoUrls") - private List photoUrls = new ArrayList<>(); + private List photoUrls = new ArrayList(); @JsonProperty("tags") private List tags = null; @@ -149,7 +149,7 @@ public class Pet { public Pet addTagsItem(Tag tagsItem) { if (tags == null) { - tags = new ArrayList<>(); + tags = new ArrayList(); } tags.add(tagsItem); return this; diff --git a/samples/server/petstore/java-play-framework-no-swagger-ui/conf/routes b/samples/server/petstore/java-play-framework-no-swagger-ui/conf/routes index faa1a4f028fe..4bbbee5d51b7 100644 --- a/samples/server/petstore/java-play-framework-no-swagger-ui/conf/routes +++ b/samples/server/petstore/java-play-framework-no-swagger-ui/conf/routes @@ -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) diff --git a/samples/server/petstore/java-play-framework-no-wrap-calls/app/apimodels/Pet.java b/samples/server/petstore/java-play-framework-no-wrap-calls/app/apimodels/Pet.java index 5e5ff3762945..fc3103131809 100644 --- a/samples/server/petstore/java-play-framework-no-wrap-calls/app/apimodels/Pet.java +++ b/samples/server/petstore/java-play-framework-no-wrap-calls/app/apimodels/Pet.java @@ -25,7 +25,7 @@ public class Pet { private String name = null; @JsonProperty("photoUrls") - private List photoUrls = new ArrayList<>(); + private List photoUrls = new ArrayList(); @JsonProperty("tags") private List tags = null; @@ -149,7 +149,7 @@ public class Pet { public Pet addTagsItem(Tag tagsItem) { if (tags == null) { - tags = new ArrayList<>(); + tags = new ArrayList(); } tags.add(tagsItem); return this; diff --git a/samples/server/petstore/java-play-framework-no-wrap-calls/conf/routes b/samples/server/petstore/java-play-framework-no-wrap-calls/conf/routes index 775497a59fcb..80725da2d0da 100644 --- a/samples/server/petstore/java-play-framework-no-wrap-calls/conf/routes +++ b/samples/server/petstore/java-play-framework-no-wrap-calls/conf/routes @@ -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) diff --git a/samples/server/petstore/java-play-framework/app/apimodels/Pet.java b/samples/server/petstore/java-play-framework/app/apimodels/Pet.java index 5e5ff3762945..fc3103131809 100644 --- a/samples/server/petstore/java-play-framework/app/apimodels/Pet.java +++ b/samples/server/petstore/java-play-framework/app/apimodels/Pet.java @@ -25,7 +25,7 @@ public class Pet { private String name = null; @JsonProperty("photoUrls") - private List photoUrls = new ArrayList<>(); + private List photoUrls = new ArrayList(); @JsonProperty("tags") private List tags = null; @@ -149,7 +149,7 @@ public class Pet { public Pet addTagsItem(Tag tagsItem) { if (tags == null) { - tags = new ArrayList<>(); + tags = new ArrayList(); } tags.add(tagsItem); return this; diff --git a/samples/server/petstore/java-play-framework/conf/routes b/samples/server/petstore/java-play-framework/conf/routes index 775497a59fcb..80725da2d0da 100644 --- a/samples/server/petstore/java-play-framework/conf/routes +++ b/samples/server/petstore/java-play-framework/conf/routes @@ -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)