diff --git a/examples/just-coercion-with-ring/project.clj b/examples/just-coercion-with-ring/project.clj index 11bbb381..9e0c652d 100644 --- a/examples/just-coercion-with-ring/project.clj +++ b/examples/just-coercion-with-ring/project.clj @@ -1,6 +1,6 @@ (defproject just-coercion-with-ring "0.1.0-SNAPSHOT" :description "Reitit coercion with vanilla ring" - :dependencies [[org.clojure/clojure "1.9.0-RC2"] + :dependencies [[org.clojure/clojure "1.9.0"] [ring "1.6.3"] [metosin/muuntaja "0.4.1"] [metosin/reitit "0.1.0-SNAPSHOT"]]) diff --git a/examples/just-coercion-with-ring/src/example/server.clj b/examples/just-coercion-with-ring/src/example/server.clj index 6066b84c..3697012c 100644 --- a/examples/just-coercion-with-ring/src/example/server.clj +++ b/examples/just-coercion-with-ring/src/example/server.clj @@ -1,5 +1,7 @@ (ns example.server (:require [ring.adapter.jetty :as jetty] + [muuntaja.middleware] + [ring.middleware.params] [reitit.middleware :as middleware] [reitit.ring.coercion :as rrc])) @@ -10,9 +12,9 @@ ;; to be set with :extract-request-format and extract-response-format (defn wrap-coercion [handler resource] (middleware/chain - [rrc/coerce-request-middleware - rrc/coerce-response-middleware - rrc/coerce-exceptions-middleware] + [rrc/coerce-exceptions-middleware + rrc/coerce-request-middleware + rrc/coerce-response-middleware] handler resource)) diff --git a/examples/ring-example/project.clj b/examples/ring-example/project.clj index 11bbb381..1035eafa 100644 --- a/examples/ring-example/project.clj +++ b/examples/ring-example/project.clj @@ -1,6 +1,6 @@ -(defproject just-coercion-with-ring "0.1.0-SNAPSHOT" - :description "Reitit coercion with vanilla ring" - :dependencies [[org.clojure/clojure "1.9.0-RC2"] +(defproject ring-example "0.1.0-SNAPSHOT" + :description "Reitit Ring App" + :dependencies [[org.clojure/clojure "1.9.0"] [ring "1.6.3"] [metosin/muuntaja "0.4.1"] [metosin/reitit "0.1.0-SNAPSHOT"]]) diff --git a/examples/ring-example/src/example/dspec.clj b/examples/ring-example/src/example/dspec.clj index 7b32d737..b463bc80 100644 --- a/examples/ring-example/src/example/dspec.clj +++ b/examples/ring-example/src/example/dspec.clj @@ -1,8 +1,8 @@ (ns example.dspec - (:require [reitit.coercion.spec :as spec-coercion])) + (:require [reitit.coercion.spec])) (def routes - ["/dspec" {:coercion spec-coercion/coercion} + ["/dspec" {:coercion reitit.coercion.spec/coercion} ["/plus" {:name ::plus :responses {200 {:schema {:total int?}}} :get {:summary "plus with query-params" diff --git a/examples/ring-example/src/example/schema.clj b/examples/ring-example/src/example/schema.clj index bd773f08..977a7b0c 100644 --- a/examples/ring-example/src/example/schema.clj +++ b/examples/ring-example/src/example/schema.clj @@ -1,9 +1,9 @@ (ns example.schema (:require [schema.core :as s] - [reitit.coercion.schema :as schema-coercion])) + [reitit.coercion.schema])) (def routes - ["/schema" {:coercion schema-coercion/coercion} + ["/schema" {:coercion reitit.coercion.schema/coercion} ["/plus" {:name ::plus :responses {200 {:schema {:total s/Int}}} :get {:summary "plus with query-params" diff --git a/examples/ring-example/src/example/spec.clj b/examples/ring-example/src/example/spec.clj index 6962041f..d8cfb3af 100644 --- a/examples/ring-example/src/example/spec.clj +++ b/examples/ring-example/src/example/spec.clj @@ -1,7 +1,7 @@ (ns example.spec (:require [clojure.spec.alpha :as s] [spec-tools.spec :as spec] - [reitit.coercion.spec :as spec-coercion])) + [reitit.coercion.spec])) ;; wrap into Spec Records to enable runtime conforming (s/def ::x spec/int?) @@ -9,7 +9,7 @@ (s/def ::total spec/int?) (def routes - ["/spec" {:coercion spec-coercion/coercion} + ["/spec" {:coercion reitit.coercion.spec/coercion} ["/plus" {:name ::plus :responses {200 {:schema (s/keys :req-un [::total])}} :get {:summary "plus with query-params"