File tree Expand file tree Collapse file tree 3 files changed +24
-1
lines changed Expand file tree Collapse file tree 3 files changed +24
-1
lines changed Original file line number Diff line number Diff line change
1
+ ## 0.16.2 (11.9.2014)
2
+
3
+ - Fixed #47 : ` :middlewares ` broke route parameters
4
+
1
5
## 0.16.1 (11.9.2014)
2
6
3
7
- Compiled without AOT
Original file line number Diff line number Diff line change 1
- (defproject metosin /compojure-api " 0.16.1 "
1
+ (defproject metosin /compojure-api " 0.16.2 "
2
2
:description " Compojure Api"
3
3
:url " https://github.com/metosin/compojure-api"
4
4
:license {:name " Eclipse Public License"
Original file line number Diff line number Diff line change 478
478
:type " void" }]
479
479
:path " /user" }]})))
480
480
481
+ (fact " swagger-docs works with the :middlewares"
482
+ (defapi api
483
+ (swagger-docs )
484
+ (swaggered +name+
485
+ (GET* " /middleware" []
486
+ :query-params [x :- String]
487
+ :middlewares [(constant-middleware (ok 1 ))]
488
+ (ok 2 ))))
489
+
490
+ (fact " api-docs"
491
+ (let [[status body] (get* api (str " /api/api-docs/" +name+) {})]
492
+ status => 200
493
+ (-> body :apis first :operations first :parameters first) =>
494
+ {:description " "
495
+ :name " x"
496
+ :paramType " query"
497
+ :required true
498
+ :type " string" })))
499
+
481
500
(fact " sub-context paths"
482
501
(let [response {:ping " pong" }
483
502
ok (ok response)
You can’t perform that action at this time.
0 commit comments