by coffexx · 6y ago · 0 comments
Validation of this data was essential, the crunching was complicated, and we wanted to be able to make assumptions about the data through the type system to make the code simpler.
We found JSONSchema validation was a perfect fit for this purpose (via ajv). In all the overhead of maintaining JSONSchema files was much lower than we thought it would be, and it even exposed some bugs in our internal APIs that we patched up at the same time.
I do wish there was a nice way to generate that sort of validation code directly from a TypeScript interface though.
No comments yet.