forked from fa/breadcrumb-the-shire
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>
17 lines
445 B
JavaScript
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',
|
|
});
|
|
}
|