Added $type to ReferenceResponseModels (#18293)

* Added $type to ReferenceResponseModels

* Updated OpenApi.json and client-side types.

---------

Co-authored-by: Andy Butland <abutland73@gmail.com>
This commit is contained in:
Sven Geusens
2025-02-11 15:00:07 +01:00
committed by GitHub
parent 6e20e14542
commit 5ee351a6bc
2 changed files with 37 additions and 5 deletions

View File

@@ -36517,10 +36517,14 @@
},
"DefaultReferenceResponseModel": {
"required": [
"$type",
"id"
],
"type": "object",
"properties": {
"$type": {
"type": "string"
},
"id": {
"type": "string",
"format": "uuid"
@@ -36538,7 +36542,13 @@
"nullable": true
}
},
"additionalProperties": false
"additionalProperties": false,
"discriminator": {
"propertyName": "$type",
"mapping": {
"DefaultReferenceResponseModel": "#/components/schemas/DefaultReferenceResponseModel"
}
}
},
"DeleteUserGroupsRequestModel": {
"required": [
@@ -37058,11 +37068,15 @@
},
"DocumentReferenceResponseModel": {
"required": [
"$type",
"documentType",
"id"
],
"type": "object",
"properties": {
"$type": {
"type": "string"
},
"id": {
"type": "string",
"format": "uuid"
@@ -37083,7 +37097,13 @@
]
}
},
"additionalProperties": false
"additionalProperties": false,
"discriminator": {
"propertyName": "$type",
"mapping": {
"DocumentReferenceResponseModel": "#/components/schemas/DocumentReferenceResponseModel"
}
}
},
"DocumentResponseModel": {
"required": [
@@ -39191,11 +39211,15 @@
},
"MediaReferenceResponseModel": {
"required": [
"$type",
"id",
"mediaType"
],
"type": "object",
"properties": {
"$type": {
"type": "string"
},
"id": {
"type": "string",
"format": "uuid"
@@ -39212,7 +39236,13 @@
]
}
},
"additionalProperties": false
"additionalProperties": false,
"discriminator": {
"propertyName": "$type",
"mapping": {
"MediaReferenceResponseModel": "#/components/schemas/MediaReferenceResponseModel"
}
}
},
"MediaResponseModel": {
"required": [

View File

@@ -1,6 +1,8 @@
namespace Umbraco.Cms.Api.Management.ViewModels.TrackedReferences;
using Umbraco.Cms.Api.Common.OpenApi;
public interface IReferenceResponseModel
namespace Umbraco.Cms.Api.Management.ViewModels.TrackedReferences;
public interface IReferenceResponseModel : IOpenApiDiscriminator
{
public Guid Id { get; }