vertx/src/main/java/eu/internetofus/common/vertx/OpenAPIValidator.java
/**
   * Check that a value follows an specification.
   *
   * @param codePrefix    the prefix of the code to use for the error message.
   * @param vertx         the event bus infrastructure to use.
   * @param specification that the value has to follow.
   * @param value         to validate. This value can be modified on the
   *                      validation process, for this reason the future return a
   *                      new value.
   *
   * @param <T>           type of environment.
   *
   * @return the future with the validated value or an error if it is not valid.
   */
Check that a value follows an specification.
@param codePrefix    the prefix of the code to use for the error message.
@param vertx         the event bus infrastructure to use.
@param specification that the value has to follow.
@param value         to validate. This value can be modified on the
validation process, for this reason the future return a
new value.

@param            type of environment.

@return the future with the validated value or an error if it is not valid.
Check that a value follows an specification . @param codePrefix the prefix of the code to use for the error message . @param vertx the event bus infrastructure to use . @param specification that the value has to follow . @param value to validate . This value can be modified on the validation process for this reason the future return a new value . @param type of environment . @return the future with the validated value or an error if it is not valid .
@SuppressWarnings("unchecked")
  public static final <T> Future<T> validateValue(final String codePrefix, final Vertx vertx,
      final JsonObject specification, final T value) {
    return composeValidation(Future.succeededFuture(new ValueEnvironment(codePrefix, vertx, specification, value)),
        OpenAPIValidator::validateValue).map(env -> (T) env.value);
  }
@ SuppressWarnings ( "unchecked" ) public static final < T > Future < T > validateValue ( final String codePrefix , final Vertx vertx , final JsonObject specification , final T value ) { return composeValidation ( Future . succeededFuture ( new ValueEnvironment ( codePrefix , vertx , specification , value ) ) , OpenAPIValidator :: validateValue ) . map ( env -> ( T ) env . value ) ; }
Check that a value follows an specification.
Check that a value follows an specification .