-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Root tags object not showing #2530
Comments
I'm not familiar with the |
Hello, either the [Tags("Session")] from Microsoft.AspNetCore.Http or [SwaggerOperation(Tags = new[] { "Session" }] from Swashbuckle.Swagger.Annotations And they work in some instance since they are able to get appended to the method information But the array tags at the root level object, that encompasses all the tags available in the api, remains empty. I did a workaround where I create a |
Hello, please see the linked PR #2565 that adds support for the |
Hi, any update for ” the array tags at the root level object, that encompasses all the tags available in the api, remains empty“ ? Solved with: using System.Linq;
using Microsoft.OpenApi.Models;
using Swashbuckle.AspNetCore.SwaggerGen;
public class SwaggerTagsFilter : IDocumentFilter
{
public void Apply(OpenApiDocument swaggerDoc, DocumentFilterContext context)
{
swaggerDoc.Tags = swaggerDoc.Paths.SelectMany(p => p.Value.Operations)
.SelectMany(o => o.Value.Tags)
.Select(t => t.Name)
.Where(g => !string.IsNullOrWhiteSpace(g))
.Select(name => new OpenApiTag { Name = name })
.ToList();
}
} |
This issue is stale because it has been open for 60 days with no activity. It will be automatically closed in 14 days if no further updates are made. |
This issue is stale because it has been open for 60 days with no activity. It will be automatically closed in 14 days if no further updates are made. |
This issue was closed because it has been inactive for 14 days since being marked as stale. |
I set the attribute [Tags("...")] in the Controler and despite having my openapi.json object with tags under the designated methods, eg:
"paths": { "/sessions": { "post": { "tags": [ "Authentication Session" ], "summary": "Create a session",
The root object tags is not created. Any idea what's missing ?
The text was updated successfully, but these errors were encountered: