mirror of
https://github.com/valitydev/openapi-generator.git
synced 2024-11-08 11:23:58 +00:00
Remove redundant blank lines
This commit is contained in:
parent
a819e4d523
commit
61bf7f49cc
@ -10,7 +10,7 @@ class {{classname}}
|
||||
# {{notes}}
|
||||
{{#allParams}}{{#required}} # @param {{paramName}} {{description}}
|
||||
{{/required}}{{/allParams}} # @param [Hash] opts the optional parameters
|
||||
{{#allParams}}{{^required}} # @option opts [{{dataType}}] :{{baseName}} {{description}}
|
||||
{{#allParams}}{{^required}} # @option opts [{{dataType}}] :{{paramName}} {{description}}
|
||||
{{/required}}{{/allParams}} # @return {{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}void{{/returnType}}
|
||||
def self.{{nickname}}({{#allParams}}{{#required}}{{paramName}}, {{/required}}{{/allParams}}opts = {})
|
||||
# verify existence of params{{#allParams}}{{#required}}
|
||||
@ -20,8 +20,7 @@ class {{classname}}
|
||||
path = "{{path}}".sub('{format}','json'){{#pathParams}}.sub('{' + '{{baseName}}' + '}', {{paramName}}.to_s){{/pathParams}}
|
||||
|
||||
# query parameters
|
||||
query_params = {}
|
||||
{{#queryParams}}{{#required}}
|
||||
query_params = {}{{#queryParams}}{{#required}}
|
||||
query_params[:'{{{baseName}}}'] = {{{paramName}}}{{/required}}{{/queryParams}}{{#queryParams}}{{^required}}
|
||||
query_params[:'{{{baseName}}}'] = opts[:'{{{paramName}}}'] if opts[:'{{{paramName}}}']{{/required}}{{/queryParams}}
|
||||
|
||||
@ -32,14 +31,12 @@ class {{classname}}
|
||||
header_params['Accept'] = _header_accept if _header_accept != ''
|
||||
|
||||
_header_content_type = [{{#consumes}}'{{mediaType}}'{{#hasMore}}, {{/hasMore}}{{/consumes}}]
|
||||
header_params['Content-Type'] = _header_content_type.length > 0 ? _header_content_type[0] : 'application/json'
|
||||
{{#headerParams}}{{#required}}
|
||||
header_params['Content-Type'] = _header_content_type.length > 0 ? _header_content_type[0] : 'application/json'{{#headerParams}}{{#required}}
|
||||
header_params[:'{{{baseName}}}'] = {{{paramName}}}{{/required}}{{/headerParams}}{{#headerParams}}{{^required}}
|
||||
header_params[:'{{{baseName}}}'] = opts[:'{{{paramName}}}'] if opts[:'{{{paramName}}}']{{/required}}{{/headerParams}}
|
||||
|
||||
# form parameters
|
||||
form_params = {}
|
||||
{{#formParams}}{{#required}}
|
||||
form_params = {}{{#formParams}}{{#required}}
|
||||
form_params["{{baseName}}"] = {{paramName}}{{/required}}{{/formParams}}{{#formParams}}{{^required}}
|
||||
form_params["{{baseName}}"] = opts[:'{{paramName}}'] if opts[:'{{paramName}}']{{/required}}{{/formParams}}
|
||||
|
||||
|
@ -18,7 +18,6 @@ class PetApi
|
||||
# query parameters
|
||||
query_params = {}
|
||||
|
||||
|
||||
# header parameters
|
||||
header_params = {}
|
||||
|
||||
@ -28,11 +27,9 @@ class PetApi
|
||||
_header_content_type = ['application/json', 'application/xml', ]
|
||||
header_params['Content-Type'] = _header_content_type.length > 0 ? _header_content_type[0] : 'application/json'
|
||||
|
||||
|
||||
# form parameters
|
||||
form_params = {}
|
||||
|
||||
|
||||
# http body (model)
|
||||
post_body = nil
|
||||
if body != nil
|
||||
@ -72,7 +69,6 @@ class PetApi
|
||||
# query parameters
|
||||
query_params = {}
|
||||
|
||||
|
||||
# header parameters
|
||||
header_params = {}
|
||||
|
||||
@ -82,11 +78,9 @@ class PetApi
|
||||
_header_content_type = ['application/json', 'application/xml', ]
|
||||
header_params['Content-Type'] = _header_content_type.length > 0 ? _header_content_type[0] : 'application/json'
|
||||
|
||||
|
||||
# form parameters
|
||||
form_params = {}
|
||||
|
||||
|
||||
# http body (model)
|
||||
post_body = nil
|
||||
if body != nil
|
||||
@ -125,7 +119,6 @@ class PetApi
|
||||
|
||||
# query parameters
|
||||
query_params = {}
|
||||
|
||||
query_params[:'status'] = opts[:'status'] if opts[:'status']
|
||||
|
||||
# header parameters
|
||||
@ -137,11 +130,9 @@ class PetApi
|
||||
_header_content_type = []
|
||||
header_params['Content-Type'] = _header_content_type.length > 0 ? _header_content_type[0] : 'application/json'
|
||||
|
||||
|
||||
# form parameters
|
||||
form_params = {}
|
||||
|
||||
|
||||
# http body (model)
|
||||
post_body = nil
|
||||
|
||||
@ -162,7 +153,6 @@ class PetApi
|
||||
|
||||
# query parameters
|
||||
query_params = {}
|
||||
|
||||
query_params[:'tags'] = opts[:'tags'] if opts[:'tags']
|
||||
|
||||
# header parameters
|
||||
@ -174,11 +164,9 @@ class PetApi
|
||||
_header_content_type = []
|
||||
header_params['Content-Type'] = _header_content_type.length > 0 ? _header_content_type[0] : 'application/json'
|
||||
|
||||
|
||||
# form parameters
|
||||
form_params = {}
|
||||
|
||||
|
||||
# http body (model)
|
||||
post_body = nil
|
||||
|
||||
@ -201,7 +189,6 @@ class PetApi
|
||||
# query parameters
|
||||
query_params = {}
|
||||
|
||||
|
||||
# header parameters
|
||||
header_params = {}
|
||||
|
||||
@ -211,11 +198,9 @@ class PetApi
|
||||
_header_content_type = []
|
||||
header_params['Content-Type'] = _header_content_type.length > 0 ? _header_content_type[0] : 'application/json'
|
||||
|
||||
|
||||
# form parameters
|
||||
form_params = {}
|
||||
|
||||
|
||||
# http body (model)
|
||||
post_body = nil
|
||||
|
||||
@ -240,7 +225,6 @@ class PetApi
|
||||
# query parameters
|
||||
query_params = {}
|
||||
|
||||
|
||||
# header parameters
|
||||
header_params = {}
|
||||
|
||||
@ -250,10 +234,8 @@ class PetApi
|
||||
_header_content_type = ['application/x-www-form-urlencoded', ]
|
||||
header_params['Content-Type'] = _header_content_type.length > 0 ? _header_content_type[0] : 'application/json'
|
||||
|
||||
|
||||
# form parameters
|
||||
form_params = {}
|
||||
|
||||
form_params["name"] = opts[:'name'] if opts[:'name']
|
||||
form_params["status"] = opts[:'status'] if opts[:'status']
|
||||
|
||||
@ -279,7 +261,6 @@ class PetApi
|
||||
# query parameters
|
||||
query_params = {}
|
||||
|
||||
|
||||
# header parameters
|
||||
header_params = {}
|
||||
|
||||
@ -288,13 +269,11 @@ class PetApi
|
||||
|
||||
_header_content_type = []
|
||||
header_params['Content-Type'] = _header_content_type.length > 0 ? _header_content_type[0] : 'application/json'
|
||||
|
||||
header_params[:'api_key'] = opts[:'api_key'] if opts[:'api_key']
|
||||
|
||||
# form parameters
|
||||
form_params = {}
|
||||
|
||||
|
||||
# http body (model)
|
||||
post_body = nil
|
||||
|
||||
@ -305,7 +284,7 @@ class PetApi
|
||||
#
|
||||
# @param pet_id ID of pet to update
|
||||
# @param [Hash] opts the optional parameters
|
||||
# @option opts [string] :additionalMetadata Additional data to pass to server
|
||||
# @option opts [string] :additional_metadata Additional data to pass to server
|
||||
# @option opts [file] :file file to upload
|
||||
# @return void
|
||||
def self.uploadFile(pet_id, opts = {})
|
||||
@ -318,7 +297,6 @@ class PetApi
|
||||
# query parameters
|
||||
query_params = {}
|
||||
|
||||
|
||||
# header parameters
|
||||
header_params = {}
|
||||
|
||||
@ -328,10 +306,8 @@ class PetApi
|
||||
_header_content_type = ['multipart/form-data', ]
|
||||
header_params['Content-Type'] = _header_content_type.length > 0 ? _header_content_type[0] : 'application/json'
|
||||
|
||||
|
||||
# form parameters
|
||||
form_params = {}
|
||||
|
||||
form_params["additionalMetadata"] = opts[:'additional_metadata'] if opts[:'additional_metadata']
|
||||
form_params["file"] = opts[:'file'] if opts[:'file']
|
||||
|
||||
|
@ -17,7 +17,6 @@ class StoreApi
|
||||
# query parameters
|
||||
query_params = {}
|
||||
|
||||
|
||||
# header parameters
|
||||
header_params = {}
|
||||
|
||||
@ -27,11 +26,9 @@ class StoreApi
|
||||
_header_content_type = []
|
||||
header_params['Content-Type'] = _header_content_type.length > 0 ? _header_content_type[0] : 'application/json'
|
||||
|
||||
|
||||
# form parameters
|
||||
form_params = {}
|
||||
|
||||
|
||||
# http body (model)
|
||||
post_body = nil
|
||||
|
||||
@ -53,7 +50,6 @@ class StoreApi
|
||||
# query parameters
|
||||
query_params = {}
|
||||
|
||||
|
||||
# header parameters
|
||||
header_params = {}
|
||||
|
||||
@ -63,11 +59,9 @@ class StoreApi
|
||||
_header_content_type = []
|
||||
header_params['Content-Type'] = _header_content_type.length > 0 ? _header_content_type[0] : 'application/json'
|
||||
|
||||
|
||||
# form parameters
|
||||
form_params = {}
|
||||
|
||||
|
||||
# http body (model)
|
||||
post_body = nil
|
||||
if body != nil
|
||||
@ -109,7 +103,6 @@ class StoreApi
|
||||
# query parameters
|
||||
query_params = {}
|
||||
|
||||
|
||||
# header parameters
|
||||
header_params = {}
|
||||
|
||||
@ -119,11 +112,9 @@ class StoreApi
|
||||
_header_content_type = []
|
||||
header_params['Content-Type'] = _header_content_type.length > 0 ? _header_content_type[0] : 'application/json'
|
||||
|
||||
|
||||
# form parameters
|
||||
form_params = {}
|
||||
|
||||
|
||||
# http body (model)
|
||||
post_body = nil
|
||||
|
||||
@ -146,7 +137,6 @@ class StoreApi
|
||||
# query parameters
|
||||
query_params = {}
|
||||
|
||||
|
||||
# header parameters
|
||||
header_params = {}
|
||||
|
||||
@ -156,11 +146,9 @@ class StoreApi
|
||||
_header_content_type = []
|
||||
header_params['Content-Type'] = _header_content_type.length > 0 ? _header_content_type[0] : 'application/json'
|
||||
|
||||
|
||||
# form parameters
|
||||
form_params = {}
|
||||
|
||||
|
||||
# http body (model)
|
||||
post_body = nil
|
||||
|
||||
|
@ -18,7 +18,6 @@ class UserApi
|
||||
# query parameters
|
||||
query_params = {}
|
||||
|
||||
|
||||
# header parameters
|
||||
header_params = {}
|
||||
|
||||
@ -28,11 +27,9 @@ class UserApi
|
||||
_header_content_type = []
|
||||
header_params['Content-Type'] = _header_content_type.length > 0 ? _header_content_type[0] : 'application/json'
|
||||
|
||||
|
||||
# form parameters
|
||||
form_params = {}
|
||||
|
||||
|
||||
# http body (model)
|
||||
post_body = nil
|
||||
if body != nil
|
||||
@ -72,7 +69,6 @@ class UserApi
|
||||
# query parameters
|
||||
query_params = {}
|
||||
|
||||
|
||||
# header parameters
|
||||
header_params = {}
|
||||
|
||||
@ -82,11 +78,9 @@ class UserApi
|
||||
_header_content_type = []
|
||||
header_params['Content-Type'] = _header_content_type.length > 0 ? _header_content_type[0] : 'application/json'
|
||||
|
||||
|
||||
# form parameters
|
||||
form_params = {}
|
||||
|
||||
|
||||
# http body (model)
|
||||
post_body = nil
|
||||
if body != nil
|
||||
@ -126,7 +120,6 @@ class UserApi
|
||||
# query parameters
|
||||
query_params = {}
|
||||
|
||||
|
||||
# header parameters
|
||||
header_params = {}
|
||||
|
||||
@ -136,11 +129,9 @@ class UserApi
|
||||
_header_content_type = []
|
||||
header_params['Content-Type'] = _header_content_type.length > 0 ? _header_content_type[0] : 'application/json'
|
||||
|
||||
|
||||
# form parameters
|
||||
form_params = {}
|
||||
|
||||
|
||||
# http body (model)
|
||||
post_body = nil
|
||||
if body != nil
|
||||
@ -180,7 +171,6 @@ class UserApi
|
||||
|
||||
# query parameters
|
||||
query_params = {}
|
||||
|
||||
query_params[:'username'] = opts[:'username'] if opts[:'username']
|
||||
query_params[:'password'] = opts[:'password'] if opts[:'password']
|
||||
|
||||
@ -193,11 +183,9 @@ class UserApi
|
||||
_header_content_type = []
|
||||
header_params['Content-Type'] = _header_content_type.length > 0 ? _header_content_type[0] : 'application/json'
|
||||
|
||||
|
||||
# form parameters
|
||||
form_params = {}
|
||||
|
||||
|
||||
# http body (model)
|
||||
post_body = nil
|
||||
|
||||
@ -218,7 +206,6 @@ class UserApi
|
||||
# query parameters
|
||||
query_params = {}
|
||||
|
||||
|
||||
# header parameters
|
||||
header_params = {}
|
||||
|
||||
@ -228,11 +215,9 @@ class UserApi
|
||||
_header_content_type = []
|
||||
header_params['Content-Type'] = _header_content_type.length > 0 ? _header_content_type[0] : 'application/json'
|
||||
|
||||
|
||||
# form parameters
|
||||
form_params = {}
|
||||
|
||||
|
||||
# http body (model)
|
||||
post_body = nil
|
||||
|
||||
@ -254,7 +239,6 @@ class UserApi
|
||||
# query parameters
|
||||
query_params = {}
|
||||
|
||||
|
||||
# header parameters
|
||||
header_params = {}
|
||||
|
||||
@ -264,11 +248,9 @@ class UserApi
|
||||
_header_content_type = []
|
||||
header_params['Content-Type'] = _header_content_type.length > 0 ? _header_content_type[0] : 'application/json'
|
||||
|
||||
|
||||
# form parameters
|
||||
form_params = {}
|
||||
|
||||
|
||||
# http body (model)
|
||||
post_body = nil
|
||||
|
||||
@ -292,7 +274,6 @@ class UserApi
|
||||
# query parameters
|
||||
query_params = {}
|
||||
|
||||
|
||||
# header parameters
|
||||
header_params = {}
|
||||
|
||||
@ -302,11 +283,9 @@ class UserApi
|
||||
_header_content_type = []
|
||||
header_params['Content-Type'] = _header_content_type.length > 0 ? _header_content_type[0] : 'application/json'
|
||||
|
||||
|
||||
# form parameters
|
||||
form_params = {}
|
||||
|
||||
|
||||
# http body (model)
|
||||
post_body = nil
|
||||
if body != nil
|
||||
@ -347,7 +326,6 @@ class UserApi
|
||||
# query parameters
|
||||
query_params = {}
|
||||
|
||||
|
||||
# header parameters
|
||||
header_params = {}
|
||||
|
||||
@ -357,11 +335,9 @@ class UserApi
|
||||
_header_content_type = []
|
||||
header_params['Content-Type'] = _header_content_type.length > 0 ? _header_content_type[0] : 'application/json'
|
||||
|
||||
|
||||
# form parameters
|
||||
form_params = {}
|
||||
|
||||
|
||||
# http body (model)
|
||||
post_body = nil
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user