Skip to content

add support for $ref's in request bodies - #44

Merged
lightsofapollo merged 1 commit into
gpu-cli:mainfrom
Southclaws:req-body-ref
Jul 28, 2026
Merged

add support for $ref's in request bodies#44
lightsofapollo merged 1 commit into
gpu-cli:mainfrom
Southclaws:req-body-ref

Conversation

@Southclaws

Copy link
Copy Markdown
Contributor

Summary

Adds support for $ref'ing a requestBody

Referenced request bodies are resolved before operation analysis, preserving their requirdness, media type, schema, and validation document, etc..

Generated compatibility

  • Generated model or method signatures: Operations whose requestBody is a local $ref now receive the same typed body parameter they would receive if the Request Body Object were inline.
  • Query/path/header/body wire behavior: refs included now
  • Generated runtime dependencies or features: none
  • Configuration defaults or migrations: none
  • Remaining unsupported OpenAPI shapes: External-document request-body, but I guess this would be wider work around $ref's in general

Validation

  • Added or updated a focused fixture and behavioral regression test.
  • Reviewed every changed snapshot; no unrelated churn is included.
  • cargo fmt --check
  • cargo clippy --all-features -- -D warnings
  • cargo test --all-features
  • Ran scripts/install-smoke.sh for packaging/dependency changes.
  • Ran a targeted or full scripts/spec-compile.sh for generator changes.
  • Updated README, rustdoc, or changelog for user-visible behavior.

Notes for reviewers

ai transparency: this was achieved using codex while generating a rust server for a project (radengine)

@vercel

vercel Bot commented Jul 28, 2026

Copy link
Copy Markdown

@Southclaws is attempting to deploy a commit to the lbl-rd Team on Vercel.

A member of the Team first needs to authorize it.

@lightsofapollo

Copy link
Copy Markdown
Contributor

@Southclaws Cool! I'll take a look in a moment

@Southclaws

Copy link
Copy Markdown
Contributor Author

thanks! for now, using the fork actively in https://github.com/Southclaws/rad/pull/1/changes#diff-6939ad63aa2db19c9744bcf201876151af31d4674260edaca29bd679babccf58 against this schema in case it helps validate more use-cases!

and now that I think of it, I have a rather mature 13k line schema that could be useful for battle testing this generator here in case it helps!

@lightsofapollo

Copy link
Copy Markdown
Contributor

excellent- I'll try that schema too. Testing this pr now should land momentarily

@lightsofapollo
lightsofapollo merged commit 140b9e4 into gpu-cli:main Jul 28, 2026
10 of 11 checks passed
@lightsofapollo

Copy link
Copy Markdown
Contributor

nice- that openapi.yaml surfaced a few small things in the client and one larger thing in server generation. Appreciate it!

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.

2 participants