mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-05-12 20:50:55 +00:00
Fix an issue in Play Framework generator where a CSV is empty and transfered to the controllerImp with an empty item. (#7496)
This commit is contained in:
parent
d1a296412e
commit
e33b350c89
@ -99,9 +99,11 @@ public class {{classname}}Controller extends Controller {
|
||||
List<String> {{paramName}}List = SwaggerUtils.parametersToList("{{collectionFormat}}", {{paramName}}Array);
|
||||
{{{dataType}}} {{paramName}} = new Array{{{dataType}}}();
|
||||
for (String curParam : {{paramName}}List) {
|
||||
if (!curParam.isEmpty()) {
|
||||
//noinspection UseBulkOperation
|
||||
{{paramName}}.add({{>itemConversionBegin}}curParam{{>itemConversionEnd}});
|
||||
}
|
||||
}
|
||||
{{/collectionFormat}}
|
||||
{{^collectionFormat}}
|
||||
String value{{paramName}} = request().getQueryString("{{baseName}}");
|
||||
@ -138,9 +140,11 @@ public class {{classname}}Controller extends Controller {
|
||||
List<String> {{paramName}}List = SwaggerUtils.parametersToList("{{collectionFormat}}", {{paramName}}Array);
|
||||
{{{dataType}}} {{paramName}} = new Array{{{dataType}}}();
|
||||
for (String curParam : {{paramName}}List) {
|
||||
if (!curParam.isEmpty()) {
|
||||
//noinspection UseBulkOperation
|
||||
{{paramName}}.add({{>itemConversionBegin}}curParam{{>itemConversionEnd}});
|
||||
}
|
||||
}
|
||||
{{/collectionFormat}}
|
||||
{{^collectionFormat}}
|
||||
String value{{paramName}} = (request().body().asMultipartFormData().asFormUrlEncoded().get("{{baseName}}"))[0];
|
||||
@ -169,9 +173,11 @@ public class {{classname}}Controller extends Controller {
|
||||
List<String> {{paramName}}List = SwaggerUtils.parametersToList("{{collectionFormat}}", {{paramName}}Array);
|
||||
{{{dataType}}} {{paramName}} = new Array{{{dataType}}}();
|
||||
for (String curParam : {{paramName}}List) {
|
||||
if (!curParam.isEmpty()) {
|
||||
//noinspection UseBulkOperation
|
||||
{{paramName}}.add({{>itemConversionBegin}}curParam{{>itemConversionEnd}});
|
||||
}
|
||||
}
|
||||
{{/collectionFormat}}
|
||||
{{^collectionFormat}}
|
||||
String value{{paramName}} = request().getHeader("{{baseName}}");
|
||||
|
@ -1 +1 @@
|
||||
2.3.0
|
||||
2.4.0-SNAPSHOT
|
@ -75,9 +75,11 @@ public class PetApiController extends Controller {
|
||||
List<String> statusList = SwaggerUtils.parametersToList("csv", statusArray);
|
||||
List<String> status = new ArrayList<String>();
|
||||
for (String curParam : statusList) {
|
||||
if (!curParam.isEmpty()) {
|
||||
//noinspection UseBulkOperation
|
||||
status.add(curParam);
|
||||
}
|
||||
}
|
||||
List<Pet> obj = imp.findPetsByStatus(status);
|
||||
if (configuration.getBoolean("useOutputBeanValidation")) {
|
||||
for (Pet curItem : obj) {
|
||||
@ -97,9 +99,11 @@ public class PetApiController extends Controller {
|
||||
List<String> tagsList = SwaggerUtils.parametersToList("csv", tagsArray);
|
||||
List<String> tags = new ArrayList<String>();
|
||||
for (String curParam : tagsList) {
|
||||
if (!curParam.isEmpty()) {
|
||||
//noinspection UseBulkOperation
|
||||
tags.add(curParam);
|
||||
}
|
||||
}
|
||||
List<Pet> obj = imp.findPetsByTags(tags);
|
||||
if (configuration.getBoolean("useOutputBeanValidation")) {
|
||||
for (Pet curItem : obj) {
|
||||
|
@ -1 +1 @@
|
||||
2.3.0
|
||||
2.4.0-SNAPSHOT
|
@ -71,9 +71,11 @@ public class PetApiController extends Controller {
|
||||
List<String> statusList = SwaggerUtils.parametersToList("csv", statusArray);
|
||||
List<String> status = new ArrayList<String>();
|
||||
for (String curParam : statusList) {
|
||||
if (!curParam.isEmpty()) {
|
||||
//noinspection UseBulkOperation
|
||||
status.add(curParam);
|
||||
}
|
||||
}
|
||||
return ok();
|
||||
}
|
||||
|
||||
@ -86,9 +88,11 @@ public class PetApiController extends Controller {
|
||||
List<String> tagsList = SwaggerUtils.parametersToList("csv", tagsArray);
|
||||
List<String> tags = new ArrayList<String>();
|
||||
for (String curParam : tagsList) {
|
||||
if (!curParam.isEmpty()) {
|
||||
//noinspection UseBulkOperation
|
||||
tags.add(curParam);
|
||||
}
|
||||
}
|
||||
return ok();
|
||||
}
|
||||
|
||||
|
@ -1 +1 @@
|
||||
2.3.0
|
||||
2.4.0-SNAPSHOT
|
@ -243,9 +243,11 @@ public class FakeApiController extends Controller {
|
||||
List<String> enumQueryStringArrayList = SwaggerUtils.parametersToList("csv", enumQueryStringArrayArray);
|
||||
List<String> enumQueryStringArray = new ArrayList<String>();
|
||||
for (String curParam : enumQueryStringArrayList) {
|
||||
if (!curParam.isEmpty()) {
|
||||
//noinspection UseBulkOperation
|
||||
enumQueryStringArray.add(curParam);
|
||||
}
|
||||
}
|
||||
String valueenumQueryString = request().getQueryString("enum_query_string");
|
||||
String enumQueryString;
|
||||
if (valueenumQueryString != null) {
|
||||
@ -264,9 +266,11 @@ public class FakeApiController extends Controller {
|
||||
List<String> enumFormStringArrayList = SwaggerUtils.parametersToList("csv", enumFormStringArrayArray);
|
||||
List<String> enumFormStringArray = new ArrayList<String>();
|
||||
for (String curParam : enumFormStringArrayList) {
|
||||
if (!curParam.isEmpty()) {
|
||||
//noinspection UseBulkOperation
|
||||
enumFormStringArray.add(curParam);
|
||||
}
|
||||
}
|
||||
String valueenumFormString = (request().body().asMultipartFormData().asFormUrlEncoded().get("enum_form_string"))[0];
|
||||
String enumFormString;
|
||||
if (valueenumFormString != null) {
|
||||
@ -285,9 +289,11 @@ public class FakeApiController extends Controller {
|
||||
List<String> enumHeaderStringArrayList = SwaggerUtils.parametersToList("csv", enumHeaderStringArrayArray);
|
||||
List<String> enumHeaderStringArray = new ArrayList<String>();
|
||||
for (String curParam : enumHeaderStringArrayList) {
|
||||
if (!curParam.isEmpty()) {
|
||||
//noinspection UseBulkOperation
|
||||
enumHeaderStringArray.add(curParam);
|
||||
}
|
||||
}
|
||||
String valueenumHeaderString = request().getHeader("enum_header_string");
|
||||
String enumHeaderString;
|
||||
if (valueenumHeaderString != null) {
|
||||
|
@ -75,9 +75,11 @@ public class PetApiController extends Controller {
|
||||
List<String> statusList = SwaggerUtils.parametersToList("csv", statusArray);
|
||||
List<String> status = new ArrayList<String>();
|
||||
for (String curParam : statusList) {
|
||||
if (!curParam.isEmpty()) {
|
||||
//noinspection UseBulkOperation
|
||||
status.add(curParam);
|
||||
}
|
||||
}
|
||||
List<Pet> obj = imp.findPetsByStatus(status);
|
||||
if (configuration.getBoolean("useOutputBeanValidation")) {
|
||||
for (Pet curItem : obj) {
|
||||
@ -97,9 +99,11 @@ public class PetApiController extends Controller {
|
||||
List<String> tagsList = SwaggerUtils.parametersToList("csv", tagsArray);
|
||||
List<String> tags = new ArrayList<String>();
|
||||
for (String curParam : tagsList) {
|
||||
if (!curParam.isEmpty()) {
|
||||
//noinspection UseBulkOperation
|
||||
tags.add(curParam);
|
||||
}
|
||||
}
|
||||
List<Pet> obj = imp.findPetsByTags(tags);
|
||||
if (configuration.getBoolean("useOutputBeanValidation")) {
|
||||
for (Pet curItem : obj) {
|
||||
|
@ -1 +1 @@
|
||||
2.3.0
|
||||
2.4.0-SNAPSHOT
|
@ -68,9 +68,11 @@ public class PetApiController extends Controller {
|
||||
List<String> statusList = SwaggerUtils.parametersToList("csv", statusArray);
|
||||
List<String> status = new ArrayList<String>();
|
||||
for (String curParam : statusList) {
|
||||
if (!curParam.isEmpty()) {
|
||||
//noinspection UseBulkOperation
|
||||
status.add(curParam);
|
||||
}
|
||||
}
|
||||
List<Pet> obj = imp.findPetsByStatus(status);
|
||||
JsonNode result = mapper.valueToTree(obj);
|
||||
return ok(result);
|
||||
@ -85,9 +87,11 @@ public class PetApiController extends Controller {
|
||||
List<String> tagsList = SwaggerUtils.parametersToList("csv", tagsArray);
|
||||
List<String> tags = new ArrayList<String>();
|
||||
for (String curParam : tagsList) {
|
||||
if (!curParam.isEmpty()) {
|
||||
//noinspection UseBulkOperation
|
||||
tags.add(curParam);
|
||||
}
|
||||
}
|
||||
List<Pet> obj = imp.findPetsByTags(tags);
|
||||
JsonNode result = mapper.valueToTree(obj);
|
||||
return ok(result);
|
||||
|
@ -1 +1 @@
|
||||
2.3.0
|
||||
2.4.0-SNAPSHOT
|
@ -76,9 +76,11 @@ public class PetApiController extends Controller {
|
||||
List<String> statusList = SwaggerUtils.parametersToList("csv", statusArray);
|
||||
List<String> status = new ArrayList<String>();
|
||||
for (String curParam : statusList) {
|
||||
if (!curParam.isEmpty()) {
|
||||
//noinspection UseBulkOperation
|
||||
status.add(curParam);
|
||||
}
|
||||
}
|
||||
List<Pet> obj = imp.findPetsByStatus(status);
|
||||
if (configuration.getBoolean("useOutputBeanValidation")) {
|
||||
for (Pet curItem : obj) {
|
||||
@ -98,9 +100,11 @@ public class PetApiController extends Controller {
|
||||
List<String> tagsList = SwaggerUtils.parametersToList("csv", tagsArray);
|
||||
List<String> tags = new ArrayList<String>();
|
||||
for (String curParam : tagsList) {
|
||||
if (!curParam.isEmpty()) {
|
||||
//noinspection UseBulkOperation
|
||||
tags.add(curParam);
|
||||
}
|
||||
}
|
||||
List<Pet> obj = imp.findPetsByTags(tags);
|
||||
if (configuration.getBoolean("useOutputBeanValidation")) {
|
||||
for (Pet curItem : obj) {
|
||||
|
@ -1 +1 @@
|
||||
2.3.0
|
||||
2.4.0-SNAPSHOT
|
@ -75,9 +75,11 @@ public class PetApiController extends Controller {
|
||||
List<String> statusList = SwaggerUtils.parametersToList("csv", statusArray);
|
||||
List<String> status = new ArrayList<String>();
|
||||
for (String curParam : statusList) {
|
||||
if (!curParam.isEmpty()) {
|
||||
//noinspection UseBulkOperation
|
||||
status.add(curParam);
|
||||
}
|
||||
}
|
||||
List<Pet> obj = imp.findPetsByStatus(status);
|
||||
if (configuration.getBoolean("useOutputBeanValidation")) {
|
||||
for (Pet curItem : obj) {
|
||||
@ -97,9 +99,11 @@ public class PetApiController extends Controller {
|
||||
List<String> tagsList = SwaggerUtils.parametersToList("csv", tagsArray);
|
||||
List<String> tags = new ArrayList<String>();
|
||||
for (String curParam : tagsList) {
|
||||
if (!curParam.isEmpty()) {
|
||||
//noinspection UseBulkOperation
|
||||
tags.add(curParam);
|
||||
}
|
||||
}
|
||||
List<Pet> obj = imp.findPetsByTags(tags);
|
||||
if (configuration.getBoolean("useOutputBeanValidation")) {
|
||||
for (Pet curItem : obj) {
|
||||
|
@ -1 +1 @@
|
||||
2.3.0
|
||||
2.4.0-SNAPSHOT
|
@ -75,9 +75,11 @@ public class PetApiController extends Controller {
|
||||
List<String> statusList = SwaggerUtils.parametersToList("csv", statusArray);
|
||||
List<String> status = new ArrayList<String>();
|
||||
for (String curParam : statusList) {
|
||||
if (!curParam.isEmpty()) {
|
||||
//noinspection UseBulkOperation
|
||||
status.add(curParam);
|
||||
}
|
||||
}
|
||||
List<Pet> obj = imp.findPetsByStatus(status);
|
||||
if (configuration.getBoolean("useOutputBeanValidation")) {
|
||||
for (Pet curItem : obj) {
|
||||
@ -97,9 +99,11 @@ public class PetApiController extends Controller {
|
||||
List<String> tagsList = SwaggerUtils.parametersToList("csv", tagsArray);
|
||||
List<String> tags = new ArrayList<String>();
|
||||
for (String curParam : tagsList) {
|
||||
if (!curParam.isEmpty()) {
|
||||
//noinspection UseBulkOperation
|
||||
tags.add(curParam);
|
||||
}
|
||||
}
|
||||
List<Pet> obj = imp.findPetsByTags(tags);
|
||||
if (configuration.getBoolean("useOutputBeanValidation")) {
|
||||
for (Pet curItem : obj) {
|
||||
|
@ -1 +1 @@
|
||||
2.3.0
|
||||
2.4.0-SNAPSHOT
|
@ -74,9 +74,11 @@ public class PetApiController extends Controller {
|
||||
List<String> statusList = SwaggerUtils.parametersToList("csv", statusArray);
|
||||
List<String> status = new ArrayList<String>();
|
||||
for (String curParam : statusList) {
|
||||
if (!curParam.isEmpty()) {
|
||||
//noinspection UseBulkOperation
|
||||
status.add(curParam);
|
||||
}
|
||||
}
|
||||
List<Pet> obj = imp.findPetsByStatus(status);
|
||||
if (configuration.getBoolean("useOutputBeanValidation")) {
|
||||
for (Pet curItem : obj) {
|
||||
@ -96,9 +98,11 @@ public class PetApiController extends Controller {
|
||||
List<String> tagsList = SwaggerUtils.parametersToList("csv", tagsArray);
|
||||
List<String> tags = new ArrayList<String>();
|
||||
for (String curParam : tagsList) {
|
||||
if (!curParam.isEmpty()) {
|
||||
//noinspection UseBulkOperation
|
||||
tags.add(curParam);
|
||||
}
|
||||
}
|
||||
List<Pet> obj = imp.findPetsByTags(tags);
|
||||
if (configuration.getBoolean("useOutputBeanValidation")) {
|
||||
for (Pet curItem : obj) {
|
||||
|
@ -1 +1 @@
|
||||
2.3.0
|
||||
2.4.0-SNAPSHOT
|
@ -75,9 +75,11 @@ public class PetApiController extends Controller {
|
||||
List<String> statusList = SwaggerUtils.parametersToList("csv", statusArray);
|
||||
List<String> status = new ArrayList<String>();
|
||||
for (String curParam : statusList) {
|
||||
if (!curParam.isEmpty()) {
|
||||
//noinspection UseBulkOperation
|
||||
status.add(curParam);
|
||||
}
|
||||
}
|
||||
List<Pet> obj = imp.findPetsByStatus(status);
|
||||
if (configuration.getBoolean("useOutputBeanValidation")) {
|
||||
for (Pet curItem : obj) {
|
||||
@ -97,9 +99,11 @@ public class PetApiController extends Controller {
|
||||
List<String> tagsList = SwaggerUtils.parametersToList("csv", tagsArray);
|
||||
List<String> tags = new ArrayList<String>();
|
||||
for (String curParam : tagsList) {
|
||||
if (!curParam.isEmpty()) {
|
||||
//noinspection UseBulkOperation
|
||||
tags.add(curParam);
|
||||
}
|
||||
}
|
||||
List<Pet> obj = imp.findPetsByTags(tags);
|
||||
if (configuration.getBoolean("useOutputBeanValidation")) {
|
||||
for (Pet curItem : obj) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user