Skip to content

Commit d550a14

Browse files
committed
1 parent 7b83462 commit d550a14

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

modules/openapi-generator/src/main/resources/crystal/api.mustache

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ module {{moduleName}}
131131
cookie_params = Hash(String, String).new
132132

133133
# query parameters
134-
query_params = Hash(String, String).new
134+
query_params = Hash(String, String | Array(String)).new
135135
{{#queryParams}}
136136
query_params["{{{baseName}}}"] = {{#collectionFormat}}@api_client.build_collection_param({{{paramName}}}, :{{{collectionFormat}}}) unless {{{paramName}}}.nil?{{/collectionFormat}}{{^collectionFormat}}{{{paramName}}}.to_s unless {{{paramName}}}.nil?{{/collectionFormat}}
137137
{{/queryParams}}

modules/openapi-generator/src/main/resources/crystal/api_client.mustache

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,7 @@ module {{moduleName}}
109109
when :pipes
110110
param.join("|")
111111
when :multi
112-
# TODO: Need to fix this
113-
raise "multi is not supported yet"
112+
param
114113
else
115114
raise "unknown collection format: #{collection_format.inspect}"
116115
end
@@ -147,7 +146,8 @@ module {{moduleName}}
147146
cookies: cookie_params,
148147
form: form_or_body,
149148
logging: @config.debugging,
150-
handle_errors: false
149+
handle_errors: false,
150+
params_encoder: Crest::NestedParamsEncoder
151151
)
152152

153153
response = request.execute

0 commit comments

Comments
 (0)