{
    "$schema": "http://json-schema.org/draft-07/schema#",
    "$id": "http://rekor.sigstore.dev/types/jar/jar_v0_0_1_schema.json",
    "title": "JAR v0.0.1 Schema",
    "description": "Schema for JAR entries",
    "type": "object",
    "properties": {
        "signature": {
            "description": "Information about the included signature in the JAR file",
            "type": "object",
            "properties": {
                "content": {
                    "description": "Specifies the PKCS7 signature embedded within the JAR file ",
                    "type": "string",
                    "format": "byte",
                    "readOnly": true
                },
                "publicKey" : {
                    "description": "The X509 certificate containing the public key JAR which verifies the signature of the JAR",
                    "type": "object",
                    "properties": {
                        "content": {
                            "description": "Specifies the content of the X509 certificate containing the public key used to verify the signature",
                            "type": "string",
                            "format": "byte"
                        }
                    },
                    "required": [ "content" ],
                    "readOnly": true
                }
            },
            "required": [ "publicKey", "content" ]
        },
        "archive": {
            "description": "Information about the archive associated with the entry",
            "type": "object",
            "properties": {
                "hash": {
                    "description": "Specifies the hash algorithm and value encompassing the entire signed archive",
                    "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 archive",
                            "type": "string"
                        }
                    },
                    "required": [ "algorithm", "value" ]
                },
                "content": {
                    "description": "Specifies the archive inline within the document",
                    "type": "string",
                    "format": "byte",
                    "writeOnly": true
                }
            },
            "oneOf": [
                {
                    "required": [ "hash" ]
                },
                {
                    "required": [ "content" ]
                }
            ]
        }
    },
    "required": [ "archive" ]
}