Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

swagger.json doesn't update according to code changes on deployment

I have a problem with the Swagger UI (or the swagger.json file specifically) not being updated when I deploy my code to the server. If I go to the Swagger UI page, the server gives me an old version of the docs.

Everything works locally, so the problem must be related to the deployment process or IIS.

Any ideas on what might cause this, and how I can fix it?

I have tried the following:

  • Deleted the XML-comments file generated by Web API and regenerated it
  • Restarted the IIS site on the server
  • Deleted all files in the site and redeployed
  • Numerous redeployments

(using Swashbuckle for .NET Framework, not .NET Core)

like image 932
msk Avatar asked May 30 '26 02:05

msk


1 Answers

You may need to clear your browser's cache. I just encountered this problem and solved by clear my browser's cache

like image 103
Wagner Avatar answered May 31 '26 20:05

Wagner