From 45f9f0f21eee67a564e3542e4450de5995d2a437 Mon Sep 17 00:00:00 2001 From: Joel Kaasinen Date: Wed, 17 May 2023 16:06:29 +0300 Subject: [PATCH 1/3] deps: upgrade schema-tools --- project.clj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project.clj b/project.clj index 32dc7a58..a3328b09 100644 --- a/project.clj +++ b/project.clj @@ -87,7 +87,7 @@ [org.clojure/clojurescript "1.10.773"] ;; modules dependencies - [metosin/schema-tools "0.13.0"] + [metosin/schema-tools "0.13.1"] [metosin/spec-tools "0.10.5"] [metosin/muuntaja "0.6.8"] [metosin/sieppari "0.0.0-alpha13"] From 1983a4bb64c55637a3419a8b54de70b8e2073da7 Mon Sep 17 00:00:00 2001 From: Joel Kaasinen Date: Tue, 16 May 2023 18:00:50 +0300 Subject: [PATCH 2/3] test: openapi parameter descriptions via schema --- test/cljc/reitit/openapi_test.clj | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/test/cljc/reitit/openapi_test.clj b/test/cljc/reitit/openapi_test.clj index 165cc91d..a2d4c284 100644 --- a/test/cljc/reitit/openapi_test.clj +++ b/test/cljc/reitit/openapi_test.clj @@ -366,7 +366,8 @@ (deftest all-parameter-types-test (doseq [[coercion ->schema] [[#'malli/coercion (fn [nom] [:map [nom [:string {:description (str "description " nom)}]]])] - [#'schema/coercion (fn [nom] {nom s/Str})] + [#'schema/coercion (fn [nom] {nom (schema-tools.core/schema s/Str + {:description (str "description " nom)})})] [#'spec/coercion (fn [nom] {nom (st/spec {:spec string? :description (str "description " nom)})})]]] (testing coercion @@ -396,30 +397,22 @@ (is (match? [{:in "query" :name "q" :required true - :description (if (not= #'schema/coercion coercion) - "description :q" - "") + :description "description :q" :schema {:type "string"}} {:in "header" :name "h" :required true - :description (if (not= #'schema/coercion coercion) - "description :h" - "") + :description "description :h" :schema {:type "string"}} {:in "cookie" :name "c" :required true - :description (if (not= #'schema/coercion coercion) - "description :c" - "") + :description "description :c" :schema {:type "string"}} {:in "path" :name "p" :required true - :description (if (not= #'schema/coercion coercion) - "description :p" - "") + :description "description :p" :schema {:type "string"}}] (-> spec (get-in [:paths "/parameters" :post :parameters]) From 86af5d87243925b54779f56e6b2fd9af5f7b897e Mon Sep 17 00:00:00 2001 From: Joel Kaasinen Date: Wed, 17 May 2023 16:09:27 +0300 Subject: [PATCH 3/3] doc: CHANGELOG.md --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 234d5f3d..2ef4292b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,10 @@ We use [Break Versioning][breakver]. The version numbers follow a `.