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

@return the future that says if the value is valid or not.
Validate that the value is not of the specified type . @param promise to inform of the validation . @param env environment to use for the validation . @return the future that says if the value is valid or not .
static private Future<ValueEnvironment> validateNotValue(@NotNull final Promise<ValueEnvironment> promise,
      @NotNull final ValueEnvironment env) {
    final var not = env.specification.getJsonObject("not");
    return promise.future()
        .compose(chain -> validateValue(chain.codePrefix, chain.vertx, not, chain.value).transform(validation -> {
          final Promise<ValueEnvironment> notPromise = Promise.promise();
          if (!validation.failed()) {
            notPromise.fail(env.notValid("Required a value that is not of this type."));
          } else {
            notPromise.complete(chain);
          }
          return notPromise.future();
        }));
  }
static private Future < ValueEnvironment > validateNotValue ( @ NotNull final Promise < ValueEnvironment > promise , @ NotNull final ValueEnvironment env ) { final var not = env . specification . getJsonObject ( "not" ) ; return promise . future ( ) . compose ( chain -> validateValue ( chain . codePrefix , chain . vertx , not , chain . value ) . transform ( validation -> { final Promise < ValueEnvironment > notPromise = Promise . promise ( ) ; if ( ! validation . failed ( ) ) { notPromise . fail ( env . notValid ( "Required a value that is not of this type." ) ) ; } else { notPromise . complete ( chain ) ; } return notPromise . future ( ) ; } ) ) ; }
Validate that the value is not of the specified type.
Validate that the value is not of the specified type .