问题
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