首页 > 解决方案 > NSwag 为每个控制器单独的类

问题描述

来自 Autorest 世界,其中 Web 客户端将为每个控制器生成一个类,但在 NSwag 中使用 .Net 5 中的服务参考似乎是不可能的

AutoRest 生成的 Web 客户端遵循此模式。 {BaseWebClient}.{ControllerName}.{Methods}

例如: IWebClient webClient = new WebClient(); webClient.Employee.Get()

在 NSwag 中,它生成一个类下的所有方法。 webClient.Employee_get();

有人可以确认这是生成网络客户端的新方法还是正确方法?

标签: c#nswagautorest

解决方案


推荐阅读