cocina-models 0.32.0 → 0.33.0

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: 1bcad8e4f77e24566d85e9e60107eed4cc45b7e31daedf15106ae86d47c9f58b
4
- data.tar.gz: 26fc29b912821bf4bd9874e3e758acb2777b90729f5dd69b0fd12aeb240cbf31
3
+ metadata.gz: fa8dd7285b70bcc1a81fd099ada06d39ceba9f24900076deec73dd46573df2f4
4
+ data.tar.gz: c196659cf0ce69aee69ffc3472235d68d9e4eb0503ed70aa5c79f517c8412498
5
5
  SHA512:
6
- metadata.gz: b91bd04128801af9435c9ae35a5157a4bb2e504906737f908da3f444bca4150e1132a223fc3709309d0df5a26e869eaea6128ba809e7bfcd261d24b248658b96
7
- data.tar.gz: b6caf15cd36ee9faaebbb10be8f298c9501e727862510b0de0696e83ac863934e68320122ba35fcb7a82fd18a557aed62d987c9021a7c2447b80b73cbcf6d475
6
+ metadata.gz: a001d343d4233b377aa0c666383ce2f70abb36f3fc05169f007fc7f1b6f8e9784f5ff67f204255a585b1f4e9ddd6c3d624a4baf0057b78607c73b7df93e3b173
7
+ data.tar.gz: cb9db638c1ffaad358e05bc097c5fc9ec44a3df56bb4b13418f417daf2a71879561885a9e26adfcaf37e37bdf3542fca9055340816f2253b8f5f9f4c69b0eef0
@@ -2,4 +2,11 @@
2
2
 
3
3
 
4
4
 
5
- ## Was the documentation (README, wiki) updated?
5
+ ## How was this change tested?
6
+
7
+
8
+
9
+ ## Which documentation and/or configurations were updated?
10
+
11
+
12
+
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- [![Build Status](https://travis-ci.com/sul-dlss/cocina-models.svg?branch=master)](https://travis-ci.com/sul-dlss/cocina-models)
1
+ [![CircleCI](https://circleci.com/gh/sul-dlss/cocina-models.svg?style=svg)](https://circleci.com/gh/sul-dlss/cocina-models)
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)
@@ -14,7 +14,7 @@ module Cocina
14
14
  # Primary processing label (can be same as title) for a File.
15
15
  attribute :label, Types::Strict::String
16
16
  # Filename for a file. Can be same as label.
17
- attribute :filename, Types::Strict::String.meta(omittable: true)
17
+ attribute :filename, Types::Strict::String
18
18
  # Size of the File (binary) in bytes.
19
19
  attribute :size, Types::Strict::Integer.meta(omittable: true)
20
20
  # Version for the File within SDR.
@@ -28,7 +28,7 @@ module Cocina
28
28
  attribute :access, DROAccess.optional.meta(omittable: true)
29
29
  attribute :administrative, Administrative.optional.meta(omittable: true)
30
30
  attribute :description, Description.optional.meta(omittable: true)
31
- attribute :identification, Identification.optional.meta(omittable: true)
31
+ attribute(:identification, RequestIdentification.default { RequestIdentification.new })
32
32
  attribute :structural, RequestDROStructural.optional.meta(omittable: true)
33
33
  attribute :geographic, Geographic.optional.meta(omittable: true)
34
34
 
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Cocina
4
+ module Models
5
+ class RequestIdentification < Struct
6
+ # example: sul:PC0170_s3_Fiesta_Bowl_2012-01-02_210609_2026
7
+ attribute :sourceId, Types::Strict::String
8
+ attribute :catalogLinks, Types::Strict::Array.of(CatalogLink).meta(omittable: true)
9
+ end
10
+ end
11
+ end
@@ -3,6 +3,7 @@
3
3
  module Cocina
4
4
  module Models
5
5
  class Sequence < Struct
6
+ attribute :members, Types::Strict::Array.of(Types::Strict::String).meta(omittable: true)
6
7
  # The direction that a sequence of canvases should be displayed to the user
7
8
  attribute :viewingDirection, Types::Strict::String.enum('right-to-left', 'left-to-right').meta(omittable: true)
8
9
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Cocina
4
4
  module Models
5
- VERSION = '0.32.0'
5
+ VERSION = '0.33.0'
6
6
  end
7
7
  end
@@ -597,7 +597,6 @@ components:
597
597
  type: array
598
598
  items:
599
599
  $ref: "#/components/schemas/DescriptiveValue"
600
-
601
600
  File:
602
601
  description: Binaries that are the basis of what our domain manages. Binaries here do not include metadata files generated for the domain's own management purposes.
603
602
  type: object
@@ -642,6 +641,7 @@ components:
642
641
  required:
643
642
  - externalIdentifier
644
643
  - label
644
+ - filename
645
645
  - type
646
646
  - version
647
647
  - access
@@ -860,7 +860,7 @@ components:
860
860
  description:
861
861
  $ref: '#/components/schemas/Description'
862
862
  identification:
863
- $ref: '#/components/schemas/Identification'
863
+ $ref: '#/components/schemas/RequestIdentification'
864
864
  structural:
865
865
  $ref: '#/components/schemas/RequestDROStructural'
866
866
  geographic:
@@ -869,6 +869,7 @@ components:
869
869
  - label
870
870
  - type
871
871
  - version
872
+ - identification
872
873
  RequestDROStructural:
873
874
  description: Structural metadata
874
875
  type: object
@@ -954,11 +955,30 @@ components:
954
955
  type: array
955
956
  items:
956
957
  $ref: '#/components/schemas/RequestFile'
958
+ RequestIdentification:
959
+ description: Same as a Identification, but requires a sourceId.
960
+ type: object
961
+ additionalProperties: false
962
+ properties:
963
+ sourceId:
964
+ type: string
965
+ example: 'sul:PC0170_s3_Fiesta_Bowl_2012-01-02_210609_2026'
966
+ catalogLinks:
967
+ type: array
968
+ items:
969
+ $ref: '#/components/schemas/CatalogLink'
970
+ required:
971
+ - sourceId
957
972
  Sequence:
958
973
  description: A sequence or ordering of resources within a Collection or Object.
959
974
  type: object
960
975
  additionalProperties: false
961
976
  properties:
977
+ members:
978
+ description: "Identifiers for Members in their stated Order for the Sequence."
979
+ type: array
980
+ items:
981
+ type: string
962
982
  viewingDirection:
963
983
  description: The direction that a sequence of canvases should be displayed to the user
964
984
  type: string
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.32.0
4
+ version: 0.33.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-04-01 00:00:00.000000000 Z
11
+ date: 2020-05-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -289,6 +289,7 @@ files:
289
289
  - lib/cocina/models/request_file.rb
290
290
  - lib/cocina/models/request_file_set.rb
291
291
  - lib/cocina/models/request_file_set_structural.rb
292
+ - lib/cocina/models/request_identification.rb
292
293
  - lib/cocina/models/sequence.rb
293
294
  - lib/cocina/models/source.rb
294
295
  - lib/cocina/models/validator.rb