e469508570
- Swagger UI v5.32.1 lokaal in assets/swagger-ui/ (geen CDN, offline bruikbaar) - webui/html/docs/index.html: custom pagina die /api/openapi.json laadt met requestInterceptor zodat Try it out via same-origin werkt - Link toegevoegd aan dashboard "Snel acties": API docs ↗ (opent in nieuw tabblad) - Docstrings toegevoegd aan destructieve endpoints (app_containers, app_images): container stop/restart, image remove (batch + single), image prune geven nu ⚠️-waarschuwingen in de Swagger UI beschrijving - Backend rebuild nodig voor docstrings zichtbaar in spec Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
40 lines
1.3 KiB
HTML
40 lines
1.3 KiB
HTML
<!doctype html>
|
|
<html lang="nl">
|
|
<head>
|
|
<meta charset="utf-8" />
|
|
<meta name="viewport" content="width=device-width,initial-scale=1" />
|
|
<title>API Documentatie — Podman MVP</title>
|
|
<link rel="stylesheet" href="../assets/swagger-ui/swagger-ui.css" />
|
|
<style>
|
|
body { margin: 0; }
|
|
.topbar { background: #1a1a2e; padding: 12px 20px; display: flex; align-items: center; gap: 16px; }
|
|
.topbar a { color: #ccc; text-decoration: none; font-size: 0.85rem; }
|
|
.topbar a:hover { color: #fff; }
|
|
.topbar-title { color: #fff; font-weight: 600; font-size: 1rem; }
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div class="topbar">
|
|
<span class="topbar-title">Podman MVP — API Documentatie</span>
|
|
<a href="/">← Terug naar UI</a>
|
|
</div>
|
|
<div id="swagger-ui"></div>
|
|
<script src="../assets/swagger-ui/swagger-ui-bundle.js"></script>
|
|
<script>
|
|
SwaggerUIBundle({
|
|
url: '/api/openapi.json',
|
|
dom_id: '#swagger-ui',
|
|
deepLinking: true,
|
|
presets: [SwaggerUIBundle.presets.apis, SwaggerUIBundle.SwaggerUIStandalonePreset],
|
|
layout: 'BaseLayout',
|
|
tryItOutEnabled: true,
|
|
requestInterceptor: (req) => {
|
|
// Zorg dat Try it out via dezelfde origin gaat (geen CORS issues)
|
|
req.url = req.url.replace(/^https?:\/\/[^/]+/, '');
|
|
return req;
|
|
},
|
|
});
|
|
</script>
|
|
</body>
|
|
</html>
|