mirror of
https://github.com/metosin/reitit.git
synced 2025-12-19 09:21:10 +00:00
demo normal swagger-responses
This commit is contained in:
parent
18bd2e684f
commit
1993dee5f2
1 changed files with 10 additions and 2 deletions
|
|
@ -23,6 +23,8 @@
|
|||
{:get {:summary "plus"
|
||||
:parameters {:query {:x int?, :y int?}
|
||||
:path {:z int?}}
|
||||
:swagger {:responses {400 {:schema {:type "string"}
|
||||
:description "kosh"}}}
|
||||
:responses {200 {:body {:total int?}}
|
||||
500 {:description "fail"}}
|
||||
:handler (fn [{{{:keys [x y]} :query
|
||||
|
|
@ -34,6 +36,8 @@
|
|||
{:get {:summary "plus"
|
||||
:parameters {:query {:x Int, :y Int}
|
||||
:path {:z Int}}
|
||||
:swagger {:responses {400 {:schema {:type "string"}
|
||||
:description "kosh"}}}
|
||||
:responses {200 {:body {:total Int}}
|
||||
500 {:description "fail"}}
|
||||
:handler (fn [{{{:keys [x y]} :query
|
||||
|
|
@ -90,6 +94,8 @@
|
|||
:type "integer"}}
|
||||
:required ["total"]
|
||||
:type "object"}}
|
||||
400 {:schema {:type "string"}
|
||||
:description "kosh"}
|
||||
500 {:description "fail"}}
|
||||
:summary "plus"}}
|
||||
"/api/spec/plus/{z}" {:get {:parameters [{:description ""
|
||||
|
|
@ -115,6 +121,8 @@
|
|||
:type "integer"}}
|
||||
:required ["total"]
|
||||
:type "object"}}
|
||||
400 {:schema {:type "string"}
|
||||
:description "kosh"}
|
||||
500 {:description "fail"}}
|
||||
:summary "plus"}}}}
|
||||
spec)))))
|
||||
|
|
|
|||
Loading…
Reference in a new issue