Skip to content

Commit

Permalink
Provide HTTP API reference
Browse files Browse the repository at this point in the history
  This has always been somewhat poorly documented in a nested page of
  the user manual. Now it's more visible and thorough.

  Closes #396.
  • Loading branch information
KtorZ committed Jul 12, 2024
1 parent 95c8799 commit 6410063
Show file tree
Hide file tree
Showing 6 changed files with 431 additions and 3 deletions.
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
---
title: "Changelog"
weight: 5
weight: 6
chapter: false
layout: changelog
pre: "<b>5. </b>"
pre: "<b>6. </b>"
math: true
---

Expand Down
2 changes: 1 addition & 1 deletion docs/content/api/_index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
+++
title = "API Reference (v6.5.*)"
title = "WebSocket API Reference (v6.5.*)"
weight = 4
chapter = false
pre = "<b>4. </b>"
Expand Down
6 changes: 6 additions & 0 deletions docs/content/http-api/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
+++
title = "HTTP API Reference (v6.5.*)"
weight = 5
chapter = false
pre = "<b>5. </b>"
+++
45 changes: 45 additions & 0 deletions docs/layouts/http-api/list.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{{ partial "header.html" . }}
{{ partial "openapi-header.html" . }}
<style>
#body #body-inner {
padding: 0;
}

#navigation,
div#body-inner > h1,
div#head-tags,
#operations > ul > li div.panel-item--center > div:nth-child(3) {
display: none;
}

table,
table tr td {
border: unset !important;
}

ul[role='menu'] ~ div {
display: none;
}
</style>
<redoc id="redoc-container"></redoc>
<script>
Redoc.init(`/openapi.yaml`, {
disableSearch: true,
hideDownloadButton: true,
hideRequestPayloadSample: true,
simpleOneOfTypeLabel: true,
expandResponses: '200,201',
theme: {
logo: {
gutter: '2rem',
},
sidebar: {
width: '0px',
},
rightPanel: {
width: '45%',
}
}
}, document.getElementById('redoc-container'));
</script>
{{ partial "footer.html" . }}
1 change: 1 addition & 0 deletions docs/layouts/partials/openapi-header.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<script src="https://cdn.jsdelivr.net/npm/redoc@2.1.5/bundles/redoc.standalone.js"></script>
Loading

0 comments on commit 6410063

Please sign in to comment.