-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Closed
Description
The current route wildcard system is great for catching parameters, but doesn't work for catch alls.
For example, I want to use catch alls to enable API versioning and uniformly handle old versions of the API
GET /api/1/contacts
POST /api/1/contacts
GET /api/1/contacts/:id
PUT /api/1/contacts/:id
DELETE /api/1/contacts/:id
If I increment the active version of the API to 2, I want to uniformly handle the old version of the API with a handler that instructs the user to update their client. I'd like to do this by specifying
@route('/api/1/*')
def deprecation_notice() :
return "Update your client"
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels