mirador
mirador copied to clipboard
Implementation of fetchInfoResponse is not complient with iiif
Like @stephenwf mentioned in https://github.com/ProjectMirador/mirador/issues/3552#issuecomment-1112335225
I think the code mentioned:
/**
* fetchInfoResponse - action creator
*
* @param {String} infoId
* @memberof ActionCreators
*/
export function fetchInfoResponse({ imageId, imageResource, windowId }) {
const imageService = imageResource && imageResource.getServices()[0];
const infoId = (imageId || imageService.id);
return requestInfoResponse(infoId, imageService, windowId);
}
is still prone to bugs. A completely valid Image resource for example, could break:
{
"id": "https://example.org/path/image.jpg",
"type": "Image",
"service": [
{ "type": "Service", "profile": "my-dimensions", " .... " },
{ "type": "ImageService3", "profile": "level2", "...." }
]
}
As the code is not looking for an image service from the list, just the first service:
imageResource.getServices()[0]
I think Manifesto just surfaced the bug.