From 40f947fc9f5abc3986fd020f813d8a558d0a2b02 Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Wed, 5 Jun 2024 13:14:36 +0200 Subject: [PATCH] :bug: Fix issue with schema uri decoder --- common/src/app/common/schema.cljc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/common/src/app/common/schema.cljc b/common/src/app/common/schema.cljc index 621bd8ec52..322a3dd5fc 100644 --- a/common/src/app/common/schema.cljc +++ b/common/src/app/common/schema.cljc @@ -844,7 +844,11 @@ :gen/gen (sg/uri) ::oapi/type "string" ::oapi/format "uri" - ::oapi/decode (comp u/uri str/trim)}}) + ::oapi/decode + (fn [val] + (if (u/uri? val) + val + (-> val str/trim u/uri)))}}) (register! ::text {:type :string