Skip to content

Commit

Permalink
fixes #345 openapi-validator.skipBodyValidation not working as expect…
Browse files Browse the repository at this point in the history
…ed (#346)
  • Loading branch information
stevehu authored Jan 23, 2024
1 parent b8d9932 commit 20f8932
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public Status validateRequest(final NormalisedPath requestPath, HttpServerExchan
if (contentType==null || contentType.startsWith("application/json")) {
Object body = exchange.getAttachment(AttachmentConstants.REQUEST_BODY);
// skip the body validation if body parser is not in the request chain.
if(body == null && ValidatorHandler.config.skipBodyValidation) return null;
if(body == null || ValidatorHandler.config.skipBodyValidation) return null;
status = validateRequestBody(body, openApiOperation);
}
return status;
Expand Down

0 comments on commit 20f8932

Please sign in to comment.