diff --git a/examples/oapi-generics/src/main.rs b/examples/oapi-generics/src/main.rs index 0b0a43a0f..75f52a6c6 100644 --- a/examples/oapi-generics/src/main.rs +++ b/examples/oapi-generics/src/main.rs @@ -7,14 +7,19 @@ struct MyObject { value: T, } +/// Use string type, this will add to openapi doc. #[endpoint] async fn use_string(body: JsonBody>) -> String { format!("{:?}", body) } + +/// Use i32 type, this will add to openapi doc. #[endpoint] async fn use_i32(body: JsonBody>) -> String { format!("{:?}", body) } + +/// Use u64 type, this will add to openapi doc. #[endpoint] async fn use_u64(body: JsonBody>) -> String { format!("{:?}", body)