JSPM

swagger-ui-react

0.0.0-alpha.2
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 426807
  • Score
    100M100P100Q202598F
  • License Apache-2.0

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

NPM version

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 react and react-dom as 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-react

Use 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.