Skip to main content

Crate vespera

Crate vespera 

Source
Expand description

Vespera - OpenAPI generation for Rust web frameworks

This crate provides macros and utilities for generating OpenAPI documentation from your route definitions.

Re-exports§

pub use serve::Serve;
pub use serde_json;
pub use chrono;
pub use tempfile;
pub use tower_layer;
pub use tower_service;

Modules§

axum
axum_extra
multipart
Native multipart form data extraction for Vespera.
openapi
route
schema
serve
One-liner Router::serve(addr) extension — see serve::Serve. Serve — extension trait that lets you start an axum::Router with a one-liner.

Macros§

export_app
Export a vespera app as a reusable component.
schema
Generate an OpenAPI Schema from a type with optional field filtering.
schema_type
Generate a new struct type derived from an existing type with field filtering.
vespera

Structs§

OpenApi
OpenAPI document (root structure)
Validated
Extractor wrapper that validates the inner extractor’s output via garde::Validate before handing it to the handler.
VesperaRouter
A router wrapper that defers merging until with_state() is called.

Traits§

ValidatePayload
Helper trait that pulls the validatable payload out of common axum extractors so Validated<Json<U>> can call U::validate(&u, &()).

Attribute Macros§

cron
cron attribute macro
route
route attribute macro

Derive Macros§

Multipart
Derive macro for Multipart with serde attribute support.
Schema
Derive macro for Schema