pub struct OpenApiBuilder { /* private fields */ }Expand description
OpenAPI document builder
Implementations§
Source§impl OpenApiBuilder
impl OpenApiBuilder
Sourcepub fn with_info(
self,
title: String,
version: String,
description: Option<String>,
) -> Self
pub fn with_info( self, title: String, version: String, description: Option<String>, ) -> Self
Set custom info for the API
Sourcepub fn add_route(&mut self, route: &RouteInfo, schema_gen: &mut SchemaGenerator)
pub fn add_route(&mut self, route: &RouteInfo, schema_gen: &mut SchemaGenerator)
Add a route to the OpenAPI document
Sourcepub fn build(self, schema_gen: SchemaGenerator) -> OpenApiDocument
pub fn build(self, schema_gen: SchemaGenerator) -> OpenApiDocument
Build the final OpenAPI document
Trait Implementations§
Auto Trait Implementations§
impl Freeze for OpenApiBuilder
impl RefUnwindSafe for OpenApiBuilder
impl Send for OpenApiBuilder
impl Sync for OpenApiBuilder
impl Unpin for OpenApiBuilder
impl UnwindSafe for OpenApiBuilder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more