.Net Core MVC 部分接口想引入swagger文档方便查看接口,报如下错误:

经过多次试验测试,得出以下解决方案
1. 把接口按照使用类型分为两部分,一种是返回View页面的Controller,另一种是返回Json格式的数据Controller
2. 返回View页面的Controller原封不动,给返回Json数据的Controller加上 Route 标签:

本文标题:.Net Core MVC 引入swagger文档报错:No o
本文链接:https://www.haomeiwen.com/subject/jjwhgktx.html
网友评论