From 1334d733cd7588c7228d5a7c1af25ad67880931c Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Wed, 14 May 2025 17:30:15 +0200 Subject: [PATCH] :bug: Fix openapi json generation for :re schemas --- common/src/app/common/schema/openapi.cljc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/common/src/app/common/schema/openapi.cljc b/common/src/app/common/schema/openapi.cljc index f571408269..967e267043 100644 --- a/common/src/app/common/schema/openapi.cljc +++ b/common/src/app/common/schema/openapi.cljc @@ -97,7 +97,8 @@ (defmethod visit :enum [_ _ children options] (merge (some-> (m/-infer children) (transform* options)) {:enum children})) (defmethod visit :maybe [_ _ children _] {:oneOf (conj children {:type "null"})}) (defmethod visit :tuple [_ _ children _] {:type "array", :items children, :additionalItems false}) -(defmethod visit :re [_ schema _ options] {:type "string", :pattern (first (m/children schema options))}) +(defmethod visit :re [_ schema _ options] + {:type "string", :pattern (str (first (m/children schema options)))}) (defmethod visit :nil [_ _ _ _] {:type "null"}) (defmethod visit :string [_ schema _ _]