SwaggerUI:路径显示“默认".我怎样才能改变? [英] SwaggerUI: Path shows "Default". How can I change?
问题描述
我从
此示例显示了路径的名称.这就是我想要做的.
package.json
依赖项":{连接":^3.2.0","js-yaml": "^3.3.0",招摇工具":0.9.*"}
==============================
更新
这可能是相关的.
<代码>{架构验证消息:[{级别:错误",消息:无法从文件 http://xxxxx/api-docs 读取"}]}
分组是通过使用标签
完成的.只需用这样的字符串数组标记每个操作:
获取:标签:- 管理操作参数: []
标签的描述在顶级tags
对象中定义:
标签:- 名称:管理功能描述:这些仅适用于特殊用户!
这将在顶层显示描述
I downloaded sample server program from http://editor.swagger.io. (Swagger Petstore (Simple), NodeJS)
Then I deployed into my server but the path is showed "Default". How can I change it?
This sample shows the name of paths. This is what I want to do it. http://petstore.swagger.io/#/
package.json
"dependencies": {
"connect": "^3.2.0",
"js-yaml": "^3.3.0",
"swagger-tools": "0.9.*"
}
=============================
Update
This may be related. How to change Swagger-UI "Default" Path
I'm not sure how JSON file is necessary. I'm using yaml. I may be choose .json or .yaml.
And also I'm wondering this is related to my issue..
{
schemaValidationMessages: [
{
level: "error",
message: "Can't read from file http://xxxxx/api-docs"
}
]
}
The grouping is done by the use of tags
. Just tag each operation with a string array like such:
get:
tags:
- Admin Operations
parameters: []
The description for tags is defined in a top-level tags
object:
tags:
- name: Admin Functions
description: These are only for special users!
And this will show the description in the top-level
这篇关于SwaggerUI:路径显示“默认".我怎样才能改变?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!