我是新来的招摇。在本地运行的Swagger编辑器显示空白页面
我已经在django-rest-framework中创建了API。我想记录它们。因此阅读关于招摇。
我试过django-rest-swagger,但由于缺少文档,我无法让我的代码适合文档。 因此,我正在尝试swagger编辑器,它将允许我从头开始设计API结构。我已经在本地安装了它,但它在“127.0.0.1:9000”显示空白页面。我现在应该怎么做 ?
我想编写YAML或JSON文件,这个文件将被本地安装的swagger-editor使用。我怎样才能做到这一点?
这是在控制台上的错误,当我加载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.
一些评论:Swagger编辑器不会消耗YAML/JSON,它会产生它。另外,如果您对编辑器有任何问题,最好直接在存储库上打开问题。最后,你现在可以在http://editor.swagger.io上使用在线编辑器。 – Ron
是的,在线编辑器是一种解决方案,但有什么办法,以便我可以在我的登台服务器上做文档,因为我需要将其暴露给第三方..任何建议? – Pranav
即使您在本地使用编辑器,您也需要导出JSON并将其托管到某处,因此这两者不相关。 – Ron