validation.request.path.missing
Issue #325
resolved
org.testng.internal.InvokeMethodRunnable$TestNGRuntimeException:
com.atlassian.oai.validator.restassured.OpenApiValidationFilter$OpenApiValidationException: {
"messages" : [ {
"key" : "validation.request.path.missing",
"level" : "ERROR",
"message" : "No API path found that matches request '/v1/stores'.",
"context" : {
"requestPath" : "/v1/stores",
"requestMethod" : "GET"
}
} ]
}
Hi
I get the above error if I have anything after hostname in basueri. I have v1 in hostname - http://localhost/v1
It complains that my openapi spec path dont have v1 in their paths. itdoesnt considerhttp://localhost/v1 as basepath. I guess it thinks http://localhost/ is basepath. Is there a way to treat http://localhost/v1 as basepath so it doesn't look for /v1/stores in paths.
Comments (2)
-
-
- changed status to resolved
- Log in to comment
You could try using the
basePathOverride
when you construct the validator instance. This will override whatever basepath is discovered in the API spec.https://bitbucket.org/atlassian/swagger-request-validator/src/d2a2521e8dc901e6e1b29b6bfb54a862370c4b42/swagger-request-validator-core/src/main/java/com/atlassian/oai/validator/OpenApiInteractionValidator.java#lines-473