vespera

Build Rust Axum APIs with compile-time OpenAPI 3.1 generation via Vespera macros.

1|Updated Aug 30, 2026
One-click install
npx skills add https://github.com/dev-five-git/devup-mcp --skill vespera-dev-five-git
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: vespera
Source: https://github.com/dev-five-git/devup-mcp/tree/main/crates/devup-mcp/src/server/skills/vespera
Command: npx skills add https://github.com/dev-five-git/devup-mcp --skill vespera-dev-five-git

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Writing Rust APIs with Axum normally requires manually maintaining OpenAPI specs, request validation logic, and DTO structs that drift out of sync with database models. This Skill guides an agent to build APIs with Vespera, which generates OpenAPI 3.1 specs at compile time from route handler macros and derives request/response schemas directly from SeaORM models. ## Core Features & Use Cases - Macro-driven routing: Define routes with #[vespera::route] on pub async fn handlers, with file-structure-to-URL mapping and automatic OpenAPI path generation. - Request validation: Wrap extractors in Validated<T> to enforce garde rules and return canonical 422 JSON error envelopes automatically. - Schema derivation from models: Use schema_type! with pick, omit, partial, and omit_default to generate DTOs from SeaORM models, including relation handling and auto-generated From impls. - Use Case: When adding a new PATCH /users/{id} endpoint, derive a partial update struct from the user model with schema_type!(UserPatch from crate::models::user::Model, partial) instead of hand-writing a struct that can drift from the database schema. ## Quick Start Ask the agent to create a Vespera route handler with a validated JSON body and a response schema derived from your SeaORM model using schema_type!.

Frequently Asked Questions about vespera

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate OpenAPI specs from Rust Axum route handlers?▼

Vespera generates OpenAPI 3.1 specs at compile time by scanning route handlers annotated with #[vespera::route]. Handlers must be pub async fn, and custom types need #[derive(Schema)] to appear in the spec written by the vespera! macro.

How do I validate request bodies in Axum and return 422 errors?▼

Wrap any extractor in Validated<T>, such as Validated<Json<T>>, and derive garde::Validate on the inner type with #[garde(...)] field rules. Vespera converts validation failures into a canonical 422 JSON response with an errors array before the handler runs.

How do I derive API response structs from SeaORM models in Rust?▼

Use the schema_type! macro with pick or omit parameters, for example schema_type!(UserResponse from crate::models::user::Model, omit = ["password_hash"]). It generates the struct plus a From impl, and resolves SeaORM relations like BelongsTo and HasMany automatically.

Does Vespera support multipart file uploads in Axum?▼

Yes, Vespera supports TypedMultipart with FieldData<NamedTempFile> fields, which map to string with binary format in OpenAPI. The schema_type! macro also has a multipart mode that derives Multipart instead of serde and preserves #[form_data] attributes.

Why is my Rust type not appearing in the generated OpenAPI schema?▼

The type must derive Schema and be used in a route handler's input or output. For generic types, every type parameter must also derive Schema, such as struct Paginated<T: Schema>.

Can I merge multiple Vespera apps into one OpenAPI spec?▼

Yes, export child apps with vespera::export_app!(Name) and merge them in the parent via the merge parameter of the vespera! macro. Child routers and OpenAPI specs are combined at compile time, and Swagger UI shows all routes.