cocina-models 0.52.0 → 0.54.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +9 -0
- data/lib/cocina/models/access_role.rb +1 -1
- data/lib/cocina/models/descriptive_parallel_event.rb +2 -11
- data/lib/cocina/models/event.rb +2 -11
- data/lib/cocina/models/file_administrative.rb +1 -0
- data/lib/cocina/models/version.rb +1 -1
- data/openapi.yml +37 -24
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2aef820c19c5713ea051cebe2b29f458413bda243c7906f4e75e29f655c21119
|
4
|
+
data.tar.gz: 43a183c9e4b8e7a993e5ed04b1379d3ffa40b0831a2a471cc63a048698799a26
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1fb48a8bc9573cb59fb8c9c36246aad1ddaa2afc4dc122c793b97c5d4fe5ee364f1a75c65b43ac5845f1ee4ce633a2739d17bd2d3e7ac15dfd88642c4911272c
|
7
|
+
data.tar.gz: b5e4db39b12e7e300d2a45b8be2a06a2683cedaf9ea98aafe7716e36552a1432650c9f1c71438d07dc123f993290909eb3dbb71597cfda78005a91c064b09247
|
data/README.md
CHANGED
@@ -66,3 +66,12 @@ Once the above listed gems are updated all the following services that use cocin
|
|
66
66
|
If you are using this gem in an application that has an API that accepts Cocina models (e.g., SDR API, Dor-Services-App), make sure that the `openapi.yml` for the application includes the schemas that match the schemas in this `openapi.yml`.
|
67
67
|
|
68
68
|
This can be accomplished by cutting and pasting these schemas. By convention, these schemas are listed first in the `openapi.yml` of the associated projects, followed by the application-specific schemas.
|
69
|
+
|
70
|
+
### Usage conventions
|
71
|
+
|
72
|
+
The following are the recommended naming conventions for code using Cocina models:
|
73
|
+
|
74
|
+
* cocina_item: Cocina::Models::DRO instance
|
75
|
+
* cocina_admin_policy: Cocina::Models::AdminPolicy instance
|
76
|
+
* cocina_collection: Cocina::Models::Collection instance
|
77
|
+
* cocina_object: Cocina::Models::DRO or Cocina::Models::AdminPolicy or Cocina::Models::Collection instance
|
@@ -4,7 +4,7 @@ module Cocina
|
|
4
4
|
module Models
|
5
5
|
class AccessRole < Struct
|
6
6
|
# Name of role
|
7
|
-
attribute :name, Types::Strict::String.enum('
|
7
|
+
attribute :name, Types::Strict::String.enum('dor-apo-creator', 'dor-apo-depositor', 'dor-apo-manager', 'dor-apo-metadata', 'dor-apo-reviewer', 'dor-apo-viewer', 'sdr-administrator', 'sdr-viewer', 'hydrus-collection-creator', 'hydrus-collection-manager', 'hydrus-collection-depositor', 'hydrus-collection-item-depositor', 'hydrus-collection-reviewer', 'hydrus-collection-viewer')
|
8
8
|
attribute :members, Types::Strict::Array.of(AccessRoleMember).default([].freeze)
|
9
9
|
end
|
10
10
|
end
|
@@ -3,17 +3,6 @@
|
|
3
3
|
module Cocina
|
4
4
|
module Models
|
5
5
|
class DescriptiveParallelEvent < Struct
|
6
|
-
# Code representing the standard or encoding.
|
7
|
-
attribute :code, Types::Strict::String.meta(omittable: true)
|
8
|
-
# URI for the standard or encoding.
|
9
|
-
attribute :uri, Types::Strict::String.meta(omittable: true)
|
10
|
-
# String describing the standard or encoding.
|
11
|
-
attribute :value, Types::Strict::String.meta(omittable: true)
|
12
|
-
attribute :note, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
|
13
|
-
# The version of the standard or encoding.
|
14
|
-
attribute :version, Types::Strict::String.meta(omittable: true)
|
15
|
-
attribute :source, Source.optional.meta(omittable: true)
|
16
|
-
attribute :valueScript, Standard.optional.meta(omittable: true)
|
17
6
|
attribute :structuredValue, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
|
18
7
|
# Description of the event (creation, publication, etc.).
|
19
8
|
attribute :type, Types::Strict::String.meta(omittable: true)
|
@@ -23,6 +12,8 @@ module Cocina
|
|
23
12
|
attribute :contributor, Types::Strict::Array.of(Contributor).meta(omittable: true)
|
24
13
|
attribute :location, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
|
25
14
|
attribute :identifier, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
|
15
|
+
attribute :note, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
|
16
|
+
attribute :valueLanguage, DescriptiveValueLanguage.optional.meta(omittable: true)
|
26
17
|
end
|
27
18
|
end
|
28
19
|
end
|
data/lib/cocina/models/event.rb
CHANGED
@@ -4,17 +4,6 @@ module Cocina
|
|
4
4
|
module Models
|
5
5
|
class Event < Struct
|
6
6
|
attribute :structuredValue, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
|
7
|
-
# Code representing the standard or encoding.
|
8
|
-
attribute :code, Types::Strict::String.meta(omittable: true)
|
9
|
-
# URI for the standard or encoding.
|
10
|
-
attribute :uri, Types::Strict::String.meta(omittable: true)
|
11
|
-
# String describing the standard or encoding.
|
12
|
-
attribute :value, Types::Strict::String.meta(omittable: true)
|
13
|
-
attribute :note, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
|
14
|
-
# The version of the standard or encoding.
|
15
|
-
attribute :version, Types::Strict::String.meta(omittable: true)
|
16
|
-
attribute :source, Source.optional.meta(omittable: true)
|
17
|
-
attribute :valueScript, Standard.optional.meta(omittable: true)
|
18
7
|
# Description of the event (creation, publication, etc.).
|
19
8
|
attribute :type, Types::Strict::String.meta(omittable: true)
|
20
9
|
# The preferred display label to use for the event in access systems.
|
@@ -23,6 +12,8 @@ module Cocina
|
|
23
12
|
attribute :contributor, Types::Strict::Array.of(Contributor).meta(omittable: true)
|
24
13
|
attribute :location, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
|
25
14
|
attribute :identifier, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
|
15
|
+
attribute :note, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
|
16
|
+
attribute :valueLanguage, DescriptiveValueLanguage.optional.meta(omittable: true)
|
26
17
|
attribute :parallelEvent, Types::Strict::Array.of(DescriptiveParallelEvent).meta(omittable: true)
|
27
18
|
end
|
28
19
|
end
|
data/openapi.yml
CHANGED
@@ -127,9 +127,14 @@ components:
|
|
127
127
|
description: Name of role
|
128
128
|
type: string
|
129
129
|
enum:
|
130
|
+
- 'dor-apo-creator'
|
131
|
+
- 'dor-apo-depositor'
|
132
|
+
- 'dor-apo-manager'
|
133
|
+
- 'dor-apo-metadata'
|
134
|
+
- 'dor-apo-reviewer'
|
135
|
+
- 'dor-apo-viewer'
|
130
136
|
- 'sdr-administrator'
|
131
137
|
- 'sdr-viewer'
|
132
|
-
- 'dor-apo-manager'
|
133
138
|
- 'hydrus-collection-creator'
|
134
139
|
- 'hydrus-collection-manager'
|
135
140
|
- 'hydrus-collection-depositor'
|
@@ -581,7 +586,6 @@ components:
|
|
581
586
|
type: object
|
582
587
|
additionalProperties: false
|
583
588
|
allOf:
|
584
|
-
- $ref: "#/components/schemas/DescriptiveValueLanguage"
|
585
589
|
- $ref: "#/components/schemas/DescriptiveStructuredValue"
|
586
590
|
- type: object
|
587
591
|
additionalProperties: false
|
@@ -617,6 +621,9 @@ components:
|
|
617
621
|
type: array
|
618
622
|
items:
|
619
623
|
$ref: "#/components/schemas/DescriptiveValue"
|
624
|
+
valueLanguage:
|
625
|
+
# description: Language of the descriptive element value
|
626
|
+
$ref: "#/components/schemas/DescriptiveValueLanguage"
|
620
627
|
DescriptiveParallelValue:
|
621
628
|
description: Value model for multiple representations of the same information (e.g. in different languages).
|
622
629
|
type: object
|
@@ -654,27 +661,6 @@ components:
|
|
654
661
|
$ref: '#/components/schemas/Standard'
|
655
662
|
# description: An alphabet or other notation used to represent a
|
656
663
|
# language or other symbolic system of the descriptive element value.
|
657
|
-
Title:
|
658
|
-
type: object
|
659
|
-
additionalProperties: false
|
660
|
-
allOf:
|
661
|
-
- $ref: "#/components/schemas/DescriptiveValue"
|
662
|
-
- anyOf:
|
663
|
-
- type: object
|
664
|
-
required:
|
665
|
-
- value
|
666
|
-
- type: object
|
667
|
-
required:
|
668
|
-
- structuredValue
|
669
|
-
- type: object
|
670
|
-
required:
|
671
|
-
- parallelValue
|
672
|
-
- type: object
|
673
|
-
required:
|
674
|
-
- groupedValue
|
675
|
-
- type: object
|
676
|
-
required:
|
677
|
-
- valueAt
|
678
664
|
DRO:
|
679
665
|
description: Domain-defined abstraction of a 'work'. Digital Repository Objects' abstraction is describable for our domain’s purposes, i.e. for management needs within our system.
|
680
666
|
type: object
|
@@ -839,7 +825,6 @@ components:
|
|
839
825
|
additionalProperties: false
|
840
826
|
allOf:
|
841
827
|
- $ref: "#/components/schemas/DescriptiveStructuredValue"
|
842
|
-
- $ref: "#/components/schemas/DescriptiveValueLanguage"
|
843
828
|
- type: object
|
844
829
|
additionalProperties: false
|
845
830
|
properties:
|
@@ -874,6 +859,9 @@ components:
|
|
874
859
|
type: array
|
875
860
|
items:
|
876
861
|
$ref: "#/components/schemas/DescriptiveValue"
|
862
|
+
valueLanguage:
|
863
|
+
# description: Language of the descriptive element value
|
864
|
+
$ref: "#/components/schemas/DescriptiveValueLanguage"
|
877
865
|
parallelEvent:
|
878
866
|
description: For multiple representations of information about the same event (e.g. in different languages)
|
879
867
|
type: array
|
@@ -971,6 +959,9 @@ components:
|
|
971
959
|
type: object
|
972
960
|
additionalProperties: false
|
973
961
|
properties:
|
962
|
+
publish:
|
963
|
+
type: boolean
|
964
|
+
default: false
|
974
965
|
sdrPreserve:
|
975
966
|
type: boolean
|
976
967
|
default: true
|
@@ -978,6 +969,7 @@ components:
|
|
978
969
|
type: boolean
|
979
970
|
default: false
|
980
971
|
required:
|
972
|
+
- publish
|
981
973
|
- sdrPreserve
|
982
974
|
- shelve
|
983
975
|
FileSet:
|
@@ -1517,3 +1509,24 @@ components:
|
|
1517
1509
|
type: string
|
1518
1510
|
source:
|
1519
1511
|
$ref: "#/components/schemas/Source"
|
1512
|
+
Title:
|
1513
|
+
type: object
|
1514
|
+
additionalProperties: false
|
1515
|
+
allOf:
|
1516
|
+
- $ref: "#/components/schemas/DescriptiveValue"
|
1517
|
+
- anyOf:
|
1518
|
+
- type: object
|
1519
|
+
required:
|
1520
|
+
- value
|
1521
|
+
- type: object
|
1522
|
+
required:
|
1523
|
+
- structuredValue
|
1524
|
+
- type: object
|
1525
|
+
required:
|
1526
|
+
- parallelValue
|
1527
|
+
- type: object
|
1528
|
+
required:
|
1529
|
+
- groupedValue
|
1530
|
+
- type: object
|
1531
|
+
required:
|
1532
|
+
- valueAt
|
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.54.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Justin Coyne
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-03-
|
11
|
+
date: 2021-03-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -314,7 +314,7 @@ files:
|
|
314
314
|
homepage: https://github.com/sul-dlss/cocina-models
|
315
315
|
licenses: []
|
316
316
|
metadata: {}
|
317
|
-
post_install_message:
|
317
|
+
post_install_message:
|
318
318
|
rdoc_options: []
|
319
319
|
require_paths:
|
320
320
|
- lib
|
@@ -329,8 +329,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
329
329
|
- !ruby/object:Gem::Version
|
330
330
|
version: '0'
|
331
331
|
requirements: []
|
332
|
-
rubygems_version: 3.
|
333
|
-
signing_key:
|
332
|
+
rubygems_version: 3.0.6
|
333
|
+
signing_key:
|
334
334
|
specification_version: 4
|
335
335
|
summary: Data models for the SDR
|
336
336
|
test_files: []
|