Fix copy-paste errors and stale metadata in Hydra models - #1235
Merged
Conversation
role is freely settable on POST and PUT (CustomHeaderConverter copies it; UpdateCustomHeader writes it) and the docs table says readonly False. Only generated vocab/Hydra docs change. Hygiene-sprint mechanical track (card ACC-04). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The @id-must-be-empty rule reported a named query error on custom header requests; the converter parameter was likewise misnamed hydraNamedQuery. Hygiene-sprint mechanical track (card ACC-05). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Ties made property emission order undefined: - ImageStorage: adjunctSize/lastChecked/checkingInProgress all 55 -> 55/56/57 - ApiKey: key/secret both 12 -> 12/13 - PortalUser: created/roles both 13 -> 13/14 (enabled 14 -> 15 to keep the sequence) Serialisation ordering only; no schema or value change. Hygiene-sprint mechanical track (card ACC-07). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
ApiKey.cs key-create operation label ended mid-sentence with a typo (Requires eleveated); Customer.cs keys link said the generates secret. Generated vocab/documentation strings only. Hygiene-sprint mechanical track (card ACC-19; the docs half is public-docs batch D2). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
QueueSummary was annotated with the customer Queue class (HydraClass(typeof(QueueClass))) and QueueSummaryClass bootstrapped over itself instead of typeof(QueueSummary) - compare BatchClass -> typeof(Batch), QueueClass -> typeof(Queue). Runtime JSON unaffected; generated vocab/ApiDocumentation for QueueSummary was wrong. Hygiene-sprint mechanical track (card PRO-10). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The named-query management API (GET/PUT/DELETE/POST) and all output projections are fully implemented; the placeholder Unstable annotation was misleading. DefineOperations advertised a PATCH the controller does not implement (the docs table correctly omits it). Hygiene-sprint mechanical track (card DIS-13). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
donaldgray
marked this pull request as ready for review
August 5, 2026 09:35
donaldgray
approved these changes
Aug 5, 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.
Small copy-paste and metadata fixes in the Hydra model layer and the custom-header feature. None of these change consumer-facing runtime JSON values — they affect generated vocab/Hydra documentation, one validation error message, and property emission order only. One commit per fix.
CustomHeader.Rolewas declaredReadOnly = truein its[HydraLink]attribute, butroleis freely settable on POST and PUT (the converter copies it andUpdateCustomHeaderwrites it). NowReadOnly = falseto match behaviour."DLCS must allocate named query id..."on a custom header request, and the converter's parameter was namedhydraNamedQuery. Both are copy-paste remnants from the NamedQuery feature; message and parameter renamed.JsonPropertyOrders made emission order undefined for several properties:ImageStoragehadadjunctSize/lastChecked/checkingInProgressall at Order 55 (now 55/56/57);ApiKeyhadkey/secretboth at 12 (now 12/13);PortalUserhadcreated/rolesboth at 13 (now 13/14, withenabledbumped 14→15 to preserve the sequence).QueueSummaryvocab wiring was a copy-paste bug: the class was annotated[HydraClass(typeof(QueueClass), ...)]— pointing at the customer Queue's Hydra class rather than its own — andQueueSummaryClassbootstrapped overtypeof(QueueSummaryClass)(itself) instead oftypeof(QueueSummary). Both now follow the pattern used byBatch/BatchClassandQueue/QueueClass. Runtime JSON (the counts) is unaffected; the generated vocab/ApiDocumentation forQueueSummarywas wrong.NamedQuerycarried stale metadata: the class was still annotated[Unstable(Note = "Currently the named query implementation is a placeholder,")]although the named-query management API (GET/PUT/DELETE/POST) and all output projections are fully implemented; andDefineOperationsadvertised a PATCH operation the controller does not implement. Annotation removed, PATCH dropped from the advertised operations.Noticed while in
NamedQuery.csbut deliberately not changed here:globalandtemplateshareJsonPropertyOrder 11 — the same defect class as the renumbering above, left for a follow-up.Builds clean against
develop(0 errors).🤖 Generated with Claude Code