We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Date is not correctly formatted from a DateTime Object in a generated PHP-Client Expected was 'Y-m-d' instead 'Y-m-d\TH:i:sP' was generated
https://gist.github.com/a4blue/db06f076317ac6150a65b682e971039b
java -jar modules/swagger-codegen-cli/target/swagger-codegen-cli.jar generate -i ../test.yml -l php -o ../test_api
<?php include_once "vendor/autoload.php"; $model = new \Swagger\Client\Model\Model(); $model->setSampleDate(new DateTime()); var_dump((string)$model);
swagger-api/swagger-codegen#6533 swagger-api/swagger-codegen#6474 swagger-api/swagger-codegen#5607
In lib/ObjectSerializer.php: Line 74
- $values[$data::attributeMap()[$property]] = self::sanitizeForSerialization($value, $swaggerType, $formats[$property]); + $values[$data::attributeMap()[$property]] = self::sanitizeForSerialization($value, $formats[$property], $swaggerType);
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Description
Date is not correctly formatted from a DateTime Object in a generated PHP-Client
Expected was 'Y-m-d' instead 'Y-m-d\TH:i:sP' was generated
Swagger-codegen version
Swagger declaration file content or url
https://gist.github.com/a4blue/db06f076317ac6150a65b682e971039b
Command line used for generation
java -jar modules/swagger-codegen-cli/target/swagger-codegen-cli.jar generate -i ../test.yml -l php -o ../test_api
Steps to reproduce
Related issues/PRs
swagger-api/swagger-codegen#6533
swagger-api/swagger-codegen#6474
swagger-api/swagger-codegen#5607
Suggest a fix/enhancement
In lib/ObjectSerializer.php:
Line 74
The text was updated successfully, but these errors were encountered: