Summer Sale! All accounts are 50% off this week.

devSSI's avatar

devSSI started a new conversation+100 XP

2w ago

Laravel package for api contracts

One thing that always worried me when working, especially on APIs, was accidentally introducing breaking changes.

Sometimes, a renamed field, or a removed property, or even changing the type of the property can easily break client applications without anyone noticing until it's too late.

So I built the package, Laravel API Contracts. The package uses snapshot testing to capture the structure of your API responses. Every push automatically verifies that existing response contracts haven't been broken.

✅ Detects removed fields ✅ Detects type changes ✅ Allows additive changes without blocking your workflow ✅ Integrates with Git hooks to catch issues before they reach production

The snapshots are simple JSON files committed to your repository, making every API contract change visible in code reviews.

This is my first public open-source package, and I'd really appreciate any feedback or suggestions.

📦 https://packagist.org/packages/ssdev/laravel-api-contracts

devSSI's avatar

devSSI wrote a reply+100 XP

3mos ago