forked from loafle/openapi-generator-original
Merge branch 'master' of https://github.com/OpenAPITools/openapi-generator
This commit is contained in:
commit
8b1e80d360
@ -30,7 +30,7 @@
|
|||||||
$asserts[] = new Assert\Date();
|
$asserts[] = new Assert\Date();
|
||||||
{{/isDate}}
|
{{/isDate}}
|
||||||
{{#isDateTime}}
|
{{#isDateTime}}
|
||||||
$asserts[] = new Assert\DateTime();
|
$asserts[] = new Assert\Type("DateTime");
|
||||||
{{/isDateTime}}
|
{{/isDateTime}}
|
||||||
{{^isDate}}
|
{{^isDate}}
|
||||||
{{^isDateTime}}
|
{{^isDateTime}}
|
||||||
|
@ -95,7 +95,7 @@ class JmsSerializer implements SerializerInterface
|
|||||||
break;
|
break;
|
||||||
case 'DateTime':
|
case 'DateTime':
|
||||||
case '\DateTime':
|
case '\DateTime':
|
||||||
return new DateTime($data);
|
return is_null($data) ? null :new DateTime($data);
|
||||||
default:
|
default:
|
||||||
throw new RuntimeException(sprintf("Type %s is unsupported", $type));
|
throw new RuntimeException(sprintf("Type %s is unsupported", $type));
|
||||||
}
|
}
|
||||||
|
@ -95,7 +95,7 @@ class JmsSerializer implements SerializerInterface
|
|||||||
break;
|
break;
|
||||||
case 'DateTime':
|
case 'DateTime':
|
||||||
case '\DateTime':
|
case '\DateTime':
|
||||||
return new DateTime($data);
|
return is_null($data) ? null :new DateTime($data);
|
||||||
default:
|
default:
|
||||||
throw new RuntimeException(sprintf("Type %s is unsupported", $type));
|
throw new RuntimeException(sprintf("Type %s is unsupported", $type));
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user