Repository navigation
Advertise the batch assets collection in the Batch model - #1272
Merged
Merged
Conversation
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
marked this pull request as ready for review
August 17, 2026 10:54
donaldgray
approved these changes
Aug 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What does this change?
The route
GET /customers/{customerId}/queue/batches/{batchId}/assetshas 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 theBatchmodel never declared a correspondingassetsHydraLink, 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/errorImageslinks were removed in #1238), this PR:assetsHydraLink toBatch(Order 21, betweenimagesandtest). The link value is emitted automatically as{batch}/assets, matching the existing route.supportedOperationfor 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 itsimagescollection.The
readOnlyflag 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.