0
votes

I have been developing a WebApi2 REST API with swagger docs (using swashbuckle) for a while now however in my local sandbox version I cannot get to the SwaggerUI, nor the swagger xml via a GET request. I have compared swagger setup between my code versions and there has not been any code changes in this area. I have uninstalled swashbuckle and IISExpress without any effect. I am running out of ideas and I would appreciate some advice on next steps to try and debug the swagger generation / or find out if there is any logging I can switch on the help diagnose further.

Apologies for posting such a general problem, but I am at a loss after looking at this for about 5 hours now.

Thanks

Mark

1
What is url of your SwaggerUI? What does happen when you navigate to that url? Do you get an error message? Did you inspect the HTTP messages using a tool like Fiddler? - venerik
404 both for this and also going direct for the v1 doc - I will leave this open for a bit in case it helps collate info for others, but I ended up reverting and applying my changes again - Mark Ruse
Did you ever figure this out? - bsayegh
Unfortunately not - reverting to a working version and applying my changes was the only solution I could find. Do you have the same issue? - Mark Ruse

1 Answers

0
votes

I know it's an old question, but something similar happened to me and might happen to somebody else. The csproj has the "Build > XML doc file" config set. Swagger stopped generating the right docs because this option got unchecked, I might have disabled it accidentally. Checking it again and setting the value used in Swashbuckle config did the trick!