clean up of formatting

This commit is contained in:
Tony Tam
2012-09-26 14:01:57 -07:00
parent 68436f6cbe
commit 0b7db0ce2d
3 changed files with 48 additions and 82 deletions

View File

@@ -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