Skip to content

fix generator types endpoint #9199

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 20, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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