IIIF / api

Source for API and model specifications documents (api and model)
http://iiif.io/api
107 stars 54 forks source link

Annotation List "within" should be an array? #850

Closed tpendragon closed 8 years ago

tpendragon commented 8 years ago

Each annotation list may be part of one or more layers. and If the annotation list is part of a layer, then this must be recorded using the within relationship in the annotation list response. seems to be in conflict with the example annotation list:

{
  "@context": "http://iiif.io/api/presentation/2/context.json",
  "@id": "http://example.org/iiif/book1/list/l1",
  "@type": "sc:AnnotationList",
  "within": {
    "@id": "http://example.org/iiif/book1/layer/transcription",
    "@type": "sc:Layer",
    "label": "Diplomatic Transcription"
  }
}

Should this be:

{  
  "@context":"http://iiif.io/api/presentation/2/context.json",
  "@id":"http://example.org/iiif/book1/list/l1",
  "@type":"sc:AnnotationList",
  "within":[  
    {  
      "@id":"http://example.org/iiif/book1/layer/transcription",
      "@type":"sc:Layer",
      "label":"Diplomatic Transcription"
    }
  ]
}

?

sdellis commented 8 years ago

I suggested a while back that the examples should use arrays for any repeatable resource, even if there's only one object. This was rejected, so I think it is intentional, not a mistake.

tpendragon commented 8 years ago

:+1:

azaroth42 commented 8 years ago

No, because the ordering of the withins is unimportant, so a singleton list is more easily expressed as just a link to the resource directly. It is indeed intentional.