add ruby httpx echo api tests (#16729)

This commit is contained in:
William Cheng
2023-10-05 12:55:57 +08:00
committed by GitHub
parent c306ca3cf2
commit 6722f1300d
73 changed files with 8356 additions and 0 deletions

View File

@@ -0,0 +1,46 @@
=begin
#Echo Server API
#Echo Server API
The version of the OpenAPI document: 0.1.0
Contact: team@openapitools.org
Generated by: https://openapi-generator.tech
OpenAPI Generator version: 7.1.0-SNAPSHOT
=end
require 'spec_helper'
require 'json'
# Unit tests for OpenapiClient::AuthApi
# Automatically generated by openapi-generator (https://openapi-generator.tech)
# Please update as you see appropriate
describe 'AuthApi' do
before do
# run before each test
@api_instance = OpenapiClient::AuthApi.new
end
after do
# run after each test
end
describe 'test an instance of AuthApi' do
it 'should create an instance of AuthApi' do
expect(@api_instance).to be_instance_of(OpenapiClient::AuthApi)
end
end
# unit tests for test_auth_http_basic
# To test HTTP basic authentication
# To test HTTP basic authentication
# @param [Hash] opts the optional parameters
# @return [String]
describe 'test_auth_http_basic test' do
it 'should work' do
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
end
end
end

View File

@@ -0,0 +1,118 @@
=begin
#Echo Server API
#Echo Server API
The version of the OpenAPI document: 0.1.0
Contact: team@openapitools.org
Generated by: https://openapi-generator.tech
OpenAPI Generator version: 7.1.0-SNAPSHOT
=end
require 'spec_helper'
require 'json'
# Unit tests for OpenapiClient::BodyApi
# Automatically generated by openapi-generator (https://openapi-generator.tech)
# Please update as you see appropriate
describe 'BodyApi' do
before do
# run before each test
@api_instance = OpenapiClient::BodyApi.new
end
after do
# run after each test
end
describe 'test an instance of BodyApi' do
it 'should create an instance of BodyApi' do
expect(@api_instance).to be_instance_of(OpenapiClient::BodyApi)
end
end
# unit tests for test_binary_gif
# Test binary (gif) response body
# Test binary (gif) response body
# @param [Hash] opts the optional parameters
# @return [File]
describe 'test_binary_gif test' do
it 'should work' do
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
end
end
# unit tests for test_body_application_octetstream_binary
# Test body parameter(s)
# Test body parameter(s)
# @param [Hash] opts the optional parameters
# @option opts [File] :body
# @return [String]
describe 'test_body_application_octetstream_binary test' do
it 'should work' do
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
end
end
# unit tests for test_body_multipart_formdata_array_of_binary
# Test array of binary in multipart mime
# Test array of binary in multipart mime
# @param files
# @param [Hash] opts the optional parameters
# @return [String]
describe 'test_body_multipart_formdata_array_of_binary test' do
it 'should work' do
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
end
end
# unit tests for test_echo_body_free_form_object_response_string
# Test free form object
# Test free form object
# @param [Hash] opts the optional parameters
# @option opts [Object] :body Free form object
# @return [String]
describe 'test_echo_body_free_form_object_response_string test' do
it 'should work' do
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
end
end
# unit tests for test_echo_body_pet
# Test body parameter(s)
# Test body parameter(s)
# @param [Hash] opts the optional parameters
# @option opts [Pet] :pet Pet object that needs to be added to the store
# @return [Pet]
describe 'test_echo_body_pet test' do
it 'should work' do
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
end
end
# unit tests for test_echo_body_pet_response_string
# Test empty response body
# Test empty response body
# @param [Hash] opts the optional parameters
# @option opts [Pet] :pet Pet object that needs to be added to the store
# @return [String]
describe 'test_echo_body_pet_response_string test' do
it 'should work' do
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
end
end
# unit tests for test_echo_body_tag_response_string
# Test empty json (request body)
# Test empty json (request body)
# @param [Hash] opts the optional parameters
# @option opts [Tag] :tag Tag object
# @return [String]
describe 'test_echo_body_tag_response_string test' do
it 'should work' do
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
end
end
end

View File

@@ -0,0 +1,66 @@
=begin
#Echo Server API
#Echo Server API
The version of the OpenAPI document: 0.1.0
Contact: team@openapitools.org
Generated by: https://openapi-generator.tech
OpenAPI Generator version: 7.1.0-SNAPSHOT
=end
require 'spec_helper'
require 'json'
# Unit tests for OpenapiClient::FormApi
# Automatically generated by openapi-generator (https://openapi-generator.tech)
# Please update as you see appropriate
describe 'FormApi' do
before do
# run before each test
@api_instance = OpenapiClient::FormApi.new
end
after do
# run after each test
end
describe 'test an instance of FormApi' do
it 'should create an instance of FormApi' do
expect(@api_instance).to be_instance_of(OpenapiClient::FormApi)
end
end
# unit tests for test_form_integer_boolean_string
# Test form parameter(s)
# Test form parameter(s)
# @param [Hash] opts the optional parameters
# @option opts [Integer] :integer_form
# @option opts [Boolean] :boolean_form
# @option opts [String] :string_form
# @return [String]
describe 'test_form_integer_boolean_string test' do
it 'should work' do
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
end
end
# unit tests for test_form_oneof
# Test form parameter(s) for oneOf schema
# Test form parameter(s) for oneOf schema
# @param [Hash] opts the optional parameters
# @option opts [String] :form1
# @option opts [Integer] :form2
# @option opts [String] :form3
# @option opts [Boolean] :form4
# @option opts [Integer] :id
# @option opts [String] :name
# @return [String]
describe 'test_form_oneof test' do
it 'should work' do
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
end
end
end

View File

@@ -0,0 +1,49 @@
=begin
#Echo Server API
#Echo Server API
The version of the OpenAPI document: 0.1.0
Contact: team@openapitools.org
Generated by: https://openapi-generator.tech
OpenAPI Generator version: 7.1.0-SNAPSHOT
=end
require 'spec_helper'
require 'json'
# Unit tests for OpenapiClient::HeaderApi
# Automatically generated by openapi-generator (https://openapi-generator.tech)
# Please update as you see appropriate
describe 'HeaderApi' do
before do
# run before each test
@api_instance = OpenapiClient::HeaderApi.new
end
after do
# run after each test
end
describe 'test an instance of HeaderApi' do
it 'should create an instance of HeaderApi' do
expect(@api_instance).to be_instance_of(OpenapiClient::HeaderApi)
end
end
# unit tests for test_header_integer_boolean_string
# Test header parameter(s)
# Test header parameter(s)
# @param [Hash] opts the optional parameters
# @option opts [Integer] :integer_header
# @option opts [Boolean] :boolean_header
# @option opts [String] :string_header
# @return [String]
describe 'test_header_integer_boolean_string test' do
it 'should work' do
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
end
end
end

View File

@@ -0,0 +1,48 @@
=begin
#Echo Server API
#Echo Server API
The version of the OpenAPI document: 0.1.0
Contact: team@openapitools.org
Generated by: https://openapi-generator.tech
OpenAPI Generator version: 7.1.0-SNAPSHOT
=end
require 'spec_helper'
require 'json'
# Unit tests for OpenapiClient::PathApi
# Automatically generated by openapi-generator (https://openapi-generator.tech)
# Please update as you see appropriate
describe 'PathApi' do
before do
# run before each test
@api_instance = OpenapiClient::PathApi.new
end
after do
# run after each test
end
describe 'test an instance of PathApi' do
it 'should create an instance of PathApi' do
expect(@api_instance).to be_instance_of(OpenapiClient::PathApi)
end
end
# unit tests for tests_path_string_path_string_integer_path_integer
# Test path parameter(s)
# Test path parameter(s)
# @param path_string
# @param path_integer
# @param [Hash] opts the optional parameters
# @return [String]
describe 'tests_path_string_path_string_integer_path_integer test' do
it 'should work' do
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
end
end
end

View File

@@ -0,0 +1,135 @@
=begin
#Echo Server API
#Echo Server API
The version of the OpenAPI document: 0.1.0
Contact: team@openapitools.org
Generated by: https://openapi-generator.tech
OpenAPI Generator version: 7.1.0-SNAPSHOT
=end
require 'spec_helper'
require 'json'
# Unit tests for OpenapiClient::QueryApi
# Automatically generated by openapi-generator (https://openapi-generator.tech)
# Please update as you see appropriate
describe 'QueryApi' do
before do
# run before each test
@api_instance = OpenapiClient::QueryApi.new
end
after do
# run after each test
end
describe 'test an instance of QueryApi' do
it 'should create an instance of QueryApi' do
expect(@api_instance).to be_instance_of(OpenapiClient::QueryApi)
end
end
# unit tests for test_enum_ref_string
# Test query parameter(s)
# Test query parameter(s)
# @param [Hash] opts the optional parameters
# @option opts [StringEnumRef] :enum_ref_string_query
# @return [String]
describe 'test_enum_ref_string test' do
it 'should work' do
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
end
end
# unit tests for test_query_datetime_date_string
# Test query parameter(s)
# Test query parameter(s)
# @param [Hash] opts the optional parameters
# @option opts [Time] :datetime_query
# @option opts [Date] :date_query
# @option opts [String] :string_query
# @return [String]
describe 'test_query_datetime_date_string test' do
it 'should work' do
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
end
end
# unit tests for test_query_integer_boolean_string
# Test query parameter(s)
# Test query parameter(s)
# @param [Hash] opts the optional parameters
# @option opts [Integer] :integer_query
# @option opts [Boolean] :boolean_query
# @option opts [String] :string_query
# @return [String]
describe 'test_query_integer_boolean_string test' do
it 'should work' do
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
end
end
# unit tests for test_query_style_deep_object_explode_true_object
# Test query parameter(s)
# Test query parameter(s)
# @param [Hash] opts the optional parameters
# @option opts [Pet] :query_object
# @return [String]
describe 'test_query_style_deep_object_explode_true_object test' do
it 'should work' do
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
end
end
# unit tests for test_query_style_deep_object_explode_true_object_all_of
# Test query parameter(s)
# Test query parameter(s)
# @param [Hash] opts the optional parameters
# @option opts [TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter] :query_object
# @return [String]
describe 'test_query_style_deep_object_explode_true_object_all_of test' do
it 'should work' do
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
end
end
# unit tests for test_query_style_form_explode_true_array_string
# Test query parameter(s)
# Test query parameter(s)
# @param [Hash] opts the optional parameters
# @option opts [TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter] :query_object
# @return [String]
describe 'test_query_style_form_explode_true_array_string test' do
it 'should work' do
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
end
end
# unit tests for test_query_style_form_explode_true_object
# Test query parameter(s)
# Test query parameter(s)
# @param [Hash] opts the optional parameters
# @option opts [Pet] :query_object
# @return [String]
describe 'test_query_style_form_explode_true_object test' do
it 'should work' do
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
end
end
# unit tests for test_query_style_form_explode_true_object_all_of
# Test query parameter(s)
# Test query parameter(s)
# @param [Hash] opts the optional parameters
# @option opts [DataQuery] :query_object
# @return [String]
describe 'test_query_style_form_explode_true_object_all_of test' do
it 'should work' do
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
end
end
end

View File

@@ -0,0 +1,190 @@
=begin
#Echo Server API
#Echo Server API
The version of the OpenAPI document: 0.1.0
Contact: team@openapitools.org
Generated by: https://openapi-generator.tech
OpenAPI Generator version: 7.1.0-SNAPSHOT
=end
require 'spec_helper'
describe OpenapiClient::ApiClient do
context 'initialization' do
context 'URL stuff' do
context 'host' do
it 'removes http from host' do
OpenapiClient.configure { |c| c.host = 'http://example.com' }
expect(OpenapiClient::Configuration.default.host).to eq('example.com')
end
it 'removes https from host' do
OpenapiClient.configure { |c| c.host = 'https://wookiee.com' }
expect(OpenapiClient::ApiClient.default.config.host).to eq('wookiee.com')
end
it 'removes trailing path from host' do
OpenapiClient.configure { |c| c.host = 'hobo.com/v4' }
expect(OpenapiClient::Configuration.default.host).to eq('hobo.com')
end
end
context 'base_path' do
it "prepends a slash to base_path" do
OpenapiClient.configure { |c| c.base_path = 'v4/dog' }
expect(OpenapiClient::Configuration.default.base_path).to eq('/v4/dog')
end
it "doesn't prepend a slash if one is already there" do
OpenapiClient.configure { |c| c.base_path = '/v4/dog' }
expect(OpenapiClient::Configuration.default.base_path).to eq('/v4/dog')
end
it "ends up as a blank string if nil" do
OpenapiClient.configure { |c| c.base_path = nil }
expect(OpenapiClient::Configuration.default.base_path).to eq('')
end
end
end
end
describe '#deserialize' do
it "handles Array<Integer>" do
api_client = OpenapiClient::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_instance_of(Array)
expect(data).to eq([12, 34])
end
it 'handles Array<Array<Integer>>' do
api_client = OpenapiClient::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_instance_of(Array)
expect(data).to eq([[12, 34], [56]])
end
it 'handles Hash<String, String>' do
api_client = OpenapiClient::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_instance_of(Hash)
expect(data).to eq(:message => 'Hello')
end
end
describe "#object_to_hash" do
it 'ignores nils and includes empty arrays' do
# uncomment below to test object_to_hash for model
# api_client = OpenapiClient::ApiClient.new
# _model = OpenapiClient::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
let(:param) { ['aa', 'bb', 'cc'] }
let(:api_client) { OpenapiClient::ApiClient.new }
it 'works for csv' do
expect(api_client.build_collection_param(param, :csv)).to eq('aa,bb,cc')
end
it 'works for ssv' do
expect(api_client.build_collection_param(param, :ssv)).to eq('aa bb cc')
end
it 'works for tsv' do
expect(api_client.build_collection_param(param, :tsv)).to eq("aa\tbb\tcc")
end
it 'works for pipes' do
expect(api_client.build_collection_param(param, :pipes)).to eq('aa|bb|cc')
end
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')
end
end
describe '#json_mime?' do
let(:api_client) { OpenapiClient::ApiClient.new }
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/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
let(:api_client) { OpenapiClient::ApiClient.new }
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')
expect(api_client.select_header_accept(['APPLICATION/JSON', 'text/html'])).to eq('APPLICATION/JSON')
expect(api_client.select_header_accept(['application/xml'])).to eq('application/xml')
expect(api_client.select_header_accept(['text/html', 'application/xml'])).to eq('text/html,application/xml')
end
end
describe '#select_header_content_type' do
let(:api_client) { OpenapiClient::ApiClient.new }
it 'works' do
expect(api_client.select_header_content_type(nil)).to be_nil
expect(api_client.select_header_content_type([])).to be_nil
expect(api_client.select_header_content_type(['application/json'])).to eq('application/json')
expect(api_client.select_header_content_type(['application/xml', 'application/json; charset=UTF8'])).to eq('application/json; charset=UTF8')
expect(api_client.select_header_content_type(['APPLICATION/JSON', 'text/html'])).to eq('APPLICATION/JSON')
expect(api_client.select_header_content_type(['application/xml'])).to eq('application/xml')
expect(api_client.select_header_content_type(['text/plain', 'application/xml'])).to eq('text/plain')
end
end
describe '#sanitize_filename' do
let(:api_client) { OpenapiClient::ApiClient.new }
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')
expect(api_client.sanitize_filename('/var/tmp/sun.gif')).to eq('sun.gif')
expect(api_client.sanitize_filename('./sun.gif')).to eq('sun.gif')
expect(api_client.sanitize_filename('..\sun.gif')).to eq('sun.gif')
expect(api_client.sanitize_filename('\var\tmp\sun.gif')).to eq('sun.gif')
expect(api_client.sanitize_filename('c:\var\tmp\sun.gif')).to eq('sun.gif')
expect(api_client.sanitize_filename('.\sun.gif')).to eq('sun.gif')
end
end
end

View File

@@ -0,0 +1,75 @@
=begin
#Echo Server API
#Echo Server API
The version of the OpenAPI document: 0.1.0
Contact: team@openapitools.org
Generated by: https://openapi-generator.tech
OpenAPI Generator version: 7.1.0-SNAPSHOT
=end
require 'spec_helper'
describe OpenapiClient::Configuration do
let(:config) { OpenapiClient::Configuration.default }
before(:each) do
# uncomment below to setup host and base_path
# require 'URI'
# uri = URI.parse("http://localhost:3000")
# OpenapiClient.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
# uncomment below to test default value of the base path
# expect(config.base_url).to eq("http://localhost:3000")
end
it 'should remove trailing slashes' do
[nil, '', '/', '//'].each do |base_path|
config.base_path = base_path
# uncomment below to test trailing slashes
# expect(config.base_url).to eq("http://localhost:3000")
end
end
end
describe '#configure' do
let(:session) { HTTPX::Session.new }
before do
module CustomPlugin
module InstanceMethods; end
end
module AnotherCustomPlugin
module InstanceMethods; end
end
config.configure_session do |session|
session.plugin(CustomPlugin)
end
end
it 'adds a block that will be used to configure the connection' do
sess = config.configure(session)
expect(sess.class.ancestors).to include(CustomPlugin::InstanceMethods)
end
it 'supports multiple configuration blocks' do
config.configure_session do |session|
session.plugin(AnotherCustomPlugin)
end
sess = config.configure(session)
expect(sess.class.ancestors).to include(CustomPlugin::InstanceMethods)
expect(sess.class.ancestors).to include(AnotherCustomPlugin::InstanceMethods)
end
end
end

View File

@@ -0,0 +1,42 @@
=begin
#Echo Server API
#Echo Server API
The version of the OpenAPI document: 0.1.0
Contact: team@openapitools.org
Generated by: https://openapi-generator.tech
OpenAPI Generator version: 7.1.0-SNAPSHOT
=end
require 'spec_helper'
require 'json'
require 'date'
# Unit tests for OpenapiClient::Bird
# Automatically generated by openapi-generator (https://openapi-generator.tech)
# Please update as you see appropriate
describe OpenapiClient::Bird do
let(:instance) { OpenapiClient::Bird.new }
describe 'test an instance of Bird' do
it 'should create an instance of Bird' do
# uncomment below to test the instance creation
#expect(instance).to be_instance_of(OpenapiClient::Bird)
end
end
describe 'test attribute "size"' do
it 'should work' do
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
end
end
describe 'test attribute "color"' do
it 'should work' do
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
end
end
end

View File

@@ -0,0 +1,42 @@
=begin
#Echo Server API
#Echo Server API
The version of the OpenAPI document: 0.1.0
Contact: team@openapitools.org
Generated by: https://openapi-generator.tech
OpenAPI Generator version: 7.1.0-SNAPSHOT
=end
require 'spec_helper'
require 'json'
require 'date'
# Unit tests for OpenapiClient::Category
# Automatically generated by openapi-generator (https://openapi-generator.tech)
# Please update as you see appropriate
describe OpenapiClient::Category do
let(:instance) { OpenapiClient::Category.new }
describe 'test an instance of Category' do
it 'should create an instance of Category' do
# uncomment below to test the instance creation
#expect(instance).to be_instance_of(OpenapiClient::Category)
end
end
describe 'test attribute "id"' do
it 'should work' do
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
end
end
describe 'test attribute "name"' do
it 'should work' do
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
end
end
end

View File

@@ -0,0 +1,48 @@
=begin
#Echo Server API
#Echo Server API
The version of the OpenAPI document: 0.1.0
Contact: team@openapitools.org
Generated by: https://openapi-generator.tech
OpenAPI Generator version: 7.1.0-SNAPSHOT
=end
require 'spec_helper'
require 'json'
require 'date'
# Unit tests for OpenapiClient::DataQuery
# Automatically generated by openapi-generator (https://openapi-generator.tech)
# Please update as you see appropriate
describe OpenapiClient::DataQuery do
let(:instance) { OpenapiClient::DataQuery.new }
describe 'test an instance of DataQuery' do
it 'should create an instance of DataQuery' do
# uncomment below to test the instance creation
#expect(instance).to be_instance_of(OpenapiClient::DataQuery)
end
end
describe 'test attribute "suffix"' do
it 'should work' do
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
end
end
describe 'test attribute "text"' do
it 'should work' do
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
end
end
describe 'test attribute "date"' do
it 'should work' do
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
end
end
end

View File

@@ -0,0 +1,82 @@
=begin
#Echo Server API
#Echo Server API
The version of the OpenAPI document: 0.1.0
Contact: team@openapitools.org
Generated by: https://openapi-generator.tech
OpenAPI Generator version: 7.1.0-SNAPSHOT
=end
require 'spec_helper'
require 'json'
require 'date'
# Unit tests for OpenapiClient::DefaultValue
# Automatically generated by openapi-generator (https://openapi-generator.tech)
# Please update as you see appropriate
describe OpenapiClient::DefaultValue do
let(:instance) { OpenapiClient::DefaultValue.new }
describe 'test an instance of DefaultValue' do
it 'should create an instance of DefaultValue' do
# uncomment below to test the instance creation
#expect(instance).to be_instance_of(OpenapiClient::DefaultValue)
end
end
describe 'test attribute "array_string_enum_ref_default"' do
it 'should work' do
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
end
end
describe 'test attribute "array_string_enum_default"' do
it 'should work' do
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
# validator = Petstore::EnumTest::EnumAttributeValidator.new('Array<String>', ["success", "failure", "unclassified"])
# validator.allowable_values.each do |value|
# expect { instance.array_string_enum_default = value }.not_to raise_error
# end
end
end
describe 'test attribute "array_string_default"' do
it 'should work' do
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
end
end
describe 'test attribute "array_integer_default"' do
it 'should work' do
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
end
end
describe 'test attribute "array_string"' do
it 'should work' do
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
end
end
describe 'test attribute "array_string_nullable"' do
it 'should work' do
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
end
end
describe 'test attribute "array_string_extension_nullable"' do
it 'should work' do
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
end
end
describe 'test attribute "string_nullable"' do
it 'should work' do
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
end
end
end

View File

@@ -0,0 +1,48 @@
=begin
#Echo Server API
#Echo Server API
The version of the OpenAPI document: 0.1.0
Contact: team@openapitools.org
Generated by: https://openapi-generator.tech
OpenAPI Generator version: 7.1.0-SNAPSHOT
=end
require 'spec_helper'
require 'json'
require 'date'
# Unit tests for OpenapiClient::NumberPropertiesOnly
# Automatically generated by openapi-generator (https://openapi-generator.tech)
# Please update as you see appropriate
describe OpenapiClient::NumberPropertiesOnly do
let(:instance) { OpenapiClient::NumberPropertiesOnly.new }
describe 'test an instance of NumberPropertiesOnly' do
it 'should create an instance of NumberPropertiesOnly' do
# uncomment below to test the instance creation
#expect(instance).to be_instance_of(OpenapiClient::NumberPropertiesOnly)
end
end
describe 'test attribute "number"' do
it 'should work' do
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
end
end
describe 'test attribute "float"' do
it 'should work' do
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
end
end
describe 'test attribute "double"' do
it 'should work' do
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
end
end
end

View File

@@ -0,0 +1,70 @@
=begin
#Echo Server API
#Echo Server API
The version of the OpenAPI document: 0.1.0
Contact: team@openapitools.org
Generated by: https://openapi-generator.tech
OpenAPI Generator version: 7.1.0-SNAPSHOT
=end
require 'spec_helper'
require 'json'
require 'date'
# Unit tests for OpenapiClient::Pet
# Automatically generated by openapi-generator (https://openapi-generator.tech)
# Please update as you see appropriate
describe OpenapiClient::Pet do
let(:instance) { OpenapiClient::Pet.new }
describe 'test an instance of Pet' do
it 'should create an instance of Pet' do
# uncomment below to test the instance creation
#expect(instance).to be_instance_of(OpenapiClient::Pet)
end
end
describe 'test attribute "id"' do
it 'should work' do
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
end
end
describe 'test attribute "name"' do
it 'should work' do
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
end
end
describe 'test attribute "category"' do
it 'should work' do
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
end
end
describe 'test attribute "photo_urls"' do
it 'should work' do
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
end
end
describe 'test attribute "tags"' do
it 'should work' do
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
end
end
describe 'test attribute "status"' do
it 'should work' do
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
# validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["available", "pending", "sold"])
# validator.allowable_values.each do |value|
# expect { instance.status = value }.not_to raise_error
# end
end
end
end

View File

@@ -0,0 +1,46 @@
=begin
#Echo Server API
#Echo Server API
The version of the OpenAPI document: 0.1.0
Contact: team@openapitools.org
Generated by: https://openapi-generator.tech
OpenAPI Generator version: 7.1.0-SNAPSHOT
=end
require 'spec_helper'
require 'json'
require 'date'
# Unit tests for OpenapiClient::Query
# Automatically generated by openapi-generator (https://openapi-generator.tech)
# Please update as you see appropriate
describe OpenapiClient::Query do
let(:instance) { OpenapiClient::Query.new }
describe 'test an instance of Query' do
it 'should create an instance of Query' do
# uncomment below to test the instance creation
#expect(instance).to be_instance_of(OpenapiClient::Query)
end
end
describe 'test attribute "id"' do
it 'should work' do
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
end
end
describe 'test attribute "outcomes"' do
it 'should work' do
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
# validator = Petstore::EnumTest::EnumAttributeValidator.new('Array<String>', ["SUCCESS", "FAILURE", "SKIPPED"])
# validator.allowable_values.each do |value|
# expect { instance.outcomes = value }.not_to raise_error
# end
end
end
end

View File

@@ -0,0 +1,30 @@
=begin
#Echo Server API
#Echo Server API
The version of the OpenAPI document: 0.1.0
Contact: team@openapitools.org
Generated by: https://openapi-generator.tech
OpenAPI Generator version: 7.1.0-SNAPSHOT
=end
require 'spec_helper'
require 'json'
require 'date'
# Unit tests for OpenapiClient::StringEnumRef
# Automatically generated by openapi-generator (https://openapi-generator.tech)
# Please update as you see appropriate
describe OpenapiClient::StringEnumRef do
let(:instance) { OpenapiClient::StringEnumRef.new }
describe 'test an instance of StringEnumRef' do
it 'should create an instance of StringEnumRef' do
# uncomment below to test the instance creation
#expect(instance).to be_instance_of(OpenapiClient::StringEnumRef)
end
end
end

View File

@@ -0,0 +1,42 @@
=begin
#Echo Server API
#Echo Server API
The version of the OpenAPI document: 0.1.0
Contact: team@openapitools.org
Generated by: https://openapi-generator.tech
OpenAPI Generator version: 7.1.0-SNAPSHOT
=end
require 'spec_helper'
require 'json'
require 'date'
# Unit tests for OpenapiClient::Tag
# Automatically generated by openapi-generator (https://openapi-generator.tech)
# Please update as you see appropriate
describe OpenapiClient::Tag do
let(:instance) { OpenapiClient::Tag.new }
describe 'test an instance of Tag' do
it 'should create an instance of Tag' do
# uncomment below to test the instance creation
#expect(instance).to be_instance_of(OpenapiClient::Tag)
end
end
describe 'test attribute "id"' do
it 'should work' do
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
end
end
describe 'test attribute "name"' do
it 'should work' do
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
end
end
end

View File

@@ -0,0 +1,54 @@
=begin
#Echo Server API
#Echo Server API
The version of the OpenAPI document: 0.1.0
Contact: team@openapitools.org
Generated by: https://openapi-generator.tech
OpenAPI Generator version: 7.1.0-SNAPSHOT
=end
require 'spec_helper'
require 'json'
require 'date'
# Unit tests for OpenapiClient::TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter
# Automatically generated by openapi-generator (https://openapi-generator.tech)
# Please update as you see appropriate
describe OpenapiClient::TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter do
let(:instance) { OpenapiClient::TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.new }
describe 'test an instance of TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter' do
it 'should create an instance of TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter' do
# uncomment below to test the instance creation
#expect(instance).to be_instance_of(OpenapiClient::TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter)
end
end
describe 'test attribute "size"' do
it 'should work' do
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
end
end
describe 'test attribute "color"' do
it 'should work' do
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
end
end
describe 'test attribute "id"' do
it 'should work' do
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
end
end
describe 'test attribute "name"' do
it 'should work' do
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
end
end
end

View File

@@ -0,0 +1,36 @@
=begin
#Echo Server API
#Echo Server API
The version of the OpenAPI document: 0.1.0
Contact: team@openapitools.org
Generated by: https://openapi-generator.tech
OpenAPI Generator version: 7.1.0-SNAPSHOT
=end
require 'spec_helper'
require 'json'
require 'date'
# Unit tests for OpenapiClient::TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter
# Automatically generated by openapi-generator (https://openapi-generator.tech)
# Please update as you see appropriate
describe OpenapiClient::TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter do
let(:instance) { OpenapiClient::TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter.new }
describe 'test an instance of TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter' do
it 'should create an instance of TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter' do
# uncomment below to test the instance creation
#expect(instance).to be_instance_of(OpenapiClient::TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter)
end
end
describe 'test attribute "values"' do
it 'should work' do
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
end
end
end

View File

@@ -0,0 +1,111 @@
=begin
#Echo Server API
#Echo Server API
The version of the OpenAPI document: 0.1.0
Contact: team@openapitools.org
Generated by: https://openapi-generator.tech
OpenAPI Generator version: 7.1.0-SNAPSHOT
=end
# load the gem
require 'openapi_client'
# The following was generated by the `rspec --init` command. Conventionally, all
# specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
# The generated `.rspec` file contains `--require spec_helper` which will cause
# this file to always be loaded, without a need to explicitly require it in any
# files.
#
# Given that it is always loaded, you are encouraged to keep this file as
# light-weight as possible. Requiring heavyweight dependencies from this file
# will add to the boot time of your test suite on EVERY test run, even for an
# individual file that may not need all of that loaded. Instead, consider making
# a separate helper file that requires the additional dependencies and performs
# the additional setup, and require it from the spec files that actually need
# it.
#
# The `.rspec` file also contains a few flags that are not defaults but that
# users commonly want.
#
# See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
RSpec.configure do |config|
# rspec-expectations config goes here. You can use an alternate
# assertion/expectation library such as wrong or the stdlib/minitest
# assertions if you prefer.
config.expect_with :rspec do |expectations|
# This option will default to `true` in RSpec 4. It makes the `description`
# and `failure_message` of custom matchers include text for helper methods
# defined using `chain`, e.g.:
# be_bigger_than(2).and_smaller_than(4).description
# # => "be bigger than 2 and smaller than 4"
# ...rather than:
# # => "be bigger than 2"
expectations.include_chain_clauses_in_custom_matcher_descriptions = true
end
# rspec-mocks config goes here. You can use an alternate test double
# library (such as bogus or mocha) by changing the `mock_with` option here.
config.mock_with :rspec do |mocks|
# Prevents you from mocking or stubbing a method that does not exist on
# a real object. This is generally recommended, and will default to
# `true` in RSpec 4.
mocks.verify_partial_doubles = true
end
# The settings below are suggested to provide a good initial experience
# with RSpec, but feel free to customize to your heart's content.
=begin
# These two settings work together to allow you to limit a spec run
# to individual examples or groups you care about by tagging them with
# `:focus` metadata. When nothing is tagged with `:focus`, all examples
# get run.
config.filter_run :focus
config.run_all_when_everything_filtered = true
# Allows RSpec to persist some state between runs in order to support
# the `--only-failures` and `--next-failure` CLI options. We recommend
# you configure your source control system to ignore this file.
config.example_status_persistence_file_path = "spec/examples.txt"
# Limits the available syntax to the non-monkey patched syntax that is
# recommended. For more details, see:
# - http://rspec.info/blog/2012/06/rspecs-new-expectation-syntax/
# - http://www.teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/
# - http://rspec.info/blog/2014/05/notable-changes-in-rspec-3/#zero-monkey-patching-mode
config.disable_monkey_patching!
# This setting enables warnings. It's recommended, but in some cases may
# be too noisy due to issues in dependencies.
config.warnings = true
# Many RSpec users commonly either run the entire suite or an individual
# file, and it's useful to allow more verbose output when running an
# individual spec file.
if config.files_to_run.one?
# Use the documentation formatter for detailed output,
# unless a formatter has already been configured
# (e.g. via a command-line flag).
config.default_formatter = 'doc'
end
# Print the 10 slowest examples and example groups at the
# end of the spec run, to help surface which specs are running
# particularly slow.
config.profile_examples = 10
# Run specs in random order to surface order dependencies. If you find an
# order dependency and want to debug it, you can fix the order by providing
# the seed, which is printed after each run.
# --seed 1234
config.order = :random
# Seed global randomization in this process using the `--seed` CLI option.
# Setting this allows you to use `--seed` to deterministically reproduce
# test failures related to randomization by passing the same `--seed` value
# as the one that triggered the failure.
Kernel.srand config.seed
=end
end