mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-12-10 00:26:22 +00:00
[Ruby][Faraday] Various improvements (#3520)
* update ruby faraday oas v2 samples * skip some default tests in faraday * add ruby faraday oas v3 client * add tests, fix url * add tests to CI * fix file upload * undo changes to ruby-client-petstore.sh * test faraday first * combine gemspec tempaltes * test ruby faraday in drone.io * use smaller image * update bundler * use official ruby image * skip bundler installation * skip autotest * install make * use different image * skip ruby tests in drone.io
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
# Petstore::AdditionalPropertiesAnyType
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**name** | **String** | | [optional]
|
||||
|
||||
## Code Sample
|
||||
|
||||
```ruby
|
||||
require 'Petstore'
|
||||
|
||||
instance = Petstore::AdditionalPropertiesAnyType.new(name: null)
|
||||
```
|
||||
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
# Petstore::AdditionalPropertiesArray
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**name** | **String** | | [optional]
|
||||
|
||||
## Code Sample
|
||||
|
||||
```ruby
|
||||
require 'Petstore'
|
||||
|
||||
instance = Petstore::AdditionalPropertiesArray.new(name: null)
|
||||
```
|
||||
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
# Petstore::AdditionalPropertiesBoolean
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**name** | **String** | | [optional]
|
||||
|
||||
## Code Sample
|
||||
|
||||
```ruby
|
||||
require 'Petstore'
|
||||
|
||||
instance = Petstore::AdditionalPropertiesBoolean.new(name: null)
|
||||
```
|
||||
|
||||
|
||||
@@ -1,9 +1,37 @@
|
||||
# Petstore::AdditionalPropertiesClass
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**map_property** | **Hash<String, String>** | | [optional]
|
||||
**map_of_map_property** | **Hash<String, Hash<String, String>>** | | [optional]
|
||||
**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**](.md) | | [optional]
|
||||
**anytype_2** | [**Object**](.md) | | [optional]
|
||||
**anytype_3** | [**Object**](.md) | | [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)
|
||||
```
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
# Petstore::AdditionalPropertiesInteger
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**name** | **String** | | [optional]
|
||||
|
||||
## Code Sample
|
||||
|
||||
```ruby
|
||||
require 'Petstore'
|
||||
|
||||
instance = Petstore::AdditionalPropertiesInteger.new(name: null)
|
||||
```
|
||||
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
# Petstore::AdditionalPropertiesNumber
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**name** | **String** | | [optional]
|
||||
|
||||
## Code Sample
|
||||
|
||||
```ruby
|
||||
require 'Petstore'
|
||||
|
||||
instance = Petstore::AdditionalPropertiesNumber.new(name: null)
|
||||
```
|
||||
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
# Petstore::AdditionalPropertiesObject
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**name** | **String** | | [optional]
|
||||
|
||||
## Code Sample
|
||||
|
||||
```ruby
|
||||
require 'Petstore'
|
||||
|
||||
instance = Petstore::AdditionalPropertiesObject.new(name: null)
|
||||
```
|
||||
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
# Petstore::AdditionalPropertiesString
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**name** | **String** | | [optional]
|
||||
|
||||
## Code Sample
|
||||
|
||||
```ruby
|
||||
require 'Petstore'
|
||||
|
||||
instance = Petstore::AdditionalPropertiesString.new(name: null)
|
||||
```
|
||||
|
||||
|
||||
@@ -1,9 +1,19 @@
|
||||
# Petstore::Animal
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**class_name** | **String** | |
|
||||
**color** | **String** | | [optional] [default to 'red']
|
||||
|
||||
## Code Sample
|
||||
|
||||
```ruby
|
||||
require 'Petstore'
|
||||
|
||||
instance = Petstore::Animal.new(class_name: null,
|
||||
color: null)
|
||||
```
|
||||
|
||||
|
||||
|
||||
@@ -7,24 +7,27 @@ Method | HTTP request | Description
|
||||
[**call_123_test_special_tags**](AnotherFakeApi.md#call_123_test_special_tags) | **PATCH** /another-fake/dummy | To test special tags
|
||||
|
||||
|
||||
# **call_123_test_special_tags**
|
||||
> Client call_123_test_special_tags(client)
|
||||
|
||||
## call_123_test_special_tags
|
||||
|
||||
> Client call_123_test_special_tags(body)
|
||||
|
||||
To test special tags
|
||||
|
||||
To test special tags and operation ID starting with number
|
||||
|
||||
### Example
|
||||
|
||||
```ruby
|
||||
# load the gem
|
||||
require 'petstore'
|
||||
|
||||
api_instance = Petstore::AnotherFakeApi.new
|
||||
client = Petstore::Client.new # Client | client model
|
||||
body = Petstore::Client.new # Client | client model
|
||||
|
||||
begin
|
||||
#To test special tags
|
||||
result = api_instance.call_123_test_special_tags(client)
|
||||
result = api_instance.call_123_test_special_tags(body)
|
||||
p result
|
||||
rescue Petstore::ApiError => e
|
||||
puts "Exception when calling AnotherFakeApi->call_123_test_special_tags: #{e}"
|
||||
@@ -33,9 +36,10 @@ end
|
||||
|
||||
### Parameters
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**client** | [**Client**](Client.md)| client model |
|
||||
**body** | [**Client**](Client.md)| client model |
|
||||
|
||||
### Return type
|
||||
|
||||
@@ -47,8 +51,6 @@ No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: application/json
|
||||
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: application/json
|
||||
|
||||
|
||||
@@ -1,10 +1,21 @@
|
||||
# Petstore::ApiResponse
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**code** | **Integer** | | [optional]
|
||||
**type** | **String** | | [optional]
|
||||
**message** | **String** | | [optional]
|
||||
|
||||
## Code Sample
|
||||
|
||||
```ruby
|
||||
require 'Petstore'
|
||||
|
||||
instance = Petstore::ApiResponse.new(code: null,
|
||||
type: null,
|
||||
message: null)
|
||||
```
|
||||
|
||||
|
||||
|
||||
@@ -1,8 +1,17 @@
|
||||
# Petstore::ArrayOfArrayOfNumberOnly
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**array_array_number** | **Array<Array<Float>>** | | [optional]
|
||||
|
||||
## Code Sample
|
||||
|
||||
```ruby
|
||||
require 'Petstore'
|
||||
|
||||
instance = Petstore::ArrayOfArrayOfNumberOnly.new(array_array_number: null)
|
||||
```
|
||||
|
||||
|
||||
|
||||
@@ -1,8 +1,17 @@
|
||||
# Petstore::ArrayOfNumberOnly
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**array_number** | **Array<Float>** | | [optional]
|
||||
|
||||
## Code Sample
|
||||
|
||||
```ruby
|
||||
require 'Petstore'
|
||||
|
||||
instance = Petstore::ArrayOfNumberOnly.new(array_number: null)
|
||||
```
|
||||
|
||||
|
||||
|
||||
@@ -1,10 +1,21 @@
|
||||
# Petstore::ArrayTest
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**array_of_string** | **Array<String>** | | [optional]
|
||||
**array_array_of_integer** | **Array<Array<Integer>>** | | [optional]
|
||||
**array_array_of_model** | **Array<Array<ReadOnlyFirst>>** | | [optional]
|
||||
|
||||
## Code Sample
|
||||
|
||||
```ruby
|
||||
require 'Petstore'
|
||||
|
||||
instance = Petstore::ArrayTest.new(array_of_string: null,
|
||||
array_array_of_integer: null,
|
||||
array_array_of_model: null)
|
||||
```
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
# Petstore::Capitalization
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**small_camel** | **String** | | [optional]
|
||||
@@ -10,4 +11,17 @@ Name | Type | Description | Notes
|
||||
**sca_eth_flow_points** | **String** | | [optional]
|
||||
**att_name** | **String** | Name of the pet | [optional]
|
||||
|
||||
## Code Sample
|
||||
|
||||
```ruby
|
||||
require 'Petstore'
|
||||
|
||||
instance = Petstore::Capitalization.new(small_camel: null,
|
||||
capital_camel: null,
|
||||
small_snake: null,
|
||||
capital_snake: null,
|
||||
sca_eth_flow_points: null,
|
||||
att_name: null)
|
||||
```
|
||||
|
||||
|
||||
|
||||
@@ -1,10 +1,17 @@
|
||||
# Petstore::Cat
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**class_name** | **String** | |
|
||||
**color** | **String** | | [optional] [default to 'red']
|
||||
**declawed** | **BOOLEAN** | | [optional]
|
||||
**declawed** | **Boolean** | | [optional]
|
||||
|
||||
## Code Sample
|
||||
|
||||
```ruby
|
||||
require 'Petstore'
|
||||
|
||||
instance = Petstore::Cat.new(declawed: null)
|
||||
```
|
||||
|
||||
|
||||
|
||||
17
samples/client/petstore/ruby-faraday/docs/CatAllOf.md
Normal file
17
samples/client/petstore/ruby-faraday/docs/CatAllOf.md
Normal file
@@ -0,0 +1,17 @@
|
||||
# Petstore::CatAllOf
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**declawed** | **Boolean** | | [optional]
|
||||
|
||||
## Code Sample
|
||||
|
||||
```ruby
|
||||
require 'Petstore'
|
||||
|
||||
instance = Petstore::CatAllOf.new(declawed: null)
|
||||
```
|
||||
|
||||
|
||||
@@ -1,9 +1,19 @@
|
||||
# Petstore::Category
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**id** | **Integer** | | [optional]
|
||||
**name** | **String** | | [default to 'default-name']
|
||||
|
||||
## Code Sample
|
||||
|
||||
```ruby
|
||||
require 'Petstore'
|
||||
|
||||
instance = Petstore::Category.new(id: null,
|
||||
name: null)
|
||||
```
|
||||
|
||||
|
||||
|
||||
@@ -1,8 +1,17 @@
|
||||
# Petstore::ClassModel
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**_class** | **String** | | [optional]
|
||||
|
||||
## Code Sample
|
||||
|
||||
```ruby
|
||||
require 'Petstore'
|
||||
|
||||
instance = Petstore::ClassModel.new(_class: null)
|
||||
```
|
||||
|
||||
|
||||
|
||||
@@ -1,8 +1,17 @@
|
||||
# Petstore::Client
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**client** | **String** | | [optional]
|
||||
|
||||
## Code Sample
|
||||
|
||||
```ruby
|
||||
require 'Petstore'
|
||||
|
||||
instance = Petstore::Client.new(client: null)
|
||||
```
|
||||
|
||||
|
||||
|
||||
@@ -1,10 +1,17 @@
|
||||
# Petstore::Dog
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**class_name** | **String** | |
|
||||
**color** | **String** | | [optional] [default to 'red']
|
||||
**breed** | **String** | | [optional]
|
||||
|
||||
## Code Sample
|
||||
|
||||
```ruby
|
||||
require 'Petstore'
|
||||
|
||||
instance = Petstore::Dog.new(breed: null)
|
||||
```
|
||||
|
||||
|
||||
|
||||
17
samples/client/petstore/ruby-faraday/docs/DogAllOf.md
Normal file
17
samples/client/petstore/ruby-faraday/docs/DogAllOf.md
Normal file
@@ -0,0 +1,17 @@
|
||||
# Petstore::DogAllOf
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**breed** | **String** | | [optional]
|
||||
|
||||
## Code Sample
|
||||
|
||||
```ruby
|
||||
require 'Petstore'
|
||||
|
||||
instance = Petstore::DogAllOf.new(breed: null)
|
||||
```
|
||||
|
||||
|
||||
@@ -1,9 +1,19 @@
|
||||
# Petstore::EnumArrays
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**just_symbol** | **String** | | [optional]
|
||||
**array_enum** | **Array<String>** | | [optional]
|
||||
|
||||
## Code Sample
|
||||
|
||||
```ruby
|
||||
require 'Petstore'
|
||||
|
||||
instance = Petstore::EnumArrays.new(just_symbol: null,
|
||||
array_enum: null)
|
||||
```
|
||||
|
||||
|
||||
|
||||
@@ -1,7 +1,16 @@
|
||||
# Petstore::EnumClass
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
|
||||
## Code Sample
|
||||
|
||||
```ruby
|
||||
require 'Petstore'
|
||||
|
||||
instance = Petstore::EnumClass.new()
|
||||
```
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
# Petstore::EnumTest
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**enum_string** | **String** | | [optional]
|
||||
@@ -9,4 +10,16 @@ Name | Type | Description | Notes
|
||||
**enum_number** | **Float** | | [optional]
|
||||
**outer_enum** | [**OuterEnum**](OuterEnum.md) | | [optional]
|
||||
|
||||
## Code Sample
|
||||
|
||||
```ruby
|
||||
require 'Petstore'
|
||||
|
||||
instance = Petstore::EnumTest.new(enum_string: null,
|
||||
enum_string_required: null,
|
||||
enum_integer: null,
|
||||
enum_number: null,
|
||||
outer_enum: null)
|
||||
```
|
||||
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@ 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_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 |
|
||||
@@ -18,21 +19,70 @@ Method | HTTP request | Description
|
||||
[**test_json_form_data**](FakeApi.md#test_json_form_data) | **GET** /fake/jsonFormData | test json serialization of form data
|
||||
|
||||
|
||||
# **fake_outer_boolean_serialize**
|
||||
> BOOLEAN fake_outer_boolean_serialize(opts)
|
||||
|
||||
## create_xml_item
|
||||
|
||||
> create_xml_item(xml_item)
|
||||
|
||||
creates an XmlItem
|
||||
|
||||
this route creates an XmlItem
|
||||
|
||||
### Example
|
||||
|
||||
```ruby
|
||||
# load the gem
|
||||
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)
|
||||
rescue Petstore::ApiError => e
|
||||
puts "Exception when calling FakeApi->create_xml_item: #{e}"
|
||||
end
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**xml_item** | [**XmlItem**](XmlItem.md)| XmlItem Body |
|
||||
|
||||
### Return type
|
||||
|
||||
nil (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### 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
|
||||
- **Accept**: Not defined
|
||||
|
||||
|
||||
## fake_outer_boolean_serialize
|
||||
|
||||
> Boolean fake_outer_boolean_serialize(opts)
|
||||
|
||||
|
||||
|
||||
Test serialization of outer boolean types
|
||||
|
||||
### Example
|
||||
|
||||
```ruby
|
||||
# load the gem
|
||||
require 'petstore'
|
||||
|
||||
api_instance = Petstore::FakeApi.new
|
||||
opts = {
|
||||
body: true # BOOLEAN | Input boolean as post body
|
||||
body: true # Boolean | Input boolean as post body
|
||||
}
|
||||
|
||||
begin
|
||||
@@ -45,13 +95,14 @@ end
|
||||
|
||||
### Parameters
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**body** | **BOOLEAN**| Input boolean as post body | [optional]
|
||||
**body** | **Boolean**| Input boolean as post body | [optional]
|
||||
|
||||
### Return type
|
||||
|
||||
**BOOLEAN**
|
||||
**Boolean**
|
||||
|
||||
### Authorization
|
||||
|
||||
@@ -59,12 +110,12 @@ No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: */*
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: */*
|
||||
|
||||
|
||||
## fake_outer_composite_serialize
|
||||
|
||||
# **fake_outer_composite_serialize**
|
||||
> OuterComposite fake_outer_composite_serialize(opts)
|
||||
|
||||
|
||||
@@ -72,13 +123,14 @@ No authorization required
|
||||
Test serialization of object with outer number type
|
||||
|
||||
### Example
|
||||
|
||||
```ruby
|
||||
# load the gem
|
||||
require 'petstore'
|
||||
|
||||
api_instance = Petstore::FakeApi.new
|
||||
opts = {
|
||||
outer_composite: Petstore::OuterComposite.new # OuterComposite | Input composite as post body
|
||||
body: Petstore::OuterComposite.new # OuterComposite | Input composite as post body
|
||||
}
|
||||
|
||||
begin
|
||||
@@ -91,9 +143,10 @@ end
|
||||
|
||||
### Parameters
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**outer_composite** | [**OuterComposite**](OuterComposite.md)| Input composite as post body | [optional]
|
||||
**body** | [**OuterComposite**](OuterComposite.md)| Input composite as post body | [optional]
|
||||
|
||||
### Return type
|
||||
|
||||
@@ -105,12 +158,12 @@ No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: */*
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: */*
|
||||
|
||||
|
||||
## fake_outer_number_serialize
|
||||
|
||||
# **fake_outer_number_serialize**
|
||||
> Float fake_outer_number_serialize(opts)
|
||||
|
||||
|
||||
@@ -118,6 +171,7 @@ No authorization required
|
||||
Test serialization of outer number types
|
||||
|
||||
### Example
|
||||
|
||||
```ruby
|
||||
# load the gem
|
||||
require 'petstore'
|
||||
@@ -137,6 +191,7 @@ end
|
||||
|
||||
### Parameters
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**body** | **Float**| Input number as post body | [optional]
|
||||
@@ -151,12 +206,12 @@ No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: */*
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: */*
|
||||
|
||||
|
||||
## fake_outer_string_serialize
|
||||
|
||||
# **fake_outer_string_serialize**
|
||||
> String fake_outer_string_serialize(opts)
|
||||
|
||||
|
||||
@@ -164,6 +219,7 @@ No authorization required
|
||||
Test serialization of outer string types
|
||||
|
||||
### Example
|
||||
|
||||
```ruby
|
||||
# load the gem
|
||||
require 'petstore'
|
||||
@@ -183,6 +239,7 @@ end
|
||||
|
||||
### Parameters
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**body** | **String**| Input string as post body | [optional]
|
||||
@@ -197,28 +254,29 @@ No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: */*
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: */*
|
||||
|
||||
|
||||
## test_body_with_file_schema
|
||||
|
||||
# **test_body_with_file_schema**
|
||||
> test_body_with_file_schema(file_schema_test_class)
|
||||
> test_body_with_file_schema(body)
|
||||
|
||||
|
||||
|
||||
For this test, the body for this request much reference a schema named `File`.
|
||||
|
||||
### Example
|
||||
|
||||
```ruby
|
||||
# load the gem
|
||||
require 'petstore'
|
||||
|
||||
api_instance = Petstore::FakeApi.new
|
||||
file_schema_test_class = Petstore::FileSchemaTestClass.new # FileSchemaTestClass |
|
||||
body = Petstore::FileSchemaTestClass.new # FileSchemaTestClass |
|
||||
|
||||
begin
|
||||
api_instance.test_body_with_file_schema(file_schema_test_class)
|
||||
api_instance.test_body_with_file_schema(body)
|
||||
rescue Petstore::ApiError => e
|
||||
puts "Exception when calling FakeApi->test_body_with_file_schema: #{e}"
|
||||
end
|
||||
@@ -226,9 +284,10 @@ end
|
||||
|
||||
### Parameters
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**file_schema_test_class** | [**FileSchemaTestClass**](FileSchemaTestClass.md)| |
|
||||
**body** | [**FileSchemaTestClass**](FileSchemaTestClass.md)| |
|
||||
|
||||
### Return type
|
||||
|
||||
@@ -240,27 +299,28 @@ No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: Not defined
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: Not defined
|
||||
|
||||
|
||||
## test_body_with_query_params
|
||||
|
||||
# **test_body_with_query_params**
|
||||
> test_body_with_query_params(query, user)
|
||||
> test_body_with_query_params(query, body)
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
|
||||
```ruby
|
||||
# load the gem
|
||||
require 'petstore'
|
||||
|
||||
api_instance = Petstore::FakeApi.new
|
||||
query = 'query_example' # String |
|
||||
user = Petstore::User.new # User |
|
||||
body = Petstore::User.new # User |
|
||||
|
||||
begin
|
||||
api_instance.test_body_with_query_params(query, user)
|
||||
api_instance.test_body_with_query_params(query, body)
|
||||
rescue Petstore::ApiError => e
|
||||
puts "Exception when calling FakeApi->test_body_with_query_params: #{e}"
|
||||
end
|
||||
@@ -268,10 +328,11 @@ end
|
||||
|
||||
### Parameters
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**query** | **String**| |
|
||||
**user** | [**User**](User.md)| |
|
||||
**body** | [**User**](User.md)| |
|
||||
|
||||
### Return type
|
||||
|
||||
@@ -283,29 +344,30 @@ No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: Not defined
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: Not defined
|
||||
|
||||
|
||||
## test_client_model
|
||||
|
||||
# **test_client_model**
|
||||
> Client test_client_model(client)
|
||||
> Client test_client_model(body)
|
||||
|
||||
To test \"client\" model
|
||||
|
||||
To test \"client\" model
|
||||
|
||||
### Example
|
||||
|
||||
```ruby
|
||||
# load the gem
|
||||
require 'petstore'
|
||||
|
||||
api_instance = Petstore::FakeApi.new
|
||||
client = Petstore::Client.new # Client | client model
|
||||
body = Petstore::Client.new # Client | client model
|
||||
|
||||
begin
|
||||
#To test \"client\" model
|
||||
result = api_instance.test_client_model(client)
|
||||
result = api_instance.test_client_model(body)
|
||||
p result
|
||||
rescue Petstore::ApiError => e
|
||||
puts "Exception when calling FakeApi->test_client_model: #{e}"
|
||||
@@ -314,9 +376,10 @@ end
|
||||
|
||||
### Parameters
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**client** | [**Client**](Client.md)| client model |
|
||||
**body** | [**Client**](Client.md)| client model |
|
||||
|
||||
### Return type
|
||||
|
||||
@@ -328,12 +391,12 @@ No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: application/json
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: application/json
|
||||
|
||||
|
||||
## test_endpoint_parameters
|
||||
|
||||
# **test_endpoint_parameters**
|
||||
> test_endpoint_parameters(number, double, pattern_without_delimiter, byte, opts)
|
||||
|
||||
Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||
@@ -341,6 +404,7 @@ Fake endpoint for testing various parameters 假端點 偽のエンドポイン
|
||||
Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||
|
||||
### Example
|
||||
|
||||
```ruby
|
||||
# load the gem
|
||||
require 'petstore'
|
||||
@@ -379,6 +443,7 @@ end
|
||||
|
||||
### Parameters
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**number** | **Float**| None |
|
||||
@@ -406,12 +471,12 @@ nil (empty response body)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/x-www-form-urlencoded
|
||||
- **Accept**: Not defined
|
||||
- **Content-Type**: application/x-www-form-urlencoded
|
||||
- **Accept**: Not defined
|
||||
|
||||
|
||||
## test_enum_parameters
|
||||
|
||||
# **test_enum_parameters**
|
||||
> test_enum_parameters(opts)
|
||||
|
||||
To test enum parameters
|
||||
@@ -419,6 +484,7 @@ To test enum parameters
|
||||
To test enum parameters
|
||||
|
||||
### Example
|
||||
|
||||
```ruby
|
||||
# load the gem
|
||||
require 'petstore'
|
||||
@@ -445,6 +511,7 @@ end
|
||||
|
||||
### Parameters
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**enum_header_string_array** | [**Array<String>**](String.md)| Header parameter enum test (string array) | [optional]
|
||||
@@ -466,12 +533,12 @@ No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/x-www-form-urlencoded
|
||||
- **Accept**: Not defined
|
||||
- **Content-Type**: application/x-www-form-urlencoded
|
||||
- **Accept**: Not defined
|
||||
|
||||
|
||||
## test_group_parameters
|
||||
|
||||
# **test_group_parameters**
|
||||
> test_group_parameters(required_string_group, required_boolean_group, required_int64_group, opts)
|
||||
|
||||
Fake endpoint to test group parameters (optional)
|
||||
@@ -479,17 +546,18 @@ Fake endpoint to test group parameters (optional)
|
||||
Fake endpoint to test group parameters (optional)
|
||||
|
||||
### Example
|
||||
|
||||
```ruby
|
||||
# load the gem
|
||||
require 'petstore'
|
||||
|
||||
api_instance = Petstore::FakeApi.new
|
||||
required_string_group = 56 # Integer | Required String in group parameters
|
||||
required_boolean_group = true # BOOLEAN | Required Boolean in group parameters
|
||||
required_boolean_group = true # Boolean | Required Boolean in group parameters
|
||||
required_int64_group = 56 # Integer | Required Integer in group parameters
|
||||
opts = {
|
||||
string_group: 56, # Integer | String in group parameters
|
||||
boolean_group: true, # BOOLEAN | Boolean in group parameters
|
||||
boolean_group: true, # Boolean | Boolean in group parameters
|
||||
int64_group: 56 # Integer | Integer in group parameters
|
||||
}
|
||||
|
||||
@@ -503,13 +571,14 @@ end
|
||||
|
||||
### Parameters
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**required_string_group** | **Integer**| Required String in group parameters |
|
||||
**required_boolean_group** | **BOOLEAN**| Required Boolean in group parameters |
|
||||
**required_boolean_group** | **Boolean**| Required Boolean in group parameters |
|
||||
**required_int64_group** | **Integer**| Required Integer in group parameters |
|
||||
**string_group** | **Integer**| String in group parameters | [optional]
|
||||
**boolean_group** | **BOOLEAN**| Boolean in group parameters | [optional]
|
||||
**boolean_group** | **Boolean**| Boolean in group parameters | [optional]
|
||||
**int64_group** | **Integer**| Integer in group parameters | [optional]
|
||||
|
||||
### Return type
|
||||
@@ -522,27 +591,28 @@ No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: Not defined
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: Not defined
|
||||
|
||||
|
||||
## test_inline_additional_properties
|
||||
|
||||
# **test_inline_additional_properties**
|
||||
> test_inline_additional_properties(request_body)
|
||||
> test_inline_additional_properties(param)
|
||||
|
||||
test inline additionalProperties
|
||||
|
||||
### Example
|
||||
|
||||
```ruby
|
||||
# load the gem
|
||||
require 'petstore'
|
||||
|
||||
api_instance = Petstore::FakeApi.new
|
||||
request_body = {'key' => 'request_body_example'} # Hash<String, String> | request body
|
||||
param = {'key' => 'param_example'} # Hash<String, String> | request body
|
||||
|
||||
begin
|
||||
#test inline additionalProperties
|
||||
api_instance.test_inline_additional_properties(request_body)
|
||||
api_instance.test_inline_additional_properties(param)
|
||||
rescue Petstore::ApiError => e
|
||||
puts "Exception when calling FakeApi->test_inline_additional_properties: #{e}"
|
||||
end
|
||||
@@ -550,9 +620,10 @@ end
|
||||
|
||||
### Parameters
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**request_body** | [**Hash<String, String>**](String.md)| request body |
|
||||
**param** | [**Hash<String, String>**](String.md)| request body |
|
||||
|
||||
### Return type
|
||||
|
||||
@@ -564,17 +635,18 @@ No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: Not defined
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: Not defined
|
||||
|
||||
|
||||
## test_json_form_data
|
||||
|
||||
# **test_json_form_data**
|
||||
> test_json_form_data(param, param2)
|
||||
|
||||
test json serialization of form data
|
||||
|
||||
### Example
|
||||
|
||||
```ruby
|
||||
# load the gem
|
||||
require 'petstore'
|
||||
@@ -593,6 +665,7 @@ end
|
||||
|
||||
### Parameters
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**param** | **String**| field1 |
|
||||
@@ -608,8 +681,6 @@ No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/x-www-form-urlencoded
|
||||
- **Accept**: Not defined
|
||||
|
||||
|
||||
- **Content-Type**: application/x-www-form-urlencoded
|
||||
- **Accept**: Not defined
|
||||
|
||||
|
||||
@@ -7,14 +7,17 @@ Method | HTTP request | Description
|
||||
[**test_classname**](FakeClassnameTags123Api.md#test_classname) | **PATCH** /fake_classname_test | To test class name in snake case
|
||||
|
||||
|
||||
# **test_classname**
|
||||
> Client test_classname(client)
|
||||
|
||||
## test_classname
|
||||
|
||||
> Client test_classname(body)
|
||||
|
||||
To test class name in snake case
|
||||
|
||||
To test class name in snake case
|
||||
|
||||
### Example
|
||||
|
||||
```ruby
|
||||
# load the gem
|
||||
require 'petstore'
|
||||
@@ -27,11 +30,11 @@ Petstore.configure do |config|
|
||||
end
|
||||
|
||||
api_instance = Petstore::FakeClassnameTags123Api.new
|
||||
client = Petstore::Client.new # Client | client model
|
||||
body = Petstore::Client.new # Client | client model
|
||||
|
||||
begin
|
||||
#To test class name in snake case
|
||||
result = api_instance.test_classname(client)
|
||||
result = api_instance.test_classname(body)
|
||||
p result
|
||||
rescue Petstore::ApiError => e
|
||||
puts "Exception when calling FakeClassnameTags123Api->test_classname: #{e}"
|
||||
@@ -40,9 +43,10 @@ end
|
||||
|
||||
### Parameters
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**client** | [**Client**](Client.md)| client model |
|
||||
**body** | [**Client**](Client.md)| client model |
|
||||
|
||||
### Return type
|
||||
|
||||
@@ -54,8 +58,6 @@ Name | Type | Description | Notes
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: application/json
|
||||
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: application/json
|
||||
|
||||
|
||||
@@ -1,8 +1,17 @@
|
||||
# Petstore::File
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**source_uri** | **String** | Test capitalization | [optional]
|
||||
|
||||
## Code Sample
|
||||
|
||||
```ruby
|
||||
require 'Petstore'
|
||||
|
||||
instance = Petstore::File.new(source_uri: null)
|
||||
```
|
||||
|
||||
|
||||
|
||||
@@ -1,9 +1,19 @@
|
||||
# Petstore::FileSchemaTestClass
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**file** | **File** | | [optional]
|
||||
**files** | **Array<File>** | | [optional]
|
||||
|
||||
## Code Sample
|
||||
|
||||
```ruby
|
||||
require 'Petstore'
|
||||
|
||||
instance = Petstore::FileSchemaTestClass.new(file: null,
|
||||
files: null)
|
||||
```
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
# Petstore::FormatTest
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**integer** | **Integer** | | [optional]
|
||||
@@ -17,4 +18,24 @@ Name | Type | Description | Notes
|
||||
**uuid** | **String** | | [optional]
|
||||
**password** | **String** | |
|
||||
|
||||
## Code Sample
|
||||
|
||||
```ruby
|
||||
require 'Petstore'
|
||||
|
||||
instance = Petstore::FormatTest.new(integer: null,
|
||||
int32: null,
|
||||
int64: null,
|
||||
number: null,
|
||||
float: null,
|
||||
double: null,
|
||||
string: null,
|
||||
byte: null,
|
||||
binary: null,
|
||||
date: null,
|
||||
date_time: null,
|
||||
uuid: 72f98069-206d-4f12-9f12-3d1e525a8e84,
|
||||
password: null)
|
||||
```
|
||||
|
||||
|
||||
|
||||
@@ -1,9 +1,19 @@
|
||||
# Petstore::HasOnlyReadOnly
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**bar** | **String** | | [optional]
|
||||
**foo** | **String** | | [optional]
|
||||
|
||||
## Code Sample
|
||||
|
||||
```ruby
|
||||
require 'Petstore'
|
||||
|
||||
instance = Petstore::HasOnlyReadOnly.new(bar: null,
|
||||
foo: null)
|
||||
```
|
||||
|
||||
|
||||
|
||||
@@ -1,8 +1,17 @@
|
||||
# Petstore::List
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**_123_list** | **String** | | [optional]
|
||||
|
||||
## Code Sample
|
||||
|
||||
```ruby
|
||||
require 'Petstore'
|
||||
|
||||
instance = Petstore::List.new(_123_list: null)
|
||||
```
|
||||
|
||||
|
||||
|
||||
@@ -1,11 +1,23 @@
|
||||
# Petstore::MapTest
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**map_map_of_string** | **Hash<String, Hash<String, String>>** | | [optional]
|
||||
**map_of_enum_string** | **Hash<String, String>** | | [optional]
|
||||
**direct_map** | **Hash<String, BOOLEAN>** | | [optional]
|
||||
**indirect_map** | **Hash<String, BOOLEAN>** | | [optional]
|
||||
**direct_map** | **Hash<String, Boolean>** | | [optional]
|
||||
**indirect_map** | **Hash<String, Boolean>** | | [optional]
|
||||
|
||||
## Code Sample
|
||||
|
||||
```ruby
|
||||
require 'Petstore'
|
||||
|
||||
instance = Petstore::MapTest.new(map_map_of_string: null,
|
||||
map_of_enum_string: null,
|
||||
direct_map: null,
|
||||
indirect_map: null)
|
||||
```
|
||||
|
||||
|
||||
|
||||
@@ -1,10 +1,21 @@
|
||||
# Petstore::MixedPropertiesAndAdditionalPropertiesClass
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**uuid** | **String** | | [optional]
|
||||
**date_time** | **DateTime** | | [optional]
|
||||
**map** | [**Hash<String, Animal>**](Animal.md) | | [optional]
|
||||
|
||||
## Code Sample
|
||||
|
||||
```ruby
|
||||
require 'Petstore'
|
||||
|
||||
instance = Petstore::MixedPropertiesAndAdditionalPropertiesClass.new(uuid: null,
|
||||
date_time: null,
|
||||
map: null)
|
||||
```
|
||||
|
||||
|
||||
|
||||
@@ -1,9 +1,19 @@
|
||||
# Petstore::Model200Response
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**name** | **Integer** | | [optional]
|
||||
**_class** | **String** | | [optional]
|
||||
|
||||
## Code Sample
|
||||
|
||||
```ruby
|
||||
require 'Petstore'
|
||||
|
||||
instance = Petstore::Model200Response.new(name: null,
|
||||
_class: null)
|
||||
```
|
||||
|
||||
|
||||
|
||||
@@ -1,8 +1,17 @@
|
||||
# Petstore::ModelReturn
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**_return** | **Integer** | | [optional]
|
||||
|
||||
## Code Sample
|
||||
|
||||
```ruby
|
||||
require 'Petstore'
|
||||
|
||||
instance = Petstore::ModelReturn.new(_return: null)
|
||||
```
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
# Petstore::Name
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**name** | **Integer** | |
|
||||
@@ -8,4 +9,15 @@ Name | Type | Description | Notes
|
||||
**property** | **String** | | [optional]
|
||||
**_123_number** | **Integer** | | [optional]
|
||||
|
||||
## Code Sample
|
||||
|
||||
```ruby
|
||||
require 'Petstore'
|
||||
|
||||
instance = Petstore::Name.new(name: null,
|
||||
snake_case: null,
|
||||
property: null,
|
||||
_123_number: null)
|
||||
```
|
||||
|
||||
|
||||
|
||||
@@ -1,8 +1,17 @@
|
||||
# Petstore::NumberOnly
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**just_number** | **Float** | | [optional]
|
||||
|
||||
## Code Sample
|
||||
|
||||
```ruby
|
||||
require 'Petstore'
|
||||
|
||||
instance = Petstore::NumberOnly.new(just_number: null)
|
||||
```
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
# Petstore::Order
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**id** | **Integer** | | [optional]
|
||||
@@ -8,6 +9,19 @@ Name | Type | Description | Notes
|
||||
**quantity** | **Integer** | | [optional]
|
||||
**ship_date** | **DateTime** | | [optional]
|
||||
**status** | **String** | Order Status | [optional]
|
||||
**complete** | **BOOLEAN** | | [optional] [default to false]
|
||||
**complete** | **Boolean** | | [optional] [default to false]
|
||||
|
||||
## Code Sample
|
||||
|
||||
```ruby
|
||||
require 'Petstore'
|
||||
|
||||
instance = Petstore::Order.new(id: null,
|
||||
pet_id: null,
|
||||
quantity: null,
|
||||
ship_date: null,
|
||||
status: null,
|
||||
complete: null)
|
||||
```
|
||||
|
||||
|
||||
|
||||
@@ -1,10 +1,21 @@
|
||||
# Petstore::OuterComposite
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**my_number** | **Float** | | [optional]
|
||||
**my_string** | **String** | | [optional]
|
||||
**my_boolean** | **BOOLEAN** | | [optional]
|
||||
**my_boolean** | **Boolean** | | [optional]
|
||||
|
||||
## Code Sample
|
||||
|
||||
```ruby
|
||||
require 'Petstore'
|
||||
|
||||
instance = Petstore::OuterComposite.new(my_number: null,
|
||||
my_string: null,
|
||||
my_boolean: null)
|
||||
```
|
||||
|
||||
|
||||
|
||||
@@ -1,7 +1,16 @@
|
||||
# Petstore::OuterEnum
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
|
||||
## Code Sample
|
||||
|
||||
```ruby
|
||||
require 'Petstore'
|
||||
|
||||
instance = Petstore::OuterEnum.new()
|
||||
```
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
# Petstore::Pet
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**id** | **Integer** | | [optional]
|
||||
@@ -10,4 +11,17 @@ Name | Type | Description | Notes
|
||||
**tags** | [**Array<Tag>**](Tag.md) | | [optional]
|
||||
**status** | **String** | pet status in the store | [optional]
|
||||
|
||||
## Code Sample
|
||||
|
||||
```ruby
|
||||
require 'Petstore'
|
||||
|
||||
instance = Petstore::Pet.new(id: null,
|
||||
category: null,
|
||||
name: doggie,
|
||||
photo_urls: null,
|
||||
tags: null,
|
||||
status: null)
|
||||
```
|
||||
|
||||
|
||||
|
||||
@@ -15,12 +15,15 @@ Method | HTTP request | Description
|
||||
[**upload_file_with_required_file**](PetApi.md#upload_file_with_required_file) | **POST** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required)
|
||||
|
||||
|
||||
# **add_pet**
|
||||
> add_pet(pet)
|
||||
|
||||
## add_pet
|
||||
|
||||
> add_pet(body)
|
||||
|
||||
Add a new pet to the store
|
||||
|
||||
### Example
|
||||
|
||||
```ruby
|
||||
# load the gem
|
||||
require 'petstore'
|
||||
@@ -31,11 +34,11 @@ Petstore.configure do |config|
|
||||
end
|
||||
|
||||
api_instance = Petstore::PetApi.new
|
||||
pet = Petstore::Pet.new # Pet | Pet object that needs to be added to the store
|
||||
body = 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(pet)
|
||||
api_instance.add_pet(body)
|
||||
rescue Petstore::ApiError => e
|
||||
puts "Exception when calling PetApi->add_pet: #{e}"
|
||||
end
|
||||
@@ -43,9 +46,10 @@ end
|
||||
|
||||
### Parameters
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
|
||||
**body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
|
||||
|
||||
### Return type
|
||||
|
||||
@@ -57,17 +61,18 @@ nil (empty response body)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json, application/xml
|
||||
- **Accept**: Not defined
|
||||
- **Content-Type**: application/json, application/xml
|
||||
- **Accept**: Not defined
|
||||
|
||||
|
||||
## delete_pet
|
||||
|
||||
# **delete_pet**
|
||||
> delete_pet(pet_id, opts)
|
||||
|
||||
Deletes a pet
|
||||
|
||||
### Example
|
||||
|
||||
```ruby
|
||||
# load the gem
|
||||
require 'petstore'
|
||||
@@ -93,6 +98,7 @@ end
|
||||
|
||||
### Parameters
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**pet_id** | **Integer**| Pet id to delete |
|
||||
@@ -108,12 +114,12 @@ nil (empty response body)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: Not defined
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: Not defined
|
||||
|
||||
|
||||
## find_pets_by_status
|
||||
|
||||
# **find_pets_by_status**
|
||||
> Array<Pet> find_pets_by_status(status)
|
||||
|
||||
Finds Pets by status
|
||||
@@ -121,6 +127,7 @@ Finds Pets by status
|
||||
Multiple status values can be provided with comma separated strings
|
||||
|
||||
### Example
|
||||
|
||||
```ruby
|
||||
# load the gem
|
||||
require 'petstore'
|
||||
@@ -144,6 +151,7 @@ end
|
||||
|
||||
### Parameters
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**status** | [**Array<String>**](String.md)| Status values that need to be considered for filter |
|
||||
@@ -158,12 +166,12 @@ Name | Type | Description | Notes
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
|
||||
## find_pets_by_tags
|
||||
|
||||
# **find_pets_by_tags**
|
||||
> Array<Pet> find_pets_by_tags(tags)
|
||||
|
||||
Finds Pets by tags
|
||||
@@ -171,6 +179,7 @@ Finds Pets by tags
|
||||
Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
|
||||
|
||||
### Example
|
||||
|
||||
```ruby
|
||||
# load the gem
|
||||
require 'petstore'
|
||||
@@ -194,6 +203,7 @@ end
|
||||
|
||||
### Parameters
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**tags** | [**Array<String>**](String.md)| Tags to filter by |
|
||||
@@ -208,12 +218,12 @@ Name | Type | Description | Notes
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
|
||||
## get_pet_by_id
|
||||
|
||||
# **get_pet_by_id**
|
||||
> Pet get_pet_by_id(pet_id)
|
||||
|
||||
Find pet by ID
|
||||
@@ -221,6 +231,7 @@ Find pet by ID
|
||||
Returns a single pet
|
||||
|
||||
### Example
|
||||
|
||||
```ruby
|
||||
# load the gem
|
||||
require 'petstore'
|
||||
@@ -246,6 +257,7 @@ end
|
||||
|
||||
### Parameters
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**pet_id** | **Integer**| ID of pet to return |
|
||||
@@ -260,17 +272,18 @@ Name | Type | Description | Notes
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
|
||||
## update_pet
|
||||
|
||||
# **update_pet**
|
||||
> update_pet(pet)
|
||||
> update_pet(body)
|
||||
|
||||
Update an existing pet
|
||||
|
||||
### Example
|
||||
|
||||
```ruby
|
||||
# load the gem
|
||||
require 'petstore'
|
||||
@@ -281,11 +294,11 @@ Petstore.configure do |config|
|
||||
end
|
||||
|
||||
api_instance = Petstore::PetApi.new
|
||||
pet = Petstore::Pet.new # Pet | Pet object that needs to be added to the store
|
||||
body = Petstore::Pet.new # Pet | Pet object that needs to be added to the store
|
||||
|
||||
begin
|
||||
#Update an existing pet
|
||||
api_instance.update_pet(pet)
|
||||
api_instance.update_pet(body)
|
||||
rescue Petstore::ApiError => e
|
||||
puts "Exception when calling PetApi->update_pet: #{e}"
|
||||
end
|
||||
@@ -293,9 +306,10 @@ end
|
||||
|
||||
### Parameters
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
|
||||
**body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
|
||||
|
||||
### Return type
|
||||
|
||||
@@ -307,17 +321,18 @@ nil (empty response body)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json, application/xml
|
||||
- **Accept**: Not defined
|
||||
- **Content-Type**: application/json, application/xml
|
||||
- **Accept**: Not defined
|
||||
|
||||
|
||||
## update_pet_with_form
|
||||
|
||||
# **update_pet_with_form**
|
||||
> update_pet_with_form(pet_id, opts)
|
||||
|
||||
Updates a pet in the store with form data
|
||||
|
||||
### Example
|
||||
|
||||
```ruby
|
||||
# load the gem
|
||||
require 'petstore'
|
||||
@@ -344,6 +359,7 @@ end
|
||||
|
||||
### Parameters
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**pet_id** | **Integer**| ID of pet that needs to be updated |
|
||||
@@ -360,17 +376,18 @@ nil (empty response body)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/x-www-form-urlencoded
|
||||
- **Accept**: Not defined
|
||||
- **Content-Type**: application/x-www-form-urlencoded
|
||||
- **Accept**: Not defined
|
||||
|
||||
|
||||
## upload_file
|
||||
|
||||
# **upload_file**
|
||||
> ApiResponse upload_file(pet_id, opts)
|
||||
|
||||
uploads an image
|
||||
|
||||
### Example
|
||||
|
||||
```ruby
|
||||
# load the gem
|
||||
require 'petstore'
|
||||
@@ -398,6 +415,7 @@ end
|
||||
|
||||
### Parameters
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**pet_id** | **Integer**| ID of pet to update |
|
||||
@@ -414,17 +432,18 @@ Name | Type | Description | Notes
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: multipart/form-data
|
||||
- **Accept**: application/json
|
||||
- **Content-Type**: multipart/form-data
|
||||
- **Accept**: application/json
|
||||
|
||||
|
||||
## upload_file_with_required_file
|
||||
|
||||
# **upload_file_with_required_file**
|
||||
> ApiResponse upload_file_with_required_file(pet_id, required_file, opts)
|
||||
|
||||
uploads an image (required)
|
||||
|
||||
### Example
|
||||
|
||||
```ruby
|
||||
# load the gem
|
||||
require 'petstore'
|
||||
@@ -452,6 +471,7 @@ end
|
||||
|
||||
### Parameters
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**pet_id** | **Integer**| ID of pet to update |
|
||||
@@ -468,8 +488,6 @@ Name | Type | Description | Notes
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: multipart/form-data
|
||||
- **Accept**: application/json
|
||||
|
||||
|
||||
- **Content-Type**: multipart/form-data
|
||||
- **Accept**: application/json
|
||||
|
||||
|
||||
@@ -1,9 +1,19 @@
|
||||
# Petstore::ReadOnlyFirst
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**bar** | **String** | | [optional]
|
||||
**baz** | **String** | | [optional]
|
||||
|
||||
## Code Sample
|
||||
|
||||
```ruby
|
||||
require 'Petstore'
|
||||
|
||||
instance = Petstore::ReadOnlyFirst.new(bar: null,
|
||||
baz: null)
|
||||
```
|
||||
|
||||
|
||||
|
||||
@@ -1,8 +1,17 @@
|
||||
# Petstore::SpecialModelName
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**special_property_name** | **Integer** | | [optional]
|
||||
|
||||
## Code Sample
|
||||
|
||||
```ruby
|
||||
require 'Petstore'
|
||||
|
||||
instance = Petstore::SpecialModelName.new(special_property_name: null)
|
||||
```
|
||||
|
||||
|
||||
|
||||
@@ -10,7 +10,9 @@ Method | HTTP request | Description
|
||||
[**place_order**](StoreApi.md#place_order) | **POST** /store/order | Place an order for a pet
|
||||
|
||||
|
||||
# **delete_order**
|
||||
|
||||
## delete_order
|
||||
|
||||
> delete_order(order_id)
|
||||
|
||||
Delete purchase order by ID
|
||||
@@ -18,6 +20,7 @@ Delete purchase order by ID
|
||||
For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
|
||||
|
||||
### Example
|
||||
|
||||
```ruby
|
||||
# load the gem
|
||||
require 'petstore'
|
||||
@@ -35,6 +38,7 @@ end
|
||||
|
||||
### Parameters
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**order_id** | **String**| ID of the order that needs to be deleted |
|
||||
@@ -49,12 +53,12 @@ No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: Not defined
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: Not defined
|
||||
|
||||
|
||||
## get_inventory
|
||||
|
||||
# **get_inventory**
|
||||
> Hash<String, Integer> get_inventory
|
||||
|
||||
Returns pet inventories by status
|
||||
@@ -62,6 +66,7 @@ Returns pet inventories by status
|
||||
Returns a map of status codes to quantities
|
||||
|
||||
### Example
|
||||
|
||||
```ruby
|
||||
# load the gem
|
||||
require 'petstore'
|
||||
@@ -85,6 +90,7 @@ end
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
This endpoint does not need any parameter.
|
||||
|
||||
### Return type
|
||||
@@ -97,12 +103,12 @@ This endpoint does not need any parameter.
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json
|
||||
|
||||
|
||||
## get_order_by_id
|
||||
|
||||
# **get_order_by_id**
|
||||
> Order get_order_by_id(order_id)
|
||||
|
||||
Find purchase order by ID
|
||||
@@ -110,6 +116,7 @@ Find purchase order by ID
|
||||
For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
|
||||
|
||||
### Example
|
||||
|
||||
```ruby
|
||||
# load the gem
|
||||
require 'petstore'
|
||||
@@ -128,6 +135,7 @@ end
|
||||
|
||||
### Parameters
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**order_id** | **Integer**| ID of pet that needs to be fetched |
|
||||
@@ -142,27 +150,28 @@ No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
|
||||
## place_order
|
||||
|
||||
# **place_order**
|
||||
> Order place_order(order)
|
||||
> Order place_order(body)
|
||||
|
||||
Place an order for a pet
|
||||
|
||||
### Example
|
||||
|
||||
```ruby
|
||||
# load the gem
|
||||
require 'petstore'
|
||||
|
||||
api_instance = Petstore::StoreApi.new
|
||||
order = Petstore::Order.new # Order | order placed for purchasing the pet
|
||||
body = Petstore::Order.new # Order | order placed for purchasing the pet
|
||||
|
||||
begin
|
||||
#Place an order for a pet
|
||||
result = api_instance.place_order(order)
|
||||
result = api_instance.place_order(body)
|
||||
p result
|
||||
rescue Petstore::ApiError => e
|
||||
puts "Exception when calling StoreApi->place_order: #{e}"
|
||||
@@ -171,9 +180,10 @@ end
|
||||
|
||||
### Parameters
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**order** | [**Order**](Order.md)| order placed for purchasing the pet |
|
||||
**body** | [**Order**](Order.md)| order placed for purchasing the pet |
|
||||
|
||||
### Return type
|
||||
|
||||
@@ -185,8 +195,6 @@ No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
|
||||
@@ -1,9 +1,19 @@
|
||||
# Petstore::Tag
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**id** | **Integer** | | [optional]
|
||||
**name** | **String** | | [optional]
|
||||
|
||||
## Code Sample
|
||||
|
||||
```ruby
|
||||
require 'Petstore'
|
||||
|
||||
instance = Petstore::Tag.new(id: null,
|
||||
name: null)
|
||||
```
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
# Petstore::TypeHolderDefault
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**string_item** | **String** | | [default to 'what']
|
||||
**number_item** | **Float** | |
|
||||
**integer_item** | **Integer** | |
|
||||
**bool_item** | **Boolean** | | [default to true]
|
||||
**array_item** | **Array<Integer>** | |
|
||||
|
||||
## Code Sample
|
||||
|
||||
```ruby
|
||||
require 'Petstore'
|
||||
|
||||
instance = Petstore::TypeHolderDefault.new(string_item: null,
|
||||
number_item: null,
|
||||
integer_item: null,
|
||||
bool_item: null,
|
||||
array_item: null)
|
||||
```
|
||||
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
# Petstore::TypeHolderExample
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**string_item** | **String** | |
|
||||
**number_item** | **Float** | |
|
||||
**integer_item** | **Integer** | |
|
||||
**bool_item** | **Boolean** | |
|
||||
**array_item** | **Array<Integer>** | |
|
||||
|
||||
## Code Sample
|
||||
|
||||
```ruby
|
||||
require 'Petstore'
|
||||
|
||||
instance = Petstore::TypeHolderExample.new(string_item: what,
|
||||
number_item: 1.234,
|
||||
integer_item: -2,
|
||||
bool_item: true,
|
||||
array_item: [0, 1, 2, 3])
|
||||
```
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
# Petstore::User
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**id** | **Integer** | | [optional]
|
||||
@@ -12,4 +13,19 @@ Name | Type | Description | Notes
|
||||
**phone** | **String** | | [optional]
|
||||
**user_status** | **Integer** | User Status | [optional]
|
||||
|
||||
## Code Sample
|
||||
|
||||
```ruby
|
||||
require 'Petstore'
|
||||
|
||||
instance = Petstore::User.new(id: null,
|
||||
username: null,
|
||||
first_name: null,
|
||||
last_name: null,
|
||||
email: null,
|
||||
password: null,
|
||||
phone: null,
|
||||
user_status: null)
|
||||
```
|
||||
|
||||
|
||||
|
||||
@@ -14,24 +14,27 @@ Method | HTTP request | Description
|
||||
[**update_user**](UserApi.md#update_user) | **PUT** /user/{username} | Updated user
|
||||
|
||||
|
||||
# **create_user**
|
||||
> create_user(user)
|
||||
|
||||
## create_user
|
||||
|
||||
> create_user(body)
|
||||
|
||||
Create user
|
||||
|
||||
This can only be done by the logged in user.
|
||||
|
||||
### Example
|
||||
|
||||
```ruby
|
||||
# load the gem
|
||||
require 'petstore'
|
||||
|
||||
api_instance = Petstore::UserApi.new
|
||||
user = Petstore::User.new # User | Created user object
|
||||
body = Petstore::User.new # User | Created user object
|
||||
|
||||
begin
|
||||
#Create user
|
||||
api_instance.create_user(user)
|
||||
api_instance.create_user(body)
|
||||
rescue Petstore::ApiError => e
|
||||
puts "Exception when calling UserApi->create_user: #{e}"
|
||||
end
|
||||
@@ -39,9 +42,10 @@ end
|
||||
|
||||
### Parameters
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**user** | [**User**](User.md)| Created user object |
|
||||
**body** | [**User**](User.md)| Created user object |
|
||||
|
||||
### Return type
|
||||
|
||||
@@ -53,27 +57,28 @@ No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: Not defined
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: Not defined
|
||||
|
||||
|
||||
## create_users_with_array_input
|
||||
|
||||
# **create_users_with_array_input**
|
||||
> create_users_with_array_input(user)
|
||||
> create_users_with_array_input(body)
|
||||
|
||||
Creates list of users with given input array
|
||||
|
||||
### Example
|
||||
|
||||
```ruby
|
||||
# load the gem
|
||||
require 'petstore'
|
||||
|
||||
api_instance = Petstore::UserApi.new
|
||||
user = nil # Array<User> | List of user object
|
||||
body = [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(user)
|
||||
api_instance.create_users_with_array_input(body)
|
||||
rescue Petstore::ApiError => e
|
||||
puts "Exception when calling UserApi->create_users_with_array_input: #{e}"
|
||||
end
|
||||
@@ -81,9 +86,10 @@ end
|
||||
|
||||
### Parameters
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**user** | [**Array<User>**](Array.md)| List of user object |
|
||||
**body** | [**Array<User>**](User.md)| List of user object |
|
||||
|
||||
### Return type
|
||||
|
||||
@@ -95,27 +101,28 @@ No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: Not defined
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: Not defined
|
||||
|
||||
|
||||
## create_users_with_list_input
|
||||
|
||||
# **create_users_with_list_input**
|
||||
> create_users_with_list_input(user)
|
||||
> create_users_with_list_input(body)
|
||||
|
||||
Creates list of users with given input array
|
||||
|
||||
### Example
|
||||
|
||||
```ruby
|
||||
# load the gem
|
||||
require 'petstore'
|
||||
|
||||
api_instance = Petstore::UserApi.new
|
||||
user = nil # Array<User> | List of user object
|
||||
body = [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(user)
|
||||
api_instance.create_users_with_list_input(body)
|
||||
rescue Petstore::ApiError => e
|
||||
puts "Exception when calling UserApi->create_users_with_list_input: #{e}"
|
||||
end
|
||||
@@ -123,9 +130,10 @@ end
|
||||
|
||||
### Parameters
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**user** | [**Array<User>**](Array.md)| List of user object |
|
||||
**body** | [**Array<User>**](User.md)| List of user object |
|
||||
|
||||
### Return type
|
||||
|
||||
@@ -137,12 +145,12 @@ No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: Not defined
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: Not defined
|
||||
|
||||
|
||||
## delete_user
|
||||
|
||||
# **delete_user**
|
||||
> delete_user(username)
|
||||
|
||||
Delete user
|
||||
@@ -150,6 +158,7 @@ Delete user
|
||||
This can only be done by the logged in user.
|
||||
|
||||
### Example
|
||||
|
||||
```ruby
|
||||
# load the gem
|
||||
require 'petstore'
|
||||
@@ -167,6 +176,7 @@ end
|
||||
|
||||
### Parameters
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**username** | **String**| The name that needs to be deleted |
|
||||
@@ -181,17 +191,18 @@ No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: Not defined
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: Not defined
|
||||
|
||||
|
||||
## get_user_by_name
|
||||
|
||||
# **get_user_by_name**
|
||||
> User get_user_by_name(username)
|
||||
|
||||
Get user by user name
|
||||
|
||||
### Example
|
||||
|
||||
```ruby
|
||||
# load the gem
|
||||
require 'petstore'
|
||||
@@ -210,6 +221,7 @@ end
|
||||
|
||||
### Parameters
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**username** | **String**| The name that needs to be fetched. Use user1 for testing. |
|
||||
@@ -224,17 +236,18 @@ No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
|
||||
## login_user
|
||||
|
||||
# **login_user**
|
||||
> String login_user(username, password)
|
||||
|
||||
Logs user into the system
|
||||
|
||||
### Example
|
||||
|
||||
```ruby
|
||||
# load the gem
|
||||
require 'petstore'
|
||||
@@ -254,6 +267,7 @@ end
|
||||
|
||||
### Parameters
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**username** | **String**| The user name for login |
|
||||
@@ -269,17 +283,18 @@ No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
|
||||
## logout_user
|
||||
|
||||
# **logout_user**
|
||||
> logout_user
|
||||
|
||||
Logs out current logged in user session
|
||||
|
||||
### Example
|
||||
|
||||
```ruby
|
||||
# load the gem
|
||||
require 'petstore'
|
||||
@@ -295,6 +310,7 @@ end
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
This endpoint does not need any parameter.
|
||||
|
||||
### Return type
|
||||
@@ -307,30 +323,31 @@ No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: Not defined
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: Not defined
|
||||
|
||||
|
||||
## update_user
|
||||
|
||||
# **update_user**
|
||||
> update_user(username, user)
|
||||
> update_user(username, body)
|
||||
|
||||
Updated user
|
||||
|
||||
This can only be done by the logged in user.
|
||||
|
||||
### Example
|
||||
|
||||
```ruby
|
||||
# load the gem
|
||||
require 'petstore'
|
||||
|
||||
api_instance = Petstore::UserApi.new
|
||||
username = 'username_example' # String | name that need to be deleted
|
||||
user = Petstore::User.new # User | Updated user object
|
||||
body = Petstore::User.new # User | Updated user object
|
||||
|
||||
begin
|
||||
#Updated user
|
||||
api_instance.update_user(username, user)
|
||||
api_instance.update_user(username, body)
|
||||
rescue Petstore::ApiError => e
|
||||
puts "Exception when calling UserApi->update_user: #{e}"
|
||||
end
|
||||
@@ -338,10 +355,11 @@ end
|
||||
|
||||
### Parameters
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**username** | **String**| name that need to be deleted |
|
||||
**user** | [**User**](User.md)| Updated user object |
|
||||
**body** | [**User**](User.md)| Updated user object |
|
||||
|
||||
### Return type
|
||||
|
||||
@@ -353,8 +371,6 @@ No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: Not defined
|
||||
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: Not defined
|
||||
|
||||
|
||||
73
samples/client/petstore/ruby-faraday/docs/XmlItem.md
Normal file
73
samples/client/petstore/ruby-faraday/docs/XmlItem.md
Normal file
@@ -0,0 +1,73 @@
|
||||
# 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<Integer>** | | [optional]
|
||||
**name_string** | **String** | | [optional]
|
||||
**name_number** | **Float** | | [optional]
|
||||
**name_integer** | **Integer** | | [optional]
|
||||
**name_boolean** | **Boolean** | | [optional]
|
||||
**name_array** | **Array<Integer>** | | [optional]
|
||||
**name_wrapped_array** | **Array<Integer>** | | [optional]
|
||||
**prefix_string** | **String** | | [optional]
|
||||
**prefix_number** | **Float** | | [optional]
|
||||
**prefix_integer** | **Integer** | | [optional]
|
||||
**prefix_boolean** | **Boolean** | | [optional]
|
||||
**prefix_array** | **Array<Integer>** | | [optional]
|
||||
**prefix_wrapped_array** | **Array<Integer>** | | [optional]
|
||||
**namespace_string** | **String** | | [optional]
|
||||
**namespace_number** | **Float** | | [optional]
|
||||
**namespace_integer** | **Integer** | | [optional]
|
||||
**namespace_boolean** | **Boolean** | | [optional]
|
||||
**namespace_array** | **Array<Integer>** | | [optional]
|
||||
**namespace_wrapped_array** | **Array<Integer>** | | [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<Integer>** | | [optional]
|
||||
**prefix_ns_wrapped_array** | **Array<Integer>** | | [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)
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user