PHPackages                             alfreddagenais/l5-swagger-annotation-tag-cleanup - 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. alfreddagenais/l5-swagger-annotation-tag-cleanup

ActiveLibrary[API Development](/categories/api)

alfreddagenais/l5-swagger-annotation-tag-cleanup
================================================

L5 Swagger extension - Annotation Tag Cleanup

v1.0.1(2y ago)045MITPHPPHP ^7.2 || ^8.0

Since Jan 8Pushed 2y ago1 watchersCompare

[ Source](https://github.com/alfreddagenais/L5-Swagger-Annotation-Tag-Cleanup)[ Packagist](https://packagist.org/packages/alfreddagenais/l5-swagger-annotation-tag-cleanup)[ Docs](https://github.com/alfreddagenais/L5-Swagger-Annotation-Tag-Cleanup)[ Fund](https://www.buymeacoffee.com/alfreddagenais)[ Fund](https://paypal.me/AlfredDagenais)[ RSS](/packages/alfreddagenais-l5-swagger-annotation-tag-cleanup/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (6)Versions (3)Used By (0)

L5 Swagger extension - Annotation Tag Cleanup 🧹 - for OpenApi or Swagger Specification
======================================================================================

[](#l5-swagger-extension---annotation-tag-cleanup----for-openapi-or-swagger-specification)

A Laravel API documentation extension for L5-Swagger to organize Swagger specification operations based on tags, enhancing API documentation clarity and ease of navigation.

---

About This Project
------------------

[](#about-this-project)

Welcome to the L5 Swagger Extension - Annotation Tag Cleanup, a custom Laravel package born from a genuine need to bring order and clarity to Swagger documentation.

🔍 The Challenge: As a developer, you've probably experienced the complexity of managing extensive API documentation. Like many, I found myself navigating through the labyrinth of Swagger documentation. Attempts to use Swagger processors or custom processors for cleanup seemed like hitting a brick wall.

🌟 The Solution: That's when the idea struck! Why not create something simple yet efficient, something that resonates with the ease and elegance Laravel is known for? And thus, this extension was born - a tool designed to declutter and organize Swagger operations based on tags.

🔗 What It Does: This extension enhances the L5-Swagger package by allowing you to effortlessly organize your API documentation. It filters operations, removes orphaned schemas, and ensures that your API documentation is as neat as your code.

🤝 Community Contribution: Built with the community in mind, this package isn't just a solution to my own struggles; it's a contribution to fellow developers who share the same pain points. It's open, it's straightforward, and it's here to make your Swagger documentation a breeze!

---

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

[](#installation)

`composer require "alfreddagenais/l5-swagger-annotation-tag-cleanup"`

---

Usage Example
-------------

[](#usage-example)

Place the following configs in `config/l5-swagger.php`

```
return [
    'default' => 'default',
    'documentations' => [
        'default' => [
            ...
            'atcOptions' => [
                'cleanOrphanSchemas' => true,
                'exclude' => [
                    'operations' => [
                        'tags' => ['mytagname', 'customtag2'],
                    ],
                ],
            ],
            ...
        ],
        ...
    ],
    ...
]
```

Run `php artisan l5-swagger-extatc:generate` to generate docs

---

Settings
--------

[](#settings)

Keys can be added directly to your config file `config/l5-swagger.php`

Key NameDescriptionRequiredDefault`include`Annotation to includeNo\[\]`exclude`Annotation to excludeNo\[\]`cleanOrphanSchemas`Clean Orphan SchemasNofalse### Include

[](#include)

Key NameDescriptionRequiredDefault`operations`OperationsNo\[\]`securitySchemes`Security SchemesNofalse#### Operations

[](#operations)

Key NameDescriptionRequiredDefault`tags`TagsNo\[\]#### Security Schemes

[](#security-schemes)

Key NameDescriptionRequiredDefault`names`NamesNo\[\]---

Settings Examples
-----------------

[](#settings-examples)

```
'atcOptions' => [
    'cleanOrphanSchemas' => true,
    'exclude' => [
        'operations' => [
            'tags' => ['mytagname', 'customtag2'],
        ],
    ],
],
```

```
'atcOptions' => [
    'include' => [
        'operations' => [
            'tags' => ['mytagname'],
        ],
        'securitySchemes' => [
            'names' => ['oauth2'],
        ],
    ],
],
```

```
'atcOptions' => [
    'include' => [
        'operations' => [
            'tags' => ['customtag2'],
        ],
        'securitySchemes' => [
            'names' => ['oauth2'],
        ],
    ],
    'exclude' => [
        'operations' => [
            'tags' => ['mytagname'],
        ],
        'securitySchemes' => [
            'names' => ['apikey'],
        ],
    ],
],
```

---

Command Options
---------------

[](#command-options)

- Run `php artisan l5-swagger-extatc:generate --all` to generate all docs
- Run `php artisan l5-swagger-extatc:generate default` to generate default docs
- Run `php artisan l5-swagger-extatc:generate customname` to generate specific customname docs

See more command options on [DarkaOnLine/L5-Swagger](https://github.com/DarkaOnLine/L5-Swagger)

---

Disclaimer
----------

[](#disclaimer)

This package is a wrapper of [DarkaOnLine/L5-Swagger](https://github.com/DarkaOnLine/L5-Swagger)

The actual Swagger spec is beyond the scope of this package. All L5-Swagger does is package up swagger-php and swagger-ui in a Laravel-friendly fashion, and tries to make it easy to serve. For info on how to use swagger-php [look here](https://zircote.github.io/swagger-php/). For good examples of swagger-php in action [look here](https://github.com/zircote/swagger-php/tree/master/Examples/petstore.swagger.io).

---

License
-------

[](#license)

MIT

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity48

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

Total

2

Last Release

855d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/7752e48cb63b2a4276b8d1cddb3308746b54cf7075a0c461cda7a3a339300be3?d=identicon)[alfreddagenais](/maintainers/alfreddagenais)

---

Top Contributors

[![alfreddagenais](https://avatars.githubusercontent.com/u/5769264?v=4)](https://github.com/alfreddagenais "alfreddagenais (7 commits)")

---

Tags

apilaraveldocumentationuispecificationswaggeropenapi

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/alfreddagenais-l5-swagger-annotation-tag-cleanup/health.svg)

```
[![Health](https://phpackages.com/badges/alfreddagenais-l5-swagger-annotation-tag-cleanup/health.svg)](https://phpackages.com/packages/alfreddagenais-l5-swagger-annotation-tag-cleanup)
```

###  Alternatives

[darkaonline/l5-swagger

OpenApi or Swagger integration to Laravel

2.9k34.0M112](/packages/darkaonline-l5-swagger)[swagger-api/swagger-ui

 Swagger UI is a collection of HTML, Javascript, and CSS assets that dynamically generate beautiful documentation from a Swagger-compliant API.

28.7k45.4M99](/packages/swagger-api-swagger-ui)[darkaonline/swagger-lume

OpenApi or Swagger integration to Lumen

3372.3M3](/packages/darkaonline-swagger-lume)

PHPackages © 2026

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