mirror of
https://github.com/metosin/reitit.git
synced 2025-12-17 00:11:11 +00:00
excessive nesting
This commit is contained in:
parent
05fbaa1110
commit
f0c5698a89
1 changed files with 26 additions and 26 deletions
|
|
@ -13,37 +13,37 @@
|
||||||
(def app
|
(def app
|
||||||
(ring/ring-handler
|
(ring/ring-handler
|
||||||
(ring/router
|
(ring/router
|
||||||
[["/api"
|
["/api"
|
||||||
{:swagger {:id ::math}}
|
{:swagger {:id ::math}}
|
||||||
|
|
||||||
["/swagger.json"
|
["/swagger.json"
|
||||||
{:get {:no-doc true
|
{:get {:no-doc true
|
||||||
:swagger {:info {:title "my-api"}}
|
:swagger {:info {:title "my-api"}}
|
||||||
:handler (swagger/create-swagger-handler)}}]
|
:handler (swagger/create-swagger-handler)}}]
|
||||||
|
|
||||||
["/spec"
|
["/spec"
|
||||||
{:coercion spec/coercion
|
{:coercion spec/coercion
|
||||||
:swagger {:tags ["spec"]}}
|
:swagger {:tags ["spec"]}}
|
||||||
|
|
||||||
["/plus"
|
["/plus"
|
||||||
{:get {:summary "plus with spec"
|
{:get {:summary "plus with spec"
|
||||||
:parameters {:query {:x int?, :y int?}}
|
:parameters {:query {:x int?, :y int?}}
|
||||||
:responses {200 {:body {:total int?}}}
|
:responses {200 {:body {:total int?}}}
|
||||||
:handler (fn [{{{:keys [x y]} :query} :parameters}]
|
:handler (fn [{{{:keys [x y]} :query} :parameters}]
|
||||||
{:status 200
|
{:status 200
|
||||||
:body {:total (+ x y)}})}}]]
|
:body {:total (+ x y)}})}}]]
|
||||||
|
|
||||||
["/schema"
|
["/schema"
|
||||||
{:coercion schema/coercion
|
{:coercion schema/coercion
|
||||||
:swagger {:tags ["schema"]}}
|
:swagger {:tags ["schema"]}}
|
||||||
|
|
||||||
["/plus"
|
["/plus"
|
||||||
{:get {:summary "plus with schema"
|
{:get {:summary "plus with schema"
|
||||||
:parameters {:query {:x Int, :y Int}}
|
:parameters {:query {:x Int, :y Int}}
|
||||||
:responses {200 {:body {:total Int}}}
|
:responses {200 {:body {:total Int}}}
|
||||||
:handler (fn [{{{:keys [x y]} :query} :parameters}]
|
:handler (fn [{{{:keys [x y]} :query} :parameters}]
|
||||||
{:status 200
|
{:status 200
|
||||||
:body {:total (+ x y)}})}}]]]]
|
:body {:total (+ x y)}})}}]]]
|
||||||
|
|
||||||
{:data {:middleware [ring.middleware.params/wrap-params
|
{:data {:middleware [ring.middleware.params/wrap-params
|
||||||
muuntaja.middleware/wrap-format
|
muuntaja.middleware/wrap-format
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue