vertx/src/main/java/eu/internetofus/common/vertx/OpenAPIValidator.java
/**
   * Validate that the value is one of the enumerated ones.
   *
   * @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 one of the enumerated ones.
@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 one of the enumerated ones . @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 Future<ValueEnvironment> validateEnumValue(@NotNull final Promise<ValueEnvironment> promise,
      @NotNull final ValueEnvironment env) {
    final var enumValues = env.specification.getJsonArray("enum");
    if (!enumValues.contains(env.value)) {
      promise.fail(env.notValid("Expecting a value in " + enumValues + "."));
    }
    return promise.future();
  }
static Future < ValueEnvironment > validateEnumValue ( @ NotNull final Promise < ValueEnvironment > promise , @ NotNull final ValueEnvironment env ) { final var enumValues = env . specification . getJsonArray ( "enum" ) ; if ( ! enumValues . contains ( env . value ) ) { promise . fail ( env . notValid ( "Expecting a value in " + enumValues + "." ) ) ; } return promise . future ( ) ; }
Validate that the value is one of the enumerated ones.
Validate that the value is one of the enumerated ones .