mirror of
https://github.com/metosin/reitit.git
synced 2025-12-17 08:21:11 +00:00
Update server.clj
This commit is contained in:
parent
076f1327b4
commit
96c2764de6
1 changed files with 2 additions and 2 deletions
|
|
@ -55,13 +55,13 @@
|
||||||
{:swagger {:tags ["math"]}}
|
{:swagger {:tags ["math"]}}
|
||||||
|
|
||||||
["/plus"
|
["/plus"
|
||||||
{:get {:summary "plus with spec query parameters"
|
{:get {:summary "plus with malli query parameters"
|
||||||
:parameters {:query [:map [:x int?] [:y int?]]}
|
:parameters {:query [:map [:x int?] [:y int?]]}
|
||||||
:responses {200 {:body [:map [:total int?]]}}
|
:responses {200 {:body [:map [: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)}})}
|
||||||
:post {:summary "plus with spec body parameters"
|
:post {:summary "plus with malli body parameters"
|
||||||
:parameters {:body [:map [:x int?] [:y int?]]}
|
:parameters {:body [:map [:x int?] [:y int?]]}
|
||||||
:responses {200 {:body [:map [:total int?]]}}
|
:responses {200 {:body [:map [:total int?]]}}
|
||||||
:handler (fn [{{{:keys [x y]} :body} :parameters}]
|
:handler (fn [{{{:keys [x y]} :body} :parameters}]
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue