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.
Installs: 29 692 772
Dependents: 97
Suggesters: 2
Security: 0
Stars: 26 549
Watchers: 650
Forks: 8 958
Open Issues: 1 209
Language:JavaScript
- dev-master
- v5.18.0
- v5.17.14
- v5.17.13
- v5.17.12
- v5.17.11
- v5.17.10
- v5.17.9
- v5.17.8
- v5.17.7
- v5.17.6
- v5.17.5
- v5.17.4
- v5.17.3
- v5.17.2
- v5.17.1
- v5.17.0
- v5.16.2
- v5.16.1
- v5.16.0
- v5.15.2
- v5.15.1
- v5.15.0
- v5.14.0
- v5.13.0
- v5.12.3
- v5.12.2
- v5.12.1
- v5.12.0
- v5.11.10
- v5.11.9
- v5.11.8
- v5.11.7
- v5.11.6
- v5.11.5
- v5.11.4
- v5.11.3
- v5.11.2
- v5.11.1
- v5.11.0
- v5.10.5
- v5.10.4
- v5.10.3
- v5.10.2
- v5.10.1
- v5.10.0
- v5.9.4
- v5.9.3
- v5.9.2
- v5.9.1
- v5.9.0
- v5.8.0
- v5.7.2
- v5.7.1
- v5.7.0
- v5.6.2
- v5.6.1
- v5.6.0
- v5.5.0
- v5.4.2
- v5.4.1
- v5.4.0
- v5.3.2
- v5.3.1
- v5.3.0
- v5.2.0
- v5.1.3
- v5.1.2
- v5.1.1
- v5.1.0
- v5.0.0
- v5.0.0-beta.0
- v5.0.0-alpha.15
- v5.0.0-alpha.14
- v5.0.0-alpha.13
- v5.0.0-alpha.12
- v5.0.0-alpha.11
- v5.0.0-alpha.10
- v5.0.0-alpha.9
- v5.0.0-alpha.8
- v5.0.0-alpha.7
- v5.0.0-alpha.6
- v5.0.0-alpha.5
- v5.0.0-alpha.4
- v5.0.0-alpha.3
- v5.0.0-alpha.2
- v5.0.0-alpha.1
- v5.0.0-alpha.0
- 4.x-dev
- v4.19.1
- v4.19.0
- v4.18.3
- v4.18.2
- v4.18.1
- v4.18.0
- v4.17.1
- v4.17.0
- v4.16.1
- v4.16.0
- v4.16.0-alpha.3
- v4.16.0-alpha.2
- v4.16.0-alpha.1
- v4.15.5
- v4.15.4
- v4.15.3
- v4.15.2
- v4.15.1
- v4.15.0
- v4.14.3
- v4.14.2
- v4.14.1
- v4.14.0
- v4.13.2
- v4.13.1
- v4.13.0
- v4.12.0
- v4.11.1
- v4.11.0
- v4.10.3
- v4.10.2
- v4.10.1
- v4.10.0
- v4.9.1
- v4.9.0
- v4.8.1
- v4.8.0
- v4.7.0
- v4.6.2
- v4.6.1
- v4.6.0
- v4.5.2
- v4.5.1
- v4.5.0
- v4.4.1
- v4.4.0
- v4.3.0
- v4.2.1
- v4.2.0
- v4.1.3
- v4.1.2
- v4.1.1
- v4.1.0
- v4.0.1
- v4.0.0
- v4.0.0-rc.4
- v4.0.0-rc.3
- v4.0.0-rc.2
- v4.0.0-rc.1
- v4.0.0-rc.0
- v4.0.0-beta.4
- v4.0.0-beta.3
- v4.0.0-beta.2
- v4.0.0-beta.1
- v4.0.0-beta.0
- 3.x-dev
- v3.52.5
- v3.52.4
- v3.52.3
- v3.52.2
- v3.52.1
- v3.52.0
- v3.51.2
- v3.51.1
- v3.51.0
- v3.50.0
- v3.49.0
- v3.48.0
- v3.47.1
- v3.47.0
- v3.46.0
- v3.45.1
- v3.45.0
- v3.44.1
- v3.44.0
- v3.43.0
- v3.42.0
- v3.41.1
- v3.41.0
- v3.40.0
- v3.39.0
- v3.38.0
- v3.37.2
- v3.37.1
- v3.37.0
- v3.36.2
- v3.36.1
- v3.36.0
- v3.35.2
- v3.35.1
- v3.35.0
- v3.34.0
- v3.33.0
- v3.32.5
- v3.32.4
- v3.32.3
- v3.32.2
- v3.32.1
- v3.32.0
- v3.31.1
- v3.31.0
- v3.30.2
- v3.30.1
- v3.30.0
- v3.29.0
- v3.28.0
- v3.27.0
- v3.26.2
- v3.26.1
- v3.26.0
- v3.25.5
- v3.25.4
- v3.25.3
- v3.25.2
- v3.25.1
- v3.25.0
- v3.24.3
- v3.24.2
- v3.24.1
- v3.24.0
- v3.23.11
- v3.23.10
- v3.23.9
- v3.23.8
- v3.23.7
- v3.23.6
- v3.23.5
- v3.23.4
- v3.23.3
- v3.23.2
- v3.23.1
- v3.23.0
- v3.22.3
- v3.22.2
- v3.22.1
- v3.22.0
- v3.21.0
- v3.20.9
- v3.20.8
- v3.20.7
- v3.20.6
- v3.20.5
- v3.20.4
- v3.20.3
- v3.20.2
- v3.20.1
- v3.20.0
- v3.19.5
- v3.19.4
- v3.19.3
- v3.19.2
- v3.19.1
- v3.19.0
- v3.18.4
- v3.18.3
- v3.18.2
- v3.18.1
- v3.18.0
- v3.17.6
- v3.17.5
- v3.17.4
- v3.17.3
- v3.17.2
- v3.17.1
- v3.17.0
- v3.16.0
- v3.15.0
- v3.14.2
- v3.14.1
- v3.14.0
- v3.13.6
- v3.13.5
- v3.13.4
- v3.13.3
- v3.13.2
- v3.13.1
- v3.13.0
- v3.12.9
- v3.12.1
- v3.12.0
- v3.11.0
- v3.10.0
- v3.9.3
- v3.9.2
- v3.9.1
- v3.9.0
- v3.8.1
- v3.8.0
- v3.7.0
- v3.6.1
- v3.6.0
- v3.5.0
- v3.4.5
- v3.4.4
- v3.4.3
- v3.4.2
- v3.4.1
- v3.4.0
- v3.3.2
- v3.3.1
- v3.3.0
- v3.2.2
- v3.2.1
- v3.2.0
- v3.1.7
- v3.1.6
- v3.1.5
- v3.1.4
- v3.1.3
- v3.1.2
- v3.1.1
- v3.1.0
- v3.0.21
- v3.0.20
- v3.0.19
- v3.0.18
- v3.0.17
- v3.0.16
- v3.0.15
- v3.0.14
- v3.0.13
- v3.0.12
- v3.0.11
- v3.0.10
- v3.0.9
- v3.0.8
- v3.0.7
- v3.0.6
- v3.0.5
- 2.x-dev
- v2.2.10
- v2.2.9
- v2.2.8
- v2.2.7
- v2.2.6
- v2.2.5
- v2.2.4
- v2.2.3
- v2.2.2
- dev-char0n/telemetry
- dev-char0n/swagger-client@3.30.1
- dev-char0n/dockerfile-no-explicit-node-install
- dev-dependabot/npm_and_yarn/sass-1.80.4
- dev-dependabot/npm_and_yarn/eslint-9.13.0
- dev-dependabot/npm_and_yarn/rimraf-6.0.1
- dev-dependabot/github_actions/master/docker/build-push-action-6
- dev-char0n/wrap-components
- dev-char0n/dependabot-timing
- dev-issue-9965
- dev-char0n/config-remove
- dev-char0n/security-versions
- dev-issue-9945
- dev-char0n/9941
- dev-issue-9937
- dev-issue-7912
- dev-issue-9499
- dev-issue-9158
- dev-issue-9915
- dev-replace-patch-package
- dev-dependabot/npm_and_yarn/react-redux-9.1.2
- dev-issue-5148
- dev-issue-8007
- dev-issue-9844
- dev-issue-9838
- dev-issue-9808
- dev-issue-9804
- dev-issue-9521
- dev-issue-9674
- dev-issue-9774
- dev-swagger-client-3-26-4
- dev-issue-9713
- dev-issue-9673-xml-urlencoded
- dev-issue-9673
- dev-next
- dev-master-backup
- dev-release/4.x
- dev-kyle/squashed-master
- dev-bug/swos-91--ui-5181
- dev-facelift
- dev-shockey-patch-9
- dev-feature/test-jump-to
- dev-fix/urlencoded-array-data
- dev-bug/3983
- dev-docplan
This package is auto-updated.
Last update: 2024-11-05 14:11:44 UTC
README
Introduction
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
👉🏼 Want to score an easy open-source contribution? Check out our Good first issue label.
🕰️ Looking for the older version of Swagger UI? Refer to the 2.x branch.
This repository publishes three different NPM modules:
- 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 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 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 and copy the contents of the /dist
folder to your server.
Compatibility
The OpenAPI Specification has undergone 5 revisions since initial creation in 2010. Compatibility between Swagger UI and the OpenAPI Specification is as follows:
Anonymized analytics
SwaggerUI uses Scarf to collect anonymized installation analytics. These analytics help support the maintainers of this library and ONLY run during installation. To opt out, 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
Usage
Customization
Development
Contributing
Integration Tests
You will need JDK of version 7 or higher as instructed here https://nightwatchjs.org/guide/getting-started/installation.html#install-selenium-server
Integration tests can be run locally with npm run e2e
- be sure you aren't running a dev server when testing!
Browser support
Swagger UI works in the latest versions of Chrome, Safari, Firefox, and Edge.
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
Please disclose any security-related issues or vulnerabilities by emailing security@swagger.io, instead of using the public issue tracker.
License
SwaggerUI is licensed under Apache 2.0 license. SwaggerUI comes with an explicit NOTICE file containing additional legal notices and information.