Skip to content

Commit

Permalink
Add support for stdClass object serialization in PHP client (swagger-…
Browse files Browse the repository at this point in the history
  • Loading branch information
collinkrawll committed May 6, 2018
1 parent f6fca76 commit 215e6ea
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,11 @@ class ObjectSerializer
$data[$property] = self::sanitizeForSerialization($value);
}
return $data;
} elseif ($data instanceof \stdClass) {
foreach ($data as $property => $value) {
$data->$property = self::sanitizeForSerialization($value);
}
return $data;
} elseif (is_object($data)) {
$values = [];
$formats = $data::swaggerFormats();
Expand Down

0 comments on commit 215e6ea

Please sign in to comment.