cocina-models 0.62.0 → 0.64.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.circleci/config.yml +9 -48
- data/.rubocop.yml +116 -1
- data/.rubocop_todo.yml +5 -4
- data/Gemfile +1 -0
- data/README.md +19 -6
- data/cocina-models.gemspec +6 -4
- data/docs/maps/Collection.json +0 -5
- data/docs/maps/DRO.json +0 -5
- data/lib/cocina/generator/schema_array.rb +1 -9
- data/lib/cocina/generator/schema_value.rb +4 -0
- data/lib/cocina/models/admin_policy.rb +3 -0
- data/lib/cocina/models/admin_policy_administrative.rb +5 -3
- data/lib/cocina/models/administrative.rb +1 -1
- data/lib/cocina/models/applies_to.rb +1 -1
- data/lib/cocina/models/cocina_version.rb +9 -0
- data/lib/cocina/models/collection.rb +3 -0
- data/lib/cocina/models/collection_identification.rb +1 -1
- data/lib/cocina/models/contributor.rb +5 -5
- data/lib/cocina/models/description.rb +12 -12
- data/lib/cocina/models/descriptive_access_metadata.rb +6 -6
- data/lib/cocina/models/descriptive_admin_metadata.rb +6 -6
- data/lib/cocina/models/descriptive_basic_value.rb +5 -5
- data/lib/cocina/models/descriptive_geographic_metadata.rb +2 -2
- data/lib/cocina/models/descriptive_grouped_value.rb +1 -1
- data/lib/cocina/models/descriptive_parallel_contributor.rb +4 -4
- data/lib/cocina/models/descriptive_parallel_event.rb +6 -6
- data/lib/cocina/models/descriptive_parallel_value.rb +1 -1
- data/lib/cocina/models/descriptive_structured_value.rb +1 -1
- data/lib/cocina/models/descriptive_value.rb +6 -6
- data/lib/cocina/models/descriptive_value_language.rb +1 -1
- data/lib/cocina/models/dro.rb +3 -0
- data/lib/cocina/models/dro_structural.rb +3 -5
- data/lib/cocina/models/event.rb +7 -7
- data/lib/cocina/models/file_set_structural.rb +1 -1
- data/lib/cocina/models/identification.rb +2 -2
- data/lib/cocina/models/language.rb +5 -5
- data/lib/cocina/models/related_resource.rb +9 -9
- data/lib/cocina/models/request_admin_policy.rb +4 -1
- data/lib/cocina/models/request_collection.rb +4 -1
- data/lib/cocina/models/request_description.rb +28 -0
- data/lib/cocina/models/request_dro.rb +4 -1
- data/lib/cocina/models/request_dro_structural.rb +3 -4
- data/lib/cocina/models/request_file_set_structural.rb +1 -1
- data/lib/cocina/models/request_identification.rb +1 -1
- data/lib/cocina/models/sequence.rb +1 -1
- data/lib/cocina/models/source.rb +1 -1
- data/lib/cocina/models/standard.rb +1 -1
- data/lib/cocina/models/title.rb +6 -6
- data/lib/cocina/models/validator.rb +21 -1
- data/lib/cocina/models/version.rb +1 -1
- data/lib/cocina/models.rb +1 -0
- data/openapi.yml +123 -79
- metadata +30 -13
data/openapi.yml
CHANGED
@@ -91,6 +91,18 @@ paths:
|
|
91
91
|
responses:
|
92
92
|
'200':
|
93
93
|
description: noop
|
94
|
+
/validate/RequestDescription:
|
95
|
+
post:
|
96
|
+
summary: Validate a Request Description
|
97
|
+
requestBody:
|
98
|
+
required: true
|
99
|
+
content:
|
100
|
+
application/json:
|
101
|
+
schema:
|
102
|
+
$ref: '#/components/schemas/RequestDescription'
|
103
|
+
responses:
|
104
|
+
'200':
|
105
|
+
description: noop
|
94
106
|
components:
|
95
107
|
schemas:
|
96
108
|
Access:
|
@@ -172,6 +184,8 @@ components:
|
|
172
184
|
type: object
|
173
185
|
additionalProperties: false
|
174
186
|
properties:
|
187
|
+
cocinaVersion:
|
188
|
+
$ref: '#/components/schemas/CocinaVersion'
|
175
189
|
type:
|
176
190
|
type: string
|
177
191
|
enum:
|
@@ -187,6 +201,7 @@ components:
|
|
187
201
|
description:
|
188
202
|
$ref: '#/components/schemas/Description'
|
189
203
|
required:
|
204
|
+
- cocinaVersion
|
190
205
|
- administrative
|
191
206
|
- externalIdentifier
|
192
207
|
- label
|
@@ -220,6 +235,8 @@ components:
|
|
220
235
|
type: string
|
221
236
|
hasAdminPolicy:
|
222
237
|
$ref: '#/components/schemas/Druid'
|
238
|
+
hasAgreement:
|
239
|
+
$ref: '#/components/schemas/Druid'
|
223
240
|
referencesAgreement:
|
224
241
|
$ref: '#/components/schemas/Druid'
|
225
242
|
roles:
|
@@ -229,6 +246,7 @@ components:
|
|
229
246
|
$ref: '#/components/schemas/AccessRole'
|
230
247
|
required:
|
231
248
|
- hasAdminPolicy
|
249
|
+
- hasAgreement
|
232
250
|
AdminPolicyDefaultAccess:
|
233
251
|
description: 'Provides the default access settings for an AdminPolicy. This is almost the same as DROAccess, but it provides no defaults and has no embargo.'
|
234
252
|
type: object
|
@@ -360,11 +378,18 @@ components:
|
|
360
378
|
required:
|
361
379
|
- access
|
362
380
|
- download
|
381
|
+
CocinaVersion:
|
382
|
+
description: The version of Cocina with which this object conforms.
|
383
|
+
type: string
|
384
|
+
pattern: '^\d+\.\d+\.\d+$'
|
385
|
+
example: '1.2.3'
|
363
386
|
Collection:
|
364
387
|
description: A group of Digital Repository Objects that indicate some type of conceptual grouping within the domain that is worth reusing across the system.
|
365
388
|
type: object
|
366
389
|
additionalProperties: false
|
367
390
|
properties:
|
391
|
+
cocinaVersion:
|
392
|
+
$ref: '#/components/schemas/CocinaVersion'
|
368
393
|
type:
|
369
394
|
description: The content type of the Collection. Selected from an established set of values.
|
370
395
|
type: string
|
@@ -391,6 +416,7 @@ components:
|
|
391
416
|
identification:
|
392
417
|
$ref: '#/components/schemas/CollectionIdentification'
|
393
418
|
required:
|
419
|
+
- cocinaVersion
|
394
420
|
- externalIdentifier
|
395
421
|
- label
|
396
422
|
- type
|
@@ -529,77 +555,15 @@ components:
|
|
529
555
|
Description:
|
530
556
|
type: object
|
531
557
|
additionalProperties: false
|
532
|
-
|
533
|
-
|
534
|
-
|
535
|
-
|
536
|
-
|
537
|
-
|
538
|
-
|
539
|
-
|
540
|
-
|
541
|
-
resource.
|
542
|
-
type: array
|
543
|
-
items:
|
544
|
-
$ref: "#/components/schemas/Contributor"
|
545
|
-
event:
|
546
|
-
description: Events in the history of the resource.
|
547
|
-
type: array
|
548
|
-
items:
|
549
|
-
$ref: "#/components/schemas/Event"
|
550
|
-
form:
|
551
|
-
description: Characteristics of the resource's physical, digital, and intellectual
|
552
|
-
form and genre, and of its process of creation.
|
553
|
-
type: array
|
554
|
-
items:
|
555
|
-
$ref: "#/components/schemas/DescriptiveValue"
|
556
|
-
geographic:
|
557
|
-
description: Geographic description for items with coordinates or bounding boxes.
|
558
|
-
type: array
|
559
|
-
items:
|
560
|
-
$ref: "#/components/schemas/DescriptiveGeographicMetadata"
|
561
|
-
language:
|
562
|
-
description: Languages, scripts, symbolic systems, and notations used in all or
|
563
|
-
part of a resource.
|
564
|
-
type: array
|
565
|
-
items:
|
566
|
-
$ref: "#/components/schemas/Language"
|
567
|
-
note:
|
568
|
-
description: Additional information relevant to a resource.
|
569
|
-
type: array
|
570
|
-
items:
|
571
|
-
$ref: "#/components/schemas/DescriptiveValue"
|
572
|
-
identifier:
|
573
|
-
description: Identifiers and URIs associated with the resource.
|
574
|
-
type: array
|
575
|
-
items:
|
576
|
-
$ref: "#/components/schemas/DescriptiveValue"
|
577
|
-
subject:
|
578
|
-
description: Terms associated with the intellectual content of the resource.
|
579
|
-
type: array
|
580
|
-
items:
|
581
|
-
$ref: "#/components/schemas/DescriptiveValue"
|
582
|
-
purl:
|
583
|
-
$ref: "#/components/schemas/Purl"
|
584
|
-
access:
|
585
|
-
$ref: "#/components/schemas/DescriptiveAccessMetadata"
|
586
|
-
relatedResource:
|
587
|
-
description: Other resources associated with the described resource.
|
588
|
-
type: array
|
589
|
-
items:
|
590
|
-
$ref: "#/components/schemas/RelatedResource"
|
591
|
-
marcEncodedData:
|
592
|
-
description: Data about the resource represented in MARC fixed fields and codes.
|
593
|
-
type: array
|
594
|
-
items:
|
595
|
-
$ref: "#/components/schemas/DescriptiveValue"
|
596
|
-
adminMetadata:
|
597
|
-
$ref: "#/components/schemas/DescriptiveAdminMetadata"
|
598
|
-
valueAt:
|
599
|
-
description: URL or other pointer to the location of the resource description.
|
600
|
-
type: string
|
601
|
-
required:
|
602
|
-
- title
|
558
|
+
allOf:
|
559
|
+
- $ref: "#/components/schemas/RequestDescription"
|
560
|
+
- type: object
|
561
|
+
additionalProperties: false
|
562
|
+
properties:
|
563
|
+
purl:
|
564
|
+
$ref: "#/components/schemas/Purl"
|
565
|
+
required:
|
566
|
+
- purl
|
603
567
|
DescriptiveAccessMetadata:
|
604
568
|
description: Information about how to access digital and physical versions of the object.
|
605
569
|
type: object
|
@@ -886,6 +850,8 @@ components:
|
|
886
850
|
type: object
|
887
851
|
additionalProperties: false
|
888
852
|
properties:
|
853
|
+
cocinaVersion:
|
854
|
+
$ref: '#/components/schemas/CocinaVersion'
|
889
855
|
type:
|
890
856
|
description: The content type of the DRO. Selected from an established set of values.
|
891
857
|
type: string
|
@@ -926,6 +892,7 @@ components:
|
|
926
892
|
geographic:
|
927
893
|
$ref: '#/components/schemas/Geographic'
|
928
894
|
required:
|
895
|
+
- cocinaVersion
|
929
896
|
- access
|
930
897
|
- administrative
|
931
898
|
- externalIdentifier
|
@@ -1004,9 +971,6 @@ components:
|
|
1004
971
|
type: array
|
1005
972
|
items:
|
1006
973
|
$ref: '#/components/schemas/Druid'
|
1007
|
-
hasAgreement:
|
1008
|
-
description: Agreement that covers the deposit of the DRO into SDR.
|
1009
|
-
type: string
|
1010
974
|
Druid:
|
1011
975
|
type: string
|
1012
976
|
pattern: '^druid:[b-df-hjkmnp-tv-z]{2}[0-9]{3}[b-df-hjkmnp-tv-z]{2}[0-9]{4}$'
|
@@ -1508,6 +1472,8 @@ components:
|
|
1508
1472
|
type: object
|
1509
1473
|
additionalProperties: false
|
1510
1474
|
properties:
|
1475
|
+
cocinaVersion:
|
1476
|
+
$ref: '#/components/schemas/CocinaVersion'
|
1511
1477
|
type:
|
1512
1478
|
type: string
|
1513
1479
|
enum:
|
@@ -1519,8 +1485,9 @@ components:
|
|
1519
1485
|
administrative:
|
1520
1486
|
$ref: '#/components/schemas/AdminPolicyAdministrative'
|
1521
1487
|
description:
|
1522
|
-
$ref: '#/components/schemas/
|
1488
|
+
$ref: '#/components/schemas/RequestDescription'
|
1523
1489
|
required:
|
1490
|
+
- cocinaVersion
|
1524
1491
|
- administrative
|
1525
1492
|
- label
|
1526
1493
|
- type
|
@@ -1530,6 +1497,8 @@ components:
|
|
1530
1497
|
type: object
|
1531
1498
|
additionalProperties: false
|
1532
1499
|
properties:
|
1500
|
+
cocinaVersion:
|
1501
|
+
$ref: '#/components/schemas/CocinaVersion'
|
1533
1502
|
type:
|
1534
1503
|
type: string
|
1535
1504
|
enum:
|
@@ -1547,20 +1516,96 @@ components:
|
|
1547
1516
|
administrative:
|
1548
1517
|
$ref: '#/components/schemas/Administrative'
|
1549
1518
|
description:
|
1550
|
-
$ref: '#/components/schemas/
|
1519
|
+
$ref: '#/components/schemas/RequestDescription'
|
1551
1520
|
identification:
|
1552
1521
|
$ref: '#/components/schemas/CollectionIdentification'
|
1553
1522
|
required:
|
1523
|
+
- cocinaVersion
|
1554
1524
|
- access
|
1555
1525
|
- administrative
|
1556
1526
|
- label
|
1557
1527
|
- type
|
1558
1528
|
- version
|
1529
|
+
RequestDescription:
|
1530
|
+
description: Description that is included in a request to create a DRO. This is the same as a Description, except excludes PURL.
|
1531
|
+
type: object
|
1532
|
+
additionalProperties: false
|
1533
|
+
properties:
|
1534
|
+
title:
|
1535
|
+
description: Titles of the resource.
|
1536
|
+
type: array
|
1537
|
+
minItems: 1
|
1538
|
+
items:
|
1539
|
+
$ref: "#/components/schemas/Title"
|
1540
|
+
contributor:
|
1541
|
+
description: Agents contributing in some way to the creation and history of the
|
1542
|
+
resource.
|
1543
|
+
type: array
|
1544
|
+
items:
|
1545
|
+
$ref: "#/components/schemas/Contributor"
|
1546
|
+
event:
|
1547
|
+
description: Events in the history of the resource.
|
1548
|
+
type: array
|
1549
|
+
items:
|
1550
|
+
$ref: "#/components/schemas/Event"
|
1551
|
+
form:
|
1552
|
+
description: Characteristics of the resource's physical, digital, and intellectual
|
1553
|
+
form and genre, and of its process of creation.
|
1554
|
+
type: array
|
1555
|
+
items:
|
1556
|
+
$ref: "#/components/schemas/DescriptiveValue"
|
1557
|
+
geographic:
|
1558
|
+
description: Geographic description for items with coordinates or bounding boxes.
|
1559
|
+
type: array
|
1560
|
+
items:
|
1561
|
+
$ref: "#/components/schemas/DescriptiveGeographicMetadata"
|
1562
|
+
language:
|
1563
|
+
description: Languages, scripts, symbolic systems, and notations used in all or
|
1564
|
+
part of a resource.
|
1565
|
+
type: array
|
1566
|
+
items:
|
1567
|
+
$ref: "#/components/schemas/Language"
|
1568
|
+
note:
|
1569
|
+
description: Additional information relevant to a resource.
|
1570
|
+
type: array
|
1571
|
+
items:
|
1572
|
+
$ref: "#/components/schemas/DescriptiveValue"
|
1573
|
+
identifier:
|
1574
|
+
description: Identifiers and URIs associated with the resource.
|
1575
|
+
type: array
|
1576
|
+
items:
|
1577
|
+
$ref: "#/components/schemas/DescriptiveValue"
|
1578
|
+
subject:
|
1579
|
+
description: Terms associated with the intellectual content of the resource.
|
1580
|
+
type: array
|
1581
|
+
items:
|
1582
|
+
$ref: "#/components/schemas/DescriptiveValue"
|
1583
|
+
access:
|
1584
|
+
$ref: "#/components/schemas/DescriptiveAccessMetadata"
|
1585
|
+
relatedResource:
|
1586
|
+
description: Other resources associated with the described resource.
|
1587
|
+
type: array
|
1588
|
+
items:
|
1589
|
+
$ref: "#/components/schemas/RelatedResource"
|
1590
|
+
marcEncodedData:
|
1591
|
+
description: Data about the resource represented in MARC fixed fields and codes.
|
1592
|
+
type: array
|
1593
|
+
items:
|
1594
|
+
$ref: "#/components/schemas/DescriptiveValue"
|
1595
|
+
adminMetadata:
|
1596
|
+
$ref: "#/components/schemas/DescriptiveAdminMetadata"
|
1597
|
+
valueAt:
|
1598
|
+
description: URL or other pointer to the location of the resource description.
|
1599
|
+
type: string
|
1600
|
+
required:
|
1601
|
+
- title
|
1559
1602
|
RequestDRO:
|
1560
1603
|
description: A request to create a DRO. This has the same general structure as a DRO but doesn't have externalIdentifier and doesn't require the access subschema. If no access subschema is provided, these values will be inherited from the AdminPolicy.
|
1561
1604
|
type: object
|
1562
1605
|
additionalProperties: false
|
1563
1606
|
properties:
|
1607
|
+
cocinaVersion:
|
1608
|
+
$ref: '#/components/schemas/CocinaVersion'
|
1564
1609
|
type:
|
1565
1610
|
type: string
|
1566
1611
|
enum:
|
@@ -1588,7 +1633,7 @@ components:
|
|
1588
1633
|
administrative:
|
1589
1634
|
$ref: '#/components/schemas/Administrative'
|
1590
1635
|
description:
|
1591
|
-
$ref: '#/components/schemas/
|
1636
|
+
$ref: '#/components/schemas/RequestDescription'
|
1592
1637
|
identification:
|
1593
1638
|
$ref: '#/components/schemas/RequestIdentification'
|
1594
1639
|
structural:
|
@@ -1596,6 +1641,7 @@ components:
|
|
1596
1641
|
geographic:
|
1597
1642
|
$ref: '#/components/schemas/Geographic'
|
1598
1643
|
required:
|
1644
|
+
- cocinaVersion
|
1599
1645
|
- administrative
|
1600
1646
|
- identification
|
1601
1647
|
- label
|
@@ -1619,8 +1665,6 @@ components:
|
|
1619
1665
|
type: array
|
1620
1666
|
items:
|
1621
1667
|
$ref: '#/components/schemas/Druid'
|
1622
|
-
hasAgreement:
|
1623
|
-
type: string
|
1624
1668
|
RequestFile:
|
1625
1669
|
type: object
|
1626
1670
|
additionalProperties: false
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cocina-models
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.64.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Justin Coyne
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-01-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -170,42 +170,56 @@ dependencies:
|
|
170
170
|
requirements:
|
171
171
|
- - "~>"
|
172
172
|
- !ruby/object:Gem::Version
|
173
|
-
version: '
|
173
|
+
version: '1.24'
|
174
174
|
type: :development
|
175
175
|
prerelease: false
|
176
176
|
version_requirements: !ruby/object:Gem::Requirement
|
177
177
|
requirements:
|
178
178
|
- - "~>"
|
179
179
|
- !ruby/object:Gem::Version
|
180
|
-
version: '
|
180
|
+
version: '1.24'
|
181
|
+
- !ruby/object:Gem::Dependency
|
182
|
+
name: rubocop-rake
|
183
|
+
requirement: !ruby/object:Gem::Requirement
|
184
|
+
requirements:
|
185
|
+
- - ">="
|
186
|
+
- !ruby/object:Gem::Version
|
187
|
+
version: '0'
|
188
|
+
type: :development
|
189
|
+
prerelease: false
|
190
|
+
version_requirements: !ruby/object:Gem::Requirement
|
191
|
+
requirements:
|
192
|
+
- - ">="
|
193
|
+
- !ruby/object:Gem::Version
|
194
|
+
version: '0'
|
181
195
|
- !ruby/object:Gem::Dependency
|
182
196
|
name: rubocop-rspec
|
183
197
|
requirement: !ruby/object:Gem::Requirement
|
184
198
|
requirements:
|
185
199
|
- - "~>"
|
186
200
|
- !ruby/object:Gem::Version
|
187
|
-
version: '1
|
201
|
+
version: '2.1'
|
188
202
|
type: :development
|
189
203
|
prerelease: false
|
190
204
|
version_requirements: !ruby/object:Gem::Requirement
|
191
205
|
requirements:
|
192
206
|
- - "~>"
|
193
207
|
- !ruby/object:Gem::Version
|
194
|
-
version: '1
|
208
|
+
version: '2.1'
|
195
209
|
- !ruby/object:Gem::Dependency
|
196
210
|
name: simplecov
|
197
211
|
requirement: !ruby/object:Gem::Requirement
|
198
212
|
requirements:
|
199
|
-
- - "
|
213
|
+
- - ">="
|
200
214
|
- !ruby/object:Gem::Version
|
201
|
-
version: 0
|
215
|
+
version: '0'
|
202
216
|
type: :development
|
203
217
|
prerelease: false
|
204
218
|
version_requirements: !ruby/object:Gem::Requirement
|
205
219
|
requirements:
|
206
|
-
- - "
|
220
|
+
- - ">="
|
207
221
|
- !ruby/object:Gem::Version
|
208
|
-
version: 0
|
222
|
+
version: '0'
|
209
223
|
description: SDR data models that can be validated
|
210
224
|
email:
|
211
225
|
- jcoyne@justincoyne.com
|
@@ -266,6 +280,7 @@ files:
|
|
266
280
|
- lib/cocina/models/catkey_barcode.rb
|
267
281
|
- lib/cocina/models/checkable.rb
|
268
282
|
- lib/cocina/models/citation_only_access.rb
|
283
|
+
- lib/cocina/models/cocina_version.rb
|
269
284
|
- lib/cocina/models/collection.rb
|
270
285
|
- lib/cocina/models/collection_access.rb
|
271
286
|
- lib/cocina/models/collection_identification.rb
|
@@ -309,6 +324,7 @@ files:
|
|
309
324
|
- lib/cocina/models/release_tag.rb
|
310
325
|
- lib/cocina/models/request_admin_policy.rb
|
311
326
|
- lib/cocina/models/request_collection.rb
|
327
|
+
- lib/cocina/models/request_description.rb
|
312
328
|
- lib/cocina/models/request_dro.rb
|
313
329
|
- lib/cocina/models/request_dro_structural.rb
|
314
330
|
- lib/cocina/models/request_file.rb
|
@@ -329,7 +345,8 @@ files:
|
|
329
345
|
- openapi.yml
|
330
346
|
homepage: https://github.com/sul-dlss/cocina-models
|
331
347
|
licenses: []
|
332
|
-
metadata:
|
348
|
+
metadata:
|
349
|
+
rubygems_mfa_required: 'true'
|
333
350
|
post_install_message:
|
334
351
|
rdoc_options: []
|
335
352
|
require_paths:
|
@@ -338,14 +355,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
338
355
|
requirements:
|
339
356
|
- - ">="
|
340
357
|
- !ruby/object:Gem::Version
|
341
|
-
version: '2.
|
358
|
+
version: '2.7'
|
342
359
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
343
360
|
requirements:
|
344
361
|
- - ">="
|
345
362
|
- !ruby/object:Gem::Version
|
346
363
|
version: '0'
|
347
364
|
requirements: []
|
348
|
-
rubygems_version: 3.
|
365
|
+
rubygems_version: 3.3.4
|
349
366
|
signing_key:
|
350
367
|
specification_version: 4
|
351
368
|
summary: Data models for the SDR
|