Skip to content

Latest commit

 

History

History
38 lines (27 loc) · 1.62 KB

File metadata and controls

38 lines (27 loc) · 1.62 KB

Ruby SDK codegen (sub-plan 21.3 row C-1, Ruby variant)

Per-package codegen tooling decision for the Ruby SDK. Implementation work lands in row C-4.

What gets generated, what stays handwritten

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

Tooling: openapi-generator-cli (models only)

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.

Distribution

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).

Not yet implemented

C-1 documents the decision; C-4 builds the scaffold.