https://github.com/deniskorbakov/laravel-data-scribe
⚡️ A Scribe Plugin to generate API doc from spatie/laravel-data
https://github.com/deniskorbakov/laravel-data-scribe
laravel-data php plugins scribe
Last synced: 6 months ago
JSON representation
⚡️ A Scribe Plugin to generate API doc from spatie/laravel-data
- Host: GitHub
- URL: https://github.com/deniskorbakov/laravel-data-scribe
- Owner: deniskorbakov
- License: mit
- Created: 2025-08-02T08:15:08.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2025-11-21T15:43:02.000Z (7 months ago)
- Last Synced: 2025-11-27T14:51:54.108Z (7 months ago)
- Topics: laravel-data, php, plugins, scribe
- Language: PHP
- Homepage:
- Size: 99.6 KB
- Stars: 10
- Watchers: 1
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Laravel Data Scribe
[This package](https://packagist.org/packages/deniskorbakov/laravel-data-scribe) is intended for [scribe](https://github.com/knuckleswtf/scribe) business with [laravel-data](https://github.com/spatie/laravel-data)
By default, [scribe](https://github.com/knuckleswtf/scribe) cannot generate documentation from [laravel-data](https://github.com/spatie/laravel-data), so I propose solutions in the form of this package with plugins
| Scribe Support | Description | Plugin Name | Status |
|:------------------------------|:---------------------------------------|:--------------------:|:------:|
| ``Body Parameters`` | Generate Body Params from laravel-data | LaravelDataBodyParam | ✅ |
| ``Attr Body Parameters`` | Generate Body Params Attribute | LaravelDataBodyParam | ✅ |
| ``Responses`` | Generate Response from laravel-data | 🚫 | ❌ |
| ``Custom Validation`` | Support Custom Rules in laravel-data | 🚫 | ❌ |
>Attribute Body Parameters - attribute has higher priority than body param from properties
## 📝 Getting Started
Install the package via composer:
```shell
composer require deniskorbakov/laravel-data-scribe
```
Add the plugin in your `config/scribe.php` file to the very end of the array:
```php
'strategies' => [
'bodyParameters' => [
...Defaults::BODY_PARAMETERS_STRATEGIES,
DenisKorbakov\LaravelDataScribe\LaravelDataBodyParam::class,
],
],
```
Run the command to generate documentation:
```bash
php artisan scribe:generate
```
## ⚒️ Local Development
Clone this repository:
```bash
git clone https://github.com/deniskorbakov/laravel-data-scribe
```
Let's go to the cloned repository:
```bash
cd laravel-data-scribe
```
To start, initialize the project and use it:
```bash
make init
```
## 🧪 Testing
You can run the command for testing after the step with local installation
Run Lint and Analyze code(phpstan/rector/phpcs):
```bash
make lint
```
Run Unit tests:
```bash
make test
```
Run mutation tests:
```bash
make test-mutation
```
Run test coverage:
```bash
make test-coverage
```
## 🤝 Feedback
We appreciate your support and look forward to making our product even better with your help!
[@Denis Korbakov](https://github.com/deniskorbakov)
---
📝 Generated from [deniskorbakov/skeleton-php-docker](https://github.com/deniskorbakov/skeleton-php-docker)