add swagger docs to api

This commit is contained in:
2026-05-27 23:01:48 +02:00
parent 2413cf18c2
commit f69d7be71d
4 changed files with 140 additions and 2 deletions
+20
View File
@@ -0,0 +1,20 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Chess Scribe API Docs</title>
<link rel="stylesheet" href="https://unpkg.com/swagger-ui-dist@5/swagger-ui.css" />
</head>
<body>
<div id="swagger-ui"></div>
<script src="https://unpkg.com/swagger-ui-dist@5/swagger-ui-bundle.js"></script>
<script>
window.onload = () => {
window.ui = SwaggerUIBundle({
url: '/swagger.json', // <-- Tells Swagger where to fetch your spec
dom_id: '#swagger-ui',
});
};
</script>
</body>
</html>