-
Notifications
You must be signed in to change notification settings - Fork 85
/
work.schema.json
78 lines (75 loc) · 2.12 KB
/
work.schema.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Open Library Work Schema",
"type": "object",
"required": [
"key",
"title",
"type",
"revision",
"last_modified"
],
"additionalProperties": true,
"properties": {
"key": { "$ref": "shared_definitions.json#/work_key" },
"title": { "type": "string" },
"subtitle": { "type": "string" },
"type": {
"type": "object",
"additionalProperties": false,
"properties": {
"key": {
"type": "string",
"enum": ["/type/work"]
}
}
},
"authors": {
"type": "array",
"items": { "$ref": "#definitions/author_role" }
},
"covers": {
"type": "array",
"items": { "type": "number" }
},
"links": {
"type": "array",
"items": { "$ref": "shared_definitions.json#/link" }
},
"id": {
"description": "Unsure what this is for, deprecate?",
"type": "number"
},
"lc_classifications": { "$ref": "shared_definitions.json#/string_array" },
"subjects": { "$ref": "shared_definitions.json#/string_array" },
"first_publish_date": { "type": "string" },
"description": { "$ref": "shared_definitions.json#/text_block" },
"notes": { "$ref": "shared_definitions.json#/text_block" },
"revision": { "type": "number" },
"latest_revision": { "type": "number" },
"created": { "$ref": "shared_definitions.json#/internal_datetime" },
"last_modified": { "$ref": "shared_definitions.json#/internal_datetime" }
},
"definitions": {
"author_role": {
"type": "object",
"additionalProperties": false,
"required": [ "type", "author" ],
"properties": {
"type": {
"type": "object",
"additionalProperties": false,
"required": ["key"],
"properties": {
"key": {
"enum": ["/type/author_role"]
}
}
},
"author": { "$ref": "shared_definitions.json#/author" },
"role": { "type": "string" },
"as": { "type": "string" }
}
}
}
}