'JSON Web APIs from gRPC Change Swagger Operation Tag

i created a web api from a grpc service (https://docs.microsoft.com/en-us/aspnet/core/grpc/httpapi?view=aspnetcore-6.0) and started the swagger page: Swagger

where can i change the Operation Tag fom the Swagger? Now the operation tag is generated by proto filename + service name (greet.Greeter1)

here my swagger options from program.cs

builder.Services.AddSwaggerGen(c =>
{
    c.SwaggerDoc("v1", new OpenApiInfo { Title = "My API", Version = "v1" });
    c.TagActionsBy(api => new[] { api.GroupName });
    c.DocInclusionPredicate((name, api) => true);
});

and in Service:

 [ApiExplorerSettings(GroupName = "Custom Group Name")]
    public class GreeterService : Greeter1.Greeter1Base
    {
        private readonly ILogger<GreeterService> _logger;
        public GreeterService(ILogger<GreeterService> logger)
        {
            _logger = logger;
        }

that gives ne the following result:

Swagger no description

How can i change the operation tag and add a description?

thanks for your help!



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source