diff --git a/modules/swagger-codegen/src/main/resources/JavaPlayFramework/routes.mustache b/modules/swagger-codegen/src/main/resources/JavaPlayFramework/routes.mustache index 9ab016de8c7..2c3ac1b218d 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}}: {{#isUuid}}java.util.UUID{{/isUuid}}{{^isUuid}}{{{dataType}}}{{/isUuid}}{{#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 fc310313180..5e5ff376294 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 Pet tags(List tags) { 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 80725da2d0d..775497a59fc 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-controller-only/public/swagger.json b/samples/server/petstore/java-play-framework-controller-only/public/swagger.json index 7c571eca3fe..0f5defa6026 100644 --- a/samples/server/petstore/java-play-framework-controller-only/public/swagger.json +++ b/samples/server/petstore/java-play-framework-controller-only/public/swagger.json @@ -112,8 +112,8 @@ "type" : "array", "items" : { "type" : "string", - "enum" : [ "available", "pending", "sold" ], - "default" : "available" + "default" : "available", + "enum" : [ "available", "pending", "sold" ] }, "collectionFormat" : "csv" } ], @@ -134,7 +134,6 @@ "security" : [ { "petstore_auth" : [ "write:pets", "read:pets" ] } ], - "x-contentType" : "application/json", "x-accepts" : "application/json" } }, @@ -174,7 +173,6 @@ "petstore_auth" : [ "write:pets", "read:pets" ] } ], "deprecated" : true, - "x-contentType" : "application/json", "x-accepts" : "application/json" } }, @@ -210,7 +208,6 @@ "security" : [ { "api_key" : [ ] } ], - "x-contentType" : "application/json", "x-accepts" : "application/json" }, "post" : { @@ -278,7 +275,6 @@ "security" : [ { "petstore_auth" : [ "write:pets", "read:pets" ] } ], - "x-contentType" : "application/json", "x-accepts" : "application/json" } }, @@ -348,7 +344,6 @@ "security" : [ { "api_key" : [ ] } ], - "x-contentType" : "application/json", "x-accepts" : "application/json" } }, @@ -414,7 +409,6 @@ "description" : "Order not found" } }, - "x-contentType" : "application/json", "x-accepts" : "application/json" }, "delete" : { @@ -438,7 +432,6 @@ "description" : "Order not found" } }, - "x-contentType" : "application/json", "x-accepts" : "application/json" } }, @@ -566,7 +559,6 @@ "description" : "Invalid username/password supplied" } }, - "x-contentType" : "application/json", "x-accepts" : "application/json" } }, @@ -583,7 +575,6 @@ "description" : "successful operation" } }, - "x-contentType" : "application/json", "x-accepts" : "application/json" } }, @@ -615,7 +606,6 @@ "description" : "User not found" } }, - "x-contentType" : "application/json", "x-accepts" : "application/json" }, "put" : { @@ -671,7 +661,6 @@ "description" : "User not found" } }, - "x-contentType" : "application/json", "x-accepts" : "application/json" } } 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 106b4d4f02c..0d1d7a1fd98 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 AdditionalPropertiesClass mapProperty(Map mapProperty) { 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 AdditionalPropertiesClass mapOfMapProperty(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 e1e1bb6038c..ebeb622cd16 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 ArrayOfArrayOfNumberOnly arrayArrayNumber(List> arrayArr 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 52a1a985cdc..193c2f77177 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 ArrayOfNumberOnly arrayNumber(List arrayNumber) { 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 0825d79da84..80cefa109d6 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 ArrayTest arrayOfString(List arrayOfString) { public ArrayTest addArrayOfStringItem(String arrayOfStringItem) { if (arrayOfString == null) { - arrayOfString = new ArrayList(); + arrayOfString = new ArrayList<>(); } arrayOfString.add(arrayOfStringItem); return this; @@ -55,7 +55,7 @@ public ArrayTest arrayArrayOfInteger(List> arrayArrayOfInteger) { public ArrayTest addArrayArrayOfIntegerItem(List arrayArrayOfIntegerItem) { if (arrayArrayOfInteger == null) { - arrayArrayOfInteger = new ArrayList>(); + arrayArrayOfInteger = new ArrayList<>(); } arrayArrayOfInteger.add(arrayArrayOfIntegerItem); return this; @@ -81,7 +81,7 @@ public ArrayTest arrayArrayOfModel(List> arrayArrayOfModel) 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 5aec904bbaa..a82c9ee422d 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 EnumArrays arrayEnum(List arrayEnum) { 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 80b7e64410f..7cd05af295f 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 MapTest mapMapOfString(Map> mapMapOfString) { 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 MapTest mapOfEnumString(Map mapOfEnumString) { 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 0706c0eb6f6..e52678fa5c4 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 MixedPropertiesAndAdditionalPropertiesClass map(Map map) 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 faa93cbc881..aaa139c566d 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 Pet tags(List tags) { 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-fake-endpoints/public/swagger.json b/samples/server/petstore/java-play-framework-fake-endpoints/public/swagger.json index c751b91726d..d23a6018638 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints/public/swagger.json +++ b/samples/server/petstore/java-play-framework-fake-endpoints/public/swagger.json @@ -112,8 +112,8 @@ "type" : "array", "items" : { "type" : "string", - "enum" : [ "available", "pending", "sold" ], - "default" : "available" + "default" : "available", + "enum" : [ "available", "pending", "sold" ] }, "collectionFormat" : "csv" } ], @@ -134,7 +134,6 @@ "security" : [ { "petstore_auth" : [ "write:pets", "read:pets" ] } ], - "x-contentType" : "application/json", "x-accepts" : "application/json" } }, @@ -174,7 +173,6 @@ "petstore_auth" : [ "write:pets", "read:pets" ] } ], "deprecated" : true, - "x-contentType" : "application/json", "x-accepts" : "application/json" } }, @@ -210,7 +208,6 @@ "security" : [ { "api_key" : [ ] } ], - "x-contentType" : "application/json", "x-accepts" : "application/json" }, "post" : { @@ -278,7 +275,6 @@ "security" : [ { "petstore_auth" : [ "write:pets", "read:pets" ] } ], - "x-contentType" : "application/json", "x-accepts" : "application/json" } }, @@ -348,7 +344,6 @@ "security" : [ { "api_key" : [ ] } ], - "x-contentType" : "application/json", "x-accepts" : "application/json" } }, @@ -414,7 +409,6 @@ "description" : "Order not found" } }, - "x-contentType" : "application/json", "x-accepts" : "application/json" }, "delete" : { @@ -438,7 +432,6 @@ "description" : "Order not found" } }, - "x-contentType" : "application/json", "x-accepts" : "application/json" } }, @@ -566,7 +559,6 @@ "description" : "Invalid username/password supplied" } }, - "x-contentType" : "application/json", "x-accepts" : "application/json" } }, @@ -583,7 +575,6 @@ "description" : "successful operation" } }, - "x-contentType" : "application/json", "x-accepts" : "application/json" } }, @@ -615,7 +606,6 @@ "description" : "User not found" } }, - "x-contentType" : "application/json", "x-accepts" : "application/json" }, "put" : { @@ -671,7 +661,6 @@ "description" : "User not found" } }, - "x-contentType" : "application/json", "x-accepts" : "application/json" } }, @@ -722,8 +711,8 @@ "type" : "array", "items" : { "type" : "string", - "enum" : [ ">", "$" ], - "default" : "$" + "default" : "$", + "enum" : [ ">", "$" ] } }, { "name" : "enum_form_string", @@ -741,8 +730,8 @@ "type" : "array", "items" : { "type" : "string", - "enum" : [ ">", "$" ], - "default" : "$" + "default" : "$", + "enum" : [ ">", "$" ] } }, { "name" : "enum_header_string", @@ -760,8 +749,8 @@ "type" : "array", "items" : { "type" : "string", - "enum" : [ ">", "$" ], - "default" : "$" + "default" : "$", + "enum" : [ ">", "$" ] } }, { "name" : "enum_query_string", 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 de2facfd58f..ec14d76b41f 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 Pet tags(List tags) { 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 80725da2d0d..775497a59fc 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-bean-validation/public/swagger.json b/samples/server/petstore/java-play-framework-no-bean-validation/public/swagger.json index 7c571eca3fe..0f5defa6026 100644 --- a/samples/server/petstore/java-play-framework-no-bean-validation/public/swagger.json +++ b/samples/server/petstore/java-play-framework-no-bean-validation/public/swagger.json @@ -112,8 +112,8 @@ "type" : "array", "items" : { "type" : "string", - "enum" : [ "available", "pending", "sold" ], - "default" : "available" + "default" : "available", + "enum" : [ "available", "pending", "sold" ] }, "collectionFormat" : "csv" } ], @@ -134,7 +134,6 @@ "security" : [ { "petstore_auth" : [ "write:pets", "read:pets" ] } ], - "x-contentType" : "application/json", "x-accepts" : "application/json" } }, @@ -174,7 +173,6 @@ "petstore_auth" : [ "write:pets", "read:pets" ] } ], "deprecated" : true, - "x-contentType" : "application/json", "x-accepts" : "application/json" } }, @@ -210,7 +208,6 @@ "security" : [ { "api_key" : [ ] } ], - "x-contentType" : "application/json", "x-accepts" : "application/json" }, "post" : { @@ -278,7 +275,6 @@ "security" : [ { "petstore_auth" : [ "write:pets", "read:pets" ] } ], - "x-contentType" : "application/json", "x-accepts" : "application/json" } }, @@ -348,7 +344,6 @@ "security" : [ { "api_key" : [ ] } ], - "x-contentType" : "application/json", "x-accepts" : "application/json" } }, @@ -414,7 +409,6 @@ "description" : "Order not found" } }, - "x-contentType" : "application/json", "x-accepts" : "application/json" }, "delete" : { @@ -438,7 +432,6 @@ "description" : "Order not found" } }, - "x-contentType" : "application/json", "x-accepts" : "application/json" } }, @@ -566,7 +559,6 @@ "description" : "Invalid username/password supplied" } }, - "x-contentType" : "application/json", "x-accepts" : "application/json" } }, @@ -583,7 +575,6 @@ "description" : "successful operation" } }, - "x-contentType" : "application/json", "x-accepts" : "application/json" } }, @@ -615,7 +606,6 @@ "description" : "User not found" } }, - "x-contentType" : "application/json", "x-accepts" : "application/json" }, "put" : { @@ -671,7 +661,6 @@ "description" : "User not found" } }, - "x-contentType" : "application/json", "x-accepts" : "application/json" } } 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 fc310313180..5e5ff376294 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 Pet tags(List tags) { 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 80725da2d0d..775497a59fc 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-exception-handling/public/swagger.json b/samples/server/petstore/java-play-framework-no-exception-handling/public/swagger.json index 7c571eca3fe..0f5defa6026 100644 --- a/samples/server/petstore/java-play-framework-no-exception-handling/public/swagger.json +++ b/samples/server/petstore/java-play-framework-no-exception-handling/public/swagger.json @@ -112,8 +112,8 @@ "type" : "array", "items" : { "type" : "string", - "enum" : [ "available", "pending", "sold" ], - "default" : "available" + "default" : "available", + "enum" : [ "available", "pending", "sold" ] }, "collectionFormat" : "csv" } ], @@ -134,7 +134,6 @@ "security" : [ { "petstore_auth" : [ "write:pets", "read:pets" ] } ], - "x-contentType" : "application/json", "x-accepts" : "application/json" } }, @@ -174,7 +173,6 @@ "petstore_auth" : [ "write:pets", "read:pets" ] } ], "deprecated" : true, - "x-contentType" : "application/json", "x-accepts" : "application/json" } }, @@ -210,7 +208,6 @@ "security" : [ { "api_key" : [ ] } ], - "x-contentType" : "application/json", "x-accepts" : "application/json" }, "post" : { @@ -278,7 +275,6 @@ "security" : [ { "petstore_auth" : [ "write:pets", "read:pets" ] } ], - "x-contentType" : "application/json", "x-accepts" : "application/json" } }, @@ -348,7 +344,6 @@ "security" : [ { "api_key" : [ ] } ], - "x-contentType" : "application/json", "x-accepts" : "application/json" } }, @@ -414,7 +409,6 @@ "description" : "Order not found" } }, - "x-contentType" : "application/json", "x-accepts" : "application/json" }, "delete" : { @@ -438,7 +432,6 @@ "description" : "Order not found" } }, - "x-contentType" : "application/json", "x-accepts" : "application/json" } }, @@ -566,7 +559,6 @@ "description" : "Invalid username/password supplied" } }, - "x-contentType" : "application/json", "x-accepts" : "application/json" } }, @@ -583,7 +575,6 @@ "description" : "successful operation" } }, - "x-contentType" : "application/json", "x-accepts" : "application/json" } }, @@ -615,7 +606,6 @@ "description" : "User not found" } }, - "x-contentType" : "application/json", "x-accepts" : "application/json" }, "put" : { @@ -671,7 +661,6 @@ "description" : "User not found" } }, - "x-contentType" : "application/json", "x-accepts" : "application/json" } } 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 fc310313180..5e5ff376294 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 Pet tags(List tags) { 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 80725da2d0d..775497a59fc 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-interface/public/swagger.json b/samples/server/petstore/java-play-framework-no-interface/public/swagger.json index 7c571eca3fe..0f5defa6026 100644 --- a/samples/server/petstore/java-play-framework-no-interface/public/swagger.json +++ b/samples/server/petstore/java-play-framework-no-interface/public/swagger.json @@ -112,8 +112,8 @@ "type" : "array", "items" : { "type" : "string", - "enum" : [ "available", "pending", "sold" ], - "default" : "available" + "default" : "available", + "enum" : [ "available", "pending", "sold" ] }, "collectionFormat" : "csv" } ], @@ -134,7 +134,6 @@ "security" : [ { "petstore_auth" : [ "write:pets", "read:pets" ] } ], - "x-contentType" : "application/json", "x-accepts" : "application/json" } }, @@ -174,7 +173,6 @@ "petstore_auth" : [ "write:pets", "read:pets" ] } ], "deprecated" : true, - "x-contentType" : "application/json", "x-accepts" : "application/json" } }, @@ -210,7 +208,6 @@ "security" : [ { "api_key" : [ ] } ], - "x-contentType" : "application/json", "x-accepts" : "application/json" }, "post" : { @@ -278,7 +275,6 @@ "security" : [ { "petstore_auth" : [ "write:pets", "read:pets" ] } ], - "x-contentType" : "application/json", "x-accepts" : "application/json" } }, @@ -348,7 +344,6 @@ "security" : [ { "api_key" : [ ] } ], - "x-contentType" : "application/json", "x-accepts" : "application/json" } }, @@ -414,7 +409,6 @@ "description" : "Order not found" } }, - "x-contentType" : "application/json", "x-accepts" : "application/json" }, "delete" : { @@ -438,7 +432,6 @@ "description" : "Order not found" } }, - "x-contentType" : "application/json", "x-accepts" : "application/json" } }, @@ -566,7 +559,6 @@ "description" : "Invalid username/password supplied" } }, - "x-contentType" : "application/json", "x-accepts" : "application/json" } }, @@ -583,7 +575,6 @@ "description" : "successful operation" } }, - "x-contentType" : "application/json", "x-accepts" : "application/json" } }, @@ -615,7 +606,6 @@ "description" : "User not found" } }, - "x-contentType" : "application/json", "x-accepts" : "application/json" }, "put" : { @@ -671,7 +661,6 @@ "description" : "User not found" } }, - "x-contentType" : "application/json", "x-accepts" : "application/json" } } 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 fc310313180..5e5ff376294 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 Pet tags(List tags) { 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 4bbbee5d51b..faa1a4f028f 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 fc310313180..5e5ff376294 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 Pet tags(List tags) { 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 80725da2d0d..775497a59fc 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-no-wrap-calls/public/swagger.json b/samples/server/petstore/java-play-framework-no-wrap-calls/public/swagger.json index 7c571eca3fe..0f5defa6026 100644 --- a/samples/server/petstore/java-play-framework-no-wrap-calls/public/swagger.json +++ b/samples/server/petstore/java-play-framework-no-wrap-calls/public/swagger.json @@ -112,8 +112,8 @@ "type" : "array", "items" : { "type" : "string", - "enum" : [ "available", "pending", "sold" ], - "default" : "available" + "default" : "available", + "enum" : [ "available", "pending", "sold" ] }, "collectionFormat" : "csv" } ], @@ -134,7 +134,6 @@ "security" : [ { "petstore_auth" : [ "write:pets", "read:pets" ] } ], - "x-contentType" : "application/json", "x-accepts" : "application/json" } }, @@ -174,7 +173,6 @@ "petstore_auth" : [ "write:pets", "read:pets" ] } ], "deprecated" : true, - "x-contentType" : "application/json", "x-accepts" : "application/json" } }, @@ -210,7 +208,6 @@ "security" : [ { "api_key" : [ ] } ], - "x-contentType" : "application/json", "x-accepts" : "application/json" }, "post" : { @@ -278,7 +275,6 @@ "security" : [ { "petstore_auth" : [ "write:pets", "read:pets" ] } ], - "x-contentType" : "application/json", "x-accepts" : "application/json" } }, @@ -348,7 +344,6 @@ "security" : [ { "api_key" : [ ] } ], - "x-contentType" : "application/json", "x-accepts" : "application/json" } }, @@ -414,7 +409,6 @@ "description" : "Order not found" } }, - "x-contentType" : "application/json", "x-accepts" : "application/json" }, "delete" : { @@ -438,7 +432,6 @@ "description" : "Order not found" } }, - "x-contentType" : "application/json", "x-accepts" : "application/json" } }, @@ -566,7 +559,6 @@ "description" : "Invalid username/password supplied" } }, - "x-contentType" : "application/json", "x-accepts" : "application/json" } }, @@ -583,7 +575,6 @@ "description" : "successful operation" } }, - "x-contentType" : "application/json", "x-accepts" : "application/json" } }, @@ -615,7 +606,6 @@ "description" : "User not found" } }, - "x-contentType" : "application/json", "x-accepts" : "application/json" }, "put" : { @@ -671,7 +661,6 @@ "description" : "User not found" } }, - "x-contentType" : "application/json", "x-accepts" : "application/json" } } 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 fc310313180..5e5ff376294 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 Pet tags(List tags) { 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 80725da2d0d..775497a59fc 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) diff --git a/samples/server/petstore/java-play-framework/public/swagger.json b/samples/server/petstore/java-play-framework/public/swagger.json index 7c571eca3fe..0f5defa6026 100644 --- a/samples/server/petstore/java-play-framework/public/swagger.json +++ b/samples/server/petstore/java-play-framework/public/swagger.json @@ -112,8 +112,8 @@ "type" : "array", "items" : { "type" : "string", - "enum" : [ "available", "pending", "sold" ], - "default" : "available" + "default" : "available", + "enum" : [ "available", "pending", "sold" ] }, "collectionFormat" : "csv" } ], @@ -134,7 +134,6 @@ "security" : [ { "petstore_auth" : [ "write:pets", "read:pets" ] } ], - "x-contentType" : "application/json", "x-accepts" : "application/json" } }, @@ -174,7 +173,6 @@ "petstore_auth" : [ "write:pets", "read:pets" ] } ], "deprecated" : true, - "x-contentType" : "application/json", "x-accepts" : "application/json" } }, @@ -210,7 +208,6 @@ "security" : [ { "api_key" : [ ] } ], - "x-contentType" : "application/json", "x-accepts" : "application/json" }, "post" : { @@ -278,7 +275,6 @@ "security" : [ { "petstore_auth" : [ "write:pets", "read:pets" ] } ], - "x-contentType" : "application/json", "x-accepts" : "application/json" } }, @@ -348,7 +344,6 @@ "security" : [ { "api_key" : [ ] } ], - "x-contentType" : "application/json", "x-accepts" : "application/json" } }, @@ -414,7 +409,6 @@ "description" : "Order not found" } }, - "x-contentType" : "application/json", "x-accepts" : "application/json" }, "delete" : { @@ -438,7 +432,6 @@ "description" : "Order not found" } }, - "x-contentType" : "application/json", "x-accepts" : "application/json" } }, @@ -566,7 +559,6 @@ "description" : "Invalid username/password supplied" } }, - "x-contentType" : "application/json", "x-accepts" : "application/json" } }, @@ -583,7 +575,6 @@ "description" : "successful operation" } }, - "x-contentType" : "application/json", "x-accepts" : "application/json" } }, @@ -615,7 +606,6 @@ "description" : "User not found" } }, - "x-contentType" : "application/json", "x-accepts" : "application/json" }, "put" : { @@ -671,7 +661,6 @@ "description" : "User not found" } }, - "x-contentType" : "application/json", "x-accepts" : "application/json" } }