Skip to content

Commit 7638e61

Browse files
committed
style(crystal): use kwargs when calling Crest::Request.new
1 parent 66a4ee2 commit 7638e61

2 files changed

Lines changed: 6 additions & 4 deletions

File tree

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,9 @@ module {{moduleName}}
139139
form_or_body = form_params
140140
end
141141

142-
request = Crest::Request.new(http_method,
143-
build_request_url(path, operation),
142+
request = Crest::Request.new(
143+
method: http_method,
144+
url: build_request_url(path, operation),
144145
params: query_params,
145146
headers: header_params,
146147
cookies: cookie_params,

samples/client/petstore/crystal/src/petstore/api_client.cr

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,8 +147,9 @@ module Petstore
147147
form_or_body = form_params
148148
end
149149

150-
request = Crest::Request.new(http_method,
151-
build_request_url(path, operation),
150+
request = Crest::Request.new(
151+
method: http_method,
152+
url: build_request_url(path, operation),
152153
params: query_params,
153154
headers: header_params,
154155
cookies: cookie_params,

0 commit comments

Comments
 (0)