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

ActiveLibrary[API Development](/categories/api)

pal-stark/swagger-lume
======================

OpenApi or Swagger integration to Lumen

10.1.0(3y ago)04MITPHPPHP &gt;=7.2 || ^8.0

Since May 10Pushed 2y agoCompare

[ Source](https://github.com/pal-stark/SwaggerLume)[ Packagist](https://packagist.org/packages/pal-stark/swagger-lume)[ GitHub Sponsors](https://github.com/DarkaOnLine)[ RSS](/packages/pal-stark-swagger-lume/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (7)Versions (2)Used By (0)

[![Total Downloads](https://camo.githubusercontent.com/36a4c7ba88d1ca054ec7b3d55dcaf59e559ac59e0b4f75a4113e27be4015ff80/68747470733a2f2f706f7365722e707567782e6f72672f70616c2d737461726b2f737761676765722d6c756d652f646f776e6c6f6164732e737667)](https://packagist.org/packages/pal-stark/swagger-lume)[![Build Status](https://github.com/pal-stark/SwaggerLume/actions/workflows/test-config.yml/badge.svg?branch=master)](https://github.com/pal-stark/SwaggerLume/actions/workflows/test-config.yml/badge.svg?branch=master)[![Coverage Status](https://camo.githubusercontent.com/b437813aabd2e59080bba9677754d6df954193be2f107443c414f720775e6574/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f70616c2d737461726b2f537761676765724c756d652f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/github/pal-stark/SwaggerLume?branch=master)[![Code Climate](https://camo.githubusercontent.com/d756f86ec9a0c298ffe668d1a9d07e44f15cfd207355801421fe66da0dae7aa3/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f70616c2d737461726b2f537761676765724c756d652f6261646765732f6770612e737667)](https://codeclimate.com/github/pal-stark/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-Swagger5.0 - 5.32.21.1, 1.2, 2.0`composer require "pal-stark/swagger-lume:~1.0"`5.4.x2.21.1, 1.2, 2.0`composer require "pal-stark/swagger-lume:~2.0"`5.4.x32.0`composer require "pal-stark/swagger-lume:~3.0"`5.5.x32.0`composer require "pal-stark/swagger-lume:5.5.*"`5.6 - 5.732.0, 3.0`composer require "pal-stark/swagger-lume:5.6.*"`6.032.0, 3.0`composer require "pal-stark/swagger-lume:6.*"`7.032.0, 3.0`composer require "pal-stark/swagger-lume:7.*"`8.032.0, 3.0`composer require "pal-stark/swagger-lume:8.*"`9.032.0, 3.0`composer require "pal-stark/swagger-lume:9.*"`10.032.0, 3.0`composer require "pal-stark/swagger-lume: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

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/2897e3ec737f95436755eed6701111ecf98ebdf572546df9c25a087186ee61f8/68747470733a2f2f626565727061792e696f2f70616c2d737461726b2f537761676765724c756d652f62616467652e7376673f7374796c653d626565722d737175617265)](https://beerpay.io/pal-stark/SwaggerLume) [![Beerpay](https://camo.githubusercontent.com/4f23531d8f47b6dc1353e084d98a2eb9917d370a1ff9c49a60beb00e82a1a2c6/68747470733a2f2f626565727061792e696f2f70616c2d737461726b2f537761676765724c756d652f6d616b652d776973682e7376673f7374796c653d666c61742d737175617265)](https://beerpay.io/pal-stark/SwaggerLume?focus=wish)

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity49

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

Unknown

Total

1

Last Release

1097d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/f63013085c8436d4692a29af625ddc8ff5033b00a959f1801920743d5e66d13b?d=identicon)[pal-stark](/maintainers/pal-stark)

---

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)")[![pavel-strokov](https://avatars.githubusercontent.com/u/101827043?v=4)](https://github.com/pavel-strokov "pavel-strokov (2 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)")[![pal-stark](https://avatars.githubusercontent.com/u/1922829?v=4)](https://github.com/pal-stark "pal-stark (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

apilaraveldocumentationuispecificationswaggeropenapilumen

###  Code Quality

TestsPHPUnit

### Embed Badge

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

```
[![Health](https://phpackages.com/badges/pal-stark-swagger-lume/health.svg)](https://phpackages.com/packages/pal-stark-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)[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)

PHPackages © 2026

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