Skip to content

Instantly share code, notes, and snippets.

@wbarcovsky
Created February 6, 2020 10:14
Show Gist options
  • Select an option

  • Save wbarcovsky/56154b7675d839d7bd1858502f75dd63 to your computer and use it in GitHub Desktop.

Select an option

Save wbarcovsky/56154b7675d839d7bd1858502f75dd63 to your computer and use it in GitHub Desktop.
{
"$id": "https://example.com/arrays.schema.json",
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "A representation of a person, company, organization, or place",
"type": "object",
"properties": {
"fruits": {
"type": "array",
"items": {
"type": "string"
}
},
"vegetables": {
"type": "array",
"items": { "$ref": "#/definitions/veggie" }
}
},
"definitions": {
"veggie": {
"type": "object",
"required": [ "veggieName", "veggieLike" ],
"properties": {
"veggieName": {
"type": "string",
"description": "The name of the vegetable."
},
"veggieLike": {
"type": "boolean",
"description": "Do I like this vegetable?"
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment