 
         ["/upload"
          {:post {:summary "upload a file"
-                 :parameters {:multipart {:file multipart/temp-file-part}}
-                 :responses {200 {:body {:name string?, :size int?}}}
+                 :parameters {:multipart ::file-params}
+                 :responses {200 {:body ::file-response}}
                  :handler (fn [{{{:keys [file]} :multipart} :parameters}]
                             {:status 200
                              :body {:name (:filename file)

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

(def app
  (ring/ring-handler


        ["/plus"
         {:get {:summary "plus with spec query parameters"
                :parameters {:query ::math-request}
                :responses {200 {:body ::math-response}}
                :handler (fn [{{{:keys [x y]} :query} :parameters}]
                           {:status 200
                            :body {:total (+ x y)}})}
          :post {:summary "plus with spec body parameters"
                 :parameters {:body ::math-request}
                 :responses {200 {:body ::math-response}}
                 :handler (fn [{{{:keys [x y]} :body} :parameters}]
                            {:status 200
                             :body {:total (+ x y)}})}}]]]
