Skip to content

Generate directly awaitable Rust APIs and response enums - #18

Merged
meoyawn merged 2 commits into
masterfrom
codex/typed-rust-responses
Oct 1, 2026
Merged

meoyawn merged 2 commits into
masterfrom
codex/typed-rust-responses

Conversation

@meoyawn

@meoyawn meoyawn commented Sep 30, 2026 •

Copy link
Copy Markdown
Collaborator

Rust operation methods returned request builders despite OpenAPI already defining the inputs, bodies and response statuses. Generate async methods that send and decode directly: client.operation(params).await? returns the operation's status enum, including every declared error response. Remove the generated Request wrapper and separate send/decode call pattern.

Buffer JSON and raw bodies with a configurable client limit; preserve unread SSE and undeclared responses. Configure custom transport once on the client so application cancellation and HTTP diagnostics cover sending and body decoding while callers use the same direct operation methods. The executable HTTP fixture verifies input encoding, optional/raw bodies, distinct response models, JSON errors, empty statuses, malformed and oversized JSON, and tracing from the active operation span.

Validation: directly awaiting operations failed on the previous generator because Request<OperationResponse> was not a future. Generator lint, Go tests and all seven Rust contract fixtures passed after the change. The regenerated Listenbox client passed lint and the desktop build. Root moon ci passed: 64 actions completed, including all 423 API tests and 87 dashboard browser tests (no failures or retries).

Consumer: listenbox/client#23.

@meoyawn meoyawn changed the title Generate typed Rust operation responses on send Generate directly awaitable Rust APIs and response enums Oct 1, 2026
@meoyawn
meoyawn merged commit 2123b73 into master Oct 1, 2026
1 check passed
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