1
0
mirror of https://github.com/spacebarchat/docs.git synced 2024-09-19 15:11:44 +02:00

use rapidoc for http api documentation

This commit is contained in:
Madeline 2023-04-28 22:26:57 +10:00
parent 56df74095e
commit 82f944c01c
No known key found for this signature in database
GPG Key ID: 1958E017C36F2E47
3 changed files with 36 additions and 10 deletions

View File

@ -0,0 +1,31 @@
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<script type="module" src="https://unpkg.com/rapidoc/dist/rapidoc-min.js"></script>
</head>
<body>
<rapi-doc
spec-url = "https://raw.githubusercontent.com/spacebarchat/server/master/assets/openapi.json"
theme="dark"
sort-endpoints-by="none"
header-color="#4051b5"
primary-color="#4051b5"
render-style="focused"
schema-expand-level=1
schema-style="table"
default-schema-tab="schema"
show-components="true"
heading-text="Spacebar HTTP API Documentation"
show-curl-before-try="true"
allow-spec-url-load="false"
allow-spec-file-load="false"
>
<a slot="logo" href="https://docs.spacebar.chat" style="margin-left: 20px; width: 30px; height: 30px;">
<img style="width: 30px; height: 30px;" src="https://docs.spacebar.chat/assets/logo.svg" />
</a>
</body>
</html>

View File

@ -1,10 +1,4 @@
# API Routes
<style>
#api-routes, .md-sidebar--secondary {
display: none !important;
}
</style>
<swagger-ui src="https://raw.githubusercontent.com/{{ repositories.server }}/master/assets/openapi.json"/>
<!-- <swagger-ui src="/assets/openapi.json"/> -->
---
title: HTTP API Docs
template: routes.html
---

View File

@ -46,6 +46,7 @@ theme:
toggle:
icon: material/lightbulb
name: Switch to light mode
custom_dir: docs/assets/overrides
features:
- navigation.expand
- navigation.instant