cocina-models 0.51.0 → 0.52.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: f26933441485daf9b322a702e2e72955a2632ff9ea840ed4b700a8130361dfb2
4
- data.tar.gz: 877293aa8b242869413b025634e1c44e52ea1cc9aaf856b82a8986a170fedd0c
3
+ metadata.gz: 2a9f53ca8dbbb3649b0dad155b0ad42fa6901f3c9b7a7082ef1571197b006b6e
4
+ data.tar.gz: 806294c0697f580c59beb6d8ced0e7b738c843576621c4c60ffb29632305e09b
5
5
  SHA512:
6
- metadata.gz: 1e6919371f789202c7f17b5c8a6036ab68b3ce1dc4486ec8b1f62cf60a5eb3c4857b424b3a19198c74f4fcc1265e5de32a84085aaa11eaa405f41df13f7728b9
7
- data.tar.gz: f287df923a3d9bdf37f7c012e5aa222197e953f9e8ed0c86c65df64a5345b402e399b9d6515fc12e5d605f0fc38d7e801393096cdb55d67c856365ef80b8ec34
6
+ metadata.gz: 8047d6f2a4d16f0c8269440d3ba6db3e616c4cf93c1a7071d62e70c40614f60740f724c03351d579f009b0957e0a658f5bf6a10ef5f256e00621e615f31991c0
7
+ data.tar.gz: ebeb2ef783b0ada2f5e23dc181a28ed07cf03be4262917cab39c163179314bf35c255c656d65d02c7cc6b05c7a680789a7d8ec2bcf29ce7c0cd46290417fd76a
@@ -4,6 +4,17 @@ module Cocina
4
4
  module Models
5
5
  class Event < Struct
6
6
  attribute :structuredValue, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
7
+ # Code representing the standard or encoding.
8
+ attribute :code, Types::Strict::String.meta(omittable: true)
9
+ # URI for the standard or encoding.
10
+ attribute :uri, Types::Strict::String.meta(omittable: true)
11
+ # String describing the standard or encoding.
12
+ attribute :value, Types::Strict::String.meta(omittable: true)
13
+ attribute :note, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
14
+ # The version of the standard or encoding.
15
+ attribute :version, Types::Strict::String.meta(omittable: true)
16
+ attribute :source, Source.optional.meta(omittable: true)
17
+ attribute :valueScript, Standard.optional.meta(omittable: true)
7
18
  # Description of the event (creation, publication, etc.).
8
19
  attribute :type, Types::Strict::String.meta(omittable: true)
9
20
  # The preferred display label to use for the event in access systems.
@@ -12,7 +23,6 @@ module Cocina
12
23
  attribute :contributor, Types::Strict::Array.of(Contributor).meta(omittable: true)
13
24
  attribute :location, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
14
25
  attribute :identifier, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
15
- attribute :note, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
16
26
  attribute :parallelEvent, Types::Strict::Array.of(DescriptiveParallelEvent).meta(omittable: true)
17
27
  end
18
28
  end
@@ -7,7 +7,8 @@ module Cocina
7
7
  def self.validate(clazz, attributes)
8
8
  method_name = clazz.name.split('::').last
9
9
  request_operation = root.request_operation(:post, "/validate/#{method_name}")
10
- request_operation.validate_request_body('application/json', attributes)
10
+ # JSON.parse forces serialization of objects like DateTime.
11
+ request_operation.validate_request_body('application/json', JSON.parse(attributes.to_json))
11
12
  rescue OpenAPIParser::OpenAPIError => e
12
13
  raise ValidationError, e.message
13
14
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Cocina
4
4
  module Models
5
- VERSION = '0.51.0'
5
+ VERSION = '0.52.0'
6
6
  end
7
7
  end
data/openapi.yml CHANGED
@@ -839,6 +839,7 @@ components:
839
839
  additionalProperties: false
840
840
  allOf:
841
841
  - $ref: "#/components/schemas/DescriptiveStructuredValue"
842
+ - $ref: "#/components/schemas/DescriptiveValueLanguage"
842
843
  - type: object
843
844
  additionalProperties: false
844
845
  properties:
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cocina-models
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.51.0
4
+ version: 0.52.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justin Coyne