forked from loafle/openapi-generator-original
fix syntax
This commit is contained in:
@@ -44,13 +44,12 @@ class {{classname}}
|
||||
# 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';
|
||||
|
||||
_header_accept = '{{#produces}}{{mediaType}}{{#hasMore}}, {{/hasMore}}{{/produces}}'
|
||||
if _header_accept != ''
|
||||
headerParams['Accept'] = _header_accept
|
||||
end
|
||||
_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}}
|
||||
|
||||
@@ -35,13 +35,12 @@ class PetApi
|
||||
# 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';
|
||||
|
||||
_header_accept = 'application/json, application/xml'
|
||||
if _header_accept != ''
|
||||
headerParams['Accept'] = _header_accept
|
||||
end
|
||||
_header_content_type = ['application/json', 'application/xml', ]
|
||||
headerParams['Content-Type'] = _header_content_type.length > 0 ? _header_content_type[0] : 'application/json'
|
||||
|
||||
|
||||
|
||||
@@ -104,13 +103,12 @@ class PetApi
|
||||
# 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';
|
||||
|
||||
_header_accept = 'application/json, application/xml'
|
||||
if _header_accept != ''
|
||||
headerParams['Accept'] = _header_accept
|
||||
end
|
||||
_header_content_type = ['application/json', 'application/xml', ]
|
||||
headerParams['Content-Type'] = _header_content_type.length > 0 ? _header_content_type[0] : 'application/json'
|
||||
|
||||
|
||||
|
||||
@@ -173,13 +171,12 @@ class PetApi
|
||||
# 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';
|
||||
|
||||
_header_accept = 'application/json, application/xml'
|
||||
if _header_accept != ''
|
||||
headerParams['Accept'] = _header_accept
|
||||
end
|
||||
_header_content_type = []
|
||||
headerParams['Content-Type'] = _header_content_type.length > 0 ? _header_content_type[0] : 'application/json'
|
||||
|
||||
|
||||
|
||||
@@ -224,13 +221,12 @@ class PetApi
|
||||
# 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';
|
||||
|
||||
_header_accept = 'application/json, application/xml'
|
||||
if _header_accept != ''
|
||||
headerParams['Accept'] = _header_accept
|
||||
end
|
||||
_header_content_type = []
|
||||
headerParams['Content-Type'] = _header_content_type.length > 0 ? _header_content_type[0] : 'application/json'
|
||||
|
||||
|
||||
|
||||
@@ -276,13 +272,12 @@ class PetApi
|
||||
# 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';
|
||||
|
||||
_header_accept = 'application/json, application/xml'
|
||||
if _header_accept != ''
|
||||
headerParams['Accept'] = _header_accept
|
||||
end
|
||||
_header_content_type = []
|
||||
headerParams['Content-Type'] = _header_content_type.length > 0 ? _header_content_type[0] : 'application/json'
|
||||
|
||||
|
||||
|
||||
@@ -331,13 +326,12 @@ class PetApi
|
||||
# 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';
|
||||
|
||||
_header_accept = 'application/json, application/xml'
|
||||
if _header_accept != ''
|
||||
headerParams['Accept'] = _header_accept
|
||||
end
|
||||
_header_content_type = ['application/x-www-form-urlencoded', ]
|
||||
headerParams['Content-Type'] = _header_content_type.length > 0 ? _header_content_type[0] : 'application/json'
|
||||
|
||||
|
||||
|
||||
@@ -385,13 +379,12 @@ class PetApi
|
||||
# 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';
|
||||
|
||||
_header_accept = 'application/json, application/xml'
|
||||
if _header_accept != ''
|
||||
headerParams['Accept'] = _header_accept
|
||||
end
|
||||
_header_content_type = []
|
||||
headerParams['Content-Type'] = _header_content_type.length > 0 ? _header_content_type[0] : 'application/json'
|
||||
|
||||
|
||||
headers[:'api_key'] = api_key
|
||||
@@ -439,13 +432,12 @@ class PetApi
|
||||
# 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';
|
||||
|
||||
_header_accept = 'application/json, application/xml'
|
||||
if _header_accept != ''
|
||||
headerParams['Accept'] = _header_accept
|
||||
end
|
||||
_header_content_type = ['multipart/form-data', ]
|
||||
headerParams['Content-Type'] = _header_content_type.length > 0 ? _header_content_type[0] : 'application/json'
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -33,13 +33,12 @@ class StoreApi
|
||||
# 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';
|
||||
|
||||
_header_accept = 'application/json, application/xml'
|
||||
if _header_accept != ''
|
||||
headerParams['Accept'] = _header_accept
|
||||
end
|
||||
_header_content_type = []
|
||||
headerParams['Content-Type'] = _header_content_type.length > 0 ? _header_content_type[0] : 'application/json'
|
||||
|
||||
|
||||
|
||||
@@ -84,13 +83,12 @@ class StoreApi
|
||||
# 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';
|
||||
|
||||
_header_accept = 'application/json, application/xml'
|
||||
if _header_accept != ''
|
||||
headerParams['Accept'] = _header_accept
|
||||
end
|
||||
_header_content_type = []
|
||||
headerParams['Content-Type'] = _header_content_type.length > 0 ? _header_content_type[0] : 'application/json'
|
||||
|
||||
|
||||
|
||||
@@ -155,13 +153,12 @@ class StoreApi
|
||||
# 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';
|
||||
|
||||
_header_accept = 'application/json, application/xml'
|
||||
if _header_accept != ''
|
||||
headerParams['Accept'] = _header_accept
|
||||
end
|
||||
_header_content_type = []
|
||||
headerParams['Content-Type'] = _header_content_type.length > 0 ? _header_content_type[0] : 'application/json'
|
||||
|
||||
|
||||
|
||||
@@ -206,13 +203,12 @@ class StoreApi
|
||||
# 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';
|
||||
|
||||
_header_accept = 'application/json, application/xml'
|
||||
if _header_accept != ''
|
||||
headerParams['Accept'] = _header_accept
|
||||
end
|
||||
_header_content_type = []
|
||||
headerParams['Content-Type'] = _header_content_type.length > 0 ? _header_content_type[0] : 'application/json'
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -35,13 +35,12 @@ class UserApi
|
||||
# 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';
|
||||
|
||||
_header_accept = 'application/json, application/xml'
|
||||
if _header_accept != ''
|
||||
headerParams['Accept'] = _header_accept
|
||||
end
|
||||
_header_content_type = []
|
||||
headerParams['Content-Type'] = _header_content_type.length > 0 ? _header_content_type[0] : 'application/json'
|
||||
|
||||
|
||||
|
||||
@@ -104,13 +103,12 @@ class UserApi
|
||||
# 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';
|
||||
|
||||
_header_accept = 'application/json, application/xml'
|
||||
if _header_accept != ''
|
||||
headerParams['Accept'] = _header_accept
|
||||
end
|
||||
_header_content_type = []
|
||||
headerParams['Content-Type'] = _header_content_type.length > 0 ? _header_content_type[0] : 'application/json'
|
||||
|
||||
|
||||
|
||||
@@ -173,13 +171,12 @@ class UserApi
|
||||
# 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';
|
||||
|
||||
_header_accept = 'application/json, application/xml'
|
||||
if _header_accept != ''
|
||||
headerParams['Accept'] = _header_accept
|
||||
end
|
||||
_header_content_type = []
|
||||
headerParams['Content-Type'] = _header_content_type.length > 0 ? _header_content_type[0] : 'application/json'
|
||||
|
||||
|
||||
|
||||
@@ -244,13 +241,12 @@ class UserApi
|
||||
# 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';
|
||||
|
||||
_header_accept = 'application/json, application/xml'
|
||||
if _header_accept != ''
|
||||
headerParams['Accept'] = _header_accept
|
||||
end
|
||||
_header_content_type = []
|
||||
headerParams['Content-Type'] = _header_content_type.length > 0 ? _header_content_type[0] : 'application/json'
|
||||
|
||||
|
||||
|
||||
@@ -292,13 +288,12 @@ class UserApi
|
||||
# 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';
|
||||
|
||||
_header_accept = 'application/json, application/xml'
|
||||
if _header_accept != ''
|
||||
headerParams['Accept'] = _header_accept
|
||||
end
|
||||
_header_content_type = []
|
||||
headerParams['Content-Type'] = _header_content_type.length > 0 ? _header_content_type[0] : 'application/json'
|
||||
|
||||
|
||||
|
||||
@@ -342,13 +337,12 @@ class UserApi
|
||||
# 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';
|
||||
|
||||
_header_accept = 'application/json, application/xml'
|
||||
if _header_accept != ''
|
||||
headerParams['Accept'] = _header_accept
|
||||
end
|
||||
_header_content_type = []
|
||||
headerParams['Content-Type'] = _header_content_type.length > 0 ? _header_content_type[0] : 'application/json'
|
||||
|
||||
|
||||
|
||||
@@ -395,13 +389,12 @@ class UserApi
|
||||
# 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';
|
||||
|
||||
_header_accept = 'application/json, application/xml'
|
||||
if _header_accept != ''
|
||||
headerParams['Accept'] = _header_accept
|
||||
end
|
||||
_header_content_type = []
|
||||
headerParams['Content-Type'] = _header_content_type.length > 0 ? _header_content_type[0] : 'application/json'
|
||||
|
||||
|
||||
|
||||
@@ -465,13 +458,12 @@ class UserApi
|
||||
# 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';
|
||||
|
||||
_header_accept = 'application/json, application/xml'
|
||||
if _header_accept != ''
|
||||
headerParams['Accept'] = _header_accept
|
||||
end
|
||||
_header_content_type = []
|
||||
headerParams['Content-Type'] = _header_content_type.length > 0 ? _header_content_type[0] : 'application/json'
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user