coreapi操作,没有当前文档

时间:2019-09-17 22:28:07

标签: django django-rest-framework command-line-interface

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

$ coreapi get http://127.0.0.1:8000/schema/
<DownloadedFile 'PATH', open 'rb'>

然后:

$ coreapi action snippets list
No current document. Use `coreapi get` to fetch a document first.

同样,我无法发布:

$ 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.

我试图将模式文件复制到执行“ coreapi action”命令的当前目录中,但是没有任何改进。

0 个答案:

没有答案