cocina-models 0.65.1 → 0.67.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 896e1abaec6ec5cd04b1d3279e30723f0308ee96131656f8197a522fd910ff34
4
- data.tar.gz: e01d1e2ca3455bacd76c8fd95f4a07b2444983a356e338d03950fc4025acd40c
3
+ metadata.gz: d0918f2e0410e32c848cdc40fbfe8bfdc757e7ee06ccf711cdecb7e43e7bee4c
4
+ data.tar.gz: 2a08f3a7b91c3c6030efe20dff496ae1a99b1db3a047c52923d58bfddb4ba6e1
5
5
  SHA512:
6
- metadata.gz: b82cf62f83fe5d2854fb618df552e487476be6ebc0d0926978e56de62cfae9df9d19eeaceddf506eeb99e84037d4561353563a83a1b93e11ca1feebbe377c2ac
7
- data.tar.gz: 2b479b5e1a73da2e3df558d515d403862312d81b5feb5faf62f1931065b6b074a80961a0a8b8c5492b505482f3adbe3d64f850c96d68c3a296faccf6ce3d6627
6
+ metadata.gz: ef82df30de5d44271072f422aa67406f556ec73349ebe5b5eaabe2790675c4052269be55226f5027d5906d8c5aeac2b771ed80f51ed9a3333e7679e8edf3f3a9
7
+ data.tar.gz: 602468290c035d30f1af27d0df2904cf07ba163e352eabe97087cdbe6244c02d796cfbb2226ec775e072dd3b9202c795d7af7423e7e7b0a1cc84c692882dd0ef
@@ -1,11 +1,12 @@
1
1
  **NOTE: Changes to openapi.yml require updating openapi.yml for sdr-api and dor-services-app and generating models - see README.**
2
2
 
3
- ## Why was this change made?
3
+ ## Why was this change made? 🤔
4
4
 
5
5
 
6
6
 
7
- ## How was this change tested?
7
+ ## How was this change tested? 🤨
8
+
9
+ ⚡ ⚠ If this change has cross service impact, ***run [integration tests](https://github.com/sul-dlss/infrastructure-integration-test)*** and/or test in [stage|qa] environment, in addition to specs. ⚡
8
10
 
9
11
 
10
12
 
11
- ## Which documentation and/or configurations were updated?
data/.rubocop.yml CHANGED
@@ -83,6 +83,7 @@ Metrics/MethodLength:
83
83
  Max: 14
84
84
  Exclude:
85
85
  - 'spec/cocina/models/file_access_spec.rb'
86
+ - 'spec/cocina/models/dro_access_spec.rb'
86
87
 
87
88
  # ----- RSpec ------
88
89
 
@@ -28,7 +28,9 @@ Gem::Specification.new do |spec|
28
28
  spec.add_dependency 'dry-struct', '~> 1.0'
29
29
  spec.add_dependency 'dry-types', '~> 1.1'
30
30
  spec.add_dependency 'openapi3_parser' # Parsing openapi doc
31
- spec.add_dependency 'openapi_parser' # Validating openapi requests
31
+ # Match these version requirements to what committee wants,
32
+ # so that our client (non-committee) users have the same dependencies.
33
+ spec.add_dependency 'openapi_parser', '>= 0.11.1', '< 1.0'
32
34
  spec.add_dependency 'thor'
33
35
  spec.add_dependency 'zeitwerk', '~> 2.1'
34
36
 
@@ -76,6 +76,7 @@ module Cocina
76
76
  run("rubocop -a #{filepath} > /dev/null")
77
77
  end
78
78
 
79
+ # rubocop:disable Metrics/AbcSize
79
80
  def clean_output
80
81
  FileUtils.mkdir_p(options[:output])
81
82
  files = Dir.glob("#{options[:output]}/*.rb")
@@ -83,8 +84,10 @@ module Cocina
83
84
  files.delete("#{options[:output]}/version.rb")
84
85
  files.delete("#{options[:output]}/checkable.rb")
85
86
  files.delete("#{options[:output]}/validator.rb")
87
+ files.delete("#{options[:output]}/validatable.rb")
86
88
  FileUtils.rm_f(files)
87
89
  end
90
+ # rubocop:enable Metrics/AbcSize
88
91
  end
89
92
  end
90
93
  end
@@ -16,11 +16,10 @@ module Cocina
16
16
  module Models
17
17
  class #{name} < Struct
18
18
 
19
+ #{validate}
19
20
  #{types}
20
21
 
21
22
  #{model_attributes}
22
-
23
- #{validate}
24
23
  end
25
24
  end
26
25
  end
@@ -64,10 +63,7 @@ module Cocina
64
63
  return '' unless validatable?
65
64
 
66
65
  <<~RUBY
67
- def self.new(attributes = default_attributes, safe = false, validate = true, &block)
68
- Validator.validate(self, attributes.with_indifferent_access) if validate && name
69
- super(attributes, safe, &block)
70
- end
66
+ include Validatable
71
67
  RUBY
72
68
  end
73
69
 
@@ -3,6 +3,8 @@
3
3
  module Cocina
4
4
  module Models
5
5
  class AdminPolicy < Struct
6
+ include Validatable
7
+
6
8
  include Checkable
7
9
 
8
10
  TYPES = ['http://cocina.sul.stanford.edu/models/admin_policy.jsonld'].freeze
@@ -17,11 +19,6 @@ module Cocina
17
19
  attribute :version, Types::Strict::Integer
18
20
  attribute(:administrative, AdminPolicyAdministrative.default { AdminPolicyAdministrative.new })
19
21
  attribute :description, Description.optional.meta(omittable: true)
20
-
21
- def self.new(attributes = default_attributes, safe = false, validate = true, &block)
22
- Validator.validate(self, attributes.with_indifferent_access) if validate && name
23
- super(attributes, safe, &block)
24
- end
25
22
  end
26
23
  end
27
24
  end
@@ -3,9 +3,7 @@
3
3
  module Cocina
4
4
  module Models
5
5
  class AdminPolicyAdministrative < Struct
6
- # This is an XML expression of the default access (see defaultAccess)
7
- attribute :defaultObjectRights, Types::Strict::String.default('<?xml version="1.0" encoding="UTF-8"?><rightsMetadata><access type="discover"><machine><world/></machine></access><access type="read"><machine><world/></machine></access><use><human type="useAndReproduction"/><human type="creativeCommons"/><machine type="creativeCommons" uri=""/><human type="openDataCommons"/><machine type="openDataCommons" uri=""/></use><copyright><human/></copyright></rightsMetadata>').meta(omittable: true)
8
- attribute :defaultAccess, AdminPolicyDefaultAccess.optional.meta(omittable: true)
6
+ attribute(:defaultAccess, AdminPolicyDefaultAccess.default { AdminPolicyDefaultAccess.new })
9
7
  attribute :registrationWorkflow, Types::Strict::Array.of(Types::Strict::String).default([].freeze)
10
8
  # An additional workflow to start for objects managed by this admin policy once the end-accession workflow step is complete
11
9
  # example: wasCrawlPreassemblyWF
@@ -8,7 +8,7 @@ module Cocina
8
8
  attribute :releaseTags, Types::Strict::Array.of(ReleaseTag).default([].freeze)
9
9
  # Administrative or Internal project this resource is a part of
10
10
  # example: Google Books
11
- attribute :partOfProject, Types::Strict::String.meta(omittable: true)
11
+ attribute :partOfProject, Types::Strict::String.optional.meta(omittable: true)
12
12
  end
13
13
  end
14
14
  end
@@ -3,6 +3,8 @@
3
3
  module Cocina
4
4
  module Models
5
5
  class Collection < Struct
6
+ include Validatable
7
+
6
8
  include Checkable
7
9
 
8
10
  TYPES = ['http://cocina.sul.stanford.edu/models/collection.jsonld',
@@ -24,13 +26,8 @@ module Cocina
24
26
  attribute :version, Types::Strict::Integer
25
27
  attribute(:access, CollectionAccess.default { CollectionAccess.new })
26
28
  attribute :administrative, Administrative.optional.meta(omittable: true)
27
- attribute :description, Description.optional.meta(omittable: true)
29
+ attribute(:description, Description.default { Description.new })
28
30
  attribute :identification, CollectionIdentification.optional.meta(omittable: true)
29
-
30
- def self.new(attributes = default_attributes, safe = false, validate = true, &block)
31
- Validator.validate(self, attributes.with_indifferent_access) if validate && name
32
- super(attributes, safe, &block)
33
- end
34
31
  end
35
32
  end
36
33
  end
@@ -10,9 +10,9 @@ module Cocina
10
10
  attribute :copyright, Types::Strict::String.optional.meta(omittable: true)
11
11
  # The human readable use and reproduction statement that applies
12
12
  # example: Property rights reside with the repository. Literary rights reside with the creators of the documents or their heirs. To obtain permission to publish or reproduce, please contact the Public Services Librarian of the Dept. of Special Collections (http://library.stanford.edu/spc).
13
- attribute :useAndReproductionStatement, Types::Strict::String.meta(omittable: true)
13
+ attribute :useAndReproductionStatement, Types::Strict::String.optional.meta(omittable: true)
14
14
  # The license governing reuse of the Collection. Should be an IRI for known licenses (i.e. CC, RightsStatement.org URI, etc.).
15
- attribute :license, Types::Strict::String.meta(omittable: true)
15
+ attribute :license, Types::Strict::String.optional.meta(omittable: true)
16
16
  end
17
17
  end
18
18
  end
@@ -3,6 +3,8 @@
3
3
  module Cocina
4
4
  module Models
5
5
  class Description < Struct
6
+ include Validatable
7
+
6
8
  attribute :title, Types::Strict::Array.of(Title).default([].freeze)
7
9
  attribute :contributor, Types::Strict::Array.of(Contributor).default([].freeze)
8
10
  attribute :event, Types::Strict::Array.of(Event).default([].freeze)
@@ -20,11 +22,6 @@ module Cocina
20
22
  attribute :valueAt, Types::Strict::String.meta(omittable: true)
21
23
  # Stanford persistent URL associated with the related resource. Note this is http, not https.
22
24
  attribute :purl, Types::Strict::String
23
-
24
- def self.new(attributes = default_attributes, safe = false, validate = true, &block)
25
- Validator.validate(self, attributes.with_indifferent_access) if validate && name
26
- super(attributes, safe, &block)
27
- end
28
25
  end
29
26
  end
30
27
  end
@@ -3,6 +3,8 @@
3
3
  module Cocina
4
4
  module Models
5
5
  class DRO < Struct
6
+ include Validatable
7
+
6
8
  include Checkable
7
9
 
8
10
  TYPES = ['http://cocina.sul.stanford.edu/models/object.jsonld',
@@ -34,15 +36,10 @@ module Cocina
34
36
  attribute :version, Types::Strict::Integer
35
37
  attribute(:access, DROAccess.default { DROAccess.new })
36
38
  attribute(:administrative, Administrative.default { Administrative.new })
37
- attribute :description, Description.optional.meta(omittable: true)
39
+ attribute(:description, Description.default { Description.new })
38
40
  attribute :identification, Identification.optional.meta(omittable: true)
39
41
  attribute :structural, DROStructural.optional.meta(omittable: true)
40
42
  attribute :geographic, Geographic.optional.meta(omittable: true)
41
-
42
- def self.new(attributes = default_attributes, safe = false, validate = true, &block)
43
- Validator.validate(self, attributes.with_indifferent_access) if validate && name
44
- super(attributes, safe, &block)
45
- end
46
43
  end
47
44
  end
48
45
  end
@@ -20,7 +20,7 @@ module Cocina
20
20
  attribute :embargo, Embargo.optional.meta(omittable: true)
21
21
  # The human readable use and reproduction statement that applies
22
22
  # example: Property rights reside with the repository. Literary rights reside with the creators of the documents or their heirs. To obtain permission to publish or reproduce, please contact the Public Services Librarian of the Dept. of Special Collections (http://library.stanford.edu/spc).
23
- attribute :useAndReproductionStatement, Types::Strict::String.meta(omittable: true)
23
+ attribute :useAndReproductionStatement, Types::Strict::String.optional.meta(omittable: true)
24
24
  # The license governing reuse of the DRO. Should be an IRI for known licenses (i.e. CC, RightsStatement.org URI, etc.).
25
25
  attribute :license, Types::Strict::String.optional.enum('https://www.gnu.org/licenses/agpl.txt', 'https://www.apache.org/licenses/LICENSE-2.0', 'https://opensource.org/licenses/BSD-2-Clause', 'https://opensource.org/licenses/BSD-3-Clause', 'https://creativecommons.org/licenses/by/4.0/legalcode', 'https://creativecommons.org/licenses/by-nc/4.0/legalcode', 'https://creativecommons.org/licenses/by-nc-nd/4.0/legalcode', 'https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode', 'https://creativecommons.org/licenses/by-nd/4.0/legalcode', 'https://creativecommons.org/licenses/by-sa/4.0/legalcode', 'https://creativecommons.org/publicdomain/zero/1.0/legalcode', 'https://opensource.org/licenses/cddl1', 'https://www.eclipse.org/legal/epl-2.0', 'https://www.gnu.org/licenses/gpl-3.0-standalone.html', 'https://www.isc.org/downloads/software-support-policy/isc-license/', 'https://www.gnu.org/licenses/lgpl-3.0-standalone.html', 'https://opensource.org/licenses/MIT', 'https://www.mozilla.org/MPL/2.0/', 'https://opendatacommons.org/licenses/by/1-0/', 'http://opendatacommons.org/licenses/odbl/1.0/', 'https://opendatacommons.org/licenses/odbl/1-0/', 'https://creativecommons.org/publicdomain/mark/1.0/', 'https://opendatacommons.org/licenses/pddl/1-0/', 'https://creativecommons.org/licenses/by/3.0/legalcode', 'https://creativecommons.org/licenses/by-sa/3.0/legalcode', 'https://creativecommons.org/licenses/by-nd/3.0/legalcode', 'https://creativecommons.org/licenses/by-nc/3.0/legalcode', 'https://creativecommons.org/licenses/by-nc-sa/3.0/legalcode', 'https://creativecommons.org/licenses/by-nc-nd/3.0/legalcode', 'http://cocina.sul.stanford.edu/licenses/none').meta(omittable: true)
26
26
  end
@@ -19,7 +19,7 @@ module Cocina
19
19
  attribute :releaseDate, Types::Params::DateTime
20
20
  # The human readable use and reproduction statement that applies when the embargo expires.
21
21
  # example: These materials are in the public domain.
22
- attribute :useAndReproductionStatement, Types::Strict::String.meta(omittable: true)
22
+ attribute :useAndReproductionStatement, Types::Strict::String.optional.meta(omittable: true)
23
23
  end
24
24
  end
25
25
  end
@@ -3,6 +3,8 @@
3
3
  module Cocina
4
4
  module Models
5
5
  class RequestAdminPolicy < Struct
6
+ include Validatable
7
+
6
8
  include Checkable
7
9
 
8
10
  TYPES = ['http://cocina.sul.stanford.edu/models/admin_policy.jsonld'].freeze
@@ -12,14 +14,9 @@ module Cocina
12
14
  attribute :cocinaVersion, Types::Strict::String.default(Cocina::Models::VERSION)
13
15
  attribute :type, Types::Strict::String.enum(*RequestAdminPolicy::TYPES)
14
16
  attribute :label, Types::Strict::String
15
- attribute :version, Types::Strict::Integer
17
+ attribute :version, Types::Strict::Integer.default(1).enum(1)
16
18
  attribute(:administrative, AdminPolicyAdministrative.default { AdminPolicyAdministrative.new })
17
19
  attribute :description, RequestDescription.optional.meta(omittable: true)
18
-
19
- def self.new(attributes = default_attributes, safe = false, validate = true, &block)
20
- Validator.validate(self, attributes.with_indifferent_access) if validate && name
21
- super(attributes, safe, &block)
22
- end
23
20
  end
24
21
  end
25
22
  end
@@ -3,6 +3,8 @@
3
3
  module Cocina
4
4
  module Models
5
5
  class RequestCollection < Struct
6
+ include Validatable
7
+
6
8
  include Checkable
7
9
 
8
10
  TYPES = ['http://cocina.sul.stanford.edu/models/collection.jsonld',
@@ -16,16 +18,11 @@ module Cocina
16
18
  attribute :cocinaVersion, Types::Strict::String.default(Cocina::Models::VERSION)
17
19
  attribute :type, Types::Strict::String.enum(*RequestCollection::TYPES)
18
20
  attribute :label, Types::Strict::String
19
- attribute :version, Types::Strict::Integer
21
+ attribute :version, Types::Strict::Integer.default(1).enum(1)
20
22
  attribute(:access, CollectionAccess.default { CollectionAccess.new })
21
23
  attribute(:administrative, Administrative.default { Administrative.new })
22
24
  attribute :description, RequestDescription.optional.meta(omittable: true)
23
25
  attribute :identification, CollectionIdentification.optional.meta(omittable: true)
24
-
25
- def self.new(attributes = default_attributes, safe = false, validate = true, &block)
26
- Validator.validate(self, attributes.with_indifferent_access) if validate && name
27
- super(attributes, safe, &block)
28
- end
29
26
  end
30
27
  end
31
28
  end
@@ -3,6 +3,8 @@
3
3
  module Cocina
4
4
  module Models
5
5
  class RequestDescription < Struct
6
+ include Validatable
7
+
6
8
  attribute :title, Types::Strict::Array.of(Title).default([].freeze)
7
9
  attribute :contributor, Types::Strict::Array.of(Contributor).default([].freeze)
8
10
  attribute :event, Types::Strict::Array.of(Event).default([].freeze)
@@ -18,11 +20,6 @@ module Cocina
18
20
  attribute :adminMetadata, DescriptiveAdminMetadata.optional.meta(omittable: true)
19
21
  # URL or other pointer to the location of the resource description.
20
22
  attribute :valueAt, Types::Strict::String.meta(omittable: true)
21
-
22
- def self.new(attributes = default_attributes, safe = false, validate = true, &block)
23
- Validator.validate(self, attributes.with_indifferent_access) if validate && name
24
- super(attributes, safe, &block)
25
- end
26
23
  end
27
24
  end
28
25
  end
@@ -3,6 +3,8 @@
3
3
  module Cocina
4
4
  module Models
5
5
  class RequestDRO < Struct
6
+ include Validatable
7
+
6
8
  include Checkable
7
9
 
8
10
  TYPES = ['http://cocina.sul.stanford.edu/models/object.jsonld',
@@ -26,18 +28,13 @@ module Cocina
26
28
  attribute :cocinaVersion, Types::Strict::String.default(Cocina::Models::VERSION)
27
29
  attribute :type, Types::Strict::String.enum(*RequestDRO::TYPES)
28
30
  attribute :label, Types::Strict::String
29
- attribute :version, Types::Strict::Integer
31
+ attribute :version, Types::Strict::Integer.default(1).enum(1)
30
32
  attribute :access, DROAccess.optional.meta(omittable: true)
31
33
  attribute(:administrative, Administrative.default { Administrative.new })
32
34
  attribute :description, RequestDescription.optional.meta(omittable: true)
33
35
  attribute(:identification, RequestIdentification.default { RequestIdentification.new })
34
36
  attribute :structural, RequestDROStructural.optional.meta(omittable: true)
35
37
  attribute :geographic, Geographic.optional.meta(omittable: true)
36
-
37
- def self.new(attributes = default_attributes, safe = false, validate = true, &block)
38
- Validator.validate(self, attributes.with_indifferent_access) if validate && name
39
- super(attributes, safe, &block)
40
- end
41
38
  end
42
39
  end
43
40
  end
@@ -0,0 +1,24 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Cocina
4
+ module Models
5
+ # Validate upon construction
6
+ module Validatable
7
+ extend ActiveSupport::Concern
8
+
9
+ class_methods do
10
+ def new(attributes = default_attributes, safe = false, validate = true, &block)
11
+ Validator.validate(self, attributes.with_indifferent_access) if validate && name
12
+ super(attributes, safe, &block)
13
+ end
14
+ end
15
+
16
+ def new(*args)
17
+ validate = args.first.delete(:validate) if args.present?
18
+ new_model = super(*args)
19
+ Validator.validate(new_model.class, new_model.to_h) if (validate || validate.nil?) && self.class.name
20
+ new_model
21
+ end
22
+ end
23
+ end
24
+ end
@@ -35,7 +35,7 @@ module Cocina
35
35
 
36
36
  # rubocop:disable Style/ClassVars
37
37
  def self.root
38
- @@root ||= OpenAPIParser.parse(YAML.load_file(openapi_path))
38
+ @@root ||= OpenAPIParser.parse(YAML.load_file(openapi_path), strict_reference_validation: true)
39
39
  end
40
40
  # rubocop:enable Style/ClassVars
41
41
  private_class_method :root
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Cocina
4
4
  module Models
5
- VERSION = '0.65.1'
5
+ VERSION = '0.67.1'
6
6
  end
7
7
  end
data/openapi.yml CHANGED
@@ -178,6 +178,7 @@ components:
178
178
  description: Administrative or Internal project this resource is a part of
179
179
  example: Google Books
180
180
  type: string
181
+ nullable: true
181
182
  required:
182
183
  - hasAdminPolicy
183
184
  AdminPolicy:
@@ -212,11 +213,6 @@ components:
212
213
  type: object
213
214
  additionalProperties: false
214
215
  properties:
215
- defaultObjectRights:
216
- type: string
217
- description: This is an XML expression of the default access (see defaultAccess)
218
- deprecated: true
219
- default: <?xml version="1.0" encoding="UTF-8"?><rightsMetadata><access type="discover"><machine><world/></machine></access><access type="read"><machine><world/></machine></access><use><human type="useAndReproduction"/><human type="creativeCommons"/><machine type="creativeCommons" uri=""/><human type="openDataCommons"/><machine type="openDataCommons" uri=""/></use><copyright><human/></copyright></rightsMetadata>
220
216
  defaultAccess:
221
217
  $ref: '#/components/schemas/AdminPolicyDefaultAccess'
222
218
  registrationWorkflow:
@@ -245,6 +241,7 @@ components:
245
241
  required:
246
242
  - hasAdminPolicy
247
243
  - hasAgreement
244
+ - defaultAccess
248
245
  AdminPolicyDefaultAccess:
249
246
  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.'
250
247
  type: object
@@ -415,6 +412,7 @@ components:
415
412
  $ref: '#/components/schemas/CollectionIdentification'
416
413
  required:
417
414
  - cocinaVersion
415
+ - description
418
416
  - externalIdentifier
419
417
  - label
420
418
  - type
@@ -441,9 +439,11 @@ components:
441
439
  description: The human readable use and reproduction statement that applies
442
440
  example: Property rights reside with the repository. Literary rights reside with the creators of the documents or their heirs. To obtain permission to publish or reproduce, please contact the Public Services Librarian of the Dept. of Special Collections (http://library.stanford.edu/spc).
443
441
  type: string
442
+ nullable: true
444
443
  license:
445
444
  description: The license governing reuse of the Collection. Should be an IRI for known licenses (i.e. CC, RightsStatement.org URI, etc.).
446
445
  type: string
446
+ nullable: true
447
447
  CollectionIdentification:
448
448
  type: object
449
449
  additionalProperties: false
@@ -893,6 +893,7 @@ components:
893
893
  - cocinaVersion
894
894
  - access
895
895
  - administrative
896
+ - description
896
897
  - externalIdentifier
897
898
  - label
898
899
  - type
@@ -915,6 +916,7 @@ components:
915
916
  description: The human readable use and reproduction statement that applies
916
917
  example: Property rights reside with the repository. Literary rights reside with the creators of the documents or their heirs. To obtain permission to publish or reproduce, please contact the Public Services Librarian of the Dept. of Special Collections (http://library.stanford.edu/spc).
917
918
  type: string
919
+ nullable: true
918
920
  license:
919
921
  description: The license governing reuse of the DRO. Should be an IRI for known licenses (i.e. CC, RightsStatement.org URI, etc.).
920
922
  type: string
@@ -990,6 +992,7 @@ components:
990
992
  description: The human readable use and reproduction statement that applies when the embargo expires.
991
993
  example: These materials are in the public domain.
992
994
  type: string
995
+ nullable: true
993
996
  required:
994
997
  - releaseDate
995
998
  Event:
@@ -1481,6 +1484,9 @@ components:
1481
1484
  type: string
1482
1485
  version:
1483
1486
  type: integer
1487
+ default: 1
1488
+ enum:
1489
+ - 1
1484
1490
  administrative:
1485
1491
  $ref: '#/components/schemas/AdminPolicyAdministrative'
1486
1492
  description:
@@ -1510,6 +1516,9 @@ components:
1510
1516
  type: string
1511
1517
  version:
1512
1518
  type: integer
1519
+ default: 1
1520
+ enum:
1521
+ - 1
1513
1522
  access:
1514
1523
  $ref: '#/components/schemas/CollectionAccess'
1515
1524
  administrative:
@@ -1627,6 +1636,9 @@ components:
1627
1636
  type: string
1628
1637
  version:
1629
1638
  type: integer
1639
+ default: 1
1640
+ enum:
1641
+ - 1
1630
1642
  access:
1631
1643
  $ref: '#/components/schemas/DROAccess'
1632
1644
  administrative:
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.65.1
4
+ version: 0.67.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: 2022-02-09 00:00:00.000000000 Z
11
+ date: 2022-03-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -72,14 +72,20 @@ dependencies:
72
72
  requirements:
73
73
  - - ">="
74
74
  - !ruby/object:Gem::Version
75
- version: '0'
75
+ version: 0.11.1
76
+ - - "<"
77
+ - !ruby/object:Gem::Version
78
+ version: '1.0'
76
79
  type: :runtime
77
80
  prerelease: false
78
81
  version_requirements: !ruby/object:Gem::Requirement
79
82
  requirements:
80
83
  - - ">="
81
84
  - !ruby/object:Gem::Version
82
- version: '0'
85
+ version: 0.11.1
86
+ - - "<"
87
+ - !ruby/object:Gem::Version
88
+ version: '1.0'
83
89
  - !ruby/object:Gem::Dependency
84
90
  name: thor
85
91
  requirement: !ruby/object:Gem::Requirement
@@ -338,6 +344,7 @@ files:
338
344
  - lib/cocina/models/standard_barcode.rb
339
345
  - lib/cocina/models/stanford_access.rb
340
346
  - lib/cocina/models/title.rb
347
+ - lib/cocina/models/validatable.rb
341
348
  - lib/cocina/models/validator.rb
342
349
  - lib/cocina/models/version.rb
343
350
  - lib/cocina/models/vocab.rb
@@ -362,7 +369,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
362
369
  - !ruby/object:Gem::Version
363
370
  version: '0'
364
371
  requirements: []
365
- rubygems_version: 3.2.32
372
+ rubygems_version: 3.3.4
366
373
  signing_key:
367
374
  specification_version: 4
368
375
  summary: Data models for the SDR