Hierarchical consistent PUT/POST - #641
Conversation
SummaryImplements #464 (consistent PUT/POST behaviour). Old PR #503 was used purely as a design reference (unmergeable/stale) — this is a fresh implementation that extends the existing New/changed capabilities:
Bugs fixed (pre-existing, on
|
| } | ||
|
|
||
| [Fact] | ||
| public async Task PostHierarchical_WithAsset_IngestsAsset_WithoutShowExtrasHeader() |
There was a problem hiding this comment.
I wasn't sure about this, but erred on the side it should be allowed - this test is basically proving you can get asset ingestion from a hierarchical path (and it will do it without the show-extras header, but the [Authorize] means you need to be authed)
| } | ||
|
|
||
| [Fact] | ||
| public async Task PostHierarchical_WithAsset_IngestsAsset_WithoutShowExtrasHeader() |
…tHelper to be a class instead of static
…ters in write requests
|
ShowExtras is not required on a PUT or POST, because the server can tell whether the request payload is vanilla or extras. ShowExtras is not an auth header, it's an instruction about what to include in responses. BUT - if you make a PUT or POST that eventually returns a body, showExtras on the original PUT or POST determines whether or not extras are included in that body. This means that a "vanilla" authed manifest editor that only submits vanilla IIIF doesn't get an extras response it won't understand. This applies to flat or hierarchical PUT and POST. (needs new ticket) |
|
Handoff from the DLCS docs/API hygiene sprint (cross-cutting session, 2026-08-06) — two conventions were ratified today that this PR's PUT/POST standardisation is the natural landing point for on the iiif-presentation side:
Also ratified, for completeness: every DELETE returns No action requested beyond alignment — the room's intent is that this PR carries the convention on this repo rather than a parallel ruling being minted. Register trail: 🤖 Generated with Claude Code |
What does this change?
Resolves #464
Resolves #291
This PR is a reimplemented version of the stale #503 which had gotten very out of date.
It has 2 main goals:
In order to complete this goal, 3 new handlers have been introduced and
postHierarchicalis modified extensively. Additionallly, a new central class for collection requests has been introduced to mirror theManifestWriteServicecalled theCollectionWriteServiceto reduce duplication.Finally, several helpers have been introduced to help validate and respond to the new/modified hierarchical requests.
Note
The original PR implemented a hierarchical
DELTEendpoint which has not been reimplemented here to reduce the size/scope of an already lrge PRNote
The ticket notes a breaking change in the stale branch. This has been fixed so that
Postworks with theintologic, requiring apublicId,idand/orslugproperty to correctly derive the slug (withidbeing ignored if the host doesn't match the value from settings)