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:
parent
56df74095e
commit
82f944c01c
31
docs/assets/overrides/routes.html
Normal file
31
docs/assets/overrides/routes.html
Normal 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>
|
@ -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
|
||||
---
|
||||
|
@ -46,6 +46,7 @@ theme:
|
||||
toggle:
|
||||
icon: material/lightbulb
|
||||
name: Switch to light mode
|
||||
custom_dir: docs/assets/overrides
|
||||
features:
|
||||
- navigation.expand
|
||||
- navigation.instant
|
||||
|
Loading…
Reference in New Issue
Block a user