Skip to content

feat(server): emit typed response headers without model name collisions - #116

Merged
lightsofapollo merged 2 commits into
mainfrom
fix/server-response-header-names
Nov 7, 2026
Merged

lightsofapollo merged 2 commits into
mainfrom
fix/server-response-header-names

Conversation

@lightsofapollo

@lightsofapollo lightsofapollo commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

Implements #114 and includes the original commits from #115, plus a fix for generated header structs shadowing response body models.

Generated Axum response variants now carry declared headers, including separate Set-Cookie lines. Header struct names reserve existing model, parameter-enum, and response-enum names and receive numeric suffixes on collision. String cookie parameters in generated clients use AsRef correctly.

Regression coverage includes two occupied model names, parameter-enum collisions, stable public names across selector order, and HTTP round trips checking JSON bodies and multiple Set-Cookie headers. Responses without declared headers retain their shape.

Validation:

  • All 762 local all-features Rust tests passed; 7 tests skipped by the normal suite. The two pinned official SDK compatibility tests were run separately and passed against generated local servers.
  • Doctests, formatting, Clippy with warnings denied, and rustdoc with warnings denied passed locally.
  • Package/install smoke test, website build, and HTML/SEO audits passed locally.
  • CI passed corpus diff/manifest verification, all-spec generation, targeted Anthropic/OpenAI spec compilation and schema round trips, MSRV, SDK compatibility, packaging, docs, lint, formatting, and website checks. The full CI test job, doctests, and checked-in conformance report verification also passed. Full CI run: https://github.com/gpu-cli/openapi-to-rust/actions/runs/42316678586.

Merge with a merge commit to preserve #115's ancestry.

ToyVo and others added 2 commits November 6, 2026 12:16
Response Objects with declared headers now produce a
{Enum}{Variant}Headers struct as the variant's last field and
into_response appends each value as its own header line.
Set-Cookie is always multi-value per RFC 9110 section 5.3;
a declared Content-Type stays ignored per the specification.
@vercel

vercel Bot commented Nov 7, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
openapi-to-rust Ready Ready Preview Nov 7, 2026 12:11am UTC

Request Review

@lightsofapollo
lightsofapollo merged commit b0ed7ae into main Nov 7, 2026

This branch was successfully deployed

1 active deployment
Preview — 6b40196c Deployed Nov 7, 2026 by vercel[bot]
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