RicoSuter/NSwag

.net6 minimal API - OpenApiOperation Attribute does not work

Open

#3802 aperta il 21 dic 2021

Vedi su GitHub
 (4 commenti) (1 reazione) (0 assegnatari)C# (1189 fork)batch import
help wanted

Metriche repository

Star
 (6291 star)
Metriche merge PR
 (Nessuna PR mergiata in 30 g)

Descrizione

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

Guida contributor