forked from loafle/openapi-generator-original
clean up of formatting
This commit is contained in:
@@ -9,14 +9,12 @@ class Pet_api
|
||||
end
|
||||
|
||||
def self.get_pet_by_id (pet_id,opts={})
|
||||
query_param_keys = [
|
||||
]
|
||||
query_param_keys = []
|
||||
|
||||
# verify existence of params
|
||||
raise "pet_id is required" if pet_id.nil?
|
||||
# set default values and merge with input
|
||||
options = {
|
||||
:pet_id => pet_id}.merge(opts)
|
||||
options = { :pet_id => pet_id}.merge(opts)
|
||||
|
||||
#resource path
|
||||
path = "/pet.{format}/{petId}".sub('{format}','json').sub('{' + 'petId' + '}', escapeString(pet_id))
|
||||
@@ -33,15 +31,13 @@ class Pet_api
|
||||
Pet.new(response)
|
||||
end
|
||||
|
||||
def self.add_pet (body,opts={})
|
||||
query_param_keys = [
|
||||
]
|
||||
def self.add_pet (body,opts={})
|
||||
query_param_keys = []
|
||||
|
||||
# verify existence of params
|
||||
raise "body is required" if body.nil?
|
||||
# set default values and merge with input
|
||||
options = {
|
||||
:body => body}.merge(opts)
|
||||
options = { :body => body}.merge(opts)
|
||||
|
||||
#resource path
|
||||
path = "/pet.{format}".sub('{format}','json')
|
||||
@@ -77,15 +73,13 @@ class Pet_api
|
||||
|
||||
end
|
||||
|
||||
def self.update_pet (body,opts={})
|
||||
query_param_keys = [
|
||||
]
|
||||
def self.update_pet (body,opts={})
|
||||
query_param_keys = []
|
||||
|
||||
# verify existence of params
|
||||
raise "body is required" if body.nil?
|
||||
# set default values and merge with input
|
||||
options = {
|
||||
:body => body}.merge(opts)
|
||||
options = { :body => body}.merge(opts)
|
||||
|
||||
#resource path
|
||||
path = "/pet.{format}".sub('{format}','json')
|
||||
@@ -121,15 +115,13 @@ class Pet_api
|
||||
|
||||
end
|
||||
|
||||
def self.find_pets_by_status (status= "available",opts={})
|
||||
query_param_keys = [
|
||||
:status]
|
||||
def self.find_pets_by_status (status= "available",opts={})
|
||||
query_param_keys = [:status]
|
||||
|
||||
# verify existence of params
|
||||
raise "status is required" if status.nil?
|
||||
# set default values and merge with input
|
||||
options = {
|
||||
:status => status}.merge(opts)
|
||||
options = { :status => status}.merge(opts)
|
||||
|
||||
#resource path
|
||||
path = "/pet.{format}/findByStatus".sub('{format}','json')
|
||||
@@ -145,15 +137,13 @@ class Pet_api
|
||||
response.map {|response|Pet.new(response)}
|
||||
end
|
||||
|
||||
def self.find_pets_by_tags (tags,opts={})
|
||||
query_param_keys = [
|
||||
:tags]
|
||||
def self.find_pets_by_tags (tags,opts={})
|
||||
query_param_keys = [:tags]
|
||||
|
||||
# verify existence of params
|
||||
raise "tags is required" if tags.nil?
|
||||
# set default values and merge with input
|
||||
options = {
|
||||
:tags => tags}.merge(opts)
|
||||
options = { :tags => tags}.merge(opts)
|
||||
|
||||
#resource path
|
||||
path = "/pet.{format}/findByTags".sub('{format}','json')
|
||||
@@ -169,5 +159,5 @@ class Pet_api
|
||||
response.map {|response|Pet.new(response)}
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user