Ruby: add auto-generated documentation in Markdown

This commit is contained in:
xhh
2016-03-09 17:18:15 +08:00
parent 998087d662
commit 2c64b885bb
28 changed files with 2443 additions and 590 deletions

View File

@@ -36,13 +36,13 @@ describe 'PetApi' do
end
end
# unit tests for update_pet
# Update an existing pet
# unit tests for add_pet
# Add a new pet to the store
#
# @param [Hash] opts the optional parameters
# @option opts [Pet] :body Pet object that needs to be added to the store
# @return [nil]
describe 'update_pet test' do
describe 'add_pet test' do
it "should work" do
# assertion here
# should be_a()
@@ -52,13 +52,30 @@ describe 'PetApi' do
end
end
# unit tests for add_pet
# Add a new pet to the store
# unit tests for add_pet_using_byte_array
# Fake endpoint to test byte array in body parameter for adding a new pet to the store
#
# @param [Hash] opts the optional parameters
# @option opts [Pet] :body Pet object that needs to be added to the store
# @option opts [String] :body Pet object in the form of byte array
# @return [nil]
describe 'add_pet test' do
describe 'add_pet_using_byte_array test' do
it "should work" do
# assertion here
# should be_a()
# should be_nil
# should ==
# should_not ==
end
end
# unit tests for delete_pet
# Deletes a pet
#
# @param pet_id Pet id to delete
# @param [Hash] opts the optional parameters
# @option opts [String] :api_key
# @return [nil]
describe 'delete_pet test' do
it "should work" do
# assertion here
# should be_a()
@@ -116,59 +133,6 @@ describe 'PetApi' do
end
end
# unit tests for update_pet_with_form
# Updates a pet in the store with form data
#
# @param pet_id ID of pet that needs to be updated
# @param [Hash] opts the optional parameters
# @option opts [String] :name Updated name of the pet
# @option opts [String] :status Updated status of the pet
# @return [nil]
describe 'update_pet_with_form test' do
it "should work" do
# assertion here
# should be_a()
# should be_nil
# should ==
# should_not ==
end
end
# unit tests for delete_pet
# Deletes a pet
#
# @param pet_id Pet id to delete
# @param [Hash] opts the optional parameters
# @option opts [String] :api_key
# @return [nil]
describe 'delete_pet test' do
it "should work" do
# assertion here
# should be_a()
# should be_nil
# should ==
# should_not ==
end
end
# unit tests for upload_file
# uploads an image
#
# @param pet_id ID of pet to update
# @param [Hash] opts the optional parameters
# @option opts [String] :additional_metadata Additional data to pass to server
# @option opts [File] :file file to upload
# @return [nil]
describe 'upload_file test' do
it "should work" do
# assertion here
# should be_a()
# should be_nil
# should ==
# should_not ==
end
end
# unit tests for get_pet_by_id_in_object
# Fake endpoint to test inline arbitrary object return by 'Find pet by ID'
# Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions
@@ -201,13 +165,49 @@ describe 'PetApi' do
end
end
# unit tests for add_pet_using_byte_array
# Fake endpoint to test byte array in body parameter for adding a new pet to the store
# unit tests for update_pet
# Update an existing pet
#
# @param [Hash] opts the optional parameters
# @option opts [String] :body Pet object in the form of byte array
# @option opts [Pet] :body Pet object that needs to be added to the store
# @return [nil]
describe 'add_pet_using_byte_array test' do
describe 'update_pet test' do
it "should work" do
# assertion here
# should be_a()
# should be_nil
# should ==
# should_not ==
end
end
# unit tests for update_pet_with_form
# Updates a pet in the store with form data
#
# @param pet_id ID of pet that needs to be updated
# @param [Hash] opts the optional parameters
# @option opts [String] :name Updated name of the pet
# @option opts [String] :status Updated status of the pet
# @return [nil]
describe 'update_pet_with_form test' do
it "should work" do
# assertion here
# should be_a()
# should be_nil
# should ==
# should_not ==
end
end
# unit tests for upload_file
# uploads an image
#
# @param pet_id ID of pet to update
# @param [Hash] opts the optional parameters
# @option opts [String] :additional_metadata Additional data to pass to server
# @option opts [File] :file file to upload
# @return [nil]
describe 'upload_file test' do
it "should work" do
# assertion here
# should be_a()

View File

@@ -36,6 +36,22 @@ describe 'StoreApi' do
end
end
# unit tests for delete_order
# Delete purchase order by ID
# For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
# @param order_id ID of the order that needs to be deleted
# @param [Hash] opts the optional parameters
# @return [nil]
describe 'delete_order test' do
it "should work" do
# assertion here
# should be_a()
# should be_nil
# should ==
# should_not ==
end
end
# unit tests for find_orders_by_status
# Finds orders by status
# A single status value can be provided as a string
@@ -82,22 +98,6 @@ describe 'StoreApi' do
end
end
# unit tests for place_order
# Place an order for a pet
#
# @param [Hash] opts the optional parameters
# @option opts [Order] :body order placed for purchasing the pet
# @return [Order]
describe 'place_order test' do
it "should work" do
# assertion here
# should be_a()
# should be_nil
# should ==
# should_not ==
end
end
# unit tests for get_order_by_id
# Find purchase order by ID
# For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
@@ -114,13 +114,13 @@ describe 'StoreApi' do
end
end
# unit tests for delete_order
# Delete purchase order by ID
# For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
# @param order_id ID of the order that needs to be deleted
# unit tests for place_order
# Place an order for a pet
#
# @param [Hash] opts the optional parameters
# @return [nil]
describe 'delete_order test' do
# @option opts [Order] :body order placed for purchasing the pet
# @return [Order]
describe 'place_order test' do
it "should work" do
# assertion here
# should be_a()

View File

@@ -84,6 +84,38 @@ describe 'UserApi' do
end
end
# unit tests for delete_user
# Delete user
# This can only be done by the logged in user.
# @param username The name that needs to be deleted
# @param [Hash] opts the optional parameters
# @return [nil]
describe 'delete_user test' do
it "should work" do
# assertion here
# should be_a()
# should be_nil
# should ==
# should_not ==
end
end
# unit tests for get_user_by_name
# Get user by user name
#
# @param username The name that needs to be fetched. Use user1 for testing.
# @param [Hash] opts the optional parameters
# @return [User]
describe 'get_user_by_name test' do
it "should work" do
# assertion here
# should be_a()
# should be_nil
# should ==
# should_not ==
end
end
# unit tests for login_user
# Logs user into the system
#
@@ -116,22 +148,6 @@ describe 'UserApi' do
end
end
# unit tests for get_user_by_name
# Get user by user name
#
# @param username The name that needs to be fetched. Use user1 for testing.
# @param [Hash] opts the optional parameters
# @return [User]
describe 'get_user_by_name test' do
it "should work" do
# assertion here
# should be_a()
# should be_nil
# should ==
# should_not ==
end
end
# unit tests for update_user
# Updated user
# This can only be done by the logged in user.
@@ -149,20 +165,4 @@ describe 'UserApi' do
end
end
# unit tests for delete_user
# Delete user
# This can only be done by the logged in user.
# @param username The name that needs to be deleted
# @param [Hash] opts the optional parameters
# @return [nil]
describe 'delete_user test' do
it "should work" do
# assertion here
# should be_a()
# should be_nil
# should ==
# should_not ==
end
end
end