Skip to content

Commit

Permalink
fix generator types endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
frantuma committed Feb 20, 2019
1 parent 824afb8 commit f53a427
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -257,14 +257,24 @@ public ResponseContext languages(RequestContext requestContext, String type, Str
public ResponseContext languagesMulti(RequestContext requestContext, List<String> types, String version) {
final List<String> languages = new ArrayList<>();
if ("V2".equals(version)) {
types.forEach(s -> languages.addAll(TYPESV2.get(io.swagger.codegen.CodegenType.forValue(s))));
types.forEach(s -> {
List<String> typeLanguages = TYPESV2.get(io.swagger.codegen.CodegenType.forValue(s));
if (typeLanguages != null) {
languages.addAll(typeLanguages);
}
});
Collections.sort(languages, String.CASE_INSENSITIVE_ORDER);
return new ResponseContext()
.status(Response.Status.OK.getStatusCode())
.entity(languages);

}
types.forEach(s -> languages.addAll(TYPES.get(CodegenType.forValue(s))));
types.forEach(s -> {
List<String> typeLanguages = TYPES.get(CodegenType.forValue(s));
if (typeLanguages != null) {
languages.addAll(typeLanguages);
}
});
Collections.sort(languages, String.CASE_INSENSITIVE_ORDER);
return new ResponseContext()
.status(Response.Status.OK.getStatusCode())
Expand Down
2 changes: 1 addition & 1 deletion modules/swagger-generator/src/main/resources/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ components:
style: form
explode: false
required: true
description: pipe-separated list of generator types
description: comma-separated list of generator types
schema:
type: array
items:
Expand Down

0 comments on commit f53a427

Please # to comment.