Add variance info to property type output
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
using Umbraco.Cms.Api.Management.ViewModels.ContentType;
|
||||
using Umbraco.Cms.Core;
|
||||
using Umbraco.Cms.Core.Models;
|
||||
using Umbraco.Extensions;
|
||||
|
||||
namespace Umbraco.Cms.Api.Management.Mapping.ContentType;
|
||||
|
||||
@@ -29,6 +30,8 @@ public abstract class ContentTypeMapDefinition<TContentType, TPropertyTypeViewMo
|
||||
Alias = propertyType.Alias,
|
||||
Description = propertyType.Description,
|
||||
DataTypeKey = propertyType.DataTypeKey,
|
||||
VariesByCulture = propertyType.VariesByCulture(),
|
||||
VariesBySegment = propertyType.VariesBySegment(),
|
||||
Validation = new PropertyTypeValidation
|
||||
{
|
||||
Mandatory = propertyType.Mandatory,
|
||||
|
||||
@@ -7461,6 +7461,12 @@
|
||||
"type": "string",
|
||||
"format": "uuid"
|
||||
},
|
||||
"variesByCulture": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"variesBySegment": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"validation": {
|
||||
"oneOf": [
|
||||
{
|
||||
|
||||
@@ -14,6 +14,10 @@ public abstract class PropertyTypeViewModelBase
|
||||
|
||||
public Guid DataTypeKey { get; set; }
|
||||
|
||||
public bool VariesByCulture { get; set; }
|
||||
|
||||
public bool VariesBySegment { get; set; }
|
||||
|
||||
public PropertyTypeValidation Validation { get; set; } = new();
|
||||
|
||||
public PropertyTypeAppearance Appearance { get; set; } = new();
|
||||
|
||||
Reference in New Issue
Block a user