cocina-models 0.42.1 → 0.47.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 358d3bd8de0ea4eb5a53c7d841d874cf30c54234d5289fb7902139e8b2148333
4
- data.tar.gz: a39777306a95b77ef53c8204e5771a41fffad213ea1256162bdeafd12ea581ca
3
+ metadata.gz: b3327b79d2b536ec110ce95f9e87b83b3626649399d69f88b8c77b80dc17e3b5
4
+ data.tar.gz: 25dba9e2585c00101526e0e0a99e274f8405e328be47cf4bfd04d9333f22926b
5
5
  SHA512:
6
- metadata.gz: 7a4fb933796d5e5c9586dbe35e7b29c3a9b3f692925d762b1c9da8be950796fb7107d9675df48c0a5d82dfc0a8f57ba9cb5366e9fbcdcb85177830ab5c653b03
7
- data.tar.gz: b15a6ce89a1dd86bf799388eda65a45b5e8a202a8f778d7cdf353aa2b721485794448f755111551d85ebf42fb1cfb011ef91505e64235a1e54490b152941495c
6
+ metadata.gz: f4248e5fce98d78fa06872976aef5d585c5d289cd2efc0d07b5d801c9a8f4d03afab99d71bf1d73f89f6a39865f1a61883d29ad25bf96f5fba825379fc3a2b71
7
+ data.tar.gz: ccbea259db129c7e189677cab0efc6a5ccea8ccab9d5037d2c2783bfd90379a9678776502d758aaebf5ea15640a836c3704c4b7c05f9eb9aa8d80eb831671886
@@ -1,3 +1,5 @@
1
+ **NOTE: Changes to openapi.yml require updating openapi.yml for sdr-api and dor-services-app and generating models - see README.**
2
+
1
3
  ## Why was this change made?
2
4
 
3
5
 
@@ -7,6 +9,3 @@
7
9
 
8
10
 
9
11
  ## Which documentation and/or configurations were updated?
10
-
11
-
12
-
data/.rubocop.yml CHANGED
@@ -7,170 +7,148 @@ require:
7
7
  AllCops:
8
8
  TargetRubyVersion: 2.5
9
9
 
10
+ # ----- Layout ------
11
+
10
12
  Layout/LineLength:
11
13
  Max: 114
12
14
  Exclude:
13
15
  - lib/cocina/models/*
14
16
 
15
- Metrics/BlockLength:
16
- Exclude:
17
- - cocina-models.gemspec
18
- - spec/cocina/**/*
19
-
20
- Metrics/MethodLength:
21
- Max: 14
22
-
23
- RSpec/MultipleExpectations:
24
- Enabled: false
25
-
26
- RSpec/ExampleLength:
27
- Max: 18
28
- Exclude:
29
- - spec/cocina/models/description_spec.rb
30
- - spec/cocina/models/dro_shared_examples.rb
31
-
32
- Style/Documentation:
33
- Exclude:
34
- - lib/cocina/models/*
35
-
17
+ Layout/BeginEndAlignment: # (new in 0.91)
18
+ Enabled: true
36
19
  Layout/EmptyLinesAroundAttributeAccessor:
37
20
  Enabled: true
38
-
39
21
  Layout/SpaceAroundMethodCallOperator:
40
22
  Enabled: true
41
23
 
42
- Lint/DeprecatedOpenSSLConstant:
43
- Enabled: true
24
+ # ----- Lint ------
44
25
 
45
- Lint/MixedRegexpCaptureTypes:
26
+ Lint/BinaryOperatorWithIdenticalOperands:
46
27
  Enabled: true
47
-
48
- Lint/RaiseException:
28
+ Lint/ConstantDefinitionInBlock: # (new in 0.91)
49
29
  Enabled: true
50
-
51
- Lint/StructNewOverride:
30
+ Lint/DeprecatedOpenSSLConstant:
52
31
  Enabled: true
53
-
54
- Style/AccessorGrouping:
32
+ Lint/DuplicateElsifCondition:
55
33
  Enabled: true
56
-
57
- Style/BisectedAttrAccessor:
34
+ Lint/DuplicateRequire: # (new in 0.90)
58
35
  Enabled: true
59
-
60
- Style/ExponentialNotation:
36
+ Lint/DuplicateRescueException:
61
37
  Enabled: true
62
-
63
- Style/HashEachMethods:
38
+ Lint/EmptyConditionalBody:
64
39
  Enabled: true
65
-
66
- Style/HashTransformKeys:
40
+ Lint/EmptyFile: # (new in 0.90)
67
41
  Enabled: true
68
-
69
- Style/HashTransformValues:
42
+ Lint/FloatComparison:
70
43
  Enabled: true
71
-
72
- Style/RedundantAssignment:
44
+ Lint/HashCompareByIdentity: # (new in 0.93)
73
45
  Enabled: true
74
-
75
- Style/RedundantFetchBlock:
46
+ Lint/IdentityComparison: # (new in 0.91)
76
47
  Enabled: true
77
-
78
- Style/RedundantRegexpCharacterClass:
48
+ Lint/MissingSuper:
79
49
  Enabled: true
80
-
81
- Style/RedundantRegexpEscape:
50
+ Lint/MixedRegexpCaptureTypes:
82
51
  Enabled: true
83
-
84
- Style/SlicingWithRange:
52
+ Lint/OutOfRangeRegexpRef:
85
53
  Enabled: true
86
-
87
- Lint/BinaryOperatorWithIdenticalOperands:
54
+ Lint/RaiseException:
88
55
  Enabled: true
89
-
90
- Lint/DuplicateElsifCondition:
56
+ Lint/RedundantSafeNavigation: # (new in 0.93)
91
57
  Enabled: true
92
-
93
- Lint/DuplicateRescueException:
58
+ Lint/SelfAssignment:
94
59
  Enabled: true
95
-
96
- Lint/EmptyConditionalBody:
60
+ Lint/StructNewOverride:
97
61
  Enabled: true
98
-
99
- Lint/FloatComparison:
62
+ Lint/TopLevelReturnWithArgument:
100
63
  Enabled: true
101
-
102
- Lint/MissingSuper:
64
+ Lint/TrailingCommaInAttributeDeclaration: # (new in 0.90)
103
65
  Enabled: true
104
-
105
- Lint/OutOfRangeRegexpRef:
66
+ Lint/UnreachableLoop:
106
67
  Enabled: true
107
-
108
- Lint/SelfAssignment:
68
+ Lint/UselessMethodDefinition: # (new in 0.90)
109
69
  Enabled: true
110
-
111
- Lint/TopLevelReturnWithArgument:
70
+ Lint/UselessTimes: # (new in 0.91)
112
71
  Enabled: true
113
72
 
114
- Lint/UnreachableLoop:
115
- Enabled: true
73
+ # ----- Metrics ------
116
74
 
117
- Style/ArrayCoercion:
118
- Enabled: true
75
+ Metrics/BlockLength:
76
+ Exclude:
77
+ - cocina-models.gemspec
78
+ - spec/cocina/**/*
119
79
 
120
- Style/CaseLikeIf:
121
- Enabled: true
80
+ Metrics/MethodLength:
81
+ Max: 14
122
82
 
123
- Style/ExplicitBlockArgument:
124
- Enabled: true
83
+ # ----- RSpec ------
125
84
 
126
- Style/GlobalStdStream:
127
- Enabled: true
85
+ RSpec/ExampleLength:
86
+ Max: 18
87
+ Exclude:
88
+ - spec/cocina/models/description_spec.rb
89
+ - spec/cocina/models/dro_shared_examples.rb
128
90
 
129
- Style/HashAsLastArrayItem:
130
- Enabled: true
91
+ RSpec/MultipleExpectations:
92
+ Enabled: false
131
93
 
132
- Style/HashLikeCase:
94
+ RSpec/StubbedMock: # (new in 1.44)
133
95
  Enabled: true
134
96
 
135
- Style/OptionalBooleanParameter:
136
- Enabled: false
97
+ # ----- Style ------
137
98
 
138
- Style/RedundantFileExtensionInRequire:
139
- Enabled: true
99
+ Style/Documentation:
100
+ Exclude:
101
+ - lib/cocina/models/*
140
102
 
141
- Style/SingleArgumentDig:
103
+ Style/AccessorGrouping:
142
104
  Enabled: true
143
-
144
- Style/StringConcatenation:
105
+ Style/ArrayCoercion:
145
106
  Enabled: true
146
-
147
- Layout/BeginEndAlignment: # (new in 0.91)
107
+ Style/BisectedAttrAccessor:
148
108
  Enabled: true
149
- Lint/ConstantDefinitionInBlock: # (new in 0.91)
109
+ Style/CaseLikeIf:
150
110
  Enabled: true
151
- Lint/DuplicateRequire: # (new in 0.90)
111
+ Style/ClassEqualityComparison: # (new in 0.93)
152
112
  Enabled: true
153
- Lint/EmptyFile: # (new in 0.90)
113
+ Style/CombinableLoops: # (new in 0.90)
154
114
  Enabled: true
155
- Lint/HashCompareByIdentity: # (new in 0.93)
115
+ Style/ExplicitBlockArgument:
156
116
  Enabled: true
157
- Lint/IdentityComparison: # (new in 0.91)
117
+ Style/ExponentialNotation:
158
118
  Enabled: true
159
- Lint/RedundantSafeNavigation: # (new in 0.93)
119
+ Style/GlobalStdStream:
160
120
  Enabled: true
161
- Lint/TrailingCommaInAttributeDeclaration: # (new in 0.90)
121
+ Style/HashAsLastArrayItem:
162
122
  Enabled: true
163
- Lint/UselessMethodDefinition: # (new in 0.90)
123
+ Style/HashEachMethods:
164
124
  Enabled: true
165
- Lint/UselessTimes: # (new in 0.91)
125
+ Style/HashLikeCase:
166
126
  Enabled: true
167
- Style/ClassEqualityComparison: # (new in 0.93)
127
+ Style/HashTransformKeys:
168
128
  Enabled: true
169
- Style/CombinableLoops: # (new in 0.90)
129
+ Style/HashTransformValues:
170
130
  Enabled: true
171
131
  Style/KeywordParametersOrder: # (new in 0.90)
172
132
  Enabled: true
133
+ Style/OptionalBooleanParameter:
134
+ Enabled: false
135
+ Style/RedundantAssignment:
136
+ Enabled: true
137
+ Style/RedundantFetchBlock:
138
+ Enabled: true
139
+ Style/RedundantFileExtensionInRequire:
140
+ Enabled: true
141
+ Style/RedundantRegexpCharacterClass:
142
+ Enabled: true
143
+ Style/RedundantRegexpEscape:
144
+ Enabled: true
173
145
  Style/RedundantSelfAssignment: # (new in 0.90)
174
146
  Enabled: true
147
+ Style/SingleArgumentDig:
148
+ Enabled: true
149
+ Style/SlicingWithRange:
150
+ Enabled: true
175
151
  Style/SoleNestedConditional: # (new in 0.89)
176
152
  Enabled: true
153
+ Style/StringConcatenation:
154
+ Enabled: true
data/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
  [![Test Coverage](https://api.codeclimate.com/v1/badges/472273351516ac01dce1/test_coverage)](https://codeclimate.com/github/sul-dlss/cocina-models/test_coverage)
3
3
  [![Maintainability](https://api.codeclimate.com/v1/badges/472273351516ac01dce1/maintainability)](https://codeclimate.com/github/sul-dlss/cocina-models/maintainability)
4
4
  [![Gem Version](https://badge.fury.io/rb/cocina-models.svg)](https://badge.fury.io/rb/cocina-models)
5
- [![OpenAPI Validator](http://validator.swagger.io/validator?url=https://raw.githubusercontent.com/sul-dlss/cocina-models/master/openapi.yml)](http://validator.swagger.io/validator/debug?url=https://raw.githubusercontent.com/sul-dlss/cocina-models/master/openapi.yml)
5
+ [![OpenAPI Validator](http://validator.swagger.io/validator?url=https://raw.githubusercontent.com/sul-dlss/cocina-models/main/openapi.yml)](http://validator.swagger.io/validator/debug?url=https://raw.githubusercontent.com/sul-dlss/cocina-models/main/openapi.yml)
6
6
 
7
7
  # Cocina::Models
8
8
 
@@ -42,6 +42,10 @@ which pushes the gem to rubygems.org. Next write up the release notes: https://
42
42
 
43
43
  Finally, you must release versions of [sdr-client](https://github.com/sul-dlss/sdr-client) and [dor-services-client](https://github.com/sul-dlss/dor-services-client/) pinned to this version because [Argo](https://github.com/sul-dlss/argo) depends on both of those. When [dor-services-app](https://github.com/sul-dlss/dor-services-app) is updated to use the new models (via the auto-update script), the clients must be updated at the same time or there is risk of models produced by dor-services-app not being acceptable to the clients.
44
44
 
45
+ ### Communicate
46
+
47
+ Send a note to `#dlss-infra-chg-mgmt` on Slack to let people know what is changing and when.
48
+
45
49
  ### Dependent Services
46
50
 
47
51
  Once the above listed gems are updated all the following services that use cocina-models should be updated and released at the same time:
@@ -55,6 +59,7 @@ Once the above listed gems are updated all the following services that use cocin
55
59
  * sul-dlss/hydrus
56
60
  * sul-dlss/happy-heron
57
61
  * sul-dlss/infrastructure-integration-test
62
+ * sul-dlss/dor_indexing_app
58
63
 
59
64
  ## Using this gem
60
65
 
@@ -22,7 +22,7 @@ Gem::Specification.new do |spec|
22
22
  spec.bindir = 'exe'
23
23
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
24
24
  spec.require_paths = ['lib']
25
- spec.required_ruby_version = '~> 2.5'
25
+ spec.required_ruby_version = '>= 2.5'
26
26
 
27
27
  spec.add_dependency 'activesupport'
28
28
  spec.add_dependency 'dry-struct', '~> 1.0'
@@ -36,7 +36,7 @@ Gem::Specification.new do |spec|
36
36
  spec.add_development_dependency 'committee'
37
37
  spec.add_development_dependency 'rake', '~> 13.0'
38
38
  spec.add_development_dependency 'rspec', '~> 3.0'
39
- spec.add_development_dependency 'rubocop', '~> 0.87'
40
- spec.add_development_dependency 'rubocop-rspec'
39
+ spec.add_development_dependency 'rubocop', '~> 0.93'
40
+ spec.add_development_dependency 'rubocop-rspec', '~> 1.44'
41
41
  spec.add_development_dependency 'simplecov', '~> 0.17.0'
42
42
  end
data/docs/index.html CHANGED
@@ -14,7 +14,7 @@
14
14
  </style>
15
15
  </head>
16
16
  <body>
17
- <redoc spec-url='https://raw.githubusercontent.com/sul-dlss/cocina-models/master/openapi.yml'></redoc>
17
+ <redoc spec-url='https://raw.githubusercontent.com/sul-dlss/cocina-models/main/openapi.yml'></redoc>
18
18
  <script src="https://cdn.jsdelivr.net/npm/redoc@next/bundles/redoc.standalone.js"> </script>
19
19
  </body>
20
20
  </html>
@@ -11,6 +11,8 @@ module Cocina
11
11
  attribute :role, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
12
12
  attribute :identifier, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
13
13
  attribute :note, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
14
+ # URL or other pointer to the location of the contributor information.
15
+ attribute :valueAt, Types::Strict::String.meta(omittable: true)
14
16
  end
15
17
  end
16
18
  end
@@ -18,6 +18,8 @@ module Cocina
18
18
  attribute :relatedResource, Types::Strict::Array.of(RelatedResource).meta(omittable: true)
19
19
  attribute :marcEncodedData, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
20
20
  attribute :adminMetadata, DescriptiveAdminMetadata.optional.meta(omittable: true)
21
+ # URL or other pointer to the location of the resource description.
22
+ attribute :valueAt, Types::Strict::String.meta(omittable: true)
21
23
 
22
24
  def self.new(attributes = default_attributes, safe = false, validate = true, &block)
23
25
  Validator.validate(self, attributes.with_indifferent_access) if validate && name
@@ -5,6 +5,7 @@ module Cocina
5
5
  class DescriptiveAccessMetadata < Struct
6
6
  attribute :url, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
7
7
  attribute :physicalLocation, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
8
+ attribute :digitalLocation, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
8
9
  attribute :accessContact, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
9
10
  attribute :digitalRepository, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
10
11
  attribute :note, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
@@ -7,7 +7,7 @@ module Cocina
7
7
  attribute :event, Types::Strict::Array.of(Event).meta(omittable: true)
8
8
  attribute :language, Types::Strict::Array.of(Language).meta(omittable: true)
9
9
  attribute :note, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
10
- attribute :standard, Standard.optional.meta(omittable: true)
10
+ attribute :metadataStandard, Types::Strict::Array.of(Standard).meta(omittable: true)
11
11
  attribute :identifier, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
12
12
  end
13
13
  end
@@ -5,6 +5,7 @@ module Cocina
5
5
  class DescriptiveBasicValue < Struct
6
6
  attribute :structuredValue, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
7
7
  attribute :parallelValue, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
8
+ attribute :groupedValue, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
8
9
  # String or integer value of the descriptive element.
9
10
  attribute :value, Types::Nominal::Any.meta(omittable: true)
10
11
  # Type of value provided by the descriptive element.
@@ -25,6 +26,8 @@ module Cocina
25
26
  attribute :qualifier, Types::Strict::String.meta(omittable: true)
26
27
  attribute :note, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
27
28
  attribute :valueLanguage, DescriptiveValueLanguage.optional.meta(omittable: true)
29
+ # URL or other pointer to the location of the value of the descriptive element.
30
+ attribute :valueAt, Types::Strict::String.meta(omittable: true)
28
31
  end
29
32
  end
30
33
  end
@@ -0,0 +1,9 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Cocina
4
+ module Models
5
+ class DescriptiveGroupedValue < Struct
6
+ attribute :groupedValue, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
7
+ end
8
+ end
9
+ end
@@ -5,6 +5,7 @@ module Cocina
5
5
  class DescriptiveValue < Struct
6
6
  attribute :structuredValue, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
7
7
  attribute :parallelValue, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
8
+ attribute :groupedValue, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
8
9
  # String or integer value of the descriptive element.
9
10
  attribute :value, Types::Nominal::Any.meta(omittable: true)
10
11
  # Type of value provided by the descriptive element.
@@ -25,6 +26,8 @@ module Cocina
25
26
  attribute :qualifier, Types::Strict::String.meta(omittable: true)
26
27
  attribute :note, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
27
28
  attribute :valueLanguage, DescriptiveValueLanguage.optional.meta(omittable: true)
29
+ # URL or other pointer to the location of the value of the descriptive element.
30
+ attribute :valueAt, Types::Strict::String.meta(omittable: true)
28
31
  attribute :appliesTo, Types::Strict::Array.of(DescriptiveBasicValue).meta(omittable: true)
29
32
  end
30
33
  end
@@ -9,13 +9,14 @@ module Cocina
9
9
  # The preferred display label to use for the descriptive element in access systems.
10
10
  attribute :displayLabel, Types::Strict::String.meta(omittable: true)
11
11
  attribute :encoding, Standard.optional.meta(omittable: true)
12
+ attribute :groupedValue, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
12
13
  attribute :note, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
13
14
  attribute :parallelValue, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
14
15
  # present for mapping to additional schemas in the future and for consistency but not otherwise used
15
16
  attribute :qualifier, Types::Strict::String.meta(omittable: true)
16
17
  attribute :script, DescriptiveValue.optional.meta(omittable: true)
17
18
  attribute :source, Source.optional.meta(omittable: true)
18
- # Status of the contributor relative to other parallel contributors (e.g. the primary author among a group of contributors).
19
+ # Status of the language relative to other parallel language elements (e.g. the primary language)
19
20
  attribute :status, Types::Strict::String.enum('primary').meta(omittable: true)
20
21
  attribute :standard, Standard.optional.meta(omittable: true)
21
22
  attribute :structuredValue, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
@@ -23,6 +24,8 @@ module Cocina
23
24
  attribute :uri, Types::Strict::String.meta(omittable: true)
24
25
  # Value of the descriptive element.
25
26
  attribute :value, Types::Strict::String.meta(omittable: true)
27
+ # URL or other pointer to the location of the language information.
28
+ attribute :valueAt, Types::Strict::String.meta(omittable: true)
26
29
  attribute :valueLanguage, DescriptiveValueLanguage.optional.meta(omittable: true)
27
30
  end
28
31
  end
@@ -10,7 +10,7 @@ module Cocina
10
10
 
11
11
  # The algorithm that was used
12
12
  attribute :type, Types::Strict::String.enum(*MessageDigest::TYPES)
13
- # The digest value Base64 encoded
13
+ # The digest value hexidecimal encoded
14
14
  attribute :digest, Types::Strict::String
15
15
  end
16
16
  end
@@ -21,8 +21,12 @@ module Cocina
21
21
  # Stanford persistent URL associated with the related resource.
22
22
  attribute :purl, Types::Strict::String.meta(omittable: true)
23
23
  attribute :access, DescriptiveAccessMetadata.optional.meta(omittable: true)
24
+ attribute :relatedResource, Types::Strict::Array.of(RelatedResource).meta(omittable: true)
25
+ attribute :adminMetadata, DescriptiveAdminMetadata.optional.meta(omittable: true)
24
26
  # The version of the related resource.
25
27
  attribute :version, Types::Strict::String.meta(omittable: true)
28
+ # URL or other pointer to the location of the related resource information.
29
+ attribute :valueAt, Types::Strict::String.meta(omittable: true)
26
30
  end
27
31
  end
28
32
  end
@@ -5,6 +5,7 @@ module Cocina
5
5
  class Title < Struct
6
6
  attribute :structuredValue, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
7
7
  attribute :parallelValue, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
8
+ attribute :groupedValue, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
8
9
  # String or integer value of the descriptive element.
9
10
  attribute :value, Types::Nominal::Any.meta(omittable: true)
10
11
  # Type of value provided by the descriptive element.
@@ -25,6 +26,8 @@ module Cocina
25
26
  attribute :qualifier, Types::Strict::String.meta(omittable: true)
26
27
  attribute :note, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
27
28
  attribute :valueLanguage, DescriptiveValueLanguage.optional.meta(omittable: true)
29
+ # URL or other pointer to the location of the value of the descriptive element.
30
+ attribute :valueAt, Types::Strict::String.meta(omittable: true)
28
31
  attribute :appliesTo, Types::Strict::Array.of(DescriptiveBasicValue).meta(omittable: true)
29
32
  end
30
33
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Cocina
4
4
  module Models
5
- VERSION = '0.42.1'
5
+ VERSION = '0.47.0'
6
6
  end
7
7
  end
data/openapi.yml CHANGED
@@ -261,7 +261,6 @@ components:
261
261
  description: Status of the contributor relative to other parallel contributors
262
262
  (e.g. the primary author among a group of contributors).
263
263
  type: string
264
- # type: integer (uncomment when issue #154 resolved)
265
264
  role:
266
265
  description: Relationships of the contributor to the resource or to an event
267
266
  in its history.
@@ -278,6 +277,9 @@ components:
278
277
  type: array
279
278
  items:
280
279
  $ref: "#/components/schemas/DescriptiveValue"
280
+ valueAt:
281
+ description: URL or other pointer to the location of the contributor information.
282
+ type: string
281
283
  Description:
282
284
  type: object
283
285
  additionalProperties: false
@@ -349,6 +351,9 @@ components:
349
351
  $ref: "#/components/schemas/DescriptiveValue"
350
352
  adminMetadata:
351
353
  $ref: "#/components/schemas/DescriptiveAdminMetadata"
354
+ valueAt:
355
+ description: URL or other pointer to the location of the resource description.
356
+ type: string
352
357
  required:
353
358
  - title
354
359
  DescriptiveAccessMetadata:
@@ -366,6 +371,11 @@ components:
366
371
  type: array
367
372
  items:
368
373
  $ref: "#/components/schemas/DescriptiveValue"
374
+ digitalLocation:
375
+ description: Location of a digital version of the resource, such as a file path for a born digital resource.
376
+ type: array
377
+ items:
378
+ $ref: "#/components/schemas/DescriptiveValue"
369
379
  accessContact:
370
380
  description: The library, organization, or person responsible for access to the resource.
371
381
  type: array
@@ -407,9 +417,11 @@ components:
407
417
  type: array
408
418
  items:
409
419
  $ref: "#/components/schemas/DescriptiveValue"
410
- standard:
411
- # description: Descriptive or content standard to which this resource description conforms.
412
- $ref: "#/components/schemas/Standard"
420
+ metadataStandard:
421
+ description: Descriptive or content standard(s) to which this resource description conforms.
422
+ type: array
423
+ items:
424
+ $ref: "#/components/schemas/Standard"
413
425
  identifier:
414
426
  description: Identifiers associated with this resource description.
415
427
  type: array
@@ -423,6 +435,7 @@ components:
423
435
  allOf:
424
436
  - $ref: "#/components/schemas/DescriptiveStructuredValue"
425
437
  - $ref: "#/components/schemas/DescriptiveParallelValue"
438
+ - $ref: "#/components/schemas/DescriptiveGroupedValue"
426
439
  - type: object
427
440
  additionalProperties: false
428
441
  properties:
@@ -441,7 +454,6 @@ components:
441
454
  description: Status of the descriptive element value relative to other instances
442
455
  of the element.
443
456
  type: string
444
- # type: integer (uncomment when issue #154 is resolved)
445
457
  code:
446
458
  description: Code value of the descriptive element.
447
459
  type: string
@@ -475,6 +487,9 @@ components:
475
487
  $ref: "#/components/schemas/DescriptiveValue"
476
488
  valueLanguage:
477
489
  $ref: "#/components/schemas/DescriptiveValueLanguage"
490
+ valueAt:
491
+ description: URL or other pointer to the location of the value of the descriptive element.
492
+ type: string
478
493
  DescriptiveGeographicMetadata:
479
494
  description: Value model for mods geographic extension metadata
480
495
  type: object
@@ -489,6 +504,15 @@ components:
489
504
  type: array
490
505
  items:
491
506
  $ref: "#/components/schemas/DescriptiveValue"
507
+ DescriptiveGroupedValue:
508
+ description: Value model for a set of descriptive elements grouped together in an unstructured way.
509
+ type: object
510
+ additionalProperties: false
511
+ properties:
512
+ groupedValue:
513
+ type: array
514
+ items:
515
+ $ref: "#/components/schemas/DescriptiveValue"
492
516
  DescriptiveParallelValue:
493
517
  description: Value model for multiple representations of the same information (e.g. in different languages).
494
518
  type: object
@@ -541,6 +565,12 @@ components:
541
565
  - type: object
542
566
  required:
543
567
  - parallelValue
568
+ - type: object
569
+ required:
570
+ - groupedValue
571
+ - type: object
572
+ required:
573
+ - valueAt
544
574
  DRO:
545
575
  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.
546
576
  type: object
@@ -913,6 +943,11 @@ components:
913
943
  encoding:
914
944
  # description: present for mapping to additional schemas in the future and for consistency but not otherwise used
915
945
  $ref: "#/components/schemas/Standard"
946
+ groupedValue:
947
+ description: present for mapping to additional schemas in the future and for consistency but not otherwise used
948
+ type: array
949
+ items:
950
+ $ref: "#/components/schemas/DescriptiveValue"
916
951
  note:
917
952
  description: present for mapping to additional schemas in the future and for consistency but not otherwise used
918
953
  type: array
@@ -934,7 +969,6 @@ components:
934
969
  $ref: "#/components/schemas/Source"
935
970
  status:
936
971
  description: Status of the language relative to other parallel language elements (e.g. the primary language)
937
- (e.g. the primary author among a group of contributors).
938
972
  type: string
939
973
  enum:
940
974
  - primary
@@ -953,6 +987,9 @@ components:
953
987
  value:
954
988
  description: Value of the descriptive element.
955
989
  type: string
990
+ valueAt:
991
+ description: URL or other pointer to the location of the language information.
992
+ type: string
956
993
  valueLanguage:
957
994
  # description: present for mapping to additional schemas in the future and for consistency but not otherwise used
958
995
  $ref: "#/components/schemas/DescriptiveValueLanguage"
@@ -968,7 +1005,7 @@ components:
968
1005
  - md5
969
1006
  - sha1
970
1007
  digest:
971
- description: The digest value Base64 encoded
1008
+ description: The digest value hexidecimal encoded
972
1009
  type: string
973
1010
  required:
974
1011
  - type
@@ -995,7 +1032,6 @@ components:
995
1032
  status:
996
1033
  description: Status of the related resource relative to other related resources.
997
1034
  type: string
998
- # type: integer (uncomment when issue #154 resolved)
999
1035
  displayLabel:
1000
1036
  description: The preferred display label to use for the related resource in access systems.
1001
1037
  type: string
@@ -1051,9 +1087,19 @@ components:
1051
1087
  format: uri
1052
1088
  access:
1053
1089
  $ref: "#/components/schemas/DescriptiveAccessMetadata"
1090
+ relatedResource:
1091
+ description: Other resources associated with the related resource.
1092
+ type: array
1093
+ items:
1094
+ $ref: "#/components/schemas/RelatedResource"
1095
+ adminMetadata:
1096
+ $ref: "#/components/schemas/DescriptiveAdminMetadata"
1054
1097
  version:
1055
1098
  description: The version of the related resource.
1056
1099
  type: string
1100
+ valueAt:
1101
+ description: URL or other pointer to the location of the related resource information.
1102
+ type: string
1057
1103
  ReleaseTag:
1058
1104
  description: A tag that indicates the item or collection should be released.
1059
1105
  type: object
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.42.1
4
+ version: 0.47.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: 2020-10-26 00:00:00.000000000 Z
11
+ date: 2021-02-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -170,28 +170,28 @@ dependencies:
170
170
  requirements:
171
171
  - - "~>"
172
172
  - !ruby/object:Gem::Version
173
- version: '0.87'
173
+ version: '0.93'
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: '0.87'
180
+ version: '0.93'
181
181
  - !ruby/object:Gem::Dependency
182
182
  name: rubocop-rspec
183
183
  requirement: !ruby/object:Gem::Requirement
184
184
  requirements:
185
- - - ">="
185
+ - - "~>"
186
186
  - !ruby/object:Gem::Version
187
- version: '0'
187
+ version: '1.44'
188
188
  type: :development
189
189
  prerelease: false
190
190
  version_requirements: !ruby/object:Gem::Requirement
191
191
  requirements:
192
- - - ">="
192
+ - - "~>"
193
193
  - !ruby/object:Gem::Version
194
- version: '0'
194
+ version: '1.44'
195
195
  - !ruby/object:Gem::Dependency
196
196
  name: simplecov
197
197
  requirement: !ruby/object:Gem::Requirement
@@ -268,6 +268,7 @@ files:
268
268
  - lib/cocina/models/descriptive_admin_metadata.rb
269
269
  - lib/cocina/models/descriptive_basic_value.rb
270
270
  - lib/cocina/models/descriptive_geographic_metadata.rb
271
+ - lib/cocina/models/descriptive_grouped_value.rb
271
272
  - lib/cocina/models/descriptive_parallel_value.rb
272
273
  - lib/cocina/models/descriptive_structured_value.rb
273
274
  - lib/cocina/models/descriptive_value.rb
@@ -316,7 +317,7 @@ require_paths:
316
317
  - lib
317
318
  required_ruby_version: !ruby/object:Gem::Requirement
318
319
  requirements:
319
- - - "~>"
320
+ - - ">="
320
321
  - !ruby/object:Gem::Version
321
322
  version: '2.5'
322
323
  required_rubygems_version: !ruby/object:Gem::Requirement