Open ideafixxxer opened 5 years ago
My strong opinion is that it should the default implementation.
I think you are right with this... I'm a bit hesitant as this might be a breaking change...
I think you are right with this... I'm a bit hesitant as this might be a breaking change...
I agree, it is used in many places, and in fact it does break RedirectToIndexMiddleware
! I have to figure out how to fix it now...
Indeed, if you find a way which just works i’m more then happy to merge it 🙂 but i doubt that this can be automatically fixed...
So far I worked around it the consumer code
settings.TransformToExternalPath = (url, request) => url.EndsWith(".json", System.StringComparison.OrdinalIgnoreCase)
? request.PathBase + url
: url;
Maybe TransformToExternalPath
should be defined on the SwaggerUi3Route
level?
I've to use the fix, because when using external specs the default imp adds '/' on the url start.
Related: #1914
When using multiple Swagger Documents with UI3 on ASP.NET OWIN, the default implementation of TransformToExternalPath results in all references to swagger.json to be unresolved.
For example:
My app is hosted at
https://localhost/services/api/
, however the web browser is searching the file athttps://localhost/v1/swagger.json
. Adding the following line fixes the issue:My strong opinion is that it should the default implementation.