Closed vehvis closed 6 years ago
compojure-api 2.0.0-alpha21 clojure 1.9.0
Spec coercion causes CompilerException (qualified-keyword? n) when defining path-params or query-params using the "traditional" API style.
CompilerException (qualified-keyword? n)
This is condensed from the relevant compojure-api example:
(require '[clojure.spec.alpha :as s]) (require '[spec-tools.spec :as spec]) (require '[compojure.api.sweet :refer :all]) (require '[ring.util.http-response :refer :all]) (def app (api {:coercion :spec} (context "/math/:a" [] :path-params [a :- int?] (POST "/plus" [] :query-params [b :- int?] (ok)))))
Sorry, got an old spec-tools version. With 0.7.1 everything works. Closing this issue.
Library Version(s)
compojure-api 2.0.0-alpha21 clojure 1.9.0
Problem
Spec coercion causes
CompilerException (qualified-keyword? n)
when defining path-params or query-params using the "traditional" API style.This is condensed from the relevant compojure-api example: