New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
how to document Path<> and Query with poem_openapi? #776
Comments
it's okay, I found out how : here's an example of what to do if someone wants to do the same thing : const ID_EXAMPLE: fn() -> String = || "id code".to_owned();
#[oai(path = "/user/:id", method = "get")]
async fn hello(&self,
#[oai(name = "id", example = "ID_EXAMPLE")]
/// description here
Path(id): Path<String>
) -> PlainText<String> {
PlainText(format!("userid = {}", id))
}
Poem is very feature-rich, and I'd like to congratulate you on a great piece of work, but unfortunately it lacks documentation and examples for this kind of scenario. |
Because there could be many different types, not just strings. |
Hello,
How to add a description to the :id parameter with #[aoi] poem_openapi,
like this:
and also for Url parameters (Query),
http://xxxxxxxxxx/yyyy?param1=3 & param2=8784
The text was updated successfully, but these errors were encountered: