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

Change routing path parameter syntax style #1018

Merged
merged 5 commits into from
Jan 6, 2025
Merged

Change routing path parameter syntax style #1018

merged 5 commits into from
Jan 6, 2025

Conversation

chrislearn
Copy link
Member

@chrislearn chrislearn commented Jan 5, 2025

The parameter matching pattern is changed to {{param}}, because most web frameworks use this pattern, and the OpenAPI standard also uses this pattern.

If a regular expression is required, the previous is similar to <param:/\d+/>. The '/' here is easily confused with the '/' parameter in the path. Now it is changed to the {param|\d+} pattern.

@chrislearn chrislearn merged commit 306f67b into main Jan 6, 2025
8 checks passed
@EluvK
Copy link

EluvK commented Jan 15, 2025

It took me about five minutes to figure out why the router didn't hit the handler after updating this...🥲

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