Skip to main content

model_derives

Function model_derives 

Source
pub fn model_derives() -> TokenStream
Expand description

The #[derive(...)] attribute applied to every generated model struct and enum.

With the validation feature enabled, serde_valid::Validate is appended so the generated field-level #[validate(...)] attributes take effect and callers can run model.validate(). The derive is referenced through the facade re-export (::openapi_trait::serde_valid), matching the convention used for chrono/uuid.