swagger-editor 5.0.0-alpha.86 → 5.0.0-alpha.87

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -555,6 +555,54 @@ SwaggerUI({
555
555
  });
556
556
  ```
557
557
 
558
+ #### Utilizing preview plugins via [unpkg.com](https://unpkg.com/)
559
+
560
+ It's possible to utilize preview plugins in a build-free way via [unpkg.com](https://unpkg.com/) to create a standalone
561
+ multi-spec supporting version of SwaggerUI.
562
+
563
+ ```html
564
+ <!DOCTYPE html>
565
+ <html >
566
+ <head>
567
+ <meta charset="utf-8" />
568
+ <meta name="viewport" content="width=device-width, initial-scale=1" />
569
+ <meta name="theme-color" content="#000000" />
570
+ <meta name="description" content="SwaggerUIMultifold" />
571
+ <link rel="stylesheet" href="//unpkg.com/swagger-editor@5.0.0-alpha.86/dist/swagger-editor.css" />
572
+ </head>
573
+ <body style="margin:0; padding:0;">
574
+ <section id="swagger-ui"></section>
575
+
576
+ <script src="//unpkg.com/swagger-ui-dist@5.11.0/swagger-ui-bundle.js"></script>
577
+ <script src="//unpkg.com/swagger-ui-dist@5.11.0/swagger-ui-standalone-preset.js"></script>
578
+ <script>
579
+ ui = SwaggerUIBundle({});
580
+ // expose SwaggerUI React globally for SwaggerEditor to use
581
+ window.React = ui.React;
582
+ </script>
583
+ <script src="//unpkg.com/swagger-editor@5.0.0-alpha.86/dist/umd/swagger-editor.js"></script>
584
+ <script>
585
+ SwaggerUIBundle({
586
+ url: 'https://petstore3.swagger.io/api/v3/openapi.json',
587
+ dom_id: '#swagger-ui',
588
+ presets: [
589
+ SwaggerUIBundle.presets.apis,
590
+ SwaggerUIStandalonePreset,
591
+ ],
592
+ plugins: [
593
+ SwaggerEditor.plugins.EditorContentType,
594
+ SwaggerEditor.plugins.EditorPreviewAsyncAPI,
595
+ SwaggerEditor.plugins.EditorPreviewApiDesignSystems,
596
+ SwaggerEditor.plugins.SwaggerUIAdapter,
597
+ SwaggerUIBundle.plugins.DownloadUrl,
598
+ ],
599
+ layout: 'StandaloneLayout',
600
+ });
601
+ </script>
602
+ </body>
603
+ </html>
604
+ ```
605
+
558
606
  ### Composing customized SwaggerEditor version
559
607
 
560
608
  SwaggerEditor is just a number of SwaggerUI plugins used with [swagger-ui-react](https://www.npmjs.com/package/swagger-ui-react).