schema

Attribute Macro schema 

Source
#[schema]
Expand description

Auto-register a schema type for zero-config OpenAPI.

Attach this to a struct or enum that also derives Schema (utoipa::ToSchema). This ensures the type is registered into RustAPI’s OpenAPI components even if it is only referenced indirectly (e.g. as a nested field type).

use rustapi_rs::prelude::*;

#[rustapi_rs::schema]
#[derive(Serialize, Schema)]
struct UserInfo { /* ... */ }