Skip to content

fix: stop dropping request bodies for composed schemas in codegen - #39

Merged
Gintm merged 1 commit into
developfrom
fix/generator-composed-request-bodies
Aug 20, 2026
Merged

fix: stop dropping request bodies for composed schemas in codegen#39
Gintm merged 1 commit into
developfrom
fix/generator-composed-request-bodies

Conversation

@Gintm

@Gintm Gintm commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

The resource and MCP generators only read body params from the schema's top-level properties, so composed request bodies generated methods with no body at all: create_ad_audience() could never send its required fields and always 400'd, and create_messaging_ad / create_call_ad / create_ctwa_ad were equally broken.

$ref and allOf bodies now flatten into normal kwargs; oneOf/anyOf unions fall back to a required raw body dict sent verbatim.

The resource and MCP generators only read body params from the schema's
top-level properties, so composed request bodies generated methods with
no body at all: create_ad_audience() could never send its required
fields and always 400'd, and create_messaging_ad / create_call_ad /
create_ctwa_ad were equally broken.

$ref and allOf bodies now flatten into normal kwargs; oneOf/anyOf
unions fall back to a required raw body dict sent verbatim.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@Gintm
Gintm merged commit d261bba into develop Aug 20, 2026
4 checks 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