Files
paperspec/schemas/id-entry.schema.json
T
alexm 62f54ed869
check / check (macos-latest) (push) Canceled after 0s
check / check (ubuntu-latest) (push) Canceled after 0s
Initial commit
2026-10-11 23:45:29 -04:00

88 lines
1.6 KiB
JSON

{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://scient.ing/ns/schemas/id-entry.schema.json",
"title": "ID table entry",
"description": "One line of ids.jsonl; spec/04-identity.md.",
"type": "object",
"properties": {
"id": {
"$ref": "common.schema.json#/$defs/nodeRef"
},
"kind": {
"enum": [
"retired",
"alias"
]
},
"successor": {
"anyOf": [
{
"$ref": "common.schema.json#/$defs/nodeId"
},
{
"type": "null"
}
]
},
"node_kind": {
"$ref": "common.schema.json#/$defs/nodeKind"
},
"rev": {
"type": "integer",
"minimum": 1
}
},
"required": [
"id",
"kind",
"successor"
],
"additionalProperties": false,
"allOf": [
{
"if": {
"properties": {
"kind": {
"const": "retired"
}
}
},
"then": {
"required": [
"node_kind",
"rev"
],
"properties": {
"id": {
"$ref": "common.schema.json#/$defs/nodeId"
}
}
},
"else": {
"properties": {
"id": {
"$ref": "common.schema.json#/$defs/alias"
},
"successor": {
"$ref": "common.schema.json#/$defs/nodeId"
}
},
"not": {
"anyOf": [
{
"required": [
"rev"
]
},
{
"required": [
"node_kind"
]
}
]
}
}
}
]
}