Merge pull request #921 from btat/add-api-plugin

Add API plugin
This commit is contained in:
Billy Tat
2023-10-12 09:04:18 -07:00
committed by GitHub
6 changed files with 6347 additions and 14 deletions

View File

@@ -172,6 +172,24 @@ module.exports = {
},
},
],
[
'redocusaurus',
{
// Plugin Options for loading OpenAPI files
specs: [
{
id: 'rancher-api',
spec: 'openapi/swagger.json',
// route: '/api/',
},
],
// Theme Options for modifying how redoc renders them
theme: {
// Change with your site colors
primaryColor: '#1890ff',
},
},
],
],
plugins: [
[

5533
openapi/swagger.json Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -23,6 +23,7 @@
"prism-react-renderer": "^1.3.3",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"redocusaurus": "^1.6.3",
"remark-cli": "^11.0.0",
"remark-lint-no-dead-urls": "^1.1.0",
"remark-validate-links": "^12.1.0",

View File

@@ -0,0 +1,7 @@
---
title: API Reference
---
import ApiDocMdx from '@theme/ApiDocMdx';
<ApiDocMdx id="rancher-api" />

View File

@@ -1262,6 +1262,13 @@
}
]
},
"contribute-to-rancher"
"contribute-to-rancher",
{
"type": "category",
"label": "API",
"items": [
"api/api-reference"
]
}
]
}

793
yarn.lock

File diff suppressed because it is too large Load Diff