IIS site within virtual directory Swagger UI end point

前端 未结 5 370
我在风中等你
我在风中等你 2020-12-19 00:35

Swagger UI end point is not same as dev in staging ( excluding domain names)

IIS Configuration

public void Configure(IApplicationBuilder app         


        
5条回答
  •  南方客
    南方客 (楼主)
    2020-12-19 01:16

    Unfortunately, None of them works for me.
    I have tried all of them.

    Working solution:

    app.UseSwagger(c => {
        c.RouteTemplate = "swagger/{documentName}/swagger.json";
    });
    
    app.UseSwaggerUI(c => {
        c.SwaggerEndpoint("v1/swagger.json", "My API V1");
    });
    

提交回复
热议问题