mirror of
https://github.com/metosin/reitit.git
synced 2025-12-31 13:48:25 +00:00
test: document current openapi3 description behaviour
malli works weirdly, others don't
This commit is contained in:
parent
0b6ed62738
commit
2e8e9265d9
1 changed files with 13 additions and 1 deletions
|
|
@ -365,7 +365,7 @@
|
|||
|
||||
(deftest all-parameter-types-test
|
||||
(doseq [[coercion ->schema]
|
||||
[[#'malli/coercion (fn [nom] [:map [nom :string]])]
|
||||
[[#'malli/coercion (fn [nom] [:map {:description (str "description " nom)} [nom :string]])]
|
||||
[#'schema/coercion (fn [nom] {nom s/Str})]
|
||||
[#'spec/coercion (fn [nom] {nom string?})]]]
|
||||
(testing coercion
|
||||
|
|
@ -395,18 +395,30 @@
|
|||
(is (match? [{:in "query"
|
||||
:name "q"
|
||||
:required true
|
||||
:description (if (= #'malli/coercion coercion)
|
||||
"description :q"
|
||||
"")
|
||||
:schema {:type "string"}}
|
||||
{:in "header"
|
||||
:name "h"
|
||||
:required true
|
||||
:description (if (= #'malli/coercion coercion)
|
||||
"description :h"
|
||||
"")
|
||||
:schema {:type "string"}}
|
||||
{:in "cookie"
|
||||
:name "c"
|
||||
:required true
|
||||
:description (if (= #'malli/coercion coercion)
|
||||
"description :c"
|
||||
"")
|
||||
:schema {:type "string"}}
|
||||
{:in "path"
|
||||
:name "p"
|
||||
:required true
|
||||
:description (if (= #'malli/coercion coercion)
|
||||
"description :p"
|
||||
"")
|
||||
:schema {:type "string"}}]
|
||||
(-> spec
|
||||
(get-in [:paths "/parameters" :post :parameters])
|
||||
|
|
|
|||
Loading…
Reference in a new issue