Skip to content

jeffreyvanhees/scramble-model-states

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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
    ],
];

About

Add Spatie's Model States package support for Scramble

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages