PHPackages                             jjdoor/swagger-lume - 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. jjdoor/swagger-lume

ActiveLibrary[API Development](/categories/api)

jjdoor/swagger-lume
===================

Swagger integration to Lumen 7

6.0(6y ago)06MITPHPPHP &gt;=7.2

Since Jan 24Pushed 6y agoCompare

[ Source](https://github.com/jjdoor/SwaggerLume)[ Packagist](https://packagist.org/packages/jjdoor/swagger-lume)[ RSS](/packages/jjdoor-swagger-lume/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (8)Versions (23)Used By (0)

[![Total Downloads](https://camo.githubusercontent.com/73ff49c1d014381c504534f0a18493e90bf9d758e8a0562a508f34b59df73090/68747470733a2f2f706f7365722e707567782e6f72672f4461726b614f6e4c696e652f737761676765722d6c756d652f646f776e6c6f6164732e737667)](https://packagist.org/packages/DarkaOnLine/swagger-lume)[![Build Status](https://camo.githubusercontent.com/4a082ee8649e5f4e994b2fdb66c8b336e7673be6c22ff295d76745bfe4c2052e/68747470733a2f2f7472617669732d63692e6f72672f4461726b614f6e4c696e652f537761676765724c756d652e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/DarkaOnLine/SwaggerLume)[![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 for Lumen 5

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 5.

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

[](#installation)

LumenSwagger UIOpenAPI Spec compatibilityL5-Swagger5.0 - 5.32.21.1, 1.2, 2.0`composer require "darkaonline/swagger-lume:~1.0"`5.4.x2.21.1, 1.2, 2.0`composer require "darkaonline/swagger-lume:~2.0"`5.4.x32.0`composer require "darkaonline/swagger-lume:~3.0"`5.5.x32.0`composer require "darkaonline/swagger-lume:5.5.*"`5.6 - 5.732.0, 3.0`composer require "darkaonline/swagger-lume:5.6.*"`6.032.0, 3.0`composer require "darkaonline/swagger-lume:6.*"`- 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 lattes OpenApi specifications (originally known as the Swagger Specification) in you 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

Changes in 3.0
==============

[](#changes-in-30)

- Swagger UI 3.
- Configuration changes.
- Assets dependency dropped. Now includes from composer package.
- [See migration from 2.0 to 3.0](#migrate-from-20-to-30-or-55)

Changes in 2.0
==============

[](#changes-in-20)

- Lumen 5.4 support
- Swagger UI 2.2.8

Migrate from 2.0 to 3.0 or 5.5
==============================

[](#migrate-from-20-to-30-or-55)

- Remove `config/swagger-lume.php` file (make a copy if needed)
- Remove `public/vendor/swagger-lume` directory
- Remove `resources/views/vendor/swagger-lume` directory
- Run `swagger-lume:publish` to publish new swagger-ui view and configuration
- Edit your `config/swagger-lume.php` file

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).

Support on Beerpay
------------------

[](#support-on-beerpay)

Hey dude! Help me out for a couple of 🍻!

[![Beerpay](https://camo.githubusercontent.com/09595e28af18b413c5ac95353470513289b045b8b1f1a03a53470d0abc13ba17/68747470733a2f2f626565727061792e696f2f4461726b614f6e4c696e652f537761676765724c756d652f62616467652e7376673f7374796c653d626565722d737175617265)](https://beerpay.io/DarkaOnLine/SwaggerLume) [![Beerpay](https://camo.githubusercontent.com/6a1ea317bd6c428beba4fa37f0baae0570952218f5e3db8d35328ed5424269cc/68747470733a2f2f626565727061792e696f2f4461726b614f6e4c696e652f537761676765724c756d652f6d616b652d776973682e7376673f7374796c653d666c61742d737175617265)](https://beerpay.io/DarkaOnLine/SwaggerLume?focus=wish)

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity68

Established project with proven stability

 Bus Factor1

Top contributor holds 84.4% 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 ~74 days

Recently: every ~134 days

Total

19

Last Release

2428d ago

Major Versions

1.0.4 → 2.02017-01-30

2.0 → 3.02017-08-31

2.x-dev → 5.5.02017-09-07

3.x-dev → 5.5.12018-01-11

5.6.2 → 6.02019-09-16

PHP version history (4 changes)1.0PHP &gt;=5.5.9

2.0PHP &gt;=5.6.4

5.6.0PHP &gt;=7.1.3

6.0PHP &gt;=7.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/7bc97151fdd36f3549cc16c40ba8943251f8f688cd07c3834bbda7ab5e18b428?d=identicon)[jjdoor](/maintainers/jjdoor)

---

Top Contributors

[![DarkaOnLine](https://avatars.githubusercontent.com/u/1171698?v=4)](https://github.com/DarkaOnLine "DarkaOnLine (76 commits)")[![jvleeuwen](https://avatars.githubusercontent.com/u/21260099?v=4)](https://github.com/jvleeuwen "jvleeuwen (4 commits)")[![jjdoor](https://avatars.githubusercontent.com/u/55974412?v=4)](https://github.com/jjdoor "jjdoor (3 commits)")[![nathanejohnson](https://avatars.githubusercontent.com/u/1360240?v=4)](https://github.com/nathanejohnson "nathanejohnson (2 commits)")[![cocochepeau](https://avatars.githubusercontent.com/u/2019778?v=4)](https://github.com/cocochepeau "cocochepeau (1 commits)")[![stcktrce](https://avatars.githubusercontent.com/u/40738917?v=4)](https://github.com/stcktrce "stcktrce (1 commits)")[![jellebreuer](https://avatars.githubusercontent.com/u/5371337?v=4)](https://github.com/jellebreuer "jellebreuer (1 commits)")[![LiamBull](https://avatars.githubusercontent.com/u/17298523?v=4)](https://github.com/LiamBull "LiamBull (1 commits)")[![mglinski](https://avatars.githubusercontent.com/u/78872?v=4)](https://github.com/mglinski "mglinski (1 commits)")

---

Tags

laravelswaggerlumen

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/jjdoor-swagger-lume/health.svg)

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

###  Alternatives

[darkaonline/l5-swagger

OpenApi or Swagger integration to Laravel

2.9k34.0M112](/packages/darkaonline-l5-swagger)[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)
