File tree Expand file tree Collapse file tree 4 files changed +56
-14
lines changed
src/Umbraco.Cms.Api.Management Expand file tree Collapse file tree 4 files changed +56
-14
lines changed Original file line number Diff line number Diff line change @@ -47,8 +47,13 @@ public IEnumerable<DataTypeReferenceResponseModel> CreateDataTypeReferenceViewMo
4747 IEnumerable < string > propertyAliases = propertyAliasesByGuid [ contentType . Key ] ;
4848 yield return new DataTypeReferenceResponseModel
4949 {
50- Id = contentType . Key ,
51- Type = usagesByEntityType . Key ,
50+ ContentType = new DataTypeContentTypeReferenceModel
51+ {
52+ Id = contentType . Key ,
53+ Name = contentType . Name ,
54+ Icon = contentType . Icon ,
55+ Type = usagesByEntityType . Key ,
56+ } ,
5257 Properties = contentType
5358 . PropertyTypes
5459 . Where ( propertyType => propertyAliases . InvariantContains ( propertyType . Alias ) )
Original file line number Diff line number Diff line change 3539935399 ],
3540035400 "type": "string"
3540135401 },
35402+ "DataTypeContentTypeReferenceModel": {
35403+ "required": [
35404+ "icon",
35405+ "id",
35406+ "name",
35407+ "type"
35408+ ],
35409+ "type": "object",
35410+ "properties": {
35411+ "id": {
35412+ "type": "string",
35413+ "format": "uuid"
35414+ },
35415+ "type": {
35416+ "type": "string",
35417+ "nullable": true
35418+ },
35419+ "name": {
35420+ "type": "string",
35421+ "nullable": true
35422+ },
35423+ "icon": {
35424+ "type": "string",
35425+ "nullable": true
35426+ }
35427+ },
35428+ "additionalProperties": false
35429+ },
3540235430 "DataTypeItemResponseModel": {
3540335431 "required": [
3540435432 "id",
@@ -35457,18 +35485,17 @@
3545735485 },
3545835486 "DataTypeReferenceResponseModel": {
3545935487 "required": [
35460- "id",
35461- "properties",
35462- "type"
35488+ "contentType",
35489+ "properties"
3546335490 ],
3546435491 "type": "object",
3546535492 "properties": {
35466- "id ": {
35467- "type ": "string",
35468- "format": "uuid"
35469- },
35470- "type": {
35471- "type": "string"
35493+ "contentType ": {
35494+ "oneOf ": [
35495+ {
35496+ "$ref": "#/components/schemas/DataTypeContentTypeReferenceModel"
35497+ }
35498+ ]
3547235499 },
3547335500 "properties": {
3547435501 "type": "array",
Original file line number Diff line number Diff line change 1+ namespace Umbraco . Cms . Api . Management . ViewModels . DataType ;
2+
3+ public class DataTypeContentTypeReferenceModel
4+ {
5+ public required Guid Id { get ; set ; }
6+
7+ public required string ? Type { get ; set ; }
8+
9+ public required string ? Name { get ; set ; }
10+
11+ public required string ? Icon { get ; set ; }
12+ }
Original file line number Diff line number Diff line change 22
33public class DataTypeReferenceResponseModel
44{
5- public required Guid Id { get ; init ; }
6-
7- public required string Type { get ; init ; }
5+ public required DataTypeContentTypeReferenceModel ContentType { get ; init ; }
86
97 public required IEnumerable < DataTypePropertyReferenceViewModel > Properties { get ; init ; }
108}
You can’t perform that action at this time.
0 commit comments