cocina-models 0.10.0 → 0.11.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/cocina/models/dro.rb +4 -0
- data/lib/cocina/models/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b705b5e5c6b8b0bed0220cdd2c7b36be0512d9932a84b27d4222ba5280e3bb6c
|
4
|
+
data.tar.gz: aa26768a6c9bb610a1acc2279a63222c8433e4cec7fb1bc07f112734518cbab3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a13768587085437e010f94178e70616033c9db598168ea8889cc1138f053e1dcd518242b0e6feeff4e43dc6639ee04f1bcaed3813e83e4f68e13a9a5c2a23cb0
|
7
|
+
data.tar.gz: e1e8fe2a0984b747b63517864a15289096dd3a4d2ca808f4c46a4efd6db1359e69d75de9d53da238004630f7448b9b8d24e82a63c06061b39bf2d5b262e9e963
|
data/lib/cocina/models/dro.rb
CHANGED
@@ -58,10 +58,14 @@ module Cocina
|
|
58
58
|
# Subschema for administrative concerns
|
59
59
|
class Administrative < Dry::Struct
|
60
60
|
attribute :releaseTags, Types::Strict::Array.of(ReleaseTag).meta(omittable: true)
|
61
|
+
# Allowing hasAdminPolicy to be omittable for now (until rolled out to consumers),
|
62
|
+
# but I think it's actually required for every DRO
|
63
|
+
attribute :hasAdminPolicy, Types::Coercible::String.optional.default(nil)
|
61
64
|
|
62
65
|
def self.from_dynamic(dyn)
|
63
66
|
params = {}
|
64
67
|
params[:releaseTags] = dyn['releaseTags'].map { |rt| ReleaseTag.from_dynamic(rt) } if dyn['releaseTags']
|
68
|
+
params[:hasAdminPolicy] = dyn['hasAdminPolicy']
|
65
69
|
Administrative.new(params)
|
66
70
|
end
|
67
71
|
end
|