Skip to content

Validate each test request against its operation - #485

Merged
geemus merged 1 commit into
masterfrom
fix/test-validator-per-request
Sep 18, 2026
Merged

geemus merged 1 commit into
masterfrom
fix/test-validator-per-request

Conversation

@ydah

@ydah ydah commented Sep 16, 2026

Copy link
Copy Markdown
Member

Committee::Test::Methods#schema_validator memoizes the validator created for the first request. OpenAPI 3 validators retain the operation matched during initialization, so subsequent requests in the same test instance are validated against the first request's operation.

Build the validator from the current request on every call while retaining the existing schema and router caches.

@geemus geemus left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, thanks!

@geemus
geemus merged commit f964553 into master Sep 18, 2026
9 checks passed
@geemus
geemus deleted the fix/test-validator-per-request branch September 18, 2026 16:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants