forked from loafle/openapi-generator-original
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:
parent
f58bd6d839
commit
b9949e1a8e
@ -27,6 +27,6 @@ fi
|
||||
|
||||
# if you've executed sbt assembly previously it will use that instead.
|
||||
export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
|
||||
ags="generate -t modules/openapi-generator/src/main/resources/ruby-client -i modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml -g ruby -c bin/ruby-petstore.json -o samples/client/petstore/ruby -DskipFormModel=true $@"
|
||||
ags="generate -t modules/openapi-generator/src/main/resources/ruby-client -i modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml -g ruby -c bin/ruby-petstore.json -o samples/openapi3/client/petstore/ruby -DskipFormModel=true $@"
|
||||
|
||||
java $JAVA_OPTS -jar $executable $ags
|
||||
|
@ -11,6 +11,7 @@ sleep 5
|
||||
|
||||
# LIST OF SCRIPTS:
|
||||
declare -a scripts=("./bin/openapi3/ruby-client-petstore.sh"
|
||||
"./bin/ruby-client-petstore.sh"
|
||||
"./bin/java-petstore-all.sh"
|
||||
"./bin/java-jaxrs-petstore-server-all.sh"
|
||||
"./bin/openapi3/jaxrs-jersey-petstore.sh"
|
||||
|
2
pom.xml
2
pom.xml
@ -1054,7 +1054,7 @@
|
||||
<module>samples/client/petstore/typescript-angular-v4.3/npm</module>
|
||||
<module>samples/client/petstore/typescript-angular-v6-provided-in-root</module>
|
||||
<!--<module>samples/client/petstore/bash</module>-->
|
||||
<module>samples/client/petstore/ruby</module>
|
||||
<module>samples/openapi3/client/petstore/ruby</module>
|
||||
<module>samples/server/petstore/rust-server</module>
|
||||
</modules>
|
||||
</profile>
|
||||
|
@ -74,7 +74,6 @@ All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
Class | Method | HTTP request | Description
|
||||
------------ | ------------- | ------------- | -------------
|
||||
*Petstore::AnotherFakeApi* | [**call_123_test_special_tags**](docs/AnotherFakeApi.md#call_123_test_special_tags) | **PATCH** /another-fake/dummy | To test special tags
|
||||
*Petstore::DefaultApi* | [**foo_get**](docs/DefaultApi.md#foo_get) | **GET** /foo |
|
||||
*Petstore::FakeApi* | [**fake_outer_boolean_serialize**](docs/FakeApi.md#fake_outer_boolean_serialize) | **POST** /fake/outer/boolean |
|
||||
*Petstore::FakeApi* | [**fake_outer_composite_serialize**](docs/FakeApi.md#fake_outer_composite_serialize) | **POST** /fake/outer/composite |
|
||||
*Petstore::FakeApi* | [**fake_outer_number_serialize**](docs/FakeApi.md#fake_outer_number_serialize) | **POST** /fake/outer/number |
|
||||
@ -131,10 +130,8 @@ Class | Method | HTTP request | Description
|
||||
- [Petstore::EnumTest](docs/EnumTest.md)
|
||||
- [Petstore::File](docs/File.md)
|
||||
- [Petstore::FileSchemaTestClass](docs/FileSchemaTestClass.md)
|
||||
- [Petstore::Foo](docs/Foo.md)
|
||||
- [Petstore::FormatTest](docs/FormatTest.md)
|
||||
- [Petstore::HasOnlyReadOnly](docs/HasOnlyReadOnly.md)
|
||||
- [Petstore::InlineResponseDefault](docs/InlineResponseDefault.md)
|
||||
- [Petstore::List](docs/List.md)
|
||||
- [Petstore::MapTest](docs/MapTest.md)
|
||||
- [Petstore::MixedPropertiesAndAdditionalPropertiesClass](docs/MixedPropertiesAndAdditionalPropertiesClass.md)
|
||||
|
@ -59,7 +59,7 @@ No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: */*
|
||||
|
||||
|
||||
@ -105,7 +105,7 @@ No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: */*
|
||||
|
||||
|
||||
@ -151,7 +151,7 @@ No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: */*
|
||||
|
||||
|
||||
@ -197,7 +197,7 @@ No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: */*
|
||||
|
||||
|
||||
|
@ -16,7 +16,5 @@ Name | Type | Description | Notes
|
||||
**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]
|
||||
|
||||
|
||||
|
@ -185,7 +185,7 @@ No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
|
||||
|
@ -53,7 +53,7 @@ No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: Not defined
|
||||
|
||||
|
||||
@ -95,7 +95,7 @@ No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: Not defined
|
||||
|
||||
|
||||
@ -137,7 +137,7 @@ No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: Not defined
|
||||
|
||||
|
||||
@ -353,7 +353,7 @@ No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: Not defined
|
||||
|
||||
|
||||
|
@ -35,10 +35,8 @@ require 'petstore/models/enum_class'
|
||||
require 'petstore/models/enum_test'
|
||||
require 'petstore/models/file'
|
||||
require 'petstore/models/file_schema_test_class'
|
||||
require 'petstore/models/foo'
|
||||
require 'petstore/models/format_test'
|
||||
require 'petstore/models/has_only_read_only'
|
||||
require 'petstore/models/inline_response_default'
|
||||
require 'petstore/models/list'
|
||||
require 'petstore/models/map_test'
|
||||
require 'petstore/models/mixed_properties_and_additional_properties_class'
|
||||
@ -58,7 +56,6 @@ require 'petstore/models/user'
|
||||
|
||||
# APIs
|
||||
require 'petstore/api/another_fake_api'
|
||||
require 'petstore/api/default_api'
|
||||
require 'petstore/api/fake_api'
|
||||
require 'petstore/api/fake_classname_tags123_api'
|
||||
require 'petstore/api/pet_api'
|
||||
|
@ -46,8 +46,6 @@ module Petstore
|
||||
header_params = {}
|
||||
# HTTP header 'Accept' (if needed)
|
||||
header_params['Accept'] = @api_client.select_header_accept(['*/*'])
|
||||
# HTTP header 'Content-Type'
|
||||
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
||||
|
||||
# form parameters
|
||||
form_params = {}
|
||||
@ -95,8 +93,6 @@ module Petstore
|
||||
header_params = {}
|
||||
# HTTP header 'Accept' (if needed)
|
||||
header_params['Accept'] = @api_client.select_header_accept(['*/*'])
|
||||
# HTTP header 'Content-Type'
|
||||
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
||||
|
||||
# form parameters
|
||||
form_params = {}
|
||||
@ -144,8 +140,6 @@ module Petstore
|
||||
header_params = {}
|
||||
# HTTP header 'Accept' (if needed)
|
||||
header_params['Accept'] = @api_client.select_header_accept(['*/*'])
|
||||
# HTTP header 'Content-Type'
|
||||
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
||||
|
||||
# form parameters
|
||||
form_params = {}
|
||||
@ -193,8 +187,6 @@ module Petstore
|
||||
header_params = {}
|
||||
# HTTP header 'Accept' (if needed)
|
||||
header_params['Accept'] = @api_client.select_header_accept(['*/*'])
|
||||
# HTTP header 'Content-Type'
|
||||
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
||||
|
||||
# form parameters
|
||||
form_params = {}
|
||||
@ -593,7 +585,7 @@ module Petstore
|
||||
|
||||
# query parameters
|
||||
query_params = {}
|
||||
query_params[:'enum_query_string_array'] = @api_client.build_collection_param(opts[:'enum_query_string_array'], :multi) if !opts[:'enum_query_string_array'].nil?
|
||||
query_params[:'enum_query_string_array'] = @api_client.build_collection_param(opts[:'enum_query_string_array'], :csv) if !opts[:'enum_query_string_array'].nil?
|
||||
query_params[:'enum_query_string'] = opts[:'enum_query_string'] if !opts[:'enum_query_string'].nil?
|
||||
query_params[:'enum_query_integer'] = opts[:'enum_query_integer'] if !opts[:'enum_query_integer'].nil?
|
||||
query_params[:'enum_query_double'] = opts[:'enum_query_double'] if !opts[:'enum_query_double'].nil?
|
||||
|
@ -208,8 +208,6 @@ module Petstore
|
||||
header_params = {}
|
||||
# HTTP header 'Accept' (if needed)
|
||||
header_params['Accept'] = @api_client.select_header_accept(['application/xml', 'application/json'])
|
||||
# HTTP header 'Content-Type'
|
||||
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
||||
|
||||
# form parameters
|
||||
form_params = {}
|
||||
|
@ -50,8 +50,6 @@ module Petstore
|
||||
|
||||
# header parameters
|
||||
header_params = {}
|
||||
# HTTP header 'Content-Type'
|
||||
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
||||
|
||||
# form parameters
|
||||
form_params = {}
|
||||
@ -100,8 +98,6 @@ module Petstore
|
||||
|
||||
# header parameters
|
||||
header_params = {}
|
||||
# HTTP header 'Content-Type'
|
||||
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
||||
|
||||
# form parameters
|
||||
form_params = {}
|
||||
@ -150,8 +146,6 @@ module Petstore
|
||||
|
||||
# header parameters
|
||||
header_params = {}
|
||||
# HTTP header 'Content-Type'
|
||||
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
||||
|
||||
# form parameters
|
||||
form_params = {}
|
||||
@ -410,8 +404,6 @@ module Petstore
|
||||
|
||||
# header parameters
|
||||
header_params = {}
|
||||
# HTTP header 'Content-Type'
|
||||
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
||||
|
||||
# form parameters
|
||||
form_params = {}
|
||||
|
@ -231,41 +231,8 @@ module Petstore
|
||||
def server_settings
|
||||
[
|
||||
{
|
||||
url: "http://{server}.swagger.io:{port}/v2",
|
||||
description: "petstore server",
|
||||
variables: {
|
||||
server: {
|
||||
description: "No descriptoin provided",
|
||||
default_value: "petstore",
|
||||
enum_values: [
|
||||
"petstore",
|
||||
"qa-petstore",
|
||||
"dev-petstore"
|
||||
]
|
||||
},
|
||||
port: {
|
||||
description: "No descriptoin provided",
|
||||
default_value: "80",
|
||||
enum_values: [
|
||||
"80",
|
||||
"8080"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
url: "https://localhost:8080/{version}",
|
||||
description: "The local server",
|
||||
variables: {
|
||||
version: {
|
||||
description: "No descriptoin provided",
|
||||
default_value: "v2",
|
||||
enum_values: [
|
||||
"v1",
|
||||
"v2"
|
||||
]
|
||||
}
|
||||
}
|
||||
url: "http://petstore.swagger.io:80/v2",
|
||||
description: "No descriptoin provided",
|
||||
}
|
||||
]
|
||||
end
|
||||
|
@ -40,12 +40,6 @@ module Petstore
|
||||
|
||||
attr_accessor :password
|
||||
|
||||
# A string that is a 10 digit number. Can have leading zeros.
|
||||
attr_accessor :pattern_with_digits
|
||||
|
||||
# A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01.
|
||||
attr_accessor :pattern_with_digits_and_delimiter
|
||||
|
||||
# Attribute mapping from ruby-style variable name to JSON key.
|
||||
def self.attribute_map
|
||||
{
|
||||
@ -61,9 +55,7 @@ module Petstore
|
||||
:'date' => :'date',
|
||||
:'date_time' => :'dateTime',
|
||||
:'uuid' => :'uuid',
|
||||
:'password' => :'password',
|
||||
:'pattern_with_digits' => :'pattern_with_digits',
|
||||
:'pattern_with_digits_and_delimiter' => :'pattern_with_digits_and_delimiter'
|
||||
:'password' => :'password'
|
||||
}
|
||||
end
|
||||
|
||||
@ -82,9 +74,7 @@ module Petstore
|
||||
:'date' => :'Date',
|
||||
:'date_time' => :'DateTime',
|
||||
:'uuid' => :'String',
|
||||
:'password' => :'String',
|
||||
:'pattern_with_digits' => :'String',
|
||||
:'pattern_with_digits_and_delimiter' => :'String'
|
||||
:'password' => :'String'
|
||||
}
|
||||
end
|
||||
|
||||
@ -147,14 +137,6 @@ module Petstore
|
||||
if attributes.has_key?(:'password')
|
||||
self.password = attributes[:'password']
|
||||
end
|
||||
|
||||
if attributes.has_key?(:'pattern_with_digits')
|
||||
self.pattern_with_digits = attributes[:'pattern_with_digits']
|
||||
end
|
||||
|
||||
if attributes.has_key?(:'pattern_with_digits_and_delimiter')
|
||||
self.pattern_with_digits_and_delimiter = attributes[:'pattern_with_digits_and_delimiter']
|
||||
end
|
||||
end
|
||||
|
||||
# Show invalid properties with the reasons. Usually used together with valid?
|
||||
@ -213,6 +195,10 @@ module Petstore
|
||||
invalid_properties.push('invalid value for "byte", byte cannot be nil.')
|
||||
end
|
||||
|
||||
if @byte !~ Regexp.new(/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$)
|
||||
invalid_properties.push('invalid value for "byte", must conform to the pattern /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$.')
|
||||
end
|
||||
|
||||
if @date.nil?
|
||||
invalid_properties.push('invalid value for "date", date cannot be nil.')
|
||||
end
|
||||
@ -229,14 +215,6 @@ module Petstore
|
||||
invalid_properties.push('invalid value for "password", the character length must be great than or equal to 10.')
|
||||
end
|
||||
|
||||
if !@pattern_with_digits.nil? && @pattern_with_digits !~ Regexp.new(/^\d{10}$/)
|
||||
invalid_properties.push('invalid value for "pattern_with_digits", must conform to the pattern /^\d{10}$/.')
|
||||
end
|
||||
|
||||
if !@pattern_with_digits_and_delimiter.nil? && @pattern_with_digits_and_delimiter !~ Regexp.new(/^image_\d{1,3}$/i)
|
||||
invalid_properties.push('invalid value for "pattern_with_digits_and_delimiter", must conform to the pattern /^image_\d{1,3}$/i.')
|
||||
end
|
||||
|
||||
invalid_properties
|
||||
end
|
||||
|
||||
@ -256,12 +234,11 @@ module Petstore
|
||||
return false if !@double.nil? && @double < 67.8
|
||||
return false if !@string.nil? && @string !~ Regexp.new(/[a-z]/i)
|
||||
return false if @byte.nil?
|
||||
return false if @byte !~ Regexp.new(/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$)
|
||||
return false if @date.nil?
|
||||
return false if @password.nil?
|
||||
return false if @password.to_s.length > 64
|
||||
return false if @password.to_s.length < 10
|
||||
return false if !@pattern_with_digits.nil? && @pattern_with_digits !~ Regexp.new(/^\d{10}$/)
|
||||
return false if !@pattern_with_digits_and_delimiter.nil? && @pattern_with_digits_and_delimiter !~ Regexp.new(/^image_\d{1,3}$/i)
|
||||
true
|
||||
end
|
||||
|
||||
@ -349,6 +326,20 @@ module Petstore
|
||||
@string = string
|
||||
end
|
||||
|
||||
# Custom attribute writer method with validation
|
||||
# @param [Object] byte Value to be assigned
|
||||
def byte=(byte)
|
||||
if byte.nil?
|
||||
fail ArgumentError, 'byte cannot be nil'
|
||||
end
|
||||
|
||||
if byte !~ Regexp.new(/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$)
|
||||
fail ArgumentError, 'invalid value for "byte", must conform to the pattern /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$.'
|
||||
end
|
||||
|
||||
@byte = byte
|
||||
end
|
||||
|
||||
# Custom attribute writer method with validation
|
||||
# @param [Object] password Value to be assigned
|
||||
def password=(password)
|
||||
@ -367,26 +358,6 @@ module Petstore
|
||||
@password = password
|
||||
end
|
||||
|
||||
# Custom attribute writer method with validation
|
||||
# @param [Object] pattern_with_digits Value to be assigned
|
||||
def pattern_with_digits=(pattern_with_digits)
|
||||
if !pattern_with_digits.nil? && pattern_with_digits !~ Regexp.new(/^\d{10}$/)
|
||||
fail ArgumentError, 'invalid value for "pattern_with_digits", must conform to the pattern /^\d{10}$/.'
|
||||
end
|
||||
|
||||
@pattern_with_digits = pattern_with_digits
|
||||
end
|
||||
|
||||
# Custom attribute writer method with validation
|
||||
# @param [Object] pattern_with_digits_and_delimiter Value to be assigned
|
||||
def pattern_with_digits_and_delimiter=(pattern_with_digits_and_delimiter)
|
||||
if !pattern_with_digits_and_delimiter.nil? && pattern_with_digits_and_delimiter !~ Regexp.new(/^image_\d{1,3}$/i)
|
||||
fail ArgumentError, 'invalid value for "pattern_with_digits_and_delimiter", must conform to the pattern /^image_\d{1,3}$/i.'
|
||||
end
|
||||
|
||||
@pattern_with_digits_and_delimiter = pattern_with_digits_and_delimiter
|
||||
end
|
||||
|
||||
# Checks equality by comparing each attribute.
|
||||
# @param [Object] Object to be compared
|
||||
def ==(o)
|
||||
@ -404,9 +375,7 @@ module Petstore
|
||||
date == o.date &&
|
||||
date_time == o.date_time &&
|
||||
uuid == o.uuid &&
|
||||
password == o.password &&
|
||||
pattern_with_digits == o.pattern_with_digits &&
|
||||
pattern_with_digits_and_delimiter == o.pattern_with_digits_and_delimiter
|
||||
password == o.password
|
||||
end
|
||||
|
||||
# @see the `==` method
|
||||
@ -418,7 +387,7 @@ module Petstore
|
||||
# Calculates hash code according to all attributes.
|
||||
# @return [Fixnum] Hash code
|
||||
def hash
|
||||
[integer, int32, int64, number, float, double, string, byte, binary, date, date_time, uuid, password, pattern_with_digits, pattern_with_digits_and_delimiter].hash
|
||||
[integer, int32, int64, number, float, double, string, byte, binary, date, date_time, uuid, password].hash
|
||||
end
|
||||
|
||||
# Builds the object from hash
|
||||
|
@ -1,12 +1,12 @@
|
||||
=begin
|
||||
#Swagger Petstore
|
||||
#OpenAPI Petstore
|
||||
|
||||
#This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
Contact: apiteam@swagger.io
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
Swagger Codegen version: 2.3.0-SNAPSHOT
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
OpenAPI Generator version: 3.3.4-SNAPSHOT
|
||||
|
||||
=end
|
||||
|
||||
@ -14,7 +14,7 @@ require 'spec_helper'
|
||||
require 'json'
|
||||
|
||||
# Unit tests for Petstore::AnotherFakeApi
|
||||
# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
|
||||
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
||||
# Please update as you see appropriate
|
||||
describe 'AnotherFakeApi' do
|
||||
before do
|
||||
@ -32,14 +32,14 @@ describe 'AnotherFakeApi' do
|
||||
end
|
||||
end
|
||||
|
||||
# unit tests for test_special_tags
|
||||
# unit tests for call_123_test_special_tags
|
||||
# To test special tags
|
||||
# To test special tags
|
||||
# @param body client model
|
||||
# To test special tags and operation ID starting with number
|
||||
# @param client client model
|
||||
# @param [Hash] opts the optional parameters
|
||||
# @return [Client]
|
||||
describe 'test_special_tags test' do
|
||||
it "should work" do
|
||||
describe 'call_123_test_special_tags test' do
|
||||
it 'should work' do
|
||||
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
||||
end
|
||||
end
|
||||
|
@ -1,16 +1,12 @@
|
||||
=begin
|
||||
Swagger Petstore
|
||||
#OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose.
|
||||
#This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
Contact: apiteam@swagger.io
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
|
||||
License: Apache 2.0
|
||||
http://www.apache.org/licenses/LICENSE-2.0.html
|
||||
|
||||
Terms of Service: http://swagger.io/terms/
|
||||
Generated by: https://openapi-generator.tech
|
||||
OpenAPI Generator version: 3.3.4-SNAPSHOT
|
||||
|
||||
=end
|
||||
|
||||
@ -18,7 +14,7 @@ require 'spec_helper'
|
||||
require 'json'
|
||||
|
||||
# Unit tests for Petstore::FakeApi
|
||||
# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
|
||||
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
||||
# Please update as you see appropriate
|
||||
describe 'FakeApi' do
|
||||
before do
|
||||
@ -36,25 +32,164 @@ describe 'FakeApi' do
|
||||
end
|
||||
end
|
||||
|
||||
# unit tests for fake_outer_boolean_serialize
|
||||
# Test serialization of outer boolean types
|
||||
# @param [Hash] opts the optional parameters
|
||||
# @option opts [BOOLEAN] :body Input boolean as post body
|
||||
# @return [BOOLEAN]
|
||||
describe 'fake_outer_boolean_serialize test' do
|
||||
it 'should work' do
|
||||
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
||||
end
|
||||
end
|
||||
|
||||
# unit tests for fake_outer_composite_serialize
|
||||
# Test serialization of object with outer number type
|
||||
# @param [Hash] opts the optional parameters
|
||||
# @option opts [OuterComposite] :outer_composite Input composite as post body
|
||||
# @return [OuterComposite]
|
||||
describe 'fake_outer_composite_serialize test' do
|
||||
it 'should work' do
|
||||
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
||||
end
|
||||
end
|
||||
|
||||
# unit tests for fake_outer_number_serialize
|
||||
# Test serialization of outer number types
|
||||
# @param [Hash] opts the optional parameters
|
||||
# @option opts [Float] :body Input number as post body
|
||||
# @return [Float]
|
||||
describe 'fake_outer_number_serialize test' do
|
||||
it 'should work' do
|
||||
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
||||
end
|
||||
end
|
||||
|
||||
# unit tests for fake_outer_string_serialize
|
||||
# Test serialization of outer string types
|
||||
# @param [Hash] opts the optional parameters
|
||||
# @option opts [String] :body Input string as post body
|
||||
# @return [String]
|
||||
describe 'fake_outer_string_serialize test' do
|
||||
it 'should work' do
|
||||
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
||||
end
|
||||
end
|
||||
|
||||
# unit tests for test_body_with_file_schema
|
||||
# For this test, the body for this request much reference a schema named `File`.
|
||||
# @param file_schema_test_class
|
||||
# @param [Hash] opts the optional parameters
|
||||
# @return [nil]
|
||||
describe 'test_body_with_file_schema test' do
|
||||
it 'should work' do
|
||||
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
||||
end
|
||||
end
|
||||
|
||||
# unit tests for test_body_with_query_params
|
||||
# @param query
|
||||
# @param user
|
||||
# @param [Hash] opts the optional parameters
|
||||
# @return [nil]
|
||||
describe 'test_body_with_query_params test' do
|
||||
it 'should work' do
|
||||
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
||||
end
|
||||
end
|
||||
|
||||
# unit tests for test_client_model
|
||||
# To test \"client\" model
|
||||
# To test \"client\" model
|
||||
# @param client client model
|
||||
# @param [Hash] opts the optional parameters
|
||||
# @return [Client]
|
||||
describe 'test_client_model test' do
|
||||
it 'should work' do
|
||||
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
||||
end
|
||||
end
|
||||
|
||||
# unit tests for test_endpoint_parameters
|
||||
# Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||
# Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||
# @param number None
|
||||
# @param double None
|
||||
# @param string None
|
||||
# @param pattern_without_delimiter None
|
||||
# @param byte None
|
||||
# @param [Hash] opts the optional parameters
|
||||
# @option opts [Integer] :integer None
|
||||
# @option opts [Integer] :int32 None
|
||||
# @option opts [Integer] :int64 None
|
||||
# @option opts [Float] :float None
|
||||
# @option opts [String] :binary None
|
||||
# @option opts [String] :string None
|
||||
# @option opts [File] :binary None
|
||||
# @option opts [Date] :date None
|
||||
# @option opts [DateTime] :date_time None
|
||||
# @option opts [String] :password None
|
||||
# @option opts [String] :callback None
|
||||
# @return [nil]
|
||||
describe 'test_endpoint_parameters test' do
|
||||
it "should work" do
|
||||
it 'should work' do
|
||||
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
||||
end
|
||||
end
|
||||
|
||||
# unit tests for test_enum_parameters
|
||||
# To test enum parameters
|
||||
# To test enum parameters
|
||||
# @param [Hash] opts the optional parameters
|
||||
# @option opts [Array<String>] :enum_header_string_array Header parameter enum test (string array)
|
||||
# @option opts [String] :enum_header_string Header parameter enum test (string)
|
||||
# @option opts [Array<String>] :enum_query_string_array Query parameter enum test (string array)
|
||||
# @option opts [String] :enum_query_string Query parameter enum test (string)
|
||||
# @option opts [Integer] :enum_query_integer Query parameter enum test (double)
|
||||
# @option opts [Float] :enum_query_double Query parameter enum test (double)
|
||||
# @option opts [Array<String>] :enum_form_string_array Form parameter enum test (string array)
|
||||
# @option opts [String] :enum_form_string Form parameter enum test (string)
|
||||
# @return [nil]
|
||||
describe 'test_enum_parameters test' do
|
||||
it 'should work' do
|
||||
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
||||
end
|
||||
end
|
||||
|
||||
# unit tests for test_group_parameters
|
||||
# Fake endpoint to test group parameters (optional)
|
||||
# Fake endpoint to test group parameters (optional)
|
||||
# @param required_string_group Required String in group parameters
|
||||
# @param required_boolean_group Required Boolean in group parameters
|
||||
# @param required_int64_group Required Integer in group parameters
|
||||
# @param [Hash] opts the optional parameters
|
||||
# @option opts [Integer] :string_group String in group parameters
|
||||
# @option opts [BOOLEAN] :boolean_group Boolean in group parameters
|
||||
# @option opts [Integer] :int64_group Integer in group parameters
|
||||
# @return [nil]
|
||||
describe 'test_group_parameters test' do
|
||||
it 'should work' do
|
||||
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
||||
end
|
||||
end
|
||||
|
||||
# unit tests for test_inline_additional_properties
|
||||
# test inline additionalProperties
|
||||
# @param request_body request body
|
||||
# @param [Hash] opts the optional parameters
|
||||
# @return [nil]
|
||||
describe 'test_inline_additional_properties test' do
|
||||
it 'should work' do
|
||||
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
||||
end
|
||||
end
|
||||
|
||||
# unit tests for test_json_form_data
|
||||
# test json serialization of form data
|
||||
# @param param field1
|
||||
# @param param2 field2
|
||||
# @param [Hash] opts the optional parameters
|
||||
# @return [nil]
|
||||
describe 'test_json_form_data test' do
|
||||
it 'should work' do
|
||||
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
||||
end
|
||||
end
|
||||
|
@ -1,11 +1,12 @@
|
||||
=begin
|
||||
#Swagger Petstore
|
||||
#OpenAPI Petstore
|
||||
|
||||
#This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
Contact: apiteam@swagger.io
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
OpenAPI Generator version: 3.3.4-SNAPSHOT
|
||||
|
||||
=end
|
||||
|
||||
@ -13,7 +14,7 @@ require 'spec_helper'
|
||||
require 'json'
|
||||
|
||||
# Unit tests for Petstore::FakeClassnameTags123Api
|
||||
# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
|
||||
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
||||
# Please update as you see appropriate
|
||||
describe 'FakeClassnameTags123Api' do
|
||||
before do
|
||||
@ -26,19 +27,19 @@ describe 'FakeClassnameTags123Api' do
|
||||
end
|
||||
|
||||
describe 'test an instance of FakeClassnameTags123Api' do
|
||||
it 'should create an instact of FakeClassnameTags123Api' do
|
||||
it 'should create an instance of FakeClassnameTags123Api' do
|
||||
expect(@instance).to be_instance_of(Petstore::FakeClassnameTags123Api)
|
||||
end
|
||||
end
|
||||
|
||||
# unit tests for test_classname
|
||||
# To test class name in snake case
|
||||
#
|
||||
# @param body client model
|
||||
# To test class name in snake case
|
||||
# @param client client model
|
||||
# @param [Hash] opts the optional parameters
|
||||
# @return [Client]
|
||||
describe 'test_classname test' do
|
||||
it "should work" do
|
||||
it 'should work' do
|
||||
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
||||
end
|
||||
end
|
||||
|
@ -1,16 +1,12 @@
|
||||
=begin
|
||||
Swagger Petstore
|
||||
#OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose.
|
||||
#This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
Contact: apiteam@swagger.io
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
|
||||
License: Apache 2.0
|
||||
http://www.apache.org/licenses/LICENSE-2.0.html
|
||||
|
||||
Terms of Service: http://swagger.io/terms/
|
||||
Generated by: https://openapi-generator.tech
|
||||
OpenAPI Generator version: 3.3.4-SNAPSHOT
|
||||
|
||||
=end
|
||||
|
||||
@ -18,7 +14,7 @@ require 'spec_helper'
|
||||
require 'json'
|
||||
|
||||
# Unit tests for Petstore::PetApi
|
||||
# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
|
||||
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
||||
# Please update as you see appropriate
|
||||
describe 'PetApi' do
|
||||
before do
|
||||
@ -38,25 +34,23 @@ describe 'PetApi' do
|
||||
|
||||
# unit tests for add_pet
|
||||
# Add a new pet to the store
|
||||
#
|
||||
# @param body Pet object that needs to be added to the store
|
||||
# @param pet Pet object that needs to be added to the store
|
||||
# @param [Hash] opts the optional parameters
|
||||
# @return [nil]
|
||||
describe 'add_pet test' do
|
||||
it "should work" do
|
||||
it 'should work' do
|
||||
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
||||
end
|
||||
end
|
||||
|
||||
# unit tests for delete_pet
|
||||
# Deletes a pet
|
||||
#
|
||||
# @param pet_id Pet id to delete
|
||||
# @param [Hash] opts the optional parameters
|
||||
# @option opts [String] :api_key
|
||||
# @return [nil]
|
||||
describe 'delete_pet test' do
|
||||
it "should work" do
|
||||
it 'should work' do
|
||||
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
||||
end
|
||||
end
|
||||
@ -68,7 +62,7 @@ describe 'PetApi' do
|
||||
# @param [Hash] opts the optional parameters
|
||||
# @return [Array<Pet>]
|
||||
describe 'find_pets_by_status test' do
|
||||
it "should work" do
|
||||
it 'should work' do
|
||||
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
||||
end
|
||||
end
|
||||
@ -80,7 +74,7 @@ describe 'PetApi' do
|
||||
# @param [Hash] opts the optional parameters
|
||||
# @return [Array<Pet>]
|
||||
describe 'find_pets_by_tags test' do
|
||||
it "should work" do
|
||||
it 'should work' do
|
||||
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
||||
end
|
||||
end
|
||||
@ -92,47 +86,57 @@ describe 'PetApi' do
|
||||
# @param [Hash] opts the optional parameters
|
||||
# @return [Pet]
|
||||
describe 'get_pet_by_id test' do
|
||||
it "should work" do
|
||||
it 'should work' do
|
||||
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
||||
end
|
||||
end
|
||||
|
||||
# unit tests for update_pet
|
||||
# Update an existing pet
|
||||
#
|
||||
# @param body Pet object that needs to be added to the store
|
||||
# @param pet Pet object that needs to be added to the store
|
||||
# @param [Hash] opts the optional parameters
|
||||
# @return [nil]
|
||||
describe 'update_pet test' do
|
||||
it "should work" do
|
||||
it 'should work' do
|
||||
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
||||
end
|
||||
end
|
||||
|
||||
# unit tests for update_pet_with_form
|
||||
# Updates a pet in the store with form data
|
||||
#
|
||||
# @param pet_id ID of pet that needs to be updated
|
||||
# @param [Hash] opts the optional parameters
|
||||
# @option opts [String] :name Updated name of the pet
|
||||
# @option opts [String] :status Updated status of the pet
|
||||
# @return [nil]
|
||||
describe 'update_pet_with_form test' do
|
||||
it "should work" do
|
||||
it 'should work' do
|
||||
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
||||
end
|
||||
end
|
||||
|
||||
# unit tests for upload_file
|
||||
# uploads an image
|
||||
#
|
||||
# @param pet_id ID of pet to update
|
||||
# @param [Hash] opts the optional parameters
|
||||
# @option opts [String] :additional_metadata Additional data to pass to server
|
||||
# @option opts [File] :file file to upload
|
||||
# @return [ApiResponse]
|
||||
describe 'upload_file test' do
|
||||
it "should work" do
|
||||
it 'should work' do
|
||||
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
||||
end
|
||||
end
|
||||
|
||||
# unit tests for upload_file_with_required_file
|
||||
# uploads an image (required)
|
||||
# @param pet_id ID of pet to update
|
||||
# @param required_file file to upload
|
||||
# @param [Hash] opts the optional parameters
|
||||
# @option opts [String] :additional_metadata Additional data to pass to server
|
||||
# @return [ApiResponse]
|
||||
describe 'upload_file_with_required_file test' do
|
||||
it 'should work' do
|
||||
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
||||
end
|
||||
end
|
||||
|
@ -1,16 +1,12 @@
|
||||
=begin
|
||||
Swagger Petstore
|
||||
#OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose.
|
||||
#This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
Contact: apiteam@swagger.io
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
|
||||
License: Apache 2.0
|
||||
http://www.apache.org/licenses/LICENSE-2.0.html
|
||||
|
||||
Terms of Service: http://swagger.io/terms/
|
||||
Generated by: https://openapi-generator.tech
|
||||
OpenAPI Generator version: 3.3.4-SNAPSHOT
|
||||
|
||||
=end
|
||||
|
||||
@ -18,7 +14,7 @@ require 'spec_helper'
|
||||
require 'json'
|
||||
|
||||
# Unit tests for Petstore::StoreApi
|
||||
# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
|
||||
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
||||
# Please update as you see appropriate
|
||||
describe 'StoreApi' do
|
||||
before do
|
||||
@ -43,7 +39,7 @@ describe 'StoreApi' do
|
||||
# @param [Hash] opts the optional parameters
|
||||
# @return [nil]
|
||||
describe 'delete_order test' do
|
||||
it "should work" do
|
||||
it 'should work' do
|
||||
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
||||
end
|
||||
end
|
||||
@ -54,7 +50,7 @@ describe 'StoreApi' do
|
||||
# @param [Hash] opts the optional parameters
|
||||
# @return [Hash<String, Integer>]
|
||||
describe 'get_inventory test' do
|
||||
it "should work" do
|
||||
it 'should work' do
|
||||
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
||||
end
|
||||
end
|
||||
@ -66,19 +62,18 @@ describe 'StoreApi' do
|
||||
# @param [Hash] opts the optional parameters
|
||||
# @return [Order]
|
||||
describe 'get_order_by_id test' do
|
||||
it "should work" do
|
||||
it 'should work' do
|
||||
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
||||
end
|
||||
end
|
||||
|
||||
# unit tests for place_order
|
||||
# Place an order for a pet
|
||||
#
|
||||
# @param body order placed for purchasing the pet
|
||||
# @param order order placed for purchasing the pet
|
||||
# @param [Hash] opts the optional parameters
|
||||
# @return [Order]
|
||||
describe 'place_order test' do
|
||||
it "should work" do
|
||||
it 'should work' do
|
||||
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
||||
end
|
||||
end
|
||||
|
@ -1,16 +1,12 @@
|
||||
=begin
|
||||
Swagger Petstore
|
||||
#OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose.
|
||||
#This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
Contact: apiteam@swagger.io
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
|
||||
License: Apache 2.0
|
||||
http://www.apache.org/licenses/LICENSE-2.0.html
|
||||
|
||||
Terms of Service: http://swagger.io/terms/
|
||||
Generated by: https://openapi-generator.tech
|
||||
OpenAPI Generator version: 3.3.4-SNAPSHOT
|
||||
|
||||
=end
|
||||
|
||||
@ -18,7 +14,7 @@ require 'spec_helper'
|
||||
require 'json'
|
||||
|
||||
# Unit tests for Petstore::UserApi
|
||||
# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
|
||||
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
||||
# Please update as you see appropriate
|
||||
describe 'UserApi' do
|
||||
before do
|
||||
@ -39,35 +35,33 @@ describe 'UserApi' do
|
||||
# unit tests for create_user
|
||||
# Create user
|
||||
# This can only be done by the logged in user.
|
||||
# @param body Created user object
|
||||
# @param user Created user object
|
||||
# @param [Hash] opts the optional parameters
|
||||
# @return [nil]
|
||||
describe 'create_user test' do
|
||||
it "should work" do
|
||||
it 'should work' do
|
||||
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
||||
end
|
||||
end
|
||||
|
||||
# unit tests for create_users_with_array_input
|
||||
# Creates list of users with given input array
|
||||
#
|
||||
# @param body List of user object
|
||||
# @param user List of user object
|
||||
# @param [Hash] opts the optional parameters
|
||||
# @return [nil]
|
||||
describe 'create_users_with_array_input test' do
|
||||
it "should work" do
|
||||
it 'should work' do
|
||||
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
||||
end
|
||||
end
|
||||
|
||||
# unit tests for create_users_with_list_input
|
||||
# Creates list of users with given input array
|
||||
#
|
||||
# @param body List of user object
|
||||
# @param user List of user object
|
||||
# @param [Hash] opts the optional parameters
|
||||
# @return [nil]
|
||||
describe 'create_users_with_list_input test' do
|
||||
it "should work" do
|
||||
it 'should work' do
|
||||
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
||||
end
|
||||
end
|
||||
@ -79,43 +73,40 @@ describe 'UserApi' do
|
||||
# @param [Hash] opts the optional parameters
|
||||
# @return [nil]
|
||||
describe 'delete_user test' do
|
||||
it "should work" do
|
||||
it 'should work' do
|
||||
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
||||
end
|
||||
end
|
||||
|
||||
# unit tests for get_user_by_name
|
||||
# Get user by user name
|
||||
#
|
||||
# @param username The name that needs to be fetched. Use user1 for testing.
|
||||
# @param username The name that needs to be fetched. Use user1 for testing.
|
||||
# @param [Hash] opts the optional parameters
|
||||
# @return [User]
|
||||
describe 'get_user_by_name test' do
|
||||
it "should work" do
|
||||
it 'should work' do
|
||||
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
||||
end
|
||||
end
|
||||
|
||||
# unit tests for login_user
|
||||
# Logs user into the system
|
||||
#
|
||||
# @param username The user name for login
|
||||
# @param password The password for login in clear text
|
||||
# @param [Hash] opts the optional parameters
|
||||
# @return [String]
|
||||
describe 'login_user test' do
|
||||
it "should work" do
|
||||
it 'should work' do
|
||||
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
||||
end
|
||||
end
|
||||
|
||||
# unit tests for logout_user
|
||||
# Logs out current logged in user session
|
||||
#
|
||||
# @param [Hash] opts the optional parameters
|
||||
# @return [nil]
|
||||
describe 'logout_user test' do
|
||||
it "should work" do
|
||||
it 'should work' do
|
||||
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
||||
end
|
||||
end
|
||||
@ -124,11 +115,11 @@ describe 'UserApi' do
|
||||
# Updated user
|
||||
# This can only be done by the logged in user.
|
||||
# @param username name that need to be deleted
|
||||
# @param body Updated user object
|
||||
# @param user Updated user object
|
||||
# @param [Hash] opts the optional parameters
|
||||
# @return [nil]
|
||||
describe 'update_user test' do
|
||||
it "should work" do
|
||||
it 'should work' do
|
||||
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
||||
end
|
||||
end
|
||||
|
@ -1,12 +1,20 @@
|
||||
# require 'spec_helper'
|
||||
require File.dirname(__FILE__) + '/spec_helper'
|
||||
=begin
|
||||
#OpenAPI Petstore
|
||||
|
||||
#This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
OpenAPI Generator version: 3.3.4-SNAPSHOT
|
||||
|
||||
=end
|
||||
|
||||
require 'spec_helper'
|
||||
|
||||
describe Petstore::ApiClient do
|
||||
|
||||
context 'initialization' do
|
||||
|
||||
context 'URL stuff' do
|
||||
|
||||
context 'host' do
|
||||
it 'removes http from host' do
|
||||
Petstore.configure { |c| c.host = 'http://example.com' }
|
||||
@ -40,63 +48,33 @@ describe Petstore::ApiClient do
|
||||
expect(Petstore::Configuration.default.base_path).to eq('')
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
describe "#update_params_for_auth!" do
|
||||
it "sets header api-key parameter with prefix" do
|
||||
Petstore.configure do |c|
|
||||
c.api_key_prefix['api_key'] = 'PREFIX'
|
||||
c.api_key['api_key'] = 'special-key'
|
||||
end
|
||||
|
||||
api_client = Petstore::ApiClient.new
|
||||
|
||||
config2 = Petstore::Configuration.new do |c|
|
||||
c.api_key_prefix['api_key'] = 'PREFIX2'
|
||||
c.api_key['api_key'] = 'special-key2'
|
||||
end
|
||||
api_client2 = Petstore::ApiClient.new(config2)
|
||||
|
||||
auth_names = ['api_key', 'unknown']
|
||||
|
||||
header_params = {}
|
||||
query_params = {}
|
||||
api_client.update_params_for_auth! header_params, query_params, auth_names
|
||||
expect(header_params).to eq('api_key' => 'PREFIX special-key')
|
||||
expect(query_params).to eq({})
|
||||
|
||||
header_params = {}
|
||||
query_params = {}
|
||||
api_client2.update_params_for_auth! header_params, query_params, auth_names
|
||||
expect(header_params).to eq('api_key' => 'PREFIX2 special-key2')
|
||||
expect(query_params).to eq({})
|
||||
end
|
||||
|
||||
it "sets header api-key parameter without prefix" do
|
||||
Petstore.configure do |c|
|
||||
c.api_key_prefix['api_key'] = nil
|
||||
c.api_key['api_key'] = 'special-key'
|
||||
end
|
||||
|
||||
api_client = Petstore::ApiClient.new
|
||||
|
||||
header_params = {}
|
||||
query_params = {}
|
||||
auth_names = ['api_key', 'unknown']
|
||||
api_client.update_params_for_auth! header_params, query_params, auth_names
|
||||
expect(header_params).to eq('api_key' => 'special-key')
|
||||
expect(query_params).to eq({})
|
||||
end
|
||||
end
|
||||
|
||||
describe "timeout in #build_request" do
|
||||
describe 'params_encoding in #build_request' do
|
||||
let(:config) { Petstore::Configuration.new }
|
||||
let(:api_client) { Petstore::ApiClient.new(config) }
|
||||
|
||||
it "defaults to 0" do
|
||||
it 'defaults to nil' do
|
||||
expect(Petstore::Configuration.default.params_encoding).to eq(nil)
|
||||
expect(config.params_encoding).to eq(nil)
|
||||
|
||||
request = api_client.build_request(:get, '/test')
|
||||
expect(request.options[:params_encoding]).to eq(nil)
|
||||
end
|
||||
|
||||
it 'can be customized' do
|
||||
config.params_encoding = :multi
|
||||
request = api_client.build_request(:get, '/test')
|
||||
expect(request.options[:params_encoding]).to eq(:multi)
|
||||
end
|
||||
end
|
||||
|
||||
describe 'timeout in #build_request' do
|
||||
let(:config) { Petstore::Configuration.new }
|
||||
let(:api_client) { Petstore::ApiClient.new(config) }
|
||||
|
||||
it 'defaults to 0' do
|
||||
expect(Petstore::Configuration.default.timeout).to eq(0)
|
||||
expect(config.timeout).to eq(0)
|
||||
|
||||
@ -104,135 +82,107 @@ describe Petstore::ApiClient do
|
||||
expect(request.options[:timeout]).to eq(0)
|
||||
end
|
||||
|
||||
it "can be customized" do
|
||||
it 'can be customized' do
|
||||
config.timeout = 100
|
||||
request = api_client.build_request(:get, '/test')
|
||||
expect(request.options[:timeout]).to eq(100)
|
||||
end
|
||||
end
|
||||
|
||||
describe "#deserialize" do
|
||||
describe '#deserialize' do
|
||||
it "handles Array<Integer>" do
|
||||
api_client = Petstore::ApiClient.new
|
||||
headers = { 'Content-Type' => 'application/json' }
|
||||
response = double('response', headers: headers, body: '[12, 34]')
|
||||
data = api_client.deserialize(response, 'Array<Integer>')
|
||||
expect(data).to be_a(Array)
|
||||
expect(data).to be_instance_of(Array)
|
||||
expect(data).to eq([12, 34])
|
||||
end
|
||||
|
||||
it "handles Array<Array<Integer>>" do
|
||||
it 'handles Array<Array<Integer>>' do
|
||||
api_client = Petstore::ApiClient.new
|
||||
headers = { 'Content-Type' => 'application/json' }
|
||||
response = double('response', headers: headers, body: '[[12, 34], [56]]')
|
||||
data = api_client.deserialize(response, 'Array<Array<Integer>>')
|
||||
expect(data).to be_a(Array)
|
||||
expect(data).to be_instance_of(Array)
|
||||
expect(data).to eq([[12, 34], [56]])
|
||||
end
|
||||
|
||||
it "handles Hash<String, String>" do
|
||||
it 'handles Hash<String, String>' do
|
||||
api_client = Petstore::ApiClient.new
|
||||
headers = { 'Content-Type' => 'application/json' }
|
||||
response = double('response', headers: headers, body: '{"message": "Hello"}')
|
||||
data = api_client.deserialize(response, 'Hash<String, String>')
|
||||
expect(data).to be_a(Hash)
|
||||
expect(data).to be_instance_of(Hash)
|
||||
expect(data).to eq(:message => 'Hello')
|
||||
end
|
||||
|
||||
it "handles Hash<String, Pet>" do
|
||||
api_client = Petstore::ApiClient.new
|
||||
headers = { 'Content-Type' => 'application/json' }
|
||||
response = double('response', headers: headers, body: '{"pet": {"id": 1}}')
|
||||
data = api_client.deserialize(response, 'Hash<String, Pet>')
|
||||
expect(data).to be_a(Hash)
|
||||
expect(data.keys).to eq([:pet])
|
||||
pet = data[:pet]
|
||||
expect(pet).to be_a(Petstore::Pet)
|
||||
expect(pet.id).to eq(1)
|
||||
end
|
||||
|
||||
it "handles Hash<String, Hash<String, Pet>>" do
|
||||
api_client = Petstore::ApiClient.new
|
||||
headers = { 'Content-Type' => 'application/json' }
|
||||
response = double('response', headers: headers, body: '{"data": {"pet": {"id": 1}}}')
|
||||
result = api_client.deserialize(response, 'Hash<String, Hash<String, Pet>>')
|
||||
expect(result).to be_a(Hash)
|
||||
expect(result.keys).to eq([:data])
|
||||
data = result[:data]
|
||||
expect(data).to be_a(Hash)
|
||||
expect(data.keys).to eq([:pet])
|
||||
pet = data[:pet]
|
||||
expect(pet).to be_a(Petstore::Pet)
|
||||
expect(pet.id).to eq(1)
|
||||
end
|
||||
end
|
||||
|
||||
describe "#object_to_hash" do
|
||||
it "ignores nils and includes empty arrays" do
|
||||
api_client = Petstore::ApiClient.new
|
||||
pet = Petstore::Pet.new
|
||||
pet.id = 1
|
||||
pet.name = ''
|
||||
pet.status = nil
|
||||
pet.photo_urls = nil
|
||||
pet.tags = []
|
||||
expected = { id: 1, name: '', tags: [] }
|
||||
expect(api_client.object_to_hash(pet)).to eq(expected)
|
||||
it 'ignores nils and includes empty arrays' do
|
||||
# uncomment below to test object_to_hash for model
|
||||
# api_client = Petstore::ApiClient.new
|
||||
# _model = Petstore::ModelName.new
|
||||
# update the model attribute below
|
||||
# _model.id = 1
|
||||
# update the expected value (hash) below
|
||||
# expected = {id: 1, name: '', tags: []}
|
||||
# expect(api_client.object_to_hash(_model)).to eq(expected)
|
||||
end
|
||||
end
|
||||
|
||||
describe "#build_collection_param" do
|
||||
describe '#build_collection_param' do
|
||||
let(:param) { ['aa', 'bb', 'cc'] }
|
||||
let(:api_client) { Petstore::ApiClient.new }
|
||||
|
||||
it "works for csv" do
|
||||
it 'works for csv' do
|
||||
expect(api_client.build_collection_param(param, :csv)).to eq('aa,bb,cc')
|
||||
end
|
||||
|
||||
it "works for ssv" do
|
||||
it 'works for ssv' do
|
||||
expect(api_client.build_collection_param(param, :ssv)).to eq('aa bb cc')
|
||||
end
|
||||
|
||||
it "works for tsv" do
|
||||
it 'works for tsv' do
|
||||
expect(api_client.build_collection_param(param, :tsv)).to eq("aa\tbb\tcc")
|
||||
end
|
||||
|
||||
it "works for pipes" do
|
||||
it 'works for pipes' do
|
||||
expect(api_client.build_collection_param(param, :pipes)).to eq('aa|bb|cc')
|
||||
end
|
||||
|
||||
it "works for multi" do
|
||||
it 'works for multi' do
|
||||
expect(api_client.build_collection_param(param, :multi)).to eq(['aa', 'bb', 'cc'])
|
||||
end
|
||||
|
||||
it "fails for invalid collection format" do
|
||||
expect { api_client.build_collection_param(param, :INVALID) }.to raise_error(RuntimeError, 'unknown collection format: :INVALID')
|
||||
it 'fails for invalid collection format' do
|
||||
expect(proc { api_client.build_collection_param(param, :INVALID) }).to raise_error(RuntimeError, 'unknown collection format: :INVALID')
|
||||
end
|
||||
end
|
||||
|
||||
describe "#json_mime?" do
|
||||
describe '#json_mime?' do
|
||||
let(:api_client) { Petstore::ApiClient.new }
|
||||
|
||||
it "works" do
|
||||
expect(api_client.json_mime?(nil)).to eq(false)
|
||||
expect(api_client.json_mime?('')).to eq(false)
|
||||
it 'works' do
|
||||
expect(api_client.json_mime?(nil)).to eq false
|
||||
expect(api_client.json_mime?('')).to eq false
|
||||
|
||||
expect(api_client.json_mime?('application/json')).to eq(true)
|
||||
expect(api_client.json_mime?('application/json; charset=UTF8')).to eq(true)
|
||||
expect(api_client.json_mime?('APPLICATION/JSON')).to eq(true)
|
||||
expect(api_client.json_mime?('application/json')).to eq true
|
||||
expect(api_client.json_mime?('application/json; charset=UTF8')).to eq true
|
||||
expect(api_client.json_mime?('APPLICATION/JSON')).to eq true
|
||||
|
||||
expect(api_client.json_mime?('application/xml')).to eq(false)
|
||||
expect(api_client.json_mime?('text/plain')).to eq(false)
|
||||
expect(api_client.json_mime?('application/jsonp')).to eq(false)
|
||||
expect(api_client.json_mime?('application/xml')).to eq false
|
||||
expect(api_client.json_mime?('text/plain')).to eq false
|
||||
expect(api_client.json_mime?('application/jsonp')).to eq false
|
||||
end
|
||||
end
|
||||
|
||||
describe "#select_header_accept" do
|
||||
describe '#select_header_accept' do
|
||||
let(:api_client) { Petstore::ApiClient.new }
|
||||
|
||||
it "works" do
|
||||
expect(api_client.select_header_accept(nil)).to eq(nil)
|
||||
expect(api_client.select_header_accept([])).to eq(nil)
|
||||
it 'works' do
|
||||
expect(api_client.select_header_accept(nil)).to be_nil
|
||||
expect(api_client.select_header_accept([])).to be_nil
|
||||
|
||||
expect(api_client.select_header_accept(['application/json'])).to eq('application/json')
|
||||
expect(api_client.select_header_accept(['application/xml', 'application/json; charset=UTF8'])).to eq('application/json; charset=UTF8')
|
||||
@ -243,10 +193,10 @@ describe Petstore::ApiClient do
|
||||
end
|
||||
end
|
||||
|
||||
describe "#select_header_content_type" do
|
||||
describe '#select_header_content_type' do
|
||||
let(:api_client) { Petstore::ApiClient.new }
|
||||
|
||||
it "works" do
|
||||
it 'works' do
|
||||
expect(api_client.select_header_content_type(nil)).to eq('application/json')
|
||||
expect(api_client.select_header_content_type([])).to eq('application/json')
|
||||
|
||||
@ -258,10 +208,10 @@ describe Petstore::ApiClient do
|
||||
end
|
||||
end
|
||||
|
||||
describe "#sanitize_filename" do
|
||||
describe '#sanitize_filename' do
|
||||
let(:api_client) { Petstore::ApiClient.new }
|
||||
|
||||
it "works" do
|
||||
it 'works' do
|
||||
expect(api_client.sanitize_filename('sun')).to eq('sun')
|
||||
expect(api_client.sanitize_filename('sun.gif')).to eq('sun.gif')
|
||||
expect(api_client.sanitize_filename('../sun.gif')).to eq('sun.gif')
|
||||
@ -273,5 +223,4 @@ describe Petstore::ApiClient do
|
||||
expect(api_client.sanitize_filename('.\sun.gif')).to eq('sun.gif')
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
@ -1,55 +1,42 @@
|
||||
=begin
|
||||
#OpenAPI Petstore
|
||||
|
||||
#This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
OpenAPI Generator version: 3.3.4-SNAPSHOT
|
||||
|
||||
=end
|
||||
|
||||
require 'spec_helper'
|
||||
|
||||
describe Petstore::Configuration do
|
||||
let(:config) { Petstore::Configuration.default }
|
||||
|
||||
before(:each) do
|
||||
Petstore.configure do |c|
|
||||
c.host = 'petstore.swagger.io'
|
||||
c.base_path = 'v2'
|
||||
end
|
||||
# uncomment below to setup host and base_path
|
||||
# require 'URI'
|
||||
# uri = URI.parse("http://petstore.swagger.io:80/v2")
|
||||
# Petstore.configure do |c|
|
||||
# c.host = uri.host
|
||||
# c.base_path = uri.path
|
||||
# end
|
||||
end
|
||||
|
||||
describe '#base_url' do
|
||||
it 'should have the default value' do
|
||||
expect(config.base_url).to eq('http://petstore.swagger.io/v2')
|
||||
# uncomment below to test default value of the base path
|
||||
# expect(config.base_url).to eq("http://petstore.swagger.io:80/v2")
|
||||
end
|
||||
|
||||
it 'should remove trailing slashes' do
|
||||
[nil, '', '/', '//'].each do |base_path|
|
||||
config.base_path = base_path
|
||||
expect(config.base_url).to eq('http://petstore.swagger.io')
|
||||
# uncomment below to test trailing slashes
|
||||
# expect(config.base_url).to eq("http://petstore.swagger.io:80/v2")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
describe 'server settings' do
|
||||
it 'should return an array of server settings' do
|
||||
expect(config.auth_settings).not_to be_empty
|
||||
end
|
||||
|
||||
it 'should get the first url' do
|
||||
url = config.server_url(0, server: "dev-petstore", port: "8080")
|
||||
expect(url).to eq("http://dev-petstore.swagger.io:8080/v2")
|
||||
end
|
||||
|
||||
it 'should get the first url with default values' do
|
||||
url = config.server_url(0)
|
||||
expect(url).to eq("http://petstore.swagger.io:80/v2")
|
||||
end
|
||||
|
||||
it 'should get the second url with default values' do
|
||||
url = config.server_url(1)
|
||||
expect(url).to eq("https://localhost:8080/v2")
|
||||
end
|
||||
|
||||
it 'should get the second url' do
|
||||
url = config.server_url(1, version: "v1")
|
||||
expect(url).to eq("https://localhost:8080/v1")
|
||||
end
|
||||
|
||||
it 'should raise error due to invalid enum value' do
|
||||
expect{config.server_url(1, version: "v6")}.to raise_error(ArgumentError)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -1,12 +1,12 @@
|
||||
=begin
|
||||
#Swagger Petstore
|
||||
#OpenAPI Petstore
|
||||
|
||||
#This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
Contact: apiteam@swagger.io
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
Swagger Codegen version: 3.0.0-SNAPSHOT
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
OpenAPI Generator version: 3.3.4-SNAPSHOT
|
||||
|
||||
=end
|
||||
|
||||
@ -15,7 +15,7 @@ require 'json'
|
||||
require 'date'
|
||||
|
||||
# Unit tests for Petstore::AdditionalPropertiesClass
|
||||
# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
|
||||
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
||||
# Please update as you see appropriate
|
||||
describe 'AdditionalPropertiesClass' do
|
||||
before do
|
||||
|
@ -1,12 +1,12 @@
|
||||
=begin
|
||||
#Swagger Petstore
|
||||
#OpenAPI Petstore
|
||||
|
||||
#This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
Contact: apiteam@swagger.io
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
Swagger Codegen version: 3.0.0-SNAPSHOT
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
OpenAPI Generator version: 3.3.4-SNAPSHOT
|
||||
|
||||
=end
|
||||
|
||||
@ -15,7 +15,7 @@ require 'json'
|
||||
require 'date'
|
||||
|
||||
# Unit tests for Petstore::AnimalFarm
|
||||
# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
|
||||
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
||||
# Please update as you see appropriate
|
||||
describe 'AnimalFarm' do
|
||||
before do
|
||||
|
@ -1,12 +1,12 @@
|
||||
=begin
|
||||
#Swagger Petstore
|
||||
#OpenAPI Petstore
|
||||
|
||||
#This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
Contact: apiteam@swagger.io
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
Swagger Codegen version: 3.0.0-SNAPSHOT
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
OpenAPI Generator version: 3.3.4-SNAPSHOT
|
||||
|
||||
=end
|
||||
|
||||
@ -15,7 +15,7 @@ require 'json'
|
||||
require 'date'
|
||||
|
||||
# Unit tests for Petstore::Animal
|
||||
# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
|
||||
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
||||
# Please update as you see appropriate
|
||||
describe 'Animal' do
|
||||
before do
|
||||
|
@ -1,12 +1,12 @@
|
||||
=begin
|
||||
#Swagger Petstore
|
||||
#OpenAPI Petstore
|
||||
|
||||
#This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
Contact: apiteam@swagger.io
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
Swagger Codegen version: 3.0.0-SNAPSHOT
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
OpenAPI Generator version: 3.3.4-SNAPSHOT
|
||||
|
||||
=end
|
||||
|
||||
@ -15,7 +15,7 @@ require 'json'
|
||||
require 'date'
|
||||
|
||||
# Unit tests for Petstore::ApiResponse
|
||||
# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
|
||||
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
||||
# Please update as you see appropriate
|
||||
describe 'ApiResponse' do
|
||||
before do
|
||||
|
@ -1,12 +1,12 @@
|
||||
=begin
|
||||
#Swagger Petstore
|
||||
#OpenAPI Petstore
|
||||
|
||||
#This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
Contact: apiteam@swagger.io
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
Swagger Codegen version: 3.0.0-SNAPSHOT
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
OpenAPI Generator version: 3.3.4-SNAPSHOT
|
||||
|
||||
=end
|
||||
|
||||
@ -15,7 +15,7 @@ require 'json'
|
||||
require 'date'
|
||||
|
||||
# Unit tests for Petstore::ArrayOfArrayOfNumberOnly
|
||||
# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
|
||||
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
||||
# Please update as you see appropriate
|
||||
describe 'ArrayOfArrayOfNumberOnly' do
|
||||
before do
|
||||
|
@ -1,12 +1,12 @@
|
||||
=begin
|
||||
#Swagger Petstore
|
||||
#OpenAPI Petstore
|
||||
|
||||
#This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
Contact: apiteam@swagger.io
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
Swagger Codegen version: 3.0.0-SNAPSHOT
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
OpenAPI Generator version: 3.3.4-SNAPSHOT
|
||||
|
||||
=end
|
||||
|
||||
@ -15,7 +15,7 @@ require 'json'
|
||||
require 'date'
|
||||
|
||||
# Unit tests for Petstore::ArrayOfNumberOnly
|
||||
# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
|
||||
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
||||
# Please update as you see appropriate
|
||||
describe 'ArrayOfNumberOnly' do
|
||||
before do
|
||||
|
@ -1,12 +1,12 @@
|
||||
=begin
|
||||
#Swagger Petstore
|
||||
#OpenAPI Petstore
|
||||
|
||||
#This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
Contact: apiteam@swagger.io
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
Swagger Codegen version: 3.0.0-SNAPSHOT
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
OpenAPI Generator version: 3.3.4-SNAPSHOT
|
||||
|
||||
=end
|
||||
|
||||
@ -15,7 +15,7 @@ require 'json'
|
||||
require 'date'
|
||||
|
||||
# Unit tests for Petstore::ArrayTest
|
||||
# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
|
||||
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
||||
# Please update as you see appropriate
|
||||
describe 'ArrayTest' do
|
||||
before do
|
||||
|
@ -1,12 +1,12 @@
|
||||
=begin
|
||||
#Swagger Petstore
|
||||
#OpenAPI Petstore
|
||||
|
||||
#This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
Contact: apiteam@swagger.io
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
Swagger Codegen version: 3.0.0-SNAPSHOT
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
OpenAPI Generator version: 3.3.4-SNAPSHOT
|
||||
|
||||
=end
|
||||
|
||||
@ -15,7 +15,7 @@ require 'json'
|
||||
require 'date'
|
||||
|
||||
# Unit tests for Petstore::Capitalization
|
||||
# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
|
||||
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
||||
# Please update as you see appropriate
|
||||
describe 'Capitalization' do
|
||||
before do
|
||||
|
@ -1,12 +1,12 @@
|
||||
=begin
|
||||
#Swagger Petstore
|
||||
#OpenAPI Petstore
|
||||
|
||||
#This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
Contact: apiteam@swagger.io
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
Swagger Codegen version: 3.0.0-SNAPSHOT
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
OpenAPI Generator version: 3.3.4-SNAPSHOT
|
||||
|
||||
=end
|
||||
|
||||
@ -15,7 +15,7 @@ require 'json'
|
||||
require 'date'
|
||||
|
||||
# Unit tests for Petstore::Cat
|
||||
# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
|
||||
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
||||
# Please update as you see appropriate
|
||||
describe 'Cat' do
|
||||
before do
|
||||
|
@ -1,12 +1,12 @@
|
||||
=begin
|
||||
#Swagger Petstore
|
||||
#OpenAPI Petstore
|
||||
|
||||
#This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
Contact: apiteam@swagger.io
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
Swagger Codegen version: 3.0.0-SNAPSHOT
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
OpenAPI Generator version: 3.3.4-SNAPSHOT
|
||||
|
||||
=end
|
||||
|
||||
@ -15,7 +15,7 @@ require 'json'
|
||||
require 'date'
|
||||
|
||||
# Unit tests for Petstore::Category
|
||||
# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
|
||||
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
||||
# Please update as you see appropriate
|
||||
describe 'Category' do
|
||||
before do
|
||||
|
@ -1,12 +1,12 @@
|
||||
=begin
|
||||
#Swagger Petstore
|
||||
#OpenAPI Petstore
|
||||
|
||||
#This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
Contact: apiteam@swagger.io
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
Swagger Codegen version: 3.0.0-SNAPSHOT
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
OpenAPI Generator version: 3.3.4-SNAPSHOT
|
||||
|
||||
=end
|
||||
|
||||
@ -15,7 +15,7 @@ require 'json'
|
||||
require 'date'
|
||||
|
||||
# Unit tests for Petstore::ClassModel
|
||||
# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
|
||||
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
||||
# Please update as you see appropriate
|
||||
describe 'ClassModel' do
|
||||
before do
|
||||
|
@ -1,12 +1,12 @@
|
||||
=begin
|
||||
#Swagger Petstore
|
||||
#OpenAPI Petstore
|
||||
|
||||
#This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
Contact: apiteam@swagger.io
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
Swagger Codegen version: 3.0.0-SNAPSHOT
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
OpenAPI Generator version: 3.3.4-SNAPSHOT
|
||||
|
||||
=end
|
||||
|
||||
@ -15,7 +15,7 @@ require 'json'
|
||||
require 'date'
|
||||
|
||||
# Unit tests for Petstore::Client
|
||||
# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
|
||||
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
||||
# Please update as you see appropriate
|
||||
describe 'Client' do
|
||||
before do
|
||||
|
@ -1,12 +1,12 @@
|
||||
=begin
|
||||
#Swagger Petstore
|
||||
#OpenAPI Petstore
|
||||
|
||||
#This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
Contact: apiteam@swagger.io
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
Swagger Codegen version: 3.0.0-SNAPSHOT
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
OpenAPI Generator version: 3.3.4-SNAPSHOT
|
||||
|
||||
=end
|
||||
|
||||
@ -15,7 +15,7 @@ require 'json'
|
||||
require 'date'
|
||||
|
||||
# Unit tests for Petstore::Dog
|
||||
# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
|
||||
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
||||
# Please update as you see appropriate
|
||||
describe 'Dog' do
|
||||
before do
|
||||
|
@ -1,12 +1,12 @@
|
||||
=begin
|
||||
#Swagger Petstore
|
||||
#OpenAPI Petstore
|
||||
|
||||
#This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
Contact: apiteam@swagger.io
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
Swagger Codegen version: 3.0.0-SNAPSHOT
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
OpenAPI Generator version: 3.3.4-SNAPSHOT
|
||||
|
||||
=end
|
||||
|
||||
@ -15,7 +15,7 @@ require 'json'
|
||||
require 'date'
|
||||
|
||||
# Unit tests for Petstore::EnumArrays
|
||||
# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
|
||||
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
||||
# Please update as you see appropriate
|
||||
describe 'EnumArrays' do
|
||||
before do
|
||||
|
@ -1,12 +1,12 @@
|
||||
=begin
|
||||
#Swagger Petstore
|
||||
#OpenAPI Petstore
|
||||
|
||||
#This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
Contact: apiteam@swagger.io
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
Swagger Codegen version: 3.0.0-SNAPSHOT
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
OpenAPI Generator version: 3.3.4-SNAPSHOT
|
||||
|
||||
=end
|
||||
|
||||
@ -15,7 +15,7 @@ require 'json'
|
||||
require 'date'
|
||||
|
||||
# Unit tests for Petstore::EnumClass
|
||||
# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
|
||||
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
||||
# Please update as you see appropriate
|
||||
describe 'EnumClass' do
|
||||
before do
|
||||
|
@ -1,12 +1,12 @@
|
||||
=begin
|
||||
#Swagger Petstore
|
||||
#OpenAPI Petstore
|
||||
|
||||
#This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
Contact: apiteam@swagger.io
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
Swagger Codegen version: 3.0.0-SNAPSHOT
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
OpenAPI Generator version: 3.3.4-SNAPSHOT
|
||||
|
||||
=end
|
||||
|
||||
@ -15,7 +15,7 @@ require 'json'
|
||||
require 'date'
|
||||
|
||||
# Unit tests for Petstore::EnumTest
|
||||
# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
|
||||
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
||||
# Please update as you see appropriate
|
||||
describe 'EnumTest' do
|
||||
before do
|
||||
|
@ -6,7 +6,7 @@
|
||||
OpenAPI spec version: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
OpenAPI Generator version: 3.1.0-SNAPSHOT
|
||||
OpenAPI Generator version: 3.3.4-SNAPSHOT
|
||||
|
||||
=end
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
OpenAPI spec version: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
OpenAPI Generator version: 3.1.0-SNAPSHOT
|
||||
OpenAPI Generator version: 3.3.4-SNAPSHOT
|
||||
|
||||
=end
|
||||
|
||||
|
@ -1,12 +1,12 @@
|
||||
=begin
|
||||
#Swagger Petstore
|
||||
#OpenAPI Petstore
|
||||
|
||||
#This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
Contact: apiteam@swagger.io
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
Swagger Codegen version: 3.0.0-SNAPSHOT
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
OpenAPI Generator version: 3.3.4-SNAPSHOT
|
||||
|
||||
=end
|
||||
|
||||
@ -15,7 +15,7 @@ require 'json'
|
||||
require 'date'
|
||||
|
||||
# Unit tests for Petstore::FormatTest
|
||||
# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
|
||||
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
||||
# Please update as you see appropriate
|
||||
describe 'FormatTest' do
|
||||
before do
|
||||
@ -110,31 +110,4 @@ describe 'FormatTest' do
|
||||
end
|
||||
end
|
||||
|
||||
describe 'test attribute "pattern_with_digits"' do
|
||||
it 'should accept string "1234567890"' do
|
||||
@instance.pattern_with_digits = '1234567890'
|
||||
end
|
||||
|
||||
it 'should accept string with leading zero "0123456789"' do
|
||||
@instance.pattern_with_digits = '0123456789'
|
||||
end
|
||||
|
||||
it 'should reject string with non digits "ABC3456789"' do
|
||||
expect {@instance.pattern_with_digits = 'ABC3456789'}.to raise_error(ArgumentError)
|
||||
end
|
||||
|
||||
it 'should reject string less than 10 in length "123456789"' do
|
||||
expect {@instance.pattern_with_digits = '123456789'}.to raise_error(ArgumentError)
|
||||
end
|
||||
|
||||
it 'should reject string more than 10 in length "0123456789123"' do
|
||||
expect {@instance.pattern_with_digits = '0123456789123'}.to raise_error(ArgumentError)
|
||||
end
|
||||
end
|
||||
|
||||
describe 'test attribute "pattern_with_digits_and_delimiter"' do
|
||||
it 'should accept string "Image_01"' do
|
||||
@instance.pattern_with_digits_and_delimiter = 'Image_01'
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -1,12 +1,12 @@
|
||||
=begin
|
||||
#Swagger Petstore
|
||||
#OpenAPI Petstore
|
||||
|
||||
#This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
Contact: apiteam@swagger.io
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
Swagger Codegen version: 3.0.0-SNAPSHOT
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
OpenAPI Generator version: 3.3.4-SNAPSHOT
|
||||
|
||||
=end
|
||||
|
||||
@ -15,7 +15,7 @@ require 'json'
|
||||
require 'date'
|
||||
|
||||
# Unit tests for Petstore::HasOnlyReadOnly
|
||||
# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
|
||||
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
||||
# Please update as you see appropriate
|
||||
describe 'HasOnlyReadOnly' do
|
||||
before do
|
||||
|
@ -1,12 +1,12 @@
|
||||
=begin
|
||||
#Swagger Petstore
|
||||
#OpenAPI Petstore
|
||||
|
||||
#This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
Contact: apiteam@swagger.io
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
Swagger Codegen version: 3.0.0-SNAPSHOT
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
OpenAPI Generator version: 3.3.4-SNAPSHOT
|
||||
|
||||
=end
|
||||
|
||||
@ -15,7 +15,7 @@ require 'json'
|
||||
require 'date'
|
||||
|
||||
# Unit tests for Petstore::List
|
||||
# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
|
||||
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
||||
# Please update as you see appropriate
|
||||
describe 'List' do
|
||||
before do
|
||||
|
@ -1,12 +1,12 @@
|
||||
=begin
|
||||
#Swagger Petstore
|
||||
#OpenAPI Petstore
|
||||
|
||||
#This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
Contact: apiteam@swagger.io
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
Swagger Codegen version: 3.0.0-SNAPSHOT
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
OpenAPI Generator version: 3.3.4-SNAPSHOT
|
||||
|
||||
=end
|
||||
|
||||
@ -15,7 +15,7 @@ require 'json'
|
||||
require 'date'
|
||||
|
||||
# Unit tests for Petstore::MapTest
|
||||
# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
|
||||
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
||||
# Please update as you see appropriate
|
||||
describe 'MapTest' do
|
||||
before do
|
||||
@ -48,4 +48,16 @@ describe 'MapTest' do
|
||||
end
|
||||
end
|
||||
|
||||
describe 'test attribute "direct_map"' do
|
||||
it 'should work' do
|
||||
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
||||
end
|
||||
end
|
||||
|
||||
describe 'test attribute "indirect_map"' do
|
||||
it 'should work' do
|
||||
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
@ -1,12 +1,12 @@
|
||||
=begin
|
||||
#Swagger Petstore
|
||||
#OpenAPI Petstore
|
||||
|
||||
#This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
Contact: apiteam@swagger.io
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
Swagger Codegen version: 3.0.0-SNAPSHOT
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
OpenAPI Generator version: 3.3.4-SNAPSHOT
|
||||
|
||||
=end
|
||||
|
||||
@ -15,7 +15,7 @@ require 'json'
|
||||
require 'date'
|
||||
|
||||
# Unit tests for Petstore::MixedPropertiesAndAdditionalPropertiesClass
|
||||
# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
|
||||
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
||||
# Please update as you see appropriate
|
||||
describe 'MixedPropertiesAndAdditionalPropertiesClass' do
|
||||
before do
|
||||
|
@ -1,12 +1,12 @@
|
||||
=begin
|
||||
#Swagger Petstore
|
||||
#OpenAPI Petstore
|
||||
|
||||
#This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
Contact: apiteam@swagger.io
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
Swagger Codegen version: 3.0.0-SNAPSHOT
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
OpenAPI Generator version: 3.3.4-SNAPSHOT
|
||||
|
||||
=end
|
||||
|
||||
@ -15,7 +15,7 @@ require 'json'
|
||||
require 'date'
|
||||
|
||||
# Unit tests for Petstore::Model200Response
|
||||
# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
|
||||
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
||||
# Please update as you see appropriate
|
||||
describe 'Model200Response' do
|
||||
before do
|
||||
|
@ -1,12 +1,12 @@
|
||||
=begin
|
||||
#Swagger Petstore
|
||||
#OpenAPI Petstore
|
||||
|
||||
#This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
Contact: apiteam@swagger.io
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
Swagger Codegen version: 3.0.0-SNAPSHOT
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
OpenAPI Generator version: 3.3.4-SNAPSHOT
|
||||
|
||||
=end
|
||||
|
||||
@ -15,7 +15,7 @@ require 'json'
|
||||
require 'date'
|
||||
|
||||
# Unit tests for Petstore::ModelReturn
|
||||
# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
|
||||
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
||||
# Please update as you see appropriate
|
||||
describe 'ModelReturn' do
|
||||
before do
|
||||
|
@ -1,12 +1,12 @@
|
||||
=begin
|
||||
#Swagger Petstore
|
||||
#OpenAPI Petstore
|
||||
|
||||
#This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
Contact: apiteam@swagger.io
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
Swagger Codegen version: 3.0.0-SNAPSHOT
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
OpenAPI Generator version: 3.3.4-SNAPSHOT
|
||||
|
||||
=end
|
||||
|
||||
@ -15,7 +15,7 @@ require 'json'
|
||||
require 'date'
|
||||
|
||||
# Unit tests for Petstore::Name
|
||||
# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
|
||||
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
||||
# Please update as you see appropriate
|
||||
describe 'Name' do
|
||||
before do
|
||||
|
@ -1,12 +1,12 @@
|
||||
=begin
|
||||
#Swagger Petstore
|
||||
#OpenAPI Petstore
|
||||
|
||||
#This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
Contact: apiteam@swagger.io
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
Swagger Codegen version: 3.0.0-SNAPSHOT
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
OpenAPI Generator version: 3.3.4-SNAPSHOT
|
||||
|
||||
=end
|
||||
|
||||
@ -15,7 +15,7 @@ require 'json'
|
||||
require 'date'
|
||||
|
||||
# Unit tests for Petstore::NumberOnly
|
||||
# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
|
||||
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
||||
# Please update as you see appropriate
|
||||
describe 'NumberOnly' do
|
||||
before do
|
||||
|
@ -1,12 +1,12 @@
|
||||
=begin
|
||||
#Swagger Petstore
|
||||
#OpenAPI Petstore
|
||||
|
||||
#This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
Contact: apiteam@swagger.io
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
Swagger Codegen version: 3.0.0-SNAPSHOT
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
OpenAPI Generator version: 3.3.4-SNAPSHOT
|
||||
|
||||
=end
|
||||
|
||||
@ -15,7 +15,7 @@ require 'json'
|
||||
require 'date'
|
||||
|
||||
# Unit tests for Petstore::Order
|
||||
# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
|
||||
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
||||
# Please update as you see appropriate
|
||||
describe 'Order' do
|
||||
before do
|
||||
|
@ -1,12 +1,12 @@
|
||||
=begin
|
||||
#Swagger Petstore
|
||||
#OpenAPI Petstore
|
||||
|
||||
#This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
Contact: apiteam@swagger.io
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
Swagger Codegen version: 3.0.0-SNAPSHOT
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
OpenAPI Generator version: 3.3.4-SNAPSHOT
|
||||
|
||||
=end
|
||||
|
||||
@ -15,7 +15,7 @@ require 'json'
|
||||
require 'date'
|
||||
|
||||
# Unit tests for Petstore::OuterComposite
|
||||
# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
|
||||
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
||||
# Please update as you see appropriate
|
||||
describe 'OuterComposite' do
|
||||
before do
|
||||
|
@ -1,12 +1,12 @@
|
||||
=begin
|
||||
#Swagger Petstore
|
||||
#OpenAPI Petstore
|
||||
|
||||
#This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
Contact: apiteam@swagger.io
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
Swagger Codegen version: 3.0.0-SNAPSHOT
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
OpenAPI Generator version: 3.3.4-SNAPSHOT
|
||||
|
||||
=end
|
||||
|
||||
@ -15,7 +15,7 @@ require 'json'
|
||||
require 'date'
|
||||
|
||||
# Unit tests for Petstore::OuterEnum
|
||||
# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
|
||||
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
||||
# Please update as you see appropriate
|
||||
describe 'OuterEnum' do
|
||||
before do
|
||||
|
@ -1,12 +1,12 @@
|
||||
=begin
|
||||
#Swagger Petstore
|
||||
#OpenAPI Petstore
|
||||
|
||||
#This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
Contact: apiteam@swagger.io
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
Swagger Codegen version: 3.0.0-SNAPSHOT
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
OpenAPI Generator version: 3.3.4-SNAPSHOT
|
||||
|
||||
=end
|
||||
|
||||
@ -15,7 +15,7 @@ require 'json'
|
||||
require 'date'
|
||||
|
||||
# Unit tests for Petstore::Pet
|
||||
# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
|
||||
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
||||
# Please update as you see appropriate
|
||||
describe 'Pet' do
|
||||
before do
|
||||
|
@ -1,12 +1,12 @@
|
||||
=begin
|
||||
#Swagger Petstore
|
||||
#OpenAPI Petstore
|
||||
|
||||
#This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
Contact: apiteam@swagger.io
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
Swagger Codegen version: 3.0.0-SNAPSHOT
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
OpenAPI Generator version: 3.3.4-SNAPSHOT
|
||||
|
||||
=end
|
||||
|
||||
@ -15,7 +15,7 @@ require 'json'
|
||||
require 'date'
|
||||
|
||||
# Unit tests for Petstore::ReadOnlyFirst
|
||||
# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
|
||||
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
||||
# Please update as you see appropriate
|
||||
describe 'ReadOnlyFirst' do
|
||||
before do
|
||||
|
@ -1,12 +1,12 @@
|
||||
=begin
|
||||
#Swagger Petstore
|
||||
#OpenAPI Petstore
|
||||
|
||||
#This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
Contact: apiteam@swagger.io
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
Swagger Codegen version: 3.0.0-SNAPSHOT
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
OpenAPI Generator version: 3.3.4-SNAPSHOT
|
||||
|
||||
=end
|
||||
|
||||
@ -15,7 +15,7 @@ require 'json'
|
||||
require 'date'
|
||||
|
||||
# Unit tests for Petstore::SpecialModelName
|
||||
# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
|
||||
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
||||
# Please update as you see appropriate
|
||||
describe 'SpecialModelName' do
|
||||
before do
|
||||
|
@ -6,7 +6,7 @@
|
||||
OpenAPI spec version: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
OpenAPI Generator version: 3.0.3-SNAPSHOT
|
||||
OpenAPI Generator version: 3.3.4-SNAPSHOT
|
||||
|
||||
=end
|
||||
|
||||
|
@ -1,12 +1,12 @@
|
||||
=begin
|
||||
#Swagger Petstore
|
||||
#OpenAPI Petstore
|
||||
|
||||
#This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
Contact: apiteam@swagger.io
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
Swagger Codegen version: 3.0.0-SNAPSHOT
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
OpenAPI Generator version: 3.3.4-SNAPSHOT
|
||||
|
||||
=end
|
||||
|
||||
@ -15,7 +15,7 @@ require 'json'
|
||||
require 'date'
|
||||
|
||||
# Unit tests for Petstore::Tag
|
||||
# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
|
||||
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
||||
# Please update as you see appropriate
|
||||
describe 'Tag' do
|
||||
before do
|
||||
|
@ -1,12 +1,12 @@
|
||||
=begin
|
||||
#Swagger Petstore
|
||||
#OpenAPI Petstore
|
||||
|
||||
#This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
Contact: apiteam@swagger.io
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
Swagger Codegen version: 3.0.0-SNAPSHOT
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
OpenAPI Generator version: 3.3.4-SNAPSHOT
|
||||
|
||||
=end
|
||||
|
||||
@ -15,7 +15,7 @@ require 'json'
|
||||
require 'date'
|
||||
|
||||
# Unit tests for Petstore::User
|
||||
# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
|
||||
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
||||
# Please update as you see appropriate
|
||||
describe 'User' do
|
||||
before do
|
||||
|
@ -1,3 +1,15 @@
|
||||
=begin
|
||||
#OpenAPI Petstore
|
||||
|
||||
#This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
OpenAPI Generator version: 3.3.4-SNAPSHOT
|
||||
|
||||
=end
|
||||
|
||||
# load the gem
|
||||
require 'petstore'
|
||||
|
||||
@ -97,51 +109,3 @@ RSpec.configure do |config|
|
||||
Kernel.srand config.seed
|
||||
=end
|
||||
end
|
||||
|
||||
# API client (shared between all the test cases)
|
||||
API_CLIENT = Petstore::ApiClient.new(Petstore::Configuration.new)
|
||||
|
||||
# randomly generate an ID
|
||||
def random_id
|
||||
rand(1000000) + 20000
|
||||
end
|
||||
|
||||
# create a random pet, return its id
|
||||
def prepare_pet(pet_api)
|
||||
pet_id = random_id
|
||||
category = Petstore::Category.new('id' => 20002, 'name' => 'category test')
|
||||
tag = Petstore::Tag.new('id' => 30002, 'name' => 'tag test')
|
||||
pet = Petstore::Pet.new('id' => pet_id, 'name' => "RUBY UNIT TESTING", 'photo_urls' => 'photo url',
|
||||
'category' => category, 'tags' => [tag], 'status' => 'pending')
|
||||
pet_api.add_pet(pet)
|
||||
pet_id
|
||||
end
|
||||
|
||||
# create a random order, return its id
|
||||
def prepare_store(store_api)
|
||||
order_id = 5
|
||||
order = Petstore::Order.new("id" => order_id,
|
||||
"petId" => 123,
|
||||
"quantity" => 789,
|
||||
"shipDate" => "2015-04-06T23:42:01.678Z",
|
||||
"status" => "placed",
|
||||
"complete" => false)
|
||||
store_api.place_order(order)
|
||||
order_id
|
||||
end
|
||||
|
||||
# A random string to tack onto stuff to ensure we're not seeing
|
||||
# data from a previous test run
|
||||
RAND = ("a".."z").to_a.sample(8).join
|
||||
|
||||
# helper method to serialize object to json string
|
||||
def serialize_json(o)
|
||||
API_CLIENT.object_to_http_body(o)
|
||||
end
|
||||
|
||||
# helper method to deserialize json string back to object
|
||||
def deserialize_json(s, type)
|
||||
headers = { 'Content-Type' => 'application/json' }
|
||||
response = double('response', headers: headers, body: s)
|
||||
API_CLIENT.deserialize(response, type)
|
||||
end
|
||||
|
39
samples/openapi3/client/petstore/ruby/.gitignore
vendored
Normal file
39
samples/openapi3/client/petstore/ruby/.gitignore
vendored
Normal file
@ -0,0 +1,39 @@
|
||||
# Generated by: https://openapi-generator.tech
|
||||
#
|
||||
|
||||
*.gem
|
||||
*.rbc
|
||||
/.config
|
||||
/coverage/
|
||||
/InstalledFiles
|
||||
/pkg/
|
||||
/spec/reports/
|
||||
/spec/examples.txt
|
||||
/test/tmp/
|
||||
/test/version_tmp/
|
||||
/tmp/
|
||||
|
||||
## Specific to RubyMotion:
|
||||
.dat*
|
||||
.repl_history
|
||||
build/
|
||||
|
||||
## Documentation cache and generated files:
|
||||
/.yardoc/
|
||||
/_yardoc/
|
||||
/doc/
|
||||
/rdoc/
|
||||
|
||||
## Environment normalization:
|
||||
/.bundle/
|
||||
/vendor/bundle
|
||||
/lib/bundler/man/
|
||||
|
||||
# for a library or gem, you might want to ignore these files since the code is
|
||||
# intended to run in multiple environments; otherwise, check them in:
|
||||
# Gemfile.lock
|
||||
# .ruby-version
|
||||
# .ruby-gemset
|
||||
|
||||
# unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
|
||||
.rvmrc
|
@ -0,0 +1,23 @@
|
||||
# OpenAPI Generator Ignore
|
||||
# Generated by openapi-generator https://github.com/openapitools/openapi-generator
|
||||
|
||||
# Use this file to prevent files from being overwritten by the generator.
|
||||
# The patterns follow closely to .gitignore or .dockerignore.
|
||||
|
||||
# As an example, the C# client generator defines ApiClient.cs.
|
||||
# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:
|
||||
#ApiClient.cs
|
||||
|
||||
# You can match any string of characters against a directory, file or extension with a single asterisk (*):
|
||||
#foo/*/qux
|
||||
# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
|
||||
|
||||
# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
|
||||
#foo/**/qux
|
||||
# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
|
||||
|
||||
# You can also negate patterns with an exclamation (!).
|
||||
# For example, you can ignore all files in a docs folder with the file extension .md:
|
||||
#docs/*.md
|
||||
# Then explicitly reverse the ignore rule for a single file:
|
||||
#!docs/README.md
|
@ -0,0 +1 @@
|
||||
3.3.4-SNAPSHOT
|
2
samples/openapi3/client/petstore/ruby/.rspec
Normal file
2
samples/openapi3/client/petstore/ruby/.rspec
Normal file
@ -0,0 +1,2 @@
|
||||
--color
|
||||
--require spec_helper
|
154
samples/openapi3/client/petstore/ruby/.rubocop.yml
Normal file
154
samples/openapi3/client/petstore/ruby/.rubocop.yml
Normal file
@ -0,0 +1,154 @@
|
||||
# This file is based on https://github.com/rails/rails/blob/master/.rubocop.yml (MIT license)
|
||||
# Automatically generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
AllCops:
|
||||
TargetRubyVersion: 2.2
|
||||
# RuboCop has a bunch of cops enabled by default. This setting tells RuboCop
|
||||
# to ignore them, so only the ones explicitly set in this file are enabled.
|
||||
DisabledByDefault: true
|
||||
Exclude:
|
||||
- '**/templates/**/*'
|
||||
- '**/vendor/**/*'
|
||||
- 'actionpack/lib/action_dispatch/journey/parser.rb'
|
||||
|
||||
# Prefer &&/|| over and/or.
|
||||
Style/AndOr:
|
||||
Enabled: true
|
||||
|
||||
# Do not use braces for hash literals when they are the last argument of a
|
||||
# method call.
|
||||
Style/BracesAroundHashParameters:
|
||||
Enabled: true
|
||||
EnforcedStyle: context_dependent
|
||||
|
||||
# Align `when` with `case`.
|
||||
Layout/CaseIndentation:
|
||||
Enabled: true
|
||||
|
||||
# Align comments with method definitions.
|
||||
Layout/CommentIndentation:
|
||||
Enabled: true
|
||||
|
||||
Layout/ElseAlignment:
|
||||
Enabled: true
|
||||
|
||||
Layout/EmptyLineAfterMagicComment:
|
||||
Enabled: true
|
||||
|
||||
# In a regular class definition, no empty lines around the body.
|
||||
Layout/EmptyLinesAroundClassBody:
|
||||
Enabled: true
|
||||
|
||||
# In a regular method definition, no empty lines around the body.
|
||||
Layout/EmptyLinesAroundMethodBody:
|
||||
Enabled: true
|
||||
|
||||
# In a regular module definition, no empty lines around the body.
|
||||
Layout/EmptyLinesAroundModuleBody:
|
||||
Enabled: true
|
||||
|
||||
Layout/FirstParameterIndentation:
|
||||
Enabled: true
|
||||
|
||||
# Use Ruby >= 1.9 syntax for hashes. Prefer { a: :b } over { :a => :b }.
|
||||
Style/HashSyntax:
|
||||
Enabled: false
|
||||
|
||||
# Method definitions after `private` or `protected` isolated calls need one
|
||||
# extra level of indentation.
|
||||
Layout/IndentationConsistency:
|
||||
Enabled: true
|
||||
EnforcedStyle: rails
|
||||
|
||||
# Two spaces, no tabs (for indentation).
|
||||
Layout/IndentationWidth:
|
||||
Enabled: true
|
||||
|
||||
Layout/LeadingCommentSpace:
|
||||
Enabled: true
|
||||
|
||||
Layout/SpaceAfterColon:
|
||||
Enabled: true
|
||||
|
||||
Layout/SpaceAfterComma:
|
||||
Enabled: true
|
||||
|
||||
Layout/SpaceAroundEqualsInParameterDefault:
|
||||
Enabled: true
|
||||
|
||||
Layout/SpaceAroundKeyword:
|
||||
Enabled: true
|
||||
|
||||
Layout/SpaceAroundOperators:
|
||||
Enabled: true
|
||||
|
||||
Layout/SpaceBeforeComma:
|
||||
Enabled: true
|
||||
|
||||
Layout/SpaceBeforeFirstArg:
|
||||
Enabled: true
|
||||
|
||||
Style/DefWithParentheses:
|
||||
Enabled: true
|
||||
|
||||
# Defining a method with parameters needs parentheses.
|
||||
Style/MethodDefParentheses:
|
||||
Enabled: true
|
||||
|
||||
Style/FrozenStringLiteralComment:
|
||||
Enabled: false
|
||||
EnforcedStyle: always
|
||||
|
||||
# Use `foo {}` not `foo{}`.
|
||||
Layout/SpaceBeforeBlockBraces:
|
||||
Enabled: true
|
||||
|
||||
# Use `foo { bar }` not `foo {bar}`.
|
||||
Layout/SpaceInsideBlockBraces:
|
||||
Enabled: true
|
||||
|
||||
# Use `{ a: 1 }` not `{a:1}`.
|
||||
Layout/SpaceInsideHashLiteralBraces:
|
||||
Enabled: true
|
||||
|
||||
Layout/SpaceInsideParens:
|
||||
Enabled: true
|
||||
|
||||
# Check quotes usage according to lint rule below.
|
||||
#Style/StringLiterals:
|
||||
# Enabled: true
|
||||
# EnforcedStyle: single_quotes
|
||||
|
||||
# Detect hard tabs, no hard tabs.
|
||||
Layout/Tab:
|
||||
Enabled: true
|
||||
|
||||
# Blank lines should not have any spaces.
|
||||
Layout/TrailingBlankLines:
|
||||
Enabled: true
|
||||
|
||||
# No trailing whitespace.
|
||||
Layout/TrailingWhitespace:
|
||||
Enabled: false
|
||||
|
||||
# Use quotes for string literals when they are enough.
|
||||
Style/UnneededPercentQ:
|
||||
Enabled: true
|
||||
|
||||
# Align `end` with the matching keyword or starting expression except for
|
||||
# assignments, where it should be aligned with the LHS.
|
||||
Layout/EndAlignment:
|
||||
Enabled: true
|
||||
EnforcedStyleAlignWith: variable
|
||||
AutoCorrect: true
|
||||
|
||||
# Use my_method(my_arg) not my_method( my_arg ) or my_method my_arg.
|
||||
Lint/RequireParentheses:
|
||||
Enabled: true
|
||||
|
||||
Style/RedundantReturn:
|
||||
Enabled: true
|
||||
AllowMultipleReturnValues: true
|
||||
|
||||
Style/Semicolon:
|
||||
Enabled: true
|
||||
AllowAsExpressionSeparator: true
|
8
samples/openapi3/client/petstore/ruby/Gemfile
Normal file
8
samples/openapi3/client/petstore/ruby/Gemfile
Normal file
@ -0,0 +1,8 @@
|
||||
source 'https://rubygems.org'
|
||||
|
||||
gemspec
|
||||
|
||||
group :development, :test do
|
||||
gem 'rake', '~> 12.0.0'
|
||||
gem 'pry-byebug'
|
||||
end
|
79
samples/openapi3/client/petstore/ruby/Gemfile.lock
Normal file
79
samples/openapi3/client/petstore/ruby/Gemfile.lock
Normal file
@ -0,0 +1,79 @@
|
||||
PATH
|
||||
remote: .
|
||||
specs:
|
||||
petstore (1.0.0)
|
||||
json (~> 2.1, >= 2.1.0)
|
||||
typhoeus (~> 1.0, >= 1.0.1)
|
||||
|
||||
GEM
|
||||
remote: https://rubygems.org/
|
||||
specs:
|
||||
ZenTest (4.11.1)
|
||||
addressable (2.5.2)
|
||||
public_suffix (>= 2.0.2, < 4.0)
|
||||
autotest (4.4.6)
|
||||
ZenTest (>= 4.4.1)
|
||||
autotest-fsevent (0.2.14)
|
||||
sys-uname
|
||||
autotest-growl (0.2.16)
|
||||
autotest-rails-pure (4.1.2)
|
||||
byebug (10.0.2)
|
||||
coderay (1.1.2)
|
||||
crack (0.4.3)
|
||||
safe_yaml (~> 1.0.0)
|
||||
diff-lcs (1.3)
|
||||
ethon (0.11.0)
|
||||
ffi (>= 1.3.0)
|
||||
ffi (1.9.25)
|
||||
hashdiff (0.3.7)
|
||||
json (2.1.0)
|
||||
method_source (0.9.0)
|
||||
pry (0.11.3)
|
||||
coderay (~> 1.1.0)
|
||||
method_source (~> 0.9.0)
|
||||
pry-byebug (3.6.0)
|
||||
byebug (~> 10.0)
|
||||
pry (~> 0.10)
|
||||
public_suffix (3.0.3)
|
||||
rake (12.0.0)
|
||||
rspec (3.8.0)
|
||||
rspec-core (~> 3.8.0)
|
||||
rspec-expectations (~> 3.8.0)
|
||||
rspec-mocks (~> 3.8.0)
|
||||
rspec-core (3.8.0)
|
||||
rspec-support (~> 3.8.0)
|
||||
rspec-expectations (3.8.1)
|
||||
diff-lcs (>= 1.2.0, < 2.0)
|
||||
rspec-support (~> 3.8.0)
|
||||
rspec-mocks (3.8.0)
|
||||
diff-lcs (>= 1.2.0, < 2.0)
|
||||
rspec-support (~> 3.8.0)
|
||||
rspec-support (3.8.0)
|
||||
safe_yaml (1.0.4)
|
||||
sys-uname (1.0.3)
|
||||
ffi (>= 1.0.0)
|
||||
typhoeus (1.3.0)
|
||||
ethon (>= 0.9.0)
|
||||
vcr (3.0.3)
|
||||
webmock (1.24.6)
|
||||
addressable (>= 2.3.6)
|
||||
crack (>= 0.3.2)
|
||||
hashdiff
|
||||
|
||||
PLATFORMS
|
||||
ruby
|
||||
|
||||
DEPENDENCIES
|
||||
autotest (~> 4.4, >= 4.4.6)
|
||||
autotest-fsevent (~> 0.2, >= 0.2.12)
|
||||
autotest-growl (~> 0.2, >= 0.2.16)
|
||||
autotest-rails-pure (~> 4.1, >= 4.1.2)
|
||||
petstore!
|
||||
pry-byebug
|
||||
rake (~> 12.0.0)
|
||||
rspec (~> 3.6, >= 3.6.0)
|
||||
vcr (~> 3.0, >= 3.0.1)
|
||||
webmock (~> 1.24, >= 1.24.3)
|
||||
|
||||
BUNDLED WITH
|
||||
1.16.1
|
183
samples/openapi3/client/petstore/ruby/README.md
Normal file
183
samples/openapi3/client/petstore/ruby/README.md
Normal file
@ -0,0 +1,183 @@
|
||||
# petstore
|
||||
|
||||
Petstore - the Ruby gem for the OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
|
||||
|
||||
- API version: 1.0.0
|
||||
- Package version: 1.0.0
|
||||
- Build package: org.openapitools.codegen.languages.RubyClientCodegen
|
||||
|
||||
## Installation
|
||||
|
||||
### Build a gem
|
||||
|
||||
To build the Ruby code into a gem:
|
||||
|
||||
```shell
|
||||
gem build petstore.gemspec
|
||||
```
|
||||
|
||||
Then either install the gem locally:
|
||||
|
||||
```shell
|
||||
gem install ./petstore-1.0.0.gem
|
||||
```
|
||||
(for development, run `gem install --dev ./petstore-1.0.0.gem` to install the development dependencies)
|
||||
|
||||
or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
|
||||
|
||||
Finally add this to the Gemfile:
|
||||
|
||||
gem 'petstore', '~> 1.0.0'
|
||||
|
||||
### Install from Git
|
||||
|
||||
If the Ruby gem is hosted at a git repository: https://github.com/GIT_USER_ID/GIT_REPO_ID, then add the following in the Gemfile:
|
||||
|
||||
gem 'petstore', :git => 'https://github.com/GIT_USER_ID/GIT_REPO_ID.git'
|
||||
|
||||
### Include the Ruby code directly
|
||||
|
||||
Include the Ruby code directly using `-I` as follows:
|
||||
|
||||
```shell
|
||||
ruby -Ilib script.rb
|
||||
```
|
||||
|
||||
## Getting Started
|
||||
|
||||
Please follow the [installation](#installation) procedure and then run the following code:
|
||||
```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
|
||||
|
||||
```
|
||||
|
||||
## Documentation for API Endpoints
|
||||
|
||||
All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
|
||||
Class | Method | HTTP request | Description
|
||||
------------ | ------------- | ------------- | -------------
|
||||
*Petstore::AnotherFakeApi* | [**call_123_test_special_tags**](docs/AnotherFakeApi.md#call_123_test_special_tags) | **PATCH** /another-fake/dummy | To test special tags
|
||||
*Petstore::DefaultApi* | [**foo_get**](docs/DefaultApi.md#foo_get) | **GET** /foo |
|
||||
*Petstore::FakeApi* | [**fake_outer_boolean_serialize**](docs/FakeApi.md#fake_outer_boolean_serialize) | **POST** /fake/outer/boolean |
|
||||
*Petstore::FakeApi* | [**fake_outer_composite_serialize**](docs/FakeApi.md#fake_outer_composite_serialize) | **POST** /fake/outer/composite |
|
||||
*Petstore::FakeApi* | [**fake_outer_number_serialize**](docs/FakeApi.md#fake_outer_number_serialize) | **POST** /fake/outer/number |
|
||||
*Petstore::FakeApi* | [**fake_outer_string_serialize**](docs/FakeApi.md#fake_outer_string_serialize) | **POST** /fake/outer/string |
|
||||
*Petstore::FakeApi* | [**test_body_with_file_schema**](docs/FakeApi.md#test_body_with_file_schema) | **PUT** /fake/body-with-file-schema |
|
||||
*Petstore::FakeApi* | [**test_body_with_query_params**](docs/FakeApi.md#test_body_with_query_params) | **PUT** /fake/body-with-query-params |
|
||||
*Petstore::FakeApi* | [**test_client_model**](docs/FakeApi.md#test_client_model) | **PATCH** /fake | To test \"client\" model
|
||||
*Petstore::FakeApi* | [**test_endpoint_parameters**](docs/FakeApi.md#test_endpoint_parameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||
*Petstore::FakeApi* | [**test_enum_parameters**](docs/FakeApi.md#test_enum_parameters) | **GET** /fake | To test enum parameters
|
||||
*Petstore::FakeApi* | [**test_group_parameters**](docs/FakeApi.md#test_group_parameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional)
|
||||
*Petstore::FakeApi* | [**test_inline_additional_properties**](docs/FakeApi.md#test_inline_additional_properties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties
|
||||
*Petstore::FakeApi* | [**test_json_form_data**](docs/FakeApi.md#test_json_form_data) | **GET** /fake/jsonFormData | test json serialization of form data
|
||||
*Petstore::FakeClassnameTags123Api* | [**test_classname**](docs/FakeClassnameTags123Api.md#test_classname) | **PATCH** /fake_classname_test | To test class name in snake case
|
||||
*Petstore::PetApi* | [**add_pet**](docs/PetApi.md#add_pet) | **POST** /pet | Add a new pet to the store
|
||||
*Petstore::PetApi* | [**delete_pet**](docs/PetApi.md#delete_pet) | **DELETE** /pet/{petId} | Deletes a pet
|
||||
*Petstore::PetApi* | [**find_pets_by_status**](docs/PetApi.md#find_pets_by_status) | **GET** /pet/findByStatus | Finds Pets by status
|
||||
*Petstore::PetApi* | [**find_pets_by_tags**](docs/PetApi.md#find_pets_by_tags) | **GET** /pet/findByTags | Finds Pets by tags
|
||||
*Petstore::PetApi* | [**get_pet_by_id**](docs/PetApi.md#get_pet_by_id) | **GET** /pet/{petId} | Find pet by ID
|
||||
*Petstore::PetApi* | [**update_pet**](docs/PetApi.md#update_pet) | **PUT** /pet | Update an existing pet
|
||||
*Petstore::PetApi* | [**update_pet_with_form**](docs/PetApi.md#update_pet_with_form) | **POST** /pet/{petId} | Updates a pet in the store with form data
|
||||
*Petstore::PetApi* | [**upload_file**](docs/PetApi.md#upload_file) | **POST** /pet/{petId}/uploadImage | uploads an image
|
||||
*Petstore::PetApi* | [**upload_file_with_required_file**](docs/PetApi.md#upload_file_with_required_file) | **POST** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required)
|
||||
*Petstore::StoreApi* | [**delete_order**](docs/StoreApi.md#delete_order) | **DELETE** /store/order/{order_id} | Delete purchase order by ID
|
||||
*Petstore::StoreApi* | [**get_inventory**](docs/StoreApi.md#get_inventory) | **GET** /store/inventory | Returns pet inventories by status
|
||||
*Petstore::StoreApi* | [**get_order_by_id**](docs/StoreApi.md#get_order_by_id) | **GET** /store/order/{order_id} | Find purchase order by ID
|
||||
*Petstore::StoreApi* | [**place_order**](docs/StoreApi.md#place_order) | **POST** /store/order | Place an order for a pet
|
||||
*Petstore::UserApi* | [**create_user**](docs/UserApi.md#create_user) | **POST** /user | Create user
|
||||
*Petstore::UserApi* | [**create_users_with_array_input**](docs/UserApi.md#create_users_with_array_input) | **POST** /user/createWithArray | Creates list of users with given input array
|
||||
*Petstore::UserApi* | [**create_users_with_list_input**](docs/UserApi.md#create_users_with_list_input) | **POST** /user/createWithList | Creates list of users with given input array
|
||||
*Petstore::UserApi* | [**delete_user**](docs/UserApi.md#delete_user) | **DELETE** /user/{username} | Delete user
|
||||
*Petstore::UserApi* | [**get_user_by_name**](docs/UserApi.md#get_user_by_name) | **GET** /user/{username} | Get user by user name
|
||||
*Petstore::UserApi* | [**login_user**](docs/UserApi.md#login_user) | **GET** /user/login | Logs user into the system
|
||||
*Petstore::UserApi* | [**logout_user**](docs/UserApi.md#logout_user) | **GET** /user/logout | Logs out current logged in user session
|
||||
*Petstore::UserApi* | [**update_user**](docs/UserApi.md#update_user) | **PUT** /user/{username} | Updated user
|
||||
|
||||
|
||||
## Documentation for Models
|
||||
|
||||
- [Petstore::AdditionalPropertiesClass](docs/AdditionalPropertiesClass.md)
|
||||
- [Petstore::Animal](docs/Animal.md)
|
||||
- [Petstore::AnimalFarm](docs/AnimalFarm.md)
|
||||
- [Petstore::ApiResponse](docs/ApiResponse.md)
|
||||
- [Petstore::ArrayOfArrayOfNumberOnly](docs/ArrayOfArrayOfNumberOnly.md)
|
||||
- [Petstore::ArrayOfNumberOnly](docs/ArrayOfNumberOnly.md)
|
||||
- [Petstore::ArrayTest](docs/ArrayTest.md)
|
||||
- [Petstore::Capitalization](docs/Capitalization.md)
|
||||
- [Petstore::Cat](docs/Cat.md)
|
||||
- [Petstore::Category](docs/Category.md)
|
||||
- [Petstore::ClassModel](docs/ClassModel.md)
|
||||
- [Petstore::Client](docs/Client.md)
|
||||
- [Petstore::Dog](docs/Dog.md)
|
||||
- [Petstore::EnumArrays](docs/EnumArrays.md)
|
||||
- [Petstore::EnumClass](docs/EnumClass.md)
|
||||
- [Petstore::EnumTest](docs/EnumTest.md)
|
||||
- [Petstore::File](docs/File.md)
|
||||
- [Petstore::FileSchemaTestClass](docs/FileSchemaTestClass.md)
|
||||
- [Petstore::Foo](docs/Foo.md)
|
||||
- [Petstore::FormatTest](docs/FormatTest.md)
|
||||
- [Petstore::HasOnlyReadOnly](docs/HasOnlyReadOnly.md)
|
||||
- [Petstore::InlineResponseDefault](docs/InlineResponseDefault.md)
|
||||
- [Petstore::List](docs/List.md)
|
||||
- [Petstore::MapTest](docs/MapTest.md)
|
||||
- [Petstore::MixedPropertiesAndAdditionalPropertiesClass](docs/MixedPropertiesAndAdditionalPropertiesClass.md)
|
||||
- [Petstore::Model200Response](docs/Model200Response.md)
|
||||
- [Petstore::ModelReturn](docs/ModelReturn.md)
|
||||
- [Petstore::Name](docs/Name.md)
|
||||
- [Petstore::NumberOnly](docs/NumberOnly.md)
|
||||
- [Petstore::Order](docs/Order.md)
|
||||
- [Petstore::OuterComposite](docs/OuterComposite.md)
|
||||
- [Petstore::OuterEnum](docs/OuterEnum.md)
|
||||
- [Petstore::Pet](docs/Pet.md)
|
||||
- [Petstore::ReadOnlyFirst](docs/ReadOnlyFirst.md)
|
||||
- [Petstore::SpecialModelName](docs/SpecialModelName.md)
|
||||
- [Petstore::StringBooleanMap](docs/StringBooleanMap.md)
|
||||
- [Petstore::Tag](docs/Tag.md)
|
||||
- [Petstore::User](docs/User.md)
|
||||
|
||||
|
||||
## Documentation for Authorization
|
||||
|
||||
|
||||
### api_key
|
||||
|
||||
- **Type**: API key
|
||||
- **API key parameter name**: api_key
|
||||
- **Location**: HTTP header
|
||||
|
||||
### api_key_query
|
||||
|
||||
- **Type**: API key
|
||||
- **API key parameter name**: api_key_query
|
||||
- **Location**: URL query string
|
||||
|
||||
### http_basic_test
|
||||
|
||||
- **Type**: HTTP basic authentication
|
||||
|
||||
### petstore_auth
|
||||
|
||||
- **Type**: OAuth
|
||||
- **Flow**: implicit
|
||||
- **Authorization URL**: http://petstore.swagger.io/api/oauth/dialog
|
||||
- **Scopes**:
|
||||
- write:pets: modify pets in your account
|
||||
- read:pets: read your pets
|
||||
|
10
samples/openapi3/client/petstore/ruby/Rakefile
Normal file
10
samples/openapi3/client/petstore/ruby/Rakefile
Normal file
@ -0,0 +1,10 @@
|
||||
require "bundler/gem_tasks"
|
||||
|
||||
begin
|
||||
require 'rspec/core/rake_task'
|
||||
|
||||
RSpec::Core::RakeTask.new(:spec)
|
||||
task default: :spec
|
||||
rescue LoadError
|
||||
# no rspec available
|
||||
end
|
@ -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]
|
||||
|
||||
|
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]
|
||||
|
||||
|
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]
|
||||
|
||||
|
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]
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user