Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dutchcodingcompany/laravel-json-schema
https://github.com/dutchcodingcompany/laravel-json-schema
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/dutchcodingcompany/laravel-json-schema
- Owner: DutchCodingCompany
- License: mit
- Created: 2021-09-07T11:48:48.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2024-08-15T13:44:16.000Z (4 months ago)
- Last Synced: 2024-09-15T15:51:24.229Z (3 months ago)
- Language: PHP
- Size: 17.6 KB
- Stars: 0
- Watchers: 5
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Json Schema
[![Latest Version on Packagist](https://img.shields.io/packagist/v/dutchcodingcompany/laravel-json-schema.svg?style=flat-square)](https://packagist.org/packages/dutchcodingcompany/laravel-json-schema)
[![Total Downloads](https://img.shields.io/packagist/dt/dutchcodingcompany/laravel-json-schema.svg?style=flat-square)](https://packagist.org/packages/dutchcodingcompany/laravel-json-schema)This package makes it easy to use `swaggest/json-schema` in laravel.
## Installation
You can install the package via composer:
```bash
composer require dutchcodingcompany/laravel-json-schema
```## Usage
1. Create a json schema in the schema directory, eg. `storage/app/schema/example.json`
2. Reference the schema in the validator: `new \DutchCodingCompany\LaravelJsonSchema\Rules\JsonSchemaRule('example')`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](LICENSE.md) for more information.