Skip to content

Metadata not allowed on Range (and other classes) #260

@LvanWissen

Description

@LvanWissen

Expected behaviour:

According to the Presentation 3 specs, it is allowed to have a metadata key on a Range object. See: https://iiif.io/api/presentation/3.0/#a-summary-of-property-requirements

Observed behaviour:

When trying to add metadata to a Range, the Pydantic validation returns:

File "pydantic/main.py", line 363, in pydantic.main.BaseModel.__setattr__
ValueError: "Range" object has no field "metadata"

Potential bug location(s):

Adding metadata: Optional[Metadata] = None to the Range class in skeleton.py would fix this.

class Range(Class):

Any other comments:

I guess this then should also apply to Annotation, AnnotationPage, AnnotationCollection and what the spec calls 'Content Resources'? And for the other properties described in the spec table.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions