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(#2350): Update recognize_paths taking into account the route_param type #2379

Merged
merged 2 commits into from
Nov 26, 2023

Conversation

jcagarcia
Copy link
Contributor

Hey 👋

This PR tries to fix the issue described in #2350

With this changes, the recognize_paths method takes into account the route_param type (if specified) for determine if a path matches with the performed request.

This change has an important implication that has been added to the UPGRADED file:

Before this change, if a request was performed to an endpoint that has specified the type of the route_param, the path was recognized. If finally the provided parameter in the request didn't match with the specified route_param type. A 400 Bad Request response was returning, indicating that the provided param in the path was not valid. With these changes, as the path is directly not recognized if it does not accomplish with the specified route_param type, we are returning a 404 Not Found response.

Is that consider a breaking change? It is a bug fix?

Any comment, suggestion and discussion is totally welcome 👍

Copy link
Member

@dblock dblock left a comment

Choose a reason for hiding this comment

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

Good! Nits below.

Check failing CI/rubocop.

UPGRADING.md Outdated Show resolved Hide resolved
UPGRADING.md Outdated Show resolved Hide resolved
@dblock dblock merged commit e922b1b into ruby-grape:master Nov 26, 2023
31 checks passed
@jcagarcia jcagarcia deleted the issue-2350 branch November 26, 2023 15:38
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