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:
@@ -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,
|
||||
});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user