I'm using the module and javascript works perfectly, only the style is missing. A patch for review is forthcoming.

Comments

mgalalm created an issue. See original summary.

mgalalm’s picture

StatusFileSize
new448 bytes

This patch is adding /libraries/swagger-ui/dist/swagger-ui.css

richgerdes’s picture

Thanks for catching this. I will have to test to see for sure why the library is missing, but likely it should be included here.

A quick review of the patch before I get to testing, the css file should be added to the swagger_ui library, not swagger_ui_integration.

diff --git a/openapi_ui_swagger.libraries.yml b/openapi_ui_swagger.libraries.yml
index fb151c4..fee7488 100644
--- a/openapi_ui_swagger.libraries.yml
+++ b/openapi_ui_swagger.libraries.yml
 swagger_ui_integration:
+  css:
+    theme:
+      /libraries/swagger-ui/dist/swagger-ui.css: { minified: true }
mgalalm’s picture

StatusFileSize
new472 bytes

Moved under swagger_ui, Thanks for the feedback :)

mgalalm’s picture

Status: Active » Needs review

richgerdes’s picture

Status: Needs review » Fixed

I tested the swagger ui, and the css was infact not getting loaded. The patch fixed this, and has been applied. I have created a new release which includes the fixed library.

Thanks for finding the bug and putting the patch together!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.