Skip to main content

Crate rustlavel_openapi

Crate rustlavel_openapi 

Source
Expand description

rustlavel-openapi: API documentation, generated from the routes themselves.

The router already knows every path, method, and parameter; the route builder carries the prose. Nothing has to be repeated in a separate file, which is the reason hand-written API docs go stale.

App::new()?
    .routes(routes::api::routes)
    .plugin(OpenApi::new("Orders API", "1.0"))

Modules§

docs
The human-readable documentation page.

Structs§

Info
What the generated document says about the API as a whole.

Functions§

document
Build an OpenAPI 3.1 document from a router.
mount
The routes that serve the document and the documentation page.