Repository navigation
Preserve whole-body binary downloads and union schemas - #84
Merged
Merged
Conversation
Add explicit request metadata for raw response decoding and media negotiation. Resolve binary schema definitions with the raw-byte policy and cover bytes, empty bodies, unions, and errors. Document the generated-client contract.
kdubb
marked this pull request as ready for review
October 16, 2026 01:20
[Medium impact] The PR appears safe to merge; the latest tests address the previous coverage gap. SummaryAdds
Reviews (2) 路 Last reviewed commit: "Test explicit binary download accept typ..." 路 Reviewed by Greptile |
Cover image/png and application/x-download without registered media decoders. Verify execute and response preserve bytes and send the exact Accept header; mutation testing confirms the accept override is required.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Whole-body binary downloads currently pass through JSON/text decoding when the response advertises those media types, altering bytes or failing before the generated schema can decode them.
Add
RequestSpec.binaryResponsesoFetchTransportpreserves raw bytes for both result and response operations and accepts download media types without registered codecs. Resolve binary schema definitions with the existing raw-byte schema policy so aliases and all-binary unions retain schema validation. Mixed unions, structured binary fields, HTTP problems, and typed 204/205 handling keep their existing paths.Companion generator change: outfoxx/sunday-generator#275. Related original issue: outfoxx/sunday-python#12.
Coordinated release dependency: publish a Sunday TypeScript runtime version containing this change, then pin that version in generator PR #275 before releasing generated clients. Existing generated clients need regeneration to emit the binary-response flag. No runtime version has been published by this PR.
Validation:
SUNDAY_TYPESCRIPT_PATH.