cocina-models 0.112.0 → 0.112.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +2 -2
- data/lib/cocina/generator/generator.rb +2 -2
- data/lib/cocina/generator/schema.rb +1 -1
- data/lib/cocina/generator/schema_base.rb +2 -2
- data/lib/cocina/models/validators/json_schema_validator.rb +13 -10
- data/lib/cocina/models/version.rb +1 -1
- data/schema.json +79 -268
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 6f0f9a69413b8b16af1c991c94b54a42b6093ac2dccb78dcfd1fc161df2e8f42
|
|
4
|
+
data.tar.gz: 7a5674e97c75fe7eea96fcd227be1deb1ab42c35317f838a0e48bc24faf724ae
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8736faf24b0d074167b7c874edb81f2ed6ad53f51b224b2609a992ffbdafcd237bc8d807f0c8a89c3233564e531755caca3e1bbddf42e44c39858fd1fd1d85eb
|
|
7
|
+
data.tar.gz: e183d4290660c8f0de527beb8eccbf271925148957637a77d11bd345e22804fd6cb7e60da3e2100ff205a86874f0a672ad4ef60b6a0c63ad3d5854338455b955
|
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
cocina-models (0.112.
|
|
4
|
+
cocina-models (0.112.1)
|
|
5
5
|
activesupport
|
|
6
6
|
deprecation
|
|
7
7
|
dry-struct (~> 1.0)
|
|
@@ -207,7 +207,7 @@ CHECKSUMS
|
|
|
207
207
|
attr_extras (7.1.0) sha256=d96fc9a9dd5d85ba2d37762440a816f840093959ae26bb90da994c2d9f1fc827
|
|
208
208
|
base64 (0.3.0) sha256=27337aeabad6ffae05c265c450490628ef3ebd4b67be58257393227588f5a97b
|
|
209
209
|
bigdecimal (4.0.1) sha256=8b07d3d065a9f921c80ceaea7c9d4ae596697295b584c296fe599dd0ad01c4a7
|
|
210
|
-
cocina-models (0.112.
|
|
210
|
+
cocina-models (0.112.1)
|
|
211
211
|
concurrent-ruby (1.3.6) sha256=6b56837e1e7e5292f9864f34b69c5a2cbc75c0cf5338f1ce9903d10fa762d5ab
|
|
212
212
|
connection_pool (3.0.2) sha256=33fff5ba71a12d2aa26cb72b1db8bba2a1a01823559fb01d29eb74c286e62e0a
|
|
213
213
|
date (3.5.1) sha256=750d06384d7b9c15d562c76291407d89e368dda4d4fff957eb94962d325a0dc0
|
|
@@ -37,7 +37,7 @@ module Cocina
|
|
|
37
37
|
desc 'generate_schema SCHEMA_NAME', 'generate for SCHEMA_NAME'
|
|
38
38
|
def generate_schema(schema_name)
|
|
39
39
|
schema = schema_for(schema_name)
|
|
40
|
-
raise
|
|
40
|
+
raise "Cannot find schema named #{schema_name}" if schema.nil?
|
|
41
41
|
|
|
42
42
|
FileUtils.mkdir_p(options[:output])
|
|
43
43
|
|
|
@@ -108,7 +108,7 @@ module Cocina
|
|
|
108
108
|
case schema_doc.type
|
|
109
109
|
when 'object'
|
|
110
110
|
Schema.new(schema_doc, schemas: schemas.keys, lite: lite)
|
|
111
|
-
when 'string'
|
|
111
|
+
when 'string', %w[string null]
|
|
112
112
|
Datatype.new(schema_doc, schemas: schemas.keys)
|
|
113
113
|
when NilClass
|
|
114
114
|
return unless schema_doc.one_of.map(&:name).all? { |ref_schema_name| schemas.keys.include?(ref_schema_name) }
|
|
@@ -127,7 +127,7 @@ module Cocina
|
|
|
127
127
|
key: key,
|
|
128
128
|
required: doc.required&.include?(key),
|
|
129
129
|
relaxed: lite && clazz != SchemaValue,
|
|
130
|
-
nullable: properties_doc.
|
|
130
|
+
nullable: Array(properties_doc.type).include?('null'),
|
|
131
131
|
parent: self,
|
|
132
132
|
schemas: schemas)
|
|
133
133
|
end
|
|
@@ -38,7 +38,7 @@ module Cocina
|
|
|
38
38
|
end
|
|
39
39
|
|
|
40
40
|
def quote(item)
|
|
41
|
-
return item unless schema_doc.type
|
|
41
|
+
return item unless ['string', %w[string null]].include?(schema_doc.type)
|
|
42
42
|
|
|
43
43
|
return 'nil' if item.nil?
|
|
44
44
|
|
|
@@ -94,7 +94,7 @@ module Cocina
|
|
|
94
94
|
case doc.type
|
|
95
95
|
when 'integer'
|
|
96
96
|
'Types::Strict::Integer'
|
|
97
|
-
when 'string'
|
|
97
|
+
when 'string', %w[string null]
|
|
98
98
|
string_dry_datatype(doc)
|
|
99
99
|
when 'boolean'
|
|
100
100
|
'Types::Strict::Bool'
|
|
@@ -12,27 +12,30 @@ module Cocina
|
|
|
12
12
|
|
|
13
13
|
attributes['cocinaVersion'] = Cocina::Models::VERSION if %w[DRO RequestDRO AdminPolicy RequestAdminPolicy Collection RequestCollection DROWithMetadata].include? method_name
|
|
14
14
|
|
|
15
|
-
errors =
|
|
15
|
+
errors = schema.ref("#/$defs/#{method_name}").validate(attributes.as_json).to_a
|
|
16
16
|
return unless errors.any?
|
|
17
17
|
|
|
18
18
|
raise ValidationError, "When validating #{method_name}: " + errors.map { |e| e['error'] }.uniq.join(', ')
|
|
19
19
|
end
|
|
20
20
|
|
|
21
|
-
# @return [Hash] a hash representation of the
|
|
21
|
+
# @return [Hash] a hash representation of the schema.json document
|
|
22
22
|
def self.document
|
|
23
|
-
@document ||=
|
|
23
|
+
@document ||= begin
|
|
24
|
+
file_content = ::File.read(schema_path)
|
|
25
|
+
JSON.parse(file_content)
|
|
26
|
+
end
|
|
24
27
|
end
|
|
25
28
|
|
|
26
|
-
# @return [JSONSchemer::
|
|
27
|
-
def self.
|
|
28
|
-
@
|
|
29
|
+
# @return [JSONSchemer::Schema]
|
|
30
|
+
def self.schema
|
|
31
|
+
@schema ||= JSONSchemer.schema(document)
|
|
29
32
|
end
|
|
30
|
-
private_class_method :
|
|
33
|
+
private_class_method :schema
|
|
31
34
|
|
|
32
|
-
def self.
|
|
33
|
-
::File.expand_path('../../../../
|
|
35
|
+
def self.schema_path
|
|
36
|
+
::File.expand_path('../../../../schema.json', __dir__)
|
|
34
37
|
end
|
|
35
|
-
private_class_method :
|
|
38
|
+
private_class_method :schema_path
|
|
36
39
|
end
|
|
37
40
|
end
|
|
38
41
|
end
|
data/schema.json
CHANGED
|
@@ -55,10 +55,7 @@
|
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
57
|
},
|
|
58
|
-
"required": [
|
|
59
|
-
"members",
|
|
60
|
-
"name"
|
|
61
|
-
]
|
|
58
|
+
"required": ["members", "name"]
|
|
62
59
|
},
|
|
63
60
|
"AccessRoleMember": {
|
|
64
61
|
"description": "Represents a user or group that is a member of an AccessRole",
|
|
@@ -67,19 +64,13 @@
|
|
|
67
64
|
"type": {
|
|
68
65
|
"description": "Name of role",
|
|
69
66
|
"type": "string",
|
|
70
|
-
"enum": [
|
|
71
|
-
"sunetid",
|
|
72
|
-
"workgroup"
|
|
73
|
-
]
|
|
67
|
+
"enum": ["sunetid", "workgroup"]
|
|
74
68
|
},
|
|
75
69
|
"identifier": {
|
|
76
70
|
"type": "string"
|
|
77
71
|
}
|
|
78
72
|
},
|
|
79
|
-
"required": [
|
|
80
|
-
"identifier",
|
|
81
|
-
"type"
|
|
82
|
-
]
|
|
73
|
+
"required": ["identifier", "type"]
|
|
83
74
|
},
|
|
84
75
|
"AdminPolicy": {
|
|
85
76
|
"type": "object",
|
|
@@ -89,9 +80,7 @@
|
|
|
89
80
|
},
|
|
90
81
|
"type": {
|
|
91
82
|
"type": "string",
|
|
92
|
-
"enum": [
|
|
93
|
-
"https://cocina.sul.stanford.edu/models/admin_policy"
|
|
94
|
-
]
|
|
83
|
+
"enum": ["https://cocina.sul.stanford.edu/models/admin_policy"]
|
|
95
84
|
},
|
|
96
85
|
"externalIdentifier": {
|
|
97
86
|
"$ref": "#/$defs/Druid"
|
|
@@ -125,9 +114,7 @@
|
|
|
125
114
|
"$ref": "#/$defs/Druid"
|
|
126
115
|
}
|
|
127
116
|
},
|
|
128
|
-
"required": [
|
|
129
|
-
"hasAdminPolicy"
|
|
130
|
-
]
|
|
117
|
+
"required": ["hasAdminPolicy"]
|
|
131
118
|
},
|
|
132
119
|
"AdminPolicyAccessTemplate": {
|
|
133
120
|
"description": "Provides the template of access settings that is copied to the items governed by an AdminPolicy. This is almost the same as DROAccess, but it provides no defaults and has no embargo.",
|
|
@@ -207,11 +194,7 @@
|
|
|
207
194
|
}
|
|
208
195
|
}
|
|
209
196
|
},
|
|
210
|
-
"required": [
|
|
211
|
-
"hasAdminPolicy",
|
|
212
|
-
"hasAgreement",
|
|
213
|
-
"accessTemplate"
|
|
214
|
-
]
|
|
197
|
+
"required": ["hasAdminPolicy", "hasAgreement", "accessTemplate"]
|
|
215
198
|
},
|
|
216
199
|
"AdminPolicyWithMetadata": {
|
|
217
200
|
"description": "Admin Policy with addition object metadata.",
|
|
@@ -284,37 +267,25 @@
|
|
|
284
267
|
"view": {
|
|
285
268
|
"description": "Access level.",
|
|
286
269
|
"type": "string",
|
|
287
|
-
"enum": [
|
|
288
|
-
"citation-only"
|
|
289
|
-
]
|
|
270
|
+
"enum": ["citation-only"]
|
|
290
271
|
},
|
|
291
272
|
"download": {
|
|
292
273
|
"description": "Download access level.",
|
|
293
274
|
"type": "string",
|
|
294
|
-
"enum": [
|
|
295
|
-
"none"
|
|
296
|
-
]
|
|
275
|
+
"enum": ["none"]
|
|
297
276
|
},
|
|
298
277
|
"location": {
|
|
299
278
|
"description": "Not used for this access type, must be null.",
|
|
300
|
-
"type": "string",
|
|
301
|
-
"
|
|
302
|
-
"enum": [
|
|
303
|
-
null
|
|
304
|
-
]
|
|
279
|
+
"type": ["string", "null"],
|
|
280
|
+
"enum": [null]
|
|
305
281
|
},
|
|
306
282
|
"controlledDigitalLending": {
|
|
307
283
|
"type": "boolean",
|
|
308
284
|
"default": false,
|
|
309
|
-
"enum": [
|
|
310
|
-
false
|
|
311
|
-
]
|
|
285
|
+
"enum": [false]
|
|
312
286
|
}
|
|
313
287
|
},
|
|
314
|
-
"required": [
|
|
315
|
-
"view",
|
|
316
|
-
"download"
|
|
317
|
-
]
|
|
288
|
+
"required": ["view", "download"]
|
|
318
289
|
},
|
|
319
290
|
"CocinaVersion": {
|
|
320
291
|
"description": "The version of Cocina with which this object conforms.",
|
|
@@ -383,10 +354,7 @@
|
|
|
383
354
|
"view": {
|
|
384
355
|
"description": "Access level",
|
|
385
356
|
"type": "string",
|
|
386
|
-
"enum": [
|
|
387
|
-
"world",
|
|
388
|
-
"dark"
|
|
389
|
-
],
|
|
357
|
+
"enum": ["world", "dark"],
|
|
390
358
|
"default": "dark"
|
|
391
359
|
},
|
|
392
360
|
"copyright": {
|
|
@@ -492,24 +460,17 @@
|
|
|
492
460
|
"view": {
|
|
493
461
|
"description": "Access level.",
|
|
494
462
|
"type": "string",
|
|
495
|
-
"enum": [
|
|
496
|
-
"stanford"
|
|
497
|
-
]
|
|
463
|
+
"enum": ["stanford"]
|
|
498
464
|
},
|
|
499
465
|
"download": {
|
|
500
466
|
"description": "Download access level.",
|
|
501
467
|
"type": "string",
|
|
502
|
-
"enum": [
|
|
503
|
-
"none"
|
|
504
|
-
]
|
|
468
|
+
"enum": ["none"]
|
|
505
469
|
},
|
|
506
470
|
"location": {
|
|
507
471
|
"description": "Not used for this access type, must be null.",
|
|
508
|
-
"type": "string",
|
|
509
|
-
"
|
|
510
|
-
"enum": [
|
|
511
|
-
null
|
|
512
|
-
]
|
|
472
|
+
"type": ["string", "null"],
|
|
473
|
+
"enum": [null]
|
|
513
474
|
},
|
|
514
475
|
"controlledDigitalLending": {
|
|
515
476
|
"description": "Available for controlled digital lending.",
|
|
@@ -517,16 +478,12 @@
|
|
|
517
478
|
"default": false
|
|
518
479
|
}
|
|
519
480
|
},
|
|
520
|
-
"required": [
|
|
521
|
-
"view",
|
|
522
|
-
"download"
|
|
523
|
-
]
|
|
481
|
+
"required": ["view", "download"]
|
|
524
482
|
},
|
|
525
483
|
"Copyright": {
|
|
526
484
|
"description": "The human readable copyright statement that applies",
|
|
527
485
|
"example": "Copyright World Trade Organization",
|
|
528
|
-
"type": "string",
|
|
529
|
-
"nullable": true
|
|
486
|
+
"type": ["string", "null"]
|
|
530
487
|
},
|
|
531
488
|
"CreatedInFolioIdentifier": {
|
|
532
489
|
"description": "A record identifier created in Folio",
|
|
@@ -699,33 +656,24 @@
|
|
|
699
656
|
"description": "Access level.",
|
|
700
657
|
"type": "string",
|
|
701
658
|
"default": "dark",
|
|
702
|
-
"enum": [
|
|
703
|
-
"dark"
|
|
704
|
-
]
|
|
659
|
+
"enum": ["dark"]
|
|
705
660
|
},
|
|
706
661
|
"download": {
|
|
707
662
|
"description": "Download access level.",
|
|
708
663
|
"type": "string",
|
|
709
664
|
"default": "none",
|
|
710
|
-
"enum": [
|
|
711
|
-
"none"
|
|
712
|
-
]
|
|
665
|
+
"enum": ["none"]
|
|
713
666
|
},
|
|
714
667
|
"location": {
|
|
715
668
|
"description": "Not used for this access type, must be null.",
|
|
716
|
-
"type": "string",
|
|
717
|
-
"nullable": true,
|
|
669
|
+
"type": ["string", "null"],
|
|
718
670
|
"default": null,
|
|
719
|
-
"enum": [
|
|
720
|
-
null
|
|
721
|
-
]
|
|
671
|
+
"enum": [null]
|
|
722
672
|
},
|
|
723
673
|
"controlledDigitalLending": {
|
|
724
674
|
"type": "boolean",
|
|
725
675
|
"default": false,
|
|
726
|
-
"enum": [
|
|
727
|
-
false
|
|
728
|
-
]
|
|
676
|
+
"enum": [false]
|
|
729
677
|
}
|
|
730
678
|
}
|
|
731
679
|
},
|
|
@@ -742,9 +690,7 @@
|
|
|
742
690
|
"$ref": "#/$defs/Purl"
|
|
743
691
|
}
|
|
744
692
|
},
|
|
745
|
-
"required": [
|
|
746
|
-
"purl"
|
|
747
|
-
]
|
|
693
|
+
"required": ["purl"]
|
|
748
694
|
}
|
|
749
695
|
]
|
|
750
696
|
},
|
|
@@ -1144,9 +1090,7 @@
|
|
|
1144
1090
|
"$ref": "#/$defs/UseAndReproductionStatement"
|
|
1145
1091
|
}
|
|
1146
1092
|
},
|
|
1147
|
-
"required": [
|
|
1148
|
-
"releaseDate"
|
|
1149
|
-
]
|
|
1093
|
+
"required": ["releaseDate"]
|
|
1150
1094
|
}
|
|
1151
1095
|
]
|
|
1152
1096
|
},
|
|
@@ -1224,9 +1168,7 @@
|
|
|
1224
1168
|
"type": {
|
|
1225
1169
|
"description": "The content type of the File.",
|
|
1226
1170
|
"type": "string",
|
|
1227
|
-
"enum": [
|
|
1228
|
-
"https://cocina.sul.stanford.edu/models/file"
|
|
1229
|
-
]
|
|
1171
|
+
"enum": ["https://cocina.sul.stanford.edu/models/file"]
|
|
1230
1172
|
},
|
|
1231
1173
|
"externalIdentifier": {
|
|
1232
1174
|
"description": "Identifier for the resource within the SDR architecture but outside of the repository. UUID. Constant across resource versions. What clients will use calling the repository.",
|
|
@@ -1335,11 +1277,7 @@
|
|
|
1335
1277
|
"default": false
|
|
1336
1278
|
}
|
|
1337
1279
|
},
|
|
1338
|
-
"required": [
|
|
1339
|
-
"publish",
|
|
1340
|
-
"sdrPreserve",
|
|
1341
|
-
"shelve"
|
|
1342
|
-
]
|
|
1280
|
+
"required": ["publish", "sdrPreserve", "shelve"]
|
|
1343
1281
|
},
|
|
1344
1282
|
"FileSet": {
|
|
1345
1283
|
"description": "Relevant groupings of Files. Also called a File Grouping.",
|
|
@@ -1400,8 +1338,7 @@
|
|
|
1400
1338
|
},
|
|
1401
1339
|
"FileUse": {
|
|
1402
1340
|
"description": "Use for the File (e.g. 'transcription' for OCR).",
|
|
1403
|
-
"type": "string",
|
|
1404
|
-
"nullable": true
|
|
1341
|
+
"type": ["string", "null"]
|
|
1405
1342
|
},
|
|
1406
1343
|
"FolioCatalogLink": {
|
|
1407
1344
|
"description": "A linkage between an object and a Folio catalog record",
|
|
@@ -1410,10 +1347,7 @@
|
|
|
1410
1347
|
"catalog": {
|
|
1411
1348
|
"description": "Catalog that is the source of the linked record.",
|
|
1412
1349
|
"type": "string",
|
|
1413
|
-
"enum": [
|
|
1414
|
-
"folio",
|
|
1415
|
-
"previous folio"
|
|
1416
|
-
],
|
|
1350
|
+
"enum": ["folio", "previous folio"],
|
|
1417
1351
|
"example": "folio"
|
|
1418
1352
|
},
|
|
1419
1353
|
"refresh": {
|
|
@@ -1444,11 +1378,7 @@
|
|
|
1444
1378
|
"type": "string"
|
|
1445
1379
|
}
|
|
1446
1380
|
},
|
|
1447
|
-
"required": [
|
|
1448
|
-
"catalog",
|
|
1449
|
-
"catalogRecordId",
|
|
1450
|
-
"refresh"
|
|
1451
|
-
]
|
|
1381
|
+
"required": ["catalog", "catalogRecordId", "refresh"]
|
|
1452
1382
|
},
|
|
1453
1383
|
"Geographic": {
|
|
1454
1384
|
"description": "Geographic metadata",
|
|
@@ -1459,9 +1389,7 @@
|
|
|
1459
1389
|
"type": "string"
|
|
1460
1390
|
}
|
|
1461
1391
|
},
|
|
1462
|
-
"required": [
|
|
1463
|
-
"iso19139"
|
|
1464
|
-
]
|
|
1392
|
+
"required": ["iso19139"]
|
|
1465
1393
|
},
|
|
1466
1394
|
"Identification": {
|
|
1467
1395
|
"type": "object",
|
|
@@ -1482,9 +1410,7 @@
|
|
|
1482
1410
|
"$ref": "#/$defs/SourceId"
|
|
1483
1411
|
}
|
|
1484
1412
|
},
|
|
1485
|
-
"required": [
|
|
1486
|
-
"sourceId"
|
|
1487
|
-
]
|
|
1413
|
+
"required": ["sourceId"]
|
|
1488
1414
|
},
|
|
1489
1415
|
"LaneMedicalBarcode": {
|
|
1490
1416
|
"description": "The barcode associated with a Lane Medical Library DRO object, prefixed with 245",
|
|
@@ -1547,9 +1473,7 @@
|
|
|
1547
1473
|
"status": {
|
|
1548
1474
|
"description": "Status of the language relative to other parallel language elements (e.g. the primary language)",
|
|
1549
1475
|
"type": "string",
|
|
1550
|
-
"enum": [
|
|
1551
|
-
"primary"
|
|
1552
|
-
]
|
|
1476
|
+
"enum": ["primary"]
|
|
1553
1477
|
},
|
|
1554
1478
|
"standard": {
|
|
1555
1479
|
"$ref": "#/$defs/Standard"
|
|
@@ -1580,8 +1504,7 @@
|
|
|
1580
1504
|
},
|
|
1581
1505
|
"LanguageTag": {
|
|
1582
1506
|
"description": "BCP 47 language tag: https://www.rfc-editor.org/rfc/rfc4646.txt -- other applications (like media players) expect language codes of this format, see e.g. https://videojs.com/guides/text-tracks/#srclang",
|
|
1583
|
-
"type": "string",
|
|
1584
|
-
"nullable": true
|
|
1507
|
+
"type": ["string", "null"]
|
|
1585
1508
|
},
|
|
1586
1509
|
"LibrariesDOI": {
|
|
1587
1510
|
"type": "string",
|
|
@@ -1591,8 +1514,7 @@
|
|
|
1591
1514
|
},
|
|
1592
1515
|
"License": {
|
|
1593
1516
|
"description": "The license governing reuse of the DRO. Should be an IRI for known licenses (i.e. CC, RightsStatement.org URI, etc.).",
|
|
1594
|
-
"type": "string",
|
|
1595
|
-
"nullable": true,
|
|
1517
|
+
"type": ["string", "null"],
|
|
1596
1518
|
"enum": [
|
|
1597
1519
|
null,
|
|
1598
1520
|
"https://www.gnu.org/licenses/agpl.txt",
|
|
@@ -1633,43 +1555,25 @@
|
|
|
1633
1555
|
"view": {
|
|
1634
1556
|
"description": "Access level.",
|
|
1635
1557
|
"type": "string",
|
|
1636
|
-
"enum": [
|
|
1637
|
-
"location-based"
|
|
1638
|
-
]
|
|
1558
|
+
"enum": ["location-based"]
|
|
1639
1559
|
},
|
|
1640
1560
|
"download": {
|
|
1641
1561
|
"description": "Download access level.",
|
|
1642
1562
|
"type": "string",
|
|
1643
|
-
"enum": [
|
|
1644
|
-
"location-based",
|
|
1645
|
-
"none"
|
|
1646
|
-
]
|
|
1563
|
+
"enum": ["location-based", "none"]
|
|
1647
1564
|
},
|
|
1648
1565
|
"location": {
|
|
1649
1566
|
"description": "If access or download is 'location-based', which location should have access.",
|
|
1650
1567
|
"type": "string",
|
|
1651
|
-
"enum": [
|
|
1652
|
-
"spec",
|
|
1653
|
-
"music",
|
|
1654
|
-
"ars",
|
|
1655
|
-
"art",
|
|
1656
|
-
"hoover",
|
|
1657
|
-
"m&m"
|
|
1658
|
-
]
|
|
1568
|
+
"enum": ["spec", "music", "ars", "art", "hoover", "m&m"]
|
|
1659
1569
|
},
|
|
1660
1570
|
"controlledDigitalLending": {
|
|
1661
1571
|
"type": "boolean",
|
|
1662
1572
|
"default": false,
|
|
1663
|
-
"enum": [
|
|
1664
|
-
false
|
|
1665
|
-
]
|
|
1573
|
+
"enum": [false]
|
|
1666
1574
|
}
|
|
1667
1575
|
},
|
|
1668
|
-
"required": [
|
|
1669
|
-
"view",
|
|
1670
|
-
"download",
|
|
1671
|
-
"location"
|
|
1672
|
-
]
|
|
1576
|
+
"required": ["view", "download", "location"]
|
|
1673
1577
|
},
|
|
1674
1578
|
"LocationBasedDownloadAccess": {
|
|
1675
1579
|
"type": "object",
|
|
@@ -1677,43 +1581,25 @@
|
|
|
1677
1581
|
"view": {
|
|
1678
1582
|
"description": "Access level.",
|
|
1679
1583
|
"type": "string",
|
|
1680
|
-
"enum": [
|
|
1681
|
-
"stanford",
|
|
1682
|
-
"world"
|
|
1683
|
-
]
|
|
1584
|
+
"enum": ["stanford", "world"]
|
|
1684
1585
|
},
|
|
1685
1586
|
"download": {
|
|
1686
1587
|
"description": "Download access level.",
|
|
1687
1588
|
"type": "string",
|
|
1688
|
-
"enum": [
|
|
1689
|
-
"location-based"
|
|
1690
|
-
]
|
|
1589
|
+
"enum": ["location-based"]
|
|
1691
1590
|
},
|
|
1692
1591
|
"location": {
|
|
1693
1592
|
"description": "Which location should have download access.",
|
|
1694
1593
|
"type": "string",
|
|
1695
|
-
"enum": [
|
|
1696
|
-
"spec",
|
|
1697
|
-
"music",
|
|
1698
|
-
"ars",
|
|
1699
|
-
"art",
|
|
1700
|
-
"hoover",
|
|
1701
|
-
"m&m"
|
|
1702
|
-
]
|
|
1594
|
+
"enum": ["spec", "music", "ars", "art", "hoover", "m&m"]
|
|
1703
1595
|
},
|
|
1704
1596
|
"controlledDigitalLending": {
|
|
1705
1597
|
"type": "boolean",
|
|
1706
1598
|
"default": false,
|
|
1707
|
-
"enum": [
|
|
1708
|
-
false
|
|
1709
|
-
]
|
|
1599
|
+
"enum": [false]
|
|
1710
1600
|
}
|
|
1711
1601
|
},
|
|
1712
|
-
"required": [
|
|
1713
|
-
"view",
|
|
1714
|
-
"download",
|
|
1715
|
-
"location"
|
|
1716
|
-
]
|
|
1602
|
+
"required": ["view", "download", "location"]
|
|
1717
1603
|
},
|
|
1718
1604
|
"MessageDigest": {
|
|
1719
1605
|
"description": "The output of the message digest algorithm.",
|
|
@@ -1722,20 +1608,14 @@
|
|
|
1722
1608
|
"type": {
|
|
1723
1609
|
"description": "The algorithm that was used",
|
|
1724
1610
|
"type": "string",
|
|
1725
|
-
"enum": [
|
|
1726
|
-
"md5",
|
|
1727
|
-
"sha1"
|
|
1728
|
-
]
|
|
1611
|
+
"enum": ["md5", "sha1"]
|
|
1729
1612
|
},
|
|
1730
1613
|
"digest": {
|
|
1731
1614
|
"description": "The digest value hexidecimal encoded",
|
|
1732
1615
|
"type": "string"
|
|
1733
1616
|
}
|
|
1734
1617
|
},
|
|
1735
|
-
"required": [
|
|
1736
|
-
"type",
|
|
1737
|
-
"digest"
|
|
1738
|
-
]
|
|
1618
|
+
"required": ["type", "digest"]
|
|
1739
1619
|
},
|
|
1740
1620
|
"MigratedFromSymphonyIdentifier": {
|
|
1741
1621
|
"description": "A record identifier migrated from Symphony",
|
|
@@ -1768,9 +1648,7 @@
|
|
|
1768
1648
|
"type": "string"
|
|
1769
1649
|
}
|
|
1770
1650
|
},
|
|
1771
|
-
"required": [
|
|
1772
|
-
"lock"
|
|
1773
|
-
]
|
|
1651
|
+
"required": ["lock"]
|
|
1774
1652
|
},
|
|
1775
1653
|
"PreregisteredRepositoryDOI": {
|
|
1776
1654
|
"type": "string",
|
|
@@ -1957,9 +1835,7 @@
|
|
|
1957
1835
|
},
|
|
1958
1836
|
"type": {
|
|
1959
1837
|
"type": "string",
|
|
1960
|
-
"enum": [
|
|
1961
|
-
"https://cocina.sul.stanford.edu/models/admin_policy"
|
|
1962
|
-
]
|
|
1838
|
+
"enum": ["https://cocina.sul.stanford.edu/models/admin_policy"]
|
|
1963
1839
|
},
|
|
1964
1840
|
"label": {
|
|
1965
1841
|
"type": "string"
|
|
@@ -1967,9 +1843,7 @@
|
|
|
1967
1843
|
"version": {
|
|
1968
1844
|
"type": "integer",
|
|
1969
1845
|
"default": 1,
|
|
1970
|
-
"enum": [
|
|
1971
|
-
1
|
|
1972
|
-
]
|
|
1846
|
+
"enum": [1]
|
|
1973
1847
|
},
|
|
1974
1848
|
"administrative": {
|
|
1975
1849
|
"$ref": "#/$defs/AdminPolicyAdministrative"
|
|
@@ -2027,9 +1901,7 @@
|
|
|
2027
1901
|
"version": {
|
|
2028
1902
|
"type": "integer",
|
|
2029
1903
|
"default": 1,
|
|
2030
|
-
"enum": [
|
|
2031
|
-
1
|
|
2032
|
-
]
|
|
1904
|
+
"enum": [1]
|
|
2033
1905
|
},
|
|
2034
1906
|
"access": {
|
|
2035
1907
|
"$ref": "#/$defs/CollectionAccess"
|
|
@@ -2086,9 +1958,7 @@
|
|
|
2086
1958
|
"version": {
|
|
2087
1959
|
"type": "integer",
|
|
2088
1960
|
"default": 1,
|
|
2089
|
-
"enum": [
|
|
2090
|
-
1
|
|
2091
|
-
]
|
|
1961
|
+
"enum": [1]
|
|
2092
1962
|
},
|
|
2093
1963
|
"access": {
|
|
2094
1964
|
"$ref": "#/$defs/DROAccess"
|
|
@@ -2236,18 +2106,14 @@
|
|
|
2236
2106
|
"type": "string"
|
|
2237
2107
|
}
|
|
2238
2108
|
},
|
|
2239
|
-
"required": [
|
|
2240
|
-
"title"
|
|
2241
|
-
]
|
|
2109
|
+
"required": ["title"]
|
|
2242
2110
|
},
|
|
2243
2111
|
"RequestFile": {
|
|
2244
2112
|
"type": "object",
|
|
2245
2113
|
"properties": {
|
|
2246
2114
|
"type": {
|
|
2247
2115
|
"type": "string",
|
|
2248
|
-
"enum": [
|
|
2249
|
-
"https://cocina.sul.stanford.edu/models/file"
|
|
2250
|
-
]
|
|
2116
|
+
"enum": ["https://cocina.sul.stanford.edu/models/file"]
|
|
2251
2117
|
},
|
|
2252
2118
|
"label": {
|
|
2253
2119
|
"type": "string"
|
|
@@ -2339,12 +2205,7 @@
|
|
|
2339
2205
|
"$ref": "#/$defs/RequestFileSetStructural"
|
|
2340
2206
|
}
|
|
2341
2207
|
},
|
|
2342
|
-
"required": [
|
|
2343
|
-
"label",
|
|
2344
|
-
"type",
|
|
2345
|
-
"version",
|
|
2346
|
-
"structural"
|
|
2347
|
-
]
|
|
2208
|
+
"required": ["label", "type", "version", "structural"]
|
|
2348
2209
|
},
|
|
2349
2210
|
"RequestFileSetStructural": {
|
|
2350
2211
|
"description": "Structural metadata",
|
|
@@ -2375,9 +2236,7 @@
|
|
|
2375
2236
|
"$ref": "#/$defs/SourceId"
|
|
2376
2237
|
}
|
|
2377
2238
|
},
|
|
2378
|
-
"required": [
|
|
2379
|
-
"sourceId"
|
|
2380
|
-
]
|
|
2239
|
+
"required": ["sourceId"]
|
|
2381
2240
|
},
|
|
2382
2241
|
"Sequence": {
|
|
2383
2242
|
"description": "A sequence or ordering of resources within a Collection or Object.",
|
|
@@ -2393,10 +2252,7 @@
|
|
|
2393
2252
|
"viewingDirection": {
|
|
2394
2253
|
"description": "The direction that a sequence of canvases should be displayed to the user",
|
|
2395
2254
|
"type": "string",
|
|
2396
|
-
"enum": [
|
|
2397
|
-
"right-to-left",
|
|
2398
|
-
"left-to-right"
|
|
2399
|
-
]
|
|
2255
|
+
"enum": ["right-to-left", "left-to-right"]
|
|
2400
2256
|
}
|
|
2401
2257
|
}
|
|
2402
2258
|
},
|
|
@@ -2469,8 +2325,7 @@
|
|
|
2469
2325
|
},
|
|
2470
2326
|
"StandardBarcode": {
|
|
2471
2327
|
"description": "The standard barcode associated with a DRO object, prefixed with 36105",
|
|
2472
|
-
"type": "string",
|
|
2473
|
-
"nullable": true,
|
|
2328
|
+
"type": ["string", "null"],
|
|
2474
2329
|
"pattern": "^36105[0-9]{9}$",
|
|
2475
2330
|
"example": "36105010362304"
|
|
2476
2331
|
},
|
|
@@ -2480,37 +2335,25 @@
|
|
|
2480
2335
|
"view": {
|
|
2481
2336
|
"description": "Access level.",
|
|
2482
2337
|
"type": "string",
|
|
2483
|
-
"enum": [
|
|
2484
|
-
"stanford"
|
|
2485
|
-
]
|
|
2338
|
+
"enum": ["stanford"]
|
|
2486
2339
|
},
|
|
2487
2340
|
"download": {
|
|
2488
2341
|
"description": "Download access level.",
|
|
2489
2342
|
"type": "string",
|
|
2490
|
-
"enum": [
|
|
2491
|
-
"stanford"
|
|
2492
|
-
]
|
|
2343
|
+
"enum": ["stanford"]
|
|
2493
2344
|
},
|
|
2494
2345
|
"location": {
|
|
2495
2346
|
"description": "Not used for this access type, must be null.",
|
|
2496
|
-
"type": "string",
|
|
2497
|
-
"
|
|
2498
|
-
"enum": [
|
|
2499
|
-
null
|
|
2500
|
-
]
|
|
2347
|
+
"type": ["string", "null"],
|
|
2348
|
+
"enum": [null]
|
|
2501
2349
|
},
|
|
2502
2350
|
"controlledDigitalLending": {
|
|
2503
2351
|
"type": "boolean",
|
|
2504
2352
|
"default": false,
|
|
2505
|
-
"enum": [
|
|
2506
|
-
false
|
|
2507
|
-
]
|
|
2353
|
+
"enum": [false]
|
|
2508
2354
|
}
|
|
2509
2355
|
},
|
|
2510
|
-
"required": [
|
|
2511
|
-
"view",
|
|
2512
|
-
"download"
|
|
2513
|
-
]
|
|
2356
|
+
"required": ["view", "download"]
|
|
2514
2357
|
},
|
|
2515
2358
|
"SymphonyCatalogLink": {
|
|
2516
2359
|
"description": "A linkage between an object and a Symphony catalog record",
|
|
@@ -2519,10 +2362,7 @@
|
|
|
2519
2362
|
"catalog": {
|
|
2520
2363
|
"description": "Catalog that is the source of the linked record.",
|
|
2521
2364
|
"type": "string",
|
|
2522
|
-
"enum": [
|
|
2523
|
-
"symphony",
|
|
2524
|
-
"previous symphony"
|
|
2525
|
-
],
|
|
2365
|
+
"enum": ["symphony", "previous symphony"],
|
|
2526
2366
|
"example": "symphony"
|
|
2527
2367
|
},
|
|
2528
2368
|
"refresh": {
|
|
@@ -2537,11 +2377,7 @@
|
|
|
2537
2377
|
"example": "11403803"
|
|
2538
2378
|
}
|
|
2539
2379
|
},
|
|
2540
|
-
"required": [
|
|
2541
|
-
"catalog",
|
|
2542
|
-
"catalogRecordId",
|
|
2543
|
-
"refresh"
|
|
2544
|
-
]
|
|
2380
|
+
"required": ["catalog", "catalogRecordId", "refresh"]
|
|
2545
2381
|
},
|
|
2546
2382
|
"Title": {
|
|
2547
2383
|
"type": "object",
|
|
@@ -2553,33 +2389,23 @@
|
|
|
2553
2389
|
"anyOf": [
|
|
2554
2390
|
{
|
|
2555
2391
|
"type": "object",
|
|
2556
|
-
"required": [
|
|
2557
|
-
"value"
|
|
2558
|
-
]
|
|
2392
|
+
"required": ["value"]
|
|
2559
2393
|
},
|
|
2560
2394
|
{
|
|
2561
2395
|
"type": "object",
|
|
2562
|
-
"required": [
|
|
2563
|
-
"structuredValue"
|
|
2564
|
-
]
|
|
2396
|
+
"required": ["structuredValue"]
|
|
2565
2397
|
},
|
|
2566
2398
|
{
|
|
2567
2399
|
"type": "object",
|
|
2568
|
-
"required": [
|
|
2569
|
-
"parallelValue"
|
|
2570
|
-
]
|
|
2400
|
+
"required": ["parallelValue"]
|
|
2571
2401
|
},
|
|
2572
2402
|
{
|
|
2573
2403
|
"type": "object",
|
|
2574
|
-
"required": [
|
|
2575
|
-
"groupedValue"
|
|
2576
|
-
]
|
|
2404
|
+
"required": ["groupedValue"]
|
|
2577
2405
|
},
|
|
2578
2406
|
{
|
|
2579
2407
|
"type": "object",
|
|
2580
|
-
"required": [
|
|
2581
|
-
"valueAt"
|
|
2582
|
-
]
|
|
2408
|
+
"required": ["valueAt"]
|
|
2583
2409
|
}
|
|
2584
2410
|
]
|
|
2585
2411
|
}
|
|
@@ -2588,8 +2414,7 @@
|
|
|
2588
2414
|
"UseAndReproductionStatement": {
|
|
2589
2415
|
"description": "The human readable use and reproduction statement that applies",
|
|
2590
2416
|
"example": "Property rights reside with the repository. Literary rights reside with the creators of the documents or their heirs. To obtain permission to publish or reproduce, please contact the Public Services Librarian of the Dept. of Special Collections (http://library.stanford.edu/spc).",
|
|
2591
|
-
"type": "string",
|
|
2592
|
-
"nullable": true
|
|
2417
|
+
"type": ["string", "null"]
|
|
2593
2418
|
},
|
|
2594
2419
|
"WorldAccess": {
|
|
2595
2420
|
"type": "object",
|
|
@@ -2597,39 +2422,25 @@
|
|
|
2597
2422
|
"view": {
|
|
2598
2423
|
"description": "Access level.",
|
|
2599
2424
|
"type": "string",
|
|
2600
|
-
"enum": [
|
|
2601
|
-
"world"
|
|
2602
|
-
]
|
|
2425
|
+
"enum": ["world"]
|
|
2603
2426
|
},
|
|
2604
2427
|
"download": {
|
|
2605
2428
|
"description": "Download access level.",
|
|
2606
2429
|
"type": "string",
|
|
2607
|
-
"enum": [
|
|
2608
|
-
"none",
|
|
2609
|
-
"stanford",
|
|
2610
|
-
"world"
|
|
2611
|
-
]
|
|
2430
|
+
"enum": ["none", "stanford", "world"]
|
|
2612
2431
|
},
|
|
2613
2432
|
"location": {
|
|
2614
2433
|
"description": "Not used for this access type, must be null.",
|
|
2615
|
-
"type": "string",
|
|
2616
|
-
"
|
|
2617
|
-
"enum": [
|
|
2618
|
-
null
|
|
2619
|
-
]
|
|
2434
|
+
"type": ["string", "null"],
|
|
2435
|
+
"enum": [null]
|
|
2620
2436
|
},
|
|
2621
2437
|
"controlledDigitalLending": {
|
|
2622
2438
|
"type": "boolean",
|
|
2623
2439
|
"default": false,
|
|
2624
|
-
"enum": [
|
|
2625
|
-
false
|
|
2626
|
-
]
|
|
2440
|
+
"enum": [false]
|
|
2627
2441
|
}
|
|
2628
2442
|
},
|
|
2629
|
-
"required": [
|
|
2630
|
-
"view",
|
|
2631
|
-
"download"
|
|
2632
|
-
]
|
|
2443
|
+
"required": ["view", "download"]
|
|
2633
2444
|
}
|
|
2634
2445
|
}
|
|
2635
2446
|
}
|