IIIF / api

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

add Selectors section to Registry; move/update imageAPISelector context #2231

Closed kirschbombe closed 8 months ago

kirschbombe commented 1 year ago

This PR:

Preview: https://preview.iiif.io/api/image-api-selector-update/registry/selectors/ Context preview: https://preview.iiif.io/api/image-api-selector-update/registry/selectors/context.json

azaroth42 commented 1 year ago

Context should use scoped contexts to limit the definition of the properties to only the class.... and define the class.

thehabes commented 1 year ago

Hi all, just sharing some research and results from the JSON LD playground today.

We get jsonld.SyntaxError: Invalid JSON-LD syntax; invalid scoped context. from this context as it is now. We have narrowed it down to two issues

  1. This context needs a "iiif_selectors":"http://iiif.io/api/__TODO__/#" entry
  2. Under ImageAPISelector in the @context array it tries to scope in "http://iiif.io/api/image/#". This needs to be the context.json and so should be "https://iiif.io/api/image/3/context.json" if you need that context in there.

I am happy to report that we produced a test object which combined this context, the IIIF Presentation API 3 context, and the Goereference Extension context which was processed correctly in the JSON-LD playground. It raised a couple other questions that need researched but it is a promising result. Below is what we found out.

Go Here to see the test object that we brute force embedded the contexts into. See It Process in the JSON-LD playground.

kirschbombe commented 1 year ago

I added a new iiif_selectors context definition to the context file. For the image API context, the current url follows what is used in the other contexts, so I left that as-is. I did change the https to http.

I also added a note about the ImageApiSelector default values (v3 vs v2).

kirschbombe commented 1 year ago

The presi 3 context is updated to include the selectors context. A big thanks to @thehabes for testing the context and helping me simplify it.