Skip to content

omit absent option headers, compose header_out on every body kind, bind multipart parts - #289

Merged
eburgos merged 1 commit into
masterfrom
header-composition-and-multipart
Sep 6, 2026
Merged

omit absent option headers, compose header_out on every body kind, bind multipart parts#289
eburgos merged 1 commit into
masterfrom
header-composition-and-multipart

Conversation

@eburgos

@eburgos eburgos commented Sep 6, 2026

Copy link
Copy Markdown
Owner

Three changes on the header/body emission seam.

Absent option headers. An Option header_in bound to None omits the header on every generated client (Rust, TypeScript, Dart — the last two sent undefined-ish junk of their own); the dispatcher already read absence as JSON null, so both directions agree. The AMQP channel never shared the defect (full JSON round trip) — pinned by a test.

header_out on every body kind. The success tuple composes: body pair or StreamedAnswer first, then one element per declared header in declaration order — (Vec<u8>, String, ...), (StreamedAnswer, ...) — written and read back on both directions of both clients. The old stream-refusal is gone; an arity mismatch refuses instead. TypeScript also gained its missing body = "bytes" support outright, required for string-level coverage of the composed shape.

Multipart. http(body = "multipart"): scalar fields bind by wire key, file parts are claimed with part("name" = parameter) and arrive as the streaming seam's body handles, decoded before validation. Refusals (spanned, compile_fail): multipart on a bodyless method, a part naming no field, an unbound required part.

Gate: just lint, just test-named-features, all-features clippy, and cargo test --all-features all green (62 binaries, 0 failed).

…nd multipart parts

Three changes on one seam. An Option header_in bound to None now
omits the header on every generated client - the http dispatcher
already read absence as null, so the round trip agrees; the amqp
channel never shared the defect and a test pins that. header_out
composes onto bytes and streamed answers alike: the success tuple
carries the body pair or the streamed answer first, then one element
per declared header, and both directions of both clients read them
back. A multipart request body binds scalar fields by wire key and
claims file parts with part("name" = parameter), decoding before
validation, refusing a part naming no field, an unbound required
part, and multipart on a bodyless method.
@eburgos
eburgos merged commit 417ebd6 into master Sep 6, 2026
@eburgos
eburgos deleted the header-composition-and-multipart branch September 6, 2026 03:00
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