-
Notifications
You must be signed in to change notification settings - Fork 225
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Swagger-UI 3.x not loading 3.x Themes #28
Comments
I'm not that proficient with editing docker images but after playing around with Swagger UI 3.x locally again it appears that even if you remove the Workaround: I know this isn't best practice to load the css last but seems to be a hierarchy issue on when things get loaded into the index.html. Hope this helps! |
That worked, thanks! Haha now I just need to figure out how to enforce horizontal scrollbars on schema models with long lines (i.e. no auto horizontal scrollbars like in Swagger 2.x). Any idea where to look to change scrollbar behavior (feel free to close this issue)? |
No problem, glad I could help. I've noticed the horizontal scroll issue as well, however I haven't spent enough time investigating how to implement. I might be worth checking with the swagger ui project and seeing if there are any open issues regarding that. |
would be helpful to include this in the front README as I spent quite a bit of time trying to debug before thinking to checked "closed" issues |
@todd-richmond Will include into README. Thanks for the suggestion. |
Preface: Apologies if this is a noobish question, Frontend development is not my domain of expertise. :(
I cannot get Swagger-UI 3.x to load any 3.x swagger-ui-theme CSS. Rather, the default CSS theme is always being loaded. Using my browser's debug tools I can see the JS console is error free, and the theme-xxx.css I specify (using your instructions) is in fact being served to the browser.
Below is a Dockerfile and a couple BASH commands to replicate the issue quickly (all work on Linux or Windows + Cygwin + Docker Toolbox).
Dockerfile
:Use your favorite means to obtain your preferred 3.x theme CSS from this repo (in my case feeling-blue).
Obtain the swagger-ui
index.html
via this link (you may need to fix the paths to the swagger-ui js components) or from the docker image referenced in the first line:The text was updated successfully, but these errors were encountered: