PHPackages                             swagger-api/swagger-ui - 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. swagger-api/swagger-ui

ActiveLibrary[API Development](/categories/api)

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.

v5.32.1(2mo ago)28.8k45.4M—2.3%9.3k[1.3k issues](https://github.com/swagger-api/swagger-ui/issues)[177 PRs](https://github.com/swagger-api/swagger-ui/pulls)20Apache-2.0JavaScriptCI failing

Since Aug 24Pushed today619 watchersCompare

[ Source](https://github.com/swagger-api/swagger-ui)[ Packagist](https://packagist.org/packages/swagger-api/swagger-ui)[ Docs](http://swagger.io)[ RSS](/packages/swagger-api-swagger-ui/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)DependenciesVersions (506)Used By (20)

[![](https://raw.githubusercontent.com/swagger-api/swagger.io/wordpress/images/assets/SWU-logo-clr.png)](https://raw.githubusercontent.com/swagger-api/swagger.io/wordpress/images/assets/SWU-logo-clr.png)
===========================================================================================================================================================================================================

[](#)

[![NPM version](https://camo.githubusercontent.com/cfe28814e1caf20cbfa822bdd725f8ba712d06c6fb0255158ef957e1a85d0300/68747470733a2f2f62616467652e667572792e696f2f6a732f737761676765722d75692e737667)](http://badge.fury.io/js/swagger-ui)[![Build Status](https://camo.githubusercontent.com/20fa9ff4b88dd6e8ee2952e4736b530ecb6eb97a09aa74e7f7730f0c15e2a820/68747470733a2f2f6a656e6b696e732e737761676765722e696f2f766965772f4f53532532302d2532304a6176615363726970742f6a6f622f6f73732d737761676765722d75692d6d61737465722f62616467652f69636f6e3f7375626a6563743d6a656e6b696e732532306275696c64)](https://jenkins.swagger.io/view/OSS%20-%20JavaScript/job/oss-swagger-ui-master/)[![npm audit](https://camo.githubusercontent.com/e323b81c6ca5c63dd835bb6095f8f2a46669c4d1194ee9768a525a32d69e5ef0/68747470733a2f2f6a656e6b696e732e737761676765722e696f2f6275696c645374617475732f69636f6e3f6a6f623d6f73732d737761676765722d75692d73656375726974792d6175646974267375626a6563743d6e706d2532306175646974)](https://jenkins.swagger.io/job/oss-swagger-ui-security-audit/lastBuild/console)[![total GitHub contributors](https://camo.githubusercontent.com/cdde3d9c89070c961c862fbbc92cfa497ada3a3a9a427279326b7cc2af316c20/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f636f6e7472696275746f72732d616e6f6e2f737761676765722d6170692f737761676765722d75692e737667)](https://github.com/swagger-api/swagger-ui/graphs/contributors)

[![monthly npm installs](https://camo.githubusercontent.com/a74195c108b9895617dab4ffc4c3cc4f75aaa00dbd9ad24c2f68777c6616a912/68747470733a2f2f696d672e736869656c64732e696f2f6e706d2f646d2f737761676765722d75692e7376673f6c6162656c3d6e706d253230646f776e6c6f616473)](https://www.npmjs.com/package/swagger-ui)[![docker registry](https://camo.githubusercontent.com/93a4b0cdd6b10e98d88f41fc4bd5583dafc95616232039f049238dfbc654439b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f646f636b65722d646f636b65722e737761676765722e696f25324673776167676572617069253246737761676765722d2d75692d626c7565)](https://camo.githubusercontent.com/93a4b0cdd6b10e98d88f41fc4bd5583dafc95616232039f049238dfbc654439b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f646f636b65722d646f636b65722e737761676765722e696f25324673776167676572617069253246737761676765722d2d75692d626c7565)[![monthly packagist installs](https://camo.githubusercontent.com/19d9515165e5ccfc77c6f003b6f55732d408a1933cbadc95b11f79d0239152c3/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646d2f737761676765722d6170692f737761676765722d75692e7376673f6c6162656c3d7061636b6167697374253230696e7374616c6c73)](https://camo.githubusercontent.com/19d9515165e5ccfc77c6f003b6f55732d408a1933cbadc95b11f79d0239152c3/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646d2f737761676765722d6170692f737761676765722d75692e7376673f6c6162656c3d7061636b6167697374253230696e7374616c6c73)[![gzip size](https://camo.githubusercontent.com/7ee0491b66dddf6f7b7676ce1a50c68a236319b4079f63fc88493ad37087300e/68747470733a2f2f696d672e736869656c64732e696f2f62756e646c6570686f6269612f6d696e7a69702f737761676765722d75692e7376673f6c6162656c3d677a697025323073697a65)](https://bundlephobia.com/package/swagger-ui)

Introduction
------------

[](#introduction)

[Swagger UI](https://swagger.io/tools/swagger-ui/) allows anyone — be it your development team or your end consumers — to visualize and interact with the API’s resources without having any of the implementation logic in place. It’s automatically generated from your OpenAPI (formerly known as Swagger) Specification, with the visual documentation making it easy for back end implementation and client side consumption.

General
-------

[](#general)

**👉🏼 Want to score an easy open-source contribution?** Check out our [Good first issue](https://github.com/swagger-api/swagger-ui/issues?q=is%3Aissue+is%3Aopen+label%3A%22Good+first+issue%22) label.

**🕰️ Looking for the older version of Swagger UI?** Refer to the [*2.x* branch](https://github.com/swagger-api/swagger-ui/tree/2.x).

This repository publishes three different NPM modules:

- [swagger-ui](https://www.npmjs.com/package/swagger-ui) is a traditional npm module intended for use in single-page applications that are capable of resolving dependencies (via Webpack, Browserify, etc.).
- [swagger-ui-dist](https://www.npmjs.com/package/swagger-ui-dist) is a dependency-free module that includes everything you need to serve Swagger UI in a server-side project, or a single-page application that can't resolve npm module dependencies.
- [swagger-ui-react](https://www.npmjs.com/package/swagger-ui-react) is Swagger UI packaged as a React component for use in React applications.

We strongly suggest that you use `swagger-ui` instead of `swagger-ui-dist` if you're building a single-page application, since `swagger-ui-dist` is significantly larger.

If you are looking for plain ol' HTML/JS/CSS, [download the latest release](https://github.com/swagger-api/swagger-ui/releases/latest) and copy the contents of the `/dist` folder to your server.

Compatibility
-------------

[](#compatibility)

The OpenAPI Specification has undergone 5 revisions since initial creation in 2010. Compatibility between Swagger UI and the OpenAPI Specification is as follows:

Swagger UI VersionRelease DateOpenAPI Spec compatibilityNotes5.32.02026-02-272.0, 3.0.0, 3.0.1, 3.0.2, 3.0.3, 3.0.4, 3.1.0, 3.1.1, 3.1.2, 3.2.0[tag v5.32.0](https://github.com/swagger-api/swagger-ui/tree/v5.32.0)5.19.02025-02-172.0, 3.0.0, 3.0.1, 3.0.2, 3.0.3, 3.0.4, 3.1.0, 3.1.1, 3.1.2[tag v5.19.0](https://github.com/swagger-api/swagger-ui/tree/v5.19.0)5.0.02023-06-122.0, 3.0.0, 3.0.1, 3.0.2, 3.0.3, 3.1.0[tag v5.0.0](https://github.com/swagger-api/swagger-ui/tree/v5.0.0)4.0.02021-11-032.0, 3.0.0, 3.0.1, 3.0.2, 3.0.3[tag v4.0.0](https://github.com/swagger-api/swagger-ui/tree/v4.0.0)3.18.32018-08-032.0, 3.0.0, 3.0.1, 3.0.2, 3.0.3[tag v3.18.3](https://github.com/swagger-api/swagger-ui/tree/v3.18.3)3.0.212017-07-262.0[tag v3.0.21](https://github.com/swagger-api/swagger-ui/tree/v3.0.21)2.2.102017-01-041.1, 1.2, 2.0[tag v2.2.10](https://github.com/swagger-api/swagger-ui/tree/v2.2.10)2.1.52016-07-201.1, 1.2, 2.0[tag v2.1.5](https://github.com/swagger-api/swagger-ui/tree/v2.1.5)2.0.242014-09-121.1, 1.2[tag v2.0.24](https://github.com/swagger-api/swagger-ui/tree/v2.0.24)1.0.132013-03-081.1, 1.2[tag v1.0.13](https://github.com/swagger-api/swagger-ui/tree/v1.0.13)1.0.12011-10-111.0, 1.1[tag v1.0.1](https://github.com/swagger-api/swagger-ui/tree/v1.0.1)Anonymized analytics
--------------------

[](#anonymized-analytics)

SwaggerUI uses [Scarf](https://scarf.sh/) to collect [anonymized installation analytics](https://github.com/scarf-sh/scarf-js?tab=readme-ov-file#as-a-user-of-a-package-using-scarf-js-what-information-does-scarf-js-send-about-me). These analytics help support the maintainers of this library and ONLY run during installation. To [opt out](https://github.com/scarf-sh/scarf-js?tab=readme-ov-file#as-a-user-of-a-package-using-scarf-js-how-can-i-opt-out-of-analytics), you can set the `scarfSettings.enabled` field to `false` in your project's `package.json`:

```
// package.json
{
  // ...
  "scarfSettings": {
    "enabled": false
  }
  // ...
}

```

Alternatively, you can set the environment variable `SCARF_ANALYTICS` to `false` as part of the environment that installs your npm packages, e.g., `SCARF_ANALYTICS=false npm install`.

Documentation
-------------

[](#documentation)

#### Usage

[](#usage)

- [Installation](https://github.com/swagger-api/swagger-ui/blob/HEAD/docs/usage/installation.md)
- [Configuration](https://github.com/swagger-api/swagger-ui/blob/HEAD/docs/usage/configuration.md)
- [CORS](https://github.com/swagger-api/swagger-ui/blob/HEAD/docs/usage/cors.md)
- [OAuth2](https://github.com/swagger-api/swagger-ui/blob/HEAD/docs/usage/oauth2.md)
- [Deep Linking](https://github.com/swagger-api/swagger-ui/blob/HEAD/docs/usage/deep-linking.md)
- [Limitations](https://github.com/swagger-api/swagger-ui/blob/HEAD/docs/usage/limitations.md)
- [Version detection](https://github.com/swagger-api/swagger-ui/blob/HEAD/docs/usage/version-detection.md)

#### Customization

[](#customization)

- [Overview](https://github.com/swagger-api/swagger-ui/blob/HEAD/docs/customization/overview.md)
- [Plugin API](https://github.com/swagger-api/swagger-ui/blob/HEAD/docs/customization/plugin-api.md)
- [Custom layout](https://github.com/swagger-api/swagger-ui/blob/HEAD/docs/customization/custom-layout.md)

#### Development

[](#development)

- [Setting up](https://github.com/swagger-api/swagger-ui/blob/HEAD/docs/development/setting-up.md)
- [Scripts](https://github.com/swagger-api/swagger-ui/blob/HEAD/docs/development/scripts.md)

#### Contributing

[](#contributing)

- [Contributing](https://github.com/swagger-api/.github/blob/HEAD/CONTRIBUTING.md)

##### Integration Tests

[](#integration-tests)

You will need JDK of version 7 or higher as instructed here

Integration tests can be run locally with `npm run e2e` - be sure you aren't running a dev server when testing!

### Browser support

[](#browser-support)

Swagger UI works in the latest versions of Chrome, Safari, Firefox, and Edge.

### Known Issues

[](#known-issues)

To help with the migration, here are the currently known issues with 3.X. This list will update regularly, and will not include features that were not implemented in previous versions.

- Only part of the parameters previously supported are available.
- The JSON Form Editor is not implemented.
- Support for `collectionFormat` is partial.
- l10n (translations) is not implemented.
- Relative path support for external files is not implemented.

Security contact
----------------

[](#security-contact)

Please disclose any security-related issues or vulnerabilities by emailing , instead of using the public issue tracker.

License
-------

[](#license)

SwaggerUI is licensed under [Apache 2.0 license](https://github.com/swagger-api/swagger-ui/blob/master/LICENSE). SwaggerUI comes with an explicit [NOTICE](https://github.com/swagger-api/swagger-ui/blob/master/NOTICE) file containing additional legal notices and information.

###  Health Score

85

—

ExcellentBetter than 100% of packages

Maintenance94

Actively maintained with recent releases

Popularity90

Widely adopted with strong download metrics

Community61

Healthy contributor diversity

Maturity83

Battle-tested with a long release history

 Bus Factor3

3 contributors hold 50%+ of commits

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

Recently: every ~24 days

Total

383

Last Release

62d ago

Major Versions

v4.18.1 → v5.0.0-alpha.12023-03-20

v4.18.2 → v5.0.0-alpha.52023-03-31

v4.18.3 → v5.0.0-alpha.82023-05-02

v4.19.0 → v5.0.0-alpha.142023-05-25

v4.19.1 → v5.0.02023-06-12

### Community

Maintainers

![](https://www.gravatar.com/avatar/832d5e4687a471b512cd4a6de595eb5c87e0304e4d3858a1eb9d63bd4020b427?d=identicon)[swagger](/maintainers/swagger)

---

Top Contributors

[![shockey](https://avatars.githubusercontent.com/u/680248?v=4)](https://github.com/shockey "shockey (1331 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (1188 commits)")[![fehguy](https://avatars.githubusercontent.com/u/249413?v=4)](https://github.com/fehguy "fehguy (1028 commits)")[![char0n](https://avatars.githubusercontent.com/u/193286?v=4)](https://github.com/char0n "char0n (396 commits)")[![bodnia](https://avatars.githubusercontent.com/u/8950657?v=4)](https://github.com/bodnia "bodnia (283 commits)")[![tim-lai](https://avatars.githubusercontent.com/u/12902658?v=4)](https://github.com/tim-lai "tim-lai (207 commits)")[![swagger-bot](https://avatars.githubusercontent.com/u/53864671?v=4)](https://github.com/swagger-bot "swagger-bot (201 commits)")[![renovate-bot](https://avatars.githubusercontent.com/u/25180681?v=4)](https://github.com/renovate-bot "renovate-bot (162 commits)")[![owenconti](https://avatars.githubusercontent.com/u/791222?v=4)](https://github.com/owenconti "owenconti (156 commits)")[![mohsen1](https://avatars.githubusercontent.com/u/543633?v=4)](https://github.com/mohsen1 "mohsen1 (122 commits)")[![webron](https://avatars.githubusercontent.com/u/241629?v=4)](https://github.com/webron "webron (78 commits)")[![renovate[bot]](https://avatars.githubusercontent.com/in/2740?v=4)](https://github.com/renovate[bot] "renovate[bot] (68 commits)")[![ponelat](https://avatars.githubusercontent.com/u/8438485?v=4)](https://github.com/ponelat "ponelat (65 commits)")[![glowcloud](https://avatars.githubusercontent.com/u/44094416?v=4)](https://github.com/glowcloud "glowcloud (61 commits)")[![heldersepu](https://avatars.githubusercontent.com/u/545474?v=4)](https://github.com/heldersepu "heldersepu (61 commits)")[![swaggerhub-bot](https://avatars.githubusercontent.com/u/14862288?v=4)](https://github.com/swaggerhub-bot "swaggerhub-bot (59 commits)")[![ayush](https://avatars.githubusercontent.com/u/188701?v=4)](https://github.com/ayush "ayush (57 commits)")[![mathis-m](https://avatars.githubusercontent.com/u/11584315?v=4)](https://github.com/mathis-m "mathis-m (54 commits)")[![semantic-release-bot](https://avatars.githubusercontent.com/u/32174276?v=4)](https://github.com/semantic-release-bot "semantic-release-bot (36 commits)")[![Minasokoni](https://avatars.githubusercontent.com/u/1010168?v=4)](https://github.com/Minasokoni "Minasokoni (35 commits)")

---

Tags

hacktoberfestoasopen-sourceopenapiopenapi-specificationopenapi3openapi31restrest-apiswaggerswagger-apiswagger-jsswagger-ossswagger-uiapidocumentationuispecificationswaggeropenapi

### Embed Badge

![Health badge](/badges/swagger-api-swagger-ui/health.svg)

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

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