Class RequestUtils
java.lang.Object
io.vertx.openapi.validation.RequestUtils
-
Method Summary
Modifier and TypeMethodDescriptionstatic Future<ValidatableRequest> extract(HttpServerRequest request, Operation operation) Extracts and transforms the parameters and the body of an incoming request into aformatthat can be validated by theRequestValidator.static Future<ValidatableRequest> Likeextract(HttpServerRequest, Operation), but offers to pass a supplier fpr the body.static intfindPathSegment(String templatePath, String parameterName)
-
Method Details
-
extract
Extracts and transforms the parameters and the body of an incoming request into aformatthat can be validated by theRequestValidator.- Parameters:
request- the incoming request.operation- the operation of the related request.- Returns:
- A
Futureholding the ValidatableRequest.
-
extract
public static Future<ValidatableRequest> extract(HttpServerRequest request, Operation operation, Supplier<Future<Buffer>> bodySupplier) Likeextract(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
Futureholding the ValidatableRequest.
-
findPathSegment
-