pub struct TransformPathItem<'t> { /* private fields */ }
Expand description
A transform helper that wraps TransformPathItem
.
Implementations§
Source§impl<'t> TransformPathItem<'t>
impl<'t> TransformPathItem<'t>
Hide the path from the documentation.
This is taken into account by generators provided by this library.
Hiding an item causes it to be ignored completely, there is no way to restore or “unhide” it afterwards.
Sourcepub fn description(self, desc: &str) -> Self
pub fn description(self, desc: &str) -> Self
Provide a description for the path.
Sourcepub fn default_response<R>(self) -> Selfwhere
R: OperationOutput,
pub fn default_response<R>(self) -> Selfwhere
R: OperationOutput,
Set a default response for all operations in the path that do not already have one.
Sourcepub fn default_response_with<R, F>(self, transform: F) -> Selfwhere
R: OperationOutput,
F: Fn(TransformResponse<'_, R::Inner>) -> TransformResponse<'_, R::Inner> + Clone,
pub fn default_response_with<R, F>(self, transform: F) -> Selfwhere
R: OperationOutput,
F: Fn(TransformResponse<'_, R::Inner>) -> TransformResponse<'_, R::Inner> + Clone,
Set a default response for all operations in the path that do not already have one.
This method additionally accepts a transform function to modify the generated documentation.
Sourcepub fn security_requirement(self, security_scheme: &str) -> Self
pub fn security_requirement(self, security_scheme: &str) -> Self
Add a security requirement for all operations.
Sourcepub fn security_requirement_multi<'a, I>(self, security_schemes: I) -> Self
pub fn security_requirement_multi<'a, I>(self, security_schemes: I) -> Self
Add multi security requirement for all operations.
Sourcepub fn security_requirement_scopes<I, S>(
self,
security_scheme: &str,
scopes: I,
) -> Self
pub fn security_requirement_scopes<I, S>( self, security_scheme: &str, scopes: I, ) -> Self
Add required scopes to a security requirement for all operations.
If the scheme requirement does not exist, it will be added.
Sourcepub fn security_requirement_multi_scopes<'a, I, IS, S>(
self,
security_schemes: I,
scopes: IS,
) -> Self
pub fn security_requirement_multi_scopes<'a, I, IS, S>( self, security_schemes: I, scopes: IS, ) -> Self
Add required scopes to a security requirement for all operations.
If the scheme requirement does not exist, it will be added.