Version 2.1.0 and 2.2.0
If user request routeprefix + index.html (for example /swagger/ui/index.html) the swagger UI default petstore sample is returned.
Looking at source it shows that the https://github.com/domaindrivendev/Swashbuckle.AspNetCore/blob/master/src/Swashbuckle.AspNetCore.SwaggerUI/SwaggerUIBuilderExtensions.cs adds the fileserver which will return the embedded resources from the assembly.
Also there are some exclusion in the project file https://github.com/domaindrivendev/Swashbuckle.AspNetCore/blob/master/src/Swashbuckle.AspNetCore.SwaggerUI/Swashbuckle.AspNetCore.SwaggerUI.csproj, should it actually exclude that index.html?
Would be nice if these embedded resources are needed for some purpose then we should be able to hide these with some new settings other option is to create own route rules that do redirect if some user tries to get the index.html file.
Thanks for your great work, Antti :)
Can confirm this problem.
Up until a few moments ago, the excludes were in master only (i.e. not published). If you try the latest release (v2.3.0), this should be resolved.
Tested and works. Slap me if it is a "no, no" to comment on a closed ticket ;)
Thanks for the ultra fast fix!
Most helpful comment
Up until a few moments ago, the excludes were in master only (i.e. not published). If you try the latest release (v2.3.0), this should be resolved.