Skip to content

feat(generator): build full SDK generation foundation - #7

Draft
nmorgan-cb wants to merge 13 commits into
mainfrom
toshi/plan-service-generator-upgrade
Draft

feat(generator): build full SDK generation foundation#7
nmorgan-cb wants to merge 13 commits into
mainfrom
toshi/plan-service-generator-upgrade

Conversation

@nmorgan-cb

@nmorgan-cb nmorgan-cb commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Description

Builds the deterministic, OpenAPI-driven generation foundation for the full Coinbase Prime Java client surface.

Generator implementation included

  • Uses the committed apiSpec/prime-public-spec.yaml for normal generation and CI; live fetching is explicit and non-mutating.
  • Runs raw OpenAPI model/enum generation and the existing post-processing before custom client-surface emission.
  • Adds shared paths, configuration, naming/type resolution, request, response, service, factory, template, manifest, and reconciliation phases.
  • Generates SDK-style mutable request/response DTOs, synchronous services/implementations, and PrimeServiceFactory deterministically.
  • Preserves Java compatibility for request builders, pagination, primitive booleans, status handling, /v1 and per-call /v2 routing, service/method aliases, PrimeXM* naming, and existing model transformations.
  • Routes OpenAPI *ErrorCode and *Subcode enums into com.coinbase.prime.model.errors, aligned with the .NET generator architecture.
  • Provides make fetch-spec, make generate, make check-generated, and make generate-live-diff. Check and live-diff modes render/format only in isolated temporary locations and never mutate the checkout.

Tests added

  • Adds focused coverage for parsing, naming/type resolution, configuration/overrides, request/response/service/factory rendering, status compatibility, version routing, error-enum generation, safe stale cleanup, protected compatibility drift, and non-mutating checks.
  • Generator suite: 29 tests; root SDK suite: 285 tests.

Generation preview performed

  • Ran full generation in detached temporary worktrees using the committed spec, then compiled, tested, and Spotless-checked the generated SDK successfully.
  • The final preview reports 597 intentionally uncommitted baseline changes, including 336 generated error enums.
  • Also verified .NET PR chore: Fix generation of javadoc comments #3 locally (dotnet test: 60 generator tests and 18 SDK tests) and incorporated its naming/error-enum conventions where compatible with established Java public APIs.

Generated SDK baseline intentionally not committed

No regenerated model, DTO, service, factory, error-enum, spec, or manifest artifacts are included in this PR. Generated output will be committed only after the baseline is reviewed.

Remaining follow-up

Review and commit the generated SDK baseline, then enable make check-generated as a required CI gate.

Generated with Toshi

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Dependency update
  • Refactor / cleanup
  • Other (describe below)

Checklist

  • Tests included / updated
  • Changelog updated
  • Version bump if needed

@cb-heimdall

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 toshi/plan-service-generator-upgrade branch from d0671ee to 5e2693d Compare September 2, 2026 17:43
@nmorgan-cb nmorgan-cb changed the title feat(generator): add OpenAPI operation inventory feat(generator): build full SDK generation foundation Sep 2, 2026
nmorgan-cb and others added 9 commits September 2, 2026 16:43
Co-authored-by: Toshi <toshi-noreply@coinbase.com>
Co-authored-by: Toshi <toshi-noreply@coinbase.com>
Co-authored-by: Toshi <toshi-noreply@coinbase.com>
Co-authored-by: Toshi <toshi-noreply@coinbase.com>
Co-authored-by: Toshi <toshi-noreply@coinbase.com>
Co-authored-by: Toshi <toshi-noreply@coinbase.com>
Co-authored-by: Toshi <toshi-noreply@coinbase.com>
Co-authored-by: Toshi <toshi-noreply@coinbase.com>
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.

2 participants