11 KiB

Petstore::FakeApi

All URIs are relative to http://petstore.swagger.io:80/v2

Method HTTP request Description
fake_outer_boolean_serialize POST /fake/outer/boolean
fake_outer_composite_serialize POST /fake/outer/composite
fake_outer_number_serialize POST /fake/outer/number
fake_outer_string_serialize POST /fake/outer/string
test_body_with_query_params PUT /fake/body-with-query-params
test_client_model PATCH /fake To test "client" model
test_endpoint_parameters POST /fake Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
test_enum_parameters GET /fake To test enum parameters
test_inline_additional_properties POST /fake/inline-additionalProperties test inline additionalProperties
test_json_form_data GET /fake/jsonFormData test json serialization of form data

fake_outer_boolean_serialize

OuterBoolean fake_outer_boolean_serialize(opts)

Test serialization of outer boolean types

Example

# load the gem
require 'petstore'

api_instance = Petstore::FakeApi.new
opts = {
  UNKNOWN_PARAM_NAME: Petstore::null.new #  | Input boolean as post body
}

begin
  result = api_instance.fake_outer_boolean_serialize(opts)
  p result
rescue Petstore::ApiError => e
  puts "Exception when calling FakeApi->fake_outer_boolean_serialize: #{e}"
end

Parameters

Name Type Description Notes
UNKNOWN_PARAM_NAME **** Input boolean as post body [optional]

Return type

OuterBoolean

Authorization

No authorization required

HTTP request headers

  • Content-Type: /
  • Accept: /

fake_outer_composite_serialize

OuterComposite fake_outer_composite_serialize(opts)

Test serialization of object with outer number type

Example

# load the gem
require 'petstore'

api_instance = Petstore::FakeApi.new
opts = {
  outer_composite: Petstore::OuterComposite.new # OuterComposite | Input composite as post body
}

begin
  result = api_instance.fake_outer_composite_serialize(opts)
  p result
rescue Petstore::ApiError => e
  puts "Exception when calling FakeApi->fake_outer_composite_serialize: #{e}"
end

Parameters

Name Type Description Notes
outer_composite OuterComposite Input composite as post body [optional]

Return type

OuterComposite

Authorization

No authorization required

HTTP request headers

  • Content-Type: /
  • Accept: /

fake_outer_number_serialize

OuterNumber fake_outer_number_serialize(opts)

Test serialization of outer number types

Example

# load the gem
require 'petstore'

api_instance = Petstore::FakeApi.new
opts = {
  UNKNOWN_PARAM_NAME: Petstore::null.new #  | Input number as post body
}

begin
  result = api_instance.fake_outer_number_serialize(opts)
  p result
rescue Petstore::ApiError => e
  puts "Exception when calling FakeApi->fake_outer_number_serialize: #{e}"
end

Parameters

Name Type Description Notes
UNKNOWN_PARAM_NAME **** Input number as post body [optional]

Return type

OuterNumber

Authorization

No authorization required

HTTP request headers

  • Content-Type: /
  • Accept: /

fake_outer_string_serialize

OuterString fake_outer_string_serialize(opts)

Test serialization of outer string types

Example

# load the gem
require 'petstore'

api_instance = Petstore::FakeApi.new
opts = {
  UNKNOWN_PARAM_NAME: Petstore::null.new #  | Input string as post body
}

begin
  result = api_instance.fake_outer_string_serialize(opts)
  p result
rescue Petstore::ApiError => e
  puts "Exception when calling FakeApi->fake_outer_string_serialize: #{e}"
end

Parameters

Name Type Description Notes
UNKNOWN_PARAM_NAME **** Input string as post body [optional]

Return type

OuterString

Authorization

No authorization required

HTTP request headers

  • Content-Type: /
  • Accept: /

test_body_with_query_params

test_body_with_query_params(query, user)

Example

# load the gem
require 'petstore'

api_instance = Petstore::FakeApi.new
query = 'query_example' # String | 
user = Petstore::User.new # User | 

begin
  api_instance.test_body_with_query_params(query, user)
rescue Petstore::ApiError => e
  puts "Exception when calling FakeApi->test_body_with_query_params: #{e}"
end

Parameters

Name Type Description Notes
query String
user User

Return type

nil (empty response body)

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: Not defined

test_client_model

Client test_client_model(client)

To test "client" model

To test "client" model

Example

# load the gem
require 'petstore'

api_instance = Petstore::FakeApi.new
client = Petstore::Client.new # Client | client model

begin
  #To test \"client\" model
  result = api_instance.test_client_model(client)
  p result
rescue Petstore::ApiError => e
  puts "Exception when calling FakeApi->test_client_model: #{e}"
end

Parameters

Name Type Description Notes
client Client client model

Return type

Client

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

test_endpoint_parameters

test_endpoint_parameters(UNKNOWN_PARAM_NAME)

Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트

Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트

Example

# load the gem
require 'petstore'
# setup authorization
Petstore.configure do |config|
  # Configure HTTP basic authorization: http_basic_test
  config.username = 'YOUR USERNAME'
  config.password = 'YOUR PASSWORD'
end

api_instance = Petstore::FakeApi.new
UNKNOWN_PARAM_NAME = Petstore::null.new #  | 

begin
  #Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 
  api_instance.test_endpoint_parameters(UNKNOWN_PARAM_NAME)
rescue Petstore::ApiError => e
  puts "Exception when calling FakeApi->test_endpoint_parameters: #{e}"
end

Parameters

Name Type Description Notes
UNKNOWN_PARAM_NAME ****

Return type

nil (empty response body)

Authorization

http_basic_test

HTTP request headers

  • Content-Type: application/xml; charset=utf-8, application/json; charset=utf-8
  • Accept: Not defined

test_enum_parameters

test_enum_parameters(opts)

To test enum parameters

To test enum parameters

Example

# load the gem
require 'petstore'

api_instance = Petstore::FakeApi.new
opts = {
  enum_header_string_array: ['enum_header_string_array_example'], # Array<String> | Header parameter enum test (string array)
  enum_header_string: 'enum_header_string_example', # String | Header parameter enum test (string)
  enum_query_string_array: ['enum_query_string_array_example'], # Array<String> | Query parameter enum test (string array)
  enum_query_string: 'enum_query_string_example', # String | Query parameter enum test (string)
  enum_query_integer: 56, # Integer | Query parameter enum test (double)
  enum_query_double: 1.2, # Float | Query parameter enum test (double)
  UNKNOWN_PARAM_NAME: Petstore::null.new #  | 
}

begin
  #To test enum parameters
  api_instance.test_enum_parameters(opts)
rescue Petstore::ApiError => e
  puts "Exception when calling FakeApi->test_enum_parameters: #{e}"
end

Parameters

Name Type Description Notes
enum_header_string_array Array<String> Header parameter enum test (string array) [optional]
enum_header_string String Header parameter enum test (string) [optional]
enum_query_string_array Array<String> Query parameter enum test (string array) [optional]
enum_query_string String Query parameter enum test (string) [optional]
enum_query_integer Integer Query parameter enum test (double) [optional]
enum_query_double Float Query parameter enum test (double) [optional]
UNKNOWN_PARAM_NAME **** [optional]

Return type

nil (empty response body)

Authorization

No authorization required

HTTP request headers

  • Content-Type: /
  • Accept: Not defined

test_inline_additional_properties

test_inline_additional_properties(UNKNOWN_PARAM_NAME)

test inline additionalProperties

Example

# load the gem
require 'petstore'

api_instance = Petstore::FakeApi.new
UNKNOWN_PARAM_NAME = Petstore::null.new #  | request body

begin
  #test inline additionalProperties
  api_instance.test_inline_additional_properties(UNKNOWN_PARAM_NAME)
rescue Petstore::ApiError => e
  puts "Exception when calling FakeApi->test_inline_additional_properties: #{e}"
end

Parameters

Name Type Description Notes
UNKNOWN_PARAM_NAME **** request body

Return type

nil (empty response body)

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: Not defined

test_json_form_data

test_json_form_data(UNKNOWN_PARAM_NAME)

test json serialization of form data

Example

# load the gem
require 'petstore'

api_instance = Petstore::FakeApi.new
UNKNOWN_PARAM_NAME = Petstore::null.new #  | 

begin
  #test json serialization of form data
  api_instance.test_json_form_data(UNKNOWN_PARAM_NAME)
rescue Petstore::ApiError => e
  puts "Exception when calling FakeApi->test_json_form_data: #{e}"
end

Parameters

Name Type Description Notes
UNKNOWN_PARAM_NAME ****

Return type

nil (empty response body)

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: Not defined