Skip to content
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

fix: Use mount_path to narrow down urls_for #924

Merged

Conversation

chibicco
Copy link
Contributor

@chibicco chibicco commented Apr 21, 2024

Overview

Hello, thanks for this useful library !

When you run rake oapi:fetch, All endpoints that include the path name doc will be caught.
Narrow down the target path using mount_path.

Related items

@chibicco chibicco force-pushed the feat-mount_path-to-narrow-down-urls_for branch from 670a236 to e8d0776 Compare April 21, 2024 10:02
spec/support/mock_parser.rb Outdated Show resolved Hide resolved
@chibicco chibicco marked this pull request as ready for review April 21, 2024 10:08
@chibicco chibicco force-pushed the feat-mount_path-to-narrow-down-urls_for branch from 86231f8 to ac8b4d2 Compare April 22, 2024 05:02
Copy link
Member

@LeFnord LeFnord left a comment

Choose a reason for hiding this comment

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

thanks @chibicco … please rebase against master and add a Changelog entry

spec/lib/oapi_tasks_spec.rb Outdated Show resolved Hide resolved
@chibicco chibicco force-pushed the feat-mount_path-to-narrow-down-urls_for branch from ac8b4d2 to 078bb34 Compare April 25, 2024 20:06
@chibicco
Copy link
Contributor Author

chibicco commented Apr 25, 2024

Thank you for your review : )
I rebased it on master, and Added Changelog.

@chibicco chibicco requested a review from LeFnord April 25, 2024 20:09
@chibicco chibicco force-pushed the feat-mount_path-to-narrow-down-urls_for branch from 078bb34 to 5afe75a Compare April 25, 2024 20:14
Copy link
Member

@LeFnord LeFnord left a comment

Choose a reason for hiding this comment

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

thanks @chibicco

@LeFnord LeFnord merged commit ceebbd3 into ruby-grape:master Apr 26, 2024
21 checks passed
@@ -95,7 +95,7 @@ def make_request(url)
def urls_for(api_class)
api_class.routes
.map(&:path)
.select { |e| e.include?('doc') }

Choose a reason for hiding this comment

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

This breaks the specs generation

Copy link
Member

Choose a reason for hiding this comment

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

mmh, it is gone … what do you mean?

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.

3 participants