Model mapping PoC (#15546)

* First take at new models for improved mapping between client and server

* Add variants to Media

* Re-introduced lost names

* Start breaking apart "Id" reference properties in request models as well

* Refactor to fix OpenAPI spec

* Discard TODO (not relevant)

* Split recycle bin response models

* Delete unused marker interface

* Use reference properties for content and media type handling

* Rework document and media types to be explicit in relations (do not expose "content type", it is an implementation detail)

* Mapping for document and media type copy + move

* Ensure correct response model for Media

* Regenerate OpenAPI JSON after forward merge

* Fix forward merge issues

* Fix forward merge + regenerate OpenApi.json

* Added unit tests for content state helper

* Move "allowed document types" endpoint to document type silo, refactored services and added "allowed media types"

* Regenerate OpenApi.json after forward merge

* Do not include content state for media items

* Review fix
This commit is contained in:
Kenn Jacobsen
2024-01-30 12:19:05 +01:00
committed by GitHub
parent bb46d23730
commit 9b454bec6b
158 changed files with 2788 additions and 1533 deletions

View File

@@ -1,6 +1,6 @@
namespace Umbraco.Cms.Api.Management.ViewModels.User.Current;
public class CurrentUserResponseModel : INamedEntityPresentationModel
public class CurrentUserResponseModel
{
public required Guid Id { get; init; }

View File

@@ -2,6 +2,6 @@
namespace Umbraco.Cms.Api.Management.ViewModels.User.Item;
public class UserItemResponseModel : ItemResponseModelBase
public class UserItemResponseModel : NamedItemResponseModelBase
{
}

View File

@@ -2,7 +2,7 @@
namespace Umbraco.Cms.Api.Management.ViewModels.User;
public class UserResponseModel : UserPresentationBase, INamedEntityPresentationModel
public class UserResponseModel : UserPresentationBase
{
public Guid Id { get; set; }