Skip to content
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

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ module {{moduleName}}
cookie_params = Hash(String, String).new

# query parameters
query_params = Hash(String, String).new
query_params = Hash(String, String | Array(String)).new
{{#queryParams}}
query_params["{{{baseName}}}"] = {{#collectionFormat}}@api_client.build_collection_param({{{paramName}}}, :{{{collectionFormat}}}) unless {{{paramName}}}.nil?{{/collectionFormat}}{{^collectionFormat}}{{{paramName}}}.to_s unless {{{paramName}}}.nil?{{/collectionFormat}}
{{/queryParams}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,7 @@ module {{moduleName}}
when :pipes
param.join("|")
when :multi
# TODO: Need to fix this
raise "multi is not supported yet"
param
else
raise "unknown collection format: #{collection_format.inspect}"
end
Expand Down Expand Up @@ -147,7 +146,8 @@ module {{moduleName}}
cookies: cookie_params,
form: form_or_body,
logging: @config.debugging,
handle_errors: false
handle_errors: false,
params_encoder: Crest::NestedParamsEncoder
)

response = request.execute
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ module Petstore
cookie_params = Hash(String, String).new

# query parameters
query_params = Hash(String, String).new
query_params = Hash(String, String | Array(String)).new
query_params["type"] = _type.to_s unless _type.nil?
query_params["http_debug_option"] = http_debug_option.to_s unless http_debug_option.nil?

Expand Down
16 changes: 8 additions & 8 deletions samples/client/petstore/crystal/src/petstore/api/pet_api.cr
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ module Petstore
cookie_params = Hash(String, String).new

# query parameters
query_params = Hash(String, String).new
query_params = Hash(String, String | Array(String)).new

# header parameters
header_params = Hash(String, String).new
Expand Down Expand Up @@ -110,7 +110,7 @@ module Petstore
cookie_params = Hash(String, String).new

# query parameters
query_params = Hash(String, String).new
query_params = Hash(String, String | Array(String)).new

# header parameters
header_params = Hash(String, String).new
Expand Down Expand Up @@ -172,7 +172,7 @@ module Petstore
cookie_params = Hash(String, String).new

# query parameters
query_params = Hash(String, String).new
query_params = Hash(String, String | Array(String)).new
query_params["status"] = @api_client.build_collection_param(status, :csv) unless status.nil?

# header parameters
Expand Down Expand Up @@ -236,7 +236,7 @@ module Petstore
cookie_params = Hash(String, String).new

# query parameters
query_params = Hash(String, String).new
query_params = Hash(String, String | Array(String)).new
query_params["tags"] = @api_client.build_collection_param(tags, :csv) unless tags.nil?

# header parameters
Expand Down Expand Up @@ -300,7 +300,7 @@ module Petstore
cookie_params = Hash(String, String).new

# query parameters
query_params = Hash(String, String).new
query_params = Hash(String, String | Array(String)).new

# header parameters
header_params = Hash(String, String).new
Expand Down Expand Up @@ -363,7 +363,7 @@ module Petstore
cookie_params = Hash(String, String).new

# query parameters
query_params = Hash(String, String).new
query_params = Hash(String, String | Array(String)).new

# header parameters
header_params = Hash(String, String).new
Expand Down Expand Up @@ -428,7 +428,7 @@ module Petstore
cookie_params = Hash(String, String).new

# query parameters
query_params = Hash(String, String).new
query_params = Hash(String, String | Array(String)).new

# header parameters
header_params = Hash(String, String).new
Expand Down Expand Up @@ -493,7 +493,7 @@ module Petstore
cookie_params = Hash(String, String).new

# query parameters
query_params = Hash(String, String).new
query_params = Hash(String, String | Array(String)).new

# header parameters
header_params = Hash(String, String).new
Expand Down
8 changes: 4 additions & 4 deletions samples/client/petstore/crystal/src/petstore/api/store_api.cr
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ module Petstore
cookie_params = Hash(String, String).new

# query parameters
query_params = Hash(String, String).new
query_params = Hash(String, String | Array(String)).new

# header parameters
header_params = Hash(String, String).new
Expand Down Expand Up @@ -100,7 +100,7 @@ module Petstore
cookie_params = Hash(String, String).new

# query parameters
query_params = Hash(String, String).new
query_params = Hash(String, String | Array(String)).new

# header parameters
header_params = Hash(String, String).new
Expand Down Expand Up @@ -171,7 +171,7 @@ module Petstore
cookie_params = Hash(String, String).new

# query parameters
query_params = Hash(String, String).new
query_params = Hash(String, String | Array(String)).new

# header parameters
header_params = Hash(String, String).new
Expand Down Expand Up @@ -234,7 +234,7 @@ module Petstore
cookie_params = Hash(String, String).new

# query parameters
query_params = Hash(String, String).new
query_params = Hash(String, String | Array(String)).new

# header parameters
header_params = Hash(String, String).new
Expand Down
16 changes: 8 additions & 8 deletions samples/client/petstore/crystal/src/petstore/api/user_api.cr
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ module Petstore
cookie_params = Hash(String, String).new

# query parameters
query_params = Hash(String, String).new
query_params = Hash(String, String | Array(String)).new

# header parameters
header_params = Hash(String, String).new
Expand Down Expand Up @@ -108,7 +108,7 @@ module Petstore
cookie_params = Hash(String, String).new

# query parameters
query_params = Hash(String, String).new
query_params = Hash(String, String | Array(String)).new

# header parameters
header_params = Hash(String, String).new
Expand Down Expand Up @@ -171,7 +171,7 @@ module Petstore
cookie_params = Hash(String, String).new

# query parameters
query_params = Hash(String, String).new
query_params = Hash(String, String | Array(String)).new

# header parameters
header_params = Hash(String, String).new
Expand Down Expand Up @@ -234,7 +234,7 @@ module Petstore
cookie_params = Hash(String, String).new

# query parameters
query_params = Hash(String, String).new
query_params = Hash(String, String | Array(String)).new

# header parameters
header_params = Hash(String, String).new
Expand Down Expand Up @@ -295,7 +295,7 @@ module Petstore
cookie_params = Hash(String, String).new

# query parameters
query_params = Hash(String, String).new
query_params = Hash(String, String | Array(String)).new

# header parameters
header_params = Hash(String, String).new
Expand Down Expand Up @@ -369,7 +369,7 @@ module Petstore
cookie_params = Hash(String, String).new

# query parameters
query_params = Hash(String, String).new
query_params = Hash(String, String | Array(String)).new
query_params["username"] = username.to_s unless username.nil?
query_params["password"] = password.to_s unless password.nil?

Expand Down Expand Up @@ -428,7 +428,7 @@ module Petstore
cookie_params = Hash(String, String).new

# query parameters
query_params = Hash(String, String).new
query_params = Hash(String, String | Array(String)).new

# header parameters
header_params = Hash(String, String).new
Expand Down Expand Up @@ -495,7 +495,7 @@ module Petstore
cookie_params = Hash(String, String).new

# query parameters
query_params = Hash(String, String).new
query_params = Hash(String, String | Array(String)).new

# header parameters
header_params = Hash(String, String).new
Expand Down
6 changes: 3 additions & 3 deletions samples/client/petstore/crystal/src/petstore/api_client.cr
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,7 @@ module Petstore
when :pipes
param.join("|")
when :multi
# TODO: Need to fix this
raise "multi is not supported yet"
param
else
raise "unknown collection format: #{collection_format.inspect}"
end
Expand Down Expand Up @@ -155,7 +154,8 @@ module Petstore
cookies: cookie_params,
form: form_or_body,
logging: @config.debugging,
handle_errors: false
handle_errors: false,
params_encoder: Crest::NestedParamsEncoder
)

response = request.execute
Expand Down
Loading