From 99153bd4e97b77a76f87aba44538dcecac657d54 Mon Sep 17 00:00:00 2001 From: Cees-Jan Kiewiet Date: Sat, 7 Aug 2021 18:28:33 +0200 Subject: [PATCH] Don't create empty webhook events --- openapi-client.yaml | 4 ++-- src/Generator/WebHook.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/openapi-client.yaml b/openapi-client.yaml index 4ba35e2..025d0d2 100644 --- a/openapi-client.yaml +++ b/openapi-client.yaml @@ -1,4 +1,4 @@ -#spec: https://raw.githubusercontent.com/octokit/webhooks/openapi/payload-schemas/openapi-schema.yml -spec: https://raw.githubusercontent.com/github/rest-api-description/main/descriptions/api.github.com/api.github.com.yaml +spec: https://raw.githubusercontent.com/octokit/webhooks/openapi/payload-schemas/openapi-schema.yml +#spec: https://raw.githubusercontent.com/github/rest-api-description/main/descriptions/api.github.com/api.github.com.yaml namespace: ApiClients\Client\Github destination: generated diff --git a/src/Generator/WebHook.php b/src/Generator/WebHook.php index 9cb0058..b74e953 100644 --- a/src/Generator/WebHook.php +++ b/src/Generator/WebHook.php @@ -78,7 +78,7 @@ public static function generate(string $path, string $namespace, string $baseNam } if (count($tmts) === 0) { - $tmts[] = new Node\Stmt\Return_(new Node\Scalar\String_('TODO: Implement this')); + return; } $method->addStmts($tmts);