知识卡片
试调依赖服务器基址
API 控制台用 servers 中所选基地址与路径构造请求。编辑器地址、基址路径前缀与服务地址可能不同。试调失败先看工具实际发送的 URL,再核对 servers 的默认或当前选项。
这张卡片看不懂?
这张卡片已通过人工审查,不再接受失败反馈。
已有反馈 · 0 条
还没有人提交反馈。
在整书笔记中的位置
原书出处 · 1 处
- Using Swagger Editor to write OpenAPI definitions 4.4 Interacting with our API · 查看原书依据
Do you see the issue? The try-it-out feature believes our server to be https://editor.swagger.io itself! We’re trying to call GET https://editor.swagger.io/reviews. This is expected behavior, because a common pattern is to serve a version of Swagger Editor (or the UI Docs panel
参考来源
- 位置:《Designing APIs with Swagger and OpenAPI》第04章《Using Swagger Editor to write OpenAPI definitions》(来源项目 book-source:extracted/Designing APIs with Swagger and OpenAPI/_epub-src/OEBPS/Text/ch04.htm,阅读块 97)
- 结论依据:首次试调因缺少服务器描述而访问编辑器所在地址。
- 原始内容:Do you see the issue? The try-it-out feature believes our server to be https://editor.swagger.io itself! We’re trying to call GET https://editor.swagger.io/reviews. This is expected behavior, because a common pattern is to serve a version of Swagger Editor (or the UI Docs panel