forked from loafle/openapi-generator-original
Add tests for query parameters (array of integer/string) (#17686)
* add tests for query parameters in python client * update other samples * update samples
This commit is contained in:
@@ -338,6 +338,126 @@ module OpenapiClient
|
||||
return data, status_code, headers
|
||||
end
|
||||
|
||||
# Test query parameter(s)
|
||||
# Test query parameter(s)
|
||||
# @param [Hash] opts the optional parameters
|
||||
# @option opts [Array<Integer>] :query_object
|
||||
# @return [String]
|
||||
def test_query_style_form_explode_false_array_integer(opts = {})
|
||||
data, _status_code, _headers = test_query_style_form_explode_false_array_integer_with_http_info(opts)
|
||||
data
|
||||
end
|
||||
|
||||
# Test query parameter(s)
|
||||
# Test query parameter(s)
|
||||
# @param [Hash] opts the optional parameters
|
||||
# @option opts [Array<Integer>] :query_object
|
||||
# @return [Array<(String, Integer, Hash)>] String data, response status code and response headers
|
||||
def test_query_style_form_explode_false_array_integer_with_http_info(opts = {})
|
||||
if @api_client.config.debugging
|
||||
@api_client.config.logger.debug 'Calling API: QueryApi.test_query_style_form_explode_false_array_integer ...'
|
||||
end
|
||||
# resource path
|
||||
local_var_path = '/query/style_form/explode_false/array_integer'
|
||||
|
||||
# query parameters
|
||||
query_params = opts[:query_params] || {}
|
||||
query_params[:'query_object'] = @api_client.build_collection_param(opts[:'query_object'], :csv) if !opts[:'query_object'].nil?
|
||||
|
||||
# header parameters
|
||||
header_params = opts[:header_params] || {}
|
||||
# HTTP header 'Accept' (if needed)
|
||||
header_params['Accept'] = @api_client.select_header_accept(['text/plain'])
|
||||
|
||||
# form parameters
|
||||
form_params = opts[:form_params] || {}
|
||||
|
||||
# http body (model)
|
||||
post_body = opts[:debug_body]
|
||||
|
||||
# return_type
|
||||
return_type = opts[:debug_return_type] || 'String'
|
||||
|
||||
# auth_names
|
||||
auth_names = opts[:debug_auth_names] || []
|
||||
|
||||
new_options = opts.merge(
|
||||
:operation => :"QueryApi.test_query_style_form_explode_false_array_integer",
|
||||
:header_params => header_params,
|
||||
:query_params => query_params,
|
||||
:form_params => form_params,
|
||||
:body => post_body,
|
||||
:auth_names => auth_names,
|
||||
:return_type => return_type
|
||||
)
|
||||
|
||||
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
||||
if @api_client.config.debugging
|
||||
@api_client.config.logger.debug "API called: QueryApi#test_query_style_form_explode_false_array_integer\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
||||
end
|
||||
return data, status_code, headers
|
||||
end
|
||||
|
||||
# Test query parameter(s)
|
||||
# Test query parameter(s)
|
||||
# @param [Hash] opts the optional parameters
|
||||
# @option opts [Array<String>] :query_object
|
||||
# @return [String]
|
||||
def test_query_style_form_explode_false_array_string(opts = {})
|
||||
data, _status_code, _headers = test_query_style_form_explode_false_array_string_with_http_info(opts)
|
||||
data
|
||||
end
|
||||
|
||||
# Test query parameter(s)
|
||||
# Test query parameter(s)
|
||||
# @param [Hash] opts the optional parameters
|
||||
# @option opts [Array<String>] :query_object
|
||||
# @return [Array<(String, Integer, Hash)>] String data, response status code and response headers
|
||||
def test_query_style_form_explode_false_array_string_with_http_info(opts = {})
|
||||
if @api_client.config.debugging
|
||||
@api_client.config.logger.debug 'Calling API: QueryApi.test_query_style_form_explode_false_array_string ...'
|
||||
end
|
||||
# resource path
|
||||
local_var_path = '/query/style_form/explode_false/array_string'
|
||||
|
||||
# query parameters
|
||||
query_params = opts[:query_params] || {}
|
||||
query_params[:'query_object'] = @api_client.build_collection_param(opts[:'query_object'], :csv) if !opts[:'query_object'].nil?
|
||||
|
||||
# header parameters
|
||||
header_params = opts[:header_params] || {}
|
||||
# HTTP header 'Accept' (if needed)
|
||||
header_params['Accept'] = @api_client.select_header_accept(['text/plain'])
|
||||
|
||||
# form parameters
|
||||
form_params = opts[:form_params] || {}
|
||||
|
||||
# http body (model)
|
||||
post_body = opts[:debug_body]
|
||||
|
||||
# return_type
|
||||
return_type = opts[:debug_return_type] || 'String'
|
||||
|
||||
# auth_names
|
||||
auth_names = opts[:debug_auth_names] || []
|
||||
|
||||
new_options = opts.merge(
|
||||
:operation => :"QueryApi.test_query_style_form_explode_false_array_string",
|
||||
:header_params => header_params,
|
||||
:query_params => query_params,
|
||||
:form_params => form_params,
|
||||
:body => post_body,
|
||||
:auth_names => auth_names,
|
||||
:return_type => return_type
|
||||
)
|
||||
|
||||
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
||||
if @api_client.config.debugging
|
||||
@api_client.config.logger.debug "API called: QueryApi#test_query_style_form_explode_false_array_string\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
||||
end
|
||||
return data, status_code, headers
|
||||
end
|
||||
|
||||
# Test query parameter(s)
|
||||
# Test query parameter(s)
|
||||
# @param [Hash] opts the optional parameters
|
||||
|
||||
Reference in New Issue
Block a user