Issue trying to implement the Swagger UI module in Drupal: ReferenceError: SwaggerUIBundle is not defined I am trying to integrate the Swagger UI module into Drupal 8 after adding custom REST routes/resources. I have installed the OpenAPI, OpenAPI_UI, and OpenAPI_Rest modules and I'm able to get a valid swagger json resource back when navigating to &lt;mysite&gt;/openapi/rest after installing all the modules.
The issue I am having now is trying to get the Swagger UI module to render in the OpenAPI module.  After navigating to Administration -&gt; Configuration -&gt; Web Services -&gt; OpenAPI Resources I am able to select the Explore with Swagger button, which should utilize the Swagger UI Module which has been installed following the steps listed here: https://www.drupal.org/project/openapi_ui_swagger
Navigating to the page leads to an empty table, and digging into the console, I get this error:
js_gIQezLRH6hj-zYPQQ0n_5_ryM5tJpAP9kDSEP7r8TdE.js:1544 Uncaught ReferenceError: SwaggerUIBundle is not defined
    at Object.attach (js_gIQezLRH6hj-zYPQQ0n_5_ryM5tJpAP9kDSEP7r8TdE.js:1544)
    at js_gIQezLRH6hj-zYPQQ0n_5_ryM5tJpAP9kDSEP7r8TdE.js:59
    at Array.forEach (&lt;anonymous&gt;)
    at Object.Drupal.attachBehaviors (js_gIQezLRH6hj-zYPQQ0n_5_ryM5tJpAP9kDSEP7r8TdE.js:56)
    at js_gIQezLRH6hj-zYPQQ0n_5_ryM5tJpAP9kDSEP7r8TdE.js:284
    at HTMLDocument.listener (js_gIQezLRH6hj-zYPQQ0n_5_ryM5tJpAP9kDSEP7r8TdE.js:276)

This is being thrown inside the swagger.js file inside the Swagger UI module:
 var config = {
        dom_id: dom_id,
        presets: [
          SwaggerUIBundle.presets.apis,
          SwaggerUIStandalonePreset
        ],
        plugins: [
          SwaggerUIBundle.plugins.DownloadUrl,
          SwaggerUIHideTopbarPlugin
        ],
        layout: &quot;StandaloneLayout&quot;
      }

It seems like the SwaggerUIBundle and other Swagger JS objects aren't being exported properly and JS is throwing the UncaughtReferenceError when accessing these members. Has anyone come across this error before? I am pretty new to Drupal and I'm trying to figure out what the issue is, because it seems like I've followed the steps properly to get everything working.
This also seems to be close to what I am experiencing, but unfortunately there was no posted resolution: https://www.drupal.org/project/openapi_ui_swagger/issues/3073250
I seem to have found a resolution to this issue.
In the installation notes for the SwaggerUI module, the instructions state to add this block of code to the composer.json
&quot;extra&quot;: {
  &quot;installer-paths&quot;: {
    ...
    &quot;web/libraries/{$name}&quot;: [&quot;swagger-api/swagger-ui&quot;, &quot;type:drupal-library&quot;],
    ...
  }
}

When running composer install, composer will place the external swagger-api in the /web/libraries/&lt;whatever&gt; directory.
In the openapi_ui_swagger.libraries.yml file located within the SwaggerUI module, it is pulling in the external swagger-api here:
swagger_ui:
  js:
    /libraries/swagger-ui/dist/swagger-ui-bundle.js: {}
    /libraries/swagger-ui/dist/swagger-ui-standalone-preset.js: {}
  css:
    theme:
      /libraries/swagger-ui/dist/swagger-ui.css: { minified: true }

swagger_ui_integration:
  js:
    js/swagger.js: {}
  dependencies:
    - core/jquery
    - core/drupal
    - openapi_ui_swagger/swagger_ui

The library paths need to be updated to match the directories created in the installation notes:
js:
    /web/libraries/swagger-ui/dist/swagger-ui-bundle.js: {}
    /web/libraries/swagger-ui/dist/swagger-ui-standalone-preset.js: {}
  css:
    theme:
      /web/libraries/swagger-ui/dist/swagger-ui.css: { minified: true }