Trait openapi_type::OpenapiType
source · pub trait OpenapiType {
fn visit_type<V: Visitor>(visitor: &mut V);
fn schema() -> OpenapiSchema { ... }
}
Expand description
This trait needs to be implemented by every type that is being used in the OpenAPI Spec. It gives access to the OpenapiSchema of this type. It is provided for primitive types, String and the like. For use on your own types, there is a derive macro:
#[derive(OpenapiType)]
struct MyResponse {
message: String
}