diff --git a/examples/ring-malli-lite-swagger/src/example/server.clj b/examples/ring-malli-lite-swagger/src/example/server.clj index bc9c3861..09e632b1 100644 --- a/examples/ring-malli-lite-swagger/src/example/server.clj +++ b/examples/ring-malli-lite-swagger/src/example/server.clj @@ -34,8 +34,8 @@ ["/upload" {:post {:summary "upload a file" - :parameters {:multipart [:map [:file reitit.ring.malli/temp-file-part]]} - :responses {200 {:body [:map [:name string?] [:size int?]]}} + :parameters {:multipart {:file reitit.ring.malli/temp-file-part}} + :responses {200 {:body {:name :string, :size :int}}} :handler (fn [{{{:keys [file]} :multipart} :parameters}] {:status 200 :body {:name (:filename file) @@ -56,26 +56,20 @@ ["/plus" {:get {:summary "plus with malli query parameters" - :parameters {:query [:map - [:x - {:title "X parameter" - :description "Description for X parameter" - :json-schema/default 42} - int?] - [:y int?]]} - :responses {200 {:body [:map [:total int?]]}} + :parameters {:query {:x [:int {:title "X parameter" + :description "Description for X parameter" + :json-schema/default 42}] + :y :int}} + :responses {200 {:body {:total :int}}} :handler (fn [{{{:keys [x y]} :query} :parameters}] {:status 200 :body {:total (+ x y)}})} :post {:summary "plus with malli body parameters" - :parameters {:body [:map - [:x - {:title "X parameter" - :description "Description for X parameter" - :json-schema/default 42} - int?] - [:y int?]]} - :responses {200 {:body [:map [:total int?]]}} + :parameters {:body {:x [:int {:title "X parameter" + :description "Description for X parameter" + :json-schema/default 42}] + :y :int}} + :responses {200 {:body {:total :int}}} :handler (fn [{{{:keys [x y]} :body} :parameters}] {:status 200 :body {:total (+ x y)}})}}]]]