Matching on wrong case #93
Unanswered
kgrigsby59
asked this question in
Q&A
Replies: 1 comment 3 replies
-
Parser-printers need to be ordered by most specific to least specific. This is a necessary concept to understand to wield parser-printers correctly, and we talk about it in this episode. The word "activity" is less specific than "activityTracking" because it is a subset of the latter. So, you need to flip your parser order: Route(.case(ActivitiesRoute.activityTracking)) {
Path { "activityTracking" }
}
Route(.case(ActivitiesRoute.activity)) {
Path { "activity"}
} We have documentation on this here. |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have two similarly named cases
activity
andactivityTracking
. When I ask for the path ofactivity
it gives meactivityTracking
. Is there something I need to add to do exact matching?Beta Was this translation helpful? Give feedback.
All reactions