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

ActiveLibrary[API Development](/categories/api)

binbinly/swagger-lume
=====================

OpenApi or Swagger integration to Lumen

014PHP

Since Apr 6Pushed 3y agoCompare

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

READMEChangelogDependenciesVersions (1)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-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.*"`7.032.0, 3.0`composer require "darkaonline/swagger-lume:7.*"`8.032.0, 3.0`composer require "darkaonline/swagger-lume:8.*"`9.032.0, 3.0`composer require "darkaonline/swagger-lume:9.*"`- 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/09595e28af18b413c5ac95353470513289b045b8b1f1a03a53470d0abc13ba17/68747470733a2f2f626565727061792e696f2f4461726b614f6e4c696e652f537761676765724c756d652f62616467652e7376673f7374796c653d626565722d737175617265)](https://beerpay.io/DarkaOnLine/SwaggerLume) [![Beerpay](https://camo.githubusercontent.com/6a1ea317bd6c428beba4fa37f0baae0570952218f5e3db8d35328ed5424269cc/68747470733a2f2f626565727061792e696f2f4461726b614f6e4c696e652f537761676765724c756d652f6d616b652d776973682e7376673f7374796c653d666c61742d737175617265)](https://beerpay.io/DarkaOnLine/SwaggerLume?focus=wish)

###  Health Score

16

—

LowBetter than 5% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity22

Early-stage or recently created project

 Bus Factor1

Top contributor holds 82.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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/27fddeca3826c933f436c93a9f04c4138c1e9ad125bf9949dd91267ebdb5b67b?d=identicon)[binbinly](/maintainers/binbinly)

---

Top Contributors

[![DarkaOnLine](https://avatars.githubusercontent.com/u/1171698?v=4)](https://github.com/DarkaOnLine "DarkaOnLine (84 commits)")[![jvleeuwen](https://avatars.githubusercontent.com/u/21260099?v=4)](https://github.com/jvleeuwen "jvleeuwen (4 commits)")[![nathanejohnson](https://avatars.githubusercontent.com/u/1360240?v=4)](https://github.com/nathanejohnson "nathanejohnson (2 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)")[![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)")[![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)")[![StyleCIBot](https://avatars.githubusercontent.com/u/11048387?v=4)](https://github.com/StyleCIBot "StyleCIBot (1 commits)")[![arep](https://avatars.githubusercontent.com/u/137294?v=4)](https://github.com/arep "arep (1 commits)")[![xwiz](https://avatars.githubusercontent.com/u/3619843?v=4)](https://github.com/xwiz "xwiz (1 commits)")[![binbinly](https://avatars.githubusercontent.com/u/13825589?v=4)](https://github.com/binbinly "binbinly (1 commits)")[![cocochepeau](https://avatars.githubusercontent.com/u/2019778?v=4)](https://github.com/cocochepeau "cocochepeau (1 commits)")

### Embed Badge

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

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

###  Alternatives

[stripe/stripe-php

Stripe PHP Library

4.0k143.3M475](/packages/stripe-stripe-php)[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M270](/packages/twilio-sdk)[knplabs/github-api

GitHub API v3 client

2.2k15.8M187](/packages/knplabs-github-api)[facebook/php-business-sdk

PHP SDK for Facebook Business

90121.9M34](/packages/facebook-php-business-sdk)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

73813.7M114](/packages/meilisearch-meilisearch-php)[google/gax

Google API Core for PHP

263103.1M453](/packages/google-gax)

PHPackages © 2026

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