File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- // Swagger JS must be standalone because it is also used by external render like "OpenAPI render".
2- // Avoid importing other JS modules to prevent unnecessary code and dependencies and chunks.
1+ // AVOID importing other unneeded main site JS modules to prevent unnecessary code and dependencies and chunks.
2+ //
3+ // Swagger JS is standalone because it is also used by external render like "File View -> OpenAPI render",
4+ // and it doesn't need any code from main site's modules (at the moment).
5+ //
6+ // In the future, if there are common utilities needed by both main site and standalone Swagger,
7+ // we can merge this standalone module into "index.ts", do pay attention to the following problems:
8+ // * HINT: SWAGGER-OPENAPI-VIEWER: there are different places rendering the swagger UI.
9+ // * Handle CSS styles carefully for different cases (standalone page, embedded in iframe)
10+ // * Take care of the JS code introduced by "index.ts" and "iife.ts", there might be global variable dependency and event listeners.
311
412import '../css/standalone-swagger.css' ;
513import SwaggerUI from 'swagger-ui-dist/swagger-ui-es-bundle.js' ;
You can’t perform that action at this time.
0 commit comments