mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-12-18 20:27:08 +00:00
Codegen parameter for query json serialization (#21718)
* Add endpoints with query parameters that require Json-serialization * Add property for query json-serialization * Update samples * Adjust indentation for specification
This commit is contained in:
committed by
GitHub
parent
6ff9e67bad
commit
8874df4702
@@ -637,5 +637,68 @@ module OpenapiClient
|
||||
end
|
||||
return data, status_code, headers
|
||||
end
|
||||
|
||||
# Test query parameter(s)
|
||||
# Test query parameter(s)
|
||||
# @param [Hash] opts the optional parameters
|
||||
# @option opts [Pet] :json_serialized_object_ref_string_query
|
||||
# @option opts [Array<Pet>] :json_serialized_object_array_ref_string_query
|
||||
# @return [String]
|
||||
def test_query_style_json_serialization_object(opts = {})
|
||||
data, _status_code, _headers = test_query_style_json_serialization_object_with_http_info(opts)
|
||||
data
|
||||
end
|
||||
|
||||
# Test query parameter(s)
|
||||
# Test query parameter(s)
|
||||
# @param [Hash] opts the optional parameters
|
||||
# @option opts [Pet] :json_serialized_object_ref_string_query
|
||||
# @option opts [Array<Pet>] :json_serialized_object_array_ref_string_query
|
||||
# @return [Array<(String, Integer, Hash)>] String data, response status code and response headers
|
||||
def test_query_style_json_serialization_object_with_http_info(opts = {})
|
||||
if @api_client.config.debugging
|
||||
@api_client.config.logger.debug 'Calling API: QueryApi.test_query_style_json_serialization_object ...'
|
||||
end
|
||||
# resource path
|
||||
local_var_path = '/query/style_jsonSerialization/object'
|
||||
|
||||
# query parameters
|
||||
query_params = opts[:query_params] || {}
|
||||
query_params[:'json_serialized_object_ref_string_query'] = opts[:'json_serialized_object_ref_string_query'] if !opts[:'json_serialized_object_ref_string_query'].nil?
|
||||
query_params[:'json_serialized_object_array_ref_string_query'] = @api_client.build_collection_param(opts[:'json_serialized_object_array_ref_string_query'], :csv) if !opts[:'json_serialized_object_array_ref_string_query'].nil?
|
||||
|
||||
# header parameters
|
||||
header_params = opts[:header_params] || {}
|
||||
# HTTP header 'Accept' (if needed)
|
||||
header_params['Accept'] = @api_client.select_header_accept(['text/plain']) unless header_params['Accept']
|
||||
|
||||
# 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_json_serialization_object",
|
||||
: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_json_serialization_object\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
||||
end
|
||||
return data, status_code, headers
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user