cocina-models 0.122.0 → 0.124.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
@@ -1020,6 +1020,56 @@
1020
1020
  }
1021
1021
  }
1022
1022
  },
1023
+ "anyOf": [
1024
+ {
1025
+ "properties": {
1026
+ "contributor": {
1027
+ "minItems": 1
1028
+ }
1029
+ },
1030
+ "required": ["contributor"]
1031
+ },
1032
+ {
1033
+ "properties": {
1034
+ "event": {
1035
+ "minItems": 1
1036
+ }
1037
+ },
1038
+ "required": ["event"]
1039
+ },
1040
+ {
1041
+ "properties": {
1042
+ "language": {
1043
+ "minItems": 1
1044
+ }
1045
+ },
1046
+ "required": ["language"]
1047
+ },
1048
+ {
1049
+ "properties": {
1050
+ "note": {
1051
+ "minItems": 1
1052
+ }
1053
+ },
1054
+ "required": ["note"]
1055
+ },
1056
+ {
1057
+ "properties": {
1058
+ "metadataStandard": {
1059
+ "minItems": 1
1060
+ }
1061
+ },
1062
+ "required": ["metadataStandard"]
1063
+ },
1064
+ {
1065
+ "properties": {
1066
+ "identifier": {
1067
+ "minItems": 1
1068
+ }
1069
+ },
1070
+ "required": ["identifier"]
1071
+ }
1072
+ ],
1023
1073
  "unevaluatedProperties": false
1024
1074
  },
1025
1075
  "DescriptiveBasicValue": {
@@ -1145,7 +1195,7 @@
1145
1195
  "required": ["parallelValue"],
1146
1196
  "properties": {
1147
1197
  "parallelValue": {
1148
- "minItems": 1
1198
+ "minItems": 2
1149
1199
  }
1150
1200
  }
1151
1201
  },
@@ -1153,7 +1203,7 @@
1153
1203
  "required": ["groupedValue"],
1154
1204
  "properties": {
1155
1205
  "groupedValue": {
1156
- "minItems": 1
1206
+ "minItems": 2
1157
1207
  }
1158
1208
  }
1159
1209
  }
@@ -1423,7 +1473,25 @@
1423
1473
  "$ref": "#/$defs/Source"
1424
1474
  },
1425
1475
  "valueScript": {
1426
- "$ref": "#/$defs/Standard"
1476
+ "allOf": [
1477
+ {
1478
+ "$ref": "#/$defs/Standard"
1479
+ },
1480
+ {
1481
+ "type": "object",
1482
+ "properties": {
1483
+ "source": {
1484
+ "type": "object",
1485
+ "properties": {
1486
+ "code": {
1487
+ "type": "string",
1488
+ "pattern": "^[iI][sS][oO]15924$"
1489
+ }
1490
+ }
1491
+ }
1492
+ }
1493
+ }
1494
+ ]
1427
1495
  }
1428
1496
  },
1429
1497
  "description": "Language of the descriptive element value",
@@ -1608,7 +1676,7 @@
1608
1676
  "filename": {
1609
1677
  "description": "Filename for a file. Can be same as label.",
1610
1678
  "type": "string",
1611
- "not": { "pattern": "[\\n\\r]" }
1679
+ "not": { "pattern": "[\\n\\r]| $" }
1612
1680
  },
1613
1681
  "size": {
1614
1682
  "description": "Size of the File (binary) in bytes.",
@@ -1918,7 +1986,25 @@
1918
1986
  "description": "present for mapping to additional schemas in the future and for consistency but not otherwise used"
1919
1987
  },
1920
1988
  "script": {
1921
- "$ref": "#/$defs/DescriptiveValue"
1989
+ "allOf": [
1990
+ {
1991
+ "$ref": "#/$defs/DescriptiveValue"
1992
+ },
1993
+ {
1994
+ "type": "object",
1995
+ "properties": {
1996
+ "source": {
1997
+ "type": "object",
1998
+ "properties": {
1999
+ "code": {
2000
+ "type": "string",
2001
+ "pattern": "^[iI][sS][oO]15924$"
2002
+ }
2003
+ }
2004
+ }
2005
+ }
2006
+ }
2007
+ ]
1922
2008
  },
1923
2009
  "source": {
1924
2010
  "$ref": "#/$defs/Source"
@@ -1998,7 +2084,7 @@
1998
2084
  "required": ["parallelValue"],
1999
2085
  "properties": {
2000
2086
  "parallelValue": {
2001
- "minItems": 1
2087
+ "minItems": 2
2002
2088
  }
2003
2089
  }
2004
2090
  },
@@ -2006,7 +2092,7 @@
2006
2092
  "required": ["groupedValue"],
2007
2093
  "properties": {
2008
2094
  "groupedValue": {
2009
- "minItems": 1
2095
+ "minItems": 2
2010
2096
  }
2011
2097
  }
2012
2098
  }
@@ -2815,7 +2901,7 @@
2815
2901
  },
2816
2902
  "filename": {
2817
2903
  "type": "string",
2818
- "not": { "pattern": "[\\n\\r]" }
2904
+ "not": { "pattern": "[\\n\\r]| $" }
2819
2905
  },
2820
2906
  "size": {
2821
2907
  "type": "integer"
@@ -2995,6 +3081,17 @@
2995
3081
  "type": "string"
2996
3082
  }
2997
3083
  },
3084
+ "anyOf": [
3085
+ { "required": ["value"] },
3086
+ { "required": ["code"] },
3087
+ { "required": ["uri"] },
3088
+ {
3089
+ "required": ["note"],
3090
+ "properties": {
3091
+ "note": { "minItems": 1 }
3092
+ }
3093
+ }
3094
+ ],
2998
3095
  "unevaluatedProperties": false
2999
3096
  },
3000
3097
  "SourceId": {
@@ -3034,6 +3131,17 @@
3034
3131
  "$ref": "#/$defs/Source"
3035
3132
  }
3036
3133
  },
3134
+ "anyOf": [
3135
+ { "required": ["value"] },
3136
+ { "required": ["code"] },
3137
+ { "required": ["uri"] },
3138
+ {
3139
+ "required": ["note"],
3140
+ "properties": {
3141
+ "note": { "minItems": 1 }
3142
+ }
3143
+ }
3144
+ ],
3037
3145
  "unevaluatedProperties": false
3038
3146
  },
3039
3147
  "StandardBarcode": {
@@ -0,0 +1,8 @@
1
+ # Codes from https://www.loc.gov/standards/sourcelist/date-time.html
2
+ - edtf
3
+ - iso8601
4
+ - marc
5
+ - temper
6
+ - w3cdtf
7
+ # Codes from https://www.loc.gov/standards/sourcelist/temporal.html
8
+ - periodo
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.122.0
4
+ version: 0.124.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justin Coyne
@@ -23,6 +23,20 @@ dependencies:
23
23
  - - ">="
24
24
  - !ruby/object:Gem::Version
25
25
  version: '0'
26
+ - !ruby/object:Gem::Dependency
27
+ name: cocina_display
28
+ requirement: !ruby/object:Gem::Requirement
29
+ requirements:
30
+ - - ">="
31
+ - !ruby/object:Gem::Version
32
+ version: '0'
33
+ type: :runtime
34
+ prerelease: false
35
+ version_requirements: !ruby/object:Gem::Requirement
36
+ requirements:
37
+ - - ">="
38
+ - !ruby/object:Gem::Version
39
+ version: '0'
26
40
  - !ruby/object:Gem::Dependency
27
41
  name: deprecation
28
42
  requirement: !ruby/object:Gem::Requirement
@@ -312,6 +326,7 @@ files:
312
326
  - docs/cocina-base.jsonld
313
327
  - docs/description_types.md
314
328
  - exe/generator
329
+ - identifier_source_codes.yml
315
330
  - lib/cocina/generator.rb
316
331
  - lib/cocina/generator/datatype.rb
317
332
  - lib/cocina/generator/generator.rb
@@ -464,10 +479,18 @@ files:
464
479
  - lib/cocina/models/validators/composite_structural_validator.rb
465
480
  - lib/cocina/models/validators/dark_visitor_validator.rb
466
481
  - lib/cocina/models/validators/description_date_time_visitor_validator.rb
482
+ - lib/cocina/models/validators/description_event_date_visitor_validator.rb
483
+ - lib/cocina/models/validators/description_form_resource_type_visitor_validator.rb
484
+ - lib/cocina/models/validators/description_identifier_source_code_visitor_validator.rb
485
+ - lib/cocina/models/validators/description_location_source_code_visitor_validator.rb
486
+ - lib/cocina/models/validators/description_role_source_code_visitor_validator.rb
487
+ - lib/cocina/models/validators/description_subject_temporal_encoding_visitor_validator.rb
467
488
  - lib/cocina/models/validators/description_types_visitor_validator.rb
468
489
  - lib/cocina/models/validators/description_values_visitor_validator.rb
469
490
  - lib/cocina/models/validators/json_schema_validator.rb
470
491
  - lib/cocina/models/validators/language_tag_visitor_validator.rb
492
+ - lib/cocina/models/validators/marc_date_validator.rb
493
+ - lib/cocina/models/validators/marc_relator_role_validator.rb
471
494
  - lib/cocina/models/validators/purl_validator.rb
472
495
  - lib/cocina/models/validators/reserved_filename_visitor_validator.rb
473
496
  - lib/cocina/models/validators/validator.rb
@@ -478,7 +501,10 @@ files:
478
501
  - lib/cocina/rspec.rb
479
502
  - lib/cocina/rspec/factories.rb
480
503
  - lib/cocina/rspec/matchers.rb
504
+ - location_source_codes.yml
505
+ - resource_type_values.yml
481
506
  - schema.json
507
+ - temporal_subject_encoding_codes.yml
482
508
  homepage: https://github.com/sul-dlss/cocina-models
483
509
  licenses: []
484
510
  metadata: