How to specify endpoint description and name? #142
-
Hi! Loving poem and the open api integration but one thing that's been plaguing me is that redoc gets populated with most info but doesn't populate the endpoint name. I also couldn't find a way to manually add this ( example code: pub struct UsersApi;
#[OpenApi]
impl UsersApi {
#[oai(path = "/@me", method = "get")]
pub async fn user(
&self,
session: Data<&Session>,
token: TokenBearer,
) -> Result<Json<UserPayload>> {
todo!()
}
}``` |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
Do it like this: pub struct UsersApi;
#[OpenApi]
impl UsersApi {
/// description
#[oai(path = "/@me", method = "get")]
pub async fn user(
&self,
session: Data<&Session>,
token: TokenBearer,
) -> Result<Json<UserPayload>> {
todo!()
}
} |
Beta Was this translation helpful? Give feedback.
-
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!()
}
} |
Beta Was this translation helpful? Give feedback.
The first line is the summary, and the following is the description. 😁