Format
format keyword lets you add some basic semantic identification of certain types of strings. Below is a list of the most common ones:
- Date and time formats:
date-time,date,time,duration - Email formats:
email,idn-email - Hostname formats:
hostname,idn-hostname - IP address formats:
ipv4,ipv6 - Resource identifier formats:
uuid,uri,uri-reference,iri,iri-reference
{
"type": "object",
"properties": {
"email": {
"type": "string",
"format": "email"
}
}
}