Class RequestUtils

java.lang.Object
io.vertx.openapi.validation.RequestUtils

public class RequestUtils extends Object
  • Method Details

    • extract

      public static Future<ValidatableRequest> extract(HttpServerRequest request, Operation operation)
      Extracts and transforms the parameters and the body of an incoming request into a format that can be validated by the RequestValidator.
      Parameters:
      request - the incoming request.
      operation - the operation of the related request.
      Returns:
      A Future holding the ValidatableRequest.
    • extract

      public static Future<ValidatableRequest> extract(HttpServerRequest request, Operation operation, Supplier<Future<Buffer>> bodySupplier)
      Like extract(HttpServerRequest, Operation), but offers to pass a supplier fpr the body. This is helpful in case that the request has already been read.
      Parameters:
      request - the incoming request.
      operation - the operation of the related request.
      bodySupplier - the body supplier which can help in case that the request has already been read.
      Returns:
      A Future holding the ValidatableRequest.
    • findPathSegment

      public static int findPathSegment(String templatePath, String parameterName)