在您的
nswag.json
aspNetCoreEnvironment
NSwag 会在运行生成器之前将
ASPNETCORE_ENVIRONMENT
context.HostingEnvironment
来自 NSwag Studio 用户界面: