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§

source

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.

source

fn oapi_securities<I>(self, security: I) -> Self

Add security requirements to the router.

All endpoints in the router and it’s descents will inherit these security requirements.

source

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.

source

fn oapi_tags<I, V>(self, tags: I) -> Self
where I: IntoIterator<Item = V>, V: Into<String>,

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.

Implementations on Foreign Types§

source§

impl RouterExt for Router

source§

fn oapi_security(self, security: SecurityRequirement) -> Self

source§

fn oapi_securities<I>(self, iter: I) -> Self

source§

fn oapi_tag(self, tag: impl Into<String>) -> Self

source§

fn oapi_tags<I, V>(self, iter: I) -> Self
where I: IntoIterator<Item = V>, V: Into<String>,

Implementors§