Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add field for image description #751

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions lib/cocina/models/presentation.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ module Cocina
module Models
# Presentation data for the File.
class Presentation < Struct
# Descriptive text about an image. This can be used as alt text or for indexing. This should be 130 characters or fewer as this is best practice for alt text.
attribute? :description, Types::Strict::String
# Height in pixels
attribute? :height, Types::Strict::Integer
# Width in pixels
Expand Down
3 changes: 3 additions & 0 deletions openapi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1434,6 +1434,9 @@ components:
type: object
additionalProperties: false
properties:
description:
description: Descriptive text about an image. This can be used as alt text or for indexing. This should be 130 characters or fewer as this is best practice for alt text.
type: string
height:
description: Height in pixels
type: integer
Expand Down