ApiPost ,当 VO 类中的属性字段名称超过一定长度时,ApiPost 在生成 OpenAPI/Swagger 规范时会丢失该字段的详细定义,表现为 "properties": {}。
"reimbursementApplyAttachments": {
"type": "array",
"items": {
"type": "object",
"properties": {},
"x-schema-refs": {
"33dfde7cf0c62d": {
"type": "object",
"properties": {},
"x-schema-refs": {
"1a59ddd4f0c6ff": {
"$ref": "33760389b0c110"
}
},
"x-schema-orders": [
"1a59ddd4f0c6ff"
]
}
},
"x-schema-orders": [
"33dfde7cf0c62d"
]
},
正常的格式,properties是不为空的。
"depts": {
"type": "array",
"items": {
"type": "object",
"properties": {
"parentId": {
"type": "integer",
"format": "int64",
"example": 0,
"description": "父ID"
},
"departmentId": {
"type": "integer",
"format": "int64",
"example": 4,
"description": "部门ID"
},
"departmentCode": {
"type": "string",
"example": "部门编码_001",
"description": "部门编码"
},
"departmentName": {
"type": "string",
"example": "部门名称_A",
"description": "部门名称"
}
},
"required": [
"departmentCode",
"departmentId",
"departmentName",
"parentId"
]
},
"description": "部门列表"
},