diff --git a/apps/webhooks/lib/Controller/WebhooksController.php b/apps/webhooks/lib/Controller/WebhooksController.php index 040e076be65..832f2272734 100644 --- a/apps/webhooks/lib/Controller/WebhooksController.php +++ b/apps/webhooks/lib/Controller/WebhooksController.php @@ -76,9 +76,9 @@ class WebhooksController extends OCSController { * @param string $httpMethod HTTP method to use to contact the webhook * @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 ?array $eventFilter Mongo filter to apply to the serialized data to decide if firing * @param ?array $headers Array of headers to send - * @param ?string $authMethod Authentication method to use. TODO + * @param "none"|"headers"|null $authMethod Authentication method to use * @param ?array $authData Array of data for authentication * * @return DataResponse @@ -136,7 +136,7 @@ class WebhooksController extends OCSController { * @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 ?array $headers Array of headers to send - * @param ?string $authMethod Authentication method to use. TODO + * @param "none"|"headers"|null $authMethod Authentication method to use * @param ?array $authData Array of data for authentication * * @return DataResponse diff --git a/apps/webhooks/lib/Migration/Version1000Date20240527153425.php b/apps/webhooks/lib/Migration/Version1000Date20240527153425.php index 1b064143533..f2d722687de 100755 --- a/apps/webhooks/lib/Migration/Version1000Date20240527153425.php +++ b/apps/webhooks/lib/Migration/Version1000Date20240527153425.php @@ -56,7 +56,6 @@ class Version1000Date20240527153425 extends SimpleMigrationStep { $table->addColumn('headers', Types::TEXT, [ 'notnull' => false, ]); - // TODO decide if string or int with an Enum $table->addColumn('auth_method', Types::STRING, [ 'notnull' => true, 'length' => 16, diff --git a/apps/webhooks/openapi.json b/apps/webhooks/openapi.json index 3a2c641b0a6..13bc1a7fb5f 100644 --- a/apps/webhooks/openapi.json +++ b/apps/webhooks/openapi.json @@ -203,15 +203,12 @@ } }, { - "name": "eventFilter[]", + "name": "eventFilter", "in": "query", "description": "Mongo filter to apply to the serialized data to decide if firing", "schema": { - "type": "array", - "nullable": true, - "items": { - "type": "object" - } + "type": "string", + "nullable": true } }, { @@ -226,10 +223,14 @@ { "name": "authMethod", "in": "query", - "description": "Authentication method to use. TODO", + "description": "Authentication method to use", "schema": { "type": "string", - "nullable": true + "nullable": true, + "enum": [ + "none", + "headers" + ] } }, { @@ -477,10 +478,14 @@ { "name": "authMethod", "in": "query", - "description": "Authentication method to use. TODO", + "description": "Authentication method to use", "schema": { "type": "string", - "nullable": true + "nullable": true, + "enum": [ + "none", + "headers" + ] } }, {