从 Swagger 文档中提取所有请求
Extract all requests from Swagger documentation
我得到了 swagger 前端的 URL,提供了一些 POST、GET、PUT 和 DELETE 请求的文档。
Swagger 对我来说很新,但界面很容易解释。
我想提取所有请求(可能作为 cURL 命令),而不打开每个项目并手动复制请求。
编辑:我应该提一下,我没有任何其他访问 Swagger 配置或服务器的权限。
根据 https://petstore.swagger.io/ the app is written in React and it's not possible to see the curl request before you click on the section (because it's not in HTML tree at that point). You can try to install CJS 插件 chrome 并写 jQuery 那:
- 创建临时文本区域
- 点击所有必要的部分,点击“立即尝试”按钮,然后点击“执行”按钮
- 将
.curl
内容复制到临时文本区域
之后你可以简单地将文本区域的内容复制到文本文件或其他东西。
我得到了 swagger 前端的 URL,提供了一些 POST、GET、PUT 和 DELETE 请求的文档。
Swagger 对我来说很新,但界面很容易解释。
我想提取所有请求(可能作为 cURL 命令),而不打开每个项目并手动复制请求。
编辑:我应该提一下,我没有任何其他访问 Swagger 配置或服务器的权限。
根据 https://petstore.swagger.io/ the app is written in React and it's not possible to see the curl request before you click on the section (because it's not in HTML tree at that point). You can try to install CJS 插件 chrome 并写 jQuery 那:
- 创建临时文本区域
- 点击所有必要的部分,点击“立即尝试”按钮,然后点击“执行”按钮
- 将
.curl
内容复制到临时文本区域
之后你可以简单地将文本区域的内容复制到文本文件或其他东西。