Skip to content

Commit

Permalink
remove Sync bound on WebHook
Browse files Browse the repository at this point in the history
  • Loading branch information
sunli829 committed Mar 30, 2024
1 parent d7ff091 commit cba2ecb
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion poem-openapi/src/docs/webhook.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ struct Pet {
}

#[Webhook]
trait MyWebhooks: Sync {
trait MyWebhooks {
#[oai(method = "post")]
fn new_pet(&self, pet: Json<Pet>);
}
Expand Down
18 changes: 9 additions & 9 deletions poem-openapi/tests/webhook.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand All @@ -28,7 +28,7 @@ async fn name() {
#[tokio::test]
async fn method() {
#[Webhook]
trait MyWebhooks: Sync {
trait MyWebhooks {
#[oai(method = "post")]
fn test1(&self);

Expand All @@ -43,7 +43,7 @@ async fn method() {
#[tokio::test]
async fn deprecated() {
#[Webhook]
trait MyWebhooks: Sync {
trait MyWebhooks {
#[oai(method = "post")]
fn test1(&self);

Expand Down Expand Up @@ -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);

Expand All @@ -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<i32>, b: Path<String>);
}
Expand Down Expand Up @@ -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<i32>);
}
Expand All @@ -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<i32>;
}
Expand All @@ -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<i32>;
}
Expand All @@ -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"
Expand Down

0 comments on commit cba2ecb

Please sign in to comment.