mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-12-03 08:46:55 +00:00
add ruby httpx echo api tests (#16729)
This commit is contained in:
42
samples/client/echo_api/ruby-httpx/spec/models/bird_spec.rb
Normal file
42
samples/client/echo_api/ruby-httpx/spec/models/bird_spec.rb
Normal 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
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
70
samples/client/echo_api/ruby-httpx/spec/models/pet_spec.rb
Normal file
70
samples/client/echo_api/ruby-httpx/spec/models/pet_spec.rb
Normal 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
|
||||
46
samples/client/echo_api/ruby-httpx/spec/models/query_spec.rb
Normal file
46
samples/client/echo_api/ruby-httpx/spec/models/query_spec.rb
Normal 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
|
||||
@@ -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
|
||||
42
samples/client/echo_api/ruby-httpx/spec/models/tag_spec.rb
Normal file
42
samples/client/echo_api/ruby-httpx/spec/models/tag_spec.rb
Normal 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
|
||||
@@ -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
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user