forked from loafle/openapi-generator-original
In the convenience class defined for generating a Map of query parameters, the parameter name was mistakenly being set to the Java variable name, not the actual parameter name. These are often the same, but can be different in the case of multi-word parameters, such as in the sample API's `enum_query_string` vs `enumQueryString`.
This commit is contained in:
parent
ffbb96e98c
commit
65b6660c55
@ -80,7 +80,7 @@ public interface {{classname}} extends ApiClient.Api {
|
||||
public static class {{operationIdCamelCase}}QueryParams extends HashMap<String, Object> {
|
||||
{{#queryParams}}
|
||||
public {{operationIdCamelCase}}QueryParams {{paramName}}(final {{{dataType}}} value) {
|
||||
put("{{paramName}}", value);
|
||||
put("{{baseName}}", value);
|
||||
return this;
|
||||
}
|
||||
{{/queryParams}}
|
||||
|
@ -114,15 +114,15 @@ public interface FakeApi extends ApiClient.Api {
|
||||
*/
|
||||
public static class TestEnumParametersQueryParams extends HashMap<String, Object> {
|
||||
public TestEnumParametersQueryParams enumQueryStringArray(final List<String> value) {
|
||||
put("enumQueryStringArray", value);
|
||||
put("enum_query_string_array", value);
|
||||
return this;
|
||||
}
|
||||
public TestEnumParametersQueryParams enumQueryString(final String value) {
|
||||
put("enumQueryString", value);
|
||||
put("enum_query_string", value);
|
||||
return this;
|
||||
}
|
||||
public TestEnumParametersQueryParams enumQueryInteger(final Integer value) {
|
||||
put("enumQueryInteger", value);
|
||||
put("enum_query_integer", value);
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user