109 lines
2.6 KiB
JSON
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
|
|
}
|