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: parse multiple parameters #69

Merged
merged 4 commits into from
Sep 27, 2023
Merged

fix: parse multiple parameters #69

merged 4 commits into from
Sep 27, 2023

Conversation

Don-CA
Copy link
Contributor

@Don-CA Don-CA commented Sep 14, 2023

Purpose

Parse paths with multiple parameters correctly

Context

The original regular expression was too greedy and matched everything up to the last }.

A path of /messages/{id}/{second_id} would capture {id}/{second_id} as a single group. This would confuse the OperationRouter which would fail parameter_match?

@mkon
Copy link
Owner

mkon commented Sep 14, 2023

hey @Don-CA, thanks for finding this bug and applying the fix. I want to avoid IDE specific configuration files in the repo, can you remove the file and/or add it to gitignore?

@Don-CA
Copy link
Contributor Author

Don-CA commented Sep 14, 2023

hey @Don-CA, thanks for finding this bug and applying the fix. I want to avoid IDE specific configuration files in the repo, can you remove the file and/or add it to gitignore?

Whoops! I swear I was careful about not adding it and yet it snuck in there. Gone now.

@Don-CA
Copy link
Contributor Author

Don-CA commented Sep 15, 2023

Added another fix to make sure we only match exact paths. Does that seem right to you?

@mkon
Copy link
Owner

mkon commented Sep 15, 2023

Looks good. Just need to appease the rubocop and I can merge :)

@mkon
Copy link
Owner

mkon commented Sep 22, 2023

@Don-CA can you run rubocop -A I can sadly not push into your branch.

Copy link
Owner

@mkon mkon left a comment

Choose a reason for hiding this comment

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

Thanks!

@mkon mkon merged commit 3879e55 into mkon:main Sep 27, 2023
8 checks passed
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