PHPackages                             evolvo/swagger-doc-generators - 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. evolvo/swagger-doc-generators

ActiveLibrary

evolvo/swagger-doc-generators
=============================

Artisan commands to generate comments for swagger.

1.0.8(6y ago)0590MITPHPPHP &gt;=7.0.0

Since Oct 25Pushed 6y agoCompare

[ Source](https://github.com/evolvoltd/swagger-doc-generators)[ Packagist](https://packagist.org/packages/evolvo/swagger-doc-generators)[ RSS](/packages/evolvo-swagger-doc-generators/feed)WikiDiscussions master Synced today

READMEChangelog (9)Dependencies (3)Versions (10)Used By (0)

Swagger 5.7 auto comments generator for Laravel
===============================================

[](#swagger-57-auto-comments-generator-for-laravel)

About
-----

[](#about)

The `swagger-doc-generators` package allows you to create comments from validation classes for swagger documentation.

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

[](#installation)

Require the `evolvo/swagger-doc-generators` package in your `composer.json` and update your dependencies:

```
$ composer require evolvo/swagger-doc-generators "1.0.8"
```

add

```
Evolvo\SwaggerDocGenerators\SwaggerDocGeneratorsServiceProvider::class,
```

to config/app.php 'providers' array.

\####If you don't have swagger config and view files:

Run:

```
php artisan vendor:publish --provider "L5Swagger\L5SwaggerServiceProvider"
```

then add

```
L5Swagger\L5SwaggerServiceProvider::class,
```

to config/app.php 'providers' array.

Add to app/Http/Controllers/Controller.php:

```
/**
 * @OA\Info(
 *      version="1.0.0",
 *      title="L5 OpenApi",
 *      description="L5 Swagger OpenApi description",
 *     @OA\License(
 *         name="Apache 2.0",
 *         url="http://www.apache.org/licenses/LICENSE-2.0.html"
 *     )
 * )
 */
/*
 * @SWG\SecurityScheme(
 *   securityDefinition="passport",
 *   type="oauth2",
 *   tokenUrl="/oauth/token",
 *   flow="password",
 *   scopes={}
 * )
 */
class Controller extends BaseController
{
    use AuthorizesRequests, DispatchesJobs, ValidatesRequests;
}
```

add to .env file:

`L5_SWAGGER_GENERATE_ALWAYS=TRUE`.

Default preview route is `http://your-address.com/api/documentation`, but you can change it in configuration.

Usage
-----

[](#usage)

Run `php artisan comment {METHOD::route}` to generate comment for route. You can specify multiple routes.

Run `php artisan comment:controller {controller}` to generate comments for whole controller.

Examples
--------

[](#examples)

For single route `php artisan comment GET::api/clients`

For multiple routes `php artisan comment GET::api/clients POST::api/clients PUT::api/clients/{client}`

For controller `php artisan comment:controller ClientsController`

Custom documentation style
--------------------------

[](#custom-documentation-style)

Run `php artisan swagger-custom-style:apply` to apply custom style. After that go to `config/l5-swagger.php` and change style in `css` array.

Example [![alt text](src/images/custom-style-example.png)](src/images/custom-style-example.png)

Run `php artisan swagger-custom-style:remove` to remove custom style.

Links and examples
------------------

[](#links-and-examples)

Swagger PHP: [here](http://zircote.com/swagger-php/)

More about swagger for laravel: [l5-swagger](https://github.com/DarkaOnLine/L5-Swagger).

L5-swagger documentation example: [pet store](https://petstore.swagger.io/).

Pet store code example: [link](https://github.com/zircote/swagger-php/tree/master/Examples/petstore-3.0).

Our company: .

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity62

Established project with proven stability

 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 ~27 days

Recently: every ~53 days

Total

9

Last Release

2540d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/a739a3ac15d9410bfba7e13dabe3a57914d2ec3622c5b5dac76b7486d923d90e?d=identicon)[evolco](/maintainers/evolco)

---

Top Contributors

[![justas-go](https://avatars.githubusercontent.com/u/26969390?v=4)](https://github.com/justas-go "justas-go (14 commits)")

### Embed Badge

![Health badge](/badges/evolvo-swagger-doc-generators/health.svg)

```
[![Health](https://phpackages.com/badges/evolvo-swagger-doc-generators/health.svg)](https://phpackages.com/packages/evolvo-swagger-doc-generators)
```

###  Alternatives

[anourvalar/eloquent-serialize

Laravel Query Builder (Eloquent) serialization

11320.2M21](/packages/anourvalar-eloquent-serialize)[namu/wirechat

A Laravel Livewire messaging app for teams with private chats and group conversations.

54324.5k](/packages/namu-wirechat)[statamic-rad-pack/runway

Eloquently manage your database models in Statamic.

135192.6k5](/packages/statamic-rad-pack-runway)

PHPackages © 2026

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