migrate ruby samples to oas3 (#6414)

This commit is contained in:
William Cheng
2020-05-25 23:02:30 +08:00
committed by GitHub
parent f4897ea4a4
commit db4c4917e2
572 changed files with 1442 additions and 45622 deletions

View File

@@ -1,17 +0,0 @@
# Petstore::AdditionalPropertiesBoolean
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**name** | **String** | | [optional]
## Code Sample
```ruby
require 'Petstore'
instance = Petstore::AdditionalPropertiesBoolean.new(name: null)
```

View File

@@ -4,34 +4,16 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**map_string** | **Hash<String, String>** | | [optional]
**map_number** | **Hash<String, Float>** | | [optional]
**map_integer** | **Hash<String, Integer>** | | [optional]
**map_boolean** | **Hash<String, Boolean>** | | [optional]
**map_array_integer** | **Hash<String, Array<Integer>>** | | [optional]
**map_array_anytype** | **Hash<String, Array<Object>>** | | [optional]
**map_map_string** | **Hash<String, Hash<String, String>>** | | [optional]
**map_map_anytype** | **Hash<String, Hash<String, Object>>** | | [optional]
**anytype_1** | **Object** | | [optional]
**anytype_2** | **Object** | | [optional]
**anytype_3** | **Object** | | [optional]
**map_property** | **Hash<String, String>** | | [optional]
**map_of_map_property** | **Hash<String, Hash<String, String>>** | | [optional]
## Code Sample
```ruby
require 'Petstore'
instance = Petstore::AdditionalPropertiesClass.new(map_string: null,
map_number: null,
map_integer: null,
map_boolean: null,
map_array_integer: null,
map_array_anytype: null,
map_map_string: null,
map_map_anytype: null,
anytype_1: null,
anytype_2: null,
anytype_3: null)
instance = Petstore::AdditionalPropertiesClass.new(map_property: null,
map_of_map_property: null)
```

View File

@@ -1,17 +0,0 @@
# Petstore::AdditionalPropertiesInteger
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**name** | **String** | | [optional]
## Code Sample
```ruby
require 'Petstore'
instance = Petstore::AdditionalPropertiesInteger.new(name: null)
```

View File

@@ -1,17 +0,0 @@
# Petstore::AdditionalPropertiesObject
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**name** | **String** | | [optional]
## Code Sample
```ruby
require 'Petstore'
instance = Petstore::AdditionalPropertiesObject.new(name: null)
```

View File

@@ -10,7 +10,7 @@ Method | HTTP request | Description
## call_123_test_special_tags
> Client call_123_test_special_tags(body)
> Client call_123_test_special_tags(client)
To test special tags
@@ -23,11 +23,11 @@ To test special tags and operation ID starting with number
require 'petstore'
api_instance = Petstore::AnotherFakeApi.new
body = Petstore::Client.new # Client | client model
client = Petstore::Client.new # Client | client model
begin
#To test special tags
result = api_instance.call_123_test_special_tags(body)
result = api_instance.call_123_test_special_tags(client)
p result
rescue Petstore::ApiError => e
puts "Exception when calling AnotherFakeApi->call_123_test_special_tags: #{e}"
@@ -39,7 +39,7 @@ end
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**Client**](Client.md)| client model |
**client** | [**Client**](Client.md)| client model |
### Return type

View File

@@ -0,0 +1,49 @@
# Petstore::DefaultApi
All URIs are relative to *http://petstore.swagger.io:80/v2*
Method | HTTP request | Description
------------- | ------------- | -------------
[**foo_get**](DefaultApi.md#foo_get) | **GET** /foo |
## foo_get
> InlineResponseDefault foo_get
### Example
```ruby
# load the gem
require 'petstore'
api_instance = Petstore::DefaultApi.new
begin
result = api_instance.foo_get
p result
rescue Petstore::ApiError => e
puts "Exception when calling DefaultApi->foo_get: #{e}"
end
```
### Parameters
This endpoint does not need any parameter.
### Return type
[**InlineResponseDefault**](InlineResponseDefault.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json

View File

@@ -9,6 +9,9 @@ Name | Type | Description | Notes
**enum_integer** | **Integer** | | [optional]
**enum_number** | **Float** | | [optional]
**outer_enum** | [**OuterEnum**](OuterEnum.md) | | [optional]
**outer_enum_integer** | [**OuterEnumInteger**](OuterEnumInteger.md) | | [optional]
**outer_enum_default_value** | [**OuterEnumDefaultValue**](OuterEnumDefaultValue.md) | | [optional]
**outer_enum_integer_default_value** | [**OuterEnumIntegerDefaultValue**](OuterEnumIntegerDefaultValue.md) | | [optional]
## Code Sample
@@ -19,7 +22,10 @@ instance = Petstore::EnumTest.new(enum_string: null,
enum_string_required: null,
enum_integer: null,
enum_number: null,
outer_enum: null)
outer_enum: null,
outer_enum_integer: null,
outer_enum_default_value: null,
outer_enum_integer_default_value: null)
```

View File

@@ -4,7 +4,8 @@ All URIs are relative to *http://petstore.swagger.io:80/v2*
Method | HTTP request | Description
------------- | ------------- | -------------
[**create_xml_item**](FakeApi.md#create_xml_item) | **POST** /fake/create_xml_item | creates an XmlItem
[**fake_health_get**](FakeApi.md#fake_health_get) | **GET** /fake/health | Health check endpoint
[**fake_http_signature_test**](FakeApi.md#fake_http_signature_test) | **GET** /fake/http-signature-test | test http signature authentication
[**fake_outer_boolean_serialize**](FakeApi.md#fake_outer_boolean_serialize) | **POST** /fake/outer/boolean |
[**fake_outer_composite_serialize**](FakeApi.md#fake_outer_composite_serialize) | **POST** /fake/outer/composite |
[**fake_outer_number_serialize**](FakeApi.md#fake_outer_number_serialize) | **POST** /fake/outer/number |
@@ -12,7 +13,7 @@ Method | HTTP request | Description
[**test_body_with_file_schema**](FakeApi.md#test_body_with_file_schema) | **PUT** /fake/body-with-file-schema |
[**test_body_with_query_params**](FakeApi.md#test_body_with_query_params) | **PUT** /fake/body-with-query-params |
[**test_client_model**](FakeApi.md#test_client_model) | **PATCH** /fake | To test \"client\" model
[**test_endpoint_parameters**](FakeApi.md#test_endpoint_parameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
[**test_endpoint_parameters**](FakeApi.md#test_endpoint_parameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
[**test_enum_parameters**](FakeApi.md#test_enum_parameters) | **GET** /fake | To test enum parameters
[**test_group_parameters**](FakeApi.md#test_group_parameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional)
[**test_inline_additional_properties**](FakeApi.md#test_inline_additional_properties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties
@@ -21,13 +22,11 @@ Method | HTTP request | Description
## create_xml_item
## fake_health_get
> create_xml_item(xml_item)
> HealthCheckResult fake_health_get
creates an XmlItem
this route creates an XmlItem
Health check endpoint
### Example
@@ -36,13 +35,61 @@ this route creates an XmlItem
require 'petstore'
api_instance = Petstore::FakeApi.new
xml_item = Petstore::XmlItem.new # XmlItem | XmlItem Body
begin
#creates an XmlItem
api_instance.create_xml_item(xml_item)
#Health check endpoint
result = api_instance.fake_health_get
p result
rescue Petstore::ApiError => e
puts "Exception when calling FakeApi->create_xml_item: #{e}"
puts "Exception when calling FakeApi->fake_health_get: #{e}"
end
```
### Parameters
This endpoint does not need any parameter.
### Return type
[**HealthCheckResult**](HealthCheckResult.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
## fake_http_signature_test
> fake_http_signature_test(pet, opts)
test http signature authentication
### Example
```ruby
# load the gem
require 'petstore'
# setup authorization
Petstore.configure do |config|
end
api_instance = Petstore::FakeApi.new
pet = Petstore::Pet.new # Pet | Pet object that needs to be added to the store
opts = {
query_1: 'query_1_example', # String | query parameter
header_1: 'header_1_example' # String | header parameter
}
begin
#test http signature authentication
api_instance.fake_http_signature_test(pet, opts)
rescue Petstore::ApiError => e
puts "Exception when calling FakeApi->fake_http_signature_test: #{e}"
end
```
@@ -51,7 +98,9 @@ end
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**xml_item** | [**XmlItem**](XmlItem.md)| XmlItem Body |
**pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
**query_1** | **String**| query parameter | [optional]
**header_1** | **String**| header parameter | [optional]
### Return type
@@ -59,11 +108,11 @@ nil (empty response body)
### Authorization
No authorization required
[http_signature_test](../README.md#http_signature_test)
### HTTP request headers
- **Content-Type**: application/xml, application/xml; charset=utf-8, application/xml; charset=utf-16, text/xml, text/xml; charset=utf-8, text/xml; charset=utf-16
- **Content-Type**: application/json, application/xml
- **Accept**: Not defined
@@ -111,7 +160,7 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Content-Type**: application/json
- **Accept**: */*
@@ -131,7 +180,7 @@ require 'petstore'
api_instance = Petstore::FakeApi.new
opts = {
body: Petstore::OuterComposite.new # OuterComposite | Input composite as post body
outer_composite: Petstore::OuterComposite.new # OuterComposite | Input composite as post body
}
begin
@@ -147,7 +196,7 @@ end
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**OuterComposite**](OuterComposite.md)| Input composite as post body | [optional]
**outer_composite** | [**OuterComposite**](OuterComposite.md)| Input composite as post body | [optional]
### Return type
@@ -159,7 +208,7 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Content-Type**: application/json
- **Accept**: */*
@@ -207,7 +256,7 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Content-Type**: application/json
- **Accept**: */*
@@ -255,13 +304,13 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Content-Type**: application/json
- **Accept**: */*
## test_body_with_file_schema
> test_body_with_file_schema(body)
> test_body_with_file_schema(file_schema_test_class)
@@ -274,10 +323,10 @@ For this test, the body for this request much reference a schema named `File`.
require 'petstore'
api_instance = Petstore::FakeApi.new
body = Petstore::FileSchemaTestClass.new # FileSchemaTestClass |
file_schema_test_class = Petstore::FileSchemaTestClass.new # FileSchemaTestClass |
begin
api_instance.test_body_with_file_schema(body)
api_instance.test_body_with_file_schema(file_schema_test_class)
rescue Petstore::ApiError => e
puts "Exception when calling FakeApi->test_body_with_file_schema: #{e}"
end
@@ -288,7 +337,7 @@ end
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**FileSchemaTestClass**](FileSchemaTestClass.md)| |
**file_schema_test_class** | [**FileSchemaTestClass**](FileSchemaTestClass.md)| |
### Return type
@@ -306,7 +355,7 @@ No authorization required
## test_body_with_query_params
> test_body_with_query_params(query, body)
> test_body_with_query_params(query, user)
@@ -318,10 +367,10 @@ require 'petstore'
api_instance = Petstore::FakeApi.new
query = 'query_example' # String |
body = Petstore::User.new # User |
user = Petstore::User.new # User |
begin
api_instance.test_body_with_query_params(query, body)
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
@@ -333,7 +382,7 @@ end
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**query** | **String**| |
**body** | [**User**](User.md)| |
**user** | [**User**](User.md)| |
### Return type
@@ -351,7 +400,7 @@ No authorization required
## test_client_model
> Client test_client_model(body)
> Client test_client_model(client)
To test \"client\" model
@@ -364,11 +413,11 @@ To test \"client\" model
require 'petstore'
api_instance = Petstore::FakeApi.new
body = Petstore::Client.new # Client | client model
client = Petstore::Client.new # Client | client model
begin
#To test \"client\" model
result = api_instance.test_client_model(body)
result = api_instance.test_client_model(client)
p result
rescue Petstore::ApiError => e
puts "Exception when calling FakeApi->test_client_model: #{e}"
@@ -380,7 +429,7 @@ end
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**Client**](Client.md)| client model |
**client** | [**Client**](Client.md)| client model |
### Return type
@@ -400,9 +449,9 @@ No authorization required
> test_endpoint_parameters(number, double, pattern_without_delimiter, byte, opts)
Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
### Example
@@ -435,7 +484,7 @@ opts = {
}
begin
#Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
#Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
api_instance.test_endpoint_parameters(number, double, pattern_without_delimiter, byte, opts)
rescue Petstore::ApiError => e
puts "Exception when calling FakeApi->test_endpoint_parameters: #{e}"
@@ -551,6 +600,11 @@ Fake endpoint to test group parameters (optional)
```ruby
# load the gem
require 'petstore'
# setup authorization
Petstore.configure do |config|
# Configure Bearer authorization (JWT): bearer_test
config.access_token = 'YOUR_BEARER_TOKEN'
end
api_instance = Petstore::FakeApi.new
required_string_group = 56 # Integer | Required String in group parameters
@@ -588,7 +642,7 @@ nil (empty response body)
### Authorization
No authorization required
[bearer_test](../README.md#bearer_test)
### HTTP request headers
@@ -598,7 +652,7 @@ No authorization required
## test_inline_additional_properties
> test_inline_additional_properties(param)
> test_inline_additional_properties(request_body)
test inline additionalProperties
@@ -609,11 +663,11 @@ test inline additionalProperties
require 'petstore'
api_instance = Petstore::FakeApi.new
param = {'key' => 'param_example'} # Hash<String, String> | request body
request_body = {'key' => 'request_body_example'} # Hash<String, String> | request body
begin
#test inline additionalProperties
api_instance.test_inline_additional_properties(param)
api_instance.test_inline_additional_properties(request_body)
rescue Petstore::ApiError => e
puts "Exception when calling FakeApi->test_inline_additional_properties: #{e}"
end
@@ -624,7 +678,7 @@ end
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**param** | [**Hash&lt;String, String&gt;**](String.md)| request body |
**request_body** | [**Hash&lt;String, String&gt;**](String.md)| request body |
### Return type

View File

@@ -10,7 +10,7 @@ Method | HTTP request | Description
## test_classname
> Client test_classname(body)
> Client test_classname(client)
To test class name in snake case
@@ -30,11 +30,11 @@ Petstore.configure do |config|
end
api_instance = Petstore::FakeClassnameTags123Api.new
body = Petstore::Client.new # Client | client model
client = Petstore::Client.new # Client | client model
begin
#To test class name in snake case
result = api_instance.test_classname(body)
result = api_instance.test_classname(client)
p result
rescue Petstore::ApiError => e
puts "Exception when calling FakeClassnameTags123Api->test_classname: #{e}"
@@ -46,7 +46,7 @@ end
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**Client**](Client.md)| client model |
**client** | [**Client**](Client.md)| client model |
### Return type

View File

@@ -1,17 +1,17 @@
# Petstore::AdditionalPropertiesArray
# Petstore::Foo
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**name** | **String** | | [optional]
**bar** | **String** | | [optional] [default to &#39;bar&#39;]
## Code Sample
```ruby
require 'Petstore'
instance = Petstore::AdditionalPropertiesArray.new(name: null)
instance = Petstore::Foo.new(bar: null)
```

View File

@@ -17,7 +17,8 @@ Name | Type | Description | Notes
**date_time** | **DateTime** | | [optional]
**uuid** | **String** | | [optional]
**password** | **String** | |
**big_decimal** | [**BigDecimal**](BigDecimal.md) | | [optional]
**pattern_with_digits** | **String** | A string that is a 10 digit number. Can have leading zeros. | [optional]
**pattern_with_digits_and_delimiter** | **String** | A string starting with &#39;image_&#39; (case insensitive) and one to three digits following i.e. Image_01. | [optional]
## Code Sample
@@ -37,7 +38,8 @@ instance = Petstore::FormatTest.new(integer: null,
date_time: null,
uuid: 72f98069-206d-4f12-9f12-3d1e525a8e84,
password: null,
big_decimal: null)
pattern_with_digits: null,
pattern_with_digits_and_delimiter: null)
```

View File

@@ -1,17 +1,17 @@
# Petstore::AdditionalPropertiesAnyType
# Petstore::HealthCheckResult
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**name** | **String** | | [optional]
**nullable_message** | **String** | | [optional]
## Code Sample
```ruby
require 'Petstore'
instance = Petstore::AdditionalPropertiesAnyType.new(name: null)
instance = Petstore::HealthCheckResult.new(nullable_message: null)
```

View File

@@ -0,0 +1,19 @@
# Petstore::InlineObject
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**name** | **String** | Updated name of the pet | [optional]
**status** | **String** | Updated status of the pet | [optional]
## Code Sample
```ruby
require 'Petstore'
instance = Petstore::InlineObject.new(name: null,
status: null)
```

View File

@@ -0,0 +1,19 @@
# Petstore::InlineObject1
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**additional_metadata** | **String** | Additional data to pass to server | [optional]
**file** | **File** | file to upload | [optional]
## Code Sample
```ruby
require 'Petstore'
instance = Petstore::InlineObject1.new(additional_metadata: null,
file: null)
```

View File

@@ -0,0 +1,19 @@
# Petstore::InlineObject2
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**enum_form_string_array** | **Array&lt;String&gt;** | Form parameter enum test (string array) | [optional]
**enum_form_string** | **String** | Form parameter enum test (string) | [optional] [default to &#39;-efg&#39;]
## Code Sample
```ruby
require 'Petstore'
instance = Petstore::InlineObject2.new(enum_form_string_array: null,
enum_form_string: null)
```

View File

@@ -0,0 +1,43 @@
# Petstore::InlineObject3
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**integer** | **Integer** | None | [optional]
**int32** | **Integer** | None | [optional]
**int64** | **Integer** | None | [optional]
**number** | **Float** | None |
**float** | **Float** | None | [optional]
**double** | **Float** | None |
**string** | **String** | None | [optional]
**pattern_without_delimiter** | **String** | None |
**byte** | **String** | None |
**binary** | **File** | None | [optional]
**date** | **Date** | None | [optional]
**date_time** | **DateTime** | None | [optional]
**password** | **String** | None | [optional]
**callback** | **String** | None | [optional]
## Code Sample
```ruby
require 'Petstore'
instance = Petstore::InlineObject3.new(integer: null,
int32: null,
int64: null,
number: null,
float: null,
double: null,
string: null,
pattern_without_delimiter: null,
byte: null,
binary: null,
date: null,
date_time: null,
password: null,
callback: null)
```

View File

@@ -0,0 +1,19 @@
# Petstore::InlineObject4
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**param** | **String** | field1 |
**param2** | **String** | field2 |
## Code Sample
```ruby
require 'Petstore'
instance = Petstore::InlineObject4.new(param: null,
param2: null)
```

View File

@@ -0,0 +1,19 @@
# Petstore::InlineObject5
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**additional_metadata** | **String** | Additional data to pass to server | [optional]
**required_file** | **File** | file to upload |
## Code Sample
```ruby
require 'Petstore'
instance = Petstore::InlineObject5.new(additional_metadata: null,
required_file: null)
```

View File

@@ -1,17 +1,17 @@
# Petstore::AdditionalPropertiesNumber
# Petstore::InlineResponseDefault
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**name** | **String** | | [optional]
**string** | [**Foo**](Foo.md) | | [optional]
## Code Sample
```ruby
require 'Petstore'
instance = Petstore::AdditionalPropertiesNumber.new(name: null)
instance = Petstore::InlineResponseDefault.new(string: null)
```

View File

@@ -0,0 +1,39 @@
# Petstore::NullableClass
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**integer_prop** | **Integer** | | [optional]
**number_prop** | **Float** | | [optional]
**boolean_prop** | **Boolean** | | [optional]
**string_prop** | **String** | | [optional]
**date_prop** | **Date** | | [optional]
**datetime_prop** | **DateTime** | | [optional]
**array_nullable_prop** | **Array&lt;Object&gt;** | | [optional]
**array_and_items_nullable_prop** | **Array&lt;Object&gt;** | | [optional]
**array_items_nullable** | **Array&lt;Object&gt;** | | [optional]
**object_nullable_prop** | **Hash&lt;String, Object&gt;** | | [optional]
**object_and_items_nullable_prop** | **Hash&lt;String, Object&gt;** | | [optional]
**object_items_nullable** | **Hash&lt;String, Object&gt;** | | [optional]
## Code Sample
```ruby
require 'Petstore'
instance = Petstore::NullableClass.new(integer_prop: null,
number_prop: null,
boolean_prop: null,
string_prop: null,
date_prop: null,
datetime_prop: null,
array_nullable_prop: null,
array_and_items_nullable_prop: null,
array_items_nullable: null,
object_nullable_prop: null,
object_and_items_nullable_prop: null,
object_items_nullable: null)
```

View File

@@ -1,17 +1,16 @@
# Petstore::BigCat
# Petstore::OuterEnumDefaultValue
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**kind** | **String** | | [optional]
## Code Sample
```ruby
require 'Petstore'
instance = Petstore::BigCat.new(kind: null)
instance = Petstore::OuterEnumDefaultValue.new()
```

View File

@@ -1,17 +1,16 @@
# Petstore::BigCatAllOf
# Petstore::OuterEnumInteger
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**kind** | **String** | | [optional]
## Code Sample
```ruby
require 'Petstore'
instance = Petstore::BigCatAllOf.new(kind: null)
instance = Petstore::OuterEnumInteger.new()
```

View File

@@ -1,17 +1,16 @@
# Petstore::AdditionalPropertiesString
# Petstore::OuterEnumIntegerDefaultValue
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**name** | **String** | | [optional]
## Code Sample
```ruby
require 'Petstore'
instance = Petstore::AdditionalPropertiesString.new(name: null)
instance = Petstore::OuterEnumIntegerDefaultValue.new()
```

View File

@@ -18,7 +18,7 @@ Method | HTTP request | Description
## add_pet
> add_pet(body)
> add_pet(pet)
Add a new pet to the store
@@ -34,11 +34,11 @@ Petstore.configure do |config|
end
api_instance = Petstore::PetApi.new
body = Petstore::Pet.new # Pet | Pet object that needs to be added to the store
pet = Petstore::Pet.new # Pet | Pet object that needs to be added to the store
begin
#Add a new pet to the store
api_instance.add_pet(body)
api_instance.add_pet(pet)
rescue Petstore::ApiError => e
puts "Exception when calling PetApi->add_pet: #{e}"
end
@@ -49,7 +49,7 @@ end
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
**pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
### Return type
@@ -278,7 +278,7 @@ Name | Type | Description | Notes
## update_pet
> update_pet(body)
> update_pet(pet)
Update an existing pet
@@ -294,11 +294,11 @@ Petstore.configure do |config|
end
api_instance = Petstore::PetApi.new
body = Petstore::Pet.new # Pet | Pet object that needs to be added to the store
pet = Petstore::Pet.new # Pet | Pet object that needs to be added to the store
begin
#Update an existing pet
api_instance.update_pet(body)
api_instance.update_pet(pet)
rescue Petstore::ApiError => e
puts "Exception when calling PetApi->update_pet: #{e}"
end
@@ -309,7 +309,7 @@ end
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
**pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
### Return type

View File

@@ -156,7 +156,7 @@ No authorization required
## place_order
> Order place_order(body)
> Order place_order(order)
Place an order for a pet
@@ -167,11 +167,11 @@ Place an order for a pet
require 'petstore'
api_instance = Petstore::StoreApi.new
body = Petstore::Order.new # Order | order placed for purchasing the pet
order = Petstore::Order.new # Order | order placed for purchasing the pet
begin
#Place an order for a pet
result = api_instance.place_order(body)
result = api_instance.place_order(order)
p result
rescue Petstore::ApiError => e
puts "Exception when calling StoreApi->place_order: #{e}"
@@ -183,7 +183,7 @@ end
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**Order**](Order.md)| order placed for purchasing the pet |
**order** | [**Order**](Order.md)| order placed for purchasing the pet |
### Return type
@@ -195,6 +195,6 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Content-Type**: application/json
- **Accept**: application/xml, application/json

View File

@@ -1,25 +0,0 @@
# Petstore::TypeHolderDefault
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**string_item** | **String** | | [default to &#39;what&#39;]
**number_item** | **Float** | |
**integer_item** | **Integer** | |
**bool_item** | **Boolean** | | [default to true]
**array_item** | **Array&lt;Integer&gt;** | |
## Code Sample
```ruby
require 'Petstore'
instance = Petstore::TypeHolderDefault.new(string_item: null,
number_item: null,
integer_item: null,
bool_item: null,
array_item: null)
```

View File

@@ -1,27 +0,0 @@
# Petstore::TypeHolderExample
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**string_item** | **String** | |
**number_item** | **Float** | |
**float_item** | **Float** | |
**integer_item** | **Integer** | |
**bool_item** | **Boolean** | |
**array_item** | **Array&lt;Integer&gt;** | |
## Code Sample
```ruby
require 'Petstore'
instance = Petstore::TypeHolderExample.new(string_item: what,
number_item: 1.234,
float_item: 1.234,
integer_item: -2,
bool_item: true,
array_item: [0, 1, 2, 3])
```

View File

@@ -17,7 +17,7 @@ Method | HTTP request | Description
## create_user
> create_user(body)
> create_user(user)
Create user
@@ -30,11 +30,11 @@ This can only be done by the logged in user.
require 'petstore'
api_instance = Petstore::UserApi.new
body = Petstore::User.new # User | Created user object
user = Petstore::User.new # User | Created user object
begin
#Create user
api_instance.create_user(body)
api_instance.create_user(user)
rescue Petstore::ApiError => e
puts "Exception when calling UserApi->create_user: #{e}"
end
@@ -45,7 +45,7 @@ end
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**User**](User.md)| Created user object |
**user** | [**User**](User.md)| Created user object |
### Return type
@@ -57,13 +57,13 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Content-Type**: application/json
- **Accept**: Not defined
## create_users_with_array_input
> create_users_with_array_input(body)
> create_users_with_array_input(user)
Creates list of users with given input array
@@ -74,11 +74,11 @@ Creates list of users with given input array
require 'petstore'
api_instance = Petstore::UserApi.new
body = [Petstore::User.new] # Array<User> | List of user object
user = [Petstore::User.new] # Array<User> | List of user object
begin
#Creates list of users with given input array
api_instance.create_users_with_array_input(body)
api_instance.create_users_with_array_input(user)
rescue Petstore::ApiError => e
puts "Exception when calling UserApi->create_users_with_array_input: #{e}"
end
@@ -89,7 +89,7 @@ end
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**Array&lt;User&gt;**](User.md)| List of user object |
**user** | [**Array&lt;User&gt;**](User.md)| List of user object |
### Return type
@@ -101,13 +101,13 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Content-Type**: application/json
- **Accept**: Not defined
## create_users_with_list_input
> create_users_with_list_input(body)
> create_users_with_list_input(user)
Creates list of users with given input array
@@ -118,11 +118,11 @@ Creates list of users with given input array
require 'petstore'
api_instance = Petstore::UserApi.new
body = [Petstore::User.new] # Array<User> | List of user object
user = [Petstore::User.new] # Array<User> | List of user object
begin
#Creates list of users with given input array
api_instance.create_users_with_list_input(body)
api_instance.create_users_with_list_input(user)
rescue Petstore::ApiError => e
puts "Exception when calling UserApi->create_users_with_list_input: #{e}"
end
@@ -133,7 +133,7 @@ end
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**Array&lt;User&gt;**](User.md)| List of user object |
**user** | [**Array&lt;User&gt;**](User.md)| List of user object |
### Return type
@@ -145,7 +145,7 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Content-Type**: application/json
- **Accept**: Not defined
@@ -329,7 +329,7 @@ No authorization required
## update_user
> update_user(username, body)
> update_user(username, user)
Updated user
@@ -343,11 +343,11 @@ require 'petstore'
api_instance = Petstore::UserApi.new
username = 'username_example' # String | name that need to be deleted
body = Petstore::User.new # User | Updated user object
user = Petstore::User.new # User | Updated user object
begin
#Updated user
api_instance.update_user(username, body)
api_instance.update_user(username, user)
rescue Petstore::ApiError => e
puts "Exception when calling UserApi->update_user: #{e}"
end
@@ -359,7 +359,7 @@ end
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**username** | **String**| name that need to be deleted |
**body** | [**User**](User.md)| Updated user object |
**user** | [**User**](User.md)| Updated user object |
### Return type
@@ -371,6 +371,6 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Content-Type**: application/json
- **Accept**: Not defined

View File

@@ -1,73 +0,0 @@
# Petstore::XmlItem
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**attribute_string** | **String** | | [optional]
**attribute_number** | **Float** | | [optional]
**attribute_integer** | **Integer** | | [optional]
**attribute_boolean** | **Boolean** | | [optional]
**wrapped_array** | **Array&lt;Integer&gt;** | | [optional]
**name_string** | **String** | | [optional]
**name_number** | **Float** | | [optional]
**name_integer** | **Integer** | | [optional]
**name_boolean** | **Boolean** | | [optional]
**name_array** | **Array&lt;Integer&gt;** | | [optional]
**name_wrapped_array** | **Array&lt;Integer&gt;** | | [optional]
**prefix_string** | **String** | | [optional]
**prefix_number** | **Float** | | [optional]
**prefix_integer** | **Integer** | | [optional]
**prefix_boolean** | **Boolean** | | [optional]
**prefix_array** | **Array&lt;Integer&gt;** | | [optional]
**prefix_wrapped_array** | **Array&lt;Integer&gt;** | | [optional]
**namespace_string** | **String** | | [optional]
**namespace_number** | **Float** | | [optional]
**namespace_integer** | **Integer** | | [optional]
**namespace_boolean** | **Boolean** | | [optional]
**namespace_array** | **Array&lt;Integer&gt;** | | [optional]
**namespace_wrapped_array** | **Array&lt;Integer&gt;** | | [optional]
**prefix_ns_string** | **String** | | [optional]
**prefix_ns_number** | **Float** | | [optional]
**prefix_ns_integer** | **Integer** | | [optional]
**prefix_ns_boolean** | **Boolean** | | [optional]
**prefix_ns_array** | **Array&lt;Integer&gt;** | | [optional]
**prefix_ns_wrapped_array** | **Array&lt;Integer&gt;** | | [optional]
## Code Sample
```ruby
require 'Petstore'
instance = Petstore::XmlItem.new(attribute_string: string,
attribute_number: 1.234,
attribute_integer: -2,
attribute_boolean: true,
wrapped_array: null,
name_string: string,
name_number: 1.234,
name_integer: -2,
name_boolean: true,
name_array: null,
name_wrapped_array: null,
prefix_string: string,
prefix_number: 1.234,
prefix_integer: -2,
prefix_boolean: true,
prefix_array: null,
prefix_wrapped_array: null,
namespace_string: string,
namespace_number: 1.234,
namespace_integer: -2,
namespace_boolean: true,
namespace_array: null,
namespace_wrapped_array: null,
prefix_ns_string: string,
prefix_ns_number: 1.234,
prefix_ns_integer: -2,
prefix_ns_boolean: true,
prefix_ns_array: null,
prefix_ns_wrapped_array: null)
```