IIIF-Commons / iiif-helpers

MIT License
3 stars 1 forks source link

Strict mode #3

Open stephenwf opened 2 years ago

stephenwf commented 2 years ago

At the moment Presentation 3 is "strict" and does not check for small incompatibilities. This is especially true for traversing resources, where Presentation 2 allowed non-array items and Presentation 3 requires an array. Few ways we could do this.

We could have it part of the configuration for the vault:

const vault = new Vault({ strict: true });

Or as it's own bundle (if it's bigger/smaller):

import { Vault } from '@iiif/vault/strict';

Mentioned by @mathewjordan

more community oriented tools wanting to be less strict, while internal tools needing to be more so.

To hopefully allow vault to be used in both situations - without encouraging incorrect IIIF for implementors.

stephenwf commented 1 year ago

@mathewjordan First step of this is done in the parser: https://github.com/IIIF-Commons/parser/pull/17