forked from loafle/openapi-generator-original
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:
committed by
William Cheng
parent
d1a296412e
commit
e33b350c89
@@ -1 +1 @@
|
||||
2.3.0
|
||||
2.4.0-SNAPSHOT
|
||||
@@ -75,8 +75,10 @@ public class PetApiController extends Controller {
|
||||
List<String> statusList = SwaggerUtils.parametersToList("csv", statusArray);
|
||||
List<String> status = new ArrayList<String>();
|
||||
for (String curParam : statusList) {
|
||||
//noinspection UseBulkOperation
|
||||
status.add(curParam);
|
||||
if (!curParam.isEmpty()) {
|
||||
//noinspection UseBulkOperation
|
||||
status.add(curParam);
|
||||
}
|
||||
}
|
||||
List<Pet> obj = imp.findPetsByStatus(status);
|
||||
if (configuration.getBoolean("useOutputBeanValidation")) {
|
||||
@@ -97,8 +99,10 @@ public class PetApiController extends Controller {
|
||||
List<String> tagsList = SwaggerUtils.parametersToList("csv", tagsArray);
|
||||
List<String> tags = new ArrayList<String>();
|
||||
for (String curParam : tagsList) {
|
||||
//noinspection UseBulkOperation
|
||||
tags.add(curParam);
|
||||
if (!curParam.isEmpty()) {
|
||||
//noinspection UseBulkOperation
|
||||
tags.add(curParam);
|
||||
}
|
||||
}
|
||||
List<Pet> obj = imp.findPetsByTags(tags);
|
||||
if (configuration.getBoolean("useOutputBeanValidation")) {
|
||||
|
||||
Reference in New Issue
Block a user