-
Notifications
You must be signed in to change notification settings - Fork 8
Closed
Description
Hello,
When I cloned your project I found the UI never displayed in http://localhost:52530/docs/index.html?url=/docs/api-specification.json due to UseSpaStaticFiles.
I found changing the Startup.cs to call UseSwaggerUi3 before UseSpaStaticFiles resolved the problem:
app.UseStaticFiles();
// Register the Swagger generator and the Swagger UI middlewares
// NSwage.MsBuild + adding automation config in GhostUI.csproj makes this part of the build step (updates to API will be handled automatically)
app.UseOpenApi();
app.UseSwaggerUi3(settings =>
{
settings.Path = "/docs";
settings.DocumentPath = "/docs/api-specification.json";
});
app.UseSpaStaticFiles();
app.UseRouting();
Not sure if that's the best workaround, but it worked.
Metadata
Metadata
Assignees
Labels
No labels