c# - NSwag 为每个控制器单独的类
问题描述
来自 Autorest 世界,其中 Web 客户端将为每个控制器生成一个类,但在 NSwag 中使用 .Net 5 中的服务参考似乎是不可能的
AutoRest 生成的 Web 客户端遵循此模式。
{BaseWebClient}.{ControllerName}.{Methods}
例如:
IWebClient webClient = new WebClient();
webClient.Employee.Get()
在 NSwag 中,它生成一个类下的所有方法。
webClient.Employee_get();
有人可以确认这是生成网络客户端的新方法还是正确方法?
解决方案
推荐阅读
- jenkins - 将正则表达式策略应用于 BitBucket Cloud 提交消息的最佳方式?
- docker - 在docker中创建自己的用户定义网络并编写自己的负载均衡算法
- rest - REST API 的本地化
- php - 如何将字符串中的数组路径评估为真实的数组路径
- c# - C#将两个标题列合并为一列?
- python-3.x - Numpy 和 TensorFlow RNN 形状表示不匹配
- docker - 为什么 docker 节点容器在 docker 卷中找不到本地文件?
- kubernetes-ingress - 将特定子目录重定向到 Ingress 中的新 url
- java - 即使我只添加到它,我是否应该使列表线程安全?
- java - Apache Flink 与 AWS Kinesis Analytics