Class RequestValidator
- java.lang.Object
-
- com.networknt.aws.lambda.handler.middleware.validator.RequestValidator
-
public class RequestValidator extends Object
-
-
Constructor Summary
Constructors Constructor Description RequestValidator(SchemaValidator schemaValidator)Construct a new request validator with the given Open API validator.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.networknt.status.StatusvalidateRequest(com.networknt.openapi.NormalisedPath requestPath, LightLambdaExchange exchange, com.networknt.openapi.OpenApiOperation openApiOperation)Validate the request against the given API operation
-
-
-
Constructor Detail
-
RequestValidator
public RequestValidator(SchemaValidator schemaValidator)
Construct a new request validator with the given Open API validator.- Parameters:
schemaValidator- The schema validator to use when validating request
-
-
Method Detail
-
validateRequest
public com.networknt.status.Status validateRequest(com.networknt.openapi.NormalisedPath requestPath, LightLambdaExchange exchange, com.networknt.openapi.OpenApiOperation openApiOperation)Validate the request against the given API operation- Parameters:
requestPath- normalised pathexchange- The HttpServerExchange to validateopenApiOperation- OpenAPI operation- Returns:
- A validation report containing validation errors
-
-