vertx/src/main/java/eu/internetofus/common/vertx/OpenAPIValidator.java
/**
   * Check that if the type exist is one of the expected ones.
   *
   * @param field        that require a type.
   * @param env          validation environment to use.
   * @param expectedType the expected types for the type if it is defined.
   *
   * @throws ValidationErrorException if it is not an instance of.
   */
Check that if the type exist is one of the expected ones.
@param field        that require a type.
@param env          validation environment to use.
@param expectedType the expected types for the type if it is defined.

@throws ValidationErrorException if it is not an instance of.
Check that if the type exist is one of the expected ones . @param field that require a type . @param env validation environment to use . @param expectedType the expected types for the type if it is defined . @throws ValidationErrorException if it is not an instance of .
private static void checkIfTypeIs(@NotNull final String field, @NotNull final SpecificationEnvironment env,
      final String expectedType) throws ValidationErrorException {
    final var type = env.specification.getString("type", null);
    if (type != null && !type.equals(expectedType)) {
      throw env.notValid(field, "You only can use this feature if 'type'='" + type + "'.\"");
    }
  }
private static void checkIfTypeIs ( @ NotNull final String field , @ NotNull final SpecificationEnvironment env , final String expectedType ) throws ValidationErrorException { final var type = env . specification . getString ( "type" , null ) ; if ( type != null && ! type . equals ( expectedType ) ) { throw env . notValid ( field , "You only can use this feature if 'type'='" + type + "'.\"" ) ; } }
Check that if the type exist is one of the expected ones.
Check that if the type exist is one of the expected ones .