首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >swagger-document-override/md-override-loader - FAILED

swagger-document-override/md-override-loader - FAILED
EN

Stack Overflow用户
提问于 2018-11-28 05:28:40
回答 1查看 798关注 0票数 4

当我在运行IIS的服务器2012R2上托管Autorest时,我可以使用我的api使用Autorest生成代码

然而,当我尝试使用localhost url运行它时,我得到了一条run not read消息。

我可以在浏览器中阅读swagger.json

我使用的是命令

代码语言:javascript
复制
autorest --input-file=https://localhost:44348/api-docs/v1/swagger.json
--output-folder=generated --csharp --namespace=DD.MyApp.Connector

输出为

代码语言:javascript
复制
AutoRest code generation utility [version: 2.0.4283; node: v10.11.0]
(C) 2018 Microsoft Corporation.
https://aka.ms/autorest
   Loading AutoRest core      'C:\Users\kirst\.autorest\@microsoft.azure_autorest-core@2.0.4289\node_modules\@microsoft.azure\autorest-core\dist' (2.0.4289)
   Loading AutoRest extension '@microsoft.azure/autorest.csharp' (~2.3.79->2.3.82)
   Loading AutoRest extension '@microsoft.azure/autorest.modeler' (2.3.55->2.3.55)
FATAL: swagger-document-override/md-override-loader - FAILED
FATAL: Error: Could not read 'https://localhost:44348/api-docs/v1/swagger.json'.
FATAL: swagger-document/loader - FAILED
FATAL: Error: Could not read 'https://localhost:44348/api-docs/v1/swagger.json'.
Process() cancelled due to exception : Could not read 'https://localhost:44348/api-docs/v1/swagger.json'.
  Error: Could not read 'https://localhost:44348/api-docs/v1/swagger.json'.

在学习了the issue on github之后,我尝试使用dotnet run启动api,但是没有帮助。

我尝试使用admin特权在dos命令shell中运行autorest。

根据github的问题,我可以将swagger.json保存到一个文件中,并通过引用该文件生成代码。

这不是一个很好的解决方案。

EN

回答 1

Stack Overflow用户

发布于 2019-03-27 03:37:23

您是否正在尝试将httpslocalhost一起使用?如果你没有在上面放上证书,你就不应该使用https

http://localhost试试吧……

票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/53508432

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档