I\'m trying to open my self generated swagger specification file my.json with swagger-ui on my local computer.
So I downloaded the latest tag v2.1.8-M1
I had that issue and here is much simpler solution:
Replace default petstore url in dist/index.html with your localhost/api-docs or to make it more generalized, replace with this:
location.protocol+'//' + location.hostname+(location.port ? ':' + location.port: '') + "/api-docs";
Hit again localhost/swagger-ui
Voila! You local swagger implementation is ready