88 lines
1.6 KiB
JSON
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"
|
|
]
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|