illuminate/json-schema
Official Laravel JSON Schema component for defining and validating structured JSON data with a fluent, framework-native API. Part of the Illuminate suite, it offers a clean, expressive way to describe schemas and ensure payloads conform, making it ideal for APIs, configuration, and more in Laravel a...
Validator::extend code owned by one team.$ref, allOf/anyOf, format, additionalProperties). Adopting the first-party Illuminate implementation removes that from the backlog at zero license cost.isset() checks, and ad-hoc DTO hydration. A JSON Schema layer gives PM a defensible "one validation vocabulary" story that spans PHP services and non-PHP consumers (frontends, data pipelines, third-party partners).Adopt when:
Look elsewhere when:
opis/json-schema or swaggest/php-json-schema and keep the coupling explicit.laravel/framework, not to this component, and 0 dependents means there is little public evidence of standalone adoption. Treat both as context, not as validation of this package specifically. Budget for your own spike rather than assuming community-tested behavior.For executives (one paragraph): We can enforce API, webhook, and tenant-configuration payload contracts using a component that already ships with our framework — no new vendor, no license fee, no procurement. It replaces hand-written validation code that only one team understands with a declarative, industry-standard schema that partners and non-PHP services can read. The cost is a short integration spike; the return is fewer malformed-payload incidents and faster onboarding of integrations.
For engineering: This is an Illuminate component, versioned and released with the framework you already run, MIT-licensed, maintained by the Laravel core team. No new dependency graph, no extra supply-chain surface, no separate upgrade treadmill. Adopt it behind a thin internal interface — a single PayloadValidator boundary — so if draft coverage or throughput ever falls short, we swap the implementation without touching call sites. That interface is the actual deliverable; the package is the first implementation.
Framing the risk honestly: The star count reflects the framework monorepo and public dependents are near zero, so we should not treat this as a battle-tested standalone library. Mitigate with a two-day spike that exercises our real contracts — nested $ref, oneOf, format handling, and error message quality — plus a fallback plan to a dedicated JSON Schema library if coverage disappoints. Low cost to try, bounded cost to reverse.
How can I help you explore Laravel packages today?