Path Patterns
Master path patterns in moclojer - wildcards, regex, precedence, and complex routing. Learn to create flexible URL patterns for sophisticated API mocking.
π Pattern Types
1. Static Paths
- endpoint:
path: /users
- endpoint:
path: /api/v1/products2. Path Parameters
# Single parameter
- endpoint:
path: /users/:id
# Multiple parameters
- endpoint:
path: /posts/:postId/comments/:commentId
# Typed parameters
- endpoint:
path: /users/:id|int
path: /posts/:slug|string3. Wildcards
π― Route Precedence
β
Best Practices
π See Also
Last updated
Was this helpful?