Skip to content

Conversation

pboos
Copy link
Contributor

@pboos pboos commented Sep 4, 2025

This moves violations to be excluded earlier inside the OpenApiRequestValidator instead of only in the violation handler.

Fixes the following problem (but also others):

Steps to reproduce

  1. Enable openapi.validation.should-fail-on-request-violation=true
  2. Send a request to a non existent endpoint

Should
Return 404

Actual
Returns 500 (because internally it has a violation that there is no spec for given path)

@pboos pboos requested a review from a team as a code owner September 4, 2025 12:52
@pboos pboos requested a review from dominik-riha September 4, 2025 12:52
@pboos pboos merged commit 8e593d4 into main Sep 4, 2025
4 checks passed
@pboos pboos deleted the bugfix/fail-on-request-shouldnt-fail-for-excluded-violations branch September 4, 2025 12:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants