{
    "$schema": "http://json-schema.org/draft-07/schema#",
    "$id": "http://rekor.sigstore.dev/types/alpine/alpine_v0_0_1_schema.json",
    "title": "Alpine v0.0.1 Schema",
    "description": "Schema for Alpine Package entries",
    "type": "object",
    "properties": {
        "publicKey" : {
            "description": "The public key that can verify the package signature",
            "type": "object",
            "properties": {
                "content": {
                    "description": "Specifies the content of the public key inline within the document",
                    "type": "string",
                    "format": "byte"
                }
            },
            "required": [ "content" ]
        },
        "package": {
            "description": "Information about the package associated with the entry",
            "type": "object",
            "properties": {
                "pkginfo": {
                    "description": "Values of the .PKGINFO key / value pairs",
                    "type": "object",
                    "additionalProperties": {
                        "type": "string"
                    },
                    "readOnly": true
                },
                "hash": {
                    "description": "Specifies the hash algorithm and value for the package",
                    "type": "object",
                    "properties": {
                        "algorithm": {
                            "description": "The hashing function used to compute the hash value",
                            "type": "string",
                            "enum": [ "sha256" ]
                        },
                        "value": {
                            "description": "The hash value for the package",
                            "type": "string"
                        }
                    },
                    "readOnly": true,
                    "required": [ "algorithm", "value" ]
                },
                "content": {
                    "description": "Specifies the package inline within the document",
                    "type": "string",
                    "format": "byte",
                    "writeOnly": true
                }
            },
            "oneOf": [
                {
                    "required": [ "hash" ]
                },
                {
                    "required": [ "content" ]
                }
            ]
        }
    },
    "required": [ "publicKey", "package" ]
}
