RicoSuter/NSwag

.net6 minimal API - OpenApiOperation Attribute does not work

Open

#3,802 创建于 2021年12月21日

在 GitHub 查看
 (4 评论) (1 反应) (0 负责人)C# (6,291 star) (1,189 fork)batch import
help wanted

描述

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

贡献者指南

.net6 minimal API - OpenApiOperation Attribute does not work · RicoSuter/NSwag#3802 | Good First Issue