Skip to content

How to specify endpoint description and name? #142

Answered by sunli829
ChillFish8 asked this question in Q&A
Discussion options

You must be logged in to vote

The first line is the summary, and the following is the description. 😁

pub struct UsersApi;

#[OpenApi]
impl UsersApi {
    /// summary
    ///
    /// description
    /// A
    /// B
    #[oai(path = "/@me", method = "get")]
    pub async fn user(
        &self,
        session: Data<&Session>,
        token: TokenBearer,
    ) -> Result<Json<UserPayload>> {
        todo!()
    }
}

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
2 replies
@ChillFish8
Comment options

@ChillFish8
Comment options

Comment options

You must be logged in to vote
1 reply
@ChillFish8
Comment options

Answer selected by ChillFish8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants