[Ruby] various improvements (#2226)

* add to_s in api error class

* rename variable to align with code sample

* fix initalize, better validation

* update petstore samples

* add code sample for model

* add auto-generated travis file

* improve error message

* add travis file

* uncomment to_s
This commit is contained in:
William Cheng
2019-02-27 03:38:20 +08:00
committed by GitHub
parent 9695090d9b
commit 9e2a9e1515
157 changed files with 1867 additions and 512 deletions

View File

@@ -226,6 +226,7 @@ public class RubyClientCodegen extends AbstractRubyCodegen {
supportingFiles.add(new SupportingFile("Gemfile.mustache", "", "Gemfile"));
supportingFiles.add(new SupportingFile("Gemfile.lock.mustache", "", "Gemfile.lock"));
supportingFiles.add(new SupportingFile("rubocop.mustache", "", ".rubocop.yml"));
supportingFiles.add(new SupportingFile("travis.mustache", "", ".travis.yml"));
// test files should not be overwritten
writeOptional(outputFolder, new SupportingFile("rspec.mustache", "", ".rspec"));

View File

@@ -26,5 +26,24 @@ module {{moduleName}}
super arg
end
end
# Override to_s to display a friendly error message
def to_s
message
end
def message
if @message.nil?
msg = "Error message: the server returns an error"
else
msg = @message
end
msg += "\nHTTP status code: #{code}" if code
msg += "\nResponse headers: #{response_headers}" if response_headers
msg += "\nResponse body: #{response_body}" if response_body
msg
end
end
end

View File

@@ -11,7 +11,7 @@ require 'json'
{{#operations}}describe '{{classname}}' do
before do
# run before each test
@instance = {{moduleName}}::{{classname}}.new
@api_instance = {{moduleName}}::{{classname}}.new
end
after do
@@ -20,7 +20,7 @@ require 'json'
describe 'test an instance of {{classname}}' do
it 'should create an instance of {{classname}}' do
expect(@instance).to be_instance_of({{moduleName}}::{{classname}})
expect(@api_instance).to be_instance_of({{moduleName}}::{{classname}})
end
end

View File

@@ -6,4 +6,13 @@ Name | Type | Description | Notes
{{#vars}}**{{name}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{dataType}}**]({{complexType}}.md){{/isPrimitiveType}} | {{description}} | {{^required}}[optional] {{/required}}{{#readOnly}}[readonly] {{/readOnly}}{{#defaultValue}}[default to {{defaultValue}}]{{/defaultValue}}
{{/vars}}
## Code Sample
```ruby
require '{{moduleName}}'
instance = {{moduleName}}::{{classname}}.new({{#vars}}{{name}}: {{example}}{{^-last}},
{{/-last}}{{/vars}})
```
{{/model}}{{/models}}

View File

@@ -102,10 +102,17 @@
# Initializes the object
# @param [Hash] attributes Model attributes in the form of hash
def initialize(attributes = {})
return unless attributes.is_a?(Hash)
if (!attributes.is_a?(Hash))
fail ArgumentError, "The input argument (attributes) must be a hash in `{{{moduleName}}}::{{{classname}}}` initialize method"
end
# convert string to symbol for hash key
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
# check to see if the attribute exists and convert string to symbol for hash key
attributes = attributes.each_with_object({}) { |(k, v), h|
if (!self.class.attribute_map.key?(k.to_sym))
fail ArgumentError, "`#{k}` is not a valid attribute in `{{{moduleName}}}::{{{classname}}}`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
end
h[k.to_sym] = v
}
{{#parent}}
# call parent's initialize
@@ -113,19 +120,19 @@
{{/parent}}
{{#vars}}
if attributes.has_key?(:'{{{baseName}}}')
if attributes.key?(:'{{{name}}}')
{{#isListContainer}}
if (value = attributes[:'{{{baseName}}}']).is_a?(Array)
if (value = attributes[:'{{{name}}}']).is_a?(Array)
self.{{{name}}} = value
end
{{/isListContainer}}
{{#isMapContainer}}
if (value = attributes[:'{{{baseName}}}']).is_a?(Hash)
if (value = attributes[:'{{{name}}}']).is_a?(Hash)
self.{{{name}}} = value
end
{{/isMapContainer}}
{{^isContainer}}
self.{{{name}}} = attributes[:'{{{baseName}}}']
self.{{{name}}} = attributes[:'{{{name}}}']
{{/isContainer}}
{{#defaultValue}}
else

View File

@@ -0,0 +1,11 @@
language: ruby
cache: bundler
rvm:
- 2.3
- 2.4
- 2.5
script:
- bundle install --path vendor/bundle
- bundle exec rspec
- gem build {{{gemName}}}.gemspec
- gem install ./{{{gemName}}}-{{{gemVersion}}}.gem

View File

@@ -0,0 +1,11 @@
language: ruby
cache: bundler
rvm:
- 2.3
- 2.4
- 2.5
script:
- bundle install --path vendor/bundle
- bundle exec rspec
- gem build petstore.gemspec
- gem install ./petstore-1.0.0.gem

View File

@@ -6,4 +6,13 @@ Name | Type | Description | Notes
**map_property** | **Hash<String, String>** | | [optional]
**map_of_map_property** | **Hash<String, Hash<String, String>>** | | [optional]
## Code Sample
```ruby
require 'Petstore'
instance = Petstore::AdditionalPropertiesClass.new(map_property: null,
map_of_map_property: null)
```

View File

@@ -6,4 +6,13 @@ Name | Type | Description | Notes
**class_name** | **String** | |
**color** | **String** | | [optional] [default to 'red']
## Code Sample
```ruby
require 'Petstore'
instance = Petstore::Animal.new(class_name: null,
color: null)
```

View File

@@ -7,4 +7,14 @@ Name | Type | Description | Notes
**type** | **String** | | [optional]
**message** | **String** | | [optional]
## Code Sample
```ruby
require 'Petstore'
instance = Petstore::ApiResponse.new(code: null,
type: null,
message: null)
```

View File

@@ -5,4 +5,12 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**array_array_number** | **Array<Array<Float>>** | | [optional]
## Code Sample
```ruby
require 'Petstore'
instance = Petstore::ArrayOfArrayOfNumberOnly.new(array_array_number: null)
```

View File

@@ -5,4 +5,12 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**array_number** | **Array<Float>** | | [optional]
## Code Sample
```ruby
require 'Petstore'
instance = Petstore::ArrayOfNumberOnly.new(array_number: null)
```

View File

@@ -7,4 +7,14 @@ Name | Type | Description | Notes
**array_array_of_integer** | **Array<Array<Integer>>** | | [optional]
**array_array_of_model** | **Array<Array<ReadOnlyFirst>>** | | [optional]
## Code Sample
```ruby
require 'Petstore'
instance = Petstore::ArrayTest.new(array_of_string: null,
array_array_of_integer: null,
array_array_of_model: null)
```

View File

@@ -10,4 +10,17 @@ Name | Type | Description | Notes
**sca_eth_flow_points** | **String** | | [optional]
**att_name** | **String** | Name of the pet | [optional]
## Code Sample
```ruby
require 'Petstore'
instance = Petstore::Capitalization.new(small_camel: null,
capital_camel: null,
small_snake: null,
capital_snake: null,
sca_eth_flow_points: null,
att_name: null)
```

View File

@@ -5,4 +5,12 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**declawed** | **BOOLEAN** | | [optional]
## Code Sample
```ruby
require 'Petstore'
instance = Petstore::Cat.new(declawed: null)
```

View File

@@ -6,4 +6,13 @@ Name | Type | Description | Notes
**id** | **Integer** | | [optional]
**name** | **String** | | [default to 'default-name']
## Code Sample
```ruby
require 'Petstore'
instance = Petstore::Category.new(id: null,
name: null)
```

View File

@@ -5,4 +5,12 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**_class** | **String** | | [optional]
## Code Sample
```ruby
require 'Petstore'
instance = Petstore::ClassModel.new(_class: null)
```

View File

@@ -5,4 +5,12 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**client** | **String** | | [optional]
## Code Sample
```ruby
require 'Petstore'
instance = Petstore::Client.new(client: null)
```

View File

@@ -5,4 +5,12 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**breed** | **String** | | [optional]
## Code Sample
```ruby
require 'Petstore'
instance = Petstore::Dog.new(breed: null)
```

View File

@@ -6,4 +6,13 @@ Name | Type | Description | Notes
**just_symbol** | **String** | | [optional]
**array_enum** | **Array<String>** | | [optional]
## Code Sample
```ruby
require 'Petstore'
instance = Petstore::EnumArrays.new(just_symbol: null,
array_enum: null)
```

View File

@@ -4,4 +4,12 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
## Code Sample
```ruby
require 'Petstore'
instance = Petstore::EnumClass.new()
```

View File

@@ -9,4 +9,16 @@ Name | Type | Description | Notes
**enum_number** | **Float** | | [optional]
**outer_enum** | [**OuterEnum**](OuterEnum.md) | | [optional]
## Code Sample
```ruby
require 'Petstore'
instance = Petstore::EnumTest.new(enum_string: null,
enum_string_required: null,
enum_integer: null,
enum_number: null,
outer_enum: null)
```

View File

@@ -5,4 +5,12 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**source_uri** | **String** | Test capitalization | [optional]
## Code Sample
```ruby
require 'Petstore'
instance = Petstore::File.new(source_uri: null)
```

View File

@@ -6,4 +6,13 @@ Name | Type | Description | Notes
**file** | **File** | | [optional]
**files** | **Array<File>** | | [optional]
## Code Sample
```ruby
require 'Petstore'
instance = Petstore::FileSchemaTestClass.new(file: null,
files: null)
```

View File

@@ -17,4 +17,24 @@ Name | Type | Description | Notes
**uuid** | **String** | | [optional]
**password** | **String** | |
## Code Sample
```ruby
require 'Petstore'
instance = Petstore::FormatTest.new(integer: null,
int32: null,
int64: null,
number: null,
float: null,
double: null,
string: null,
byte: null,
binary: null,
date: null,
date_time: null,
uuid: 72f98069-206d-4f12-9f12-3d1e525a8e84,
password: null)
```

View File

@@ -6,4 +6,13 @@ Name | Type | Description | Notes
**bar** | **String** | | [optional]
**foo** | **String** | | [optional]
## Code Sample
```ruby
require 'Petstore'
instance = Petstore::HasOnlyReadOnly.new(bar: null,
foo: null)
```

View File

@@ -5,4 +5,12 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**_123_list** | **String** | | [optional]
## Code Sample
```ruby
require 'Petstore'
instance = Petstore::List.new(_123_list: null)
```

View File

@@ -8,4 +8,15 @@ Name | Type | Description | Notes
**direct_map** | **Hash<String, BOOLEAN>** | | [optional]
**indirect_map** | **Hash<String, BOOLEAN>** | | [optional]
## Code Sample
```ruby
require 'Petstore'
instance = Petstore::MapTest.new(map_map_of_string: null,
map_of_enum_string: null,
direct_map: null,
indirect_map: null)
```

View File

@@ -7,4 +7,14 @@ Name | Type | Description | Notes
**date_time** | **DateTime** | | [optional]
**map** | [**Hash<String, Animal>**](Animal.md) | | [optional]
## Code Sample
```ruby
require 'Petstore'
instance = Petstore::MixedPropertiesAndAdditionalPropertiesClass.new(uuid: null,
date_time: null,
map: null)
```

View File

@@ -6,4 +6,13 @@ Name | Type | Description | Notes
**name** | **Integer** | | [optional]
**_class** | **String** | | [optional]
## Code Sample
```ruby
require 'Petstore'
instance = Petstore::Model200Response.new(name: null,
_class: null)
```

View File

@@ -5,4 +5,12 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**_return** | **Integer** | | [optional]
## Code Sample
```ruby
require 'Petstore'
instance = Petstore::ModelReturn.new(_return: null)
```

View File

@@ -8,4 +8,15 @@ Name | Type | Description | Notes
**property** | **String** | | [optional]
**_123_number** | **Integer** | | [optional]
## Code Sample
```ruby
require 'Petstore'
instance = Petstore::Name.new(name: null,
snake_case: null,
property: null,
_123_number: null)
```

View File

@@ -5,4 +5,12 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**just_number** | **Float** | | [optional]
## Code Sample
```ruby
require 'Petstore'
instance = Petstore::NumberOnly.new(just_number: null)
```

View File

@@ -10,4 +10,17 @@ Name | Type | Description | Notes
**status** | **String** | Order Status | [optional]
**complete** | **BOOLEAN** | | [optional] [default to false]
## Code Sample
```ruby
require 'Petstore'
instance = Petstore::Order.new(id: null,
pet_id: null,
quantity: null,
ship_date: null,
status: null,
complete: null)
```

View File

@@ -7,4 +7,14 @@ Name | Type | Description | Notes
**my_string** | **String** | | [optional]
**my_boolean** | **BOOLEAN** | | [optional]
## Code Sample
```ruby
require 'Petstore'
instance = Petstore::OuterComposite.new(my_number: null,
my_string: null,
my_boolean: null)
```

View File

@@ -4,4 +4,12 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
## Code Sample
```ruby
require 'Petstore'
instance = Petstore::OuterEnum.new()
```

View File

@@ -10,4 +10,17 @@ Name | Type | Description | Notes
**tags** | [**Array<Tag>**](Tag.md) | | [optional]
**status** | **String** | pet status in the store | [optional]
## Code Sample
```ruby
require 'Petstore'
instance = Petstore::Pet.new(id: null,
category: null,
name: doggie,
photo_urls: null,
tags: null,
status: null)
```

View File

@@ -6,4 +6,13 @@ Name | Type | Description | Notes
**bar** | **String** | | [optional]
**baz** | **String** | | [optional]
## Code Sample
```ruby
require 'Petstore'
instance = Petstore::ReadOnlyFirst.new(bar: null,
baz: null)
```

View File

@@ -5,4 +5,12 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**special_property_name** | **Integer** | | [optional]
## Code Sample
```ruby
require 'Petstore'
instance = Petstore::SpecialModelName.new(special_property_name: null)
```

View File

@@ -6,4 +6,13 @@ Name | Type | Description | Notes
**id** | **Integer** | | [optional]
**name** | **String** | | [optional]
## Code Sample
```ruby
require 'Petstore'
instance = Petstore::Tag.new(id: null,
name: null)
```

View File

@@ -9,4 +9,16 @@ Name | Type | Description | Notes
**bool_item** | **BOOLEAN** | | [default to true]
**array_item** | **Array<Integer>** | |
## Code Sample
```ruby
require 'Petstore'
instance = Petstore::TypeHolderDefault.new(string_item: null,
number_item: null,
integer_item: null,
bool_item: null,
array_item: null)
```

View File

@@ -9,4 +9,16 @@ Name | Type | Description | Notes
**bool_item** | **BOOLEAN** | |
**array_item** | **Array<Integer>** | |
## Code Sample
```ruby
require 'Petstore'
instance = Petstore::TypeHolderExample.new(string_item: what,
number_item: 1.234,
integer_item: -2,
bool_item: true,
array_item: [0, 1, 2, 3])
```

View File

@@ -12,4 +12,19 @@ Name | Type | Description | Notes
**phone** | **String** | | [optional]
**user_status** | **Integer** | User Status | [optional]
## Code Sample
```ruby
require 'Petstore'
instance = Petstore::User.new(id: null,
username: null,
first_name: null,
last_name: null,
email: null,
password: null,
phone: null,
user_status: null)
```

View File

@@ -33,4 +33,40 @@ Name | Type | Description | Notes
**prefix_ns_array** | **Array<Integer>** | | [optional]
**prefix_ns_wrapped_array** | **Array<Integer>** | | [optional]
## Code Sample
```ruby
require 'Petstore'
instance = Petstore::XmlItem.new(attribute_string: string,
attribute_number: 1.234,
attribute_integer: -2,
attribute_boolean: true,
wrapped_array: null,
name_string: string,
name_number: 1.234,
name_integer: -2,
name_boolean: true,
name_array: null,
name_wrapped_array: null,
prefix_string: string,
prefix_number: 1.234,
prefix_integer: -2,
prefix_boolean: true,
prefix_array: null,
prefix_wrapped_array: null,
namespace_string: string,
namespace_number: 1.234,
namespace_integer: -2,
namespace_boolean: true,
namespace_array: null,
namespace_wrapped_array: null,
prefix_ns_string: string,
prefix_ns_number: 1.234,
prefix_ns_integer: -2,
prefix_ns_boolean: true,
prefix_ns_array: null,
prefix_ns_wrapped_array: null)
```

View File

@@ -34,5 +34,24 @@ module Petstore
super arg
end
end
# Override to_s to display a friendly error message
def to_s
message
end
def message
if @message.nil?
msg = "Error message: the server returns an error"
else
msg = @message
end
msg += "\nHTTP status code: #{code}" if code
msg += "\nResponse headers: #{response_headers}" if response_headers
msg += "\nResponse body: #{response_body}" if response_body
msg
end
end
end

View File

@@ -37,18 +37,25 @@ module Petstore
# Initializes the object
# @param [Hash] attributes Model attributes in the form of hash
def initialize(attributes = {})
return unless attributes.is_a?(Hash)
if (!attributes.is_a?(Hash))
fail ArgumentError, "The input argument (attributes) must be a hash in `Petstore::AdditionalPropertiesClass` initialize method"
end
# convert string to symbol for hash key
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
# check to see if the attribute exists and convert string to symbol for hash key
attributes = attributes.each_with_object({}) { |(k, v), h|
if (!self.class.attribute_map.key?(k.to_sym))
fail ArgumentError, "`#{k}` is not a valid attribute in `Petstore::AdditionalPropertiesClass`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
end
h[k.to_sym] = v
}
if attributes.has_key?(:'map_property')
if attributes.key?(:'map_property')
if (value = attributes[:'map_property']).is_a?(Hash)
self.map_property = value
end
end
if attributes.has_key?(:'map_of_map_property')
if attributes.key?(:'map_of_map_property')
if (value = attributes[:'map_of_map_property']).is_a?(Hash)
self.map_of_map_property = value
end

View File

@@ -42,16 +42,23 @@ module Petstore
# Initializes the object
# @param [Hash] attributes Model attributes in the form of hash
def initialize(attributes = {})
return unless attributes.is_a?(Hash)
# convert string to symbol for hash key
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
if attributes.has_key?(:'className')
self.class_name = attributes[:'className']
if (!attributes.is_a?(Hash))
fail ArgumentError, "The input argument (attributes) must be a hash in `Petstore::Animal` initialize method"
end
if attributes.has_key?(:'color')
# check to see if the attribute exists and convert string to symbol for hash key
attributes = attributes.each_with_object({}) { |(k, v), h|
if (!self.class.attribute_map.key?(k.to_sym))
fail ArgumentError, "`#{k}` is not a valid attribute in `Petstore::Animal`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
end
h[k.to_sym] = v
}
if attributes.key?(:'class_name')
self.class_name = attributes[:'class_name']
end
if attributes.key?(:'color')
self.color = attributes[:'color']
else
self.color = 'red'

View File

@@ -41,20 +41,27 @@ module Petstore
# Initializes the object
# @param [Hash] attributes Model attributes in the form of hash
def initialize(attributes = {})
return unless attributes.is_a?(Hash)
if (!attributes.is_a?(Hash))
fail ArgumentError, "The input argument (attributes) must be a hash in `Petstore::ApiResponse` initialize method"
end
# convert string to symbol for hash key
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
# check to see if the attribute exists and convert string to symbol for hash key
attributes = attributes.each_with_object({}) { |(k, v), h|
if (!self.class.attribute_map.key?(k.to_sym))
fail ArgumentError, "`#{k}` is not a valid attribute in `Petstore::ApiResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
end
h[k.to_sym] = v
}
if attributes.has_key?(:'code')
if attributes.key?(:'code')
self.code = attributes[:'code']
end
if attributes.has_key?(:'type')
if attributes.key?(:'type')
self.type = attributes[:'type']
end
if attributes.has_key?(:'message')
if attributes.key?(:'message')
self.message = attributes[:'message']
end
end

View File

@@ -33,13 +33,20 @@ module Petstore
# Initializes the object
# @param [Hash] attributes Model attributes in the form of hash
def initialize(attributes = {})
return unless attributes.is_a?(Hash)
if (!attributes.is_a?(Hash))
fail ArgumentError, "The input argument (attributes) must be a hash in `Petstore::ArrayOfArrayOfNumberOnly` initialize method"
end
# convert string to symbol for hash key
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
# check to see if the attribute exists and convert string to symbol for hash key
attributes = attributes.each_with_object({}) { |(k, v), h|
if (!self.class.attribute_map.key?(k.to_sym))
fail ArgumentError, "`#{k}` is not a valid attribute in `Petstore::ArrayOfArrayOfNumberOnly`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
end
h[k.to_sym] = v
}
if attributes.has_key?(:'ArrayArrayNumber')
if (value = attributes[:'ArrayArrayNumber']).is_a?(Array)
if attributes.key?(:'array_array_number')
if (value = attributes[:'array_array_number']).is_a?(Array)
self.array_array_number = value
end
end

View File

@@ -33,13 +33,20 @@ module Petstore
# Initializes the object
# @param [Hash] attributes Model attributes in the form of hash
def initialize(attributes = {})
return unless attributes.is_a?(Hash)
if (!attributes.is_a?(Hash))
fail ArgumentError, "The input argument (attributes) must be a hash in `Petstore::ArrayOfNumberOnly` initialize method"
end
# convert string to symbol for hash key
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
# check to see if the attribute exists and convert string to symbol for hash key
attributes = attributes.each_with_object({}) { |(k, v), h|
if (!self.class.attribute_map.key?(k.to_sym))
fail ArgumentError, "`#{k}` is not a valid attribute in `Petstore::ArrayOfNumberOnly`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
end
h[k.to_sym] = v
}
if attributes.has_key?(:'ArrayNumber')
if (value = attributes[:'ArrayNumber']).is_a?(Array)
if attributes.key?(:'array_number')
if (value = attributes[:'array_number']).is_a?(Array)
self.array_number = value
end
end

View File

@@ -41,24 +41,31 @@ module Petstore
# Initializes the object
# @param [Hash] attributes Model attributes in the form of hash
def initialize(attributes = {})
return unless attributes.is_a?(Hash)
if (!attributes.is_a?(Hash))
fail ArgumentError, "The input argument (attributes) must be a hash in `Petstore::ArrayTest` initialize method"
end
# convert string to symbol for hash key
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
# check to see if the attribute exists and convert string to symbol for hash key
attributes = attributes.each_with_object({}) { |(k, v), h|
if (!self.class.attribute_map.key?(k.to_sym))
fail ArgumentError, "`#{k}` is not a valid attribute in `Petstore::ArrayTest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
end
h[k.to_sym] = v
}
if attributes.has_key?(:'array_of_string')
if attributes.key?(:'array_of_string')
if (value = attributes[:'array_of_string']).is_a?(Array)
self.array_of_string = value
end
end
if attributes.has_key?(:'array_array_of_integer')
if attributes.key?(:'array_array_of_integer')
if (value = attributes[:'array_array_of_integer']).is_a?(Array)
self.array_array_of_integer = value
end
end
if attributes.has_key?(:'array_array_of_model')
if attributes.key?(:'array_array_of_model')
if (value = attributes[:'array_array_of_model']).is_a?(Array)
self.array_array_of_model = value
end

View File

@@ -54,33 +54,40 @@ module Petstore
# Initializes the object
# @param [Hash] attributes Model attributes in the form of hash
def initialize(attributes = {})
return unless attributes.is_a?(Hash)
# convert string to symbol for hash key
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
if attributes.has_key?(:'smallCamel')
self.small_camel = attributes[:'smallCamel']
if (!attributes.is_a?(Hash))
fail ArgumentError, "The input argument (attributes) must be a hash in `Petstore::Capitalization` initialize method"
end
if attributes.has_key?(:'CapitalCamel')
self.capital_camel = attributes[:'CapitalCamel']
# check to see if the attribute exists and convert string to symbol for hash key
attributes = attributes.each_with_object({}) { |(k, v), h|
if (!self.class.attribute_map.key?(k.to_sym))
fail ArgumentError, "`#{k}` is not a valid attribute in `Petstore::Capitalization`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
end
h[k.to_sym] = v
}
if attributes.key?(:'small_camel')
self.small_camel = attributes[:'small_camel']
end
if attributes.has_key?(:'small_Snake')
self.small_snake = attributes[:'small_Snake']
if attributes.key?(:'capital_camel')
self.capital_camel = attributes[:'capital_camel']
end
if attributes.has_key?(:'Capital_Snake')
self.capital_snake = attributes[:'Capital_Snake']
if attributes.key?(:'small_snake')
self.small_snake = attributes[:'small_snake']
end
if attributes.has_key?(:'SCA_ETH_Flow_Points')
self.sca_eth_flow_points = attributes[:'SCA_ETH_Flow_Points']
if attributes.key?(:'capital_snake')
self.capital_snake = attributes[:'capital_snake']
end
if attributes.has_key?(:'ATT_NAME')
self.att_name = attributes[:'ATT_NAME']
if attributes.key?(:'sca_eth_flow_points')
self.sca_eth_flow_points = attributes[:'sca_eth_flow_points']
end
if attributes.key?(:'att_name')
self.att_name = attributes[:'att_name']
end
end

View File

@@ -40,15 +40,22 @@ module Petstore
# Initializes the object
# @param [Hash] attributes Model attributes in the form of hash
def initialize(attributes = {})
return unless attributes.is_a?(Hash)
if (!attributes.is_a?(Hash))
fail ArgumentError, "The input argument (attributes) must be a hash in `Petstore::Cat` initialize method"
end
# convert string to symbol for hash key
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
# check to see if the attribute exists and convert string to symbol for hash key
attributes = attributes.each_with_object({}) { |(k, v), h|
if (!self.class.attribute_map.key?(k.to_sym))
fail ArgumentError, "`#{k}` is not a valid attribute in `Petstore::Cat`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
end
h[k.to_sym] = v
}
# call parent's initialize
super(attributes)
if attributes.has_key?(:'declawed')
if attributes.key?(:'declawed')
self.declawed = attributes[:'declawed']
end
end

View File

@@ -37,16 +37,23 @@ module Petstore
# Initializes the object
# @param [Hash] attributes Model attributes in the form of hash
def initialize(attributes = {})
return unless attributes.is_a?(Hash)
if (!attributes.is_a?(Hash))
fail ArgumentError, "The input argument (attributes) must be a hash in `Petstore::Category` initialize method"
end
# convert string to symbol for hash key
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
# check to see if the attribute exists and convert string to symbol for hash key
attributes = attributes.each_with_object({}) { |(k, v), h|
if (!self.class.attribute_map.key?(k.to_sym))
fail ArgumentError, "`#{k}` is not a valid attribute in `Petstore::Category`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
end
h[k.to_sym] = v
}
if attributes.has_key?(:'id')
if attributes.key?(:'id')
self.id = attributes[:'id']
end
if attributes.has_key?(:'name')
if attributes.key?(:'name')
self.name = attributes[:'name']
else
self.name = 'default-name'

View File

@@ -34,12 +34,19 @@ module Petstore
# Initializes the object
# @param [Hash] attributes Model attributes in the form of hash
def initialize(attributes = {})
return unless attributes.is_a?(Hash)
if (!attributes.is_a?(Hash))
fail ArgumentError, "The input argument (attributes) must be a hash in `Petstore::ClassModel` initialize method"
end
# convert string to symbol for hash key
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
# check to see if the attribute exists and convert string to symbol for hash key
attributes = attributes.each_with_object({}) { |(k, v), h|
if (!self.class.attribute_map.key?(k.to_sym))
fail ArgumentError, "`#{k}` is not a valid attribute in `Petstore::ClassModel`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
end
h[k.to_sym] = v
}
if attributes.has_key?(:'_class')
if attributes.key?(:'_class')
self._class = attributes[:'_class']
end
end

View File

@@ -33,12 +33,19 @@ module Petstore
# Initializes the object
# @param [Hash] attributes Model attributes in the form of hash
def initialize(attributes = {})
return unless attributes.is_a?(Hash)
if (!attributes.is_a?(Hash))
fail ArgumentError, "The input argument (attributes) must be a hash in `Petstore::Client` initialize method"
end
# convert string to symbol for hash key
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
# check to see if the attribute exists and convert string to symbol for hash key
attributes = attributes.each_with_object({}) { |(k, v), h|
if (!self.class.attribute_map.key?(k.to_sym))
fail ArgumentError, "`#{k}` is not a valid attribute in `Petstore::Client`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
end
h[k.to_sym] = v
}
if attributes.has_key?(:'client')
if attributes.key?(:'client')
self.client = attributes[:'client']
end
end

View File

@@ -40,15 +40,22 @@ module Petstore
# Initializes the object
# @param [Hash] attributes Model attributes in the form of hash
def initialize(attributes = {})
return unless attributes.is_a?(Hash)
if (!attributes.is_a?(Hash))
fail ArgumentError, "The input argument (attributes) must be a hash in `Petstore::Dog` initialize method"
end
# convert string to symbol for hash key
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
# check to see if the attribute exists and convert string to symbol for hash key
attributes = attributes.each_with_object({}) { |(k, v), h|
if (!self.class.attribute_map.key?(k.to_sym))
fail ArgumentError, "`#{k}` is not a valid attribute in `Petstore::Dog`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
end
h[k.to_sym] = v
}
# call parent's initialize
super(attributes)
if attributes.has_key?(:'breed')
if attributes.key?(:'breed')
self.breed = attributes[:'breed']
end
end

View File

@@ -59,16 +59,23 @@ module Petstore
# Initializes the object
# @param [Hash] attributes Model attributes in the form of hash
def initialize(attributes = {})
return unless attributes.is_a?(Hash)
if (!attributes.is_a?(Hash))
fail ArgumentError, "The input argument (attributes) must be a hash in `Petstore::EnumArrays` initialize method"
end
# convert string to symbol for hash key
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
# check to see if the attribute exists and convert string to symbol for hash key
attributes = attributes.each_with_object({}) { |(k, v), h|
if (!self.class.attribute_map.key?(k.to_sym))
fail ArgumentError, "`#{k}` is not a valid attribute in `Petstore::EnumArrays`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
end
h[k.to_sym] = v
}
if attributes.has_key?(:'just_symbol')
if attributes.key?(:'just_symbol')
self.just_symbol = attributes[:'just_symbol']
end
if attributes.has_key?(:'array_enum')
if attributes.key?(:'array_enum')
if (value = attributes[:'array_enum']).is_a?(Array)
self.array_enum = value
end

View File

@@ -71,29 +71,36 @@ module Petstore
# Initializes the object
# @param [Hash] attributes Model attributes in the form of hash
def initialize(attributes = {})
return unless attributes.is_a?(Hash)
if (!attributes.is_a?(Hash))
fail ArgumentError, "The input argument (attributes) must be a hash in `Petstore::EnumTest` initialize method"
end
# convert string to symbol for hash key
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
# check to see if the attribute exists and convert string to symbol for hash key
attributes = attributes.each_with_object({}) { |(k, v), h|
if (!self.class.attribute_map.key?(k.to_sym))
fail ArgumentError, "`#{k}` is not a valid attribute in `Petstore::EnumTest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
end
h[k.to_sym] = v
}
if attributes.has_key?(:'enum_string')
if attributes.key?(:'enum_string')
self.enum_string = attributes[:'enum_string']
end
if attributes.has_key?(:'enum_string_required')
if attributes.key?(:'enum_string_required')
self.enum_string_required = attributes[:'enum_string_required']
end
if attributes.has_key?(:'enum_integer')
if attributes.key?(:'enum_integer')
self.enum_integer = attributes[:'enum_integer']
end
if attributes.has_key?(:'enum_number')
if attributes.key?(:'enum_number')
self.enum_number = attributes[:'enum_number']
end
if attributes.has_key?(:'outerEnum')
self.outer_enum = attributes[:'outerEnum']
if attributes.key?(:'outer_enum')
self.outer_enum = attributes[:'outer_enum']
end
end

View File

@@ -35,13 +35,20 @@ module Petstore
# Initializes the object
# @param [Hash] attributes Model attributes in the form of hash
def initialize(attributes = {})
return unless attributes.is_a?(Hash)
if (!attributes.is_a?(Hash))
fail ArgumentError, "The input argument (attributes) must be a hash in `Petstore::File` initialize method"
end
# convert string to symbol for hash key
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
# check to see if the attribute exists and convert string to symbol for hash key
attributes = attributes.each_with_object({}) { |(k, v), h|
if (!self.class.attribute_map.key?(k.to_sym))
fail ArgumentError, "`#{k}` is not a valid attribute in `Petstore::File`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
end
h[k.to_sym] = v
}
if attributes.has_key?(:'sourceURI')
self.source_uri = attributes[:'sourceURI']
if attributes.key?(:'source_uri')
self.source_uri = attributes[:'source_uri']
end
end

View File

@@ -37,16 +37,23 @@ module Petstore
# Initializes the object
# @param [Hash] attributes Model attributes in the form of hash
def initialize(attributes = {})
return unless attributes.is_a?(Hash)
if (!attributes.is_a?(Hash))
fail ArgumentError, "The input argument (attributes) must be a hash in `Petstore::FileSchemaTestClass` initialize method"
end
# convert string to symbol for hash key
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
# check to see if the attribute exists and convert string to symbol for hash key
attributes = attributes.each_with_object({}) { |(k, v), h|
if (!self.class.attribute_map.key?(k.to_sym))
fail ArgumentError, "`#{k}` is not a valid attribute in `Petstore::FileSchemaTestClass`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
end
h[k.to_sym] = v
}
if attributes.has_key?(:'file')
if attributes.key?(:'file')
self.file = attributes[:'file']
end
if attributes.has_key?(:'files')
if attributes.key?(:'files')
if (value = attributes[:'files']).is_a?(Array)
self.files = value
end

View File

@@ -81,60 +81,67 @@ module Petstore
# Initializes the object
# @param [Hash] attributes Model attributes in the form of hash
def initialize(attributes = {})
return unless attributes.is_a?(Hash)
if (!attributes.is_a?(Hash))
fail ArgumentError, "The input argument (attributes) must be a hash in `Petstore::FormatTest` initialize method"
end
# convert string to symbol for hash key
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
# check to see if the attribute exists and convert string to symbol for hash key
attributes = attributes.each_with_object({}) { |(k, v), h|
if (!self.class.attribute_map.key?(k.to_sym))
fail ArgumentError, "`#{k}` is not a valid attribute in `Petstore::FormatTest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
end
h[k.to_sym] = v
}
if attributes.has_key?(:'integer')
if attributes.key?(:'integer')
self.integer = attributes[:'integer']
end
if attributes.has_key?(:'int32')
if attributes.key?(:'int32')
self.int32 = attributes[:'int32']
end
if attributes.has_key?(:'int64')
if attributes.key?(:'int64')
self.int64 = attributes[:'int64']
end
if attributes.has_key?(:'number')
if attributes.key?(:'number')
self.number = attributes[:'number']
end
if attributes.has_key?(:'float')
if attributes.key?(:'float')
self.float = attributes[:'float']
end
if attributes.has_key?(:'double')
if attributes.key?(:'double')
self.double = attributes[:'double']
end
if attributes.has_key?(:'string')
if attributes.key?(:'string')
self.string = attributes[:'string']
end
if attributes.has_key?(:'byte')
if attributes.key?(:'byte')
self.byte = attributes[:'byte']
end
if attributes.has_key?(:'binary')
if attributes.key?(:'binary')
self.binary = attributes[:'binary']
end
if attributes.has_key?(:'date')
if attributes.key?(:'date')
self.date = attributes[:'date']
end
if attributes.has_key?(:'dateTime')
self.date_time = attributes[:'dateTime']
if attributes.key?(:'date_time')
self.date_time = attributes[:'date_time']
end
if attributes.has_key?(:'uuid')
if attributes.key?(:'uuid')
self.uuid = attributes[:'uuid']
end
if attributes.has_key?(:'password')
if attributes.key?(:'password')
self.password = attributes[:'password']
end
end

View File

@@ -37,16 +37,23 @@ module Petstore
# Initializes the object
# @param [Hash] attributes Model attributes in the form of hash
def initialize(attributes = {})
return unless attributes.is_a?(Hash)
if (!attributes.is_a?(Hash))
fail ArgumentError, "The input argument (attributes) must be a hash in `Petstore::HasOnlyReadOnly` initialize method"
end
# convert string to symbol for hash key
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
# check to see if the attribute exists and convert string to symbol for hash key
attributes = attributes.each_with_object({}) { |(k, v), h|
if (!self.class.attribute_map.key?(k.to_sym))
fail ArgumentError, "`#{k}` is not a valid attribute in `Petstore::HasOnlyReadOnly`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
end
h[k.to_sym] = v
}
if attributes.has_key?(:'bar')
if attributes.key?(:'bar')
self.bar = attributes[:'bar']
end
if attributes.has_key?(:'foo')
if attributes.key?(:'foo')
self.foo = attributes[:'foo']
end
end

View File

@@ -33,13 +33,20 @@ module Petstore
# Initializes the object
# @param [Hash] attributes Model attributes in the form of hash
def initialize(attributes = {})
return unless attributes.is_a?(Hash)
if (!attributes.is_a?(Hash))
fail ArgumentError, "The input argument (attributes) must be a hash in `Petstore::List` initialize method"
end
# convert string to symbol for hash key
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
# check to see if the attribute exists and convert string to symbol for hash key
attributes = attributes.each_with_object({}) { |(k, v), h|
if (!self.class.attribute_map.key?(k.to_sym))
fail ArgumentError, "`#{k}` is not a valid attribute in `Petstore::List`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
end
h[k.to_sym] = v
}
if attributes.has_key?(:'123-list')
self._123_list = attributes[:'123-list']
if attributes.key?(:'_123_list')
self._123_list = attributes[:'_123_list']
end
end

View File

@@ -67,30 +67,37 @@ module Petstore
# Initializes the object
# @param [Hash] attributes Model attributes in the form of hash
def initialize(attributes = {})
return unless attributes.is_a?(Hash)
if (!attributes.is_a?(Hash))
fail ArgumentError, "The input argument (attributes) must be a hash in `Petstore::MapTest` initialize method"
end
# convert string to symbol for hash key
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
# check to see if the attribute exists and convert string to symbol for hash key
attributes = attributes.each_with_object({}) { |(k, v), h|
if (!self.class.attribute_map.key?(k.to_sym))
fail ArgumentError, "`#{k}` is not a valid attribute in `Petstore::MapTest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
end
h[k.to_sym] = v
}
if attributes.has_key?(:'map_map_of_string')
if attributes.key?(:'map_map_of_string')
if (value = attributes[:'map_map_of_string']).is_a?(Hash)
self.map_map_of_string = value
end
end
if attributes.has_key?(:'map_of_enum_string')
if attributes.key?(:'map_of_enum_string')
if (value = attributes[:'map_of_enum_string']).is_a?(Hash)
self.map_of_enum_string = value
end
end
if attributes.has_key?(:'direct_map')
if attributes.key?(:'direct_map')
if (value = attributes[:'direct_map']).is_a?(Hash)
self.direct_map = value
end
end
if attributes.has_key?(:'indirect_map')
if attributes.key?(:'indirect_map')
if (value = attributes[:'indirect_map']).is_a?(Hash)
self.indirect_map = value
end

View File

@@ -41,20 +41,27 @@ module Petstore
# Initializes the object
# @param [Hash] attributes Model attributes in the form of hash
def initialize(attributes = {})
return unless attributes.is_a?(Hash)
if (!attributes.is_a?(Hash))
fail ArgumentError, "The input argument (attributes) must be a hash in `Petstore::MixedPropertiesAndAdditionalPropertiesClass` initialize method"
end
# convert string to symbol for hash key
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
# check to see if the attribute exists and convert string to symbol for hash key
attributes = attributes.each_with_object({}) { |(k, v), h|
if (!self.class.attribute_map.key?(k.to_sym))
fail ArgumentError, "`#{k}` is not a valid attribute in `Petstore::MixedPropertiesAndAdditionalPropertiesClass`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
end
h[k.to_sym] = v
}
if attributes.has_key?(:'uuid')
if attributes.key?(:'uuid')
self.uuid = attributes[:'uuid']
end
if attributes.has_key?(:'dateTime')
self.date_time = attributes[:'dateTime']
if attributes.key?(:'date_time')
self.date_time = attributes[:'date_time']
end
if attributes.has_key?(:'map')
if attributes.key?(:'map')
if (value = attributes[:'map']).is_a?(Hash)
self.map = value
end

View File

@@ -38,17 +38,24 @@ module Petstore
# Initializes the object
# @param [Hash] attributes Model attributes in the form of hash
def initialize(attributes = {})
return unless attributes.is_a?(Hash)
if (!attributes.is_a?(Hash))
fail ArgumentError, "The input argument (attributes) must be a hash in `Petstore::Model200Response` initialize method"
end
# convert string to symbol for hash key
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
# check to see if the attribute exists and convert string to symbol for hash key
attributes = attributes.each_with_object({}) { |(k, v), h|
if (!self.class.attribute_map.key?(k.to_sym))
fail ArgumentError, "`#{k}` is not a valid attribute in `Petstore::Model200Response`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
end
h[k.to_sym] = v
}
if attributes.has_key?(:'name')
if attributes.key?(:'name')
self.name = attributes[:'name']
end
if attributes.has_key?(:'class')
self._class = attributes[:'class']
if attributes.key?(:'_class')
self._class = attributes[:'_class']
end
end

View File

@@ -34,13 +34,20 @@ module Petstore
# Initializes the object
# @param [Hash] attributes Model attributes in the form of hash
def initialize(attributes = {})
return unless attributes.is_a?(Hash)
if (!attributes.is_a?(Hash))
fail ArgumentError, "The input argument (attributes) must be a hash in `Petstore::ModelReturn` initialize method"
end
# convert string to symbol for hash key
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
# check to see if the attribute exists and convert string to symbol for hash key
attributes = attributes.each_with_object({}) { |(k, v), h|
if (!self.class.attribute_map.key?(k.to_sym))
fail ArgumentError, "`#{k}` is not a valid attribute in `Petstore::ModelReturn`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
end
h[k.to_sym] = v
}
if attributes.has_key?(:'return')
self._return = attributes[:'return']
if attributes.key?(:'_return')
self._return = attributes[:'_return']
end
end

View File

@@ -46,25 +46,32 @@ module Petstore
# Initializes the object
# @param [Hash] attributes Model attributes in the form of hash
def initialize(attributes = {})
return unless attributes.is_a?(Hash)
if (!attributes.is_a?(Hash))
fail ArgumentError, "The input argument (attributes) must be a hash in `Petstore::Name` initialize method"
end
# convert string to symbol for hash key
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
# check to see if the attribute exists and convert string to symbol for hash key
attributes = attributes.each_with_object({}) { |(k, v), h|
if (!self.class.attribute_map.key?(k.to_sym))
fail ArgumentError, "`#{k}` is not a valid attribute in `Petstore::Name`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
end
h[k.to_sym] = v
}
if attributes.has_key?(:'name')
if attributes.key?(:'name')
self.name = attributes[:'name']
end
if attributes.has_key?(:'snake_case')
if attributes.key?(:'snake_case')
self.snake_case = attributes[:'snake_case']
end
if attributes.has_key?(:'property')
if attributes.key?(:'property')
self.property = attributes[:'property']
end
if attributes.has_key?(:'123Number')
self._123_number = attributes[:'123Number']
if attributes.key?(:'_123_number')
self._123_number = attributes[:'_123_number']
end
end

View File

@@ -33,13 +33,20 @@ module Petstore
# Initializes the object
# @param [Hash] attributes Model attributes in the form of hash
def initialize(attributes = {})
return unless attributes.is_a?(Hash)
if (!attributes.is_a?(Hash))
fail ArgumentError, "The input argument (attributes) must be a hash in `Petstore::NumberOnly` initialize method"
end
# convert string to symbol for hash key
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
# check to see if the attribute exists and convert string to symbol for hash key
attributes = attributes.each_with_object({}) { |(k, v), h|
if (!self.class.attribute_map.key?(k.to_sym))
fail ArgumentError, "`#{k}` is not a valid attribute in `Petstore::NumberOnly`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
end
h[k.to_sym] = v
}
if attributes.has_key?(:'JustNumber')
self.just_number = attributes[:'JustNumber']
if attributes.key?(:'just_number')
self.just_number = attributes[:'just_number']
end
end

View File

@@ -76,32 +76,39 @@ module Petstore
# Initializes the object
# @param [Hash] attributes Model attributes in the form of hash
def initialize(attributes = {})
return unless attributes.is_a?(Hash)
if (!attributes.is_a?(Hash))
fail ArgumentError, "The input argument (attributes) must be a hash in `Petstore::Order` initialize method"
end
# convert string to symbol for hash key
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
# check to see if the attribute exists and convert string to symbol for hash key
attributes = attributes.each_with_object({}) { |(k, v), h|
if (!self.class.attribute_map.key?(k.to_sym))
fail ArgumentError, "`#{k}` is not a valid attribute in `Petstore::Order`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
end
h[k.to_sym] = v
}
if attributes.has_key?(:'id')
if attributes.key?(:'id')
self.id = attributes[:'id']
end
if attributes.has_key?(:'petId')
self.pet_id = attributes[:'petId']
if attributes.key?(:'pet_id')
self.pet_id = attributes[:'pet_id']
end
if attributes.has_key?(:'quantity')
if attributes.key?(:'quantity')
self.quantity = attributes[:'quantity']
end
if attributes.has_key?(:'shipDate')
self.ship_date = attributes[:'shipDate']
if attributes.key?(:'ship_date')
self.ship_date = attributes[:'ship_date']
end
if attributes.has_key?(:'status')
if attributes.key?(:'status')
self.status = attributes[:'status']
end
if attributes.has_key?(:'complete')
if attributes.key?(:'complete')
self.complete = attributes[:'complete']
else
self.complete = false

View File

@@ -41,20 +41,27 @@ module Petstore
# Initializes the object
# @param [Hash] attributes Model attributes in the form of hash
def initialize(attributes = {})
return unless attributes.is_a?(Hash)
if (!attributes.is_a?(Hash))
fail ArgumentError, "The input argument (attributes) must be a hash in `Petstore::OuterComposite` initialize method"
end
# convert string to symbol for hash key
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
# check to see if the attribute exists and convert string to symbol for hash key
attributes = attributes.each_with_object({}) { |(k, v), h|
if (!self.class.attribute_map.key?(k.to_sym))
fail ArgumentError, "`#{k}` is not a valid attribute in `Petstore::OuterComposite`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
end
h[k.to_sym] = v
}
if attributes.has_key?(:'my_number')
if attributes.key?(:'my_number')
self.my_number = attributes[:'my_number']
end
if attributes.has_key?(:'my_string')
if attributes.key?(:'my_string')
self.my_string = attributes[:'my_string']
end
if attributes.has_key?(:'my_boolean')
if attributes.key?(:'my_boolean')
self.my_boolean = attributes[:'my_boolean']
end
end

View File

@@ -76,36 +76,43 @@ module Petstore
# Initializes the object
# @param [Hash] attributes Model attributes in the form of hash
def initialize(attributes = {})
return unless attributes.is_a?(Hash)
if (!attributes.is_a?(Hash))
fail ArgumentError, "The input argument (attributes) must be a hash in `Petstore::Pet` initialize method"
end
# convert string to symbol for hash key
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
# check to see if the attribute exists and convert string to symbol for hash key
attributes = attributes.each_with_object({}) { |(k, v), h|
if (!self.class.attribute_map.key?(k.to_sym))
fail ArgumentError, "`#{k}` is not a valid attribute in `Petstore::Pet`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
end
h[k.to_sym] = v
}
if attributes.has_key?(:'id')
if attributes.key?(:'id')
self.id = attributes[:'id']
end
if attributes.has_key?(:'category')
if attributes.key?(:'category')
self.category = attributes[:'category']
end
if attributes.has_key?(:'name')
if attributes.key?(:'name')
self.name = attributes[:'name']
end
if attributes.has_key?(:'photoUrls')
if (value = attributes[:'photoUrls']).is_a?(Array)
if attributes.key?(:'photo_urls')
if (value = attributes[:'photo_urls']).is_a?(Array)
self.photo_urls = value
end
end
if attributes.has_key?(:'tags')
if attributes.key?(:'tags')
if (value = attributes[:'tags']).is_a?(Array)
self.tags = value
end
end
if attributes.has_key?(:'status')
if attributes.key?(:'status')
self.status = attributes[:'status']
end
end

View File

@@ -37,16 +37,23 @@ module Petstore
# Initializes the object
# @param [Hash] attributes Model attributes in the form of hash
def initialize(attributes = {})
return unless attributes.is_a?(Hash)
if (!attributes.is_a?(Hash))
fail ArgumentError, "The input argument (attributes) must be a hash in `Petstore::ReadOnlyFirst` initialize method"
end
# convert string to symbol for hash key
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
# check to see if the attribute exists and convert string to symbol for hash key
attributes = attributes.each_with_object({}) { |(k, v), h|
if (!self.class.attribute_map.key?(k.to_sym))
fail ArgumentError, "`#{k}` is not a valid attribute in `Petstore::ReadOnlyFirst`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
end
h[k.to_sym] = v
}
if attributes.has_key?(:'bar')
if attributes.key?(:'bar')
self.bar = attributes[:'bar']
end
if attributes.has_key?(:'baz')
if attributes.key?(:'baz')
self.baz = attributes[:'baz']
end
end

View File

@@ -33,13 +33,20 @@ module Petstore
# Initializes the object
# @param [Hash] attributes Model attributes in the form of hash
def initialize(attributes = {})
return unless attributes.is_a?(Hash)
if (!attributes.is_a?(Hash))
fail ArgumentError, "The input argument (attributes) must be a hash in `Petstore::SpecialModelName` initialize method"
end
# convert string to symbol for hash key
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
# check to see if the attribute exists and convert string to symbol for hash key
attributes = attributes.each_with_object({}) { |(k, v), h|
if (!self.class.attribute_map.key?(k.to_sym))
fail ArgumentError, "`#{k}` is not a valid attribute in `Petstore::SpecialModelName`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
end
h[k.to_sym] = v
}
if attributes.has_key?(:'$special[property.name]')
self.special_property_name = attributes[:'$special[property.name]']
if attributes.key?(:'special_property_name')
self.special_property_name = attributes[:'special_property_name']
end
end

View File

@@ -37,16 +37,23 @@ module Petstore
# Initializes the object
# @param [Hash] attributes Model attributes in the form of hash
def initialize(attributes = {})
return unless attributes.is_a?(Hash)
if (!attributes.is_a?(Hash))
fail ArgumentError, "The input argument (attributes) must be a hash in `Petstore::Tag` initialize method"
end
# convert string to symbol for hash key
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
# check to see if the attribute exists and convert string to symbol for hash key
attributes = attributes.each_with_object({}) { |(k, v), h|
if (!self.class.attribute_map.key?(k.to_sym))
fail ArgumentError, "`#{k}` is not a valid attribute in `Petstore::Tag`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
end
h[k.to_sym] = v
}
if attributes.has_key?(:'id')
if attributes.key?(:'id')
self.id = attributes[:'id']
end
if attributes.has_key?(:'name')
if attributes.key?(:'name')
self.name = attributes[:'name']
end
end

View File

@@ -49,32 +49,39 @@ module Petstore
# Initializes the object
# @param [Hash] attributes Model attributes in the form of hash
def initialize(attributes = {})
return unless attributes.is_a?(Hash)
if (!attributes.is_a?(Hash))
fail ArgumentError, "The input argument (attributes) must be a hash in `Petstore::TypeHolderDefault` initialize method"
end
# convert string to symbol for hash key
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
# check to see if the attribute exists and convert string to symbol for hash key
attributes = attributes.each_with_object({}) { |(k, v), h|
if (!self.class.attribute_map.key?(k.to_sym))
fail ArgumentError, "`#{k}` is not a valid attribute in `Petstore::TypeHolderDefault`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
end
h[k.to_sym] = v
}
if attributes.has_key?(:'string_item')
if attributes.key?(:'string_item')
self.string_item = attributes[:'string_item']
else
self.string_item = 'what'
end
if attributes.has_key?(:'number_item')
if attributes.key?(:'number_item')
self.number_item = attributes[:'number_item']
end
if attributes.has_key?(:'integer_item')
if attributes.key?(:'integer_item')
self.integer_item = attributes[:'integer_item']
end
if attributes.has_key?(:'bool_item')
if attributes.key?(:'bool_item')
self.bool_item = attributes[:'bool_item']
else
self.bool_item = true
end
if attributes.has_key?(:'array_item')
if attributes.key?(:'array_item')
if (value = attributes[:'array_item']).is_a?(Array)
self.array_item = value
end

View File

@@ -49,28 +49,35 @@ module Petstore
# Initializes the object
# @param [Hash] attributes Model attributes in the form of hash
def initialize(attributes = {})
return unless attributes.is_a?(Hash)
if (!attributes.is_a?(Hash))
fail ArgumentError, "The input argument (attributes) must be a hash in `Petstore::TypeHolderExample` initialize method"
end
# convert string to symbol for hash key
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
# check to see if the attribute exists and convert string to symbol for hash key
attributes = attributes.each_with_object({}) { |(k, v), h|
if (!self.class.attribute_map.key?(k.to_sym))
fail ArgumentError, "`#{k}` is not a valid attribute in `Petstore::TypeHolderExample`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
end
h[k.to_sym] = v
}
if attributes.has_key?(:'string_item')
if attributes.key?(:'string_item')
self.string_item = attributes[:'string_item']
end
if attributes.has_key?(:'number_item')
if attributes.key?(:'number_item')
self.number_item = attributes[:'number_item']
end
if attributes.has_key?(:'integer_item')
if attributes.key?(:'integer_item')
self.integer_item = attributes[:'integer_item']
end
if attributes.has_key?(:'bool_item')
if attributes.key?(:'bool_item')
self.bool_item = attributes[:'bool_item']
end
if attributes.has_key?(:'array_item')
if attributes.key?(:'array_item')
if (value = attributes[:'array_item']).is_a?(Array)
self.array_item = value
end

View File

@@ -62,41 +62,48 @@ module Petstore
# Initializes the object
# @param [Hash] attributes Model attributes in the form of hash
def initialize(attributes = {})
return unless attributes.is_a?(Hash)
if (!attributes.is_a?(Hash))
fail ArgumentError, "The input argument (attributes) must be a hash in `Petstore::User` initialize method"
end
# convert string to symbol for hash key
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
# check to see if the attribute exists and convert string to symbol for hash key
attributes = attributes.each_with_object({}) { |(k, v), h|
if (!self.class.attribute_map.key?(k.to_sym))
fail ArgumentError, "`#{k}` is not a valid attribute in `Petstore::User`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
end
h[k.to_sym] = v
}
if attributes.has_key?(:'id')
if attributes.key?(:'id')
self.id = attributes[:'id']
end
if attributes.has_key?(:'username')
if attributes.key?(:'username')
self.username = attributes[:'username']
end
if attributes.has_key?(:'firstName')
self.first_name = attributes[:'firstName']
if attributes.key?(:'first_name')
self.first_name = attributes[:'first_name']
end
if attributes.has_key?(:'lastName')
self.last_name = attributes[:'lastName']
if attributes.key?(:'last_name')
self.last_name = attributes[:'last_name']
end
if attributes.has_key?(:'email')
if attributes.key?(:'email')
self.email = attributes[:'email']
end
if attributes.has_key?(:'password')
if attributes.key?(:'password')
self.password = attributes[:'password']
end
if attributes.has_key?(:'phone')
if attributes.key?(:'phone')
self.phone = attributes[:'phone']
end
if attributes.has_key?(:'userStatus')
self.user_status = attributes[:'userStatus']
if attributes.key?(:'user_status')
self.user_status = attributes[:'user_status']
end
end

View File

@@ -145,140 +145,147 @@ module Petstore
# Initializes the object
# @param [Hash] attributes Model attributes in the form of hash
def initialize(attributes = {})
return unless attributes.is_a?(Hash)
if (!attributes.is_a?(Hash))
fail ArgumentError, "The input argument (attributes) must be a hash in `Petstore::XmlItem` initialize method"
end
# convert string to symbol for hash key
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
# check to see if the attribute exists and convert string to symbol for hash key
attributes = attributes.each_with_object({}) { |(k, v), h|
if (!self.class.attribute_map.key?(k.to_sym))
fail ArgumentError, "`#{k}` is not a valid attribute in `Petstore::XmlItem`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
end
h[k.to_sym] = v
}
if attributes.has_key?(:'attribute_string')
if attributes.key?(:'attribute_string')
self.attribute_string = attributes[:'attribute_string']
end
if attributes.has_key?(:'attribute_number')
if attributes.key?(:'attribute_number')
self.attribute_number = attributes[:'attribute_number']
end
if attributes.has_key?(:'attribute_integer')
if attributes.key?(:'attribute_integer')
self.attribute_integer = attributes[:'attribute_integer']
end
if attributes.has_key?(:'attribute_boolean')
if attributes.key?(:'attribute_boolean')
self.attribute_boolean = attributes[:'attribute_boolean']
end
if attributes.has_key?(:'wrapped_array')
if attributes.key?(:'wrapped_array')
if (value = attributes[:'wrapped_array']).is_a?(Array)
self.wrapped_array = value
end
end
if attributes.has_key?(:'name_string')
if attributes.key?(:'name_string')
self.name_string = attributes[:'name_string']
end
if attributes.has_key?(:'name_number')
if attributes.key?(:'name_number')
self.name_number = attributes[:'name_number']
end
if attributes.has_key?(:'name_integer')
if attributes.key?(:'name_integer')
self.name_integer = attributes[:'name_integer']
end
if attributes.has_key?(:'name_boolean')
if attributes.key?(:'name_boolean')
self.name_boolean = attributes[:'name_boolean']
end
if attributes.has_key?(:'name_array')
if attributes.key?(:'name_array')
if (value = attributes[:'name_array']).is_a?(Array)
self.name_array = value
end
end
if attributes.has_key?(:'name_wrapped_array')
if attributes.key?(:'name_wrapped_array')
if (value = attributes[:'name_wrapped_array']).is_a?(Array)
self.name_wrapped_array = value
end
end
if attributes.has_key?(:'prefix_string')
if attributes.key?(:'prefix_string')
self.prefix_string = attributes[:'prefix_string']
end
if attributes.has_key?(:'prefix_number')
if attributes.key?(:'prefix_number')
self.prefix_number = attributes[:'prefix_number']
end
if attributes.has_key?(:'prefix_integer')
if attributes.key?(:'prefix_integer')
self.prefix_integer = attributes[:'prefix_integer']
end
if attributes.has_key?(:'prefix_boolean')
if attributes.key?(:'prefix_boolean')
self.prefix_boolean = attributes[:'prefix_boolean']
end
if attributes.has_key?(:'prefix_array')
if attributes.key?(:'prefix_array')
if (value = attributes[:'prefix_array']).is_a?(Array)
self.prefix_array = value
end
end
if attributes.has_key?(:'prefix_wrapped_array')
if attributes.key?(:'prefix_wrapped_array')
if (value = attributes[:'prefix_wrapped_array']).is_a?(Array)
self.prefix_wrapped_array = value
end
end
if attributes.has_key?(:'namespace_string')
if attributes.key?(:'namespace_string')
self.namespace_string = attributes[:'namespace_string']
end
if attributes.has_key?(:'namespace_number')
if attributes.key?(:'namespace_number')
self.namespace_number = attributes[:'namespace_number']
end
if attributes.has_key?(:'namespace_integer')
if attributes.key?(:'namespace_integer')
self.namespace_integer = attributes[:'namespace_integer']
end
if attributes.has_key?(:'namespace_boolean')
if attributes.key?(:'namespace_boolean')
self.namespace_boolean = attributes[:'namespace_boolean']
end
if attributes.has_key?(:'namespace_array')
if attributes.key?(:'namespace_array')
if (value = attributes[:'namespace_array']).is_a?(Array)
self.namespace_array = value
end
end
if attributes.has_key?(:'namespace_wrapped_array')
if attributes.key?(:'namespace_wrapped_array')
if (value = attributes[:'namespace_wrapped_array']).is_a?(Array)
self.namespace_wrapped_array = value
end
end
if attributes.has_key?(:'prefix_ns_string')
if attributes.key?(:'prefix_ns_string')
self.prefix_ns_string = attributes[:'prefix_ns_string']
end
if attributes.has_key?(:'prefix_ns_number')
if attributes.key?(:'prefix_ns_number')
self.prefix_ns_number = attributes[:'prefix_ns_number']
end
if attributes.has_key?(:'prefix_ns_integer')
if attributes.key?(:'prefix_ns_integer')
self.prefix_ns_integer = attributes[:'prefix_ns_integer']
end
if attributes.has_key?(:'prefix_ns_boolean')
if attributes.key?(:'prefix_ns_boolean')
self.prefix_ns_boolean = attributes[:'prefix_ns_boolean']
end
if attributes.has_key?(:'prefix_ns_array')
if attributes.key?(:'prefix_ns_array')
if (value = attributes[:'prefix_ns_array']).is_a?(Array)
self.prefix_ns_array = value
end
end
if attributes.has_key?(:'prefix_ns_wrapped_array')
if attributes.key?(:'prefix_ns_wrapped_array')
if (value = attributes[:'prefix_ns_wrapped_array']).is_a?(Array)
self.prefix_ns_wrapped_array = value
end

View File

@@ -0,0 +1,11 @@
language: ruby
cache: bundler
rvm:
- 2.3
- 2.4
- 2.5
script:
- bundle install --path vendor/bundle
- bundle exec rspec
- gem build petstore.gemspec
- gem install ./petstore-1.0.0.gem

View File

@@ -6,4 +6,13 @@ Name | Type | Description | Notes
**map_property** | **Hash<String, String>** | | [optional]
**map_of_map_property** | **Hash<String, Hash<String, String>>** | | [optional]
## Code Sample
```ruby
require 'Petstore'
instance = Petstore::AdditionalPropertiesClass.new(map_property: null,
map_of_map_property: null)
```

View File

@@ -6,4 +6,13 @@ Name | Type | Description | Notes
**class_name** | **String** | |
**color** | **String** | | [optional] [default to 'red']
## Code Sample
```ruby
require 'Petstore'
instance = Petstore::Animal.new(class_name: null,
color: null)
```

View File

@@ -7,4 +7,14 @@ Name | Type | Description | Notes
**type** | **String** | | [optional]
**message** | **String** | | [optional]
## Code Sample
```ruby
require 'Petstore'
instance = Petstore::ApiResponse.new(code: null,
type: null,
message: null)
```

View File

@@ -5,4 +5,12 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**array_array_number** | **Array<Array<Float>>** | | [optional]
## Code Sample
```ruby
require 'Petstore'
instance = Petstore::ArrayOfArrayOfNumberOnly.new(array_array_number: null)
```

View File

@@ -5,4 +5,12 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**array_number** | **Array<Float>** | | [optional]
## Code Sample
```ruby
require 'Petstore'
instance = Petstore::ArrayOfNumberOnly.new(array_number: null)
```

View File

@@ -7,4 +7,14 @@ Name | Type | Description | Notes
**array_array_of_integer** | **Array<Array<Integer>>** | | [optional]
**array_array_of_model** | **Array<Array<ReadOnlyFirst>>** | | [optional]
## Code Sample
```ruby
require 'Petstore'
instance = Petstore::ArrayTest.new(array_of_string: null,
array_array_of_integer: null,
array_array_of_model: null)
```

View File

@@ -10,4 +10,17 @@ Name | Type | Description | Notes
**sca_eth_flow_points** | **String** | | [optional]
**att_name** | **String** | Name of the pet | [optional]
## Code Sample
```ruby
require 'Petstore'
instance = Petstore::Capitalization.new(small_camel: null,
capital_camel: null,
small_snake: null,
capital_snake: null,
sca_eth_flow_points: null,
att_name: null)
```

View File

@@ -5,4 +5,12 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**declawed** | **BOOLEAN** | | [optional]
## Code Sample
```ruby
require 'Petstore'
instance = Petstore::Cat.new(declawed: null)
```

View File

@@ -6,4 +6,13 @@ Name | Type | Description | Notes
**id** | **Integer** | | [optional]
**name** | **String** | | [default to 'default-name']
## Code Sample
```ruby
require 'Petstore'
instance = Petstore::Category.new(id: null,
name: null)
```

View File

@@ -5,4 +5,12 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**_class** | **String** | | [optional]
## Code Sample
```ruby
require 'Petstore'
instance = Petstore::ClassModel.new(_class: null)
```

View File

@@ -5,4 +5,12 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**client** | **String** | | [optional]
## Code Sample
```ruby
require 'Petstore'
instance = Petstore::Client.new(client: null)
```

View File

@@ -5,4 +5,12 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**breed** | **String** | | [optional]
## Code Sample
```ruby
require 'Petstore'
instance = Petstore::Dog.new(breed: null)
```

View File

@@ -6,4 +6,13 @@ Name | Type | Description | Notes
**just_symbol** | **String** | | [optional]
**array_enum** | **Array<String>** | | [optional]
## Code Sample
```ruby
require 'Petstore'
instance = Petstore::EnumArrays.new(just_symbol: null,
array_enum: null)
```

View File

@@ -4,4 +4,12 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
## Code Sample
```ruby
require 'Petstore'
instance = Petstore::EnumClass.new()
```

View File

@@ -9,4 +9,16 @@ Name | Type | Description | Notes
**enum_number** | **Float** | | [optional]
**outer_enum** | [**OuterEnum**](OuterEnum.md) | | [optional]
## Code Sample
```ruby
require 'Petstore'
instance = Petstore::EnumTest.new(enum_string: null,
enum_string_required: null,
enum_integer: null,
enum_number: null,
outer_enum: null)
```

View File

@@ -5,4 +5,12 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**source_uri** | **String** | Test capitalization | [optional]
## Code Sample
```ruby
require 'Petstore'
instance = Petstore::File.new(source_uri: null)
```

View File

@@ -6,4 +6,13 @@ Name | Type | Description | Notes
**file** | **File** | | [optional]
**files** | **Array<File>** | | [optional]
## Code Sample
```ruby
require 'Petstore'
instance = Petstore::FileSchemaTestClass.new(file: null,
files: null)
```

View File

@@ -5,4 +5,12 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**bar** | **String** | | [optional] [default to 'bar']
## Code Sample
```ruby
require 'Petstore'
instance = Petstore::Foo.new(bar: null)
```

View File

@@ -19,4 +19,26 @@ Name | Type | Description | Notes
**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]
## Code Sample
```ruby
require 'Petstore'
instance = Petstore::FormatTest.new(integer: null,
int32: null,
int64: null,
number: null,
float: null,
double: null,
string: null,
byte: null,
binary: null,
date: null,
date_time: null,
uuid: 72f98069-206d-4f12-9f12-3d1e525a8e84,
password: null,
pattern_with_digits: null,
pattern_with_digits_and_delimiter: null)
```

Some files were not shown because too many files have changed in this diff Show More