Skip to content

Priority queue response gets its own @id - #1277

Merged
donaldgray merged 2 commits into
developfrom
hygiene/pro-15
Aug 17, 2026
Merged

Priority queue response gets its own @id#1277
donaldgray merged 2 commits into
developfrom
hygiene/pro-15

Conversation

@tomcrane

Copy link
Copy Markdown
Contributor

What does this change?

GET /customers/{customerId}/queue/priority returns the priority queue's own counts, but its @id was /customers/{customerId}/queue — the main queue's identity — and all its collection links were the main queue's links. Two different resources returned bodies distinguishable only by their counts, and the priority response contained a priority link pointing back at itself under the main queue's URL space. Cause: CustomerQueueConverter.ToHydra had no queue-name awareness, so the model's UriTemplate always stamped the main-queue identity.

This PR makes the converter append the queue name to the @id for any non-default named queue, so the priority response now self-identifies as /customers/{customerId}/queue/priority.

The collection links (batches, active, recent, priority) deliberately remain the main queue's URLs: batches submitted to the priority queue genuinely appear in those shared collections (the documentation already explains this), and no per-name sub-routes (/priority/batches etc.) exist — auto-generating links off the new @id would have produced four dead links. Integration tests assert both halves: the priority @id, the shared batches link, and the unchanged default-queue identity.

Breaking Changes

Caution

This PR introduces breaking changes.

Service Description Notes
API GET /customers/{customerId}/queue/priority response @id changes from .../queue to .../queue/priority Counts and all other properties unchanged; clients comparing or dereferencing @id will see the new value

tomcrane and others added 2 commits August 17, 2026 11:23
GET /customers/{c}/queue/priority returned a body whose @id was
/customers/{c}/queue - the main queue's identity - making the two
resources distinguishable only by their counts. The converter now
appends the queue name to the @id for any non-default named queue.
The collection links (batches/active/recent/priority) deliberately
remain those of the main queue: batches submitted to the priority
queue appear in those shared collections, and no per-name sub-routes
exist. Integration tests assert both halves.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@donaldgray
donaldgray marked this pull request as ready for review August 17, 2026 10:46
@donaldgray
donaldgray requested a review from a team as a code owner August 17, 2026 10:46
@donaldgray
donaldgray merged commit 92fa266 into develop Aug 17, 2026
2 checks passed
@donaldgray
donaldgray deleted the hygiene/pro-15 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