public JsonSchemaProperty?Visit(IField <ReferencesFieldProperties> field, Args args) { var property = JsonTypeBuilder.ArrayProperty(JsonTypeBuilder.String()); property.Default = field.Properties.DefaultValue; if (field.Properties.MinItems != null) { property.MinItems = field.Properties.MinItems.Value; } if (field.Properties.MaxItems != null) { property.MaxItems = field.Properties.MaxItems.Value; } property.ExtensionData = new Dictionary <string, object> { ["schemaIds"] = field.Properties.SchemaIds ?? ReadonlyList.Empty <DomainId>() }; property.UniqueItems = !field.Properties.AllowDuplicates; return(property); }
private Task <IReadOnlyList <IAssetFolderEntity> > GetAssetPathAsync(DomainId parentId, AssetFolderScope scope) { if (scope == AssetFolderScope.Items) { return(Task.FromResult <IReadOnlyList <IAssetFolderEntity> >(ReadonlyList.Empty <IAssetFolderEntity>())); } return(assetQuery.FindAssetFolderAsync(Context.App.Id, parentId, HttpContext.RequestAborted)); }
public async Task Should_not_add_error_if_schemas_is_empty() { var trigger = new ContentChangedTriggerV2 { Schemas = ReadonlyList.Empty <ContentChangedTriggerSchemaV2>() }; var errors = await RuleTriggerValidator.ValidateAsync(appId.Id, trigger, appProvider); Assert.Empty(errors); }
public JsonSchemaProperty?Visit(IField <ReferencesFieldProperties> field, Args args) { var property = JsonTypeBuilder.ArrayProperty(JsonTypeBuilder.String()); property.Format = GeoJson.Format; property.ExtensionData = new Dictionary <string, object> { ["schemaIds"] = field.Properties.SchemaIds ?? ReadonlyList.Empty <DomainId>() }; return(property); }