Ruby Client: nullable for build_from_hash

This commit is contained in:
Tomohiro Suwa
2020-07-15 17:16:38 +09:00
parent cef1bec466
commit a8eed9ce38

View File

@@ -22,7 +22,9 @@
end
elsif !attributes[self.class.attribute_map[key]].nil?
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
end # or else data not found in attributes(hash), not an issue as the data can be optional
elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
self.send("#{key}=", nil)
end
end
self