Skip to content

Commit 8ace490

Browse files
authored
Merge pull request #9 from LibreSign/chore/move-swagger-to-js-implementation
chore: move swagger implementation from iframe to JS
2 parents cb81b79 + e728fa4 commit 8ace490

19 files changed

Lines changed: 18 additions & 16047 deletions

.docker/sphinx/scripts/entrypoint.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,4 @@ echo "🛠️ Building documentation..."
1818
sphinx-autobuild --port 0 /app/docs/user_manual /app/_build/user &
1919
sphinx-autobuild --port 0 /app/docs/admin_manual /app/_build/admin &
2020
sphinx-autobuild --port 0 /app/docs/developer_manual /app/_build/dev &
21-
sphinx-autobuild --port 0 /app/docs/swagger-ui /app/_build/swagger-ui &
2221
sphinx-autobuild --port 0 /app/docs/main /app/_build

docs/developer_manual/api.rst

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,21 @@ API
1010

1111
.. raw:: html
1212

13-
<iframe src="/dev/swagger-ui/index.html" width="100%" height="600px"></iframe>
13+
<link rel="stylesheet" href="swagger-ui.css" />
14+
<script src="swagger-ui-bundle.js"></script>
15+
<script src="swagger-ui-standalone-preset.js"></script>
16+
<div id="swagger-ui"></div>
17+
<script>
18+
window.onload = () => {
19+
const ui = SwaggerUIBundle({
20+
url: 'https://raw.githubusercontent.com/LibreSign/libresign/refs/heads/main/openapi.json',
21+
dom_id: '#swagger-ui',
22+
deepLinking: true,
23+
presets: [
24+
SwaggerUIBundle.presets.apis,
25+
SwaggerUIStandalonePreset
26+
],
27+
layout: "BaseLayout",
28+
});
29+
};
30+
</script>
-665 Bytes
Binary file not shown.
-628 Bytes
Binary file not shown.

docs/developer_manual/html/swagger-ui/index.css

Lines changed: 0 additions & 16 deletions
This file was deleted.

docs/developer_manual/html/swagger-ui/index.html

Lines changed: 0 additions & 19 deletions
This file was deleted.

docs/developer_manual/html/swagger-ui/oauth2-redirect.html

Lines changed: 0 additions & 79 deletions
This file was deleted.

0 commit comments

Comments
 (0)