Package org.mockserver.openapi
Class OpenAPIRequestValidator
java.lang.Object
org.mockserver.openapi.OpenAPIRequestValidator
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvalidate(String specUrlOrPayload, HttpRequest request, MockServerLogger logger) validate(String specUrlOrPayload, HttpRequest request, MockServerLogger logger, String matchedPathTemplate) Validates a request against an OpenAPI spec.
-
Constructor Details
-
OpenAPIRequestValidator
public OpenAPIRequestValidator()
-
-
Method Details
-
validate
public static List<String> validate(String specUrlOrPayload, HttpRequest request, MockServerLogger logger) -
validate
public static List<String> validate(String specUrlOrPayload, HttpRequest request, MockServerLogger logger, String matchedPathTemplate) Validates a request against an OpenAPI spec. WhenmatchedPathTemplateis supplied (e.g. threaded through fromOpenApiTrafficValidator.findMatchingOperation(io.swagger.v3.oas.models.OpenAPI, java.lang.String, java.lang.String)), it is used to map the concrete request path back onto the matched path template forpathparameter extraction; otherwise the template is resolved here.
-