惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

博客园_首页
N
News and Events Feed by Topic
P
Privacy International News Feed
The Hacker News
The Hacker News
Schneier on Security
Schneier on Security
C
Cybersecurity and Infrastructure Security Agency CISA
Security Latest
Security Latest
L
LINUX DO - 最新话题
阮一峰的网络日志
阮一峰的网络日志
Cisco Talos Blog
Cisco Talos Blog
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
Simon Willison's Weblog
Simon Willison's Weblog
The Cloudflare Blog
博客园 - 【当耐特】
博客园 - Franky
P
Privacy & Cybersecurity Law Blog
Attack and Defense Labs
Attack and Defense Labs
云风的 BLOG
云风的 BLOG
月光博客
月光博客
D
Docker
Webroot Blog
Webroot Blog
The GitHub Blog
The GitHub Blog
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
W
WeLiveSecurity
S
Security Affairs
Martin Fowler
Martin Fowler
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
Security Archives - TechRepublic
Security Archives - TechRepublic
Microsoft Azure Blog
Microsoft Azure Blog
C
CERT Recently Published Vulnerability Notes
B
Blog
L
Lohrmann on Cybersecurity
T
Threatpost
量子位
S
Schneier on Security
V
Visual Studio Blog
S
Securelist
T
The Exploit Database - CXSecurity.com
Scott Helme
Scott Helme
V
Vulnerabilities – Threatpost
aimingoo的专栏
aimingoo的专栏
The Register - Security
The Register - Security
I
Intezer
Stack Overflow Blog
Stack Overflow Blog
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
博客园 - 聂微东
小众软件
小众软件
罗磊的独立博客
雷峰网
雷峰网
Recorded Future
Recorded Future

博客园 - baileyer

VisualSVN破解安装到VS2026 使用 SQL 中的递归查询(Recursive CTE)来实现1-50数字 git 忽略本地文件提交(VS) C# 自定义导出模板(NPOI) Abp vue项目找不到模块“./app.vue” MSSqlserver分割文件备份恢复 github的镜像下载加快clone下载速度 widows部署.NET Core 3.1项目到IIS问题 .net core/mvc获取特性 oracle instr 替代like查询 quartz3.0.7和topshelf4.2.1实现任务调度 VS2017同时生成.net core和.net framework两份代码 vs 2017 调试中断问题 .net Core 2.2实现京东宙斯API采用OAuth授权方式调用 WinForm 校验只能输入数字英文字母退格键 NPOI导出excel C#通过反射获取相应的字段和值 activemq.bat 在window7 x64下启动(安装)报错解决方案 <asp:RadioButton> 选项判断
.net core Failed to load API definition 错误
baileyer · 2019-11-10 · via 博客园 - baileyer

最近在使用.net core API,使用了swaggerUI 管理接口,在刚创建应用时候,没有注意到一个细节,一直报错误 Failed to load API definition,如下图:

最后检查了 Startup.cs文件,发现一个细节问题。

原文如下,V1 大写导致的,改成了小写以后,就正常可以运行了。

services.AddSwaggerGen(option =>
            {
//option.SwaggerDoc("V1", new Info() { Title = "API", Version = "V1" });
option.SwaggerDoc("v1", new Info() { Title = "API", Version = "V1" }); 
}

同时在踩坑的过程中,也遇到了其它问题,可以参考 github上面的解决方案。

转向地址:https://github.com/domaindrivendev/Swashbuckle/issues/971