mirror of
https://github.com/metosin/reitit.git
synced 2025-12-17 08:21:11 +00:00
test: openapi operationId, tags and deprecated
This commit is contained in:
parent
16145dbdce
commit
2cc6e33654
1 changed files with 11 additions and 1 deletions
|
|
@ -40,9 +40,12 @@
|
||||||
["/spec" {:coercion spec/coercion}
|
["/spec" {:coercion spec/coercion}
|
||||||
["/plus/:z"
|
["/plus/:z"
|
||||||
{:get {:summary "plus"
|
{:get {:summary "plus"
|
||||||
|
:tags [:plus :spec]
|
||||||
:parameters {:query {:x int?, :y int?}
|
:parameters {:query {:x int?, :y int?}
|
||||||
:path {:z int?}}
|
:path {:z int?}}
|
||||||
:openapi {:responses {400 {:description "kosh"
|
:openapi {:operationId "spec-plus"
|
||||||
|
:deprecated true
|
||||||
|
:responses {400 {:description "kosh"
|
||||||
:content {"application/json" {:schema {:type "string"}}}}}}
|
:content {"application/json" {:schema {:type "string"}}}}}}
|
||||||
:responses {200 {:description "success"
|
:responses {200 {:description "success"
|
||||||
:body {:total int?}}
|
:body {:total int?}}
|
||||||
|
|
@ -65,6 +68,7 @@
|
||||||
["/malli" {:coercion malli/coercion}
|
["/malli" {:coercion malli/coercion}
|
||||||
["/plus/*z"
|
["/plus/*z"
|
||||||
{:get {:summary "plus"
|
{:get {:summary "plus"
|
||||||
|
:tags [:plus :malli]
|
||||||
:parameters {:query [:map [:x int?] [:y int?]]
|
:parameters {:query [:map [:x int?] [:y int?]]
|
||||||
:path [:map [:z int?]]}
|
:path [:map [:z int?]]}
|
||||||
:openapi {:responses {400 {:description "kosh"
|
:openapi {:responses {400 {:description "kosh"
|
||||||
|
|
@ -90,6 +94,7 @@
|
||||||
["/schema" {:coercion schema/coercion}
|
["/schema" {:coercion schema/coercion}
|
||||||
["/plus/*z"
|
["/plus/*z"
|
||||||
{:get {:summary "plus"
|
{:get {:summary "plus"
|
||||||
|
:tags [:plus :schema]
|
||||||
:parameters {:query {:x s/Int, :y s/Int}
|
:parameters {:query {:x s/Int, :y s/Int}
|
||||||
:path {:z s/Int}}
|
:path {:z s/Int}}
|
||||||
:openapi {:responses {400 {:content {"application/json" {:schema {:type "string"}}}
|
:openapi {:responses {400 {:content {"application/json" {:schema {:type "string"}}}
|
||||||
|
|
@ -161,6 +166,9 @@
|
||||||
400 {:description "kosh"
|
400 {:description "kosh"
|
||||||
:content {"application/json" {:schema {:type "string"}}}}
|
:content {"application/json" {:schema {:type "string"}}}}
|
||||||
500 {:description "fail"}}
|
500 {:description "fail"}}
|
||||||
|
:operationId "spec-plus"
|
||||||
|
:deprecated true
|
||||||
|
:tags [:plus :spec]
|
||||||
:summary "plus"}
|
:summary "plus"}
|
||||||
:post {:parameters [{:in "path"
|
:post {:parameters [{:in "path"
|
||||||
:name "z"
|
:name "z"
|
||||||
|
|
@ -201,6 +209,7 @@
|
||||||
400 {:description "kosh"
|
400 {:description "kosh"
|
||||||
:content {"application/json" {:schema {:type "string"}}}}
|
:content {"application/json" {:schema {:type "string"}}}}
|
||||||
500 {:description "fail"}}
|
500 {:description "fail"}}
|
||||||
|
:tags [:plus :malli]
|
||||||
:summary "plus"}
|
:summary "plus"}
|
||||||
:post {:parameters [{:in "path"
|
:post {:parameters [{:in "path"
|
||||||
:name :z
|
:name :z
|
||||||
|
|
@ -245,6 +254,7 @@
|
||||||
400 {:description "kosh"
|
400 {:description "kosh"
|
||||||
:content {"application/json" {:schema {:type "string"}}}}
|
:content {"application/json" {:schema {:type "string"}}}}
|
||||||
500 {:description "fail"}}
|
500 {:description "fail"}}
|
||||||
|
:tags [:plus :schema]
|
||||||
:summary "plus"}
|
:summary "plus"}
|
||||||
:post {:parameters [{:in "path"
|
:post {:parameters [{:in "path"
|
||||||
:name "z"
|
:name "z"
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue