Format Annotation Vocabulary Official Included By Default
A vocabulary to defines semantic information about string-encoded values.
Dialect | 2020-12 |
---|---|
URI | https://json-schema.org/draft/2020-12/vocab/format-annotation |
Specification | https://json-schema.org/draft/2020-12/json-schema-validation.html#section-7.2.1 |
Authors | |
Metaschema | https://json-schema.org/draft/2020-12/meta/format-annotation |
Also see |
Your metaschema is likely already declaring this vocabulary
This vocabulary is included by default when using the official metaschema of this dialect: https://json-schema.org/draft/2020-12/schema. Unless you are using a custom metaschema, there is nothing else you need to do.
To make use of this vocabulary, modify your metaschema to declare the use of this vocabulary using the $vocabulary keyword and evaluate its metaschema. If the vocabulary must be present for an implementation to proceed:
{
...
"$vocabulary": {
...
"https://json-schema.org/draft/2020-12/vocab/format-annotation": true
},
"allOf": [
{ "$ref": "https://json-schema.org/draft/2020-12/meta/format-annotation" }
]
}
Otherwise, if it is optional for implementations to understand this vocabulary to proceed:
{
...
"$vocabulary": {
...
"https://json-schema.org/draft/2020-12/vocab/format-annotation": false
},
"allOf": [
{ "$ref": "https://json-schema.org/draft/2020-12/meta/format-annotation" }
]
}
Keywords
Keyword | Kind | Instance | Summary |
---|---|---|---|
format | Annotation | String | Define semantic information about a string instance. |