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

[Suggestion] Improve Wildcard Handling for Paths #1

Open
Lekato98 opened this issue Sep 23, 2023 · 0 comments
Open

[Suggestion] Improve Wildcard Handling for Paths #1

Lekato98 opened this issue Sep 23, 2023 · 0 comments

Comments

@Lekato98
Copy link

Lekato98 commented Sep 23, 2023

Description:

Context:

In the current implementation of wildcards in this repository, the * character is used to match any path, including sub-paths. While this approach is valid, it deviates from the more common convention found in web frameworks, where * typically matches only at the current level of the path. To match sub-paths, developers often use ** or similar symbols.

Problem:

The current wildcard handling can lead to confusion for users who are accustomed to the standard behaviour in web frameworks. It may also result in unexpected matching outcomes.

Suggestion:

I propose improving wildcard handling to align it with common conventions. Specifically:

  • Use * to match at the current level of the path.
  • Introduce ** or another suitable symbol to match sub-paths.

Examples:

  • Current Behaviour: /user/* matches /user/a/b.
  • Suggested Behaviour: /user/* matches /user/a, and /user/** matches /user/a/b.

This change will make the wildcard behaviour more intuitive and align it with widely accepted practices.

Let me know your thoughts, thanks!

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant