1

私は闊歩するのが初めてです。

django-rest-framework で API を作成しました。それらを文書化したい。したがって、闊歩について読んでください。

django-rest-swagger を試しましたが、ドキュメントが不足しているため、コードをドキュメントに適したものにすることができませんでした。したがって、API構造を最初から設計できるswaggerエディターを試しています。ローカルにインストールしましたが、「127.0.0.1:9000」に空のページが表示されます。私は今どうすればいい ?

ローカルにインストールされたswagger-editorで消費されるYAMLまたはJSONファイルを書きたいです。どうすればこれを達成できますか?

これは、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.
4

2 に答える 2

0

ここで何が問題なのか正確にはわかりません。一般的な注意事項として、いつでも npm と Bower モジュールをクリーンアップして、クリーンな状態からやり直すことができます。

npm cache clean
rm -rf node_modules
npm install
bower cache clean 
rm -rf app/bower_components
bower install
npm start
于 2015-02-25T17:00:36.143 に答える
-1

私は同じ問題を抱えていました。
以前のノード バージョンは最新の 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 を使用しないでください

于 2016-05-13T08:25:44.520 に答える