The capsule files are described by JSON Schema (draft 2020-12)
documents in the package's schemas folder, the same files as the
spec folder of the rmbl GitHub Action: capsule for
data_provenance.json, bundle for capsule_bundle.json
and manifest for a results manifest. rmbl verify checks
each capsule file against its schema before the package's own checks.
Examples
schemapath("capsule")
#> [1] "/tmp/RtmpZpRdcE/temp_libpath1e6a373ae17b/rmoriebricklayer/schemas/capsule.schema.json"
s <- fromjs(paste(readLines(schemapath("bundle")), collapse = "\n"))
s$required
#> [1] "files" "manifest_digest" "bundled_utc" "attestation"
# only the four schemas exist
try(schemapath("nope"))
#> Error : schemapath: `name` must be capsule, bundle, manifest or ledger, not 'nope'
