Fix empty Swagger UI: drop invalid presets/layout config

SwaggerUIBundle.presets.apisAndSaver does not exist (undefined), which broke
initialization and rendered nothing. Use the minimal canonical config (url,
dom_id, deepLinking, persistAuthorization) and drop the now-unused standalone
preset script.

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2026-07-03 21:37:00 +02:00
co-authored by Claude
parent 88875dbc33
commit 674dba40fa
-3
View File
@@ -1737,15 +1737,12 @@ initializeDatabase().then(() => {
</div>
<div id="swagger-ui"></div>
<script src="https://unpkg.com/swagger-ui-dist@5/swagger-ui-bundle.js" charset="UTF-8"></script>
<script src="https://unpkg.com/swagger-ui-dist@5/swagger-ui-standalone-preset.js" charset="UTF-8"></script>
<script>
window.onload = () => {
window.ui = SwaggerUIBundle({
url: ${JSON.stringify(specUrl)},
dom_id: '#swagger-ui',
deepLinking: true,
presets: [SwaggerUIBundle.presets.apisAndSaver, SwaggerUIStandalonePreset],
layout: 'StandaloneLayout',
persistAuthorization: true,
});
};