From b6aef4d235be0e3f1733f4229fd37ae0bcd66654 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=B4me=20Chilliet?= Date: Mon, 24 Jun 2024 16:59:23 +0200 Subject: [PATCH] fix(webhooks): Completed API documentation and updated openapi.json MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Côme Chilliet --- .../lib/Controller/WebhooksController.php | 2 ++ apps/webhook_listeners/openapi.json | 13 +++++++++++++ 2 files changed, 15 insertions(+) diff --git a/apps/webhook_listeners/lib/Controller/WebhooksController.php b/apps/webhook_listeners/lib/Controller/WebhooksController.php index a4de0c8d342..852d0db65da 100644 --- a/apps/webhook_listeners/lib/Controller/WebhooksController.php +++ b/apps/webhook_listeners/lib/Controller/WebhooksController.php @@ -107,6 +107,7 @@ class WebhooksController extends OCSController { * @param string $uri Webhook URI endpoint * @param string $event Event class name to listen to * @param ?array $eventFilter Mongo filter to apply to the serialized data to decide if firing + * @param ?string $userIdFilter User id to filter on. The webhook will only be called by requests from this user. Empty or null means no filtering. * @param ?array $headers Array of headers to send * @param "none"|"headers"|null $authMethod Authentication method to use * @param ?array $authData Array of data for authentication @@ -175,6 +176,7 @@ class WebhooksController extends OCSController { * @param string $uri Webhook URI endpoint * @param string $event Event class name to listen to * @param ?array $eventFilter Mongo filter to apply to the serialized data to decide if firing + * @param ?string $userIdFilter User id to filter on. The webhook will only be called by requests from this user. Empty or null means no filtering. * @param ?array $headers Array of headers to send * @param "none"|"headers"|null $authMethod Authentication method to use * @param ?array $authData Array of data for authentication diff --git a/apps/webhook_listeners/openapi.json b/apps/webhook_listeners/openapi.json index 01a9c59e6c2..b460fea0b02 100644 --- a/apps/webhook_listeners/openapi.json +++ b/apps/webhook_listeners/openapi.json @@ -75,6 +75,9 @@ "type": "object" } }, + "userIdFilter": { + "type": "string" + }, "headers": { "type": "object", "additionalProperties": { @@ -223,6 +226,11 @@ "type": "object" } }, + "userIdFilter": { + "type": "string", + "nullable": true, + "description": "User id to filter on. The webhook will only be called by requests from this user. Empty or null means no filtering." + }, "headers": { "type": "object", "nullable": true, @@ -501,6 +509,11 @@ "type": "object" } }, + "userIdFilter": { + "type": "string", + "nullable": true, + "description": "User id to filter on. The webhook will only be called by requests from this user. Empty or null means no filtering." + }, "headers": { "type": "object", "nullable": true,