vertx/src/main/java/eu/internetofus/common/vertx/OpenAPIValidator.java
/**
   * Validate that the value is all of the specified values.
   *
   * @param promise     to inform of the validation.
   * @param environment to use for the validation.
   *
   * @return the future that says if the value is valid or not.
   */
Validate that the value is all of the specified values.
@param promise     to inform of the validation.
@param environment to use for the validation.

@return the future that says if the value is valid or not.
Validate that the value is all of the specified values . @param promise to inform of the validation . @param environment to use for the validation . @return the future that says if the value is valid or not .
static private Future<ValueEnvironment> validateAllOfValue(@NotNull final Promise<ValueEnvironment> promise,
      @NotNull final ValueEnvironment environment) {
    var future = promise.future();
    final var allOf = environment.specification.getJsonArray("allOf");
    final var max = allOf.size();
    for (var i = 0; i < max; i++) {
      final var type = allOf.getJsonObject(i);
      final var subEnvironment = new ValueEnvironment(environment.codePrefix, environment.vertx, type,
          environment.value);
      subEnvironment.checkingCompose = true;
      future = future
          .compose(chain -> composeValidation(Future.succeededFuture(subEnvironment), OpenAPIValidator::validateValue)
              .map(validSubEnvironment -> {
                chain.value = validSubEnvironment.value;
                chain.addFieldNames(validSubEnvironment);
                return chain;
              }));
    }
    return future;
  }
static private Future < ValueEnvironment > validateAllOfValue ( @ NotNull final Promise < ValueEnvironment > promise , @ NotNull final ValueEnvironment environment ) { var future = promise . future ( ) ; final var allOf = environment . specification . getJsonArray ( "allOf" ) ; final var max = allOf . size ( ) ; for ( var i = 0 ; i < max ; i ++ ) { final var type = allOf . getJsonObject ( i ) ; final var subEnvironment = new ValueEnvironment ( environment . codePrefix , environment . vertx , type , environment . value ) ; subEnvironment . checkingCompose = true ; future = future . compose ( chain -> composeValidation ( Future . succeededFuture ( subEnvironment ) , OpenAPIValidator :: validateValue ) . map ( validSubEnvironment -> { chain . value = validSubEnvironment . value ; chain . addFieldNames ( validSubEnvironment ) ; return chain ; } ) ) ; } return future ; }
Validate that the value is all of the specified values.
Validate that the value is all of the specified values .