mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-12-11 18:02:44 +00:00
Generate a ruby-client sample for OpenAPI 2.0 (#1482)
* Move output directory for bin/openapi3/ruby-client-petstore.sh $ git mv sample/client/petstore/ruby sample/openapi3/client/petstore/ruby-client * $ bin/ruby-client-petstore.sh * Run bin/ruby-client-petstore.sh in bin/utils/ensure-up-to-date
This commit is contained in:
committed by
William Cheng
parent
f58bd6d839
commit
b9949e1a8e
@@ -0,0 +1,9 @@
|
||||
# Petstore::AdditionalPropertiesClass
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**map_property** | **Hash<String, String>** | | [optional]
|
||||
**map_of_map_property** | **Hash<String, Hash<String, String>>** | | [optional]
|
||||
|
||||
|
||||
9
samples/openapi3/client/petstore/ruby/docs/Animal.md
Normal file
9
samples/openapi3/client/petstore/ruby/docs/Animal.md
Normal file
@@ -0,0 +1,9 @@
|
||||
# Petstore::Animal
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**class_name** | **String** | |
|
||||
**color** | **String** | | [optional] [default to 'red']
|
||||
|
||||
|
||||
7
samples/openapi3/client/petstore/ruby/docs/AnimalFarm.md
Normal file
7
samples/openapi3/client/petstore/ruby/docs/AnimalFarm.md
Normal file
@@ -0,0 +1,7 @@
|
||||
# Petstore::AnimalFarm
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
|
||||
|
||||
54
samples/openapi3/client/petstore/ruby/docs/AnotherFakeApi.md
Normal file
54
samples/openapi3/client/petstore/ruby/docs/AnotherFakeApi.md
Normal file
@@ -0,0 +1,54 @@
|
||||
# Petstore::AnotherFakeApi
|
||||
|
||||
All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
|
||||
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)
|
||||
|
||||
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
|
||||
|
||||
begin
|
||||
#To test special tags
|
||||
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}"
|
||||
end
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**client** | [**Client**](Client.md)| client model |
|
||||
|
||||
### Return type
|
||||
|
||||
[**Client**](Client.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: application/json
|
||||
|
||||
|
||||
|
||||
10
samples/openapi3/client/petstore/ruby/docs/ApiResponse.md
Normal file
10
samples/openapi3/client/petstore/ruby/docs/ApiResponse.md
Normal file
@@ -0,0 +1,10 @@
|
||||
# Petstore::ApiResponse
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**code** | **Integer** | | [optional]
|
||||
**type** | **String** | | [optional]
|
||||
**message** | **String** | | [optional]
|
||||
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
# Petstore::ArrayOfArrayOfNumberOnly
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**array_array_number** | **Array<Array<Float>>** | | [optional]
|
||||
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
# Petstore::ArrayOfNumberOnly
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**array_number** | **Array<Float>** | | [optional]
|
||||
|
||||
|
||||
10
samples/openapi3/client/petstore/ruby/docs/ArrayTest.md
Normal file
10
samples/openapi3/client/petstore/ruby/docs/ArrayTest.md
Normal file
@@ -0,0 +1,10 @@
|
||||
# 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]
|
||||
|
||||
|
||||
13
samples/openapi3/client/petstore/ruby/docs/Capitalization.md
Normal file
13
samples/openapi3/client/petstore/ruby/docs/Capitalization.md
Normal file
@@ -0,0 +1,13 @@
|
||||
# Petstore::Capitalization
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**small_camel** | **String** | | [optional]
|
||||
**capital_camel** | **String** | | [optional]
|
||||
**small_snake** | **String** | | [optional]
|
||||
**capital_snake** | **String** | | [optional]
|
||||
**sca_eth_flow_points** | **String** | | [optional]
|
||||
**att_name** | **String** | Name of the pet | [optional]
|
||||
|
||||
|
||||
10
samples/openapi3/client/petstore/ruby/docs/Cat.md
Normal file
10
samples/openapi3/client/petstore/ruby/docs/Cat.md
Normal file
@@ -0,0 +1,10 @@
|
||||
# Petstore::Cat
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**class_name** | **String** | |
|
||||
**color** | **String** | | [optional] [default to 'red']
|
||||
**declawed** | **BOOLEAN** | | [optional]
|
||||
|
||||
|
||||
9
samples/openapi3/client/petstore/ruby/docs/Category.md
Normal file
9
samples/openapi3/client/petstore/ruby/docs/Category.md
Normal file
@@ -0,0 +1,9 @@
|
||||
# Petstore::Category
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**id** | **Integer** | | [optional]
|
||||
**name** | **String** | | [default to 'default-name']
|
||||
|
||||
|
||||
8
samples/openapi3/client/petstore/ruby/docs/ClassModel.md
Normal file
8
samples/openapi3/client/petstore/ruby/docs/ClassModel.md
Normal file
@@ -0,0 +1,8 @@
|
||||
# Petstore::ClassModel
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**_class** | **String** | | [optional]
|
||||
|
||||
|
||||
8
samples/openapi3/client/petstore/ruby/docs/Client.md
Normal file
8
samples/openapi3/client/petstore/ruby/docs/Client.md
Normal file
@@ -0,0 +1,8 @@
|
||||
# Petstore::Client
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**client** | **String** | | [optional]
|
||||
|
||||
|
||||
47
samples/openapi3/client/petstore/ruby/docs/DefaultApi.md
Normal file
47
samples/openapi3/client/petstore/ruby/docs/DefaultApi.md
Normal file
@@ -0,0 +1,47 @@
|
||||
# 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
|
||||
|
||||
|
||||
|
||||
10
samples/openapi3/client/petstore/ruby/docs/Dog.md
Normal file
10
samples/openapi3/client/petstore/ruby/docs/Dog.md
Normal file
@@ -0,0 +1,10 @@
|
||||
# Petstore::Dog
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**class_name** | **String** | |
|
||||
**color** | **String** | | [optional] [default to 'red']
|
||||
**breed** | **String** | | [optional]
|
||||
|
||||
|
||||
9
samples/openapi3/client/petstore/ruby/docs/EnumArrays.md
Normal file
9
samples/openapi3/client/petstore/ruby/docs/EnumArrays.md
Normal file
@@ -0,0 +1,9 @@
|
||||
# Petstore::EnumArrays
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**just_symbol** | **String** | | [optional]
|
||||
**array_enum** | **Array<String>** | | [optional]
|
||||
|
||||
|
||||
7
samples/openapi3/client/petstore/ruby/docs/EnumClass.md
Normal file
7
samples/openapi3/client/petstore/ruby/docs/EnumClass.md
Normal file
@@ -0,0 +1,7 @@
|
||||
# Petstore::EnumClass
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
|
||||
|
||||
12
samples/openapi3/client/petstore/ruby/docs/EnumTest.md
Normal file
12
samples/openapi3/client/petstore/ruby/docs/EnumTest.md
Normal file
@@ -0,0 +1,12 @@
|
||||
# Petstore::EnumTest
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**enum_string** | **String** | | [optional]
|
||||
**enum_string_required** | **String** | |
|
||||
**enum_integer** | **Integer** | | [optional]
|
||||
**enum_number** | **Float** | | [optional]
|
||||
**outer_enum** | [**OuterEnum**](OuterEnum.md) | | [optional]
|
||||
|
||||
|
||||
615
samples/openapi3/client/petstore/ruby/docs/FakeApi.md
Normal file
615
samples/openapi3/client/petstore/ruby/docs/FakeApi.md
Normal file
@@ -0,0 +1,615 @@
|
||||
# Petstore::FakeApi
|
||||
|
||||
All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
[**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 |
|
||||
[**fake_outer_string_serialize**](FakeApi.md#fake_outer_string_serialize) | **POST** /fake/outer/string |
|
||||
[**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_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
|
||||
[**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)
|
||||
|
||||
|
||||
|
||||
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
|
||||
}
|
||||
|
||||
begin
|
||||
result = api_instance.fake_outer_boolean_serialize(opts)
|
||||
p result
|
||||
rescue Petstore::ApiError => e
|
||||
puts "Exception when calling FakeApi->fake_outer_boolean_serialize: #{e}"
|
||||
end
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**body** | **BOOLEAN**| Input boolean as post body | [optional]
|
||||
|
||||
### Return type
|
||||
|
||||
**BOOLEAN**
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: */*
|
||||
|
||||
|
||||
|
||||
# **fake_outer_composite_serialize**
|
||||
> OuterComposite fake_outer_composite_serialize(opts)
|
||||
|
||||
|
||||
|
||||
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
|
||||
}
|
||||
|
||||
begin
|
||||
result = api_instance.fake_outer_composite_serialize(opts)
|
||||
p result
|
||||
rescue Petstore::ApiError => e
|
||||
puts "Exception when calling FakeApi->fake_outer_composite_serialize: #{e}"
|
||||
end
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**outer_composite** | [**OuterComposite**](OuterComposite.md)| Input composite as post body | [optional]
|
||||
|
||||
### Return type
|
||||
|
||||
[**OuterComposite**](OuterComposite.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: */*
|
||||
|
||||
|
||||
|
||||
# **fake_outer_number_serialize**
|
||||
> Float fake_outer_number_serialize(opts)
|
||||
|
||||
|
||||
|
||||
Test serialization of outer number types
|
||||
|
||||
### Example
|
||||
```ruby
|
||||
# load the gem
|
||||
require 'petstore'
|
||||
|
||||
api_instance = Petstore::FakeApi.new
|
||||
opts = {
|
||||
body: 3.4 # Float | Input number as post body
|
||||
}
|
||||
|
||||
begin
|
||||
result = api_instance.fake_outer_number_serialize(opts)
|
||||
p result
|
||||
rescue Petstore::ApiError => e
|
||||
puts "Exception when calling FakeApi->fake_outer_number_serialize: #{e}"
|
||||
end
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**body** | **Float**| Input number as post body | [optional]
|
||||
|
||||
### Return type
|
||||
|
||||
**Float**
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: */*
|
||||
|
||||
|
||||
|
||||
# **fake_outer_string_serialize**
|
||||
> String fake_outer_string_serialize(opts)
|
||||
|
||||
|
||||
|
||||
Test serialization of outer string types
|
||||
|
||||
### Example
|
||||
```ruby
|
||||
# load the gem
|
||||
require 'petstore'
|
||||
|
||||
api_instance = Petstore::FakeApi.new
|
||||
opts = {
|
||||
body: 'body_example' # String | Input string as post body
|
||||
}
|
||||
|
||||
begin
|
||||
result = api_instance.fake_outer_string_serialize(opts)
|
||||
p result
|
||||
rescue Petstore::ApiError => e
|
||||
puts "Exception when calling FakeApi->fake_outer_string_serialize: #{e}"
|
||||
end
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**body** | **String**| Input string as post body | [optional]
|
||||
|
||||
### Return type
|
||||
|
||||
**String**
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: */*
|
||||
|
||||
|
||||
|
||||
# **test_body_with_file_schema**
|
||||
> test_body_with_file_schema(file_schema_test_class)
|
||||
|
||||
|
||||
|
||||
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 |
|
||||
|
||||
begin
|
||||
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
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**file_schema_test_class** | [**FileSchemaTestClass**](FileSchemaTestClass.md)| |
|
||||
|
||||
### Return type
|
||||
|
||||
nil (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: Not defined
|
||||
|
||||
|
||||
|
||||
# **test_body_with_query_params**
|
||||
> test_body_with_query_params(query, user)
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
```ruby
|
||||
# load the gem
|
||||
require 'petstore'
|
||||
|
||||
api_instance = Petstore::FakeApi.new
|
||||
query = 'query_example' # String |
|
||||
user = Petstore::User.new # User |
|
||||
|
||||
begin
|
||||
api_instance.test_body_with_query_params(query, user)
|
||||
rescue Petstore::ApiError => e
|
||||
puts "Exception when calling FakeApi->test_body_with_query_params: #{e}"
|
||||
end
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**query** | **String**| |
|
||||
**user** | [**User**](User.md)| |
|
||||
|
||||
### Return type
|
||||
|
||||
nil (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: Not defined
|
||||
|
||||
|
||||
|
||||
# **test_client_model**
|
||||
> Client test_client_model(client)
|
||||
|
||||
To test \"client\" model
|
||||
|
||||
To test \"client\" model
|
||||
|
||||
### Example
|
||||
```ruby
|
||||
# load the gem
|
||||
require 'petstore'
|
||||
|
||||
api_instance = Petstore::FakeApi.new
|
||||
client = Petstore::Client.new # Client | client model
|
||||
|
||||
begin
|
||||
#To test \"client\" model
|
||||
result = api_instance.test_client_model(client)
|
||||
p result
|
||||
rescue Petstore::ApiError => e
|
||||
puts "Exception when calling FakeApi->test_client_model: #{e}"
|
||||
end
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**client** | [**Client**](Client.md)| client model |
|
||||
|
||||
### Return type
|
||||
|
||||
[**Client**](Client.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: application/json
|
||||
|
||||
|
||||
|
||||
# **test_endpoint_parameters**
|
||||
> test_endpoint_parameters(number, double, pattern_without_delimiter, byte, opts)
|
||||
|
||||
Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||
|
||||
Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||
|
||||
### Example
|
||||
```ruby
|
||||
# load the gem
|
||||
require 'petstore'
|
||||
# setup authorization
|
||||
Petstore.configure do |config|
|
||||
# Configure HTTP basic authorization: http_basic_test
|
||||
config.username = 'YOUR USERNAME'
|
||||
config.password = 'YOUR PASSWORD'
|
||||
end
|
||||
|
||||
api_instance = Petstore::FakeApi.new
|
||||
number = 3.4 # Float | None
|
||||
double = 3.4 # Float | None
|
||||
pattern_without_delimiter = 'pattern_without_delimiter_example' # String | None
|
||||
byte = 'byte_example' # String | None
|
||||
opts = {
|
||||
integer: 56, # Integer | None
|
||||
int32: 56, # Integer | None
|
||||
int64: 56, # Integer | None
|
||||
float: 3.4, # Float | None
|
||||
string: 'string_example', # String | None
|
||||
binary: File.new('/path/to/file'), # File | None
|
||||
date: Date.parse('2013-10-20'), # Date | None
|
||||
date_time: DateTime.parse('2013-10-20T19:20:30+01:00'), # DateTime | None
|
||||
password: 'password_example', # String | None
|
||||
callback: 'callback_example' # String | None
|
||||
}
|
||||
|
||||
begin
|
||||
#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}"
|
||||
end
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**number** | **Float**| None |
|
||||
**double** | **Float**| None |
|
||||
**pattern_without_delimiter** | **String**| None |
|
||||
**byte** | **String**| None |
|
||||
**integer** | **Integer**| None | [optional]
|
||||
**int32** | **Integer**| None | [optional]
|
||||
**int64** | **Integer**| None | [optional]
|
||||
**float** | **Float**| None | [optional]
|
||||
**string** | **String**| None | [optional]
|
||||
**binary** | **File**| None | [optional]
|
||||
**date** | **Date**| None | [optional]
|
||||
**date_time** | **DateTime**| None | [optional]
|
||||
**password** | **String**| None | [optional]
|
||||
**callback** | **String**| None | [optional]
|
||||
|
||||
### Return type
|
||||
|
||||
nil (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
[http_basic_test](../README.md#http_basic_test)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/x-www-form-urlencoded
|
||||
- **Accept**: Not defined
|
||||
|
||||
|
||||
|
||||
# **test_enum_parameters**
|
||||
> test_enum_parameters(opts)
|
||||
|
||||
To test enum parameters
|
||||
|
||||
To test enum parameters
|
||||
|
||||
### Example
|
||||
```ruby
|
||||
# load the gem
|
||||
require 'petstore'
|
||||
|
||||
api_instance = Petstore::FakeApi.new
|
||||
opts = {
|
||||
enum_header_string_array: ['enum_header_string_array_example'], # Array<String> | Header parameter enum test (string array)
|
||||
enum_header_string: '-efg', # String | Header parameter enum test (string)
|
||||
enum_query_string_array: ['enum_query_string_array_example'], # Array<String> | Query parameter enum test (string array)
|
||||
enum_query_string: '-efg', # String | Query parameter enum test (string)
|
||||
enum_query_integer: 56, # Integer | Query parameter enum test (double)
|
||||
enum_query_double: 3.4, # Float | Query parameter enum test (double)
|
||||
enum_form_string_array: '$', # Array<String> | Form parameter enum test (string array)
|
||||
enum_form_string: '-efg' # String | Form parameter enum test (string)
|
||||
}
|
||||
|
||||
begin
|
||||
#To test enum parameters
|
||||
api_instance.test_enum_parameters(opts)
|
||||
rescue Petstore::ApiError => e
|
||||
puts "Exception when calling FakeApi->test_enum_parameters: #{e}"
|
||||
end
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**enum_header_string_array** | [**Array<String>**](String.md)| Header parameter enum test (string array) | [optional]
|
||||
**enum_header_string** | **String**| Header parameter enum test (string) | [optional] [default to '-efg']
|
||||
**enum_query_string_array** | [**Array<String>**](String.md)| Query parameter enum test (string array) | [optional]
|
||||
**enum_query_string** | **String**| Query parameter enum test (string) | [optional] [default to '-efg']
|
||||
**enum_query_integer** | **Integer**| Query parameter enum test (double) | [optional]
|
||||
**enum_query_double** | **Float**| Query parameter enum test (double) | [optional]
|
||||
**enum_form_string_array** | [**Array<String>**](String.md)| Form parameter enum test (string array) | [optional] [default to '$']
|
||||
**enum_form_string** | **String**| Form parameter enum test (string) | [optional] [default to '-efg']
|
||||
|
||||
### Return type
|
||||
|
||||
nil (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/x-www-form-urlencoded
|
||||
- **Accept**: Not defined
|
||||
|
||||
|
||||
|
||||
# **test_group_parameters**
|
||||
> test_group_parameters(required_string_group, required_boolean_group, required_int64_group, opts)
|
||||
|
||||
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_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
|
||||
int64_group: 56 # Integer | Integer in group parameters
|
||||
}
|
||||
|
||||
begin
|
||||
#Fake endpoint to test group parameters (optional)
|
||||
api_instance.test_group_parameters(required_string_group, required_boolean_group, required_int64_group, opts)
|
||||
rescue Petstore::ApiError => e
|
||||
puts "Exception when calling FakeApi->test_group_parameters: #{e}"
|
||||
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_int64_group** | **Integer**| Required Integer in group parameters |
|
||||
**string_group** | **Integer**| String in group parameters | [optional]
|
||||
**boolean_group** | **BOOLEAN**| Boolean in group parameters | [optional]
|
||||
**int64_group** | **Integer**| Integer in group parameters | [optional]
|
||||
|
||||
### Return type
|
||||
|
||||
nil (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: Not defined
|
||||
|
||||
|
||||
|
||||
# **test_inline_additional_properties**
|
||||
> test_inline_additional_properties(request_body)
|
||||
|
||||
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
|
||||
|
||||
begin
|
||||
#test inline additionalProperties
|
||||
api_instance.test_inline_additional_properties(request_body)
|
||||
rescue Petstore::ApiError => e
|
||||
puts "Exception when calling FakeApi->test_inline_additional_properties: #{e}"
|
||||
end
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**request_body** | [**Hash<String, String>**](String.md)| request body |
|
||||
|
||||
### Return type
|
||||
|
||||
nil (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: Not defined
|
||||
|
||||
|
||||
|
||||
# **test_json_form_data**
|
||||
> test_json_form_data(param, param2)
|
||||
|
||||
test json serialization of form data
|
||||
|
||||
### Example
|
||||
```ruby
|
||||
# load the gem
|
||||
require 'petstore'
|
||||
|
||||
api_instance = Petstore::FakeApi.new
|
||||
param = 'param_example' # String | field1
|
||||
param2 = 'param2_example' # String | field2
|
||||
|
||||
begin
|
||||
#test json serialization of form data
|
||||
api_instance.test_json_form_data(param, param2)
|
||||
rescue Petstore::ApiError => e
|
||||
puts "Exception when calling FakeApi->test_json_form_data: #{e}"
|
||||
end
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**param** | **String**| field1 |
|
||||
**param2** | **String**| field2 |
|
||||
|
||||
### Return type
|
||||
|
||||
nil (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/x-www-form-urlencoded
|
||||
- **Accept**: Not defined
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,61 @@
|
||||
# Petstore::FakeClassnameTags123Api
|
||||
|
||||
All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
|
||||
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)
|
||||
|
||||
To test class name in snake case
|
||||
|
||||
To test class name in snake case
|
||||
|
||||
### Example
|
||||
```ruby
|
||||
# load the gem
|
||||
require 'petstore'
|
||||
# setup authorization
|
||||
Petstore.configure do |config|
|
||||
# Configure API key authorization: api_key_query
|
||||
config.api_key['api_key_query'] = 'YOUR API KEY'
|
||||
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
||||
#config.api_key_prefix['api_key_query'] = 'Bearer'
|
||||
end
|
||||
|
||||
api_instance = Petstore::FakeClassnameTags123Api.new
|
||||
client = Petstore::Client.new # Client | client model
|
||||
|
||||
begin
|
||||
#To test class name in snake case
|
||||
result = api_instance.test_classname(client)
|
||||
p result
|
||||
rescue Petstore::ApiError => e
|
||||
puts "Exception when calling FakeClassnameTags123Api->test_classname: #{e}"
|
||||
end
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**client** | [**Client**](Client.md)| client model |
|
||||
|
||||
### Return type
|
||||
|
||||
[**Client**](Client.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[api_key_query](../README.md#api_key_query)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: application/json
|
||||
|
||||
|
||||
|
||||
8
samples/openapi3/client/petstore/ruby/docs/File.md
Normal file
8
samples/openapi3/client/petstore/ruby/docs/File.md
Normal file
@@ -0,0 +1,8 @@
|
||||
# Petstore::File
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**source_uri** | **String** | Test capitalization | [optional]
|
||||
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
# Petstore::FileSchemaTestClass
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**file** | **File** | | [optional]
|
||||
**files** | **Array<File>** | | [optional]
|
||||
|
||||
|
||||
8
samples/openapi3/client/petstore/ruby/docs/Foo.md
Normal file
8
samples/openapi3/client/petstore/ruby/docs/Foo.md
Normal file
@@ -0,0 +1,8 @@
|
||||
# Petstore::Foo
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**bar** | **String** | | [optional] [default to 'bar']
|
||||
|
||||
|
||||
22
samples/openapi3/client/petstore/ruby/docs/FormatTest.md
Normal file
22
samples/openapi3/client/petstore/ruby/docs/FormatTest.md
Normal file
@@ -0,0 +1,22 @@
|
||||
# Petstore::FormatTest
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**integer** | **Integer** | | [optional]
|
||||
**int32** | **Integer** | | [optional]
|
||||
**int64** | **Integer** | | [optional]
|
||||
**number** | **Float** | |
|
||||
**float** | **Float** | | [optional]
|
||||
**double** | **Float** | | [optional]
|
||||
**string** | **String** | | [optional]
|
||||
**byte** | **String** | |
|
||||
**binary** | **File** | | [optional]
|
||||
**date** | **Date** | |
|
||||
**date_time** | **DateTime** | | [optional]
|
||||
**uuid** | **String** | | [optional]
|
||||
**password** | **String** | |
|
||||
**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 'image_' (case insensitive) and one to three digits following i.e. Image_01. | [optional]
|
||||
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
# Petstore::HasOnlyReadOnly
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**bar** | **String** | | [optional]
|
||||
**foo** | **String** | | [optional]
|
||||
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
# Petstore::InlineResponseDefault
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**string** | [**Foo**](Foo.md) | | [optional]
|
||||
|
||||
|
||||
8
samples/openapi3/client/petstore/ruby/docs/List.md
Normal file
8
samples/openapi3/client/petstore/ruby/docs/List.md
Normal file
@@ -0,0 +1,8 @@
|
||||
# Petstore::List
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**_123_list** | **String** | | [optional]
|
||||
|
||||
|
||||
11
samples/openapi3/client/petstore/ruby/docs/MapTest.md
Normal file
11
samples/openapi3/client/petstore/ruby/docs/MapTest.md
Normal file
@@ -0,0 +1,11 @@
|
||||
# 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]
|
||||
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
# Petstore::MixedPropertiesAndAdditionalPropertiesClass
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**uuid** | **String** | | [optional]
|
||||
**date_time** | **DateTime** | | [optional]
|
||||
**map** | [**Hash<String, Animal>**](Animal.md) | | [optional]
|
||||
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
# Petstore::Model200Response
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**name** | **Integer** | | [optional]
|
||||
**_class** | **String** | | [optional]
|
||||
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
# Petstore::ModelReturn
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**_return** | **Integer** | | [optional]
|
||||
|
||||
|
||||
11
samples/openapi3/client/petstore/ruby/docs/Name.md
Normal file
11
samples/openapi3/client/petstore/ruby/docs/Name.md
Normal file
@@ -0,0 +1,11 @@
|
||||
# Petstore::Name
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**name** | **Integer** | |
|
||||
**snake_case** | **Integer** | | [optional]
|
||||
**property** | **String** | | [optional]
|
||||
**_123_number** | **Integer** | | [optional]
|
||||
|
||||
|
||||
8
samples/openapi3/client/petstore/ruby/docs/NumberOnly.md
Normal file
8
samples/openapi3/client/petstore/ruby/docs/NumberOnly.md
Normal file
@@ -0,0 +1,8 @@
|
||||
# Petstore::NumberOnly
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**just_number** | **Float** | | [optional]
|
||||
|
||||
|
||||
13
samples/openapi3/client/petstore/ruby/docs/Order.md
Normal file
13
samples/openapi3/client/petstore/ruby/docs/Order.md
Normal file
@@ -0,0 +1,13 @@
|
||||
# Petstore::Order
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**id** | **Integer** | | [optional]
|
||||
**pet_id** | **Integer** | | [optional]
|
||||
**quantity** | **Integer** | | [optional]
|
||||
**ship_date** | **DateTime** | | [optional]
|
||||
**status** | **String** | Order Status | [optional]
|
||||
**complete** | **BOOLEAN** | | [optional] [default to false]
|
||||
|
||||
|
||||
10
samples/openapi3/client/petstore/ruby/docs/OuterComposite.md
Normal file
10
samples/openapi3/client/petstore/ruby/docs/OuterComposite.md
Normal file
@@ -0,0 +1,10 @@
|
||||
# Petstore::OuterComposite
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**my_number** | **Float** | | [optional]
|
||||
**my_string** | **String** | | [optional]
|
||||
**my_boolean** | **BOOLEAN** | | [optional]
|
||||
|
||||
|
||||
7
samples/openapi3/client/petstore/ruby/docs/OuterEnum.md
Normal file
7
samples/openapi3/client/petstore/ruby/docs/OuterEnum.md
Normal file
@@ -0,0 +1,7 @@
|
||||
# Petstore::OuterEnum
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
|
||||
|
||||
13
samples/openapi3/client/petstore/ruby/docs/Pet.md
Normal file
13
samples/openapi3/client/petstore/ruby/docs/Pet.md
Normal file
@@ -0,0 +1,13 @@
|
||||
# Petstore::Pet
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**id** | **Integer** | | [optional]
|
||||
**category** | [**Category**](Category.md) | | [optional]
|
||||
**name** | **String** | |
|
||||
**photo_urls** | **Array<String>** | |
|
||||
**tags** | [**Array<Tag>**](Tag.md) | | [optional]
|
||||
**status** | **String** | pet status in the store | [optional]
|
||||
|
||||
|
||||
475
samples/openapi3/client/petstore/ruby/docs/PetApi.md
Normal file
475
samples/openapi3/client/petstore/ruby/docs/PetApi.md
Normal file
@@ -0,0 +1,475 @@
|
||||
# Petstore::PetApi
|
||||
|
||||
All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
[**add_pet**](PetApi.md#add_pet) | **POST** /pet | Add a new pet to the store
|
||||
[**delete_pet**](PetApi.md#delete_pet) | **DELETE** /pet/{petId} | Deletes a pet
|
||||
[**find_pets_by_status**](PetApi.md#find_pets_by_status) | **GET** /pet/findByStatus | Finds Pets by status
|
||||
[**find_pets_by_tags**](PetApi.md#find_pets_by_tags) | **GET** /pet/findByTags | Finds Pets by tags
|
||||
[**get_pet_by_id**](PetApi.md#get_pet_by_id) | **GET** /pet/{petId} | Find pet by ID
|
||||
[**update_pet**](PetApi.md#update_pet) | **PUT** /pet | Update an existing pet
|
||||
[**update_pet_with_form**](PetApi.md#update_pet_with_form) | **POST** /pet/{petId} | Updates a pet in the store with form data
|
||||
[**upload_file**](PetApi.md#upload_file) | **POST** /pet/{petId}/uploadImage | uploads an image
|
||||
[**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 a new pet to the store
|
||||
|
||||
### Example
|
||||
```ruby
|
||||
# load the gem
|
||||
require 'petstore'
|
||||
# setup authorization
|
||||
Petstore.configure do |config|
|
||||
# Configure OAuth2 access token for authorization: petstore_auth
|
||||
config.access_token = 'YOUR ACCESS TOKEN'
|
||||
end
|
||||
|
||||
api_instance = Petstore::PetApi.new
|
||||
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(pet)
|
||||
rescue Petstore::ApiError => e
|
||||
puts "Exception when calling PetApi->add_pet: #{e}"
|
||||
end
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
|
||||
|
||||
### Return type
|
||||
|
||||
nil (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
[petstore_auth](../README.md#petstore_auth)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json, application/xml
|
||||
- **Accept**: Not defined
|
||||
|
||||
|
||||
|
||||
# **delete_pet**
|
||||
> delete_pet(pet_id, opts)
|
||||
|
||||
Deletes a pet
|
||||
|
||||
### Example
|
||||
```ruby
|
||||
# load the gem
|
||||
require 'petstore'
|
||||
# setup authorization
|
||||
Petstore.configure do |config|
|
||||
# Configure OAuth2 access token for authorization: petstore_auth
|
||||
config.access_token = 'YOUR ACCESS TOKEN'
|
||||
end
|
||||
|
||||
api_instance = Petstore::PetApi.new
|
||||
pet_id = 56 # Integer | Pet id to delete
|
||||
opts = {
|
||||
api_key: 'api_key_example' # String |
|
||||
}
|
||||
|
||||
begin
|
||||
#Deletes a pet
|
||||
api_instance.delete_pet(pet_id, opts)
|
||||
rescue Petstore::ApiError => e
|
||||
puts "Exception when calling PetApi->delete_pet: #{e}"
|
||||
end
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**pet_id** | **Integer**| Pet id to delete |
|
||||
**api_key** | **String**| | [optional]
|
||||
|
||||
### Return type
|
||||
|
||||
nil (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
[petstore_auth](../README.md#petstore_auth)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: Not defined
|
||||
|
||||
|
||||
|
||||
# **find_pets_by_status**
|
||||
> Array<Pet> find_pets_by_status(status)
|
||||
|
||||
Finds Pets by status
|
||||
|
||||
Multiple status values can be provided with comma separated strings
|
||||
|
||||
### Example
|
||||
```ruby
|
||||
# load the gem
|
||||
require 'petstore'
|
||||
# setup authorization
|
||||
Petstore.configure do |config|
|
||||
# Configure OAuth2 access token for authorization: petstore_auth
|
||||
config.access_token = 'YOUR ACCESS TOKEN'
|
||||
end
|
||||
|
||||
api_instance = Petstore::PetApi.new
|
||||
status = ['status_example'] # Array<String> | Status values that need to be considered for filter
|
||||
|
||||
begin
|
||||
#Finds Pets by status
|
||||
result = api_instance.find_pets_by_status(status)
|
||||
p result
|
||||
rescue Petstore::ApiError => e
|
||||
puts "Exception when calling PetApi->find_pets_by_status: #{e}"
|
||||
end
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**status** | [**Array<String>**](String.md)| Status values that need to be considered for filter |
|
||||
|
||||
### Return type
|
||||
|
||||
[**Array<Pet>**](Pet.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[petstore_auth](../README.md#petstore_auth)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
|
||||
|
||||
# **find_pets_by_tags**
|
||||
> Array<Pet> find_pets_by_tags(tags)
|
||||
|
||||
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'
|
||||
# setup authorization
|
||||
Petstore.configure do |config|
|
||||
# Configure OAuth2 access token for authorization: petstore_auth
|
||||
config.access_token = 'YOUR ACCESS TOKEN'
|
||||
end
|
||||
|
||||
api_instance = Petstore::PetApi.new
|
||||
tags = ['tags_example'] # Array<String> | Tags to filter by
|
||||
|
||||
begin
|
||||
#Finds Pets by tags
|
||||
result = api_instance.find_pets_by_tags(tags)
|
||||
p result
|
||||
rescue Petstore::ApiError => e
|
||||
puts "Exception when calling PetApi->find_pets_by_tags: #{e}"
|
||||
end
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**tags** | [**Array<String>**](String.md)| Tags to filter by |
|
||||
|
||||
### Return type
|
||||
|
||||
[**Array<Pet>**](Pet.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[petstore_auth](../README.md#petstore_auth)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
|
||||
|
||||
# **get_pet_by_id**
|
||||
> Pet get_pet_by_id(pet_id)
|
||||
|
||||
Find pet by ID
|
||||
|
||||
Returns a single pet
|
||||
|
||||
### Example
|
||||
```ruby
|
||||
# load the gem
|
||||
require 'petstore'
|
||||
# setup authorization
|
||||
Petstore.configure do |config|
|
||||
# Configure API key authorization: api_key
|
||||
config.api_key['api_key'] = 'YOUR API KEY'
|
||||
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
||||
#config.api_key_prefix['api_key'] = 'Bearer'
|
||||
end
|
||||
|
||||
api_instance = Petstore::PetApi.new
|
||||
pet_id = 56 # Integer | ID of pet to return
|
||||
|
||||
begin
|
||||
#Find pet by ID
|
||||
result = api_instance.get_pet_by_id(pet_id)
|
||||
p result
|
||||
rescue Petstore::ApiError => e
|
||||
puts "Exception when calling PetApi->get_pet_by_id: #{e}"
|
||||
end
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**pet_id** | **Integer**| ID of pet to return |
|
||||
|
||||
### Return type
|
||||
|
||||
[**Pet**](Pet.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[api_key](../README.md#api_key)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
|
||||
|
||||
# **update_pet**
|
||||
> update_pet(pet)
|
||||
|
||||
Update an existing pet
|
||||
|
||||
### Example
|
||||
```ruby
|
||||
# load the gem
|
||||
require 'petstore'
|
||||
# setup authorization
|
||||
Petstore.configure do |config|
|
||||
# Configure OAuth2 access token for authorization: petstore_auth
|
||||
config.access_token = 'YOUR ACCESS TOKEN'
|
||||
end
|
||||
|
||||
api_instance = Petstore::PetApi.new
|
||||
pet = Petstore::Pet.new # Pet | Pet object that needs to be added to the store
|
||||
|
||||
begin
|
||||
#Update an existing pet
|
||||
api_instance.update_pet(pet)
|
||||
rescue Petstore::ApiError => e
|
||||
puts "Exception when calling PetApi->update_pet: #{e}"
|
||||
end
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
|
||||
|
||||
### Return type
|
||||
|
||||
nil (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
[petstore_auth](../README.md#petstore_auth)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json, application/xml
|
||||
- **Accept**: Not defined
|
||||
|
||||
|
||||
|
||||
# **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'
|
||||
# setup authorization
|
||||
Petstore.configure do |config|
|
||||
# Configure OAuth2 access token for authorization: petstore_auth
|
||||
config.access_token = 'YOUR ACCESS TOKEN'
|
||||
end
|
||||
|
||||
api_instance = Petstore::PetApi.new
|
||||
pet_id = 56 # Integer | ID of pet that needs to be updated
|
||||
opts = {
|
||||
name: 'name_example', # String | Updated name of the pet
|
||||
status: 'status_example' # String | Updated status of the pet
|
||||
}
|
||||
|
||||
begin
|
||||
#Updates a pet in the store with form data
|
||||
api_instance.update_pet_with_form(pet_id, opts)
|
||||
rescue Petstore::ApiError => e
|
||||
puts "Exception when calling PetApi->update_pet_with_form: #{e}"
|
||||
end
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**pet_id** | **Integer**| ID of pet that needs to be updated |
|
||||
**name** | **String**| Updated name of the pet | [optional]
|
||||
**status** | **String**| Updated status of the pet | [optional]
|
||||
|
||||
### Return type
|
||||
|
||||
nil (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
[petstore_auth](../README.md#petstore_auth)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/x-www-form-urlencoded
|
||||
- **Accept**: Not defined
|
||||
|
||||
|
||||
|
||||
# **upload_file**
|
||||
> ApiResponse upload_file(pet_id, opts)
|
||||
|
||||
uploads an image
|
||||
|
||||
### Example
|
||||
```ruby
|
||||
# load the gem
|
||||
require 'petstore'
|
||||
# setup authorization
|
||||
Petstore.configure do |config|
|
||||
# Configure OAuth2 access token for authorization: petstore_auth
|
||||
config.access_token = 'YOUR ACCESS TOKEN'
|
||||
end
|
||||
|
||||
api_instance = Petstore::PetApi.new
|
||||
pet_id = 56 # Integer | ID of pet to update
|
||||
opts = {
|
||||
additional_metadata: 'additional_metadata_example', # String | Additional data to pass to server
|
||||
file: File.new('/path/to/file') # File | file to upload
|
||||
}
|
||||
|
||||
begin
|
||||
#uploads an image
|
||||
result = api_instance.upload_file(pet_id, opts)
|
||||
p result
|
||||
rescue Petstore::ApiError => e
|
||||
puts "Exception when calling PetApi->upload_file: #{e}"
|
||||
end
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**pet_id** | **Integer**| ID of pet to update |
|
||||
**additional_metadata** | **String**| Additional data to pass to server | [optional]
|
||||
**file** | **File**| file to upload | [optional]
|
||||
|
||||
### Return type
|
||||
|
||||
[**ApiResponse**](ApiResponse.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[petstore_auth](../README.md#petstore_auth)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: multipart/form-data
|
||||
- **Accept**: application/json
|
||||
|
||||
|
||||
|
||||
# **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'
|
||||
# setup authorization
|
||||
Petstore.configure do |config|
|
||||
# Configure OAuth2 access token for authorization: petstore_auth
|
||||
config.access_token = 'YOUR ACCESS TOKEN'
|
||||
end
|
||||
|
||||
api_instance = Petstore::PetApi.new
|
||||
pet_id = 56 # Integer | ID of pet to update
|
||||
required_file = File.new('/path/to/file') # File | file to upload
|
||||
opts = {
|
||||
additional_metadata: 'additional_metadata_example' # String | Additional data to pass to server
|
||||
}
|
||||
|
||||
begin
|
||||
#uploads an image (required)
|
||||
result = api_instance.upload_file_with_required_file(pet_id, required_file, opts)
|
||||
p result
|
||||
rescue Petstore::ApiError => e
|
||||
puts "Exception when calling PetApi->upload_file_with_required_file: #{e}"
|
||||
end
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**pet_id** | **Integer**| ID of pet to update |
|
||||
**required_file** | **File**| file to upload |
|
||||
**additional_metadata** | **String**| Additional data to pass to server | [optional]
|
||||
|
||||
### Return type
|
||||
|
||||
[**ApiResponse**](ApiResponse.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[petstore_auth](../README.md#petstore_auth)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: multipart/form-data
|
||||
- **Accept**: application/json
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
# Petstore::ReadOnlyFirst
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**bar** | **String** | | [optional]
|
||||
**baz** | **String** | | [optional]
|
||||
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
# Petstore::SpecialModelName
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**special_property_name** | **Integer** | | [optional]
|
||||
|
||||
|
||||
192
samples/openapi3/client/petstore/ruby/docs/StoreApi.md
Normal file
192
samples/openapi3/client/petstore/ruby/docs/StoreApi.md
Normal file
@@ -0,0 +1,192 @@
|
||||
# Petstore::StoreApi
|
||||
|
||||
All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
[**delete_order**](StoreApi.md#delete_order) | **DELETE** /store/order/{order_id} | Delete purchase order by ID
|
||||
[**get_inventory**](StoreApi.md#get_inventory) | **GET** /store/inventory | Returns pet inventories by status
|
||||
[**get_order_by_id**](StoreApi.md#get_order_by_id) | **GET** /store/order/{order_id} | Find purchase order by ID
|
||||
[**place_order**](StoreApi.md#place_order) | **POST** /store/order | Place an order for a pet
|
||||
|
||||
|
||||
# **delete_order**
|
||||
> delete_order(order_id)
|
||||
|
||||
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'
|
||||
|
||||
api_instance = Petstore::StoreApi.new
|
||||
order_id = 'order_id_example' # String | ID of the order that needs to be deleted
|
||||
|
||||
begin
|
||||
#Delete purchase order by ID
|
||||
api_instance.delete_order(order_id)
|
||||
rescue Petstore::ApiError => e
|
||||
puts "Exception when calling StoreApi->delete_order: #{e}"
|
||||
end
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**order_id** | **String**| ID of the order that needs to be deleted |
|
||||
|
||||
### Return type
|
||||
|
||||
nil (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: Not defined
|
||||
|
||||
|
||||
|
||||
# **get_inventory**
|
||||
> Hash<String, Integer> get_inventory
|
||||
|
||||
Returns pet inventories by status
|
||||
|
||||
Returns a map of status codes to quantities
|
||||
|
||||
### Example
|
||||
```ruby
|
||||
# load the gem
|
||||
require 'petstore'
|
||||
# setup authorization
|
||||
Petstore.configure do |config|
|
||||
# Configure API key authorization: api_key
|
||||
config.api_key['api_key'] = 'YOUR API KEY'
|
||||
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
||||
#config.api_key_prefix['api_key'] = 'Bearer'
|
||||
end
|
||||
|
||||
api_instance = Petstore::StoreApi.new
|
||||
|
||||
begin
|
||||
#Returns pet inventories by status
|
||||
result = api_instance.get_inventory
|
||||
p result
|
||||
rescue Petstore::ApiError => e
|
||||
puts "Exception when calling StoreApi->get_inventory: #{e}"
|
||||
end
|
||||
```
|
||||
|
||||
### Parameters
|
||||
This endpoint does not need any parameter.
|
||||
|
||||
### Return type
|
||||
|
||||
**Hash<String, Integer>**
|
||||
|
||||
### Authorization
|
||||
|
||||
[api_key](../README.md#api_key)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json
|
||||
|
||||
|
||||
|
||||
# **get_order_by_id**
|
||||
> Order get_order_by_id(order_id)
|
||||
|
||||
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'
|
||||
|
||||
api_instance = Petstore::StoreApi.new
|
||||
order_id = 56 # Integer | ID of pet that needs to be fetched
|
||||
|
||||
begin
|
||||
#Find purchase order by ID
|
||||
result = api_instance.get_order_by_id(order_id)
|
||||
p result
|
||||
rescue Petstore::ApiError => e
|
||||
puts "Exception when calling StoreApi->get_order_by_id: #{e}"
|
||||
end
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**order_id** | **Integer**| ID of pet that needs to be fetched |
|
||||
|
||||
### Return type
|
||||
|
||||
[**Order**](Order.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
|
||||
|
||||
# **place_order**
|
||||
> Order place_order(order)
|
||||
|
||||
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
|
||||
|
||||
begin
|
||||
#Place an order for a pet
|
||||
result = api_instance.place_order(order)
|
||||
p result
|
||||
rescue Petstore::ApiError => e
|
||||
puts "Exception when calling StoreApi->place_order: #{e}"
|
||||
end
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**order** | [**Order**](Order.md)| order placed for purchasing the pet |
|
||||
|
||||
### Return type
|
||||
|
||||
[**Order**](Order.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
# Petstore::StringBooleanMap
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
|
||||
|
||||
9
samples/openapi3/client/petstore/ruby/docs/Tag.md
Normal file
9
samples/openapi3/client/petstore/ruby/docs/Tag.md
Normal file
@@ -0,0 +1,9 @@
|
||||
# Petstore::Tag
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**id** | **Integer** | | [optional]
|
||||
**name** | **String** | | [optional]
|
||||
|
||||
|
||||
15
samples/openapi3/client/petstore/ruby/docs/User.md
Normal file
15
samples/openapi3/client/petstore/ruby/docs/User.md
Normal file
@@ -0,0 +1,15 @@
|
||||
# Petstore::User
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**id** | **Integer** | | [optional]
|
||||
**username** | **String** | | [optional]
|
||||
**first_name** | **String** | | [optional]
|
||||
**last_name** | **String** | | [optional]
|
||||
**email** | **String** | | [optional]
|
||||
**password** | **String** | | [optional]
|
||||
**phone** | **String** | | [optional]
|
||||
**user_status** | **Integer** | User Status | [optional]
|
||||
|
||||
|
||||
360
samples/openapi3/client/petstore/ruby/docs/UserApi.md
Normal file
360
samples/openapi3/client/petstore/ruby/docs/UserApi.md
Normal file
@@ -0,0 +1,360 @@
|
||||
# Petstore::UserApi
|
||||
|
||||
All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
[**create_user**](UserApi.md#create_user) | **POST** /user | Create user
|
||||
[**create_users_with_array_input**](UserApi.md#create_users_with_array_input) | **POST** /user/createWithArray | Creates list of users with given input array
|
||||
[**create_users_with_list_input**](UserApi.md#create_users_with_list_input) | **POST** /user/createWithList | Creates list of users with given input array
|
||||
[**delete_user**](UserApi.md#delete_user) | **DELETE** /user/{username} | Delete user
|
||||
[**get_user_by_name**](UserApi.md#get_user_by_name) | **GET** /user/{username} | Get user by user name
|
||||
[**login_user**](UserApi.md#login_user) | **GET** /user/login | Logs user into the system
|
||||
[**logout_user**](UserApi.md#logout_user) | **GET** /user/logout | Logs out current logged in user session
|
||||
[**update_user**](UserApi.md#update_user) | **PUT** /user/{username} | Updated user
|
||||
|
||||
|
||||
# **create_user**
|
||||
> create_user(user)
|
||||
|
||||
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
|
||||
|
||||
begin
|
||||
#Create user
|
||||
api_instance.create_user(user)
|
||||
rescue Petstore::ApiError => e
|
||||
puts "Exception when calling UserApi->create_user: #{e}"
|
||||
end
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**user** | [**User**](User.md)| Created user object |
|
||||
|
||||
### Return type
|
||||
|
||||
nil (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: Not defined
|
||||
|
||||
|
||||
|
||||
# **create_users_with_array_input**
|
||||
> create_users_with_array_input(user)
|
||||
|
||||
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
|
||||
|
||||
begin
|
||||
#Creates list of users with given input array
|
||||
api_instance.create_users_with_array_input(user)
|
||||
rescue Petstore::ApiError => e
|
||||
puts "Exception when calling UserApi->create_users_with_array_input: #{e}"
|
||||
end
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**user** | [**Array<User>**](Array.md)| List of user object |
|
||||
|
||||
### Return type
|
||||
|
||||
nil (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: Not defined
|
||||
|
||||
|
||||
|
||||
# **create_users_with_list_input**
|
||||
> create_users_with_list_input(user)
|
||||
|
||||
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
|
||||
|
||||
begin
|
||||
#Creates list of users with given input array
|
||||
api_instance.create_users_with_list_input(user)
|
||||
rescue Petstore::ApiError => e
|
||||
puts "Exception when calling UserApi->create_users_with_list_input: #{e}"
|
||||
end
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**user** | [**Array<User>**](Array.md)| List of user object |
|
||||
|
||||
### Return type
|
||||
|
||||
nil (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: Not defined
|
||||
|
||||
|
||||
|
||||
# **delete_user**
|
||||
> delete_user(username)
|
||||
|
||||
Delete 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 | The name that needs to be deleted
|
||||
|
||||
begin
|
||||
#Delete user
|
||||
api_instance.delete_user(username)
|
||||
rescue Petstore::ApiError => e
|
||||
puts "Exception when calling UserApi->delete_user: #{e}"
|
||||
end
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**username** | **String**| The name that needs to be deleted |
|
||||
|
||||
### Return type
|
||||
|
||||
nil (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: Not defined
|
||||
|
||||
|
||||
|
||||
# **get_user_by_name**
|
||||
> User get_user_by_name(username)
|
||||
|
||||
Get user by user name
|
||||
|
||||
### Example
|
||||
```ruby
|
||||
# load the gem
|
||||
require 'petstore'
|
||||
|
||||
api_instance = Petstore::UserApi.new
|
||||
username = 'username_example' # String | The name that needs to be fetched. Use user1 for testing.
|
||||
|
||||
begin
|
||||
#Get user by user name
|
||||
result = api_instance.get_user_by_name(username)
|
||||
p result
|
||||
rescue Petstore::ApiError => e
|
||||
puts "Exception when calling UserApi->get_user_by_name: #{e}"
|
||||
end
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**username** | **String**| The name that needs to be fetched. Use user1 for testing. |
|
||||
|
||||
### Return type
|
||||
|
||||
[**User**](User.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
|
||||
|
||||
# **login_user**
|
||||
> String login_user(username, password)
|
||||
|
||||
Logs user into the system
|
||||
|
||||
### Example
|
||||
```ruby
|
||||
# load the gem
|
||||
require 'petstore'
|
||||
|
||||
api_instance = Petstore::UserApi.new
|
||||
username = 'username_example' # String | The user name for login
|
||||
password = 'password_example' # String | The password for login in clear text
|
||||
|
||||
begin
|
||||
#Logs user into the system
|
||||
result = api_instance.login_user(username, password)
|
||||
p result
|
||||
rescue Petstore::ApiError => e
|
||||
puts "Exception when calling UserApi->login_user: #{e}"
|
||||
end
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**username** | **String**| The user name for login |
|
||||
**password** | **String**| The password for login in clear text |
|
||||
|
||||
### Return type
|
||||
|
||||
**String**
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
|
||||
|
||||
# **logout_user**
|
||||
> logout_user
|
||||
|
||||
Logs out current logged in user session
|
||||
|
||||
### Example
|
||||
```ruby
|
||||
# load the gem
|
||||
require 'petstore'
|
||||
|
||||
api_instance = Petstore::UserApi.new
|
||||
|
||||
begin
|
||||
#Logs out current logged in user session
|
||||
api_instance.logout_user
|
||||
rescue Petstore::ApiError => e
|
||||
puts "Exception when calling UserApi->logout_user: #{e}"
|
||||
end
|
||||
```
|
||||
|
||||
### Parameters
|
||||
This endpoint does not need any parameter.
|
||||
|
||||
### Return type
|
||||
|
||||
nil (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: Not defined
|
||||
|
||||
|
||||
|
||||
# **update_user**
|
||||
> update_user(username, user)
|
||||
|
||||
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
|
||||
|
||||
begin
|
||||
#Updated user
|
||||
api_instance.update_user(username, user)
|
||||
rescue Petstore::ApiError => e
|
||||
puts "Exception when calling UserApi->update_user: #{e}"
|
||||
end
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**username** | **String**| name that need to be deleted |
|
||||
**user** | [**User**](User.md)| Updated user object |
|
||||
|
||||
### Return type
|
||||
|
||||
nil (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: Not defined
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user