|
|
@ -7,7 +7,7 @@ |
|
|
|
|
|
|
|
|
using System.Collections.Generic; |
|
|
using System.Collections.Generic; |
|
|
using System.ComponentModel.DataAnnotations; |
|
|
using System.ComponentModel.DataAnnotations; |
|
|
using Squidex.Domain.Apps.Core.Schemas; |
|
|
using System.Linq; |
|
|
using Squidex.Domain.Apps.Entities.Schemas; |
|
|
using Squidex.Domain.Apps.Entities.Schemas; |
|
|
using Squidex.Infrastructure.Reflection; |
|
|
using Squidex.Infrastructure.Reflection; |
|
|
using Squidex.Shared; |
|
|
using Squidex.Shared; |
|
|
@ -35,13 +35,13 @@ namespace Squidex.Areas.Api.Controllers.Schemas.Models |
|
|
/// The name of fields that are used in content lists.
|
|
|
/// The name of fields that are used in content lists.
|
|
|
/// </summary>
|
|
|
/// </summary>
|
|
|
[Required] |
|
|
[Required] |
|
|
public FieldNames FieldsInLists { get; set; } |
|
|
public List<string> FieldsInLists { get; set; } |
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
/// <summary>
|
|
|
/// The name of fields that are used in content references.
|
|
|
/// The name of fields that are used in content references.
|
|
|
/// </summary>
|
|
|
/// </summary>
|
|
|
[Required] |
|
|
[Required] |
|
|
public FieldNames FieldsInReferences { get; set; } |
|
|
public List<string> FieldsInReferences { get; set; } |
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
/// <summary>
|
|
|
/// The list of fields.
|
|
|
/// The list of fields.
|
|
|
@ -58,6 +58,9 @@ namespace Squidex.Areas.Api.Controllers.Schemas.Models |
|
|
SimpleMapper.Map(schema.SchemaDef.Scripts, result.Scripts); |
|
|
SimpleMapper.Map(schema.SchemaDef.Scripts, result.Scripts); |
|
|
SimpleMapper.Map(schema.SchemaDef.Properties, result.Properties); |
|
|
SimpleMapper.Map(schema.SchemaDef.Properties, result.Properties); |
|
|
|
|
|
|
|
|
|
|
|
result.FieldsInLists = schema.SchemaDef.FieldsInLists.ToList(); |
|
|
|
|
|
result.FieldsInReferences = schema.SchemaDef.FieldsInReferences.ToList(); |
|
|
|
|
|
|
|
|
if (schema.SchemaDef.PreviewUrls.Count > 0) |
|
|
if (schema.SchemaDef.PreviewUrls.Count > 0) |
|
|
{ |
|
|
{ |
|
|
result.PreviewUrls = new Dictionary<string, string>(schema.SchemaDef.PreviewUrls); |
|
|
result.PreviewUrls = new Dictionary<string, string>(schema.SchemaDef.PreviewUrls); |
|
|
|