                  :responses {200 {:body {:total int?}}}
                  :handler (fn [{{{:keys [x y]} :body} :parameters}]
                             {:status 200
-                             :body {:total (+ x y)}})}}]]
-
-       ["/schema"
-        {:coercion schema/coercion
-         :swagger {:tags ["schema"]}}
-
-        ["/plus"
-         {:get {:summary "plus with schema query parameters"
-                :parameters {:query {:x Int, :y Int}}
-                :responses {200 {:body {:total Int}}}
-                :handler (fn [{{{:keys [x y]} :query} :parameters}]
-                           {:status 200
-                            :body {:total (+ x y)}})}
-          :post {:summary "plus with schema body parameters"
-                 :parameters {:body {:x Int, :y Int}}
-                 :responses {200 {:body {:total Int}}}
-                 :handler (fn [{{{:keys [x y]} :body} :parameters}]
-                            {:status 200
                              :body {:total (+ x y)}})}}]]]
 
-      {:data {:muuntaja m/instance
-              :middleware [ring.middleware.params/wrap-params
-                           muuntaja/format-middleware
-                           swagger/swagger-feature
-                           rrc/coerce-exceptions-middleware
-                           rrc/coerce-request-middleware
-                           rrc/coerce-response-middleware]}})
+      {:data {:coercion reitit.coercion.spec/coercion
+              :muuntaja m/instance
+              :middleware [;; query-params & form-params
+                           params/wrap-params
+                           ;; content-negotiation
+                           muuntaja/format-negotiate-middleware
+                           ;; encoding response body
+                           muuntaja/format-response-middleware
+                           ;; exception handling
+                           exception/exception-middleware
+                           ;; decoding request body
+                           muuntaja/format-request-middleware
+                           ;; coercing response bodys
+                           coercion/coerce-response-middleware
+                           ;; coercing request parameters
+                           coercion/coerce-request-middleware]}})
     (ring/routes
-      (swagger-ui/create-swagger-ui-handler
-        {:path "/", :url "/api/swagger.json"})
+      (swagger-ui/create-swagger-ui-handler {:path "/"})
       (ring/create-default-handler))))
 
 (defn start []

  (:require [reitit.ring :as ring]
            [reitit.swagger :as swagger]
            [reitit.swagger-ui :as swagger-ui]
            [reitit.ring.coercion :as rrc]
            [reitit.coercion.spec :as spec]
            [reitit.coercion.schema :as schema]
            [reitit.ring.middleware.muuntaja :as muuntaja]

            [schema.core :refer [Int]]

            [ring.adapter.jetty :as jetty]
            [ring.middleware.params]
            [muuntaja.core :as m]))

(def app
  (ring/ring-handler
    (ring/router
      [["/swagger.json"
        {:get {:no-doc true
               :swagger {:info {:title "my-api"}}
               :handler (swagger/create-swagger-handler)}}]

       ["/math"
        {:swagger {:tags ["math"]}}

        ["/plus"
         {:get {:summary "plus with spec query parameters"
