Files
paperspec/schemas/witnesses.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

109 lines
2.6 KiB
JSON

{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://scient.ing/ns/schemas/witnesses.schema.json",
"title": "Witnesses",
"description": "witnesses.json of a package; spec/02-model.md.",
"type": "object",
"properties": {
"witnesses": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"$ref": "common.schema.json#/$defs/nodeId"
},
"sha256": {
"$ref": "common.schema.json#/$defs/hash"
},
"size": {
"type": "integer",
"minimum": 0
},
"kind": {
"enum": [
"pdf",
"jats",
"latex",
"html",
"epub",
"typst",
"xml",
"image",
"other"
]
},
"media_type": {
"type": "string",
"minLength": 1
},
"pages": {
"type": "integer",
"minimum": 1
},
"text_layer": {
"type": "boolean"
},
"version_label": {
"type": "string",
"minLength": 1
},
"origin": {
"type": "object",
"properties": {
"source": {
"enum": [
"publisher",
"repository",
"preprint-server",
"author",
"team",
"licensed-delivery",
"library",
"other"
]
},
"url": {
"$ref": "common.schema.json#/$defs/url"
},
"doi": {
"type": "string",
"minLength": 1
},
"retrieved_at": {
"$ref": "common.schema.json#/$defs/time"
},
"note": {
"type": "string",
"minLength": 1
}
},
"required": [
"source"
],
"additionalProperties": false
},
"rights": {
"$ref": "rights.schema.json"
}
},
"required": [
"id",
"sha256",
"size",
"kind",
"media_type",
"origin",
"rights"
],
"additionalProperties": false
},
"minItems": 1
}
},
"required": [
"witnesses"
],
"additionalProperties": false
}