PHPackages                             piovezanfernando/laravel-api-auto-docs - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. piovezanfernando/laravel-api-auto-docs

ActiveLibrary[API Development](/categories/api)

piovezanfernando/laravel-api-auto-docs
======================================

Automatically generate Laravel API documentation from request rules, controllers and routes

0.0.4(1mo ago)27MITPHPPHP ^8.3|^8.4CI passing

Since Dec 12Pushed 4mo agoCompare

[ Source](https://github.com/piovezanfernando/laravel-api-auto-docs)[ Packagist](https://packagist.org/packages/piovezanfernando/laravel-api-auto-docs)[ Docs](https://github.com/piovezanfernando/laravel-api-auto-docs)[ RSS](/packages/piovezanfernando-laravel-api-auto-docs/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)Dependencies (30)Versions (8)Used By (0)

Laravel API Auto Docs
=====================

[](#laravel-api-auto-docs)

 [![License MIT](https://camo.githubusercontent.com/8bb50fd2278f18fc326bf71f6e88ca8f884f72f179d3e555e20ed30157190d0d/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d677265656e2e737667)](https://camo.githubusercontent.com/8bb50fd2278f18fc326bf71f6e88ca8f884f72f179d3e555e20ed30157190d0d/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d677265656e2e737667) [![PHP 8.4+](https://camo.githubusercontent.com/ccd77ca67e6ec33919f8465c7be444313682e07547d55f3a747cccb4ebdb46ad/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d382e342532422d677265656e)](https://camo.githubusercontent.com/ccd77ca67e6ec33919f8465c7be444313682e07547d55f3a747cccb4ebdb46ad/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d382e342532422d677265656e)

 The Hassle-Free automatic API documentation generation for Laravel.
 A Swagger alternative with modern Vue 3 interface.
 Supports Open API 3.0.0

Features
--------

[](#features)

- ✨ Light and Dark mode
- 🚀 Automatic rules fetching from injected Request and by regexp
- 📋 Automatic routes fetching from Laravel Routes
- 📝 Support for Laravel logs
- 🗃️ Support for SQL query and query time analysis
- ⚡ Support for memory consumption
- 🔐 Support for Authorization Headers
- 🎯 Support for Eloquent events
- 🔄 Support for OpenAPI 3.0.0 exports
- 🎨 Modern Vue 3 interface

Requirements
------------

[](#requirements)

- PHP &gt;= 8.1
- Laravel &gt;= 11.0

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require piovezanfernando/laravel-api-auto-docs
```

Publish the config file:

```
php artisan vendor:publish --tag="api-auto-docs-config"
```

Configuration
-------------

[](#configuration)

The configuration file will be published to `config/api-auto-docs.php`. Here you can configure:

- Routes to document
- Middleware to apply
- UI customizations
- And more...

Usage
-----

[](#usage)

### Accessing the Documentation

[](#accessing-the-documentation)

By default, the documentation is available at:

```
http://your-app.test/docs-api

```

### Generating OpenAPI Specification

[](#generating-openapi-specification)

To generate the OpenAPI specification file:

```
php artisan api-docs:export
```

This will create an `api.json` file in your project's root directory by default. You can specify a different path:

```
php artisan api-docs:export storage/app/api.json
```

### Adding Descriptions to Controllers

[](#adding-descriptions-to-controllers)

The package automatically reads the summary and description from your controller methods' PHPDoc comments.

```
class UserController extends Controller
{
    /**
     * Create a new user.
     *
     * This endpoint allows you to create a new user in the system.
     * The user's name, email, and password are required.
     */
    public function store(CreateUserRequest $request)
    {
        // Your code here
    }
}
```

### Request Validation

[](#request-validation)

The package automatically reads Laravel FormRequest validation rules:

```
class CreateUserRequest extends FormRequest
{
    public function rules()
    {
        return [
            'name' => 'required|string|max:255',
            'email' => 'required|email|unique:users',
            'password' => 'required|string|min:8',
        ];
    }
}
```

Configuration Options
---------------------

[](#configuration-options)

### Exclude Routes

[](#exclude-routes)

In `config/api-auto-docs.php`:

```
'hide_matching' => [
    '#^api/internal#',
    '#^_debugbar#',
],
```

### Middleware

[](#middleware)

```
'middlewares' => [
    'web',
    'auth', // Add if you want authentication
],
```

### UI Customization

[](#ui-customization)

```
'title' => 'My API Documentation',
'default_headers' => [
    'Content-Type' => 'application/json',
    'Accept' => 'application/json',
],
```

Testing Your API
----------------

[](#testing-your-api)

The built-in UI allows you to:

- 📤 Send requests directly from the browser
- 📊 View SQL queries and memory usage
- 📋 See logs and debug information
- 💾 Export to OpenAPI format

Export Options
--------------

[](#export-options)

### OpenAPI 3.0

[](#openapi-30)

Access the OpenAPI specification:

```
http://your-app.test/docs-api/api?openapi=true

```

Download the JSON representation via:

```
http://your-app.test/docs-api/api?json=true

```

Security
--------

[](#security)

If you want to restrict access to the documentation:

```
// config/api-auto-docs.php
'middlewares' => [
    'web',
    'auth',
    'can:view-api-docs', // Custom gate
],
```

### Credits

[](#credits)

This package is based on the excellent work from
[Laravel Request Docs](https://github.com/rakutentech/laravel-request-docs) by Rakuten Tech.

All credit for the original idea and implementation goes to
Pulkit Kathuria and the Rakuten Tech engineering team.

This fork extends the original project with additional features, UI redesign, and ongoing maintenance, while preserving the MIT license.

Contributing
------------

[](#contributing)

Contributions are welcome! Please feel free to submit a Pull Request.

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

Support
-------

[](#support)

- **Issues**: [GitHub Issues](https://github.com/piovezanfernando/laravel-api-auto-docs/issues)
- **Original Project**: [Laravel Request Docs](https://github.com/rakutentech/laravel-request-docs)

Colaboradores
-------------

[](#colaboradores)

[ ![](https://camo.githubusercontent.com/599bd543174372d12d391b3134ceca94bab04bf55c2292f10152a67a42119718/68747470733a2f2f636f6e747269622e726f636b732f696d6167653f7265706f3d70696f76657a616e6665726e616e646f2f6c61726176656c2d6170692d6175746f2d646f6373)](https://github.com/piovezanfernando/laravel-api-auto-docs/graphs/contributors)

###  Health Score

38

—

LowBetter than 85% of packages

Maintenance82

Actively maintained with recent releases

Popularity9

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity47

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~36 days

Total

4

Last Release

42d ago

PHP version history (2 changes)0.0.1PHP ^8.1|^8.2|^8.3|^8.4

0.0.4PHP ^8.3|^8.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/5fb338b83f80fecbf4481a08bf88a5f418ced9ffcdc550c9fb7d8062e3994266?d=identicon)[piovezanfernando](/maintainers/piovezanfernando)

---

Top Contributors

[![piovezanfernando](https://avatars.githubusercontent.com/u/38543704?v=4)](https://github.com/piovezanfernando "piovezanfernando (36 commits)")

---

Tags

api-documentationauto-documentationlaravellaravel-api-auto-docslaravel-requestopen-sourcephp8laravelapi-documentationpiovezanfernandolaravel-api-auto-docsautomatic-documentation

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan, Psalm

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/piovezanfernando-laravel-api-auto-docs/health.svg)

```
[![Health](https://phpackages.com/badges/piovezanfernando-laravel-api-auto-docs/health.svg)](https://phpackages.com/packages/piovezanfernando-laravel-api-auto-docs)
```

###  Alternatives

[dedoc/scramble

Automatic generation of API documentation for Laravel applications.

2.0k7.8M57](/packages/dedoc-scramble)[scalar/laravel

Render your OpenAPI-based API reference

6183.9k2](/packages/scalar-laravel)[ryangjchandler/bearer

Minimalistic token-based authentication for Laravel API endpoints.

8129.8k](/packages/ryangjchandler-bearer)[combindma/laravel-facebook-pixel

Meta pixel integration for Laravel

4956.9k](/packages/combindma-laravel-facebook-pixel)[stechstudio/laravel-hubspot

A Laravel SDK for the HubSpot CRM Api

2971.0k](/packages/stechstudio-laravel-hubspot)[njoguamos/laravel-plausible

A laravel package for interacting with plausible analytics api.

208.8k](/packages/njoguamos-laravel-plausible)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
