Skip to content

Annotation ref should not have items. #258

@glenrobson

Description

@glenrobson

When doing this:

annotationPageRef = AnnotationPageRefExtended(id="http://example.com/annos.json", type="AnnotationPage")
print (annotationPageRef.jsonld())

you get:

{"@context": "http://iiif.io/api/presentation/3/context.json", "id": "http://example.com/annos.json", "type": "AnnotationPage"}

which is correct but after you add it to a canvas:

annotationPageRef = AnnotationPageRefExtended(id="http://example.com/annos.json", type="AnnotationPage")
        print (annotationPageRef.jsonld())
        canvas.annotations = [annotationPageRef]

        print (canvas.annotations[0].jsonld())

You get:

{"@context": "http://iiif.io/api/presentation/3/context.json", "id": "http://example.com/annos.json", "type": "AnnotationPage", "items": []}

Expected behaviour:

You shouldn't get an empty items array if its a reference.

Potential bug location(s):

Is it an auto items issue or is the AnnotationPageRefExtended being converted to a AnnotationPage?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions