Is there a way to hide the Links column in the Swagger Responses section of the endpoints? We do not use links in the APIs and it just wastes space, so would like to get them gone from all endpoints.
Using ASP.NET Core with .net 8. I looked around but could not find any articles other than the ones explaining what OpenAPI links are for.
According to your description, I suggest you could create a custom CSS and inject it to your swagger UI to hide the link tab.
More details, you could refer to below codes:
1.Create a wwwroot folder , a swagger-ui folder and CSS file with below codes:
.swagger-ui .response-col_links {
min-width: 6em;
display: none;
}
2.Modify the Program.cs as below:
var app = builder.Build();
app.UseStaticFiles();
// Configure the HTTP request pipeline.
if (app.Environment.IsDevelopment())
{
app.UseSwagger();
app.UseSwaggerUI(c =>
{
c.InjectStylesheet("/swagger-ui/custom.css");
});
}
....
Result: