Generate SDK from OpenAPI, GET integration tests, trim stub examples & generator#45
Open
nmorgan-cb wants to merge 8 commits intomainfrom
Open
Generate SDK from OpenAPI, GET integration tests, trim stub examples & generator#45nmorgan-cb wants to merge 8 commits intomainfrom
nmorgan-cb wants to merge 8 commits intomainfrom
Conversation
Add BaseIntegrationTest and domain IT classes covering Prime REST GET operations with optional query parameters where applicable. Tests skip when COINBASE_PRIME_* env vars are absent or when an endpoint requires features the account does not have (financing locates, staking currency support). Run with: mvn test-compile failsafe:integration-test or mvn verify -Dgpg.skip=true. Made-with: Cursor
f4b5c47 to
e7170f6
Compare
…ders Delete generated sample mains that contained only System.out.println stubs with no SDK usage. Keeps existing fuller Example/*.java samples intact. Made-with: Cursor
Remove ExamplePhase from SdkGeneratorMain; delete the phase class. Docs now state that com.coinbase.examples is hand-maintained only. Made-with: Cursor
Reverts all changes to src/main/java/com/coinbase/examples/ introduced on nm/generate-endpoints, restoring the 3 deleted example files. Made-with: Cursor
Generator now resolves the SDK-emitted copyright year from the first git commit that added the anchor file (RequestPhase.java) and preserves the existing on-disk year for already-tracked files via applyCopyrightYear. Restores headers on pre-existing files that prior runs had bumped, and sets new files to the anchor year (2026). Made-with: Cursor
Made-with: Cursor
…points Adds comprehensive serialization/deserialization test coverage for all 19 service packages that previously had no tests. Each test file validates request construction, builder validation, request serialization (including @JsonIgnore behavior for path params), and response deserialization using Jackson ObjectMapper configured to match production SDK behavior. Made-with: Cursor
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.
Summary
Regenerates the Prime Java SDK from the published OpenAPI spec (models, per-operation
*Request/*Response,*Service/*ServiceImpl,PrimeServiceFactory). Adds Failsafe integration coverage for GET endpoints, serialization/deserialization unit tests for all service domains, and removes placeholder noise from examples and the generator.The majority of changes in this PR are test files.
SDK generation
CHANGELOG.md).Serialization/deserialization tests (
*SerializationTest.java)@JsonIgnorepath param behavior), and response deserialization viaObjectMapper.ObjectMapperconfigured withFAIL_ON_UNKNOWN_PROPERTIES=falseto match production SDK behavior.Integration tests (
*IT.java)BaseIntegrationTestplus per-domain IT classes; optional query parameters exercised where applicable.COINBASE_PRIME_CREDENTIALS,COINBASE_PRIME_PORTFOLIO_ID,COINBASE_PRIME_ENTITY_IDfor live runs; tests skip when unset.Run unit tests:
mvn testRun ITs:
mvn test-compile failsafe:integration-test # or: mvn verify -Dgpg.skip=trueExamples & generator
com.coinbase.examplesthat only printedTODO: implement example for …(no SDK usage).ExamplePhasefromtools/model-generator; the generator no longer creates TODO example files. Samples undercom.coinbase.examplesare documented as hand-maintained only (README.md,CLAUDE.md,tools/model-generator/README.md).