malli icon indicating copy to clipboard operation
malli copied to clipboard

Support UUIDs as schema references

Open bobby opened this issue 3 years ago • 3 comments

In addition to schema references as strings and namespaced keywords, it would be very useful to refer to schemas via UUID.

bobby avatar Jul 16 '21 00:07 bobby

@ikitommi I'm happy to open a PR for this, but I'm not quite sure where to start. Could you point me to the places where refs are currently resolved/substituted for strings, namespaced keywords, etc.?

bobby avatar Aug 11 '21 20:08 bobby

There's a function malli.core/-reference? that is used to detect refs that should provide a good starting point.

(defn -reference? [?schema] (or (string? ?schema) (qualified-keyword? ?schema)))

This comment might also provide some insight with references: https://github.com/metosin/malli/issues/916#issuecomment-1738441294

tvaisanen avatar Sep 28 '23 18:09 tvaisanen