cocina-models 0.11.0 → 0.12.0

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: b705b5e5c6b8b0bed0220cdd2c7b36be0512d9932a84b27d4222ba5280e3bb6c
4
- data.tar.gz: aa26768a6c9bb610a1acc2279a63222c8433e4cec7fb1bc07f112734518cbab3
3
+ metadata.gz: 77698fc3e680b8237e120b83f3e2ad4764a64e2d5c3de90473ec8f19d07e1b4d
4
+ data.tar.gz: 931d0411a532ebdc9cc55324fd7dacc052b4456689b6e690cdb0f1a8d6cc4a3f
5
5
  SHA512:
6
- metadata.gz: a13768587085437e010f94178e70616033c9db598168ea8889cc1138f053e1dcd518242b0e6feeff4e43dc6639ee04f1bcaed3813e83e4f68e13a9a5c2a23cb0
7
- data.tar.gz: e1e8fe2a0984b747b63517864a15289096dd3a4d2ca808f4c46a4efd6db1359e69d75de9d53da238004630f7448b9b8d24e82a63c06061b39bf2d5b262e9e963
6
+ metadata.gz: 2ea3d5073f444b59cd2dd09f2440d9d72e632325cb56b58e47093df8b62e2814714fad3f1fea97d89088173a091058a8011e6ebf52bbbb62571d3b42b266b9ce
7
+ data.tar.gz: ed3467cb513ca1591990ed9222b1a4793cbc7281d34af7d3aa99853241b02b8e0b58b884b50d114cd040bcabfdd4a5b96f67ea7dd3763514de0acb6b3099874b
data/docs/maps/DRO.json CHANGED
@@ -240,7 +240,7 @@
240
240
  "description": "Filesets that contain the digital representations (Files) of the DRO.",
241
241
  "type": "array",
242
242
  "items": {
243
- "type": "string"
243
+ "$ref": "Fileset.json"
244
244
  }
245
245
  },
246
246
  "hasAgreement": {
@@ -125,7 +125,7 @@
125
125
  "description": "Files that are members of the fileset.",
126
126
  "type": "array",
127
127
  "items": {
128
- "type": "string"
128
+ "$ref": "File.json"
129
129
  }
130
130
  },
131
131
  "isContainedBy": {
@@ -75,11 +75,11 @@ module Cocina
75
75
 
76
76
  # Structural sub-schema for the DRO
77
77
  class Structural < Dry::Struct
78
- attribute :contains, Types::Strict::Array.of(Types::Coercible::String).meta(omittable: true)
78
+ attribute :contains, Types::Strict::Array.of(FileSet).meta(omittable: true)
79
79
 
80
80
  def self.from_dynamic(dyn)
81
81
  params = {}
82
- params[:contains] = dyn['contains'] if dyn['contains']
82
+ params[:contains] = dyn['contains'].map { |fs| FileSet.from_dynamic(fs) } if dyn['contains']
83
83
  Structural.new(params)
84
84
  end
85
85
  end
@@ -17,11 +17,11 @@ module Cocina
17
17
 
18
18
  # Structural sub-schema for the FileSet
19
19
  class Structural < Dry::Struct
20
- attribute :contains, Types::Strict::Array.of(Types::Coercible::String).meta(omittable: true)
20
+ attribute :contains, Types::Strict::Array.of(Cocina::Models::File).meta(omittable: true)
21
21
 
22
22
  def self.from_dynamic(dyn)
23
23
  params = {}
24
- params[:contains] = dyn['contains'] if dyn['contains']
24
+ params[:contains] = dyn['contains'].map { |f| Cocina::Models::File.from_dynamic(f) } if dyn['contains']
25
25
  Structural.new(params)
26
26
  end
27
27
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Cocina
4
4
  module Models
5
- VERSION = '0.11.0'
5
+ VERSION = '0.12.0'
6
6
  end
7
7
  end
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.11.0
4
+ version: 0.12.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-01-28 00:00:00.000000000 Z
11
+ date: 2020-01-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dry-struct