ButtondownFrom the builder
Turning our OpenAPI schema into a bug finder
Buttondown describes testing its REST API with Schemathesis, a property-based tool that reads the OpenAPI document generated by Django Ninja, builds requests and checks responses, starting from one rule that client input must never cause a 500. Generated cases surfaced bugs that example tests missed, such as a malformed date in the year 0422 reaching Postgres and metadata containing null bytes or integers beyond 64-bit range. The team responded by tightening field validation and documenting error responses as part of the API contract.
Example-based tests show that an endpoint handles the scenarios we know to test. Schemathesis probes the scenarios we did not think to write down.
Saved . A shortened excerpt from the official blog; the original publisher retains authorship.