PHPackages                             lumen-utils/swagger-lumen - 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. lumen-utils/swagger-lumen

ActiveLibrary[API Development](/categories/api)

lumen-utils/swagger-lumen
=========================

OpenApi or Swagger integration to Lumen

v10.0.1(2y ago)0848↓100%MITPHPPHP ~8.1

Since Nov 28Pushed 2y agoCompare

[ Source](https://github.com/Lucifer20211202/SwaggerLume)[ Packagist](https://packagist.org/packages/lumen-utils/swagger-lumen)[ GitHub Sponsors](https://github.com/DarkaOnLine)[ RSS](/packages/lumen-utils-swagger-lumen/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (7)Versions (3)Used By (0)

[![Total Downloads](https://camo.githubusercontent.com/73ff49c1d014381c504534f0a18493e90bf9d758e8a0562a508f34b59df73090/68747470733a2f2f706f7365722e707567782e6f72672f4461726b614f6e4c696e652f737761676765722d6c756d652f646f776e6c6f6164732e737667)](https://packagist.org/packages/DarkaOnLine/swagger-lume)[![Build Status](https://github.com/DarkaOnLine/SwaggerLume/actions/workflows/test-config.yml/badge.svg?branch=master)](https://github.com/DarkaOnLine/SwaggerLume/actions/workflows/test-config.yml/badge.svg?branch=master)[![Coverage Status](https://camo.githubusercontent.com/16e52f0838ef8ac49d6de2eff2a8e5627e66eef5db80ac0bb460cc57e669e2aa/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f4461726b614f6e4c696e652f537761676765724c756d652f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/github/DarkaOnLine/SwaggerLume?branch=master)[![Code Climate](https://camo.githubusercontent.com/5038b9cdae1295d59cced1bd97d9f793088954d4d6ea543f36c6159c0fac22ac/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f4461726b614f6e4c696e652f537761676765724c756d652f6261646765732f6770612e737667)](https://codeclimate.com/github/DarkaOnLine/SwaggerLume)[![StyleCI](https://camo.githubusercontent.com/7205c4c283d3852a4e8514b7ca299f62e67f5e140d3b0b0ebd6f6ebe4bf3636b/68747470733a2f2f7374796c6563692e696f2f7265706f732f35303131333232392f736869656c64)](https://styleci.io/repos/50113229)

SwaggerLume
===========

[](#swaggerlume)

Swagger 2.0-3.0 for Lumen

This package is a wrapper of [Swagger-php](https://github.com/zircote/swagger-php) and [swagger-ui](https://github.com/swagger-api/swagger-ui) adapted to work with Lumen.

Installation
============

[](#installation)

LumenSwagger UIOpenAPI Spec compatibilityL5-Swagger10.032.0, 3.0`composer require "lumen-utils/swagger-lumen:10.*"`- Open your `bootstrap/app.php` file and:

uncomment this line (around line 26) in `Create The Application` section:

```
     $app->withFacades();
```

add this line before `Register Container Bindings` section:

```
     $app->configure('swagger-lume');
```

add this line in `Register Service Providers` section:

```
    $app->register(\SwaggerLume\ServiceProvider::class);
```

- Run `php artisan swagger-lume:publish-config` to publish configs (`config/swagger-lume.php`)
- Make configuration changes if needed
- Run `php artisan swagger-lume:publish` to publish everything

Using [OpenApi 3.0 Specification](https://github.com/OAI/OpenAPI-Specification)
===============================================================================

[](#using-openapi-30-specification)

If you would like to use latest OpenApi specifications (originally known as the Swagger Specification) in your project you should:

- Explicitly require `swagger-php` version 3.\* in your projects composer by running:

```
composer require 'zircote/swagger-php:3.*'
```

- Set environment variable `SWAGGER_VERSION` to **3.0** in your `.env` file:

```
SWAGGER_VERSION=3.0

```

or in your `config/l5-swagger.php`:

```
'swagger_version' => env('SWAGGER_VERSION', '3.0'),
```

- Use examples provided here:

Configuration
=============

[](#configuration)

- Run `php artisan swagger-lume:publish-config` to publish configs (`config/swagger-lume.php`)
- Run `php artisan swagger-lume:publish-views` to publish views (`resources/views/vendor/swagger-lume`)
- Run `php artisan swagger-lume:publish` to publish everything
- Run `php artisan swagger-lume:generate` to generate docs

Swagger-php
===========

[](#swagger-php)

The actual Swagger spec is beyond the scope of this package. All SwaggerLume 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](http://zircote.com/swagger-php/). For good examples of swagger-php in action [look here](https://github.com/zircote/swagger-php/tree/master/Examples/petstore.swagger.io).

###  Health Score

28

↑

LowBetter than 57% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 78.9% 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

846d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/24e04f64d553e9702632f9439482007c85a2179dfe414fffbef3ea86215722ff?d=identicon)[Lucifer20211202](/maintainers/Lucifer20211202)

---

Top Contributors

[![DarkaOnLine](https://avatars.githubusercontent.com/u/1171698?v=4)](https://github.com/DarkaOnLine "DarkaOnLine (86 commits)")[![jvleeuwen](https://avatars.githubusercontent.com/u/21260099?v=4)](https://github.com/jvleeuwen "jvleeuwen (4 commits)")[![Lucifer20211202](https://avatars.githubusercontent.com/u/97464821?v=4)](https://github.com/Lucifer20211202 "Lucifer20211202 (3 commits)")[![nathanejohnson](https://avatars.githubusercontent.com/u/1360240?v=4)](https://github.com/nathanejohnson "nathanejohnson (2 commits)")[![StyleCIBot](https://avatars.githubusercontent.com/u/11048387?v=4)](https://github.com/StyleCIBot "StyleCIBot (2 commits)")[![LiamBull](https://avatars.githubusercontent.com/u/17298523?v=4)](https://github.com/LiamBull "LiamBull (1 commits)")[![lloricode](https://avatars.githubusercontent.com/u/8251344?v=4)](https://github.com/lloricode "lloricode (1 commits)")[![mglinski](https://avatars.githubusercontent.com/u/78872?v=4)](https://github.com/mglinski "mglinski (1 commits)")[![Momodedf](https://avatars.githubusercontent.com/u/7385178?v=4)](https://github.com/Momodedf "Momodedf (1 commits)")[![RafayelArzumanyan](https://avatars.githubusercontent.com/u/24539327?v=4)](https://github.com/RafayelArzumanyan "RafayelArzumanyan (1 commits)")[![stcktrce](https://avatars.githubusercontent.com/u/40738917?v=4)](https://github.com/stcktrce "stcktrce (1 commits)")[![ADReece](https://avatars.githubusercontent.com/u/103013045?v=4)](https://github.com/ADReece "ADReece (1 commits)")[![xwiz](https://avatars.githubusercontent.com/u/3619843?v=4)](https://github.com/xwiz "xwiz (1 commits)")[![arep](https://avatars.githubusercontent.com/u/137294?v=4)](https://github.com/arep "arep (1 commits)")[![cocochepeau](https://avatars.githubusercontent.com/u/2019778?v=4)](https://github.com/cocochepeau "cocochepeau (1 commits)")[![DavidMoraisFerreira](https://avatars.githubusercontent.com/u/16104349?v=4)](https://github.com/DavidMoraisFerreira "DavidMoraisFerreira (1 commits)")[![jellebreuer](https://avatars.githubusercontent.com/u/5371337?v=4)](https://github.com/jellebreuer "jellebreuer (1 commits)")

---

Tags

apidocumentationuispecificationswaggeropenapilumen

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/lumen-utils-swagger-lumen/health.svg)

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

###  Alternatives

[darkaonline/l5-swagger

OpenApi or Swagger integration to Laravel

2.9k33.0M100](/packages/darkaonline-l5-swagger)[darkaonline/swagger-lume

OpenApi or Swagger integration to Lumen

3332.3M3](/packages/darkaonline-swagger-lume)[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.7k44.1M90](/packages/swagger-api-swagger-ui)[wapmorgan/openapi-generator

OpenApi configuration generator directly from PHP code (PhpDoc, functions signature and type hints) and projects (for yii2, slim, laravel). Can be used with a large monolithic backend to maintain big API documentation

202.8k](/packages/wapmorgan-openapi-generator)

PHPackages © 2026

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