BookShop.Api.Configuration.MiddlewareConfiguration.UseSwagger C# (CSharp) Method

UseSwagger() public static method

public static UseSwagger ( IApplicationBuilder app, string endpointName ) : void
app IApplicationBuilder
endpointName string
return void
        public static void UseSwagger(this IApplicationBuilder app, string endpointName)
        {
            app.UseSwagger();
            app.UseSwaggerUI(setup =>
            {
                setup.RoutePrefix = string.Empty;

                setup.SwaggerEndpoint(
                    url: "/swagger/v1/swagger.json",
                    name: endpointName);
            });
        }
MiddlewareConfiguration