{
    "$schema": "http://json-schema.org/draft-07/schema",
    "$id": "https://burrito.bible/schema/ingredient.schema.json",
    "$$target": "ingredient.schema.json",
    "title": "Ingredient",
    "type": "object",
    "description": "Describes an individual ingredient, which is a file contained within the burrito.",
    "properties": {
        "size": {
            "type": "integer",
            "minimum": 0,
            "description": "The number of bytes that this ingredient takes up on disk."
        },
        "lang": {
            "$ref": "common.schema.json#/definitions/languageTag"
        },
        "mimeType": {
            "$ref": "common.schema.json#/definitions/mimeType"
        },
        "checksum": {
            "type": "object",
            "properties": {
                "md5": {
                    "type": "string",
                    "pattern": "^[a-f0-9]{32}$"
                },
                "sha3-256": {
                    "type": "string",
                    "pattern": "^[a-f0-9]{64}$"
                },
                "sha3-512": {
                    "type": "string",
                    "pattern": "^[a-f0-9]{128}$"
                }
            },
            "required": ["md5"],
            "maxProperties": 2,
            "additionalProperties": false
        },
        "scope": {
            "$ref": "scope.schema.json"
        },
        "role": {
            "$ref": "role.schema.json"
        }
    },
    "required": ["size", "mimeType"],
    "additionalProperties": false
}
