xyz.stratalab.indexer.services.IndexFieldSpecValidator.scala Maven / Gradle / Ivy
The newest version!
package xyz.stratalab.indexer.services
object IndexFieldSpecValidator extends scalapb.validate.Validator[xyz.stratalab.indexer.services.IndexFieldSpec] {
def validate(input: xyz.stratalab.indexer.services.IndexFieldSpec): scalapb.validate.Result =
scalapb.validate.Result.optional(input.spec.jsonSpecs) { _value =>
xyz.stratalab.indexer.services.JsonIndexSpecsValidator.validate(_value)
} &&
scalapb.validate.Result.optional(input.spec.csvSpecs) { _value =>
xyz.stratalab.indexer.services.CsvIndexSpecsValidator.validate(_value)
}
}