coreapi action, No current document

ⅰ亾dé卋堺 提交于 2020-03-24 05:35:13

问题


I'm trying to post using coreapi and Django Rest Framework. I'm following this tutorial, which is based on the official one. Coreapi download the schema in a folder (PATH) which is not the current one, instead of logging some info as in the tutorial.

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

Then:

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

And similarly I'm not able to post:

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

I've tried to copy the schema file in the current directory in which the "coreapi action" command is executed, but no improvements.

来源:https://stackoverflow.com/questions/57982787/coreapi-action-no-current-document

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!