RicoSuter/NSwag

.net6 minimal API - OpenApiOperation Attribute does not work

Open

#3 802 ouverte le 21 déc. 2021

Voir sur GitHub
 (4 commentaires) (1 réaction) (0 assignés)C# (1 189 forks)batch import
help wanted

Métriques du dépôt

Stars
 (6 291 stars)
Métriques de merge PR
 (Aucune PR mergée en 30 j)

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;
}

Guide contributeur