6 ms·
Good to see people coming to the same conclusions we have had for a while using Clojure. There's an up and coming runtime data validation framework called Malli
by escherize 5y ago
Good to see people coming to the same conclusions we have had for a while using Clojure. There's an up and coming runtime data validation framework called Malli that I use for these sorts of files.
You can get many of the benefits but also run custom validations (dictate how two keys in a map relate to eachother, or force a be of a certain shape instead of just a string).
Here's the example from the script: [0]
[0] - https://malli.io/?value=%7B%20%3Alocale%20%22en-US%22%0A%20%20%3Atimezone%20%22America%2FNew_York%22%0A%20%20%3Alog-level%20%22info%22%0A%20%20%3Aenvironment%20%22local%22%7D&schema=%5B%3Amap%20%0A%20%5B%3Alocale%20string%3F%5D%0A%20%5B%3Atimezone%20string%3F%5D%0A%20%5B%3Alog-level%20%5B%3Aenum%20%22trace%22%20%22debug%22%20%22info%22%20%22warn%22%20%22error%22%20%22fatal%22%5D%5D%0A%20%5B%3Aenvironment%20%5B%3Aenum%20%22local%22%20%22dev%22%20%22staging%22%20%22production%22%5D%5D%5D https://malli.io/?value=%7B%20%3Alocale%20%22en-US%22%0A%20%...