Skip to content

feat(generator): restore model-generator and regenerate models from OpenAPI#2

Open
nmorgan-cb wants to merge 5 commits into
mainfrom
nm/restore-model-generator
Open

feat(generator): restore model-generator and regenerate models from OpenAPI#2
nmorgan-cb wants to merge 5 commits into
mainfrom
nm/restore-model-generator

Conversation

@nmorgan-cb

Copy link
Copy Markdown
Contributor

Description

Restores tools/model-generator as the authoritative source for model/ and model/enums/, then regenerates the SDK from the latest live OpenAPI spec.

Review order (3 commits):

  1. feat(generator): restore model-generator for OpenAPI-driven models — tooling only
  2. chore(spec): refresh prime-public-spec.yaml from live OpenAPI — spec diff
  3. chore(models): regenerate models and enums from OpenAPI spec — generated output

Generator highlights

  • Always fetches spec (SpecFetcher) before generation
  • PostProcessor: prefix strip, Web3→Onchain identifiers, XM naming, enum aliases, stale file removal, @JsonProperty trimming, copyright year preservation
  • EnumJavadocEnhancer for enum docs from spec bullet lists

Model regen highlights

  • +14 new types (Prime XM, staking, cross-margin)
  • Removed stale types no longer in spec (TravelRuleEntry, Vasp, etc.)
  • Wire JSON unchanged; Java identifiers transformed per TS/Go parity

Request/Response/Service generation is out of scope — follow-up PR.

Type of Change

  • New feature
  • Bug fix
  • Breaking change
  • Dependency update
  • Refactor / cleanup

Checklist

  • Tests included / updated (existing suite passes after regen)
  • Changelog updated (deferred — models-only scope, no version bump in this PR)
  • Version bump if needed (deferred)

Test plan

  • cd tools/model-generator && mvn -Pgenerate
  • mvn spotless:apply && mvn test

Made with Cursor

@nmorgan-cb nmorgan-cb requested a review from a team as a code owner June 8, 2026 20:27
@cb-heimdall

cb-heimdall commented Jun 8, 2026

Copy link
Copy Markdown

🟡 Heimdall Review Status

Requirement Status More Info
Reviews 🟡 0/1
Denominator calculation
Show calculation
1 if user is bot 0
1 if user is external 0
2 if repo is sensitive 0
From .codeflow.yml 1
Additional review requirements
Show calculation
Max 0
0
From CODEOWNERS 0
Global minimum 0
Max 1
1
1 if commit is unverified 0
Sum 1

@nmorgan-cb nmorgan-cb force-pushed the nm/restore-model-generator branch 2 times, most recently from bb04c87 to 2be2732 Compare June 8, 2026 21:46
cfluke-cb
cfluke-cb previously approved these changes Jun 8, 2026
nmorgan-cb and others added 5 commits June 8, 2026 18:32
Reintroduce tools/model-generator with OpenAPI Generator templates, spec fetch, and post-processing for model and enum output under src/main/java.

Co-authored-by: Cursor <cursoragent@cursor.com>
Update the committed Prime REST API spec to match the current public OpenAPI document.

Co-authored-by: Cursor <cursoragent@cursor.com>
Regenerate model/ and model/enums/ from the refreshed spec, including new cross-margin and staking types and XM naming alignment.

Co-authored-by: Cursor <cursoragent@cursor.com>
Add staking metadata and validator provider fields, remove deprecated service aliases, and delete unused legacy request/response types superseded by canonical names.

Co-authored-by: Cursor <cursoragent@cursor.com>
Document customer-facing model, request, and removal changes for the OpenAPI sync release.

Co-authored-by: Cursor <cursoragent@cursor.com>
@nmorgan-cb nmorgan-cb force-pushed the nm/restore-model-generator branch from c848c52 to b6a5ed9 Compare June 8, 2026 22:34
@nmorgan-cb nmorgan-cb requested a review from cfluke-cb June 9, 2026 02:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants