Adds id to the webhook item response model (#19947)

Adds id to the webhook item response model.
This commit is contained in:
Andy Butland
2025-08-20 14:15:40 +01:00
committed by GitHub
parent cebfb21eec
commit 43f0ff0957
3 changed files with 21 additions and 1 deletions

View File

@@ -120,6 +120,7 @@ public class ItemTypeMapDefinition : IMapDefinition
// Umbraco.Code.MapAll
private static void Map(IWebhook source, WebhookItemResponseModel target, MapperContext context)
{
target.Id = source.Key;
target.Name = source.Name ?? source.Url;
target.Url = source.Url;
target.Enabled = source.Enabled;

View File

@@ -48124,12 +48124,29 @@
"required": [
"enabled",
"events",
"id",
"name",
"signs",
"types",
"url"
],
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid"
},
"signs": {
"type": "array",
"items": {
"oneOf": [
{
"$ref": "#/components/schemas/SignModel"
}
]
},
"readOnly": true
},
"enabled": {
"type": "boolean"
},

View File

@@ -1,6 +1,8 @@
using Umbraco.Cms.Api.Management.ViewModels.Item;
namespace Umbraco.Cms.Api.Management.ViewModels.Webhook.Item;
public class WebhookItemResponseModel
public class WebhookItemResponseModel : ItemResponseModelBase
{
public bool Enabled { get; set; } = true;