PHPackages                             smoggert/swagger-generator - 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. smoggert/swagger-generator

ActiveLibrary[API Development](/categories/api)

smoggert/swagger-generator
==========================

Generates swagger documentation based on your laravel API.

v3.3.1(2y ago)43.4k[1 issues](https://github.com/Smoggert/swagger-generator/issues)[1 PRs](https://github.com/Smoggert/swagger-generator/pulls)MITPHPPHP ^8.1

Since May 24Pushed 2y ago1 watchersCompare

[ Source](https://github.com/Smoggert/swagger-generator)[ Packagist](https://packagist.org/packages/smoggert/swagger-generator)[ RSS](/packages/smoggert-swagger-generator/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (10)Dependencies (1)Versions (48)Used By (0)

Swagger-generator
=================

[](#swagger-generator)

Swagger-generator is a package for Laravel that produces open-api 3.1.0 spec documentation based on Form Requests and Json Resources.

I'm mostly writing this so I can stop using 50000 lines of phpdoc code to document our api.

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

[](#installation)

You can place this in require-dev and just run the command during deploy/dev. No need to have this package on production.

```
    composer require smoggert/swagger-generator
```

!! Prerequisits !!
------------------

[](#-prerequisits-)

The swagger generator looks through your code based on its controller function's return values and typed arguments. If you do no supply any it won't find any. The package does not parse PhPDocs. The entire reason for this package is to avoid PhpDocs.

**A controller action should have typed requests, a typed resource as return value..**This package relies on this strict "linting" to get it's results. If you write horrible controllers that cannot be parsed I suggest using this package instead:

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

[](#configuration)

The script currently works on an include route X basis. If you want to specify which routes you'd like to include, (among other things), I highly recommend publishing the configuration file and adjusting it.

```
  php artisan vendor:publish --tag=config
```

Usage
-----

[](#usage)

Available in json-format.

```
  php artisan swagger:generate
```

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

[](#contributing)

Open for feature requests if accompanied with some effort from the requester.

License
-------

[](#license)

[MIT](https://choosealicense.com/licenses/mit/)

###  Health Score

34

—

LowBetter than 75% of packages

Maintenance15

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity74

Established project with proven stability

 Bus Factor1

Top contributor holds 97.8% 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 ~60 days

Recently: every ~0 days

Total

17

Last Release

762d ago

Major Versions

v1.2.0 → v2.0.02024-02-26

v2.0.0 → v3.0.02024-05-21

PHP version history (3 changes)v1.0PHP ^7.3|^8.0

v2.0.0PHP ^8.0

v3.0.0PHP ^8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/37c79f45c82d027086a281ee0de0c306d6c62fe9ae4420496dc964d717603d10?d=identicon)[Smoggert](/maintainers/Smoggert)

---

Top Contributors

[![Smoggert](https://avatars.githubusercontent.com/u/4356026?v=4)](https://github.com/Smoggert "Smoggert (88 commits)")[![StyleCIBot](https://avatars.githubusercontent.com/u/11048387?v=4)](https://github.com/StyleCIBot "StyleCIBot (2 commits)")

---

Tags

apilaravelswaggeropen-api

### Embed Badge

![Health badge](/badges/smoggert-swagger-generator/health.svg)

```
[![Health](https://phpackages.com/badges/smoggert-swagger-generator/health.svg)](https://phpackages.com/packages/smoggert-swagger-generator)
```

###  Alternatives

[darkaonline/l5-swagger

OpenApi or Swagger integration to Laravel

2.9k36.4M126](/packages/darkaonline-l5-swagger)[knuckleswtf/scribe

Generate API documentation for humans from your Laravel codebase.✍

2.3k13.5M59](/packages/knuckleswtf-scribe)[mozex/anthropic-laravel

Laravel integration for the Anthropic API: facade, config publishing, install command, testing fakes, messages, streaming, tool use, thinking, and batches.

72287.1k1](/packages/mozex-anthropic-laravel)[api-platform/laravel

API Platform support for Laravel

59156.3k11](/packages/api-platform-laravel)[despark/apidoc

Generate api documentation and use swagger to consume it

132.3k](/packages/despark-apidoc)

PHPackages © 2026

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