Skip to content

Pin @JsonProperty on FRAGILE wire DTO record components (#52)#60

Merged
johardi merged 1 commit into
mainfrom
feature/52-pin-jsonproperty-fragile-records
May 18, 2026
Merged

Pin @JsonProperty on FRAGILE wire DTO record components (#52)#60
johardi merged 1 commit into
mainfrom
feature/52-pin-jsonproperty-fragile-records

Conversation

@johardi

@johardi johardi commented May 18, 2026

Copy link
Copy Markdown
Member

Summary

  • Adds an explicit @JsonProperty("<name>") to every record component flagged FRAGILE by the wire-DTO conformance audit (issue Pin @JsonProperty on all naked record components flagged as FRAGILE by the wire-DTO conformance audit (58 records) #52), so the JSON contract no longer depends on incidental agreement between Java component names and the gwt-ui client.
  • Covers all 58 backend files in the issue list; two (GetDeprecatedEntitiesAction, PerformEntitySearchAction) already had the annotation, so 56 files actually change here.
  • Where the file has an explicit canonical constructor, the annotations are mirrored on its parameters too — matching the existing pattern in GetDeprecatedEntitiesAction / PerformEntitySearchAction.

A renaming of either the Java component or the matching gwt-ui field will now break the wire contract loudly instead of silently deserializing as null.

Test plan

  • mvn -q -DskipTests compile passes.
  • Companion client-side PR in webprotege-gwt-ui lands together (26 files; covered separately).
  • After both PRs merge, re-run tools/audit_json_conformance.py and confirm FRAGILE=0 and no MATCH row regresses to NAME_MISMATCH.

Add explicit @JsonProperty("<name>") on every record component flagged
FRAGILE by the wire-DTO conformance audit, so the JSON contract no
longer depends on incidental agreement between Java component names
and gwt-ui client field names. A future rename on either side will
now surface as an explicit contract change instead of silently
deserializing as null.

Covers all 58 backend files listed in #52 (two already had the
annotation, so 56 files actually change here).

Closes #52

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.

1 participant