diff --git a/backend/src/Squidex.Domain.Apps.Core.Model/Contents/ContentData.cs b/backend/src/Squidex.Domain.Apps.Core.Model/Contents/ContentData.cs index b2f47c3d9..6a68882af 100644 --- a/backend/src/Squidex.Domain.Apps.Core.Model/Contents/ContentData.cs +++ b/backend/src/Squidex.Domain.Apps.Core.Model/Contents/ContentData.cs @@ -14,11 +14,6 @@ namespace Squidex.Domain.Apps.Core.Contents { public sealed class ContentData : Dictionary, IEquatable { - public IEnumerable> ValidValues - { - get => this.Where(x => x.Value != null); - } - public ContentData() : base(StringComparer.Ordinal) { diff --git a/backend/src/Squidex/Areas/Api/Config/OpenApi/OpenApiServices.cs b/backend/src/Squidex/Areas/Api/Config/OpenApi/OpenApiServices.cs index 548513d56..848df7ed9 100644 --- a/backend/src/Squidex/Areas/Api/Config/OpenApi/OpenApiServices.cs +++ b/backend/src/Squidex/Areas/Api/Config/OpenApi/OpenApiServices.cs @@ -20,6 +20,7 @@ using Squidex.Domain.Apps.Core.Assets; using Squidex.Domain.Apps.Core.Contents; using Squidex.Infrastructure; using Squidex.Infrastructure.Json.Objects; +using Squidex.Infrastructure.Queries; namespace Squidex.Areas.Api.Config.OpenApi { @@ -119,7 +120,10 @@ namespace Squidex.Areas.Api.Config.OpenApi CreateStringMap(), CreateObjectMap(), - CreateObjectMap() + CreateObjectMap(), + + CreateAnyMap(), + CreateAnyMap>() }; settings.SchemaType = SchemaType.OpenApi3; @@ -149,5 +153,13 @@ namespace Squidex.Areas.Api.Config.OpenApi schema.Format = format; }); } + + private static ITypeMapper CreateAnyMap() + { + return new PrimitiveTypeMapper(typeof(T), schema => + { + schema.Type = JsonObjectType.None; + }); + } } } diff --git a/backend/src/Squidex/Areas/Api/Controllers/Contents/Models/BulkUpdateContentsJobDto.cs b/backend/src/Squidex/Areas/Api/Controllers/Contents/Models/BulkUpdateContentsJobDto.cs index 903552489..cad4c462b 100644 --- a/backend/src/Squidex/Areas/Api/Controllers/Contents/Models/BulkUpdateContentsJobDto.cs +++ b/backend/src/Squidex/Areas/Api/Controllers/Contents/Models/BulkUpdateContentsJobDto.cs @@ -9,8 +9,6 @@ using NodaTime; using Squidex.Domain.Apps.Core.Contents; using Squidex.Domain.Apps.Entities.Contents.Commands; using Squidex.Infrastructure; -using Squidex.Infrastructure.Json.Objects; -using Squidex.Infrastructure.Queries; using Squidex.Infrastructure.Reflection; namespace Squidex.Areas.Api.Controllers.Contents.Models @@ -20,7 +18,7 @@ namespace Squidex.Areas.Api.Controllers.Contents.Models /// /// An optional query to identify the content to update. /// - public Query? Query { get; set; } + public JsonQueryDto? Query { get; set; } /// /// An optional id of the content to update. diff --git a/backend/src/Squidex/Areas/Api/Controllers/JsonQueryDto.cs b/backend/src/Squidex/Areas/Api/Controllers/JsonQueryDto.cs new file mode 100644 index 000000000..fff98883e --- /dev/null +++ b/backend/src/Squidex/Areas/Api/Controllers/JsonQueryDto.cs @@ -0,0 +1,18 @@ +// ========================================================================== +// Squidex Headless CMS +// ========================================================================== +// Copyright (c) Squidex UG (haftungsbeschraenkt) +// All rights reserved. Licensed under the MIT license. +// ========================================================================== + +using NJsonSchema.Annotations; +using Squidex.Infrastructure.Json.Objects; +using Squidex.Infrastructure.Queries; + +namespace Squidex.Areas.Api.Controllers +{ + [JsonSchemaFlatten] + public sealed class JsonQueryDto : Query + { + } +} diff --git a/frontend/app/features/assets/pages/assets-page.component.html b/frontend/app/features/assets/pages/assets-page.component.html index c3d4f461d..513fa2660 100644 --- a/frontend/app/features/assets/pages/assets-page.component.html +++ b/frontend/app/features/assets/pages/assets-page.component.html @@ -2,7 +2,7 @@ -
+