我是个大摇大摆的新手。
我已经在django-rest-framework中创建了API。我想把它们记录下来。因此阅读有关swagger的文章。
我尝试了django-rest-swagger,但由于缺乏文档,我无法使我的代码适合于文档。因此,我正在尝试swagger编辑器,它将允许我从头开始设计API结构。我已经在本地安装了它,但它在"127.0.0.1:9000“处显示了空页。我现在该怎么做?
我想写的YAML或JSON文件,将消费的swagger编辑器安装在本地。我如何才能做到这一点?
这是我加载127.0.0.1:9000时控制台上的错误
Warn: could not find module util
http://127.0.0.1:9000/bower_components/angular-schema-form/dist/schema-form.js Failed to load resource: the server responded with a status of 404 (Not Found)
angular.js:80 Uncaught Error: [$injector:nomod] Module 'schemaForm' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument.
http://errors.angularjs.org/1.3.2/$injector/nomod?p0=schemaForm
angular.js:80 Uncaught Error: [$injector:modulerr] Failed to instantiate module PhonicsApp due to:
Error: [$injector:modulerr] Failed to instantiate module schemaForm due to:
Error: [$injector:nomod] Module 'schemaForm' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument.发布于 2015-02-26 01:00:36
我不太确定这里的问题是什么。一般来说,您可以随时清理npm和Bower模块,并重新从清理状态开始。
npm cache clean
rm -rf node_modules
npm install
bower cache clean
rm -rf app/bower_components
bower install
npm start发布于 2016-05-13 16:25:45
我也有同样的问题。
以前我的节点版本是最新的v6
我重新安装了所有内容,然后安装了v4.4.4
node --v确保是v4.4.4
npm install -g http-server
wget https://github.com/swagger-api/swagger-editor/releases/download/v2.10.1/swagger-editor.zip
unzip swagger-editor.zip
http-server不要使用http-server swagger-editor
https://stackoverflow.com/questions/27917837
复制相似问题