We have a requirement to annotate a datetime field with the following annotation:
@Type("DateTime<'Y-m-d\TH:i:sP'>")
Can someone advice how to achieve this using swagger code gen. Codebase is PHP. Current field definition is as follows:
created:
type: "string"
format: "date-time"
description: "Date client details first appeared in the system."
default: null
Required output:
/**
* Date client details first appeared in the system.
*
* @var \DateTime|null
* @SerializedName("createdDate")
* @Assert\DateTime()
* @Type("DateTime<'Y-m-d\TH:i:sP'>")
*/
protected $createdDate;
What is being produced by swagger codegen:
/**
* Date client details first appeared in the system.
*
* @var \DateTime|null
* @SerializedName("createdDate")
* @Assert\DateTime()
* @Type("DateTime")
*/
protected $createdDate;