Added new @iiif/parser/strict for converting P3 #17
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Adds new utility for validating and fixing Presentation 3 that may not be valid.
Note: this will not automatically upgrade Presentation 2.
You can also get a list of issues with the second argument.
Currently supported:
{"label": "some label"}
{"label": ["some label"]}
{"label": {"en": "some label"}}
{"label": { en: { INVALID: 'this is not valid' } }}
behavior
)format
)heights
andwidths
are JSON numbers and not floatsduration
is a valid floathttp
(may be flaky with custom values)This is built to be expanded on, and improved if there are other common pitfalls out there. Any fix should be accompanied with a descriptive warning that can be picked up. This allows it to be used both for compatibility and for validation.
There are also other possible validations that may not be possible to fix, but could be worth warning: