[PHP] Client properties validation #3457 (#3480)

* [PHP] Avoid validation of unset, optional parameters

Fixes #3457.

* [PHP] Regenerate petstore samples
This commit is contained in:
Arne Jørgensen
2016-08-01 09:24:47 +02:00
committed by wing328
parent d7c959fe42
commit 0f8e1f8105
17 changed files with 116 additions and 116 deletions

View File

@@ -12,12 +12,12 @@
*/
/**
* Swagger Petstore *_/ ' \" =end \\r\\n \\n \\r
* Swagger Petstore *_/ ' \" =end -- \\r\\n \\n \\r
*
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ *_/ ' \" =end
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ *_/ ' \" =end --
*
* OpenAPI spec version: 1.0.0 *_/ ' \" =end \\r\\n \\n \\r
* Contact: apiteam@swagger.io *_/ ' \" =end \\r\\n \\n \\r
* OpenAPI spec version: 1.0.0 *_/ ' \" =end -- \\r\\n \\n \\r
* Contact: apiteam@swagger.io *_/ ' \" =end -- \\r\\n \\n \\r
* Generated by: https://github.com/swagger-api/swagger-codegen.git
*
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -264,7 +264,7 @@ class ObjectSerializer
} else {
return null;
}
} elseif (in_array($class, array('integer', 'int', 'void', 'number', 'object', 'double', 'float', 'byte', 'DateTime', 'string', 'mixed', 'boolean', 'bool'))) {
} elseif (in_array($class, array('void', 'bool', 'string', 'double', 'byte', 'mixed', 'integer', 'float', 'int', 'DateTime', 'number', 'boolean', 'object'))) {
settype($data, $class);
return $data;
} elseif ($class === '\SplFileObject') {