In my swagger Open API document I am giving Object Definition like below:
"definitions": {
"User": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"format": "int64"
},
"firstName": {
"type": "string"
},
"email": {
"type": "string"
},
"shipDate": {
"type": "string",
"format": "date-time"
},
"status": {
"type": "string",
"description": "Order Status",
"enum": [
"placed",
"approved",
"delivered"
]
}
}
I am not able to find format to be metioned for email address like :
"email": {
"type": "string",
"format" : "####"
}
I went through official Doc, they are saying :
Formats such as "email", "uuid", and so on, MAY be used even though undefined by this specification. Types that are not accompanied by a format property follow the type definition in the JSON Schema.
I am struggling to achieve this, Any hint how can I achieve this?