如何在Swagger编辑器中启用Designer模式?

时间:2014-12-11 06:28:35

标签: swagger swagger-editor

我是swagger编辑的新手。在编辑模式下,我已经完成了api的文档。但是在Opera,chrome,Firefox中没有启用 Designer 模式。如何在浏览器中启用此功能。以下是我在编辑模式中完成的示例。

{
"swagger": "2.0",
"info": {
    "title": "Uber API",         
    "version": "1.0.0"
},
"host": "api.uber.com",
"schemes": [
    "https"
],
"basePath": "/v1",
"produces": [
    "application/json"
],
"paths": {
    "/products": {
        "get": {
            "summary": "Product Types",
            "description": " test",
            "parameters": [                    
                {
                    "name": "longitude",
                    "in": "query",
                    "description": "Longitude component of location.",
                    "required": true,
                    "type": "number",
                    "format": "double"
                }
            ],
            "tags": [
                "Products"
            ],
            "responses": {
                "200": {
                    "description": "An array of products"                       
                },
                "default": {
                    "description": "Unexpected error"                       
                }
            }
        }
    }
}}

如何用Desinger模式做到这一点?请帮我 。

1 个答案:

答案 0 :(得分:2)

嗯,你在你打开的github issue中得到了答案,但对于任何可能在这里看到问题的人来说,答案很简单,它还没有实现,因此不可用。