{ "$schema": "http://json-schema.org/draft-04/schema#", "definitions": { "reference": { "title": "Reference", "description": "A reference", "type": "object", "properties": { "id": { "title": "Identifier", "description": "The unique identifier for the reference", "type": "string" }, "name": { "title": "Name", "description": "The name of the reference", "type": "string" }, "source": { "title": "Source", "description": "The source of the reference, such as a URL", "type": "string" } } }, "amino-acid": { "title": "Amino Acid", "description": "An amino acid Entry for Nutriman", "type": "object", "properties": { "name": { "title": "Name", "description": "Name of the amino acid", "type": "string" }, "type": { "title": "Type", "description": "Essential, conditional, or dispensable", "type": "string" }, "intake": { "type": "object", "title": "Minimum daily intake", "properties": { "amount": { "title": "mg per kg body weight", "description": "The amount of mg of the amino acid for each kg of body weight", "type": "string" }, "ref": { "title": "Reference", "description": "The reference id of the intake", "type": "string" } } } } }, "mineral": { "title": "Mineral", "description": "A Mineral Entry for Nutriman", "type": "object", "properties": { "name": { "title": "Name", "description": "Name of the mineral", "type": "string" }, "rda": { "type": "object", "title": "Allowance", "properties": { "amount": { "title": "Amount", "description": "The amount of the RDA", "type": "string" }, "ref": { "title": "Reference", "description": "The reference id of the allowance", "type": "string" } } } }, "required": ["name", "rda"] }, "vitamin": { "title": "Vitamin", "description": "A Vitamin Entry for Nutriman", "type": "object", "properties": { "names": { "title": "Names", "description": "Names of the vitamin, first entry is the primary name", "type": "array", "items": { "type": "string", "title": "Name" }, "uniqueItems": true, "minItems": 1 }, "rda": { "type": "object", "title": "Allowance", "properties": { "amount": { "title": "Amount", "description": "The amount of the RDA", "type": "string" }, "ref": { "title": "Reference", "description": "The reference id of the allowance", "type": "string" } } } }, "required": ["names", "rda"] } }, "title": "Nutritional Data Sheet", "properties": { "amino-acids": { "title": "Amino Acids", "description": "A list of all amino acids", "type": "array", "uniqueItems": true, "items": { "$ref": "#/definitions/amino-acid" } }, "vitamins": { "title": "Vitamins", "description": "A list of all vitamins", "type": "array", "uniqueItems": true, "items": { "$ref": "#/definitions/vitamin" } }, "minerals": { "title": "Minerals", "description": "A list of all minerals", "type": "array", "uniqueItems": true, "items": { "$ref": "#/definitions/mineral" } }, "references": { "title": "References", "description": "An array of references for RDAs, UILs, and similar", "type": "array", "uniqueItems": true, "items": { "$ref": "#/definitions/reference" }, "required": ["id", "name", "source"] } } }