metosin/compojure-api — pull request #6 by arttuka (2014-03-10 14:16:36+00:00)
Title: Add support for regular expression matching in URL parameters

Compojure routing supports [regular expression matching in URL parameters](https://github.com/weavejester/compojure/wiki/Routes-In-Detail). The same syntax works fine with compojure-api's `GET*` etc, since it passes the path parameter to Compojure's routing macros. Swagger parsing however fails and produces mangled URLs. For example,
```clj
(context "/api" []
(GET* ["/item/:name" :name #"[a-z/]+"] [name] identity))
```
results in a path of `/api["/item/{name":name#"[a-z]+"]}` instead of `/api/item/{name}`. This PR adds support for the regex path syntax to compojure.api.swagger.