mirror of
https://github.com/wassname/Open-Assistant.git
synced 2026-07-17 01:20:05 +08:00
Nicer docusaurus openapi docs (#722)
- uses this plugin (https://github.com/cloud-annotations/docusaurus-openapi) to make a nice static site docusaurus based api section of docs site. - adds some nicer postman code snippets etc too as part of api docs. - makes api docs more "self hosted" as opposed to the dynamic swagger url approach.
This commit is contained in:
@@ -32,12 +32,15 @@ const config = {
|
||||
|
||||
presets: [
|
||||
[
|
||||
"classic",
|
||||
"docusaurus-preset-openapi",
|
||||
/** @type {import('@docusaurus/preset-classic').Options} */
|
||||
({
|
||||
docs: {
|
||||
sidebarPath: require.resolve("./sidebars.js"),
|
||||
},
|
||||
api: {
|
||||
path: "docs/api/openapi.json",
|
||||
},
|
||||
blog: false,
|
||||
theme: {
|
||||
customCss: require.resolve("./src/css/custom.css"),
|
||||
@@ -62,11 +65,7 @@ const config = {
|
||||
position: "left",
|
||||
label: "Docs",
|
||||
},
|
||||
{
|
||||
href: "https://editor.swagger.io/?url=https://raw.githubusercontent.com/LAION-AI/Open-Assistant/main/docs/docs/api/openapi.json",
|
||||
label: "API",
|
||||
position: "left",
|
||||
},
|
||||
{ to: "/api", label: "API", position: "left" },
|
||||
{
|
||||
href: "https://github.com/LAION-AI/Open-Assistant",
|
||||
label: "GitHub",
|
||||
|
||||
Reference in New Issue
Block a user