#axum #openapi #web-api

bin+lib orator

Server stub generation from OpenAPI 3.1 specs

7 releases

Uses new Rust 2024

new 0.1.2 Mar 18, 2026
0.1.1 Mar 17, 2026
0.0.4 Mar 17, 2026

#2504 in HTTP server

MIT license

91KB
2K SLoC

Orator

Server stub generation from OpenAPI 3.1 specs.

CI codecov crates-badge docs-badge Crates.io status

[!WARNING] This is work in progress — do not use it in production yet.

Examples

The best way to get a feel for what the crate is capable of is looking at the tennis club example in examples/.

Please refer to the example's README for more detail.

Features & status

  • Code generation of schemas for requests and responses
    • String enums
    • Complex types involving allOf, anyOf and oneOf
    • Optional properties mapped to Option
  • Code generation for operations
    • Per-tag traits
    • Generic context propagation to handlers for flexibility
  • Axum router generation
  • Parameter extraction
    • Path parameters
    • Query parameters
    • Headers
    • Cookie parameter support
  • CLI tool for explicit code generation into your project
  • Default response handling
  • Support for security schemes
  • Support for webhooks

Dependencies

~8–12MB
~199K SLoC