forked from loafle/openapi-generator-original
update php to handle object type and add more test case
This commit is contained in:
@@ -241,6 +241,9 @@ class ObjectSerializer
|
||||
$values[] = self::deserialize($value, $subClass);
|
||||
}
|
||||
$deserialized = $values;
|
||||
} elseif ($class === 'object') {
|
||||
settype($data, 'array');
|
||||
$deserialized = $data;
|
||||
} elseif ($class === '\DateTime') {
|
||||
$deserialized = new \DateTime($data);
|
||||
} elseif (in_array($class, array('integer', 'int', 'void', 'number', 'object', 'double', 'float', 'byte', 'DateTime', 'string', 'mixed', 'boolean', 'bool'))) {
|
||||
|
||||
Reference in New Issue
Block a user