|
|
@ -12,6 +12,8 @@ using Newtonsoft.Json; |
|
|
using Squidex.Infrastructure; |
|
|
using Squidex.Infrastructure; |
|
|
using Squidex.Infrastructure.Reflection; |
|
|
using Squidex.Infrastructure.Reflection; |
|
|
|
|
|
|
|
|
|
|
|
#pragma warning disable CS0612 // Type or member is obsolete
|
|
|
|
|
|
|
|
|
namespace Squidex.Domain.Apps.Core.Schemas.Json |
|
|
namespace Squidex.Domain.Apps.Core.Schemas.Json |
|
|
{ |
|
|
{ |
|
|
public sealed class JsonSchemaModel |
|
|
public sealed class JsonSchemaModel |
|
|
@ -106,11 +108,21 @@ namespace Squidex.Domain.Apps.Core.Schemas.Json |
|
|
schema = schema.ConfigureScripts(Scripts); |
|
|
schema = schema.ConfigureScripts(Scripts); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (FieldsInLists == null) |
|
|
|
|
|
{ |
|
|
|
|
|
FieldsInLists = new FieldNames(Fields.Where(x => x.Properties.IsListField).Select(x => x.Name).ToArray()); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
if (FieldsInLists?.Count > 0) |
|
|
if (FieldsInLists?.Count > 0) |
|
|
{ |
|
|
{ |
|
|
schema = schema.ConfigureFieldsInLists(FieldsInLists); |
|
|
schema = schema.ConfigureFieldsInLists(FieldsInLists); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (FieldsInReferences == null) |
|
|
|
|
|
{ |
|
|
|
|
|
FieldsInLists = new FieldNames(Fields.Where(x => x.Properties.IsReferenceField).Select(x => x.Name).ToArray()); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
if (FieldsInReferences?.Count > 0) |
|
|
if (FieldsInReferences?.Count > 0) |
|
|
{ |
|
|
{ |
|
|
schema = schema.ConfigureFieldsInReferences(FieldsInReferences); |
|
|
schema = schema.ConfigureFieldsInReferences(FieldsInReferences); |
|
|
|