pub struct OpenApiBuilder { /* private fields */ }Expand description
Embedded builder, also used by the HTTP OpenAPI plugin.
Implementations§
Source§impl OpenApiBuilder
impl OpenApiBuilder
pub fn new(title: impl Into<String>, version: impl Into<String>) -> Self
pub fn description(self, description: impl Into<String>) -> Self
Sourcepub fn registered(config: &AuthConfig, registry: &OpenApiRegistry) -> Self
pub fn registered(config: &AuthConfig, registry: &OpenApiRegistry) -> Self
Construct the upstream document defaults from an immutable instance snapshot.
Sourcepub fn registered_with_native_extensions(
config: &AuthConfig,
registry: &OpenApiRegistry,
include_native_extensions: bool,
) -> Self
pub fn registered_with_native_extensions( config: &AuthConfig, registry: &OpenApiRegistry, include_native_extensions: bool, ) -> Self
Include documented Rust extensions while retaining upstream generator defaults.
pub fn annotated( self, method: &HttpMethod, path: &str, plugin: &str, core: bool, metadata: &OpenApiEndpoint, ) -> Self
pub fn route( self, method: &HttpMethod, path: &str, operation_id: &str, tag: &str, ) -> Self
Sourcepub fn plugin<S: AuthSchema>(self, plugin: &dyn AuthPlugin<S>) -> Self
pub fn plugin<S: AuthSchema>(self, plugin: &dyn AuthPlugin<S>) -> Self
Register all routes from a plugin.
Sourcepub fn core_routes(self) -> Self
pub fn core_routes(self) -> Self
Register core routes that are not part of any plugin.
Sourcepub fn build(self) -> OpenApiSpec
pub fn build(self) -> OpenApiSpec
Build the final OpenAPI spec.
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 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