Skip to content

Latest commit

 

History

History
26 lines (16 loc) · 960 Bytes

README.md

File metadata and controls

26 lines (16 loc) · 960 Bytes

Spatie Model States support for Scramble (Laravel OpenAPI (Swagger) Documentation Generator)

This package adds support for laravel-model-states to dedoc/scramble by providing an extension. After installing the extension, all possible states are added as possible values to the response body, like Scramble does with an enum.

Screenshot_2024-08-01_at_11 02 47

Screenshot_2024-08-01_at_11 02 20

Installation

Install the extention with composer via composer require jeffreyvanhees/scramble-model-states

Usage

Add the extenstion to config/scramble.php:

<?php

return [

    // ...

    'extensions' => [
       \JeffreyVanHees\ScrambleModelStates\ModelStateToSchema::class
    ],
];