sixlive/laravel-json-schema-assertions
Validate JSON responses and payloads against JSON Schema definitions in your Laravel tests. Adds expressive assertions like assertJsonSchema so you can verify API structure and contracts with minimal setup.
Adopt when:
Look elsewhere when:
To executives: This is a small, test-only dependency that makes API contracts verifiable rather than aspirational. The v4.4.0 release is maintenance work — PHPUnit deprecation fixes and confirmed Laravel 12 compatibility — with no breaking changes. That combination is the signal we want: the package is actively maintained and keeps pace with the framework, so adopting it does not create an upgrade liability. Cost is minimal, benefit is catching unintended payload changes before customers do.
To engineering: Use it to replace ad-hoc assertJsonStructure-style checks where the contract matters. Schemas live as reviewable files, so changes to response shape show up as schema diffs in code review — a much better conversation than a silently passing test. The new release removes PHPUnit deprecation noise and certifies Laravel 12 support, so it slots into the upgrade path cleanly. Recommend adopting incrementally: start with the highest-traffic or partner-facing endpoints, and keep schemas in version control alongside the API code. No action required beyond bumping the dev dependency; there are no migration steps.
How can I help you explore Laravel packages today?