Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,13 @@ public IEnumerable<DataTypeReferenceResponseModel> CreateDataTypeReferenceViewMo
IEnumerable<string> propertyAliases = propertyAliasesByGuid[contentType.Key];
yield return new DataTypeReferenceResponseModel
{
Id = contentType.Key,
Type = usagesByEntityType.Key,
ContentType = new DataTypeContentTypeReferenceModel
{
Id = contentType.Key,
Name = contentType.Name,
Icon = contentType.Icon,
Type = usagesByEntityType.Key,
},
Properties = contentType
.PropertyTypes
.Where(propertyType => propertyAliases.InvariantContains(propertyType.Alias))
Expand Down
45 changes: 36 additions & 9 deletions src/Umbraco.Cms.Api.Management/OpenApi.json
Original file line number Diff line number Diff line change
Expand Up @@ -35399,6 +35399,34 @@
],
"type": "string"
},
"DataTypeContentTypeReferenceModel": {
"required": [
"icon",
"id",
"name",
"type"
],
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid"
},
"type": {
"type": "string",
"nullable": true
},
"name": {
"type": "string",
"nullable": true
},
"icon": {
"type": "string",
"nullable": true
}
},
"additionalProperties": false
},
"DataTypeItemResponseModel": {
"required": [
"id",
Expand Down Expand Up @@ -35457,18 +35485,17 @@
},
"DataTypeReferenceResponseModel": {
"required": [
"id",
"properties",
"type"
"contentType",
"properties"
],
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid"
},
"type": {
"type": "string"
"contentType": {
"oneOf": [
{
"$ref": "#/components/schemas/DataTypeContentTypeReferenceModel"
}
]
},
"properties": {
"type": "array",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
namespace Umbraco.Cms.Api.Management.ViewModels.DataType;

public class DataTypeContentTypeReferenceModel
{
public required Guid Id { get; set; }

public required string? Type { get; set; }

public required string? Name { get; set; }

public required string? Icon { get; set; }
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@

public class DataTypeReferenceResponseModel
{
public required Guid Id { get; init; }

public required string Type { get; init; }
public required DataTypeContentTypeReferenceModel ContentType { get; init; }

public required IEnumerable<DataTypePropertyReferenceViewModel> Properties { get; init; }
}