Match route parameters to types #510

Closed
opened 2025-12-29 15:25:36 +01:00 by adam · 2 comments
Owner

Originally created by @Twinki14 on GitHub (May 6, 2023).

Originally assigned to: @StefH on GitHub.

Given I have a path like /site/<guid>/org, is there an easier syntax I could use instead of a regex/wild card? like /site/{{guid}}/org or /site/{{long}}/org, it'll match the route based on the type

Originally created by @Twinki14 on GitHub (May 6, 2023). Originally assigned to: @StefH on GitHub. Given I have a path like `/site/<guid>/org`, is there an easier syntax I could use instead of a regex/wild card? like `/site/{{guid}}/org` or `/site/{{long}}/org`, it'll match the route based on the type
adam added the question label 2025-12-29 15:25:36 +01:00
adam closed this issue 2025-12-29 15:25:36 +01:00
Author
Owner

@StefH commented on GitHub (May 6, 2023):

@Twinki14
The easiest way to achieve this is use a regular expression.

  • guid = ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$
  • long = ^[0-9]{1,19}$
@StefH commented on GitHub (May 6, 2023): @Twinki14 The easiest way to achieve this is use a regular expression. - guid = `^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$` - long = `^[0-9]{1,19}$`
Author
Owner

@StefH commented on GitHub (May 12, 2023):

@Twinki14
I'm closing this question for now.

@StefH commented on GitHub (May 12, 2023): @Twinki14 I'm closing this question for now.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/WireMock.Net-wiremock#510