diff --git a/poem-openapi/src/docs/webhook.md b/poem-openapi/src/docs/webhook.md index 5191fda61f..7fcc86c75a 100644 --- a/poem-openapi/src/docs/webhook.md +++ b/poem-openapi/src/docs/webhook.md @@ -49,7 +49,7 @@ struct Pet { } #[Webhook] -trait MyWebhooks: Sync { +trait MyWebhooks { #[oai(method = "post")] fn new_pet(&self, pet: Json); } diff --git a/poem-openapi/tests/webhook.rs b/poem-openapi/tests/webhook.rs index d4f3340ffc..4897cf13a9 100644 --- a/poem-openapi/tests/webhook.rs +++ b/poem-openapi/tests/webhook.rs @@ -13,7 +13,7 @@ use poem_openapi::{ #[tokio::test] async fn name() { #[Webhook] - trait MyWebhooks: Sync { + trait MyWebhooks { #[oai(name = "a", method = "post")] fn test1(&self); @@ -28,7 +28,7 @@ async fn name() { #[tokio::test] async fn method() { #[Webhook] - trait MyWebhooks: Sync { + trait MyWebhooks { #[oai(method = "post")] fn test1(&self); @@ -43,7 +43,7 @@ async fn method() { #[tokio::test] async fn deprecated() { #[Webhook] - trait MyWebhooks: Sync { + trait MyWebhooks { #[oai(method = "post")] fn test1(&self); @@ -83,7 +83,7 @@ async fn tags() { #[tokio::test] async fn operation_id() { #[Webhook] - trait MyWebhooks: Sync { + trait MyWebhooks { #[oai(method = "post", operation_id = "a")] fn test1(&self); @@ -104,7 +104,7 @@ async fn operation_id() { #[tokio::test] async fn parameters() { #[Webhook] - trait MyWebhooks: Sync { + trait MyWebhooks { #[oai(method = "post")] fn test(&self, a: Query, b: Path); } @@ -137,7 +137,7 @@ async fn parameters() { #[tokio::test] async fn request_body() { #[Webhook] - trait MyWebhooks: Sync { + trait MyWebhooks { #[oai(method = "post")] fn test(&self, req: Json); } @@ -158,7 +158,7 @@ async fn request_body() { #[tokio::test] async fn response() { #[Webhook] - trait MyWebhooks: Sync { + trait MyWebhooks { #[oai(method = "post")] fn test(&self) -> Json; } @@ -182,7 +182,7 @@ async fn response() { #[tokio::test] async fn create() { #[Webhook] - trait MyWebhooks: Sync { + trait MyWebhooks { #[oai(method = "post")] fn test(&self) -> Json; } @@ -193,7 +193,7 @@ async fn create() { #[tokio::test] async fn external_docs() { #[Webhook] - trait MyWebhooks: Sync { + trait MyWebhooks { #[oai( method = "post", external_docs = "https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md"