Trait utoipa::ToResponse
source · [−]Expand description
This trait is implemented to document a type which represents a single response which can be referenced or reused as a component in multiple operations.
Examples
use utoipa::{
openapi::{Response, ResponseBuilder},
ToResponse,
};
struct MyResponse;
impl ToResponse for MyResponse {
fn response() -> (String, Response) {
(
"MyResponse".to_string(),
ResponseBuilder::new().description("My Response").build(),
)
}
}