RicoSuter/NSwag

Generating C# Web API Controllers, no response codes

Open

#1,918 建立於 2019年1月24日

在 GitHub 查看
 (1 留言) (4 反應) (0 負責人)C# (1,189 fork)batch import
help wantedproject: NSwag.CodeGeneration.CSharp (Controllers)type: question

倉庫指標

Star
 (6,291 star)
PR 合併指標
 (30 天內沒有已合併 PR)

描述

From an Open API spec I generate C# code for some web API controllers (ASP.NET Core). However, in the generated code it seems to me that no HTTP status codes are specified (e.g. by using attributes like [ProducesResponseType(404)] before each method definition). This has the effect that the Swagger UI generated from the code lacks any information about the different return codes, only 200 appears. Did I miss anything in the configuration of the code generator?

貢獻者指南