public IEnumerable <IValidator> Visit(JsonFieldProperties properties) { if (properties.IsRequired) { yield return(new RequiredValidator()); } }
public void Should_add_error_if_editor_is_not_valid() { var sut = new JsonFieldProperties(); var errors = FieldPropertiesValidator.Validate(sut).ToList(); Assert.Empty(errors); }
public IEnumerable <ValidationError> Visit(JsonFieldProperties properties) { yield break; }
public FieldPropertiesDto Visit(JsonFieldProperties properties) { return(SimpleMapper.Map(properties, new JsonFieldPropertiesDto())); }
private static FieldPropertiesDto Convert(JsonFieldProperties source) { var result = SimpleMapper.Map(source, new JsonFieldPropertiesDto()); return(result); }
private static RootField <JsonFieldProperties> Field(JsonFieldProperties properties) { return(Fields.Json(1, "my-json", Partitioning.Invariant, properties)); }
private static JsonField Field(JsonFieldProperties properties) { return(new JsonField(1, "my-json", Partitioning.Invariant, properties)); }
public IJsonValue Visit(JsonFieldProperties properties, Args args) { return(JsonValue.Null); }
public JToken Visit(JsonFieldProperties properties) { return(JValue.CreateNull()); }
public static Schema AddJson(this Schema schema, long id, string name, Partitioning partitioning, JsonFieldProperties properties = null) { return(schema.AddField(Json(id, name, partitioning, properties))); }
public static Field <JsonFieldProperties> Json(long id, string name, Partitioning partitioning, JsonFieldProperties properties = null) { return(new Field <JsonFieldProperties>(id, name, partitioning, properties ?? new JsonFieldProperties())); }