Files
Umbraco-CMS/src/Umbraco.Core/PropertyEditors/MultiNodePickerConfigurationTreeSource.cs
Sven Geusens ffcc4ac170 fix udi leaking in the management api (#15684)
* [WIP] Stop Udi leaking on ConterPicker

* Refined Udi conversion for contentPicker

Cleaned up base construcor usage to move away from the obsoleted one.

* Fixed Udi lieaking in MNTP

* Stopped Udi bleeding for MultiUrlPicker

* Remove unused assignment

* Resolved namespace issue

* Use correct configuration value for MNTP udi parsing

* Turn helper auto props into local helper function to avoid unnecesary serialization

* Remove Newtonsoft.Json from Multi URL picker

* Fixed MNTP configuration serialization

* Changed MNTP editor data from csv guid to EditorEntityReference[]

* Added remarks for the MNTP editor conversion logic

* Reworked MNTPPropertyEditor Unittests

changed intent of one
fixed bug because of 1 rework

* Update OpenApi.json

---------

Co-authored-by: Sven Geusens <sge@umbraco.dk>
Co-authored-by: Elitsa <elm@umbraco.dk>
Co-authored-by: kjac <kja@umbraco.dk>
2024-03-14 11:06:46 +01:00

51 lines
1.3 KiB
C#

using System.Runtime.Serialization;
using System.Text.Json.Serialization;
namespace Umbraco.Cms.Core.PropertyEditors;
/// <summary>
/// Represents the 'startNode' value for the <see cref="MultiNodePickerConfiguration" />
/// </summary>
[DataContract]
public class MultiNodePickerConfigurationTreeSource
{
[JsonPropertyName("type")]
[DataMember(Name = "type")]
public string? ObjectType { get; set; }
[JsonPropertyName("query")]
[DataMember(Name = "query")]
public string? StartNodeQuery { get; set; }
[DataMember(Name = "dynamicRoot")]
public DynamicRoot? DynamicRoot { get; set; }
[JsonPropertyName("id")]
[DataMember(Name = "id")]
public Udi? StartNodeId { get; set; }
}
[DataContract]
public class DynamicRoot
{
[DataMember(Name = "originAlias")]
public string OriginAlias { get; set; } = string.Empty;
[DataMember(Name = "originKey")]
public Guid? OriginKey { get; set; }
[DataMember(Name = "querySteps")]
public QueryStep[] QuerySteps { get; set; } = Array.Empty<QueryStep>();
}
[DataContract]
public class QueryStep
{
[DataMember(Name = "alias")]
public string Alias { get; set; } = string.Empty;
[DataMember(Name = "anyOfDocTypeKeys")]
public IEnumerable<Guid> AnyOfDocTypeKeys { get; set; } = Array.Empty<Guid>();
}