-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Labels
bugSomething isn't workingSomething isn't working
Description
When the openAPI contract does not define a Operation Reponse body:
"responses": { "200": { "description": "Successful hello message" },
But the ValidatableResponse contains a response body,
the validation passes successfully instead of Failing.
A Test Sample:
`
OpenAPIContract contract = getContract();
ResponseValidator validator = ResponseValidator.create(vertx, contract);
JsonObject cat = new JsonObject().put("name", "foo");
ValidatableResponse response =
ValidatableResponse.create(200, cat.toBuffer(), "application/json");
validator.validate(response, "operationWithResponseNoBody")
.onSuccess(vr -> logger.info("Validation Success"))
.onFailure(t -> logger.error("Validation Failure: ", t));
`
Output: "Validation Success"
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working