pub struct OpenApiBuilder { /* private fields */ }Available on crate feature
openapi only.Expand description
Builds an OpenAPI 3.0 document from a SchemaRegistry.
Implementations§
Source§impl OpenApiBuilder
impl OpenApiBuilder
Sourcepub fn description(self, description: impl Into<String>) -> Self
pub fn description(self, description: impl Into<String>) -> Self
Sets info.description.
Sourcepub fn server_with_description(
self,
url: impl Into<String>,
description: impl Into<String>,
) -> Self
pub fn server_with_description( self, url: impl Into<String>, description: impl Into<String>, ) -> Self
Adds a server URL with description.
Sourcepub fn from_registry(&self, registry: &SchemaRegistry) -> OpenApiDocument
pub fn from_registry(&self, registry: &SchemaRegistry) -> OpenApiDocument
Builds an OpenAPI 3.0 document from a SchemaRegistry.
See the openapi_export example in the repository for a full workflow.
Trait Implementations§
Source§impl Debug for OpenApiBuilder
impl Debug for OpenApiBuilder
Source§impl Default for OpenApiBuilder
impl Default for OpenApiBuilder
Source§fn default() -> OpenApiBuilder
fn default() -> OpenApiBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for OpenApiBuilder
impl RefUnwindSafe for OpenApiBuilder
impl Send for OpenApiBuilder
impl Sync for OpenApiBuilder
impl Unpin for OpenApiBuilder
impl UnsafeUnpin 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