From 681c994f7fa970a7c9592fc6c01abc92500c4c85 Mon Sep 17 00:00:00 2001 From: Tommi Reiman Date: Tue, 26 May 2020 22:35:43 +0300 Subject: [PATCH] Test that middleware swagger injections work --- test/cljc/reitit/swagger_test.clj | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test/cljc/reitit/swagger_test.clj b/test/cljc/reitit/swagger_test.clj index 9b774bb7..a90296e9 100644 --- a/test/cljc/reitit/swagger_test.clj +++ b/test/cljc/reitit/swagger_test.clj @@ -27,6 +27,9 @@ ["/plus/:z" {:patch {:summary "patch" :handler (constantly {:status 200})} + :options {:summary "options" + :middleware [{:data {:swagger {:responses {200 {:description "200"}}}}}] + :handler (constantly {:status 200})} :get {:summary "plus" :parameters {:query {:x int?, :y int?} :path {:z int?}} @@ -125,6 +128,9 @@ :paths {"/api/spec/plus/{z}" {:patch {:parameters [] :summary "patch" :responses {:default {:description ""}}} + :options {:parameters [] + :summary "options" + :responses {200 {:description "200"}}} :get {:parameters [{:in "query" :name "x" :description ""