Struct aide::transform::TransformPathItem
source · 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) -> Selfwhere
I: IntoIterator<Item = &'a str> + Clone,
pub fn security_requirement_multi<'a, I>(self, security_schemes: I) -> Selfwhere I: IntoIterator<Item = &'a str> + Clone,
Add multi security requirement for all operations.
sourcepub fn security_requirement_scopes<I, S>(
self,
security_scheme: &str,
scopes: I
) -> Selfwhere
I: IntoIterator<Item = S>,
S: Into<String>,
pub fn security_requirement_scopes<I, S>( self, security_scheme: &str, scopes: I ) -> Selfwhere I: IntoIterator<Item = S>, S: Into<String>,
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
) -> Selfwhere
I: IntoIterator<Item = &'a str> + Clone,
IS: IntoIterator<Item = S>,
S: Into<String>,
pub fn security_requirement_multi_scopes<'a, I, IS, S>( self, security_schemes: I, scopes: IS ) -> Selfwhere I: IntoIterator<Item = &'a str> + Clone, IS: IntoIterator<Item = S>, S: Into<String>,
Add required scopes to a security requirement for all operations.
If the scheme requirement does not exist, it will be added.