Document and document type read API (#13853)
* Basic structure for document and document type read API * Handle unpublished, non-variant content * Expose content type key on ContentTypeSort * Add the remaining properties to document type (minus list view info, still pending) * Obsolete more ILocalizationService usage * Add URLs and template data to document view model * Clean up + add proprety type appearance * update submodule commit * front-end commit * latest front-end commit * latest commit * latest front-end commit * Rename content property to content value in view model layer * Add contextual JSON serialization as default JSON serializer * Add FIXME to content type sort + rearrange constructor parameters * Fix broken remark tag * Whitelist breakage for ContentTypeSort * Add variance info to property type output * Update src/Umbraco.Cms.Api.Management/Controllers/Document/ByKeyDocumentController.cs Co-authored-by: Bjarke Berg <mail@bergmania.dk> * Update src/Umbraco.Cms.Api.Management/Controllers/DocumentType/ByKeyDocumentTypeController.cs Co-authored-by: Bjarke Berg <mail@bergmania.dk> * Update src/Umbraco.Cms.Api.Management/Factories/ContentUrlFactory.cs Co-authored-by: Bjarke Berg <mail@bergmania.dk> * Add a few FIXME comments about async entity retrieval --------- Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com> Co-authored-by: Bjarke Berg <mail@bergmania.dk>
This commit is contained in:
@@ -21,16 +21,19 @@ public class ContentTypeSort : IValueObject, IDeepCloneable
|
||||
SortOrder = sortOrder;
|
||||
}
|
||||
|
||||
public ContentTypeSort(Lazy<int> id, int sortOrder, string alias)
|
||||
// FIXME: remove integer ID in constructor
|
||||
public ContentTypeSort(Lazy<int> id, Guid key, int sortOrder, string alias)
|
||||
{
|
||||
Id = id;
|
||||
SortOrder = sortOrder;
|
||||
Alias = alias;
|
||||
Key = key;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the Id of the ContentType
|
||||
/// </summary>
|
||||
// FIXME: remove this in favor of Key (Id should only be used at repository level)
|
||||
public Lazy<int> Id { get; set; } = new(() => 0);
|
||||
|
||||
/// <summary>
|
||||
@@ -43,6 +46,11 @@ public class ContentTypeSort : IValueObject, IDeepCloneable
|
||||
/// </summary>
|
||||
public string Alias { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the unique Key of the ContentType
|
||||
/// </summary>
|
||||
public Guid Key { get; set; }
|
||||
|
||||
public object DeepClone()
|
||||
{
|
||||
var clone = (ContentTypeSort)MemberwiseClone();
|
||||
|
||||
Reference in New Issue
Block a user