coreapi 操作,没有当前文档

Rex*_*rus 5 django command-line-interface django-rest-framework

我正在尝试使用 coreapi 和 Django Rest Framework 进行发布。我正在关注本教程,该教程基于官方教程。Coreapi 将架构下载到一个文件夹 (PATH) 中,该文件夹不是当前的文件夹,而不是像教程中那样记录一些信息。

$ coreapi get http://127.0.0.1:8000/schema/
<DownloadedFile 'PATH', open 'rb'>
Run Code Online (Sandbox Code Playgroud)

然后:

$ coreapi action snippets list
No current document. Use `coreapi get` to fetch a document first.
Run Code Online (Sandbox Code Playgroud)

同样,我无法发布:

$ coreapi credentials add 127.0.0.1 admin:testpass123 --auth basic
Added credentials 127.0.0.1 "Basic YWRtaW46d2lsbGlhbTE="

$ coreapi action snippets create --param title="Example" --param co
de="print('hello, world')"
No current document. Use `coreapi get` to fetch a document first.
Run Code Online (Sandbox Code Playgroud)

我试图在执行“coreapi action”命令的当前目录中复制架构文件,但没有改进。