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)