justinrainbow/json-schema
Validate JSON documents against JSON Schema in PHP. Supports Draft-3, Draft-4, Draft-6 and Draft-7 (coverage varies). Install via Composer and use JsonSchema\Validator to validate data with local file $ref schemas and inspect validation errors.
composer require remains frictionless.Schema::validate()).Illuminate\Http\Request) remains viable.ValidationException adaptation remains necessary.MessageBag mapping still required.Http::fake() remain applicable.Illuminate\Validation\Validator still recommended.UPDATED QUESTIONS DUE TO RELEASE NOTES: 9. Test Suite Alignment:
json/intl still recommended.LONGTEXT still required.| Step | Task | Dependencies |
|---|---|---|
| 1 | Install package | Composer |
| 2 | Implement basic validator | justinrainbow/json-schema |
| 3 | NEW: Validate schemas against updated test suite | Updated test suite |
| 4 | Create service provider | Laravel service container |
| 5 | Integrate with Form Requests | Illuminate\Foundation\Http\FormRequest |
| 6 | Add caching (Redis) | Laravel cache config |
| 7 | Extend error handling | Laravel validation exceptions |
| 8 | Benchmark performance | Load testing tools (e.g., k6) |
| 9 | Document schema standards | Team documentation |
- name: Validate JSON Schemas
run: php artisan schema:test --suite=main
v1.0-test-suite-v2.json).justinrainbow/json-schema to 6.8.2 in composer.json to avoid test suite regressions.CHECK_MODE_COERCE_TYPES).X" due to stricter test suite rules.test_suite_version tag.MessageBag as before, but account for new error types.compliance_status field to the registry (e.g., ["api/v1/users" => ["schema" => "user_v1.json", "status" => "compliant"]]).additionalProperties: true if the test suite enforces strict property validation."How can I help you explore Laravel packages today?