public Status validateRequest ( final NormalisedPath requestPath , HttpServerExchange exchange , OpenApiOperation openApiOperation ) { requireNonNull ( requestPath , "A request path is required" ) ; requireNonNull ( exchange , "An exchange is required" ) ; requireNonNull ( openApiOperation , "An OpenAPI operation is required" ) ; Status status = validatePathParameters ( requestPath , openApiOperation ) ; if ( status != null ) return status ; status = validateQueryParameters ( exchange , openApiOperation ) ; if ( status != null ) return status ; status = validateHeader ( exchange , openApiOperation ) ; if ( status != null ) return status ; Object body = exchange . getAttachment ( BodyHandler . REQUEST_BODY ) ; // skip the body validation if body parser is not in the request chain. if ( body == null && ValidatorHandler . config . skipBodyValidation ) return null ; status = validateRequestBody ( body , openApiOperation ) ; return status ; }
Validate the request against the given API operation