cocina-models 0.44.0 → 0.47.2

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: b11ea0c5efe76fc9a4a59bc70e4c60e7c25c8a97491259687ae63899c45f5e2e
4
- data.tar.gz: 2edc2ee62490fbf0c0cf29942cc1820d7bdfbd28e0cddb39db8df1753e6e64b0
3
+ metadata.gz: cf7d1d0d676c42b4331df2079f9b8cdede0bc8b92c85478700dadc15ba972d92
4
+ data.tar.gz: df0756d9ab7cc3dd3b999c0427a18859df2470476069a347468a4805bf8f88b8
5
5
  SHA512:
6
- metadata.gz: 822ff54e876a9c4384dc9f7530a2ab9bd11b86e21cf4e7d426f5975dbf98ac8f387968a45e0ea1afae57a2d5a72283b8af71a8ab0776e45c81f24f9fa26c4160
7
- data.tar.gz: c88924f5de3c54a11c026864df8713eabf89693f51a3cd789c6e92d6a15618a0ba7ee725d0c742de9480de2f7fee8ece3a5c8b7ffac2e08fe381a53654ced9b0
6
+ metadata.gz: ebd2278320311858eed8ee824f64336f2bade54bbb711de95e36cb2148f94307585b530ce770d4626fa75cc09285b563b3bc9583bd322e3782b66a5417eaef06
7
+ data.tar.gz: 724f8d92f5978f2a395b954dc4c7004a85f4198f43595244a900e7638b6860a0270b03d766bc6a61fb2b0d596cdbc2fc0a15b9dab667ca61b4fff5ca8273d0ec
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
@@ -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,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,6 +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
+ # URL or other pointer to the location of the related resource information.
29
+ attribute :valueAt, Types::Strict::String.meta(omittable: true)
28
30
  end
29
31
  end
30
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.44.0'
5
+ VERSION = '0.47.2'
6
6
  end
7
7
  end
data/openapi.yml CHANGED
@@ -277,6 +277,9 @@ components:
277
277
  type: array
278
278
  items:
279
279
  $ref: "#/components/schemas/DescriptiveValue"
280
+ valueAt:
281
+ description: URL or other pointer to the location of the contributor information.
282
+ type: string
280
283
  Description:
281
284
  type: object
282
285
  additionalProperties: false
@@ -348,6 +351,9 @@ components:
348
351
  $ref: "#/components/schemas/DescriptiveValue"
349
352
  adminMetadata:
350
353
  $ref: "#/components/schemas/DescriptiveAdminMetadata"
354
+ valueAt:
355
+ description: URL or other pointer to the location of the resource description.
356
+ type: string
351
357
  required:
352
358
  - title
353
359
  DescriptiveAccessMetadata:
@@ -411,9 +417,11 @@ components:
411
417
  type: array
412
418
  items:
413
419
  $ref: "#/components/schemas/DescriptiveValue"
414
- standard:
415
- # description: Descriptive or content standard to which this resource description conforms.
416
- $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"
417
425
  identifier:
418
426
  description: Identifiers associated with this resource description.
419
427
  type: array
@@ -422,13 +430,15 @@ components:
422
430
  DescriptiveBasicValue:
423
431
  description: Basic value model for descriptive elements.
424
432
  type: object
425
- # additionalProperties breaks the validator, unclear as to why.
433
+ # additionalProperties breaks the validator for allOf, unclear as to why.
426
434
  # additionalProperties: false
427
435
  allOf:
428
436
  - $ref: "#/components/schemas/DescriptiveStructuredValue"
429
437
  - $ref: "#/components/schemas/DescriptiveParallelValue"
438
+ - $ref: "#/components/schemas/DescriptiveGroupedValue"
430
439
  - type: object
431
- additionalProperties: false
440
+ # additionalProperties breaks the validator for DescriptiveValue, unclear as to why.
441
+ # additionalProperties: false
432
442
  properties:
433
443
  value:
434
444
  description: String or integer value of the descriptive element.
@@ -478,6 +488,9 @@ components:
478
488
  $ref: "#/components/schemas/DescriptiveValue"
479
489
  valueLanguage:
480
490
  $ref: "#/components/schemas/DescriptiveValueLanguage"
491
+ valueAt:
492
+ description: URL or other pointer to the location of the value of the descriptive element.
493
+ type: string
481
494
  DescriptiveGeographicMetadata:
482
495
  description: Value model for mods geographic extension metadata
483
496
  type: object
@@ -492,6 +505,15 @@ components:
492
505
  type: array
493
506
  items:
494
507
  $ref: "#/components/schemas/DescriptiveValue"
508
+ DescriptiveGroupedValue:
509
+ description: Value model for a set of descriptive elements grouped together in an unstructured way.
510
+ type: object
511
+ additionalProperties: false
512
+ properties:
513
+ groupedValue:
514
+ type: array
515
+ items:
516
+ $ref: "#/components/schemas/DescriptiveValue"
495
517
  DescriptiveParallelValue:
496
518
  description: Value model for multiple representations of the same information (e.g. in different languages).
497
519
  type: object
@@ -544,6 +566,12 @@ components:
544
566
  - type: object
545
567
  required:
546
568
  - parallelValue
569
+ - type: object
570
+ required:
571
+ - groupedValue
572
+ - type: object
573
+ required:
574
+ - valueAt
547
575
  DRO:
548
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.
549
577
  type: object
@@ -916,6 +944,11 @@ components:
916
944
  encoding:
917
945
  # description: present for mapping to additional schemas in the future and for consistency but not otherwise used
918
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"
919
952
  note:
920
953
  description: present for mapping to additional schemas in the future and for consistency but not otherwise used
921
954
  type: array
@@ -955,6 +988,9 @@ components:
955
988
  value:
956
989
  description: Value of the descriptive element.
957
990
  type: string
991
+ valueAt:
992
+ description: URL or other pointer to the location of the language information.
993
+ type: string
958
994
  valueLanguage:
959
995
  # description: present for mapping to additional schemas in the future and for consistency but not otherwise used
960
996
  $ref: "#/components/schemas/DescriptiveValueLanguage"
@@ -1062,6 +1098,9 @@ components:
1062
1098
  version:
1063
1099
  description: The version of the related resource.
1064
1100
  type: string
1101
+ valueAt:
1102
+ description: URL or other pointer to the location of the related resource information.
1103
+ type: string
1065
1104
  ReleaseTag:
1066
1105
  description: A tag that indicates the item or collection should be released.
1067
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.44.0
4
+ version: 0.47.2
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-12-11 00:00:00.000000000 Z
11
+ date: 2021-02-13 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
@@ -325,7 +326,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
325
326
  - !ruby/object:Gem::Version
326
327
  version: '0'
327
328
  requirements: []
328
- rubygems_version: 3.1.2
329
+ rubygems_version: 3.0.3
329
330
  signing_key:
330
331
  specification_version: 4
331
332
  summary: Data models for the SDR