From 9e24c3b32348d35c58c1849ef565c3c929b60e41 Mon Sep 17 00:00:00 2001 From: Tommi Reiman Date: Fri, 5 Jan 2024 10:26:28 +0200 Subject: [PATCH] no .toSymbol in other platforms --- src/malli/json_schema.cljc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/malli/json_schema.cljc b/src/malli/json_schema.cljc index 75042d578..74fa08653 100644 --- a/src/malli/json_schema.cljc +++ b/src/malli/json_schema.cljc @@ -10,7 +10,8 @@ (defn -ref [schema {::keys [transform definitions] :as options}] (let [ref (as-> (m/-ref schema) $ - (cond (var? $) (str (.toSymbol $)) + (cond (var? $) (let [{:keys [ns name]} (meta $)] + (str (symbol (str ns) (str name)))) (qualified-ident? $) (str (namespace $) "/" (name $)) :else (str $)))] (when-not (contains? @definitions ref)