Skip to content

Latest commit

 

History

History
23 lines (15 loc) · 1 KB

README.md

File metadata and controls

23 lines (15 loc) · 1 KB

Json Schema

Latest Version on Packagist Total Downloads

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

  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 for more information.