Skip to content

Advertise the batch assets collection in the Batch model - #1272

Merged
donaldgray merged 1 commit into
developfrom
hygiene/pro-01
Aug 17, 2026
Merged

donaldgray merged 1 commit into
developfrom
hygiene/pro-01

Conversation

@tomcrane

Copy link
Copy Markdown
Contributor

What does this change?

The route GET /customers/{customerId}/queue/batches/{batchId}/assets has existed and worked for some time (CustomerQueueController.GetBatchAssets — returns all the assets specified by the batch at creation time, whatever their current state, with asset-query filtering, ordering and paging). But the Batch model never declared a corresponding assets HydraLink, so batch responses did not advertise the link and the vocab did not describe the operation. The endpoint was reachable but undiscoverable.

Following the convention that the model advertises exactly the reachable surface (the same rule under which the dead completedImages/errorImages links were removed in #1238), this PR:

  • Adds an assets HydraLink to Batch (Order 21, between images and test). The link value is emitted automatically as {batch}/assets, matching the existing route.
  • Adds a vocab supportedOperation for the collection GET, noting it can take query parameters.

The link's description records the distinction between the two collections: many batches can include the same asset in assets, whereas only one batch can include an asset in its images collection.

The readOnly flag on the new link flows into the OpenAPI schema via the mapping added in #1268.

No behaviour change — the endpoint itself is untouched (and already covered by integration tests). Batch responses gain one additional link property, which is additive and non-breaking.

The route /customers/{c}/queue/batches/{b}/assets has existed and worked
for some time (CustomerQueueController.GetBatchAssets), but the Batch
model never declared an assets HydraLink, so batch responses did not
advertise it and the vocab did not describe it. Per the convention that
the model advertises exactly the reachable surface, add the assets link
(emitted automatically) and a vocab supportedOperation for it.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@donaldgray
donaldgray marked this pull request as ready for review August 17, 2026 10:54
@donaldgray
donaldgray requested a review from a team as a code owner August 17, 2026 10:54
@donaldgray
donaldgray merged commit bab6a8e into develop Aug 17, 2026
3 of 4 checks passed
@donaldgray
donaldgray deleted the hygiene/pro-01 branch August 17, 2026 13:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants