Live data from Hacker News

Validation, Docs, tests, and database schemas from one source of truth

github.com

1–6 of 6 posts

Re: Validation, Docs, tests, and database schemas from one source of truth

#6
post #5

Aren’t the generated tests superfluous since they just test whether the framework implements validation correctly? This should already be tested at the framework level and add no value?

Sort of, but the benefit is more along the lines of regression testing to make sure when things change they don't break. Also it does random fuzzing which can generate weird, edge-case inputs, like bizarre Unicode strings or extremely large numbers. These might technically pass declared schema validation but end up breaking your actual handler or database implementation.