samvera / node-iiif

This module provides a full-featured IIIF Image API 2.1 and 3.0 image processor. It covers only the image processing pipeline itself, leaving input and output to the caller.
Apache License 2.0
27 stars 5 forks source link

Implementation of IIIF Image API v3.0.0 #29

Closed mbklein closed 1 year ago

mbklein commented 1 year ago

This PR adds support for Image API v3 while retaining support for v2. There's a lot of refactoring involved in making that happen while reusing as much code as possible between the two versions. The v2 and v3 test suites are still fully isolated from each other so we can more easily catch regressions if a change to a common class or function breaks one version and not the other.

I've also added canonicalLink and profileLink properties to the response alongside the contentType property. I realized we'd been advertising support for the canonical and profile link headers in the info.json document all along, without actually providing the content that consumers can use to populate those headers. This change makes it easy.

There's one breaking change, but I don't think it's a feature anyone was using, and this is a major version bump anyway.