Trait salvo_oapi::RouterExt
source · pub trait RouterExt {
// Required methods
fn oapi_security(self, security: SecurityRequirement) -> Self;
fn oapi_securities<I>(self, security: I) -> Self
where I: IntoIterator<Item = SecurityRequirement>;
fn oapi_tag(self, tag: impl Into<String>) -> Self;
fn oapi_tags<I, V>(self, tags: I) -> Self
where I: IntoIterator<Item = V>,
V: Into<String>;
}
Expand description
Router extension trait for openapi metadata.
Required Methods§
sourcefn oapi_security(self, security: SecurityRequirement) -> Self
fn oapi_security(self, security: SecurityRequirement) -> Self
Add security requirement to the router.
All endpoints in the router and it’s descents will inherit this security requirement.
sourcefn oapi_securities<I>(self, security: I) -> Selfwhere
I: IntoIterator<Item = SecurityRequirement>,
fn oapi_securities<I>(self, security: I) -> Selfwhere
I: IntoIterator<Item = SecurityRequirement>,
Add security requirements to the router.
All endpoints in the router and it’s descents will inherit these security requirements.
sourcefn oapi_tag(self, tag: impl Into<String>) -> Self
fn oapi_tag(self, tag: impl Into<String>) -> Self
Add tag to the router.
All endpoints in the router and it’s descents will inherit this tag.
Add tags to the router.
All endpoints in the router and it’s descents will inherit thes tags.
Object Safety§
This trait is not object safe.