Skip to content

Adjunct POST: advertise the HydraCollection response only (single-Adjunct annotations were never produced) - #1292

Merged
donaldgray merged 1 commit into
developfrom
hygiene/adj-14
Aug 26, 2026
Merged

Adjunct POST: advertise the HydraCollection response only (single-Adjunct annotations were never produced)#1292
donaldgray merged 1 commit into
developfrom
hygiene/adj-14

Conversation

@tomcrane

Copy link
Copy Markdown
Contributor

What does this change?

POST /customers/{c}/spaces/{s}/images/{i}/adjuncts is annotated as returning either a HydraCollection<Adjunct> or a single Adjunct (200/201 each), and its XML doc comment says "or a HydraCollection if more than 1 submitted". The implementation does not do that: BuildHydraResponse in AdjunctsController always wraps the result in a HydraCollection, even when a single adjunct was POSTed (only PUT returns a bare Adjunct). Verified on the current stage deployment — a single-member POST returns { "@type": "Collection", "totalItems": 1, "member": [ ... ] }.

This PR removes the two single-Adjunct ProducesResponseType attributes from the POST action and corrects the doc comment, so Swagger/OpenAPI describes the response the endpoint actually produces. No behaviour change — annotation and comment only. The public API docs (dlcs/public-docs, adjuncts page) are being updated in step to state that POST always returns a collection.

No database, infrastructure, configuration or breaking changes.

…ways returns a HydraCollection)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011sQRpZ5sSddRoFLdHHrHdz
@donaldgray
donaldgray marked this pull request as ready for review August 26, 2026 10:36
@donaldgray
donaldgray requested a review from a team as a code owner August 26, 2026 10:36
@donaldgray
donaldgray merged commit f45d577 into develop Aug 26, 2026
2 checks passed
@donaldgray
donaldgray deleted the hygiene/adj-14 branch August 26, 2026 10:37
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