RicoSuter/NSwag

.net6 minimal API - OpenApiOperation Attribute does not work

Open

#3.802 aberto em 21 de dez. de 2021

Ver no GitHub
 (4 comments) (1 reaction) (0 assignees)C# (1.189 forks)batch import
help wanted

Métricas do repositório

Stars
 (6.291 stars)
Métricas de merge de PR
 (Nenhuma PRs mesclada em 30d)

Description

Using Nswag.Annotations.OpenApiOperation does not seem to work with the new minimal API.

Example code:

var app = builder.Build();
app.MapPost("/Test", Test).WithTags("MyTag");

[OpenApiOperation("MySummary", "MyDescription")]
static string Test(string foo) {
    return foo;
}

Guia do colaborador