forked from loafle/openapi-generator-original
update ruby accept header
This commit is contained in:
@@ -41,8 +41,17 @@ class {{classname}}
|
||||
query_param_keys.include? key
|
||||
end
|
||||
|
||||
# header parameters, if any
|
||||
# header parameters
|
||||
headers = {}
|
||||
|
||||
_header_accept = '{{#produces}}{{mediaType}}{{#hasMore}}, {{/hasMore}}{{/produces}}';
|
||||
if (_header_accept != '') {
|
||||
headerParams['Accept'] = _header_accept;
|
||||
}
|
||||
_header_content_type = [{{#consumes}}'{{mediaType}}'{{#hasMore}},{{/hasMore}}{{/consumes}}];
|
||||
headerParams['Content-Type'] = _header_content_type.length > 0 ? _header_content_type[0] : 'application/json';
|
||||
|
||||
|
||||
{{#headerParams}}{{#optional}}headers[:'{{{baseName}}}'] = options[:'{{{paramName}}}'] if options[:'{{{paramName}}}']{{/optional}}{{/headerParams}}
|
||||
{{#headerParams}}{{^optional}}headers[:'{{{baseName}}}'] = {{{paramName}}}{{/optional}}{{/headerParams}}
|
||||
# http body (model)
|
||||
|
||||
@@ -32,8 +32,17 @@ class PetApi
|
||||
query_param_keys.include? key
|
||||
end
|
||||
|
||||
# header parameters, if any
|
||||
# header parameters
|
||||
headers = {}
|
||||
|
||||
_header_accept = 'application/json, application/xml';
|
||||
if (_header_accept != '') {
|
||||
headerParams['Accept'] = _header_accept;
|
||||
}
|
||||
_header_content_type = [('application/json','application/xml',);
|
||||
headerParams['Content-Type'] = _header_content_type.length > 0 ? _header_content_type[0] : 'application/json';
|
||||
|
||||
|
||||
|
||||
|
||||
# http body (model)
|
||||
@@ -92,8 +101,17 @@ class PetApi
|
||||
query_param_keys.include? key
|
||||
end
|
||||
|
||||
# header parameters, if any
|
||||
# header parameters
|
||||
headers = {}
|
||||
|
||||
_header_accept = 'application/json, application/xml';
|
||||
if (_header_accept != '') {
|
||||
headerParams['Accept'] = _header_accept;
|
||||
}
|
||||
_header_content_type = [('application/json','application/xml',);
|
||||
headerParams['Content-Type'] = _header_content_type.length > 0 ? _header_content_type[0] : 'application/json';
|
||||
|
||||
|
||||
|
||||
|
||||
# http body (model)
|
||||
@@ -152,8 +170,17 @@ class PetApi
|
||||
query_param_keys.include? key
|
||||
end
|
||||
|
||||
# header parameters, if any
|
||||
# header parameters
|
||||
headers = {}
|
||||
|
||||
_header_accept = 'application/json, application/xml';
|
||||
if (_header_accept != '') {
|
||||
headerParams['Accept'] = _header_accept;
|
||||
}
|
||||
_header_content_type = [();
|
||||
headerParams['Content-Type'] = _header_content_type.length > 0 ? _header_content_type[0] : 'application/json';
|
||||
|
||||
|
||||
|
||||
|
||||
# http body (model)
|
||||
@@ -194,8 +221,17 @@ class PetApi
|
||||
query_param_keys.include? key
|
||||
end
|
||||
|
||||
# header parameters, if any
|
||||
# header parameters
|
||||
headers = {}
|
||||
|
||||
_header_accept = 'application/json, application/xml';
|
||||
if (_header_accept != '') {
|
||||
headerParams['Accept'] = _header_accept;
|
||||
}
|
||||
_header_content_type = [();
|
||||
headerParams['Content-Type'] = _header_content_type.length > 0 ? _header_content_type[0] : 'application/json';
|
||||
|
||||
|
||||
|
||||
|
||||
# http body (model)
|
||||
@@ -237,8 +273,17 @@ class PetApi
|
||||
query_param_keys.include? key
|
||||
end
|
||||
|
||||
# header parameters, if any
|
||||
# header parameters
|
||||
headers = {}
|
||||
|
||||
_header_accept = 'application/json, application/xml';
|
||||
if (_header_accept != '') {
|
||||
headerParams['Accept'] = _header_accept;
|
||||
}
|
||||
_header_content_type = [();
|
||||
headerParams['Content-Type'] = _header_content_type.length > 0 ? _header_content_type[0] : 'application/json';
|
||||
|
||||
|
||||
|
||||
|
||||
# http body (model)
|
||||
@@ -283,8 +328,17 @@ class PetApi
|
||||
query_param_keys.include? key
|
||||
end
|
||||
|
||||
# header parameters, if any
|
||||
# header parameters
|
||||
headers = {}
|
||||
|
||||
_header_accept = 'application/json, application/xml';
|
||||
if (_header_accept != '') {
|
||||
headerParams['Accept'] = _header_accept;
|
||||
}
|
||||
_header_content_type = [('application/x-www-form-urlencoded',);
|
||||
headerParams['Content-Type'] = _header_content_type.length > 0 ? _header_content_type[0] : 'application/json';
|
||||
|
||||
|
||||
|
||||
|
||||
# http body (model)
|
||||
@@ -328,8 +382,17 @@ class PetApi
|
||||
query_param_keys.include? key
|
||||
end
|
||||
|
||||
# header parameters, if any
|
||||
# header parameters
|
||||
headers = {}
|
||||
|
||||
_header_accept = 'application/json, application/xml';
|
||||
if (_header_accept != '') {
|
||||
headerParams['Accept'] = _header_accept;
|
||||
}
|
||||
_header_content_type = [();
|
||||
headerParams['Content-Type'] = _header_content_type.length > 0 ? _header_content_type[0] : 'application/json';
|
||||
|
||||
|
||||
|
||||
headers[:'api_key'] = api_key
|
||||
# http body (model)
|
||||
@@ -373,8 +436,17 @@ class PetApi
|
||||
query_param_keys.include? key
|
||||
end
|
||||
|
||||
# header parameters, if any
|
||||
# header parameters
|
||||
headers = {}
|
||||
|
||||
_header_accept = 'application/json, application/xml';
|
||||
if (_header_accept != '') {
|
||||
headerParams['Accept'] = _header_accept;
|
||||
}
|
||||
_header_content_type = [('multipart/form-data',);
|
||||
headerParams['Content-Type'] = _header_content_type.length > 0 ? _header_content_type[0] : 'application/json';
|
||||
|
||||
|
||||
|
||||
|
||||
# http body (model)
|
||||
|
||||
@@ -30,8 +30,17 @@ class StoreApi
|
||||
query_param_keys.include? key
|
||||
end
|
||||
|
||||
# header parameters, if any
|
||||
# header parameters
|
||||
headers = {}
|
||||
|
||||
_header_accept = 'application/json, application/xml';
|
||||
if (_header_accept != '') {
|
||||
headerParams['Accept'] = _header_accept;
|
||||
}
|
||||
_header_content_type = [();
|
||||
headerParams['Content-Type'] = _header_content_type.length > 0 ? _header_content_type[0] : 'application/json';
|
||||
|
||||
|
||||
|
||||
|
||||
# http body (model)
|
||||
@@ -72,8 +81,17 @@ class StoreApi
|
||||
query_param_keys.include? key
|
||||
end
|
||||
|
||||
# header parameters, if any
|
||||
# header parameters
|
||||
headers = {}
|
||||
|
||||
_header_accept = 'application/json, application/xml';
|
||||
if (_header_accept != '') {
|
||||
headerParams['Accept'] = _header_accept;
|
||||
}
|
||||
_header_content_type = [();
|
||||
headerParams['Content-Type'] = _header_content_type.length > 0 ? _header_content_type[0] : 'application/json';
|
||||
|
||||
|
||||
|
||||
|
||||
# http body (model)
|
||||
@@ -134,8 +152,17 @@ class StoreApi
|
||||
query_param_keys.include? key
|
||||
end
|
||||
|
||||
# header parameters, if any
|
||||
# header parameters
|
||||
headers = {}
|
||||
|
||||
_header_accept = 'application/json, application/xml';
|
||||
if (_header_accept != '') {
|
||||
headerParams['Accept'] = _header_accept;
|
||||
}
|
||||
_header_content_type = [();
|
||||
headerParams['Content-Type'] = _header_content_type.length > 0 ? _header_content_type[0] : 'application/json';
|
||||
|
||||
|
||||
|
||||
|
||||
# http body (model)
|
||||
@@ -176,8 +203,17 @@ class StoreApi
|
||||
query_param_keys.include? key
|
||||
end
|
||||
|
||||
# header parameters, if any
|
||||
# header parameters
|
||||
headers = {}
|
||||
|
||||
_header_accept = 'application/json, application/xml';
|
||||
if (_header_accept != '') {
|
||||
headerParams['Accept'] = _header_accept;
|
||||
}
|
||||
_header_content_type = [();
|
||||
headerParams['Content-Type'] = _header_content_type.length > 0 ? _header_content_type[0] : 'application/json';
|
||||
|
||||
|
||||
|
||||
|
||||
# http body (model)
|
||||
|
||||
@@ -32,8 +32,17 @@ class UserApi
|
||||
query_param_keys.include? key
|
||||
end
|
||||
|
||||
# header parameters, if any
|
||||
# header parameters
|
||||
headers = {}
|
||||
|
||||
_header_accept = 'application/json, application/xml';
|
||||
if (_header_accept != '') {
|
||||
headerParams['Accept'] = _header_accept;
|
||||
}
|
||||
_header_content_type = [();
|
||||
headerParams['Content-Type'] = _header_content_type.length > 0 ? _header_content_type[0] : 'application/json';
|
||||
|
||||
|
||||
|
||||
|
||||
# http body (model)
|
||||
@@ -92,8 +101,17 @@ class UserApi
|
||||
query_param_keys.include? key
|
||||
end
|
||||
|
||||
# header parameters, if any
|
||||
# header parameters
|
||||
headers = {}
|
||||
|
||||
_header_accept = 'application/json, application/xml';
|
||||
if (_header_accept != '') {
|
||||
headerParams['Accept'] = _header_accept;
|
||||
}
|
||||
_header_content_type = [();
|
||||
headerParams['Content-Type'] = _header_content_type.length > 0 ? _header_content_type[0] : 'application/json';
|
||||
|
||||
|
||||
|
||||
|
||||
# http body (model)
|
||||
@@ -152,8 +170,17 @@ class UserApi
|
||||
query_param_keys.include? key
|
||||
end
|
||||
|
||||
# header parameters, if any
|
||||
# header parameters
|
||||
headers = {}
|
||||
|
||||
_header_accept = 'application/json, application/xml';
|
||||
if (_header_accept != '') {
|
||||
headerParams['Accept'] = _header_accept;
|
||||
}
|
||||
_header_content_type = [();
|
||||
headerParams['Content-Type'] = _header_content_type.length > 0 ? _header_content_type[0] : 'application/json';
|
||||
|
||||
|
||||
|
||||
|
||||
# http body (model)
|
||||
@@ -214,8 +241,17 @@ class UserApi
|
||||
query_param_keys.include? key
|
||||
end
|
||||
|
||||
# header parameters, if any
|
||||
# header parameters
|
||||
headers = {}
|
||||
|
||||
_header_accept = 'application/json, application/xml';
|
||||
if (_header_accept != '') {
|
||||
headerParams['Accept'] = _header_accept;
|
||||
}
|
||||
_header_content_type = [();
|
||||
headerParams['Content-Type'] = _header_content_type.length > 0 ? _header_content_type[0] : 'application/json';
|
||||
|
||||
|
||||
|
||||
|
||||
# http body (model)
|
||||
@@ -253,8 +289,17 @@ class UserApi
|
||||
query_param_keys.include? key
|
||||
end
|
||||
|
||||
# header parameters, if any
|
||||
# header parameters
|
||||
headers = {}
|
||||
|
||||
_header_accept = 'application/json, application/xml';
|
||||
if (_header_accept != '') {
|
||||
headerParams['Accept'] = _header_accept;
|
||||
}
|
||||
_header_content_type = [();
|
||||
headerParams['Content-Type'] = _header_content_type.length > 0 ? _header_content_type[0] : 'application/json';
|
||||
|
||||
|
||||
|
||||
|
||||
# http body (model)
|
||||
@@ -294,8 +339,17 @@ class UserApi
|
||||
query_param_keys.include? key
|
||||
end
|
||||
|
||||
# header parameters, if any
|
||||
# header parameters
|
||||
headers = {}
|
||||
|
||||
_header_accept = 'application/json, application/xml';
|
||||
if (_header_accept != '') {
|
||||
headerParams['Accept'] = _header_accept;
|
||||
}
|
||||
_header_content_type = [();
|
||||
headerParams['Content-Type'] = _header_content_type.length > 0 ? _header_content_type[0] : 'application/json';
|
||||
|
||||
|
||||
|
||||
|
||||
# http body (model)
|
||||
@@ -338,8 +392,17 @@ class UserApi
|
||||
query_param_keys.include? key
|
||||
end
|
||||
|
||||
# header parameters, if any
|
||||
# header parameters
|
||||
headers = {}
|
||||
|
||||
_header_accept = 'application/json, application/xml';
|
||||
if (_header_accept != '') {
|
||||
headerParams['Accept'] = _header_accept;
|
||||
}
|
||||
_header_content_type = [();
|
||||
headerParams['Content-Type'] = _header_content_type.length > 0 ? _header_content_type[0] : 'application/json';
|
||||
|
||||
|
||||
|
||||
|
||||
# http body (model)
|
||||
@@ -399,8 +462,17 @@ class UserApi
|
||||
query_param_keys.include? key
|
||||
end
|
||||
|
||||
# header parameters, if any
|
||||
# header parameters
|
||||
headers = {}
|
||||
|
||||
_header_accept = 'application/json, application/xml';
|
||||
if (_header_accept != '') {
|
||||
headerParams['Accept'] = _header_accept;
|
||||
}
|
||||
_header_content_type = [();
|
||||
headerParams['Content-Type'] = _header_content_type.length > 0 ? _header_content_type[0] : 'application/json';
|
||||
|
||||
|
||||
|
||||
|
||||
# http body (model)
|
||||
|
||||
Reference in New Issue
Block a user