Swagger 招摇过市UI错误:无法获取API列表

Swagger 招摇过市UI错误:无法获取API列表,swagger,Swagger,我正在用编写RESTWebAPI文档。我已经下载了petstore示例。它由引用pet.json和user.json的resources.json组成: { "apiVersion":"0.2", "swaggerVersion":"1.0", "basePath":"http://petstore.swagger.wordnik.com/api", "apis": [ { "path":"/pet.{format}

我正在用编写RESTWebAPI文档。我已经下载了petstore示例。它由引用
pet.json
user.json
resources.json
组成:

{
    "apiVersion":"0.2",
    "swaggerVersion":"1.0",
    "basePath":"http://petstore.swagger.wordnik.com/api",
    "apis":
    [
        {
            "path":"/pet.{format}",
            "description":"Operations about pets"
        },
        {
            "path":"/user.{format}",
            "description":"Operations about user"
        }
    ]
}
但即使将原始文件上传到我的web服务器上,Swagger UI也会告诉我:

Unable to fetch API Listing. Tried the following urls:
http://www.myserver.org/resources.json
http://www.myserver.org
http://www.myserver.org/resources.json
http://www.myserver.org/resources

您能告诉我是什么原因导致Swagger找不到我的json文件吗?

我假设您要访问www.myserver.org,它会打开Swagger ui?在大摇大摆用户界面的“探索”文本框中。。。确保键入resources.json的位置

我个人有我的大摇大摆的api文档设置这样

http://adamclerk.com/api            --Swagger UI
http://adamclerk.com/api/doc        --returns json representing resources.js
http://adamclerk.com/api/doc/donuts --returns json representing donut operations
您可以在此处查看更详细的说明-

如果你还有任何问题,请随时提问