You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For capitalized query/header parameters, the generated Ruby code converts them to underscore format with leading underscore, e.g. "MyHeader" => "_my_header".
For example, for parameters "MyPath", "MyQuery", "MyHeader" and "MyForm", the following is the generated code:
defself.my_method(event_id,_my_path,_my_header,_my_query,_my_form,opts={})query_param_keys=[:_my_query]# verify existence of paramsraise"event_id is required"ifevent_id.nil?raise"_my_path is required"if_my_path.nil?# set default values and merge with inputoptions={:event_id=>event_id,:_my_path=>_my_path,:_my_header=>_my_header,:_my_query=>_my_query,:_my_form=>_my_form}.merge(opts)#resource pathpath="/event/:event_id:/{MyPath}".sub('{format}','json').sub('{' + 'event_id' + '}',escapeString(event_id)).sub('{' + 'MyPath' + '}',escapeString(_my_path))# pull querystring keys from optionsqueryopts=options.selectdo |key,value|
query_param_keys.include?keyendheaders={_my_header: _my_header,}post_body=nilresponse=Swagger::Request.new(:POST,path,{:params=>queryopts,:headers=>headers,:body=>post_body}).make.bodyMyModel.new(response)end
The path parameter works here. Query and header parameters are using incorrect keys. The form parameter is not used at all.
The text was updated successfully, but these errors were encountered:
For capitalized query/header parameters, the generated Ruby code converts them to underscore format with leading underscore, e.g. "MyHeader" => "_my_header".
For example, for parameters "MyPath", "MyQuery", "MyHeader" and "MyForm", the following is the generated code:
The path parameter works here. Query and header parameters are using incorrect keys. The form parameter is not used at all.
The text was updated successfully, but these errors were encountered: