From 475010148b865f43ef988fa373a163c4fa2778ed Mon Sep 17 00:00:00 2001 From: Eric <32164310+Frost117@users.noreply.github.com> Date: Fri, 5 Dec 2025 16:44:33 +0100 Subject: [PATCH] =?UTF-8?q?Added=20'mandatory'=20tag=20as=20a=20visual=20i?= =?UTF-8?q?ndicator=20for=20webhook=20events=20being=20=E2=80=A6=20(#21075?= =?UTF-8?q?)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Added 'mandatory' tag as a visual indicator for webhook events being mandatory. * Map the webhook validation for no events specified to a specific API response problem details message. --------- Co-authored-by: Andy Butland --- .../Controllers/Webhook/WebhookControllerBase.cs | 4 ++++ .../views/webhook-details-workspace-view.element.ts | 6 +++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/Umbraco.Cms.Api.Management/Controllers/Webhook/WebhookControllerBase.cs b/src/Umbraco.Cms.Api.Management/Controllers/Webhook/WebhookControllerBase.cs index d32de4bf7a..36a2dba62a 100644 --- a/src/Umbraco.Cms.Api.Management/Controllers/Webhook/WebhookControllerBase.cs +++ b/src/Umbraco.Cms.Api.Management/Controllers/Webhook/WebhookControllerBase.cs @@ -21,6 +21,10 @@ public abstract class WebhookControllerBase : ManagementApiControllerBase .WithTitle("Cancelled by notification") .WithDetail("A notification handler prevented the webhook operation.") .Build()), + WebhookOperationStatus.NoEvents => BadRequest(new ProblemDetailsBuilder() + .WithTitle("No events specified") + .WithDetail("The webhook must be configured to listen to at least one event.") + .Build()), _ => StatusCode(StatusCodes.Status500InternalServerError, new ProblemDetailsBuilder() .WithTitle("Unknown webhook operation status.") .Build()), diff --git a/src/Umbraco.Web.UI.Client/src/packages/webhook/webhook/workspace/views/webhook-details-workspace-view.element.ts b/src/Umbraco.Web.UI.Client/src/packages/webhook/webhook/workspace/views/webhook-details-workspace-view.element.ts index ea274a0f97..4d162c0a80 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/webhook/webhook/workspace/views/webhook-details-workspace-view.element.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/webhook/webhook/workspace/views/webhook-details-workspace-view.element.ts @@ -107,9 +107,13 @@ export class UmbWebhookDetailsWorkspaceViewElement extends UmbLitElement impleme mandatory label=${this.localize.term('webhooks_url')} description=${this.localize.term('webhooks_urlDescription')}> - +