Skip to content

Conversation

@orionstudt
Copy link
Contributor

@orionstudt orionstudt commented Dec 16, 2025

In a Rails app, there is some data that gets added to the Rack Request env by the app itself while the request is handled (such as which controller and action actually handled the request after it was routed).

If you want to access any of this information in any openapi_first hooks, than you need to be able to configure tests to do the request validation only after the request has been handled.

@orionstudt orionstudt marked this pull request as ready for review December 17, 2025 00:37
@orionstudt orionstudt requested a review from ahx as a code owner December 17, 2025 00:37
@ahx
Copy link
Owner

ahx commented Dec 18, 2025

Hi! I am wondering if this should be the default behavior during tests. 🤔

I think this behavior might be useful, because it allows you to start a debugger in your controller code to debug invalid requests. I would rather make this the default and not introduce another configuration option. Do you have any thoughts on that?

@orionstudt
Copy link
Contributor Author

Hi! I am wondering if this should be the default behavior during tests. 🤔

I think this behavior might be useful, because it allows you to start a debugger in your controller code to debug invalid requests. I would rather make this the default and not introduce another configuration option. Do you have any thoughts on that?

I'm not opposed! I went to config so as not to affect other consumer's existing functionality, but if you think it should be default than I'm all for it.

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