Replies: 3 comments 2 replies
|
Try this: #[derive(serde::Deserialize, schemars::JsonSchema)]
struct MyRouteParams {
// make sure this field name matches the parameter name in the route path,
// or use #[serde(rename = "my_uuid")] to make it match if you want the field name to be different
my_uuid: Uuid,
}
pub async fn my_route(
Path(MyRouteParams { my_uuid }): Path<MyRouteParams>,
ctx: State<Context>,
) -> Result<StatusCode> { |
0 replies
|
Thank you, there is already the flag uuid in the crate schemars though? |
2 replies
|
Love this crate :) |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Hi, thank you so much for your work on this crate.
A quick related question since I could not find the doc for this,
How do you make the following (the Path extractor) work with aide:
All reactions