From 5ba60a3d736b614ea661eef971e56f6fbf8f1123 Mon Sep 17 00:00:00 2001 From: aaron-collier Date: Wed, 21 Oct 2020 15:01:05 -0700 Subject: [PATCH] Add DescriptiveGeographicMetadata to api spec --- lib/cocina/models/description.rb | 1 + .../models/descriptive_geographic_metadata.rb | 10 ++++++++++ openapi.yml | 19 +++++++++++++++++++ 3 files changed, 30 insertions(+) create mode 100644 lib/cocina/models/descriptive_geographic_metadata.rb diff --git a/lib/cocina/models/description.rb b/lib/cocina/models/description.rb index 95a2510e..44fff15a 100644 --- a/lib/cocina/models/description.rb +++ b/lib/cocina/models/description.rb @@ -7,6 +7,7 @@ class Description < Struct attribute :contributor, Types::Strict::Array.of(Contributor).meta(omittable: true) attribute :event, Types::Strict::Array.of(Event).meta(omittable: true) attribute :form, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true) + attribute :geographic, Types::Strict::Array.of(DescriptiveGeographicMetadata).meta(omittable: true) attribute :language, Types::Strict::Array.of(Language).meta(omittable: true) attribute :note, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true) attribute :identifier, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true) diff --git a/lib/cocina/models/descriptive_geographic_metadata.rb b/lib/cocina/models/descriptive_geographic_metadata.rb new file mode 100644 index 00000000..8e46b010 --- /dev/null +++ b/lib/cocina/models/descriptive_geographic_metadata.rb @@ -0,0 +1,10 @@ +# frozen_string_literal: true + +module Cocina + module Models + class DescriptiveGeographicMetadata < Struct + attribute :form, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true) + attribute :subject, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true) + end + end +end diff --git a/openapi.yml b/openapi.yml index a44768ce..b7a31789 100644 --- a/openapi.yml +++ b/openapi.yml @@ -305,6 +305,11 @@ components: type: array items: $ref: "#/components/schemas/DescriptiveValue" + geographic: + description: Geographic description for items with coordinates or bounding boxes. + type: array + items: + $ref: "#/components/schemas/DescriptiveGeographicMetadata" language: description: Languages, scripts, symbolic systems, and notations used in all or part of a resource. @@ -470,6 +475,20 @@ components: $ref: "#/components/schemas/DescriptiveValue" valueLanguage: $ref: "#/components/schemas/DescriptiveValueLanguage" + DescriptiveGeographicMetadata: + description: Value model for mods geographic extension metadata + type: object + additionalProperties: false + properties: + form: + type: array + items: + $ref: "#/components/schemas/DescriptiveValue" + subject: + description: Terms associated with the intellectual content of the related resource. + type: array + items: + $ref: "#/components/schemas/DescriptiveValue" DescriptiveParallelValue: description: Value model for multiple representations of the same information (e.g. in different languages). type: object