Skip to content

Support route catch-all wildcards #178

@sean-lynch

Description

@sean-lynch

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"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions