cocina-models 0.32.0 → 0.33.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/pull_request_template.md +8 -1
- data/README.md +1 -1
- data/lib/cocina/models/file.rb +1 -1
- data/lib/cocina/models/request_dro.rb +1 -1
- data/lib/cocina/models/request_identification.rb +11 -0
- data/lib/cocina/models/sequence.rb +1 -0
- data/lib/cocina/models/version.rb +1 -1
- data/openapi.yml +22 -2
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fa8dd7285b70bcc1a81fd099ada06d39ceba9f24900076deec73dd46573df2f4
|
4
|
+
data.tar.gz: c196659cf0ce69aee69ffc3472235d68d9e4eb0503ed70aa5c79f517c8412498
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a001d343d4233b377aa0c666383ce2f70abb36f3fc05169f007fc7f1b6f8e9784f5ff67f204255a585b1f4e9ddd6c3d624a4baf0057b78607c73b7df93e3b173
|
7
|
+
data.tar.gz: cb9db638c1ffaad358e05bc097c5fc9ec44a3df56bb4b13418f417daf2a71879561885a9e26adfcaf37e37bdf3542fca9055340816f2253b8f5f9f4c69b0eef0
|
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
[![
|
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)
|
data/lib/cocina/models/file.rb
CHANGED
@@ -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
|
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
|
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
|
data/openapi.yml
CHANGED
@@ -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/
|
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.
|
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-
|
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
|