我正在尝试使用 coreapi 和 Django Rest Framework 进行发布。我正在关注这个tutorial https://wsvincent.com/official-django-rest-framework-tutorial-beginners-guide/,这是基于官方的。 Coreapi 将架构下载到非当前文件夹 (PATH) 中,而不是像教程中那样记录一些信息。
$ 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.
同样,我无法发布:
$ 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”命令的当前目录中,但没有任何改进。
None
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)