pub struct DocumentBuilder { /* private fields */ }Expand description
Collects operations and produces a document.
Operations are described against the builder’s shared SchemaRegistry
so every named schema appears exactly once in components.schemas.
Implementations§
Source§impl DocumentBuilder
impl DocumentBuilder
Sourcepub fn description(self, description: impl Into<String>) -> Self
pub fn description(self, description: impl Into<String>) -> Self
Set the API description.
Sourcepub fn registry(&mut self) -> &mut SchemaRegistry
pub fn registry(&mut self) -> &mut SchemaRegistry
Registry to describe operations against.
Sourcepub fn add_operation(&mut self, path: &str, method: HttpMethod, op: Operation)
pub fn add_operation(&mut self, path: &str, method: HttpMethod, op: Operation)
Add an operation at path (siderite {param} template syntax).
Unnamed path parameters are named positionally from the template, and
template parameters with no documented schema get a string schema so
the document stays valid.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DocumentBuilder
impl RefUnwindSafe for DocumentBuilder
impl Send for DocumentBuilder
impl Sync for DocumentBuilder
impl Unpin for DocumentBuilder
impl UnsafeUnpin for DocumentBuilder
impl UnwindSafe for DocumentBuilder
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