PHPackages                             mijohansen/slim-swagger - 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. mijohansen/slim-swagger

ActiveLibrary[API Development](/categories/api)

mijohansen/slim-swagger
=======================

Simpler way to hook a swagger api into slim-framework.

0.0.5(7y ago)7641MITPHPPHP &gt;=7.0

Since Nov 18Pushed 7y ago1 watchersCompare

[ Source](https://github.com/mijohansen/php-slim-swagger)[ Packagist](https://packagist.org/packages/mijohansen/slim-swagger)[ RSS](/packages/mijohansen-slim-swagger/feed)WikiDiscussions master Synced 2w ago

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

php-slim-swagger
================

[](#php-slim-swagger)

Slim needs a simpler way to define an Swagger API. No docblock magic, just code.

This project is at an early stage. Functionality will break.

Usage
-----

[](#usage)

### Adding the dependencies to the container

[](#adding-the-dependencies-to-the-container)

You need to override the router and add the swagger liberary to Slim. A clean way of doing this is BEFORE the $app object is initiated.

Minimal example:

```
use Slim\App;
use SlimSwagger\SlimSwagger;

$container = SlimSwagger::init();
$app = new App($container);
```

### Installing the swagger route:

[](#installing-the-swagger-route)

```
use SlimSwagger\SwaggerAction;

$app->get('/swagger.json', SwaggerAction::class);
```

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity51

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

Total

5

Last Release

2774d ago

PHP version history (2 changes)0.0.1PHP &gt;=7.1

0.0.3PHP &gt;=7.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/589907?v=4)[Michael](/maintainers/mijohansen)[@mijohansen](https://github.com/mijohansen)

---

Top Contributors

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

---

Tags

swaggerslim

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/mijohansen-slim-swagger/health.svg)

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

###  Alternatives

[open-dxp/opendxp

Content &amp; Product Management Framework (CMS/PIM)

9317.2k55](/packages/open-dxp-opendxp)[oro/platform

Business Application Platform (BAP)

642140.7k104](/packages/oro-platform)[psx/api

Parse and generate API specification formats

37181.6k5](/packages/psx-api)[duxweb/dux-lite

The lightweight framework based on slim php

161.0k9](/packages/duxweb-dux-lite)[scrumptious/slagger

Slim middleware for generating Swagger json for use with Swagger UI

101.2k](/packages/scrumptious-slagger)

PHPackages © 2026

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