metosin/malli

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

Open

#273 aperta il 7 ott 2020

Vedi su GitHub
 (3 commenti) (0 reazioni) (0 assegnatari)Clojure (237 fork)batch import
enhancementhelp wanted

Metriche repository

Star
 (1724 star)
Metriche merge PR
 (Nessuna PR mergiata in 30 g)

Descrizione

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!

Guida contributor