Swagger API won't load in latest version

Hi,

After upgrading to 4.5.10 the swagger api won’t load. I am getting static file “http://localhost/dr/swagger-ui” not found error in console.

Going back to v4.5.8 works just fine.

Are you using ServiceStack.Swagger plugin or ServiceStack.Api.OpenApi? Can you provide more detailed information about your configuration of the plugin? And what is /dr/swagger-ui, by default swagger is located under /swagger-ui

I am using ServiceStack.Swagger plugin. I am not doing any special configuration with Swagger. /dr/swagger-ui/ is url where Swagger api is located and not a static resource. Most confusing part is that all I did is upgraded to new version and it stopped working, and after downgrading it starts to work again.

Can you provide a stand-alone example which shows the issue? If create new project with Swagger UI it works correctly and starting page is opened from /swagger-ui path. No /dr prefix is here. Maybe you do some route redirections in the code?

I can but my question is what is so different about v4.5.10 that caused it to not work? It worked just fine when I went back to v4.5.8 without any code changes.

We don’t know, it’s working for us that’s why we need a repro to be able to identify the issue. The Swagger Feature itself hasn’t changed, one thing that might’ve effected it is having converted all source projects to use the new MSBuild VS2017 format. But we can’t pinpoint the issue here. BTW why do you have a /dr prefix?

latest build fixed this issue. Thanks

1 Like

Were you using the .Signed packages? I was, and 4.5.10 had an issue with those - the latest packages from the MyGet fixed this.

Mike,

Yes I am using .Signed packages.

Then, to answer your earlier question “what is so different about v4.5.10 that caused it to not work? It worked just fine when I went back to v4.5.8 without any code changes” - A problem was introduced in 4.5.10 with signed packages.