Skip to content

DID-9477: [QA-SDK-PHP] PHP server SDK release contract - #19

Merged
botinc-agent[bot] merged 1 commit into
mainfrom
botinc/run-ba83b0cb
Oct 30, 2026
Merged

botinc-agent[bot] merged 1 commit into
mainfrom
botinc/run-ba83b0cb

Conversation

@botinc-agent

@botinc-agent botinc-agent Bot commented Oct 30, 2026

Copy link
Copy Markdown
Contributor

Problem

POST /v3/travel-rule/wallet-addresses/import/ accepts a JSON object with entries, a bare JSON array of rows, or a CSV upload. When an operation has more than one content type, the generator merged the forms by reading only each schema's top-level properties. A root oneOf/anyOf schema has none, so the JSON branch was silently dropped: TravelRuleWalletAddressesBulkImportParams exposed only file. The documented entries form was missing from the typed surface, so PHPStan (the SDK's selling point) rejected a valid, documented call.

Solution

  • _merge_body_schemas now flattens a root oneOf/anyOf: every branch's properties reach the merged request shape, and a field is required only when every branch requires it.
  • Regenerated: the entries field and its row shape, the row's enum constants, and the object hint the request encoder needs.

Verification

  • python3 -m unittest discover -s codegen/tests: 61 tests pass, including two new ones for a union body that also has a multipart form.
  • python3 codegen/generate.py --check: 1763 generated files up to date; entries is absent before the fix and present after.
  • PHPUnit, PHPStan and PHP-CS-Fixer could not run here: this sandbox has no PHP 8.1 (only the generator toolchain). CI runs all three. The live staging smoke tests also need a sandbox API key.

@botinc-agent
botinc-agent Bot merged commit 1fd6941 into main Oct 30, 2026
11 checks passed
@botinc-agent
botinc-agent Bot deleted the botinc/run-ba83b0cb branch October 30, 2026 19:15
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