RicoSuter / NSwag

The Swagger/OpenAPI toolchain for .NET, ASP.NET Core and TypeScript.
http://NSwag.org
MIT License
6.75k stars 1.29k forks source link

Does UseSwaggerUi3 in Web API 2 uses caching? #2909

Open amgdy opened 4 years ago

amgdy commented 4 years ago

Hello, I am trying to build a dynamic document based on the logged in user and each time the document should show the APIs which the users have permission to it. I use Document Processor to filter out the result however once the site starts it runs the filter onces then it doesn't do though the document processor again. I feel like there is a caching there but don't know it place so I can clear it. it is even there even when I terminal the worker process w3wp which makes me feel it is a file based caching.

How can I clear the cache or force regeneration to the document and let the UI reads it correctly?

I am using ASP.NET 4.8 Web API 2 with NSwag.AspNet.Owin 13.6.1

RicoSuter commented 4 years ago

See https://github.com/RicoSuter/NSwag/blob/master/src/NSwag.AspNet.Owin/Middlewares/OpenApiDocumentMiddleware.cs#L24