cocina-models 0.127.0 → 0.129.0

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.
data/schema.json CHANGED
@@ -155,19 +155,22 @@
155
155
  "allOf": [
156
156
  {
157
157
  "$ref": "#/$defs/Access"
158
- }
159
- ],
160
- "properties": {
161
- "copyright": {
162
- "$ref": "#/$defs/Copyright"
163
158
  },
164
- "useAndReproductionStatement": {
165
- "$ref": "#/$defs/UseAndReproductionStatement"
166
- },
167
- "license": {
168
- "$ref": "#/$defs/License"
159
+ {
160
+ "type": "object",
161
+ "properties": {
162
+ "copyright": {
163
+ "$ref": "#/$defs/Copyright"
164
+ },
165
+ "useAndReproductionStatement": {
166
+ "$ref": "#/$defs/UseAndReproductionStatement"
167
+ },
168
+ "license": {
169
+ "$ref": "#/$defs/License"
170
+ }
171
+ }
169
172
  }
170
- },
173
+ ],
171
174
  "unevaluatedProperties": false
172
175
  },
173
176
  "AdminPolicyAdministrative": {
@@ -230,18 +233,6 @@
230
233
  ],
231
234
  "unevaluatedProperties": false
232
235
  },
233
- "AppliesTo": {
234
- "description": "Property model for indicating the parts, aspects, or versions of the resource to which a descriptive element is applicable.",
235
- "type": "object",
236
- "properties": {
237
- "appliesTo": {
238
- "type": "array",
239
- "items": {
240
- "$ref": "#/$defs/DescriptiveBasicValue"
241
- }
242
- }
243
- }
244
- },
245
236
  "Barcode": {
246
237
  "description": "A barcode",
247
238
  "oneOf": [
@@ -262,6 +253,28 @@
262
253
  }
263
254
  ]
264
255
  },
256
+ "AppliesTo": {
257
+ "description": "Value model for appliesTo property.",
258
+ "type": "object",
259
+ "allOf": [
260
+ {
261
+ "$ref": "#/$defs/DescriptiveBasicValue"
262
+ },
263
+ {
264
+ "type": "object",
265
+ "properties": {
266
+ "identifier": {
267
+ "description": "Identifiers and URIs associated with the descriptive element.",
268
+ "type": "array",
269
+ "items": {
270
+ "$ref": "#/$defs/DescriptiveIdentifier"
271
+ }
272
+ }
273
+ }
274
+ }
275
+ ],
276
+ "unevaluatedProperties": false
277
+ },
265
278
  "BusinessBarcode": {
266
279
  "description": "The barcode associated with a business library DRO, prefixed with 2050",
267
280
  "type": "string",
@@ -672,23 +685,26 @@
672
685
  },
673
686
  "DROAccess": {
674
687
  "type": "object",
675
- "properties": {
676
- "copyright": {
677
- "$ref": "#/$defs/Copyright"
678
- },
679
- "embargo": {
680
- "$ref": "#/$defs/Embargo"
681
- },
682
- "useAndReproductionStatement": {
683
- "$ref": "#/$defs/UseAndReproductionStatement"
684
- },
685
- "license": {
686
- "$ref": "#/$defs/License"
687
- }
688
- },
689
688
  "allOf": [
690
689
  {
691
690
  "$ref": "#/$defs/Access"
691
+ },
692
+ {
693
+ "type": "object",
694
+ "properties": {
695
+ "copyright": {
696
+ "$ref": "#/$defs/Copyright"
697
+ },
698
+ "embargo": {
699
+ "$ref": "#/$defs/Embargo"
700
+ },
701
+ "useAndReproductionStatement": {
702
+ "$ref": "#/$defs/UseAndReproductionStatement"
703
+ },
704
+ "license": {
705
+ "$ref": "#/$defs/License"
706
+ }
707
+ }
692
708
  }
693
709
  ],
694
710
  "unevaluatedProperties": false
@@ -1073,7 +1089,7 @@
1073
1089
  "unevaluatedProperties": false
1074
1090
  },
1075
1091
  "DescriptiveBasicValue": {
1076
- "description": "Basic value model for descriptive elements. Can only have one of value, parallelValue, groupedValue, or structuredValue.",
1092
+ "description": "Basic value model for descriptive elements. Can only have one of value, parallelValue, groupedValue, or structuredValue. Does not have identifier or appliesTo properties.",
1077
1093
  "type": "object",
1078
1094
  "allOf": [
1079
1095
  {
@@ -1118,13 +1134,6 @@
1118
1134
  "encoding": {
1119
1135
  "$ref": "#/$defs/Standard"
1120
1136
  },
1121
- "identifier": {
1122
- "description": "Identifiers and URIs associated with the descriptive element.",
1123
- "type": "array",
1124
- "items": {
1125
- "$ref": "#/$defs/DescriptiveIdentifier"
1126
- }
1127
- },
1128
1137
  "source": {
1129
1138
  "$ref": "#/$defs/Source"
1130
1139
  },
@@ -1203,7 +1212,7 @@
1203
1212
  "required": ["groupedValue"],
1204
1213
  "properties": {
1205
1214
  "groupedValue": {
1206
- "minItems": 2
1215
+ "minItems": 1
1207
1216
  }
1208
1217
  }
1209
1218
  }
@@ -1349,181 +1358,49 @@
1349
1358
  }
1350
1359
  }
1351
1360
  },
1352
- "DescriptiveValue": {
1353
- "description": "Default value model for descriptive elements.",
1361
+ "DescriptiveIdentifier": {
1362
+ "description": "Default value model for identifiers.",
1354
1363
  "type": "object",
1355
- "properties": {
1356
- "appliesTo": {
1357
- "type": "array",
1358
- "items": {
1359
- "$ref": "#/$defs/DescriptiveBasicValue"
1360
- }
1361
- }
1362
- },
1363
1364
  "allOf": [
1364
1365
  {
1365
- "$ref": "#/$defs/DescriptiveStructuredValue"
1366
- },
1367
- {
1368
- "$ref": "#/$defs/DescriptiveParallelValue"
1369
- },
1370
- {
1371
- "$ref": "#/$defs/DescriptiveGroupedValue"
1366
+ "$ref": "#/$defs/DescriptiveBasicValue"
1372
1367
  },
1373
1368
  {
1374
1369
  "type": "object",
1375
1370
  "properties": {
1376
- "value": {
1377
- "description": "String or integer value of the descriptive element.",
1378
- "oneOf": [
1379
- {
1380
- "type": "string"
1381
- }
1382
- ]
1383
- },
1384
- "type": {
1385
- "description": "Type of value provided by the descriptive element. See https://github.com/sul-dlss/cocina-models/blob/main/docs/description_types.md for valid types.",
1386
- "type": "string"
1387
- },
1388
- "status": {
1389
- "description": "Status of the descriptive element value relative to other instances of the element.",
1390
- "type": "string"
1391
- },
1392
- "code": {
1393
- "description": "Code value of the descriptive element.",
1394
- "type": "string"
1395
- },
1396
- "uri": {
1397
- "description": "URI value of the descriptive element.",
1398
- "type": "string"
1399
- },
1400
- "standard": {
1401
- "$ref": "#/$defs/Standard"
1402
- },
1403
- "encoding": {
1404
- "$ref": "#/$defs/Standard"
1405
- },
1406
- "identifier": {
1407
- "description": "Identifiers and URIs associated with the descriptive element.",
1371
+ "appliesTo": {
1408
1372
  "type": "array",
1409
1373
  "items": {
1410
- "$ref": "#/$defs/DescriptiveIdentifier"
1411
- }
1412
- },
1413
- "source": {
1414
- "$ref": "#/$defs/Source"
1415
- },
1416
- "displayLabel": {
1417
- "description": "The preferred display label to use for the descriptive element in access systems.",
1418
- "type": [
1419
- "string",
1420
- "null"
1421
- ]
1422
- },
1423
- "qualifier": {
1424
- "description": "A term providing information about the circumstances of the statement (e.g., approximate dates).",
1425
- "type": "string"
1426
- },
1427
- "note": {
1428
- "description": "Other information related to the descriptive element.",
1429
- "type": "array",
1430
- "items": {
1431
- "$ref": "#/$defs/DescriptiveValue"
1374
+ "$ref": "#/$defs/AppliesTo"
1432
1375
  }
1433
- },
1434
- "valueLanguage": {
1435
- "$ref": "#/$defs/DescriptiveValueLanguage"
1436
- },
1437
- "valueAt": {
1438
- "description": "URL or other pointer to the location of the value of the descriptive element.",
1439
- "type": "string"
1440
1376
  }
1441
1377
  }
1442
1378
  }
1443
1379
  ],
1444
1380
  "unevaluatedProperties": false
1445
1381
  },
1446
- "DescriptiveIdentifier": {
1447
- "description": "Value model for descriptive identifiers. Same as DescriptiveValue but omits the identifier property to prevent infinite recursion.",
1382
+ "DescriptiveValue": {
1383
+ "description": "Default value model for descriptive elements.",
1448
1384
  "type": "object",
1449
- "properties": {
1450
- "appliesTo": {
1451
- "type": "array",
1452
- "items": {
1453
- "$ref": "#/$defs/DescriptiveBasicValue"
1454
- }
1455
- }
1456
- },
1457
1385
  "allOf": [
1458
1386
  {
1459
- "$ref": "#/$defs/DescriptiveStructuredValue"
1460
- },
1461
- {
1462
- "$ref": "#/$defs/DescriptiveParallelValue"
1463
- },
1464
- {
1465
- "$ref": "#/$defs/DescriptiveGroupedValue"
1387
+ "$ref": "#/$defs/DescriptiveBasicValue"
1466
1388
  },
1467
1389
  {
1468
1390
  "type": "object",
1469
1391
  "properties": {
1470
- "value": {
1471
- "description": "String or integer value of the descriptive element.",
1472
- "oneOf": [
1473
- {
1474
- "type": "string"
1475
- }
1476
- ]
1477
- },
1478
- "type": {
1479
- "description": "Type of value provided by the descriptive element. See https://github.com/sul-dlss/cocina-models/blob/main/docs/description_types.md for valid types.",
1480
- "type": "string"
1481
- },
1482
- "status": {
1483
- "description": "Status of the descriptive element value relative to other instances of the element.",
1484
- "type": "string"
1485
- },
1486
- "code": {
1487
- "description": "Code value of the descriptive element.",
1488
- "type": "string"
1489
- },
1490
- "uri": {
1491
- "description": "URI value of the descriptive element.",
1492
- "type": "string"
1493
- },
1494
- "standard": {
1495
- "$ref": "#/$defs/Standard"
1496
- },
1497
- "encoding": {
1498
- "$ref": "#/$defs/Standard"
1499
- },
1500
- "source": {
1501
- "$ref": "#/$defs/Source"
1502
- },
1503
- "displayLabel": {
1504
- "description": "The preferred display label to use for the descriptive element in access systems.",
1505
- "type": [
1506
- "string",
1507
- "null"
1508
- ]
1509
- },
1510
- "qualifier": {
1511
- "description": "A term providing information about the circumstances of the statement (e.g., approximate dates).",
1512
- "type": "string"
1513
- },
1514
- "note": {
1515
- "description": "Other information related to the descriptive element.",
1392
+ "appliesTo": {
1516
1393
  "type": "array",
1517
1394
  "items": {
1518
- "$ref": "#/$defs/DescriptiveValue"
1395
+ "$ref": "#/$defs/AppliesTo"
1519
1396
  }
1520
1397
  },
1521
- "valueLanguage": {
1522
- "$ref": "#/$defs/DescriptiveValueLanguage"
1523
- },
1524
- "valueAt": {
1525
- "description": "URL or other pointer to the location of the value of the descriptive element.",
1526
- "type": "string"
1398
+ "identifier": {
1399
+ "description": "Identifiers and URIs associated with the descriptive element.",
1400
+ "type": "array",
1401
+ "items": {
1402
+ "$ref": "#/$defs/DescriptiveIdentifier"
1403
+ }
1527
1404
  }
1528
1405
  }
1529
1406
  }
@@ -2012,7 +1889,7 @@
2012
1889
  "appliesTo": {
2013
1890
  "type": "array",
2014
1891
  "items": {
2015
- "$ref": "#/$defs/DescriptiveBasicValue"
1892
+ "$ref": "#/$defs/AppliesTo"
2016
1893
  }
2017
1894
  },
2018
1895
  "code": {
@@ -2502,13 +2379,6 @@
2502
2379
  "access": {
2503
2380
  "$ref": "#/$defs/DescriptiveAccessMetadata"
2504
2381
  },
2505
- "relatedResource": {
2506
- "description": "Other resources associated with the related resource.",
2507
- "type": "array",
2508
- "items": {
2509
- "$ref": "#/$defs/RelatedResource"
2510
- }
2511
- },
2512
2382
  "adminMetadata": {
2513
2383
  "$ref": "#/$defs/DescriptiveAdminMetadata"
2514
2384
  },
@@ -2676,9 +2546,21 @@
2676
2546
  "required": [
2677
2547
  "cocinaVersion",
2678
2548
  "administrative",
2549
+ "description",
2679
2550
  "type",
2680
2551
  "version"
2681
2552
  ],
2553
+ "allOf": [
2554
+ {
2555
+ "properties": {
2556
+ "description": {
2557
+ "required": [
2558
+ "title"
2559
+ ]
2560
+ }
2561
+ }
2562
+ }
2563
+ ],
2682
2564
  "unevaluatedProperties": false
2683
2565
  },
2684
2566
  "RequestAdministrative": {
@@ -2746,6 +2628,47 @@
2746
2628
  "type",
2747
2629
  "version"
2748
2630
  ],
2631
+ "anyOf": [
2632
+ {
2633
+ "required": [
2634
+ "description"
2635
+ ],
2636
+ "properties": {
2637
+ "description": {
2638
+ "required": [
2639
+ "title"
2640
+ ]
2641
+ }
2642
+ }
2643
+ },
2644
+ {
2645
+ "required": [
2646
+ "identification"
2647
+ ],
2648
+ "properties": {
2649
+ "identification": {
2650
+ "required": [
2651
+ "catalogLinks"
2652
+ ],
2653
+ "properties": {
2654
+ "catalogLinks": {
2655
+ "contains": {
2656
+ "type": "object",
2657
+ "required": [
2658
+ "refresh"
2659
+ ],
2660
+ "properties": {
2661
+ "refresh": {
2662
+ "const": true
2663
+ }
2664
+ }
2665
+ }
2666
+ }
2667
+ }
2668
+ }
2669
+ }
2670
+ }
2671
+ ],
2749
2672
  "unevaluatedProperties": false
2750
2673
  },
2751
2674
  "RequestDRO": {
@@ -2812,6 +2735,47 @@
2812
2735
  "type",
2813
2736
  "version"
2814
2737
  ],
2738
+ "anyOf": [
2739
+ {
2740
+ "required": [
2741
+ "description"
2742
+ ],
2743
+ "properties": {
2744
+ "description": {
2745
+ "required": [
2746
+ "title"
2747
+ ]
2748
+ }
2749
+ }
2750
+ },
2751
+ {
2752
+ "required": [
2753
+ "identification"
2754
+ ],
2755
+ "properties": {
2756
+ "identification": {
2757
+ "required": [
2758
+ "catalogLinks"
2759
+ ],
2760
+ "properties": {
2761
+ "catalogLinks": {
2762
+ "contains": {
2763
+ "type": "object",
2764
+ "required": [
2765
+ "refresh"
2766
+ ],
2767
+ "properties": {
2768
+ "refresh": {
2769
+ "const": true
2770
+ }
2771
+ }
2772
+ }
2773
+ }
2774
+ }
2775
+ }
2776
+ }
2777
+ }
2778
+ ],
2815
2779
  "unevaluatedProperties": false
2816
2780
  },
2817
2781
  "RequestDROStructural": {
@@ -2933,9 +2897,6 @@
2933
2897
  "type": "string"
2934
2898
  }
2935
2899
  },
2936
- "required": [
2937
- "title"
2938
- ],
2939
2900
  "unevaluatedProperties": false
2940
2901
  },
2941
2902
  "RequestFile": {
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cocina-models
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.127.0
4
+ version: 0.129.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justin Coyne
@@ -326,6 +326,7 @@ files:
326
326
  - docs/cocina-base.jsonld
327
327
  - docs/description_types.md
328
328
  - exe/generator
329
+ - form_source_codes.yml
329
330
  - identifier_source_codes.yml
330
331
  - iso15924_codes.yml
331
332
  - language_uri_iso639_2_codes.yml
@@ -485,6 +486,7 @@ files:
485
486
  - lib/cocina/models/validators/description_date_time_visitor_validator.rb
486
487
  - lib/cocina/models/validators/description_event_date_visitor_validator.rb
487
488
  - lib/cocina/models/validators/description_form_resource_type_visitor_validator.rb
489
+ - lib/cocina/models/validators/description_form_source_code_visitor_validator.rb
488
490
  - lib/cocina/models/validators/description_identifier_source_code_visitor_validator.rb
489
491
  - lib/cocina/models/validators/description_language_code_visitor_validator.rb
490
492
  - lib/cocina/models/validators/description_language_uri_visitor_validator.rb