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> { |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
Thank you, there is already the flag uuid in the crate schemars though? |
Beta Was this translation helpful? Give feedback.
2 replies
-
|
Love this crate :) |
Beta Was this translation helpful? Give feedback.
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:
Beta Was this translation helpful? Give feedback.
All reactions