OpenAPI 查询参数描述未设置为文本框作为占位符
OpenAPI query parameter description not set to text box as placeholder
我已经使用描述来添加查询参数的详细信息,例如
"parameters": [
{
"name": "role",
"in": "query",
"required": true,
"schema": {
"type": "string"
},
"description": "This is test description to reproduce placeholder not fit to textbox"
}]
当我加载 openapi.json 以大摇大摆时,它会显示说明以及文本框占位符。有什么方法可以为占位符添加单独的文本,或者有什么方法可以解决在占位符中显示所有文本的问题吗?这里的文字被删除
如果参数具有 example
或 default
值(或 OpenAPI 2.0 中的 x-example
),Swagger UI 将使用此值作为占位符。
否则,如您所见,占位符文本将与参数的 description
.
相同
现有功能要求删除或改进默认占位符文本:
https://github.com/swagger-api/swagger-ui/issues/3920
我已经使用描述来添加查询参数的详细信息,例如
"parameters": [
{
"name": "role",
"in": "query",
"required": true,
"schema": {
"type": "string"
},
"description": "This is test description to reproduce placeholder not fit to textbox"
}]
当我加载 openapi.json 以大摇大摆时,它会显示说明以及文本框占位符。有什么方法可以为占位符添加单独的文本,或者有什么方法可以解决在占位符中显示所有文本的问题吗?这里的文字被删除
如果参数具有 example
或 default
值(或 OpenAPI 2.0 中的 x-example
),Swagger UI 将使用此值作为占位符。
否则,如您所见,占位符文本将与参数的 description
.
现有功能要求删除或改进默认占位符文本:
https://github.com/swagger-api/swagger-ui/issues/3920