Tôi đang ghi lại API web REST với Swagger. Tôi đã tải xuống ví dụ về cửa hàng thú cưng. Nó bao gồm các resources.json
mà tham chiếu pet.json
và user.json
:Lỗi giao diện người dùng chuyển đổi: Không thể tìm nạp danh sách API
{
"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"
}
]
}
Nhưng ngay cả sau khi tải lên các tập tin ban đầu cho máy chủ web của tôi, Swagger UI nói với tôi:
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
Bạn có thể cho biết những gì gây ra Swagger không tìm thấy tệp json của tôi?