Closed vabka closed 3 days ago
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.
@vabka, I have just see the related issue dotnet/aspnetcore#56585. And is the comment that captainsafia makes. It's other groupName, and to see it on Swagger I have just added this:
builder.Services.AddSwaggerGen(c =>
{
c.EnableAnnotations();
c.IncludeXmlComments(Assembly.GetExecutingAssembly());
c.SwaggerDoc("v1", new() { Title = "WebApi V1", Version = "v1" });
c.SwaggerDoc("test", new() { Title = "WebApi test", Version = "test" });
})
And this:
app.UseSwaggerUI(o =>
{
o.SwaggerEndpoint("/swagger/v1/swagger.json", "V1 Docs");
o.SwaggerEndpoint("/swagger/xml/swagger.json", "V2 Docs");
})
It just acts as describing multiple documents
Not expected that i'll get solution after 3 years :) I expected that WithGroupName will group endpoints in single document but not create new document.
What option can be used to group endpoints? (like how Controller does)
The option is WithTags, see this example https://github.com/domaindrivendev/Swashbuckle.AspNetCore/blob/master/test%2FWebSites%2FWebApi%2FEndPoints%2FOpenApiEndpoints.cs#L20-L21
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.
Swashbuckle.AspNetCore version: 6.2.3 .NET Version: 6.0.100-rc.2.21505.57 My code: