cocina-models 0.43.0 → 0.47.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/pull_request_template.md +2 -3
- data/.rubocop.yml +80 -102
- data/README.md +6 -1
- data/cocina-models.gemspec +3 -3
- data/docs/index.html +1 -1
- data/lib/cocina/models/contributor.rb +2 -2
- data/lib/cocina/models/description.rb +2 -0
- data/lib/cocina/models/descriptive_access_metadata.rb +1 -0
- data/lib/cocina/models/descriptive_admin_metadata.rb +1 -1
- data/lib/cocina/models/descriptive_basic_value.rb +3 -0
- data/lib/cocina/models/descriptive_grouped_value.rb +9 -0
- data/lib/cocina/models/descriptive_value.rb +3 -0
- data/lib/cocina/models/language.rb +3 -0
- data/lib/cocina/models/related_resource.rb +2 -2
- data/lib/cocina/models/title.rb +3 -0
- data/lib/cocina/models/version.rb +1 -1
- data/openapi.yml +49 -11
- metadata +10 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cf1ffbb85b37f0bee58a8c5129d3386b123eab2e3ae8d9d128b8841be3e6f5c5
|
4
|
+
data.tar.gz: 6521ed40213146dad2898c4af1715ed665354b2c541ef8b4b02b719374877691
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8587d56d30006c5f1d13d877c34d69be20c9c72625bcaf0ec9b5afae2b952310dfed927512e9952d5f7a68546441e4640ac749162b31c9d0177555502fe584c4
|
7
|
+
data.tar.gz: 48d00fc55deb5cfa030219e7eda2ee5cccabd9602af31eeafec2ae05e25eb1c7786e8c05609bb55da51d9db86ddb5d08d3f287ffc327c2534fd767e1feb8e447
|
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
|
-
|
16
|
-
|
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
|
43
|
-
Enabled: true
|
24
|
+
# ----- Lint ------
|
44
25
|
|
45
|
-
Lint/
|
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
|
-
|
115
|
-
Enabled: true
|
73
|
+
# ----- Metrics ------
|
116
74
|
|
117
|
-
|
118
|
-
|
75
|
+
Metrics/BlockLength:
|
76
|
+
Exclude:
|
77
|
+
- cocina-models.gemspec
|
78
|
+
- spec/cocina/**/*
|
119
79
|
|
120
|
-
|
121
|
-
|
80
|
+
Metrics/MethodLength:
|
81
|
+
Max: 14
|
122
82
|
|
123
|
-
|
124
|
-
Enabled: true
|
83
|
+
# ----- RSpec ------
|
125
84
|
|
126
|
-
|
127
|
-
|
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
|
-
|
130
|
-
Enabled:
|
91
|
+
RSpec/MultipleExpectations:
|
92
|
+
Enabled: false
|
131
93
|
|
132
|
-
|
94
|
+
RSpec/StubbedMock: # (new in 1.44)
|
133
95
|
Enabled: true
|
134
96
|
|
135
|
-
Style
|
136
|
-
Enabled: false
|
97
|
+
# ----- Style ------
|
137
98
|
|
138
|
-
Style/
|
139
|
-
|
99
|
+
Style/Documentation:
|
100
|
+
Exclude:
|
101
|
+
- lib/cocina/models/*
|
140
102
|
|
141
|
-
Style/
|
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
|
-
|
109
|
+
Style/CaseLikeIf:
|
150
110
|
Enabled: true
|
151
|
-
|
111
|
+
Style/ClassEqualityComparison: # (new in 0.93)
|
152
112
|
Enabled: true
|
153
|
-
|
113
|
+
Style/CombinableLoops: # (new in 0.90)
|
154
114
|
Enabled: true
|
155
|
-
|
115
|
+
Style/ExplicitBlockArgument:
|
156
116
|
Enabled: true
|
157
|
-
|
117
|
+
Style/ExponentialNotation:
|
158
118
|
Enabled: true
|
159
|
-
|
119
|
+
Style/GlobalStdStream:
|
160
120
|
Enabled: true
|
161
|
-
|
121
|
+
Style/HashAsLastArrayItem:
|
162
122
|
Enabled: true
|
163
|
-
|
123
|
+
Style/HashEachMethods:
|
164
124
|
Enabled: true
|
165
|
-
|
125
|
+
Style/HashLikeCase:
|
166
126
|
Enabled: true
|
167
|
-
Style/
|
127
|
+
Style/HashTransformKeys:
|
168
128
|
Enabled: true
|
169
|
-
Style/
|
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/
|
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
|
|
data/cocina-models.gemspec
CHANGED
@@ -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 = '
|
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.
|
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/
|
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,8 +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
|
-
#
|
15
|
-
attribute :
|
14
|
+
# URL or other pointer to the location of the contributor information.
|
15
|
+
attribute :valueAt, Types::Strict::String.meta(omittable: true)
|
16
16
|
end
|
17
17
|
end
|
18
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 :
|
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
|
@@ -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,6 +9,7 @@ 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
|
@@ -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
|
@@ -25,8 +25,8 @@ module Cocina
|
|
25
25
|
attribute :adminMetadata, DescriptiveAdminMetadata.optional.meta(omittable: true)
|
26
26
|
# The version of the related resource.
|
27
27
|
attribute :version, Types::Strict::String.meta(omittable: true)
|
28
|
-
#
|
29
|
-
attribute :
|
28
|
+
# URL or other pointer to the location of the related resource information.
|
29
|
+
attribute :valueAt, Types::Strict::String.meta(omittable: true)
|
30
30
|
end
|
31
31
|
end
|
32
32
|
end
|
data/lib/cocina/models/title.rb
CHANGED
@@ -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
|
data/openapi.yml
CHANGED
@@ -277,9 +277,9 @@ components:
|
|
277
277
|
type: array
|
278
278
|
items:
|
279
279
|
$ref: "#/components/schemas/DescriptiveValue"
|
280
|
-
|
281
|
-
description:
|
282
|
-
type:
|
280
|
+
valueAt:
|
281
|
+
description: URL or other pointer to the location of the contributor information.
|
282
|
+
type: string
|
283
283
|
Description:
|
284
284
|
type: object
|
285
285
|
additionalProperties: false
|
@@ -351,6 +351,9 @@ components:
|
|
351
351
|
$ref: "#/components/schemas/DescriptiveValue"
|
352
352
|
adminMetadata:
|
353
353
|
$ref: "#/components/schemas/DescriptiveAdminMetadata"
|
354
|
+
valueAt:
|
355
|
+
description: URL or other pointer to the location of the resource description.
|
356
|
+
type: string
|
354
357
|
required:
|
355
358
|
- title
|
356
359
|
DescriptiveAccessMetadata:
|
@@ -368,6 +371,11 @@ components:
|
|
368
371
|
type: array
|
369
372
|
items:
|
370
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"
|
371
379
|
accessContact:
|
372
380
|
description: The library, organization, or person responsible for access to the resource.
|
373
381
|
type: array
|
@@ -409,9 +417,11 @@ components:
|
|
409
417
|
type: array
|
410
418
|
items:
|
411
419
|
$ref: "#/components/schemas/DescriptiveValue"
|
412
|
-
|
413
|
-
|
414
|
-
|
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"
|
415
425
|
identifier:
|
416
426
|
description: Identifiers associated with this resource description.
|
417
427
|
type: array
|
@@ -420,11 +430,12 @@ components:
|
|
420
430
|
DescriptiveBasicValue:
|
421
431
|
description: Basic value model for descriptive elements.
|
422
432
|
type: object
|
423
|
-
# additionalProperties breaks the validator, unclear as to why.
|
433
|
+
# additionalProperties breaks the validator for allOf, unclear as to why.
|
424
434
|
# additionalProperties: false
|
425
435
|
allOf:
|
426
436
|
- $ref: "#/components/schemas/DescriptiveStructuredValue"
|
427
437
|
- $ref: "#/components/schemas/DescriptiveParallelValue"
|
438
|
+
- $ref: "#/components/schemas/DescriptiveGroupedValue"
|
428
439
|
- type: object
|
429
440
|
additionalProperties: false
|
430
441
|
properties:
|
@@ -476,6 +487,9 @@ components:
|
|
476
487
|
$ref: "#/components/schemas/DescriptiveValue"
|
477
488
|
valueLanguage:
|
478
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
|
479
493
|
DescriptiveGeographicMetadata:
|
480
494
|
description: Value model for mods geographic extension metadata
|
481
495
|
type: object
|
@@ -490,6 +504,15 @@ components:
|
|
490
504
|
type: array
|
491
505
|
items:
|
492
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"
|
493
516
|
DescriptiveParallelValue:
|
494
517
|
description: Value model for multiple representations of the same information (e.g. in different languages).
|
495
518
|
type: object
|
@@ -511,7 +534,8 @@ components:
|
|
511
534
|
DescriptiveValue:
|
512
535
|
description: Default value model for descriptive elements.
|
513
536
|
type: object
|
514
|
-
additionalProperties
|
537
|
+
# additionalProperties breaks the validator for allOf, unclear as to why.
|
538
|
+
# additionalProperties: false
|
515
539
|
allOf:
|
516
540
|
- $ref: "#/components/schemas/DescriptiveBasicValue"
|
517
541
|
- $ref: "#/components/schemas/AppliesTo"
|
@@ -542,6 +566,12 @@ components:
|
|
542
566
|
- type: object
|
543
567
|
required:
|
544
568
|
- parallelValue
|
569
|
+
- type: object
|
570
|
+
required:
|
571
|
+
- groupedValue
|
572
|
+
- type: object
|
573
|
+
required:
|
574
|
+
- valueAt
|
545
575
|
DRO:
|
546
576
|
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.
|
547
577
|
type: object
|
@@ -914,6 +944,11 @@ components:
|
|
914
944
|
encoding:
|
915
945
|
# description: present for mapping to additional schemas in the future and for consistency but not otherwise used
|
916
946
|
$ref: "#/components/schemas/Standard"
|
947
|
+
groupedValue:
|
948
|
+
description: present for mapping to additional schemas in the future and for consistency but not otherwise used
|
949
|
+
type: array
|
950
|
+
items:
|
951
|
+
$ref: "#/components/schemas/DescriptiveValue"
|
917
952
|
note:
|
918
953
|
description: present for mapping to additional schemas in the future and for consistency but not otherwise used
|
919
954
|
type: array
|
@@ -953,6 +988,9 @@ components:
|
|
953
988
|
value:
|
954
989
|
description: Value of the descriptive element.
|
955
990
|
type: string
|
991
|
+
valueAt:
|
992
|
+
description: URL or other pointer to the location of the language information.
|
993
|
+
type: string
|
956
994
|
valueLanguage:
|
957
995
|
# description: present for mapping to additional schemas in the future and for consistency but not otherwise used
|
958
996
|
$ref: "#/components/schemas/DescriptiveValueLanguage"
|
@@ -1060,9 +1098,9 @@ components:
|
|
1060
1098
|
version:
|
1061
1099
|
description: The version of the related resource.
|
1062
1100
|
type: string
|
1063
|
-
|
1064
|
-
description:
|
1065
|
-
type:
|
1101
|
+
valueAt:
|
1102
|
+
description: URL or other pointer to the location of the related resource information.
|
1103
|
+
type: string
|
1066
1104
|
ReleaseTag:
|
1067
1105
|
description: A tag that indicates the item or collection should be released.
|
1068
1106
|
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.
|
4
|
+
version: 0.47.1
|
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: 2021-02-12 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.
|
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.
|
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: '
|
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: '
|
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
|