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"
|
{:get {:summary "plus"
|
||||||
:parameters {:query {:x int?, :y int?}
|
:parameters {:query {:x int?, :y int?}
|
||||||
:path {:z int?}}
|
:path {:z int?}}
|
||||||
|
:swagger {:responses {400 {:schema {:type "string"}
|
||||||
|
:description "kosh"}}}
|
||||||
:responses {200 {:body {:total int?}}
|
:responses {200 {:body {:total int?}}
|
||||||
500 {:description "fail"}}
|
500 {:description "fail"}}
|
||||||
:handler (fn [{{{:keys [x y]} :query
|
:handler (fn [{{{:keys [x y]} :query
|
||||||
|
|
@ -34,6 +36,8 @@
|
||||||
{:get {:summary "plus"
|
{:get {:summary "plus"
|
||||||
:parameters {:query {:x Int, :y Int}
|
:parameters {:query {:x Int, :y Int}
|
||||||
:path {:z Int}}
|
:path {:z Int}}
|
||||||
|
:swagger {:responses {400 {:schema {:type "string"}
|
||||||
|
:description "kosh"}}}
|
||||||
:responses {200 {:body {:total Int}}
|
:responses {200 {:body {:total Int}}
|
||||||
500 {:description "fail"}}
|
500 {:description "fail"}}
|
||||||
:handler (fn [{{{:keys [x y]} :query
|
:handler (fn [{{{:keys [x y]} :query
|
||||||
|
|
@ -90,6 +94,8 @@
|
||||||
:type "integer"}}
|
:type "integer"}}
|
||||||
:required ["total"]
|
:required ["total"]
|
||||||
:type "object"}}
|
:type "object"}}
|
||||||
|
400 {:schema {:type "string"}
|
||||||
|
:description "kosh"}
|
||||||
500 {:description "fail"}}
|
500 {:description "fail"}}
|
||||||
:summary "plus"}}
|
:summary "plus"}}
|
||||||
"/api/spec/plus/{z}" {:get {:parameters [{:description ""
|
"/api/spec/plus/{z}" {:get {:parameters [{:description ""
|
||||||
|
|
@ -115,6 +121,8 @@
|
||||||
:type "integer"}}
|
:type "integer"}}
|
||||||
:required ["total"]
|
:required ["total"]
|
||||||
:type "object"}}
|
:type "object"}}
|
||||||
|
400 {:schema {:type "string"}
|
||||||
|
:description "kosh"}
|
||||||
500 {:description "fail"}}
|
500 {:description "fail"}}
|
||||||
:summary "plus"}}}}
|
:summary "plus"}}}}
|
||||||
spec)))))
|
spec)))))
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue