Description
utoipa generates OpenAPI documentation for Rust REST APIs automatically from your code. It uses simple procedural macros that you put on your handlers and types, so you can focus on the API logic rather than writing YAML or JSON by hand. It is code-first and framework-agnostic, and it also contains Rust types for the OpenAPI specification, so you can write a spec in Rust if auto-generation does not suit you. It has integrations for actix-web, axum and Rocket that parse path, path parameter and query parameter information and recognise request and response bodies, and plain utoipa can be used with other frameworks, such as warp. Features include OpenAPI 3.1 support, pluggable setup with frameworks, support for generic types, and automatic schema collection from usages. The README notes limits: tuples, arrays and slices cannot be used as generic arguments on types, and types that implement the schema trait manually should not have generic arguments. The project is on GitHub.…
Highlights
- OpenAPI 3.1 generated from Rust code
- Integrations for actix-web, axum and Rocket
- Code-first macros on handlers and types
- Automatic schema collection
Ratings & Reviews
No ratings yet
Be the first to rate Utoipa.
People also visit

agent-docs-api-openapi
Agent skill for docs-api-openapi - invoke with $agent-docs-api-openapi
Utoipa FAQ
What is utoipa?
A Rust crate that generates OpenAPI documentation automatically from your code.
Which frameworks does it support?
actix-web, axum and Rocket have specific integrations, and plain utoipa works with others, such as warp.
Does it support OpenAPI 3.1?
Yes. The README lists OpenAPI 3.1.
Can I write the spec in Rust without macros?
Yes. The crate contains Rust types for the OpenAPI spec.
Are there limits on generics?
Yes. The README says tuples, arrays and slices cannot be used as generic arguments on types.
How do I use it?
Add the crate to your Rust project and annotate handlers and types with its macros.
What are the best Utoipa alternatives?
Popular alternatives to Utoipa include RapiDoc, Docs and Laravel Openapi. See all Utoipa alternatives






