I'm trying to receive proper exmaple for \DateTime property: 2018-04-16 11:11:11 but I have: 2018-04-16T11:11:11.632Z. I know that SymfonyConstraintAnnotationReader is adding pattern for property but this does change nothing. I think better solution would be to set example for that property with given format instead of pattern. I've tested it and this working fine.
What is also important (see: https://github.com/swagger-api/swagger-editor/issues/1225#issuecomment-288286561) combaining format and pattern is not recommended and will not work.
Well you can do that by adding the following annotation to your property:
/**
* @SWG\Property(example="2018-04-16 11:11:11")
*/
private $date;
But I don't think we should add it automatically in the bundle since we don't know the actual format used by the user.
Most helpful comment
Well you can do that by adding the following annotation to your property:
But I don't think we should add it automatically in the bundle since we don't know the actual format used by the user.