![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
@signalwire-community/docusaurus-preset-openapi
Advanced tools
OpenAPI plugin for generating API reference docs in Docusaurus v2.
Install the preset in your docusaurus project by running:
// with npm
npm install docusaurus-preset-openapi
// with yarn
yarn add docusaurus-preset-openapi
Add your OpenAPI definition to the root of your site dir as openapi.json
(See Configuration options below).
The OpenAPI preset can be used as a drop-in replacement for @docusaurus/preset-classic
, replace it as follows:
/* docusaurus.config.js */
{
presets: [
[
"docusaurus-preset-openapi",
{
// docs: { ... },
// blogs: { ... },
// theme: { ... },
},
],
],
}
Add a link to the API section of your site by updating themeConfig.navbar.items
:
/* docusaurus.config.js */
{
themeConfig: {
navbar: {
items: [
// ... other items
{ to: "/api", label: "API", position: "left" },
// ... other items
],
},
},
}
The OpenAPI plugin can be configured with the following options:
Name | Type | Default | Description |
---|---|---|---|
path | string | 'openapi.json' | Path to OpenAPI definition (json or yaml ) on filesystem relative to site dir. |
routeBasePath | string | 'api' | URL route for the API section of your site. DO NOT include a trailing slash. Use / for shipping API without base path. |
sidebarCollapsible | boolean | true | Whether sidebar categories are collapsible by default. |
sidebarCollapsed | boolean | true | Whether sidebar categories are collapsed by default. |
apiLayoutComponent | string | '@theme/ApiPage' | Root Layout component of each API page. |
apiItemComponent | string | '@theme/ApiItem' | Main API container, with demo panel, pagination, etc. |
remarkPlugins | any[] | [] | Remark plugins passed to MDX. |
rehypePlugins | any[] | [] | Rehype plugins passed to MDX. |
beforeDefaultRemarkPlugins | any[] | [] | Custom Remark plugins passed to MDX before the default Docusaurus Remark plugins. |
beforeDefaultRehypePlugins | any[] | [] | Custom Rehype plugins passed to MDX before the default Docusaurus Rehype plugins. |
Example:
/* docusaurus.config.js */
{
presets: [
[
"docusaurus-preset-openapi",
{
api: {
path: "api/cars.yaml",
routeBasePath: "cars",
// ... other options
}
},
],
],
}
FAQs
OpenAPI preset for Docusaurus.
The npm package @signalwire-community/docusaurus-preset-openapi receives a total of 7 weekly downloads. As such, @signalwire-community/docusaurus-preset-openapi popularity was classified as not popular.
We found that @signalwire-community/docusaurus-preset-openapi demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.