forked from loafle/openapi-generator-original
clean up of formatting
This commit is contained in:
parent
68436f6cbe
commit
0b7db0ce2d
@ -9,14 +9,12 @@ class Pet_api
|
|||||||
end
|
end
|
||||||
|
|
||||||
def self.get_pet_by_id (pet_id,opts={})
|
def self.get_pet_by_id (pet_id,opts={})
|
||||||
query_param_keys = [
|
query_param_keys = []
|
||||||
]
|
|
||||||
|
|
||||||
# verify existence of params
|
# verify existence of params
|
||||||
raise "pet_id is required" if pet_id.nil?
|
raise "pet_id is required" if pet_id.nil?
|
||||||
# set default values and merge with input
|
# set default values and merge with input
|
||||||
options = {
|
options = { :pet_id => pet_id}.merge(opts)
|
||||||
:pet_id => pet_id}.merge(opts)
|
|
||||||
|
|
||||||
#resource path
|
#resource path
|
||||||
path = "/pet.{format}/{petId}".sub('{format}','json').sub('{' + 'petId' + '}', escapeString(pet_id))
|
path = "/pet.{format}/{petId}".sub('{format}','json').sub('{' + 'petId' + '}', escapeString(pet_id))
|
||||||
@ -33,15 +31,13 @@ class Pet_api
|
|||||||
Pet.new(response)
|
Pet.new(response)
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.add_pet (body,opts={})
|
def self.add_pet (body,opts={})
|
||||||
query_param_keys = [
|
query_param_keys = []
|
||||||
]
|
|
||||||
|
|
||||||
# verify existence of params
|
# verify existence of params
|
||||||
raise "body is required" if body.nil?
|
raise "body is required" if body.nil?
|
||||||
# set default values and merge with input
|
# set default values and merge with input
|
||||||
options = {
|
options = { :body => body}.merge(opts)
|
||||||
:body => body}.merge(opts)
|
|
||||||
|
|
||||||
#resource path
|
#resource path
|
||||||
path = "/pet.{format}".sub('{format}','json')
|
path = "/pet.{format}".sub('{format}','json')
|
||||||
@ -77,15 +73,13 @@ class Pet_api
|
|||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.update_pet (body,opts={})
|
def self.update_pet (body,opts={})
|
||||||
query_param_keys = [
|
query_param_keys = []
|
||||||
]
|
|
||||||
|
|
||||||
# verify existence of params
|
# verify existence of params
|
||||||
raise "body is required" if body.nil?
|
raise "body is required" if body.nil?
|
||||||
# set default values and merge with input
|
# set default values and merge with input
|
||||||
options = {
|
options = { :body => body}.merge(opts)
|
||||||
:body => body}.merge(opts)
|
|
||||||
|
|
||||||
#resource path
|
#resource path
|
||||||
path = "/pet.{format}".sub('{format}','json')
|
path = "/pet.{format}".sub('{format}','json')
|
||||||
@ -121,15 +115,13 @@ class Pet_api
|
|||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.find_pets_by_status (status= "available",opts={})
|
def self.find_pets_by_status (status= "available",opts={})
|
||||||
query_param_keys = [
|
query_param_keys = [:status]
|
||||||
:status]
|
|
||||||
|
|
||||||
# verify existence of params
|
# verify existence of params
|
||||||
raise "status is required" if status.nil?
|
raise "status is required" if status.nil?
|
||||||
# set default values and merge with input
|
# set default values and merge with input
|
||||||
options = {
|
options = { :status => status}.merge(opts)
|
||||||
:status => status}.merge(opts)
|
|
||||||
|
|
||||||
#resource path
|
#resource path
|
||||||
path = "/pet.{format}/findByStatus".sub('{format}','json')
|
path = "/pet.{format}/findByStatus".sub('{format}','json')
|
||||||
@ -145,15 +137,13 @@ class Pet_api
|
|||||||
response.map {|response|Pet.new(response)}
|
response.map {|response|Pet.new(response)}
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.find_pets_by_tags (tags,opts={})
|
def self.find_pets_by_tags (tags,opts={})
|
||||||
query_param_keys = [
|
query_param_keys = [:tags]
|
||||||
:tags]
|
|
||||||
|
|
||||||
# verify existence of params
|
# verify existence of params
|
||||||
raise "tags is required" if tags.nil?
|
raise "tags is required" if tags.nil?
|
||||||
# set default values and merge with input
|
# set default values and merge with input
|
||||||
options = {
|
options = { :tags => tags}.merge(opts)
|
||||||
:tags => tags}.merge(opts)
|
|
||||||
|
|
||||||
#resource path
|
#resource path
|
||||||
path = "/pet.{format}/findByTags".sub('{format}','json')
|
path = "/pet.{format}/findByTags".sub('{format}','json')
|
||||||
@ -169,5 +159,5 @@ class Pet_api
|
|||||||
response.map {|response|Pet.new(response)}
|
response.map {|response|Pet.new(response)}
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -9,14 +9,12 @@ class Store_api
|
|||||||
end
|
end
|
||||||
|
|
||||||
def self.get_order_by_id (order_id,opts={})
|
def self.get_order_by_id (order_id,opts={})
|
||||||
query_param_keys = [
|
query_param_keys = []
|
||||||
]
|
|
||||||
|
|
||||||
# verify existence of params
|
# verify existence of params
|
||||||
raise "order_id is required" if order_id.nil?
|
raise "order_id is required" if order_id.nil?
|
||||||
# set default values and merge with input
|
# set default values and merge with input
|
||||||
options = {
|
options = { :order_id => order_id}.merge(opts)
|
||||||
:order_id => order_id}.merge(opts)
|
|
||||||
|
|
||||||
#resource path
|
#resource path
|
||||||
path = "/store.{format}/order/{orderId}".sub('{format}','json').sub('{' + 'orderId' + '}', escapeString(order_id))
|
path = "/store.{format}/order/{orderId}".sub('{format}','json').sub('{' + 'orderId' + '}', escapeString(order_id))
|
||||||
@ -33,15 +31,13 @@ class Store_api
|
|||||||
Order.new(response)
|
Order.new(response)
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.delete_order (order_id,opts={})
|
def self.delete_order (order_id,opts={})
|
||||||
query_param_keys = [
|
query_param_keys = []
|
||||||
]
|
|
||||||
|
|
||||||
# verify existence of params
|
# verify existence of params
|
||||||
raise "order_id is required" if order_id.nil?
|
raise "order_id is required" if order_id.nil?
|
||||||
# set default values and merge with input
|
# set default values and merge with input
|
||||||
options = {
|
options = { :order_id => order_id}.merge(opts)
|
||||||
:order_id => order_id}.merge(opts)
|
|
||||||
|
|
||||||
#resource path
|
#resource path
|
||||||
path = "/store.{format}/order/{orderId}".sub('{format}','json').sub('{' + 'orderId' + '}', escapeString(order_id))
|
path = "/store.{format}/order/{orderId}".sub('{format}','json').sub('{' + 'orderId' + '}', escapeString(order_id))
|
||||||
@ -58,15 +54,13 @@ class Store_api
|
|||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.place_order (body,opts={})
|
def self.place_order (body,opts={})
|
||||||
query_param_keys = [
|
query_param_keys = []
|
||||||
]
|
|
||||||
|
|
||||||
# verify existence of params
|
# verify existence of params
|
||||||
raise "body is required" if body.nil?
|
raise "body is required" if body.nil?
|
||||||
# set default values and merge with input
|
# set default values and merge with input
|
||||||
options = {
|
options = { :body => body}.merge(opts)
|
||||||
:body => body}.merge(opts)
|
|
||||||
|
|
||||||
#resource path
|
#resource path
|
||||||
path = "/store.{format}/order".sub('{format}','json')
|
path = "/store.{format}/order".sub('{format}','json')
|
||||||
@ -102,5 +96,5 @@ class Store_api
|
|||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -9,14 +9,12 @@ class User_api
|
|||||||
end
|
end
|
||||||
|
|
||||||
def self.create_users_with_array_input (body,opts={})
|
def self.create_users_with_array_input (body,opts={})
|
||||||
query_param_keys = [
|
query_param_keys = []
|
||||||
]
|
|
||||||
|
|
||||||
# verify existence of params
|
# verify existence of params
|
||||||
raise "body is required" if body.nil?
|
raise "body is required" if body.nil?
|
||||||
# set default values and merge with input
|
# set default values and merge with input
|
||||||
options = {
|
options = { :body => body}.merge(opts)
|
||||||
:body => body}.merge(opts)
|
|
||||||
|
|
||||||
#resource path
|
#resource path
|
||||||
path = "/user.{format}/createWithArray".sub('{format}','json')
|
path = "/user.{format}/createWithArray".sub('{format}','json')
|
||||||
@ -52,15 +50,13 @@ class User_api
|
|||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.create_user (body,opts={})
|
def self.create_user (body,opts={})
|
||||||
query_param_keys = [
|
query_param_keys = []
|
||||||
]
|
|
||||||
|
|
||||||
# verify existence of params
|
# verify existence of params
|
||||||
raise "body is required" if body.nil?
|
raise "body is required" if body.nil?
|
||||||
# set default values and merge with input
|
# set default values and merge with input
|
||||||
options = {
|
options = { :body => body}.merge(opts)
|
||||||
:body => body}.merge(opts)
|
|
||||||
|
|
||||||
#resource path
|
#resource path
|
||||||
path = "/user.{format}".sub('{format}','json')
|
path = "/user.{format}".sub('{format}','json')
|
||||||
@ -96,15 +92,13 @@ class User_api
|
|||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.create_users_with_list_input (body,opts={})
|
def self.create_users_with_list_input (body,opts={})
|
||||||
query_param_keys = [
|
query_param_keys = []
|
||||||
]
|
|
||||||
|
|
||||||
# verify existence of params
|
# verify existence of params
|
||||||
raise "body is required" if body.nil?
|
raise "body is required" if body.nil?
|
||||||
# set default values and merge with input
|
# set default values and merge with input
|
||||||
options = {
|
options = { :body => body}.merge(opts)
|
||||||
:body => body}.merge(opts)
|
|
||||||
|
|
||||||
#resource path
|
#resource path
|
||||||
path = "/user.{format}/createWithList".sub('{format}','json')
|
path = "/user.{format}/createWithList".sub('{format}','json')
|
||||||
@ -140,17 +134,14 @@ class User_api
|
|||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.update_user (username,body,opts={})
|
def self.update_user (username,body,opts={})
|
||||||
query_param_keys = [
|
query_param_keys = []
|
||||||
]
|
|
||||||
|
|
||||||
# verify existence of params
|
# verify existence of params
|
||||||
raise "username is required" if username.nil?
|
raise "username is required" if username.nil?
|
||||||
raise "body is required" if body.nil?
|
raise "body is required" if body.nil?
|
||||||
# set default values and merge with input
|
# set default values and merge with input
|
||||||
options = {
|
options = { :username => username, :body => body}.merge(opts)
|
||||||
:username => username,
|
|
||||||
:body => body}.merge(opts)
|
|
||||||
|
|
||||||
#resource path
|
#resource path
|
||||||
path = "/user.{format}/{username}".sub('{format}','json').sub('{' + 'username' + '}', escapeString(username))
|
path = "/user.{format}/{username}".sub('{format}','json').sub('{' + 'username' + '}', escapeString(username))
|
||||||
@ -187,15 +178,13 @@ class User_api
|
|||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.delete_user (username,opts={})
|
def self.delete_user (username,opts={})
|
||||||
query_param_keys = [
|
query_param_keys = []
|
||||||
]
|
|
||||||
|
|
||||||
# verify existence of params
|
# verify existence of params
|
||||||
raise "username is required" if username.nil?
|
raise "username is required" if username.nil?
|
||||||
# set default values and merge with input
|
# set default values and merge with input
|
||||||
options = {
|
options = { :username => username}.merge(opts)
|
||||||
:username => username}.merge(opts)
|
|
||||||
|
|
||||||
#resource path
|
#resource path
|
||||||
path = "/user.{format}/{username}".sub('{format}','json').sub('{' + 'username' + '}', escapeString(username))
|
path = "/user.{format}/{username}".sub('{format}','json').sub('{' + 'username' + '}', escapeString(username))
|
||||||
@ -212,15 +201,13 @@ class User_api
|
|||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.get_user_by_name (username,opts={})
|
def self.get_user_by_name (username,opts={})
|
||||||
query_param_keys = [
|
query_param_keys = []
|
||||||
]
|
|
||||||
|
|
||||||
# verify existence of params
|
# verify existence of params
|
||||||
raise "username is required" if username.nil?
|
raise "username is required" if username.nil?
|
||||||
# set default values and merge with input
|
# set default values and merge with input
|
||||||
options = {
|
options = { :username => username}.merge(opts)
|
||||||
:username => username}.merge(opts)
|
|
||||||
|
|
||||||
#resource path
|
#resource path
|
||||||
path = "/user.{format}/{username}".sub('{format}','json').sub('{' + 'username' + '}', escapeString(username))
|
path = "/user.{format}/{username}".sub('{format}','json').sub('{' + 'username' + '}', escapeString(username))
|
||||||
@ -237,17 +224,14 @@ class User_api
|
|||||||
User.new(response)
|
User.new(response)
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.login_user (username,password,opts={})
|
def self.login_user (username,password,opts={})
|
||||||
query_param_keys = [
|
query_param_keys = [:username,:password]
|
||||||
:username, :password]
|
|
||||||
|
|
||||||
# verify existence of params
|
# verify existence of params
|
||||||
raise "username is required" if username.nil?
|
raise "username is required" if username.nil?
|
||||||
raise "password is required" if password.nil?
|
raise "password is required" if password.nil?
|
||||||
# set default values and merge with input
|
# set default values and merge with input
|
||||||
options = {
|
options = { :username => username, :password => password}.merge(opts)
|
||||||
:username => username,
|
|
||||||
:password => password}.merge(opts)
|
|
||||||
|
|
||||||
#resource path
|
#resource path
|
||||||
path = "/user.{format}/login".sub('{format}','json')
|
path = "/user.{format}/login".sub('{format}','json')
|
||||||
@ -263,13 +247,11 @@ class User_api
|
|||||||
string.new(response)
|
string.new(response)
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.logout_user (opts={})
|
def self.logout_user (opts={})
|
||||||
query_param_keys = [
|
query_param_keys = []
|
||||||
]
|
|
||||||
|
|
||||||
# set default values and merge with input
|
# set default values and merge with input
|
||||||
options = {
|
options = { }.merge(opts)
|
||||||
}.merge(opts)
|
|
||||||
|
|
||||||
#resource path
|
#resource path
|
||||||
path = "/user.{format}/logout".sub('{format}','json')
|
path = "/user.{format}/logout".sub('{format}','json')
|
||||||
@ -285,5 +267,5 @@ class User_api
|
|||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user