forked from loafle/openapi-generator-original
[PHP] Fix date format serialization (#5754)
* [PHP] Honor Swagger/OpenAPI 'date' format Per spec (https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#data-types), DateTime instances defined as 'date' datatype need to be serialized as defined by full-date - RFC3339, which has the format: full-date = date-fullyear "-" date-month "-" date-mday ref: https://xml2rfc.tools.ietf.org/public/rfc/html/rfc3339.html#anchor14 see #5531 fixes #5607 * [PHP] Add `date` and `date-time` serializer tests See #5531 See #5607 * [PHP] Improve codestyle of generated code * [PHP] Regenerate PHP Petstore sample * [PHP] Regenerate PHP Security sample
This commit is contained in:
@@ -129,7 +129,7 @@ class FakeApi
|
||||
if ($test_code_inject____end____rn_n_r !== null) {
|
||||
$formParams['test code inject */ ' " =end -- \r\n \n \r'] = $this->apiClient->getSerializer()->toFormValue($test_code_inject____end____rn_n_r);
|
||||
}
|
||||
|
||||
|
||||
// for model (json/xml)
|
||||
if (isset($_tempBody)) {
|
||||
$httpBody = $_tempBody; // $_tempBody is the method argument, if present
|
||||
|
||||
Reference in New Issue
Block a user