cocina-models 0.39.0 → 0.40.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 +4 -4
- data/.rubocop_todo.yml +16 -9
- data/lib/cocina/generator/schema_base.rb +5 -1
- data/lib/cocina/models/descriptive_basic_value.rb +3 -2
- data/lib/cocina/models/descriptive_value.rb +3 -2
- data/lib/cocina/models/descriptive_value_required.rb +3 -2
- data/lib/cocina/models/language.rb +3 -2
- data/lib/cocina/models/version.rb +1 -1
- data/openapi.yml +4 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d9154e8ca9a9e0a023094e98709e443b58570a358deb4c8b329509642bfda0f7
|
4
|
+
data.tar.gz: 317c6faa7072fa4441c601e277a63b60149c183ba9b836ab95c0f2ee0f96f949
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 949161b1712417293974e89d98b62116d0cba3582d60fbfb728dfb6a51b78ca737ad02509a9f711cdc3aba27886caed1ca224711ec6ba80d3ba14822febfdf64
|
7
|
+
data.tar.gz: 5a3b10e3b9747b3e1317754eb40b0e3c9c581cf8397aaafdd8e5a5a338b07791f32b2f54d159e2399dd7934d1a49f709dd63af04388ad1d0e85386229d3be978
|
data/.rubocop_todo.yml
CHANGED
@@ -1,18 +1,25 @@
|
|
1
1
|
# This configuration was generated by
|
2
2
|
# `rubocop --auto-gen-config`
|
3
|
-
# on 2020-
|
3
|
+
# on 2020-09-08 19:05:09 UTC using RuboCop version 0.89.1.
|
4
4
|
# The point is for the user to remove these configuration records
|
5
5
|
# one by one as the offenses are removed from the code base.
|
6
6
|
# Note that changes in the inspected code, or installation of new
|
7
7
|
# versions of RuboCop, may require this file to be generated again.
|
8
8
|
|
9
|
-
# Offense count:
|
10
|
-
|
11
|
-
|
9
|
+
# Offense count: 1
|
10
|
+
# Configuration parameters: AllowedMethods.
|
11
|
+
# AllowedMethods: present?, blank?, presence, try, try!
|
12
|
+
Lint/SafeNavigationChain:
|
13
|
+
Exclude:
|
14
|
+
- 'lib/cocina/generator/schema_base.rb'
|
15
|
+
|
16
|
+
# Offense count: 1
|
17
|
+
# Configuration parameters: IgnoredMethods.
|
18
|
+
Metrics/CyclomaticComplexity:
|
19
|
+
Max: 8
|
12
20
|
|
13
|
-
# Offense count:
|
14
|
-
# Configuration parameters:
|
15
|
-
|
21
|
+
# Offense count: 1
|
22
|
+
# Configuration parameters: MinBodyLength.
|
23
|
+
Style/GuardClause:
|
16
24
|
Exclude:
|
17
|
-
- '
|
18
|
-
- 'spec/cocina/models/file_set_shared_examples.rb'
|
25
|
+
- 'lib/cocina/generator/schema_base.rb'
|
@@ -54,7 +54,11 @@ module Cocina
|
|
54
54
|
when 'boolean'
|
55
55
|
'Strict::Bool'
|
56
56
|
else
|
57
|
-
|
57
|
+
if doc.one_of&.map(&:type).all? { |o| %w[integer string].include?(o) }
|
58
|
+
'Nominal::Any'
|
59
|
+
else
|
60
|
+
raise "#{schema_doc.type} not supported"
|
61
|
+
end
|
58
62
|
end
|
59
63
|
end
|
60
64
|
|
@@ -5,8 +5,8 @@ module Cocina
|
|
5
5
|
class DescriptiveBasicValue < Struct
|
6
6
|
attribute :structuredValue, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
|
7
7
|
attribute :parallelValue, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
|
8
|
-
# String value of the descriptive element.
|
9
|
-
attribute :value, Types::
|
8
|
+
# String or integer value of the descriptive element.
|
9
|
+
attribute :value, Types::Nominal::Any.meta(omittable: true)
|
10
10
|
# Type of value provided by the descriptive element.
|
11
11
|
attribute :type, Types::Strict::String.meta(omittable: true)
|
12
12
|
# Status of the descriptive element value relative to other instances of the element.
|
@@ -23,6 +23,7 @@ module Cocina
|
|
23
23
|
# A term providing information about the circumstances of the statement (e.g., approximate dates).
|
24
24
|
attribute :qualifier, Types::Strict::String.meta(omittable: true)
|
25
25
|
attribute :note, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
|
26
|
+
attribute :language, Standard.optional.meta(omittable: true)
|
26
27
|
end
|
27
28
|
end
|
28
29
|
end
|
@@ -5,8 +5,8 @@ module Cocina
|
|
5
5
|
class DescriptiveValue < Struct
|
6
6
|
attribute :structuredValue, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
|
7
7
|
attribute :parallelValue, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
|
8
|
-
# String value of the descriptive element.
|
9
|
-
attribute :value, Types::
|
8
|
+
# String or integer value of the descriptive element.
|
9
|
+
attribute :value, Types::Nominal::Any.meta(omittable: true)
|
10
10
|
# Type of value provided by the descriptive element.
|
11
11
|
attribute :type, Types::Strict::String.meta(omittable: true)
|
12
12
|
# Status of the descriptive element value relative to other instances of the element.
|
@@ -23,6 +23,7 @@ module Cocina
|
|
23
23
|
# A term providing information about the circumstances of the statement (e.g., approximate dates).
|
24
24
|
attribute :qualifier, Types::Strict::String.meta(omittable: true)
|
25
25
|
attribute :note, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
|
26
|
+
attribute :language, Standard.optional.meta(omittable: true)
|
26
27
|
attribute :appliesTo, Types::Strict::Array.of(DescriptiveBasicValue).meta(omittable: true)
|
27
28
|
end
|
28
29
|
end
|
@@ -5,8 +5,8 @@ module Cocina
|
|
5
5
|
class DescriptiveValueRequired < Struct
|
6
6
|
attribute :structuredValue, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
|
7
7
|
attribute :parallelValue, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
|
8
|
-
# String value of the descriptive element.
|
9
|
-
attribute :value, Types::
|
8
|
+
# String or integer value of the descriptive element.
|
9
|
+
attribute :value, Types::Nominal::Any.meta(omittable: true)
|
10
10
|
# Type of value provided by the descriptive element.
|
11
11
|
attribute :type, Types::Strict::String.meta(omittable: true)
|
12
12
|
# Status of the descriptive element value relative to other instances of the element.
|
@@ -23,6 +23,7 @@ module Cocina
|
|
23
23
|
# A term providing information about the circumstances of the statement (e.g., approximate dates).
|
24
24
|
attribute :qualifier, Types::Strict::String.meta(omittable: true)
|
25
25
|
attribute :note, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
|
26
|
+
attribute :language, Standard.optional.meta(omittable: true)
|
26
27
|
attribute :appliesTo, Types::Strict::Array.of(DescriptiveBasicValue).meta(omittable: true)
|
27
28
|
end
|
28
29
|
end
|
@@ -5,8 +5,8 @@ module Cocina
|
|
5
5
|
class Language < Struct
|
6
6
|
attribute :structuredValue, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
|
7
7
|
attribute :parallelValue, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
|
8
|
-
# String value of the descriptive element.
|
9
|
-
attribute :value, Types::
|
8
|
+
# String or integer value of the descriptive element.
|
9
|
+
attribute :value, Types::Nominal::Any.meta(omittable: true)
|
10
10
|
# Type of value provided by the descriptive element.
|
11
11
|
attribute :type, Types::Strict::String.meta(omittable: true)
|
12
12
|
# Status of the descriptive element value relative to other instances of the element.
|
@@ -23,6 +23,7 @@ module Cocina
|
|
23
23
|
# A term providing information about the circumstances of the statement (e.g., approximate dates).
|
24
24
|
attribute :qualifier, Types::Strict::String.meta(omittable: true)
|
25
25
|
attribute :note, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
|
26
|
+
attribute :language, Standard.optional.meta(omittable: true)
|
26
27
|
attribute :appliesTo, Types::Strict::Array.of(DescriptiveBasicValue).meta(omittable: true)
|
27
28
|
attribute :script, DescriptiveValue.optional.meta(omittable: true)
|
28
29
|
end
|
data/openapi.yml
CHANGED
@@ -467,6 +467,9 @@ components:
|
|
467
467
|
type: array
|
468
468
|
items:
|
469
469
|
$ref: "#/components/schemas/DescriptiveValue"
|
470
|
+
language:
|
471
|
+
# description: Language of the descriptive element value.
|
472
|
+
$ref: "#/components/schemas/Standard"
|
470
473
|
DescriptiveParallelValue:
|
471
474
|
description: Value model for multiple representations of the same information (e.g. in different languages).
|
472
475
|
type: object
|
@@ -851,7 +854,7 @@ components:
|
|
851
854
|
$ref: '#/components/schemas/CatalogLink'
|
852
855
|
Language:
|
853
856
|
description: Languages, scripts, symbolic systems, and notations used in all
|
854
|
-
or part of a resource.
|
857
|
+
or part of a resource or its descriptive metadata.
|
855
858
|
type: object
|
856
859
|
additionalProperties: false
|
857
860
|
allOf:
|
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.40.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-09-
|
11
|
+
date: 2020-09-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|