Skip to content

Instantly share code, notes, and snippets.

@dskvr
Created June 1, 2021 20:06
Show Gist options
  • Save dskvr/5457b0a1513bd451053f0e09298752df to your computer and use it in GitHub Desktop.
Save dskvr/5457b0a1513bd451053f0e09298752df to your computer and use it in GitHub Desktop.
{
"$id": "https://example.com/person.schema.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "Person",
"type": "object",
"properties": {
"firstName": {
"type": "string",
"description": "The person's first name."
},
"last_name": {
"type": "string",
"pattern": "^(\\([0-9]{3}\\))?[0-9]{3}-[0-9]{4}$",
"description": "The person's last name."
},
"age": {
"description": "Age in years which must be equal to or greater than zero.",
"type": "integer",
"minimum": 0
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment