You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
using Microsoft.AspNetCore.Mvc.ApiExplorer;
using Microsoft.AspNetCore.Mvc.Controllers;
public class Startup
{
public void ConfigureServices(IServiceCollection services)
{
services.AddMvc();
services.AddSwaggerGen(option =>
{
option.DocInclusionPredicate((name, apiDescription) =>
{
var controllerActionDescription = apiDescription.ActionDescriptor as ControllerActionDescriptor;
// コントローラ名に Api が含まれていたらSwaggerの対象にする
return controllerActionDescription?.ControllerName.Contains("Api") ?? false;
});
option.SwaggerDoc("orders", new Title { Name = "Order APIs", Version = "v1" });
});
}
}
仕様変更箇所の確認
swagger/ui/index.html
⬇️
swagger/index.html
The text was updated successfully, but these errors were encountered: