Interface ConstraintValidator<T>

    • Method Detail

      • validate

        void validate​(T actual,
                      io.rxmicro.rest.model.HttpModelType httpModelType,
                      String modelName)
               throws io.rxmicro.http.error.ValidationException
        Validates a single actual. The state of actual must not be altered.
        Parameters:
        actual - actual value to validate
        httpModelType - http model type
        modelName - parameter or header name
        Throws:
        io.rxmicro.http.error.ValidationException - if actual does not pass the constraint
      • validate

        default void validate​(T model)
                       throws io.rxmicro.http.error.ValidationException
        Validates a root model. The state of value must not be altered.
        Parameters:
        model - object to validate
        Throws:
        io.rxmicro.http.error.ValidationException - if value does not pass the constraint
      • validateList

        default void validateList​(List<T> list,
                                  io.rxmicro.rest.model.HttpModelType httpModelType,
                                  String modelName)
                           throws io.rxmicro.http.error.ValidationException
        Validates a value list. The state of list must not be altered.
        Parameters:
        list - list to validate
        httpModelType - http model type
        modelName - parameter or header name
        Throws:
        io.rxmicro.http.error.ValidationException - if value does not pass the constraint
      • validateList

        default void validateList​(List<T> models)
                           throws io.rxmicro.http.error.ValidationException
        Validates a root model list. The state of value must not be altered.
        Parameters:
        models - object list to validate
        Throws:
        io.rxmicro.http.error.ValidationException - if value does not pass the constraint