Added redirects in the warp servers from /swagger-ui
to /swagger-ui/
#171
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Extra info:
in the warp examples, http://localhost:8080/swagger-ui doesn't work, but http://localhost:8080/swagger-ui/ does. Unfortunately, there doesn't seem to be a simple way to enforce that in
warp
(see seanmonstar/warp#584), so I added a manual redirect. This way, futurewarp
users will be aware of this pitfall.Commit message follows:
The ui only works if you go to
/swagger-ui/
with a tailing/
.If you browse to
/swagger-ui
, you get an unhelpful blank page,due to the relative links for JS, CSS, et al files.
My investigation indicates that the best way to fix this in
warp
is to manually create a redirect.
So I updated the
warp
examples to have this(I am unsure if the other servers have the same problem)
I considered using a regex on the full path
instead of passing in both the path and tail,
but I decided passing along two strings was more efficient than
running a full regex every time