The*_*hat 9 swagger swagger-ui
我正在开发一个API,它也会生成一个swagger文档.问题是由于某些原因,请求模型/架构没有显示在swagger UI中,但我也没有收到任何错误.我需要将map表示为一个字符串数组.例如map [string] [] string.定义对象定义如下.
{
"definitions": {
"versions": {
"type": "string",
"additionalProperties": {
"type": "array",
"items": {
"type": "string"
}
}
}
}
}
Run Code Online (Sandbox Code Playgroud)
用户界面仍未提供对地图的支持 - https://github.com/swagger-api/swagger-ui/issues/913.
你还想改变你的定义:
{
"definitions": {
"versions": {
"type": "object",
"additionalProperties": {
"type": "array",
"items": {
"type": "string"
}
}
}
}
}
Run Code Online (Sandbox Code Playgroud)
为了清楚起见,这定义了一个映射,其中值是字符串数组.
| 归档时间: |
|
| 查看次数: |
20132 次 |
| 最近记录: |