1
0
Files
breadcrumb-the-shire/modules/api-docs/web/js/pages/admin-api-docs-index.js
fs 02a7d2fe90 feat(api-docs): extract API docs viewer into standalone module
Move the Swagger UI viewer from core (pages/admin/api-docs/) into
modules/api-docs/ as a self-contained module. Create module manifest
with routes, permission, sidebar.admin_nav_item slot, asset group,
and authorization policy. Remove API docs ability from core
OperationsAuthorizationPolicy and UiCapabilityMap. Remove hardcoded
sidebar nav item — now contributed via module slot. Add
admin-automation group meta to sidebar template for module nav items.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 14:02:42 +01:00

17 lines
445 B
JavaScript

const container = document.getElementById('swagger-ui');
if (container && window.SwaggerUIBundle) {
window.SwaggerUIBundle({
url: container.dataset.specUrl || '',
dom_id: '#swagger-ui',
deepLinking: false,
displayRequestDuration: true,
filter: true,
docExpansion: 'list',
supportedSubmitMethods: [],
tryItOutEnabled: false,
presets: [window.SwaggerUIBundle.presets.apis],
layout: 'BaseLayout',
});
}