dutchcodingcompany/laravel-json-schema
Adds a service provider for json schemas
2,348
| Install | |
|---|---|
composer require dutchcodingcompany/laravel-json-schema |
|
| Latest Version: | 3.1.0 |
| PHP: | ^8.2 |
| License: | MIT |
| Last Updated: | Jun 22, 2026 |
| Links: | GitHub · Packagist |
Maintainer: dododedodonl
Json Schema
This package makes it easy to use swaggest/json-schema in laravel.
Installation
You can install the package via composer:
composer require dutchcodingcompany/laravel-json-schema
Usage
- Create a json schema in the schema directory, eg.
storage/app/schema/example.json - Reference the schema in the validator using one of the rules:
new \DutchCodingCompany\LaravelJsonSchema\Rules\JsonSchemaRule('example')new \DutchCodingCompany\LaravelJsonSchema\Rules\JsonSchemaAttributeRule('type', TypeEnum::class)(be careful to validate the attributetypein this case)
To customize the schema directory, use environment variable JSON_SCHEMA_DIRECTORY or publish the config file.
License
The MIT License (MIT). Please see License File for more information.
Related Packages
dvrtech/schema-tools
Laravel package for JSON/CSV schema analysis and database structure generation
9,902
0
mojopollo/laravel-json-schema
Create all your migrations and models from one JSON schema file. Laravel Databas...
546
113
Version History
| Version | Released | PHP | Laravel | License |
|---|---|---|---|---|
| 3.1.0 | ^8.2 | ^11.0 | | MIT | |
| 3.0.2 | ^8.2 | ^11.0 | | MIT | |
| 3.0.1 | ^8.2 | ^11.0 | | MIT | |
| 3.0.0 | ^8.2 | ^11.0 | | MIT | |
| 2.2.3 | ^8.2 | ^11.0 | | MIT | |
| 2.2.2 | ^8.2 | ^11.0 | | MIT | |
| 2.2.1 | ^8.2 | ^11.0 | | MIT | |
| 2.2.0 | ^8.2 | ^11.0 | | MIT | |
| 2.1.0 | ^8.2 | ^11.0 | | MIT | |
| 2.0.0 | ^8.2 | ^11.0 | | MIT | |
| 1.0.0 | ^8.0 | ^10.0 | | MIT | |
| 0.4.1 | ^7.4 | | ^6.0 | | MIT | |
| 0.3.0 | ^7.4 | | ^6.0 | | MIT | |
| 0.2.0 | ^7.4 | | ^6.0 | | MIT | |
| 0.1.1 | ^7.4 | | ^6.0 | | MIT | |
| 0.1.0 | ^7.4 | ^6.0 | MIT |