Skip to content

Handle cases where a route's prefix is a nested URL #758

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 1 commit into from
Oct 10, 2019

Conversation

SimonKaluza
Copy link
Contributor

Nested prefixes (any prefix containing a '/' character) prior to this commit would incorrectly get tagged as the first segment of the URL prefix.

E.g. a route like "api/beta/v1/patients" would incorrectly get tagged as "api" instead of "patients"

@coveralls
Copy link

coveralls commented Sep 4, 2019

Coverage Status

Coverage increased (+0.1%) to 99.023% when pulling db1ad06 on SimonKaluza:handle-route-prefixes into 3de44a3 on ruby-grape:master.

@LeFnord
Copy link
Member

LeFnord commented Oct 1, 2019

mmh for me the changes are reasonable, but please adept the specs and/or add one which documents the behaviour

@SimonKaluza SimonKaluza force-pushed the handle-route-prefixes branch 3 times, most recently from 6167858 to f70bcbc Compare October 10, 2019 16:24
Nested prefixes (any prefix containing a '/' character) prior to this commit would incorrectly get tagged as the first segment of the URL prefix.

E.g. a route like "api/beta/v1/patients" would incorrectly get tagged as "api" instead of "patients"

Added a nested prefix to the namespace_tags prefix RSpec -- this example breaks without the changes to endpoint.rb.
@SimonKaluza SimonKaluza force-pushed the handle-route-prefixes branch from f70bcbc to db1ad06 Compare October 10, 2019 16:26
@SimonKaluza
Copy link
Contributor Author

Added a RSpec example with tags that breaks without the adjustments made to endpoint.rb to support nested prefix and rebased off of the current master (hence the force-pushes)

@LeFnord
Copy link
Member

LeFnord commented Oct 10, 2019

thanks @SimonKaluza

@LeFnord LeFnord merged commit 5c24f1b into ruby-grape:master Oct 10, 2019
aka-momo pushed a commit to aka-momo/grape-swagger that referenced this pull request Feb 8, 2023
Nested prefixes (any prefix containing a '/' character) prior to this commit would incorrectly get tagged as the first segment of the URL prefix.

E.g. a route like "api/beta/v1/patients" would incorrectly get tagged as "api" instead of "patients"

Added a nested prefix to the namespace_tags prefix RSpec -- this example breaks without the changes to endpoint.rb.
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants