Skip to content

Commit

Permalink
Merge pull request #174 from sul-dlss/geographic
Browse files Browse the repository at this point in the history
Add DescriptiveGeographicMetadata to api spec
  • Loading branch information
jcoyne authored Oct 22, 2020
2 parents 711f6cc + 5ba60a3 commit 954db46
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/cocina/models/description.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
10 changes: 10 additions & 0 deletions lib/cocina/models/descriptive_geographic_metadata.rb
Original file line number Diff line number Diff line change
@@ -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
19 changes: 19 additions & 0 deletions openapi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,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.
Expand Down Expand Up @@ -484,6 +489,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
Expand Down

0 comments on commit 954db46

Please sign in to comment.