forked from loafle/openapi-generator-original
[Ruby] Feature/ruby client build from hash nullable array (#7609)
* Ruby Client: nullable build_from_hash for array type * Genearte samples with 8217ecaeb
This commit is contained in:
parent
cad0161f7e
commit
08a1bdcb57
@ -14,7 +14,9 @@
|
||||
super(attributes)
|
||||
{{/parent}}
|
||||
self.class.openapi_types.each_pair do |key, type|
|
||||
if type =~ /\AArray<(.*)>/i
|
||||
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
elsif type =~ /\AArray<(.*)>/i
|
||||
# check to ensure the input is an array given that the attribute
|
||||
# is documented as an array but the input is not
|
||||
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
||||
@ -22,8 +24,6 @@
|
||||
end
|
||||
elsif !attributes[self.class.attribute_map[key]].nil?
|
||||
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
||||
elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -115,7 +115,9 @@ module Petstore
|
||||
def build_from_hash(attributes)
|
||||
return nil unless attributes.is_a?(Hash)
|
||||
self.class.openapi_types.each_pair do |key, type|
|
||||
if type =~ /\AArray<(.*)>/i
|
||||
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
elsif type =~ /\AArray<(.*)>/i
|
||||
# check to ensure the input is an array given that the attribute
|
||||
# is documented as an array but the input is not
|
||||
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
||||
@ -123,8 +125,6 @@ module Petstore
|
||||
end
|
||||
elsif !attributes[self.class.attribute_map[key]].nil?
|
||||
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
||||
elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -123,7 +123,9 @@ module Petstore
|
||||
def build_from_hash(attributes)
|
||||
return nil unless attributes.is_a?(Hash)
|
||||
self.class.openapi_types.each_pair do |key, type|
|
||||
if type =~ /\AArray<(.*)>/i
|
||||
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
elsif type =~ /\AArray<(.*)>/i
|
||||
# check to ensure the input is an array given that the attribute
|
||||
# is documented as an array but the input is not
|
||||
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
||||
@ -131,8 +133,6 @@ module Petstore
|
||||
end
|
||||
elsif !attributes[self.class.attribute_map[key]].nil?
|
||||
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
||||
elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -120,7 +120,9 @@ module Petstore
|
||||
def build_from_hash(attributes)
|
||||
return nil unless attributes.is_a?(Hash)
|
||||
self.class.openapi_types.each_pair do |key, type|
|
||||
if type =~ /\AArray<(.*)>/i
|
||||
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
elsif type =~ /\AArray<(.*)>/i
|
||||
# check to ensure the input is an array given that the attribute
|
||||
# is documented as an array but the input is not
|
||||
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
||||
@ -128,8 +130,6 @@ module Petstore
|
||||
end
|
||||
elsif !attributes[self.class.attribute_map[key]].nil?
|
||||
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
||||
elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -104,7 +104,9 @@ module Petstore
|
||||
def build_from_hash(attributes)
|
||||
return nil unless attributes.is_a?(Hash)
|
||||
self.class.openapi_types.each_pair do |key, type|
|
||||
if type =~ /\AArray<(.*)>/i
|
||||
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
elsif type =~ /\AArray<(.*)>/i
|
||||
# check to ensure the input is an array given that the attribute
|
||||
# is documented as an array but the input is not
|
||||
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
||||
@ -112,8 +114,6 @@ module Petstore
|
||||
end
|
||||
elsif !attributes[self.class.attribute_map[key]].nil?
|
||||
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
||||
elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -104,7 +104,9 @@ module Petstore
|
||||
def build_from_hash(attributes)
|
||||
return nil unless attributes.is_a?(Hash)
|
||||
self.class.openapi_types.each_pair do |key, type|
|
||||
if type =~ /\AArray<(.*)>/i
|
||||
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
elsif type =~ /\AArray<(.*)>/i
|
||||
# check to ensure the input is an array given that the attribute
|
||||
# is documented as an array but the input is not
|
||||
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
||||
@ -112,8 +114,6 @@ module Petstore
|
||||
end
|
||||
elsif !attributes[self.class.attribute_map[key]].nil?
|
||||
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
||||
elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -126,7 +126,9 @@ module Petstore
|
||||
def build_from_hash(attributes)
|
||||
return nil unless attributes.is_a?(Hash)
|
||||
self.class.openapi_types.each_pair do |key, type|
|
||||
if type =~ /\AArray<(.*)>/i
|
||||
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
elsif type =~ /\AArray<(.*)>/i
|
||||
# check to ensure the input is an array given that the attribute
|
||||
# is documented as an array but the input is not
|
||||
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
||||
@ -134,8 +136,6 @@ module Petstore
|
||||
end
|
||||
elsif !attributes[self.class.attribute_map[key]].nil?
|
||||
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
||||
elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -148,7 +148,9 @@ module Petstore
|
||||
def build_from_hash(attributes)
|
||||
return nil unless attributes.is_a?(Hash)
|
||||
self.class.openapi_types.each_pair do |key, type|
|
||||
if type =~ /\AArray<(.*)>/i
|
||||
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
elsif type =~ /\AArray<(.*)>/i
|
||||
# check to ensure the input is an array given that the attribute
|
||||
# is documented as an array but the input is not
|
||||
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
||||
@ -156,8 +158,6 @@ module Petstore
|
||||
end
|
||||
elsif !attributes[self.class.attribute_map[key]].nil?
|
||||
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
||||
elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -114,7 +114,9 @@ module Petstore
|
||||
return nil unless attributes.is_a?(Hash)
|
||||
super(attributes)
|
||||
self.class.openapi_types.each_pair do |key, type|
|
||||
if type =~ /\AArray<(.*)>/i
|
||||
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
elsif type =~ /\AArray<(.*)>/i
|
||||
# check to ensure the input is an array given that the attribute
|
||||
# is documented as an array but the input is not
|
||||
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
||||
@ -122,8 +124,6 @@ module Petstore
|
||||
end
|
||||
elsif !attributes[self.class.attribute_map[key]].nil?
|
||||
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
||||
elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -102,7 +102,9 @@ module Petstore
|
||||
def build_from_hash(attributes)
|
||||
return nil unless attributes.is_a?(Hash)
|
||||
self.class.openapi_types.each_pair do |key, type|
|
||||
if type =~ /\AArray<(.*)>/i
|
||||
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
elsif type =~ /\AArray<(.*)>/i
|
||||
# check to ensure the input is an array given that the attribute
|
||||
# is documented as an array but the input is not
|
||||
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
||||
@ -110,8 +112,6 @@ module Petstore
|
||||
end
|
||||
elsif !attributes[self.class.attribute_map[key]].nil?
|
||||
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
||||
elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -118,7 +118,9 @@ module Petstore
|
||||
def build_from_hash(attributes)
|
||||
return nil unless attributes.is_a?(Hash)
|
||||
self.class.openapi_types.each_pair do |key, type|
|
||||
if type =~ /\AArray<(.*)>/i
|
||||
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
elsif type =~ /\AArray<(.*)>/i
|
||||
# check to ensure the input is an array given that the attribute
|
||||
# is documented as an array but the input is not
|
||||
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
||||
@ -126,8 +128,6 @@ module Petstore
|
||||
end
|
||||
elsif !attributes[self.class.attribute_map[key]].nil?
|
||||
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
||||
elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -103,7 +103,9 @@ module Petstore
|
||||
def build_from_hash(attributes)
|
||||
return nil unless attributes.is_a?(Hash)
|
||||
self.class.openapi_types.each_pair do |key, type|
|
||||
if type =~ /\AArray<(.*)>/i
|
||||
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
elsif type =~ /\AArray<(.*)>/i
|
||||
# check to ensure the input is an array given that the attribute
|
||||
# is documented as an array but the input is not
|
||||
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
||||
@ -111,8 +113,6 @@ module Petstore
|
||||
end
|
||||
elsif !attributes[self.class.attribute_map[key]].nil?
|
||||
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
||||
elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -102,7 +102,9 @@ module Petstore
|
||||
def build_from_hash(attributes)
|
||||
return nil unless attributes.is_a?(Hash)
|
||||
self.class.openapi_types.each_pair do |key, type|
|
||||
if type =~ /\AArray<(.*)>/i
|
||||
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
elsif type =~ /\AArray<(.*)>/i
|
||||
# check to ensure the input is an array given that the attribute
|
||||
# is documented as an array but the input is not
|
||||
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
||||
@ -110,8 +112,6 @@ module Petstore
|
||||
end
|
||||
elsif !attributes[self.class.attribute_map[key]].nil?
|
||||
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
||||
elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -114,7 +114,9 @@ module Petstore
|
||||
return nil unless attributes.is_a?(Hash)
|
||||
super(attributes)
|
||||
self.class.openapi_types.each_pair do |key, type|
|
||||
if type =~ /\AArray<(.*)>/i
|
||||
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
elsif type =~ /\AArray<(.*)>/i
|
||||
# check to ensure the input is an array given that the attribute
|
||||
# is documented as an array but the input is not
|
||||
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
||||
@ -122,8 +124,6 @@ module Petstore
|
||||
end
|
||||
elsif !attributes[self.class.attribute_map[key]].nil?
|
||||
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
||||
elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -102,7 +102,9 @@ module Petstore
|
||||
def build_from_hash(attributes)
|
||||
return nil unless attributes.is_a?(Hash)
|
||||
self.class.openapi_types.each_pair do |key, type|
|
||||
if type =~ /\AArray<(.*)>/i
|
||||
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
elsif type =~ /\AArray<(.*)>/i
|
||||
# check to ensure the input is an array given that the attribute
|
||||
# is documented as an array but the input is not
|
||||
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
||||
@ -110,8 +112,6 @@ module Petstore
|
||||
end
|
||||
elsif !attributes[self.class.attribute_map[key]].nil?
|
||||
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
||||
elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -147,7 +147,9 @@ module Petstore
|
||||
def build_from_hash(attributes)
|
||||
return nil unless attributes.is_a?(Hash)
|
||||
self.class.openapi_types.each_pair do |key, type|
|
||||
if type =~ /\AArray<(.*)>/i
|
||||
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
elsif type =~ /\AArray<(.*)>/i
|
||||
# check to ensure the input is an array given that the attribute
|
||||
# is documented as an array but the input is not
|
||||
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
||||
@ -155,8 +157,6 @@ module Petstore
|
||||
end
|
||||
elsif !attributes[self.class.attribute_map[key]].nil?
|
||||
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
||||
elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -245,7 +245,9 @@ module Petstore
|
||||
def build_from_hash(attributes)
|
||||
return nil unless attributes.is_a?(Hash)
|
||||
self.class.openapi_types.each_pair do |key, type|
|
||||
if type =~ /\AArray<(.*)>/i
|
||||
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
elsif type =~ /\AArray<(.*)>/i
|
||||
# check to ensure the input is an array given that the attribute
|
||||
# is documented as an array but the input is not
|
||||
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
||||
@ -253,8 +255,6 @@ module Petstore
|
||||
end
|
||||
elsif !attributes[self.class.attribute_map[key]].nil?
|
||||
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
||||
elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -104,7 +104,9 @@ module Petstore
|
||||
def build_from_hash(attributes)
|
||||
return nil unless attributes.is_a?(Hash)
|
||||
self.class.openapi_types.each_pair do |key, type|
|
||||
if type =~ /\AArray<(.*)>/i
|
||||
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
elsif type =~ /\AArray<(.*)>/i
|
||||
# check to ensure the input is an array given that the attribute
|
||||
# is documented as an array but the input is not
|
||||
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
||||
@ -112,8 +114,6 @@ module Petstore
|
||||
end
|
||||
elsif !attributes[self.class.attribute_map[key]].nil?
|
||||
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
||||
elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -113,7 +113,9 @@ module Petstore
|
||||
def build_from_hash(attributes)
|
||||
return nil unless attributes.is_a?(Hash)
|
||||
self.class.openapi_types.each_pair do |key, type|
|
||||
if type =~ /\AArray<(.*)>/i
|
||||
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
elsif type =~ /\AArray<(.*)>/i
|
||||
# check to ensure the input is an array given that the attribute
|
||||
# is documented as an array but the input is not
|
||||
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
||||
@ -121,8 +123,6 @@ module Petstore
|
||||
end
|
||||
elsif !attributes[self.class.attribute_map[key]].nil?
|
||||
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
||||
elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -104,7 +104,9 @@ module Petstore
|
||||
def build_from_hash(attributes)
|
||||
return nil unless attributes.is_a?(Hash)
|
||||
self.class.openapi_types.each_pair do |key, type|
|
||||
if type =~ /\AArray<(.*)>/i
|
||||
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
elsif type =~ /\AArray<(.*)>/i
|
||||
# check to ensure the input is an array given that the attribute
|
||||
# is documented as an array but the input is not
|
||||
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
||||
@ -112,8 +114,6 @@ module Petstore
|
||||
end
|
||||
elsif !attributes[self.class.attribute_map[key]].nil?
|
||||
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
||||
elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -453,7 +453,9 @@ module Petstore
|
||||
def build_from_hash(attributes)
|
||||
return nil unless attributes.is_a?(Hash)
|
||||
self.class.openapi_types.each_pair do |key, type|
|
||||
if type =~ /\AArray<(.*)>/i
|
||||
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
elsif type =~ /\AArray<(.*)>/i
|
||||
# check to ensure the input is an array given that the attribute
|
||||
# is documented as an array but the input is not
|
||||
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
||||
@ -461,8 +463,6 @@ module Petstore
|
||||
end
|
||||
elsif !attributes[self.class.attribute_map[key]].nil?
|
||||
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
||||
elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -111,7 +111,9 @@ module Petstore
|
||||
def build_from_hash(attributes)
|
||||
return nil unless attributes.is_a?(Hash)
|
||||
self.class.openapi_types.each_pair do |key, type|
|
||||
if type =~ /\AArray<(.*)>/i
|
||||
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
elsif type =~ /\AArray<(.*)>/i
|
||||
# check to ensure the input is an array given that the attribute
|
||||
# is documented as an array but the input is not
|
||||
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
||||
@ -119,8 +121,6 @@ module Petstore
|
||||
end
|
||||
elsif !attributes[self.class.attribute_map[key]].nil?
|
||||
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
||||
elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -104,7 +104,9 @@ module Petstore
|
||||
def build_from_hash(attributes)
|
||||
return nil unless attributes.is_a?(Hash)
|
||||
self.class.openapi_types.each_pair do |key, type|
|
||||
if type =~ /\AArray<(.*)>/i
|
||||
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
elsif type =~ /\AArray<(.*)>/i
|
||||
# check to ensure the input is an array given that the attribute
|
||||
# is documented as an array but the input is not
|
||||
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
||||
@ -112,8 +114,6 @@ module Petstore
|
||||
end
|
||||
elsif !attributes[self.class.attribute_map[key]].nil?
|
||||
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
||||
elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -113,7 +113,9 @@ module Petstore
|
||||
def build_from_hash(attributes)
|
||||
return nil unless attributes.is_a?(Hash)
|
||||
self.class.openapi_types.each_pair do |key, type|
|
||||
if type =~ /\AArray<(.*)>/i
|
||||
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
elsif type =~ /\AArray<(.*)>/i
|
||||
# check to ensure the input is an array given that the attribute
|
||||
# is documented as an array but the input is not
|
||||
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
||||
@ -121,8 +123,6 @@ module Petstore
|
||||
end
|
||||
elsif !attributes[self.class.attribute_map[key]].nil?
|
||||
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
||||
elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -113,7 +113,9 @@ module Petstore
|
||||
def build_from_hash(attributes)
|
||||
return nil unless attributes.is_a?(Hash)
|
||||
self.class.openapi_types.each_pair do |key, type|
|
||||
if type =~ /\AArray<(.*)>/i
|
||||
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
elsif type =~ /\AArray<(.*)>/i
|
||||
# check to ensure the input is an array given that the attribute
|
||||
# is documented as an array but the input is not
|
||||
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
||||
@ -121,8 +123,6 @@ module Petstore
|
||||
end
|
||||
elsif !attributes[self.class.attribute_map[key]].nil?
|
||||
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
||||
elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -151,7 +151,9 @@ module Petstore
|
||||
def build_from_hash(attributes)
|
||||
return nil unless attributes.is_a?(Hash)
|
||||
self.class.openapi_types.each_pair do |key, type|
|
||||
if type =~ /\AArray<(.*)>/i
|
||||
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
elsif type =~ /\AArray<(.*)>/i
|
||||
# check to ensure the input is an array given that the attribute
|
||||
# is documented as an array but the input is not
|
||||
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
||||
@ -159,8 +161,6 @@ module Petstore
|
||||
end
|
||||
elsif !attributes[self.class.attribute_map[key]].nil?
|
||||
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
||||
elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -434,7 +434,9 @@ module Petstore
|
||||
def build_from_hash(attributes)
|
||||
return nil unless attributes.is_a?(Hash)
|
||||
self.class.openapi_types.each_pair do |key, type|
|
||||
if type =~ /\AArray<(.*)>/i
|
||||
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
elsif type =~ /\AArray<(.*)>/i
|
||||
# check to ensure the input is an array given that the attribute
|
||||
# is documented as an array but the input is not
|
||||
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
||||
@ -442,8 +444,6 @@ module Petstore
|
||||
end
|
||||
elsif !attributes[self.class.attribute_map[key]].nil?
|
||||
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
||||
elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -123,7 +123,9 @@ module Petstore
|
||||
def build_from_hash(attributes)
|
||||
return nil unless attributes.is_a?(Hash)
|
||||
self.class.openapi_types.each_pair do |key, type|
|
||||
if type =~ /\AArray<(.*)>/i
|
||||
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
elsif type =~ /\AArray<(.*)>/i
|
||||
# check to ensure the input is an array given that the attribute
|
||||
# is documented as an array but the input is not
|
||||
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
||||
@ -131,8 +133,6 @@ module Petstore
|
||||
end
|
||||
elsif !attributes[self.class.attribute_map[key]].nil?
|
||||
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
||||
elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -118,7 +118,9 @@ module Petstore
|
||||
def build_from_hash(attributes)
|
||||
return nil unless attributes.is_a?(Hash)
|
||||
self.class.openapi_types.each_pair do |key, type|
|
||||
if type =~ /\AArray<(.*)>/i
|
||||
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
elsif type =~ /\AArray<(.*)>/i
|
||||
# check to ensure the input is an array given that the attribute
|
||||
# is documented as an array but the input is not
|
||||
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
||||
@ -126,8 +128,6 @@ module Petstore
|
||||
end
|
||||
elsif !attributes[self.class.attribute_map[key]].nil?
|
||||
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
||||
elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -102,7 +102,9 @@ module Petstore
|
||||
def build_from_hash(attributes)
|
||||
return nil unless attributes.is_a?(Hash)
|
||||
self.class.openapi_types.each_pair do |key, type|
|
||||
if type =~ /\AArray<(.*)>/i
|
||||
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
elsif type =~ /\AArray<(.*)>/i
|
||||
# check to ensure the input is an array given that the attribute
|
||||
# is documented as an array but the input is not
|
||||
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
||||
@ -110,8 +112,6 @@ module Petstore
|
||||
end
|
||||
elsif !attributes[self.class.attribute_map[key]].nil?
|
||||
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
||||
elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -102,7 +102,9 @@ module Petstore
|
||||
def build_from_hash(attributes)
|
||||
return nil unless attributes.is_a?(Hash)
|
||||
self.class.openapi_types.each_pair do |key, type|
|
||||
if type =~ /\AArray<(.*)>/i
|
||||
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
elsif type =~ /\AArray<(.*)>/i
|
||||
# check to ensure the input is an array given that the attribute
|
||||
# is documented as an array but the input is not
|
||||
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
||||
@ -110,8 +112,6 @@ module Petstore
|
||||
end
|
||||
elsif !attributes[self.class.attribute_map[key]].nil?
|
||||
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
||||
elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -159,7 +159,9 @@ module Petstore
|
||||
def build_from_hash(attributes)
|
||||
return nil unless attributes.is_a?(Hash)
|
||||
self.class.openapi_types.each_pair do |key, type|
|
||||
if type =~ /\AArray<(.*)>/i
|
||||
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
elsif type =~ /\AArray<(.*)>/i
|
||||
# check to ensure the input is an array given that the attribute
|
||||
# is documented as an array but the input is not
|
||||
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
||||
@ -167,8 +169,6 @@ module Petstore
|
||||
end
|
||||
elsif !attributes[self.class.attribute_map[key]].nil?
|
||||
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
||||
elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -122,7 +122,9 @@ module Petstore
|
||||
def build_from_hash(attributes)
|
||||
return nil unless attributes.is_a?(Hash)
|
||||
self.class.openapi_types.each_pair do |key, type|
|
||||
if type =~ /\AArray<(.*)>/i
|
||||
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
elsif type =~ /\AArray<(.*)>/i
|
||||
# check to ensure the input is an array given that the attribute
|
||||
# is documented as an array but the input is not
|
||||
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
||||
@ -130,8 +132,6 @@ module Petstore
|
||||
end
|
||||
elsif !attributes[self.class.attribute_map[key]].nil?
|
||||
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
||||
elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -112,7 +112,9 @@ module Petstore
|
||||
def build_from_hash(attributes)
|
||||
return nil unless attributes.is_a?(Hash)
|
||||
self.class.openapi_types.each_pair do |key, type|
|
||||
if type =~ /\AArray<(.*)>/i
|
||||
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
elsif type =~ /\AArray<(.*)>/i
|
||||
# check to ensure the input is an array given that the attribute
|
||||
# is documented as an array but the input is not
|
||||
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
||||
@ -120,8 +122,6 @@ module Petstore
|
||||
end
|
||||
elsif !attributes[self.class.attribute_map[key]].nil?
|
||||
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
||||
elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -103,7 +103,9 @@ module Petstore
|
||||
def build_from_hash(attributes)
|
||||
return nil unless attributes.is_a?(Hash)
|
||||
self.class.openapi_types.each_pair do |key, type|
|
||||
if type =~ /\AArray<(.*)>/i
|
||||
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
elsif type =~ /\AArray<(.*)>/i
|
||||
# check to ensure the input is an array given that the attribute
|
||||
# is documented as an array but the input is not
|
||||
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
||||
@ -111,8 +113,6 @@ module Petstore
|
||||
end
|
||||
elsif !attributes[self.class.attribute_map[key]].nil?
|
||||
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
||||
elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -135,7 +135,9 @@ module Petstore
|
||||
def build_from_hash(attributes)
|
||||
return nil unless attributes.is_a?(Hash)
|
||||
self.class.openapi_types.each_pair do |key, type|
|
||||
if type =~ /\AArray<(.*)>/i
|
||||
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
elsif type =~ /\AArray<(.*)>/i
|
||||
# check to ensure the input is an array given that the attribute
|
||||
# is documented as an array but the input is not
|
||||
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
||||
@ -143,8 +145,6 @@ module Petstore
|
||||
end
|
||||
elsif !attributes[self.class.attribute_map[key]].nil?
|
||||
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
||||
elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -223,7 +223,9 @@ module Petstore
|
||||
def build_from_hash(attributes)
|
||||
return nil unless attributes.is_a?(Hash)
|
||||
self.class.openapi_types.each_pair do |key, type|
|
||||
if type =~ /\AArray<(.*)>/i
|
||||
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
elsif type =~ /\AArray<(.*)>/i
|
||||
# check to ensure the input is an array given that the attribute
|
||||
# is documented as an array but the input is not
|
||||
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
||||
@ -231,8 +233,6 @@ module Petstore
|
||||
end
|
||||
elsif !attributes[self.class.attribute_map[key]].nil?
|
||||
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
||||
elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -102,7 +102,9 @@ module Petstore
|
||||
def build_from_hash(attributes)
|
||||
return nil unless attributes.is_a?(Hash)
|
||||
self.class.openapi_types.each_pair do |key, type|
|
||||
if type =~ /\AArray<(.*)>/i
|
||||
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
elsif type =~ /\AArray<(.*)>/i
|
||||
# check to ensure the input is an array given that the attribute
|
||||
# is documented as an array but the input is not
|
||||
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
||||
@ -110,8 +112,6 @@ module Petstore
|
||||
end
|
||||
elsif !attributes[self.class.attribute_map[key]].nil?
|
||||
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
||||
elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -184,7 +184,9 @@ module Petstore
|
||||
def build_from_hash(attributes)
|
||||
return nil unless attributes.is_a?(Hash)
|
||||
self.class.openapi_types.each_pair do |key, type|
|
||||
if type =~ /\AArray<(.*)>/i
|
||||
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
elsif type =~ /\AArray<(.*)>/i
|
||||
# check to ensure the input is an array given that the attribute
|
||||
# is documented as an array but the input is not
|
||||
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
||||
@ -192,8 +194,6 @@ module Petstore
|
||||
end
|
||||
elsif !attributes[self.class.attribute_map[key]].nil?
|
||||
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
||||
elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -120,7 +120,9 @@ module Petstore
|
||||
def build_from_hash(attributes)
|
||||
return nil unless attributes.is_a?(Hash)
|
||||
self.class.openapi_types.each_pair do |key, type|
|
||||
if type =~ /\AArray<(.*)>/i
|
||||
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
elsif type =~ /\AArray<(.*)>/i
|
||||
# check to ensure the input is an array given that the attribute
|
||||
# is documented as an array but the input is not
|
||||
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
||||
@ -128,8 +130,6 @@ module Petstore
|
||||
end
|
||||
elsif !attributes[self.class.attribute_map[key]].nil?
|
||||
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
||||
elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -196,7 +196,9 @@ module Petstore
|
||||
def build_from_hash(attributes)
|
||||
return nil unless attributes.is_a?(Hash)
|
||||
self.class.openapi_types.each_pair do |key, type|
|
||||
if type =~ /\AArray<(.*)>/i
|
||||
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
elsif type =~ /\AArray<(.*)>/i
|
||||
# check to ensure the input is an array given that the attribute
|
||||
# is documented as an array but the input is not
|
||||
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
||||
@ -204,8 +206,6 @@ module Petstore
|
||||
end
|
||||
elsif !attributes[self.class.attribute_map[key]].nil?
|
||||
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
||||
elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -111,7 +111,9 @@ module Petstore
|
||||
def build_from_hash(attributes)
|
||||
return nil unless attributes.is_a?(Hash)
|
||||
self.class.openapi_types.each_pair do |key, type|
|
||||
if type =~ /\AArray<(.*)>/i
|
||||
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
elsif type =~ /\AArray<(.*)>/i
|
||||
# check to ensure the input is an array given that the attribute
|
||||
# is documented as an array but the input is not
|
||||
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
||||
@ -119,8 +121,6 @@ module Petstore
|
||||
end
|
||||
elsif !attributes[self.class.attribute_map[key]].nil?
|
||||
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
||||
elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -102,7 +102,9 @@ module Petstore
|
||||
def build_from_hash(attributes)
|
||||
return nil unless attributes.is_a?(Hash)
|
||||
self.class.openapi_types.each_pair do |key, type|
|
||||
if type =~ /\AArray<(.*)>/i
|
||||
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
elsif type =~ /\AArray<(.*)>/i
|
||||
# check to ensure the input is an array given that the attribute
|
||||
# is documented as an array but the input is not
|
||||
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
||||
@ -110,8 +112,6 @@ module Petstore
|
||||
end
|
||||
elsif !attributes[self.class.attribute_map[key]].nil?
|
||||
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
||||
elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -111,7 +111,9 @@ module Petstore
|
||||
def build_from_hash(attributes)
|
||||
return nil unless attributes.is_a?(Hash)
|
||||
self.class.openapi_types.each_pair do |key, type|
|
||||
if type =~ /\AArray<(.*)>/i
|
||||
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
elsif type =~ /\AArray<(.*)>/i
|
||||
# check to ensure the input is an array given that the attribute
|
||||
# is documented as an array but the input is not
|
||||
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
||||
@ -119,8 +121,6 @@ module Petstore
|
||||
end
|
||||
elsif !attributes[self.class.attribute_map[key]].nil?
|
||||
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
||||
elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -166,7 +166,9 @@ module Petstore
|
||||
def build_from_hash(attributes)
|
||||
return nil unless attributes.is_a?(Hash)
|
||||
self.class.openapi_types.each_pair do |key, type|
|
||||
if type =~ /\AArray<(.*)>/i
|
||||
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
elsif type =~ /\AArray<(.*)>/i
|
||||
# check to ensure the input is an array given that the attribute
|
||||
# is documented as an array but the input is not
|
||||
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
||||
@ -174,8 +176,6 @@ module Petstore
|
||||
end
|
||||
elsif !attributes[self.class.attribute_map[key]].nil?
|
||||
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
||||
elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -115,7 +115,9 @@ module Petstore
|
||||
def build_from_hash(attributes)
|
||||
return nil unless attributes.is_a?(Hash)
|
||||
self.class.openapi_types.each_pair do |key, type|
|
||||
if type =~ /\AArray<(.*)>/i
|
||||
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
elsif type =~ /\AArray<(.*)>/i
|
||||
# check to ensure the input is an array given that the attribute
|
||||
# is documented as an array but the input is not
|
||||
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
||||
@ -123,8 +125,6 @@ module Petstore
|
||||
end
|
||||
elsif !attributes[self.class.attribute_map[key]].nil?
|
||||
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
||||
elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -123,7 +123,9 @@ module Petstore
|
||||
def build_from_hash(attributes)
|
||||
return nil unless attributes.is_a?(Hash)
|
||||
self.class.openapi_types.each_pair do |key, type|
|
||||
if type =~ /\AArray<(.*)>/i
|
||||
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
elsif type =~ /\AArray<(.*)>/i
|
||||
# check to ensure the input is an array given that the attribute
|
||||
# is documented as an array but the input is not
|
||||
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
||||
@ -131,8 +133,6 @@ module Petstore
|
||||
end
|
||||
elsif !attributes[self.class.attribute_map[key]].nil?
|
||||
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
||||
elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -120,7 +120,9 @@ module Petstore
|
||||
def build_from_hash(attributes)
|
||||
return nil unless attributes.is_a?(Hash)
|
||||
self.class.openapi_types.each_pair do |key, type|
|
||||
if type =~ /\AArray<(.*)>/i
|
||||
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
elsif type =~ /\AArray<(.*)>/i
|
||||
# check to ensure the input is an array given that the attribute
|
||||
# is documented as an array but the input is not
|
||||
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
||||
@ -128,8 +130,6 @@ module Petstore
|
||||
end
|
||||
elsif !attributes[self.class.attribute_map[key]].nil?
|
||||
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
||||
elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -104,7 +104,9 @@ module Petstore
|
||||
def build_from_hash(attributes)
|
||||
return nil unless attributes.is_a?(Hash)
|
||||
self.class.openapi_types.each_pair do |key, type|
|
||||
if type =~ /\AArray<(.*)>/i
|
||||
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
elsif type =~ /\AArray<(.*)>/i
|
||||
# check to ensure the input is an array given that the attribute
|
||||
# is documented as an array but the input is not
|
||||
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
||||
@ -112,8 +114,6 @@ module Petstore
|
||||
end
|
||||
elsif !attributes[self.class.attribute_map[key]].nil?
|
||||
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
||||
elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -104,7 +104,9 @@ module Petstore
|
||||
def build_from_hash(attributes)
|
||||
return nil unless attributes.is_a?(Hash)
|
||||
self.class.openapi_types.each_pair do |key, type|
|
||||
if type =~ /\AArray<(.*)>/i
|
||||
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
elsif type =~ /\AArray<(.*)>/i
|
||||
# check to ensure the input is an array given that the attribute
|
||||
# is documented as an array but the input is not
|
||||
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
||||
@ -112,8 +114,6 @@ module Petstore
|
||||
end
|
||||
elsif !attributes[self.class.attribute_map[key]].nil?
|
||||
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
||||
elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -126,7 +126,9 @@ module Petstore
|
||||
def build_from_hash(attributes)
|
||||
return nil unless attributes.is_a?(Hash)
|
||||
self.class.openapi_types.each_pair do |key, type|
|
||||
if type =~ /\AArray<(.*)>/i
|
||||
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
elsif type =~ /\AArray<(.*)>/i
|
||||
# check to ensure the input is an array given that the attribute
|
||||
# is documented as an array but the input is not
|
||||
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
||||
@ -134,8 +136,6 @@ module Petstore
|
||||
end
|
||||
elsif !attributes[self.class.attribute_map[key]].nil?
|
||||
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
||||
elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -148,7 +148,9 @@ module Petstore
|
||||
def build_from_hash(attributes)
|
||||
return nil unless attributes.is_a?(Hash)
|
||||
self.class.openapi_types.each_pair do |key, type|
|
||||
if type =~ /\AArray<(.*)>/i
|
||||
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
elsif type =~ /\AArray<(.*)>/i
|
||||
# check to ensure the input is an array given that the attribute
|
||||
# is documented as an array but the input is not
|
||||
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
||||
@ -156,8 +158,6 @@ module Petstore
|
||||
end
|
||||
elsif !attributes[self.class.attribute_map[key]].nil?
|
||||
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
||||
elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -114,7 +114,9 @@ module Petstore
|
||||
return nil unless attributes.is_a?(Hash)
|
||||
super(attributes)
|
||||
self.class.openapi_types.each_pair do |key, type|
|
||||
if type =~ /\AArray<(.*)>/i
|
||||
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
elsif type =~ /\AArray<(.*)>/i
|
||||
# check to ensure the input is an array given that the attribute
|
||||
# is documented as an array but the input is not
|
||||
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
||||
@ -122,8 +124,6 @@ module Petstore
|
||||
end
|
||||
elsif !attributes[self.class.attribute_map[key]].nil?
|
||||
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
||||
elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -102,7 +102,9 @@ module Petstore
|
||||
def build_from_hash(attributes)
|
||||
return nil unless attributes.is_a?(Hash)
|
||||
self.class.openapi_types.each_pair do |key, type|
|
||||
if type =~ /\AArray<(.*)>/i
|
||||
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
elsif type =~ /\AArray<(.*)>/i
|
||||
# check to ensure the input is an array given that the attribute
|
||||
# is documented as an array but the input is not
|
||||
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
||||
@ -110,8 +112,6 @@ module Petstore
|
||||
end
|
||||
elsif !attributes[self.class.attribute_map[key]].nil?
|
||||
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
||||
elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -118,7 +118,9 @@ module Petstore
|
||||
def build_from_hash(attributes)
|
||||
return nil unless attributes.is_a?(Hash)
|
||||
self.class.openapi_types.each_pair do |key, type|
|
||||
if type =~ /\AArray<(.*)>/i
|
||||
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
elsif type =~ /\AArray<(.*)>/i
|
||||
# check to ensure the input is an array given that the attribute
|
||||
# is documented as an array but the input is not
|
||||
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
||||
@ -126,8 +128,6 @@ module Petstore
|
||||
end
|
||||
elsif !attributes[self.class.attribute_map[key]].nil?
|
||||
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
||||
elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -103,7 +103,9 @@ module Petstore
|
||||
def build_from_hash(attributes)
|
||||
return nil unless attributes.is_a?(Hash)
|
||||
self.class.openapi_types.each_pair do |key, type|
|
||||
if type =~ /\AArray<(.*)>/i
|
||||
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
elsif type =~ /\AArray<(.*)>/i
|
||||
# check to ensure the input is an array given that the attribute
|
||||
# is documented as an array but the input is not
|
||||
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
||||
@ -111,8 +113,6 @@ module Petstore
|
||||
end
|
||||
elsif !attributes[self.class.attribute_map[key]].nil?
|
||||
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
||||
elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -102,7 +102,9 @@ module Petstore
|
||||
def build_from_hash(attributes)
|
||||
return nil unless attributes.is_a?(Hash)
|
||||
self.class.openapi_types.each_pair do |key, type|
|
||||
if type =~ /\AArray<(.*)>/i
|
||||
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
elsif type =~ /\AArray<(.*)>/i
|
||||
# check to ensure the input is an array given that the attribute
|
||||
# is documented as an array but the input is not
|
||||
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
||||
@ -110,8 +112,6 @@ module Petstore
|
||||
end
|
||||
elsif !attributes[self.class.attribute_map[key]].nil?
|
||||
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
||||
elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -114,7 +114,9 @@ module Petstore
|
||||
return nil unless attributes.is_a?(Hash)
|
||||
super(attributes)
|
||||
self.class.openapi_types.each_pair do |key, type|
|
||||
if type =~ /\AArray<(.*)>/i
|
||||
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
elsif type =~ /\AArray<(.*)>/i
|
||||
# check to ensure the input is an array given that the attribute
|
||||
# is documented as an array but the input is not
|
||||
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
||||
@ -122,8 +124,6 @@ module Petstore
|
||||
end
|
||||
elsif !attributes[self.class.attribute_map[key]].nil?
|
||||
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
||||
elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -102,7 +102,9 @@ module Petstore
|
||||
def build_from_hash(attributes)
|
||||
return nil unless attributes.is_a?(Hash)
|
||||
self.class.openapi_types.each_pair do |key, type|
|
||||
if type =~ /\AArray<(.*)>/i
|
||||
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
elsif type =~ /\AArray<(.*)>/i
|
||||
# check to ensure the input is an array given that the attribute
|
||||
# is documented as an array but the input is not
|
||||
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
||||
@ -110,8 +112,6 @@ module Petstore
|
||||
end
|
||||
elsif !attributes[self.class.attribute_map[key]].nil?
|
||||
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
||||
elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -147,7 +147,9 @@ module Petstore
|
||||
def build_from_hash(attributes)
|
||||
return nil unless attributes.is_a?(Hash)
|
||||
self.class.openapi_types.each_pair do |key, type|
|
||||
if type =~ /\AArray<(.*)>/i
|
||||
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
elsif type =~ /\AArray<(.*)>/i
|
||||
# check to ensure the input is an array given that the attribute
|
||||
# is documented as an array but the input is not
|
||||
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
||||
@ -155,8 +157,6 @@ module Petstore
|
||||
end
|
||||
elsif !attributes[self.class.attribute_map[key]].nil?
|
||||
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
||||
elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -245,7 +245,9 @@ module Petstore
|
||||
def build_from_hash(attributes)
|
||||
return nil unless attributes.is_a?(Hash)
|
||||
self.class.openapi_types.each_pair do |key, type|
|
||||
if type =~ /\AArray<(.*)>/i
|
||||
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
elsif type =~ /\AArray<(.*)>/i
|
||||
# check to ensure the input is an array given that the attribute
|
||||
# is documented as an array but the input is not
|
||||
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
||||
@ -253,8 +255,6 @@ module Petstore
|
||||
end
|
||||
elsif !attributes[self.class.attribute_map[key]].nil?
|
||||
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
||||
elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -104,7 +104,9 @@ module Petstore
|
||||
def build_from_hash(attributes)
|
||||
return nil unless attributes.is_a?(Hash)
|
||||
self.class.openapi_types.each_pair do |key, type|
|
||||
if type =~ /\AArray<(.*)>/i
|
||||
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
elsif type =~ /\AArray<(.*)>/i
|
||||
# check to ensure the input is an array given that the attribute
|
||||
# is documented as an array but the input is not
|
||||
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
||||
@ -112,8 +114,6 @@ module Petstore
|
||||
end
|
||||
elsif !attributes[self.class.attribute_map[key]].nil?
|
||||
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
||||
elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -113,7 +113,9 @@ module Petstore
|
||||
def build_from_hash(attributes)
|
||||
return nil unless attributes.is_a?(Hash)
|
||||
self.class.openapi_types.each_pair do |key, type|
|
||||
if type =~ /\AArray<(.*)>/i
|
||||
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
elsif type =~ /\AArray<(.*)>/i
|
||||
# check to ensure the input is an array given that the attribute
|
||||
# is documented as an array but the input is not
|
||||
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
||||
@ -121,8 +123,6 @@ module Petstore
|
||||
end
|
||||
elsif !attributes[self.class.attribute_map[key]].nil?
|
||||
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
||||
elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -104,7 +104,9 @@ module Petstore
|
||||
def build_from_hash(attributes)
|
||||
return nil unless attributes.is_a?(Hash)
|
||||
self.class.openapi_types.each_pair do |key, type|
|
||||
if type =~ /\AArray<(.*)>/i
|
||||
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
elsif type =~ /\AArray<(.*)>/i
|
||||
# check to ensure the input is an array given that the attribute
|
||||
# is documented as an array but the input is not
|
||||
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
||||
@ -112,8 +114,6 @@ module Petstore
|
||||
end
|
||||
elsif !attributes[self.class.attribute_map[key]].nil?
|
||||
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
||||
elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -453,7 +453,9 @@ module Petstore
|
||||
def build_from_hash(attributes)
|
||||
return nil unless attributes.is_a?(Hash)
|
||||
self.class.openapi_types.each_pair do |key, type|
|
||||
if type =~ /\AArray<(.*)>/i
|
||||
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
elsif type =~ /\AArray<(.*)>/i
|
||||
# check to ensure the input is an array given that the attribute
|
||||
# is documented as an array but the input is not
|
||||
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
||||
@ -461,8 +463,6 @@ module Petstore
|
||||
end
|
||||
elsif !attributes[self.class.attribute_map[key]].nil?
|
||||
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
||||
elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -111,7 +111,9 @@ module Petstore
|
||||
def build_from_hash(attributes)
|
||||
return nil unless attributes.is_a?(Hash)
|
||||
self.class.openapi_types.each_pair do |key, type|
|
||||
if type =~ /\AArray<(.*)>/i
|
||||
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
elsif type =~ /\AArray<(.*)>/i
|
||||
# check to ensure the input is an array given that the attribute
|
||||
# is documented as an array but the input is not
|
||||
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
||||
@ -119,8 +121,6 @@ module Petstore
|
||||
end
|
||||
elsif !attributes[self.class.attribute_map[key]].nil?
|
||||
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
||||
elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -104,7 +104,9 @@ module Petstore
|
||||
def build_from_hash(attributes)
|
||||
return nil unless attributes.is_a?(Hash)
|
||||
self.class.openapi_types.each_pair do |key, type|
|
||||
if type =~ /\AArray<(.*)>/i
|
||||
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
elsif type =~ /\AArray<(.*)>/i
|
||||
# check to ensure the input is an array given that the attribute
|
||||
# is documented as an array but the input is not
|
||||
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
||||
@ -112,8 +114,6 @@ module Petstore
|
||||
end
|
||||
elsif !attributes[self.class.attribute_map[key]].nil?
|
||||
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
||||
elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -113,7 +113,9 @@ module Petstore
|
||||
def build_from_hash(attributes)
|
||||
return nil unless attributes.is_a?(Hash)
|
||||
self.class.openapi_types.each_pair do |key, type|
|
||||
if type =~ /\AArray<(.*)>/i
|
||||
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
elsif type =~ /\AArray<(.*)>/i
|
||||
# check to ensure the input is an array given that the attribute
|
||||
# is documented as an array but the input is not
|
||||
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
||||
@ -121,8 +123,6 @@ module Petstore
|
||||
end
|
||||
elsif !attributes[self.class.attribute_map[key]].nil?
|
||||
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
||||
elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -113,7 +113,9 @@ module Petstore
|
||||
def build_from_hash(attributes)
|
||||
return nil unless attributes.is_a?(Hash)
|
||||
self.class.openapi_types.each_pair do |key, type|
|
||||
if type =~ /\AArray<(.*)>/i
|
||||
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
elsif type =~ /\AArray<(.*)>/i
|
||||
# check to ensure the input is an array given that the attribute
|
||||
# is documented as an array but the input is not
|
||||
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
||||
@ -121,8 +123,6 @@ module Petstore
|
||||
end
|
||||
elsif !attributes[self.class.attribute_map[key]].nil?
|
||||
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
||||
elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -151,7 +151,9 @@ module Petstore
|
||||
def build_from_hash(attributes)
|
||||
return nil unless attributes.is_a?(Hash)
|
||||
self.class.openapi_types.each_pair do |key, type|
|
||||
if type =~ /\AArray<(.*)>/i
|
||||
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
elsif type =~ /\AArray<(.*)>/i
|
||||
# check to ensure the input is an array given that the attribute
|
||||
# is documented as an array but the input is not
|
||||
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
||||
@ -159,8 +161,6 @@ module Petstore
|
||||
end
|
||||
elsif !attributes[self.class.attribute_map[key]].nil?
|
||||
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
||||
elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -434,7 +434,9 @@ module Petstore
|
||||
def build_from_hash(attributes)
|
||||
return nil unless attributes.is_a?(Hash)
|
||||
self.class.openapi_types.each_pair do |key, type|
|
||||
if type =~ /\AArray<(.*)>/i
|
||||
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
elsif type =~ /\AArray<(.*)>/i
|
||||
# check to ensure the input is an array given that the attribute
|
||||
# is documented as an array but the input is not
|
||||
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
||||
@ -442,8 +444,6 @@ module Petstore
|
||||
end
|
||||
elsif !attributes[self.class.attribute_map[key]].nil?
|
||||
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
||||
elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -123,7 +123,9 @@ module Petstore
|
||||
def build_from_hash(attributes)
|
||||
return nil unless attributes.is_a?(Hash)
|
||||
self.class.openapi_types.each_pair do |key, type|
|
||||
if type =~ /\AArray<(.*)>/i
|
||||
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
elsif type =~ /\AArray<(.*)>/i
|
||||
# check to ensure the input is an array given that the attribute
|
||||
# is documented as an array but the input is not
|
||||
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
||||
@ -131,8 +133,6 @@ module Petstore
|
||||
end
|
||||
elsif !attributes[self.class.attribute_map[key]].nil?
|
||||
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
||||
elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -118,7 +118,9 @@ module Petstore
|
||||
def build_from_hash(attributes)
|
||||
return nil unless attributes.is_a?(Hash)
|
||||
self.class.openapi_types.each_pair do |key, type|
|
||||
if type =~ /\AArray<(.*)>/i
|
||||
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
elsif type =~ /\AArray<(.*)>/i
|
||||
# check to ensure the input is an array given that the attribute
|
||||
# is documented as an array but the input is not
|
||||
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
||||
@ -126,8 +128,6 @@ module Petstore
|
||||
end
|
||||
elsif !attributes[self.class.attribute_map[key]].nil?
|
||||
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
||||
elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -102,7 +102,9 @@ module Petstore
|
||||
def build_from_hash(attributes)
|
||||
return nil unless attributes.is_a?(Hash)
|
||||
self.class.openapi_types.each_pair do |key, type|
|
||||
if type =~ /\AArray<(.*)>/i
|
||||
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
elsif type =~ /\AArray<(.*)>/i
|
||||
# check to ensure the input is an array given that the attribute
|
||||
# is documented as an array but the input is not
|
||||
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
||||
@ -110,8 +112,6 @@ module Petstore
|
||||
end
|
||||
elsif !attributes[self.class.attribute_map[key]].nil?
|
||||
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
||||
elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -102,7 +102,9 @@ module Petstore
|
||||
def build_from_hash(attributes)
|
||||
return nil unless attributes.is_a?(Hash)
|
||||
self.class.openapi_types.each_pair do |key, type|
|
||||
if type =~ /\AArray<(.*)>/i
|
||||
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
elsif type =~ /\AArray<(.*)>/i
|
||||
# check to ensure the input is an array given that the attribute
|
||||
# is documented as an array but the input is not
|
||||
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
||||
@ -110,8 +112,6 @@ module Petstore
|
||||
end
|
||||
elsif !attributes[self.class.attribute_map[key]].nil?
|
||||
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
||||
elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -159,7 +159,9 @@ module Petstore
|
||||
def build_from_hash(attributes)
|
||||
return nil unless attributes.is_a?(Hash)
|
||||
self.class.openapi_types.each_pair do |key, type|
|
||||
if type =~ /\AArray<(.*)>/i
|
||||
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
elsif type =~ /\AArray<(.*)>/i
|
||||
# check to ensure the input is an array given that the attribute
|
||||
# is documented as an array but the input is not
|
||||
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
||||
@ -167,8 +169,6 @@ module Petstore
|
||||
end
|
||||
elsif !attributes[self.class.attribute_map[key]].nil?
|
||||
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
||||
elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -122,7 +122,9 @@ module Petstore
|
||||
def build_from_hash(attributes)
|
||||
return nil unless attributes.is_a?(Hash)
|
||||
self.class.openapi_types.each_pair do |key, type|
|
||||
if type =~ /\AArray<(.*)>/i
|
||||
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
elsif type =~ /\AArray<(.*)>/i
|
||||
# check to ensure the input is an array given that the attribute
|
||||
# is documented as an array but the input is not
|
||||
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
||||
@ -130,8 +132,6 @@ module Petstore
|
||||
end
|
||||
elsif !attributes[self.class.attribute_map[key]].nil?
|
||||
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
||||
elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -112,7 +112,9 @@ module Petstore
|
||||
def build_from_hash(attributes)
|
||||
return nil unless attributes.is_a?(Hash)
|
||||
self.class.openapi_types.each_pair do |key, type|
|
||||
if type =~ /\AArray<(.*)>/i
|
||||
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
elsif type =~ /\AArray<(.*)>/i
|
||||
# check to ensure the input is an array given that the attribute
|
||||
# is documented as an array but the input is not
|
||||
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
||||
@ -120,8 +122,6 @@ module Petstore
|
||||
end
|
||||
elsif !attributes[self.class.attribute_map[key]].nil?
|
||||
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
||||
elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -103,7 +103,9 @@ module Petstore
|
||||
def build_from_hash(attributes)
|
||||
return nil unless attributes.is_a?(Hash)
|
||||
self.class.openapi_types.each_pair do |key, type|
|
||||
if type =~ /\AArray<(.*)>/i
|
||||
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
elsif type =~ /\AArray<(.*)>/i
|
||||
# check to ensure the input is an array given that the attribute
|
||||
# is documented as an array but the input is not
|
||||
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
||||
@ -111,8 +113,6 @@ module Petstore
|
||||
end
|
||||
elsif !attributes[self.class.attribute_map[key]].nil?
|
||||
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
||||
elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -135,7 +135,9 @@ module Petstore
|
||||
def build_from_hash(attributes)
|
||||
return nil unless attributes.is_a?(Hash)
|
||||
self.class.openapi_types.each_pair do |key, type|
|
||||
if type =~ /\AArray<(.*)>/i
|
||||
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
elsif type =~ /\AArray<(.*)>/i
|
||||
# check to ensure the input is an array given that the attribute
|
||||
# is documented as an array but the input is not
|
||||
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
||||
@ -143,8 +145,6 @@ module Petstore
|
||||
end
|
||||
elsif !attributes[self.class.attribute_map[key]].nil?
|
||||
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
||||
elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -223,7 +223,9 @@ module Petstore
|
||||
def build_from_hash(attributes)
|
||||
return nil unless attributes.is_a?(Hash)
|
||||
self.class.openapi_types.each_pair do |key, type|
|
||||
if type =~ /\AArray<(.*)>/i
|
||||
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
elsif type =~ /\AArray<(.*)>/i
|
||||
# check to ensure the input is an array given that the attribute
|
||||
# is documented as an array but the input is not
|
||||
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
||||
@ -231,8 +233,6 @@ module Petstore
|
||||
end
|
||||
elsif !attributes[self.class.attribute_map[key]].nil?
|
||||
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
||||
elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -102,7 +102,9 @@ module Petstore
|
||||
def build_from_hash(attributes)
|
||||
return nil unless attributes.is_a?(Hash)
|
||||
self.class.openapi_types.each_pair do |key, type|
|
||||
if type =~ /\AArray<(.*)>/i
|
||||
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
elsif type =~ /\AArray<(.*)>/i
|
||||
# check to ensure the input is an array given that the attribute
|
||||
# is documented as an array but the input is not
|
||||
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
||||
@ -110,8 +112,6 @@ module Petstore
|
||||
end
|
||||
elsif !attributes[self.class.attribute_map[key]].nil?
|
||||
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
||||
elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -184,7 +184,9 @@ module Petstore
|
||||
def build_from_hash(attributes)
|
||||
return nil unless attributes.is_a?(Hash)
|
||||
self.class.openapi_types.each_pair do |key, type|
|
||||
if type =~ /\AArray<(.*)>/i
|
||||
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
elsif type =~ /\AArray<(.*)>/i
|
||||
# check to ensure the input is an array given that the attribute
|
||||
# is documented as an array but the input is not
|
||||
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
||||
@ -192,8 +194,6 @@ module Petstore
|
||||
end
|
||||
elsif !attributes[self.class.attribute_map[key]].nil?
|
||||
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
||||
elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -120,7 +120,9 @@ module Petstore
|
||||
def build_from_hash(attributes)
|
||||
return nil unless attributes.is_a?(Hash)
|
||||
self.class.openapi_types.each_pair do |key, type|
|
||||
if type =~ /\AArray<(.*)>/i
|
||||
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
elsif type =~ /\AArray<(.*)>/i
|
||||
# check to ensure the input is an array given that the attribute
|
||||
# is documented as an array but the input is not
|
||||
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
||||
@ -128,8 +130,6 @@ module Petstore
|
||||
end
|
||||
elsif !attributes[self.class.attribute_map[key]].nil?
|
||||
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
||||
elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -196,7 +196,9 @@ module Petstore
|
||||
def build_from_hash(attributes)
|
||||
return nil unless attributes.is_a?(Hash)
|
||||
self.class.openapi_types.each_pair do |key, type|
|
||||
if type =~ /\AArray<(.*)>/i
|
||||
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
elsif type =~ /\AArray<(.*)>/i
|
||||
# check to ensure the input is an array given that the attribute
|
||||
# is documented as an array but the input is not
|
||||
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
||||
@ -204,8 +206,6 @@ module Petstore
|
||||
end
|
||||
elsif !attributes[self.class.attribute_map[key]].nil?
|
||||
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
||||
elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -111,7 +111,9 @@ module Petstore
|
||||
def build_from_hash(attributes)
|
||||
return nil unless attributes.is_a?(Hash)
|
||||
self.class.openapi_types.each_pair do |key, type|
|
||||
if type =~ /\AArray<(.*)>/i
|
||||
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
elsif type =~ /\AArray<(.*)>/i
|
||||
# check to ensure the input is an array given that the attribute
|
||||
# is documented as an array but the input is not
|
||||
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
||||
@ -119,8 +121,6 @@ module Petstore
|
||||
end
|
||||
elsif !attributes[self.class.attribute_map[key]].nil?
|
||||
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
||||
elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -102,7 +102,9 @@ module Petstore
|
||||
def build_from_hash(attributes)
|
||||
return nil unless attributes.is_a?(Hash)
|
||||
self.class.openapi_types.each_pair do |key, type|
|
||||
if type =~ /\AArray<(.*)>/i
|
||||
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
elsif type =~ /\AArray<(.*)>/i
|
||||
# check to ensure the input is an array given that the attribute
|
||||
# is documented as an array but the input is not
|
||||
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
||||
@ -110,8 +112,6 @@ module Petstore
|
||||
end
|
||||
elsif !attributes[self.class.attribute_map[key]].nil?
|
||||
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
||||
elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -111,7 +111,9 @@ module Petstore
|
||||
def build_from_hash(attributes)
|
||||
return nil unless attributes.is_a?(Hash)
|
||||
self.class.openapi_types.each_pair do |key, type|
|
||||
if type =~ /\AArray<(.*)>/i
|
||||
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
elsif type =~ /\AArray<(.*)>/i
|
||||
# check to ensure the input is an array given that the attribute
|
||||
# is documented as an array but the input is not
|
||||
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
||||
@ -119,8 +121,6 @@ module Petstore
|
||||
end
|
||||
elsif !attributes[self.class.attribute_map[key]].nil?
|
||||
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
||||
elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -166,7 +166,9 @@ module Petstore
|
||||
def build_from_hash(attributes)
|
||||
return nil unless attributes.is_a?(Hash)
|
||||
self.class.openapi_types.each_pair do |key, type|
|
||||
if type =~ /\AArray<(.*)>/i
|
||||
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
elsif type =~ /\AArray<(.*)>/i
|
||||
# check to ensure the input is an array given that the attribute
|
||||
# is documented as an array but the input is not
|
||||
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
||||
@ -174,8 +176,6 @@ module Petstore
|
||||
end
|
||||
elsif !attributes[self.class.attribute_map[key]].nil?
|
||||
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
||||
elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
||||
self.send("#{key}=", nil)
|
||||
end
|
||||
end
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user