Trên GitHub, swagger-api/swagger-ui đã đạt 29.0k sao, nhóm API, ngôn ngữ JavaScript. Swagger UI is a collection of HTML, JavaScript, and CSS assets that dynamically generate beautiful documentation from a Swagger-compliant API.
Tóm tắt dựng từ metadata GitHub của chính dự án — chưa có bài review TopGit. Trang sẽ tự động cập nhật khi bài review đầy đủ được xuất bản.
VÌ SAO CHƯA CÓ REVIEW
TopGit viết bài đầy đủ cho repo có nhiều sao nhất và được yêu cầu nhiều nhất. Trang này là snapshot trong thời gian chờ — xem README gốc ở tab READ ME.
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:
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:
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
Installation
Configuration
CORS
OAuth2
Deep Linking
Limitations
Version detection
Customization
Overview
Plugin API
Custom layout
Development
Setting up
Scripts
Contributing
Contributing
Integration Tests
End-to-end tests use Cypress. Run the full suite locally with npm run cy:ci, which starts the required servers, runs Cypress headless, and shuts the servers down afterwards - be sure you aren't running a dev server on the same ports when testing!
To debug or run individual specs interactively, use npm run cy:dev to open the Cypress runner.
To run a single spec headless, start the servers in one terminal and run that spec in another:
npm run cy:start
# in a second terminal:
npm run cy:run -- --spec "test/e2e-cypress/e2e/features/deep-linking.cy.js"
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 [email protected], 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.
Trang TopGit này là một snapshot — tab "Readme" hiển thị nguyên văn README của repo (đã bỏ link, giữ ảnh). Repo GitHub ở github.com/swagger-api/swagger-ui là nguồn chính thức.
Có — swagger-api/swagger-ui phát hành theo license Apache-2.0, nghĩa là mã nguồn mở để đọc, fork và (tùy license) tái sử dụng. Mã: github.com/swagger-api/swagger-ui.
swagger-api/swagger-ui có trang demo không?
Dự án có trang chủ ở https://swagger.io. Tab "Readme" ở trang này thường có ảnh chụp và hướng dẫn bắt đầu nhanh.
swagger-api/swagger-ui còn đang phát triển không?
Commit gần nhất trên swagger-api/swagger-ui là 3 tháng trước (theo timestamp GitHub). Repo có 9.3k fork — một chỉ báo về mức độ quan tâm của cộng đồng.
swagger-api/swagger-ui dùng license gì?
swagger-api/swagger-ui phát hành theo license Apache-2.0. Nên mở file LICENSE trên GitHub để xác nhận — license metadata đôi khi lệch với thực tế dự án.
Đọc đầy đủ README ở tab phía trên.
Vẫn đang phân vân về swagger-ui?
Một cú bấm sẽ gửi câu hỏi kèm trang này cho AI — xem AI nói gì về swagger-ui.