Fork me on GitHub

Hi, I get my feet wet in malli for the first time. I watched a couple of videos, I read some articules and scrolled the malli readme, and I;m still a bit confused about transformers. I'm trying to create a bigdec? pred and transformator for it, so for given data structure I could coerce selected values from string and number to bigdec. I looked for some examples on the internet. There are some examples of using pre-defined transformers but no examples of custom transformers. I mean, I haven't checked the code of Malli, I guess, that is the ultimate source of info. Questions I'm trying to answer now: • what are the guidelines for writing transformers? • how to define custom predictor (in similar fashion to string?)? • how to marry a custom predictor with a custom transformer (so when coercing a data structure, the transformer can detect properties to coerce for my custom predictor) Any hints, links, would be very helpful. Thank you 🙇


has a custom type, with a custom transformer, generator, json-schema mapping & humanized error dedinition

👍 2

I had to miss this part. Thank you


I used to use Clojure Spec before, but I have never used Plumatic Schema before. I know it might sound ridiculously silly, but I haven't matched in my couscous mind the word 'schema' with a data shape definition. I mean, it makes total sense now, just I so get used to the word 'spec'. I don't know how I was watching this videos and reading these posts without that basic vocabulary understanding 😅