Files
paperspec/schemas/roster.schema.json
T
alexm 4fa326dc76
check / check (push) Successful in 42s
site / site (push) Successful in 3m4s
First implementation (#1)
Reviewed-on: #1
2026-10-15 05:47:05 -04:00

119 lines
2.9 KiB
JSON

{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://paperspec.scient.ing/schemas/roster.schema.json",
"title": "Roster",
"description": "scienting-roster/1: the keys that may sign; spec/08-fidelity.md.",
"type": "object",
"properties": {
"format": {
"const": "scienting-roster/1"
},
"store": {
"$ref": "common.schema.json#/$defs/key"
},
"keys": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"$ref": "common.schema.json#/$defs/key"
},
"person": {
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 1
},
"orcid": {
"type": "string",
"pattern": "^[0-9]{4}-[0-9]{4}-[0-9]{4}-[0-9]{3}[0-9X]$"
},
"email": {
"type": "string",
"minLength": 1
}
},
"required": [
"name"
],
"additionalProperties": false
},
"role": {
"description": "The holder's role in the team that keeps the roster; a key with the role owner may revoke any receipt (spec/08 §8.7).",
"enum": [
"owner",
"editor",
"reader",
"guest"
]
},
"scheme": {
"enum": [
"ed25519",
"ssh",
"gpg",
"sigstore",
"cose",
"ml-dsa-65"
]
},
"public": {
"type": "string",
"minLength": 1
},
"did": {
"type": "string",
"pattern": "^did:key:z[1-9A-HJ-NP-Za-km-z]+$",
"description": "The key as a did:key decentralized identifier, which the public key determines (spec/08 §8.7)."
},
"purposes": {
"type": "array",
"items": {
"enum": [
"sign",
"spot-check",
"export",
"witness"
]
},
"minItems": 1,
"uniqueItems": true
},
"registered_at": {
"$ref": "common.schema.json#/$defs/time"
},
"revoked_at": {
"anyOf": [
{
"$ref": "common.schema.json#/$defs/time"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"person",
"role",
"scheme",
"public",
"purposes",
"registered_at",
"revoked_at"
],
"additionalProperties": false
}
}
},
"required": [
"format",
"store",
"keys"
],
"additionalProperties": false
}