Package Exports
- swagger-ui-react
- swagger-ui-react/swagger-ui.css
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (swagger-ui-react) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
swagger-ui-react
swagger-ui-react is a flavor of Swagger UI suitable for use in React applications.
It has a few distinctions from the mainstream version of Swagger UI:
- Exports a component instead of a constructor function
- Declares
reactandreact-domas peerDependencies
Versions of this module mirror the version of Swagger UI included in the distribution.
Quick start
Install swagger-ui-react:
$ npm i --save swagger-ui-reactUse it in your React application:
import SwaggerUI from "swagger-ui-react"
import "swagger-ui-react/swagger-ui.css"
export default AppComponent = () => <SwaggerUI url="https://petstore.swagger.io/v2/swagger.json" />Configuration
TODO
Limitations
- Not all configuration bindings are available.
- Custom plugins are not officially supported.
- OAuth redirection handling is not supported.
- Topbar/Standalone mode is not supported.
For anything else, check the Swagger-UI repository.