-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
discussionRequires further discussionRequires further discussiondocumentationImprovements or additions to documentationImprovements or additions to documentation
Description
I don't think we want to change behaviour for this ticket - it's more to record that there are some Manifest payloads that we can't process. The solution is possible just an implementation note in documentation somewhere and possibly clean up the returned error messages.
It's currently not possible to create a Manifest that contains a "paintedResource" (only) follow by either an "item" only, or matched canvas. The following can be worked around by adding a placeholder canvas to ensure ordering is correct, the paintedResource is then matched to that.
The following result in 400 exceptions:
"paintedResource" only then Matched
{
"type": "Manifest",
"parent": "https://presentation.dlcs/499/collections/foo",
"slug": "paintedResource-then-matched",
"items": [
{
"type": "Canvas",
"id": "https://presentation.dlcs/499/canvases/second"
}
],
"paintedResources": [
{
"canvasPainting": {
"canvasId": "https://presentation.dlcs/499/canvases/first",
"canvasOrder": 0
},
"asset": { .. }
},
{
"canvasPainting": {
"canvasId": "https://presentation.dlcs/499/canvases/second",
"canvasOrder": 1
},
"asset": { .. }
}
]
}Returned error:
{
"title": "Operation failed",
"detail": "Canvas painting with id second does not have a matching canvas order",
"instance": "https://presentation.dlcs",
"type": "https://presentation.dlcs/errors/ModifyCollectionType/ErrorMergingPaintedResourcesWithItems",
"status": 400
}"paintedResource" only then "item"
{
"type": "Manifest",
"parent": "https://presentation.dlcs/499/collections/foo",
"slug": "paintedResource-then-item",
"items": [
{
"type": "Canvas",
"id": "https://presentation.dlcs/499/canvases/second"
}
],
"paintedResources": [
{
"canvasPainting": {
"canvasId": "https://presentation.dlcs/499/canvases/first",
"canvasOrder": 1
},
"asset": { .. }
}
]
}Returned error:
{
"title": "Operation failed",
"detail": "The following canvas painting records conflict with the order from items - (id: first, canvasOrder: 0)",
"instance": "https://presentation.dlcs",
"type": "https://presentation.dlcs/errors/ModifyCollectionType/ErrorMergingPaintedResourcesWithItems",
"status": 400
}Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
discussionRequires further discussionRequires further discussiondocumentationImprovements or additions to documentationImprovements or additions to documentation