Replace static Swagger-ui distribution with unpkg version#1604
Replace static Swagger-ui distribution with unpkg version#1604LisaFC merged 12 commits intogoogle:mainfrom
Conversation
|
Sure, happy to help, looks good from a quick glance but agree we'll need to check it works - is there a reason why you can't test it in your own project? |
|
Currently don't have a local Docsy project running and got confused by |
|
Ah, gotcha - an easy way is to just look at the Netlify deploy preview as our docs use a huge range of Docsy features, but we don't have a Swagger UI page in the Docsy docs so the changes won't do anything in the site (other than confirm that they don't break anything else, that all seems fine....). My usual slightly clunky approach (which is what I'll do if I need to test this :) ) is to clone/use a clone of the Docsy Example site, make the local overrides to the theme, add a Swagger UI page with the Swagger test "pet store" API, and then run it either locally or with Netlify and see whether the page shows up properly. @chalin any thoughts? |
|
Seems to be working fine! To test this, I modified the following lines in the # hugo module configuration
[module]
# uncomment line below for temporary local development of module
replacements = "github.com/theletterf/docsy -> ../../docsy"
[module.hugoVersion]
extended = true
min = "0.110.0"
[[module.imports]]
path = "github.com/theletterf/docsy"
disable = false
[[module.imports]]
path = "github.com/google/docsy/dependencies"
disable = falseThe only thing that bothers me is that the version number of the spec appears with white background, which makes it hard to read. Would it make sense to add some CSS? |
|
@LisaFC Even though it's slightly out of scope, I've fixed the color issue and added a |
|
Oh that looks great! I see what you mean about the background contrast issue - @chalin what do you think? |
|
@LisaFC - can you give your stamp of approval too? |
deining
left a comment
There was a problem hiding this comment.
LGTM now.
Can you rebase your PR to HEAD of main, please?
|
@deining Done |
|
Can't merge on my own! |
|
@LisaFC - still awaiting your approval here |
LisaFC
left a comment
There was a problem hiding this comment.
Looks fantastic - sorry for the late review.


This PR removes the static assets for swagger-ui and adds unpkg includes instead. I've also edited the docs accordingly.