Skip to content

DID-9284: [GO-SYNC] Go SDK: fix the code generator for the new transactions batch-delete operation, merge the 2026-10-29 spec sync and release the missing endpoints - #12

Open
botinc-agent[bot] wants to merge 3 commits into
mainfrom
botinc/run-8dbc96c1
Open

botinc-agent[bot] wants to merge 3 commits into
mainfrom
botinc/run-8dbc96c1

Conversation

@botinc-agent

@botinc-agent botinc-agent Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Problem

The 2026-10-29 spec sync (PR #8) failed TestTransactionsBatchDelete: the request sent {} instead of transaction_uuids, so the nine server operations added upstream never reached the Go SDK. The batch-delete body keeps its fields inside two oneOf variants, and collectProps in codegen/types.go read only $ref, allOf and direct properties. The result was an empty TransactionsBatchDeleteParams.

The same spec also changes two shapes that 1.0.1 code compiles against. Regenerating as-is required a params argument on RegulatoryReports.Delete(ctx, id) and removed 33 exported Travel Rule network names.

Solution

  • collectProps also reads oneOf/anyOf object variants. A field is required only when every variant requires it.
  • Merges PR chore(spec): sync API spec 2026-10-29 #8's branch: Transactions.BatchDelete, AddressValidation.Validate, five TravelRule.Networks and two TravelRule.WalletProofs methods, each with a generated test. The fix also fills in fields that 5 AML-monitoring responses lacked.
  • New openapi/compatibility.json, read by the generator:
    • Delete(ctx, id) keeps its signature, and DeleteWithParams sends confirm_delete.
    • The released Travel Rule names stay as deprecated aliases, constants included.
    • Generation fails when an entry no longer applies.
  • Generator tests cover the union body and both compatibility rules. compat_test.go compiles code that uses every kept name. README and CONTRIBUTING document the rule.

Verification

  • apidiff from main (1.0.1) to this branch: 0 incompatible changes (37 at c7d222e).
  • A program written against 1.0.1 builds against main and this branch, and fails at c7d222e with the 5 errors the review reported.
  • Without compatibility.json, compat_test.go fails to compile.
  • gofmt, go vet (examples too), go run ./codegen -check, staticcheck v0.8.2 and golangci-lint v2.15.0: clean.
  • go test -race: ./codegen, TestContract (368 operations) and the regulatory reports, Travel Rule and compatibility tests passed. No other generated file changed in this revision. CI's sync simulation passed locally up to generation and these tests.
  • CI on a5cfac5 (run 40941875100): all 12 jobs passed. That covers tests on Go 1.22 to 1.27 (Linux, plus macOS and Windows on 1.27), lint, the generated-code check, 90% core coverage and the secret scan.

github-actions Bot and others added 3 commits October 29, 2026 06:39
…ctions batch-delete operation, merge the 2026-10-29 spec sync and release the missing endpoints
…ctions batch-delete operation, merge the 2026-10-29 spec sync and release the missing endpoints

This branch has not been deployed

No deployments
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