What the repository tests today
The checked-in specs/ directory contains 55 documents from real services. Fifty-four are OpenAPI documents supported by the current generator. One Gitea document uses Swagger 2.0 and is intentionally skipped because openapi-to-rust accepts OpenAPI 3.x.
The corpus includes large and irregular documents from OpenAI, Anthropic, Cloudflare, Stripe, Microsoft Graph, Discord, Datadog, Spotify, Sentry, PagerDuty, and many others. It exists to expose failures that small Petstore-style fixtures do not.
Two CI tiers balance speed and coverage
| CI tier | Frequency | Evidence |
|---|---|---|
| Pull request / main | Every change | Generate all 54 supported specs; compile-check OpenAI and Anthropic. |
| Full corpus | Weekly and manual | Generate and compile-check all 54 supported specs. |
| Focused fixtures | Every test run | Snapshot and behavior checks for specific schema and operation shapes. |
| JSON Schema corpus | Conformance test runs | No-regression ceilings for parse failures and lossless round trips. |
A successful generation check proves the document can be parsed, analyzed, and emitted. A successful compile check additionally proves that the emitted Rust compiles in the generated harness. Neither alone proves every runtime request serializes exactly as the live API expects.
Feature status at a glance
| Area | Status | Notes |
|---|---|---|
| OpenAPI 3.0 | Supported | Models and operations generate from YAML or JSON. |
| OpenAPI 3.1 | Supported | Includes nullable type arrays and modeled JSON Schema 2020-12 fields. |
| OpenAPI 3.2 | Experimental | Parses with a warning; selected deltas affect generated methods. |
| oneOf / anyOf / allOf | Tested patterns | Includes discriminated, untagged, scalar/object, and nested fixtures. |
| Reqwest client | Supported | Async methods, auth, retries, tracing, typed errors, and builders. |
| Axum server | Opt-in | Selected-operation traits, routes, typed responses, and SSE variants. |
| Webhooks | Partial | Ingested as operations; verify the exact server or client behavior you need. |
| Runtime schema validation | Not generated | Constraints are documented but not enforced by a validator crate. |
| OpenAPI 2.0 | Not supported | Convert Swagger documents to OpenAPI 3 first. |
Inspect the real-world corpus
The specs are source-controlled so a compatibility claim can be tied to a commit. Run the same generation tier locally from the repository root:
# Generate every supported document without full compilation
SPEC_COMPILE_PARSE_ONLY=1 scripts/spec-compile.sh
# Compile the two fast-tier production targets
scripts/spec-compile.sh anthropic openai
# Compile the complete supported corpus
scripts/spec-compile.shBrowse the versioned specification corpus and theworkflow that defines both tiers.
What the conformance reports do not claim
The fixture harness tracks multiple conceptual layers, but later semantic and code-generation thresholds remain deferred. The vendored JSON Schema Test Suite runner enforces no-regression ceilings for parsing and lossless round trips; it does not yet assert full semantic JSON Schema conformance.
- Unknown or newly modeled fields may be retained without influencing generated code.
- Dynamic-reference anchor-scope resolution is incomplete.
- OpenAPI 3.2 behavior is explicitly experimental.
- Runtime constraint validation is intentionally absent.
- A compile check cannot verify behavior against a live service.
Add evidence for the API you depend on
Generate your exact versioned document, compile it, and add request serialization tests for the operations your application calls. If an uncommon schema shape fails, minimize it into a focused fixture and open an issue with the generated output or error.
openapi-to-rust generate openapi.yaml --check
cargo test
cargo checkStart with the step-by-step Rust client guide or review OpenAPI 3.1 schema behavior.