We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 10d37e1 commit 9d814d4Copy full SHA for 9d814d4
src/compojure/api/middleware.clj
@@ -76,7 +76,7 @@
76
(assoc-in [:meta :produces] (map mime-types response-formats))
77
handler)))
78
79
-(defn handle-req-error [e handler req]
+(defn handle-req-error [^Throwable e handler req]
80
(cond
81
(instance? JsonParseException e)
82
(bad-request {:type "json-parse-exception"
src/compojure/api/swagger.clj
@@ -103,7 +103,7 @@
103
(defn strip-trailing-spaces [s] (st/replace-first s #"(.)\/+$" "$1"))
104
105
(defn create-api-route [[ks v]]
106
- [{:method (keyword (.getName (first (keep second ks))))
+ [{:method (keyword (name (first (keep second ks))))
107
:uri (->> ks (map first) (map remove-param-regexes) st/join strip-trailing-spaces)} v])
108
109
(defn extract-method [body]
0 commit comments