Per-package codegen tooling decision for the Ruby SDK. Implementation work lands in row C-4.
| Layer | Source | Style |
|---|---|---|
| Model classes | apps/backend/openapi/openapi.yaml |
codegen |
| HTTP transport | lib/blockchain0x/client.rb |
handwritten |
| Webhook verifier | lib/blockchain0x/webhooks.rb |
handwritten |
| x402 client | (Phase C-7, separate gem blockchain0x-x402) |
handwritten |
| Resource methods | lib/blockchain0x/resources/*.rb |
hybrid |
| Errors | lib/blockchain0x/errors.rb |
handwritten |
Pick: openapi-generator-cli
invoked with -g ruby --global-property=models,supportingFiles=false.
Rationale:
- The official OpenAPI generator covers Ruby with the broadest schema
support (including the OpenAPI 3.1
type: [string, 'null']shape). - Models-only mode keeps the generated code small (no opinionated client). The handwritten transport on Faraday slots in clean.
rubygems via Trusted
Publisher OIDC (matches the pypi pattern from C-2). Two gems:
blockchain0x (core) and blockchain0x-x402 (x402 client + Rack
adapter, ships in C-7).
C-1 documents the decision; C-4 builds the scaffold.