mirror of
https://github.com/metosin/reitit.git
synced 2026-02-02 10:40:34 +00:00
fix: malli openapi tests
malli.json-schema now outputs `:additionalProperties false`
This commit is contained in:
parent
0648296315
commit
f03134e215
1 changed files with 6 additions and 0 deletions
|
|
@ -175,6 +175,7 @@
|
||||||
:schema {:type "integer"}}]
|
:schema {:type "integer"}}]
|
||||||
:responses {200 {:content {"application/json" {:schema {:type "object"
|
:responses {200 {:content {"application/json" {:schema {:type "object"
|
||||||
:properties {:total {:type "integer"}}
|
:properties {:total {:type "integer"}}
|
||||||
|
:additionalProperties false
|
||||||
:required [:total]}}}}
|
:required [:total]}}}}
|
||||||
400 {:description "kosh"
|
400 {:description "kosh"
|
||||||
:content {"application/json" {:schema {:type "string"}}}}
|
:content {"application/json" {:schema {:type "string"}}}}
|
||||||
|
|
@ -189,6 +190,7 @@
|
||||||
{:type "null"}]}}}}
|
{:type "null"}]}}}}
|
||||||
:responses {200 {:content {"application/json" {:schema {:properties {:total {:type "integer"}}
|
:responses {200 {:content {"application/json" {:schema {:properties {:total {:type "integer"}}
|
||||||
:required [:total]
|
:required [:total]
|
||||||
|
:additionalProperties false
|
||||||
:type "object"}}}}
|
:type "object"}}}}
|
||||||
400 {:description "kosh"
|
400 {:description "kosh"
|
||||||
:content {"application/json" {:schema {:type "string"}}}}
|
:content {"application/json" {:schema {:type "string"}}}}
|
||||||
|
|
@ -361,6 +363,7 @@
|
||||||
"body parameter"
|
"body parameter"
|
||||||
(is (= {"application/json" {:schema {:type "object"
|
(is (= {"application/json" {:schema {:type "object"
|
||||||
:properties {:b {:type "string"}}
|
:properties {:b {:type "string"}}
|
||||||
|
:additionalProperties false
|
||||||
:required [:b]}}}
|
:required [:b]}}}
|
||||||
(-> spec
|
(-> spec
|
||||||
(get-in [:paths "/parameters" :post :requestBody :content])
|
(get-in [:paths "/parameters" :post :requestBody :content])
|
||||||
|
|
@ -369,6 +372,7 @@
|
||||||
"body response"
|
"body response"
|
||||||
(is (= {"application/json" {:schema {:type "object"
|
(is (= {"application/json" {:schema {:type "object"
|
||||||
:properties {:ok {:type "string"}}
|
:properties {:ok {:type "string"}}
|
||||||
|
:additionalProperties false
|
||||||
:required [:ok]}}}
|
:required [:ok]}}}
|
||||||
(-> spec
|
(-> spec
|
||||||
(get-in [:paths "/parameters" :post :responses 200 :content])
|
(get-in [:paths "/parameters" :post :responses 200 :content])
|
||||||
|
|
@ -423,6 +427,7 @@
|
||||||
"body parameter"
|
"body parameter"
|
||||||
(is (= {"application/json" {:schema {:type "object"
|
(is (= {"application/json" {:schema {:type "object"
|
||||||
:properties {:b {:type "string"}}
|
:properties {:b {:type "string"}}
|
||||||
|
:additionalProperties false
|
||||||
:required [:b]}}}
|
:required [:b]}}}
|
||||||
(-> spec
|
(-> spec
|
||||||
(get-in [:paths "/parameters" :post :requestBody :content])
|
(get-in [:paths "/parameters" :post :requestBody :content])
|
||||||
|
|
@ -431,6 +436,7 @@
|
||||||
"body response"
|
"body response"
|
||||||
(is (= {"application/json" {:schema {:type "object"
|
(is (= {"application/json" {:schema {:type "object"
|
||||||
:properties {:ok {:type "string"}}
|
:properties {:ok {:type "string"}}
|
||||||
|
:additionalProperties false
|
||||||
:required [:ok]}}}
|
:required [:ok]}}}
|
||||||
(-> spec
|
(-> spec
|
||||||
(get-in [:paths "/parameters" :post :responses 200 :content])
|
(get-in [:paths "/parameters" :post :responses 200 :content])
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue