diff --git a/crates/oapi-macros/tests/endpoint_tests.rs b/crates/oapi-macros/tests/endpoint_tests.rs index b6d830d52..819893796 100644 --- a/crates/oapi-macros/tests/endpoint_tests.rs +++ b/crates/oapi-macros/tests/endpoint_tests.rs @@ -48,15 +48,15 @@ fn test_endpoint_hello() { #[test] fn test_endpoint_generic() { - pub struct Generic(T); + struct Generic(T); #[endpoint] impl Generic where T: Send + Sync + 'static, { - async fn handle(&self, _req: &mut Request) -> String { - String::new() + async fn handle(name: QueryParam) -> String { + format!("[Generic] Hello, {}!", name.as_deref().unwrap_or("World")) } } @@ -74,7 +74,7 @@ fn test_endpoint_generic() { "paths":{ "/generic":{ "get":{ - "operationId":"endpoint_tests.test_endpoint_generic.generic", + "operationId":"endpoint_tests.test_endpoint_generic.Generic", "parameters":[{ "name":"name", "in":"query",