mirror of
https://github.com/metosin/reitit.git
synced 2026-01-30 09:40:35 +00:00
fix routes
This commit is contained in:
parent
35a08b80f3
commit
48509fefbd
1 changed files with 3 additions and 3 deletions
|
|
@ -80,8 +80,8 @@ Webjars also hosts a [version](https://github.com/webjars/swagger-ui) of the swa
|
||||||
(ring/ring-handler
|
(ring/ring-handler
|
||||||
(ring/router
|
(ring/router
|
||||||
[["/api"
|
[["/api"
|
||||||
["/ping" {:get (constantly "ping")}]
|
["/ping" {:get (constantly {:status 200, :body "ping"})}]
|
||||||
["/pong" {:post (constantly "pong")}]]
|
["/pong" {:post (constantly {:status 200, :body "pong"})}]]
|
||||||
["/swagger.json"
|
["/swagger.json"
|
||||||
{:get {:no-doc true
|
{:get {:no-doc true
|
||||||
:handler (swagger/create-swagger-handler)}}]])
|
:handler (swagger/create-swagger-handler)}}]])
|
||||||
|
|
@ -208,7 +208,7 @@ Example with:
|
||||||
(require '[reitit.swagger :as swagger])
|
(require '[reitit.swagger :as swagger])
|
||||||
|
|
||||||
(def ping-route
|
(def ping-route
|
||||||
["/ping" {:get (constantly "ping")}])
|
["/ping" {:get (constantly {:status 200, :body "ping"})}])
|
||||||
|
|
||||||
(def spec-route
|
(def spec-route
|
||||||
["/swagger.json"
|
["/swagger.json"
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue