npm install @readyapi/docusaurus
Simple add to the plugins section of your Docusaurus config. If you are using typescript you can import the type options type as well
import type { ScalarOptions } from '@readyapi/docusaurus'
plugins: [
[
['@readyapi/docusaurus', {
label: 'Scalar',
route: '/scalar',
configuration: {
spec: {
url: 'https://petstore3.swagger.io/api/v3/openapi.json',
},
},
} as ScalarOptions],
],
],
You can find an example in this repo under examples/docusaurus
These configuration options are a WIP as this plugin is still in beta
The label on the nav bar for this route
Path at which the API Reference will be shown
You can find the full configuration options under packages/api-reference minus theme.