-
Notifications
You must be signed in to change notification settings - Fork 64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Handle Rails engine routes #38
Conversation
lib/rspec/openapi/record_builder.rb
Outdated
unless route.path.anchored | ||
route = find_rails_route(request, app: route.app.app, fix_path: false) | ||
found_route = nil | ||
if app.respond_to? :routes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The tests don't fail even if you don't check if app.respond_to? :routes
. Please remove this check or add a test that fails without this check.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
addressed in 81751cb
To mitigate the risk of this change, I removed changes that are not needed to pass the test case. 81751cb |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
Let iterate all the recognized routes including the ones coming from Rails engines.
As reference, the relevant part of
action_dispatch
'srecognize
:https://github.com/rails/rails/blob/main/actionpack/lib/action_dispatch/routing/route_set.rb#L881-L892
Fixes #37