-
Notifications
You must be signed in to change notification settings - Fork 15
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
feat: Route based matching of rules #1766
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…e used directly by the rule factory implementaiton
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1766 +/- ##
=======================================
Coverage 89.74% 89.75%
=======================================
Files 271 270 -1
Lines 8993 9039 +46
=======================================
+ Hits 8071 8113 +42
- Misses 684 686 +2
- Partials 238 240 +2 ☔ View full report in Codecov by Sentry. |
dadrus
changed the title
feat: Route based matching of rules
wip: Route based matching of rules
Sep 10, 2024
dadrus
changed the title
wip: Route based matching of rules
feat: Route based matching of rules
Sep 11, 2024
…them available in path params matchers
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Related issue(s)
closes #1718
Checklist
Description
This PR builds upon the work initiated in #1358 by extending the matching capabilities to support rule matching based on individual routes. This not only simplifies and streamlines the rule matching configuration API, making it more intuitive and user-friendly, but also enhances the efficiency of the implementation, particularly in terms of path specificity—where wildcard path values need to conform to specific patterns. Additionally, the new rule matching API helps reduce the need for redundant rules.
Here how the rule configuration with the new matching API looks like:
And in a minimal representation, a rule definition looks now as follows:
Please Note: Values captured by unnamed wildcards -
:*
or**
cannot be referenced inpath_params
as*
is an invalid name.With that configuration options in place, the negative examples provided in #1718 can be rewritten as follows (only the matching part is shown):
Additional Information
This design of this new matching API has been suggested in discussed in discord (https://discord.com/channels/1100447190796742698/1280410897675718697).