ValidationStrategy

public enum ValidationStrategy

Defines a strategy to validate results upfront

  • all

    Validates all items in a backend response. Validating all entities upfront results in a performance penalty.

    Declaration

    Swift

    case all
  • Percentage between 0.0 and 1.0. This number specifies the fraction of entities in a backend response that are validated. Validating a higher percentage of entities upfront results in a performance penalty.

    Declaration

    Swift

    case randomSample(percentage: Double)
  • Allow a custom validation strategy. It must return a Swift.Error if the validation fails or nil if the validation succeed.

    Declaration

    Swift

    case custom(validationBlock: (Array<Dictionary<String, Any>>) throws -> Void)