NSwag Post Build swagger.json 生成失败

问题描述 投票:0回答:1
.net asp.net-core .net-core swagger-codegen nswag
1个回答
3
投票

在您的

nswag.json
文件中,将
aspNetCoreEnvironment
属性设置为“Development”。

NSwag 会在运行生成器之前将

ASPNETCORE_ENVIRONMENT
环境变量设置为此值,这是
context.HostingEnvironment
查看以确定其运行位置的环境变量之一。

来自 NSwag Studio 用户界面:

© www.soinside.com 2019 - 2024. All rights reserved.