|
|
@ -36,6 +36,8 @@ namespace Squidex.Domain.Apps.Core.GenerateJsonSchema |
|
|
var partitionItemProperty = field.Accept(jsonTypeVisitor); |
|
|
var partitionItemProperty = field.Accept(jsonTypeVisitor); |
|
|
|
|
|
|
|
|
partitionItemProperty.Description = partitionItem.Name; |
|
|
partitionItemProperty.Description = partitionItem.Name; |
|
|
|
|
|
partitionItemProperty.IsRequired = field.RawProperties.IsRequired && !partitionItem.IsOptional; |
|
|
|
|
|
|
|
|
partitionObject.Properties.Add(partitionItem.Key, partitionItemProperty); |
|
|
partitionObject.Properties.Add(partitionItem.Key, partitionItemProperty); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@ -53,18 +55,13 @@ namespace Squidex.Domain.Apps.Core.GenerateJsonSchema |
|
|
|
|
|
|
|
|
if (!string.IsNullOrWhiteSpace(field.RawProperties.Hints)) |
|
|
if (!string.IsNullOrWhiteSpace(field.RawProperties.Hints)) |
|
|
{ |
|
|
{ |
|
|
jsonProperty.Description = field.RawProperties.Hints; |
|
|
jsonProperty.Description = $"{field.Name} ({field.RawProperties.Hints})"; |
|
|
} |
|
|
} |
|
|
else |
|
|
else |
|
|
{ |
|
|
{ |
|
|
jsonProperty.Description = field.Name; |
|
|
jsonProperty.Description = field.Name; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if (!string.IsNullOrWhiteSpace(field.RawProperties.Hints)) |
|
|
|
|
|
{ |
|
|
|
|
|
jsonProperty.Description += $" ({field.RawProperties.Hints})."; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
return jsonProperty; |
|
|
return jsonProperty; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|