Skip to content

fix(server): preserve response and streaming contracts#40

Merged
lightsofapollo merged 4 commits into
mainfrom
agent/fix-server-sse-review
Jul 26, 2026
Merged

fix(server): preserve response and streaming contracts#40
lightsofapollo merged 4 commits into
mainfrom
agent/fix-server-sse-review

Conversation

@lightsofapollo

Copy link
Copy Markdown
Contributor

Summary

  • apply configured JSON/YAML schema overlays consistently in server CLI discovery and generation
  • preserve declared response references, bodyless statuses, JSON media types, SSE statuses, and wildcard/default runtime statuses
  • reject unsupported-only response media and normalized Rust tag identifier collisions with actionable diagnostics
  • add every-PR official Anthropic Python SDK coverage alongside the existing official OpenAI SDK gate
  • prepare the source-breaking generated API correction as version 0.10.0

Why

Server generation previously produced code that compiled but could return the wrong HTTP status or content type, lose reusable response semantics, and miss SSE declared through a configured overlay. The Anthropic example also lacked an official-client PR contract test.

Impact

Regenerating server code may require implementation changes: bodyless and SSE variants now reflect their declared statuses, and wildcard/default variants accept a runtime status. This pre-1.0 source-breaking correction is documented in the 0.10.0 changelog.

Validation

  • cargo test -p openapi-to-rust --all-features
  • cargo clippy -p openapi-to-rust --all-features -- -D warnings
  • cargo check -p openapi-to-rust --all-features --locked
  • cargo fmt --all -- --check
  • generated OpenAI and Anthropic server example tests
  • official OpenAI 2.45.0 and Anthropic 0.120.0 Python SDK unary/SSE smoke tests
  • focused overlay, response semantics, tag collision, and CLI workflow tests

@vercel

vercel Bot commented Jul 26, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
openapi-to-rust Ready Ready Preview, Comment Jul 26, 2026 10:55pm

Request Review

@lightsofapollo
lightsofapollo marked this pull request as ready for review July 26, 2026 22:59
@lightsofapollo
lightsofapollo merged commit f204c0e into main Jul 26, 2026
12 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