0.1.57 • Published 1 year ago

@readyapi/api-reference-react v0.1.57

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

Scalar API Reference React Component

Version Downloads License Discord

Installation

npm install @readyapi/api-reference-react

Usage

import { ApiReferenceReact } from '@readyapi/api-reference-react'
import React from 'react'

function App() {
  return (
    <ApiReferenceReact
      configuration={{
        spec: {
          url: 'https://petstore3.swagger.io/api/v3/openapi.json',
        },
      }}
    />
  )
}

export default App

Example

You can find an example in this repo under examples/react

Props

ApiReference only takes one prop which is the configuration object.

configuration: ReferenceProps

You can find the full configuration options under packages/api-reference.