PHP ObjectSerializer.sanitizeForSerialization wrong Parameters #11032
srikrishnudu
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
We used the swagger-codegen-cli-3.0.26.jar to generate the PHP Classes.
The class ObjectSerializer.php is generated with the static function
public static function sanitizeForSerialization($data, $format = null) {}
Inside the same static function we see the line.
$values[$data::attributeMap()[$property]] = self::sanitizeForSerialization($value, $swaggerType, $formats[$property]);
The parameter swaggerType is wrongly assigned to format. We used the following schema definition.
"birth_date": { "type": "string", "format": "date" },
Can you please check this?
Beta Was this translation helpful? Give feedback.
All reactions