metosin/malli

Custom key mapping function for `malli.json-schema/transform`?

Open

#273 geöffnet am 7. Okt. 2020

Auf GitHub ansehen
 (3 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)Clojure (237 Forks)batch import
enhancementhelp wanted

Repository-Metriken

Stars
 (1.724 Stars)
PR-Merge-Metriken
 (Keine gemergten PRs in 30 T)

Beschreibung

Hi! I've just picked up Malli for a project, and I was wondering if there is a way to use a custom key-fn (as in clojure.data.json or Jsonista's mappers) when converting to JSON Schema. My spec has namespaced keys, and the namespaces are dropped in the exported JSON Schema. For a bit of context, I'm working with Kafka streams, and will be feeding some of the topics to Elasticsearch. I would like to use their specified naming conventions when sending the data there (along with the corresponding schema). I can easily get the data as I need it this via a custom serde, but I'd rather not have to process the exported JSON schema, too.

Thanks for any pointers you can provide, and for this awesome library!

Contributor Guide