全部 ApiPost使用 后端 前端 接口测试 IOS Android 数据库 2022 测试技术 工具
问答 / 问答详情

接口导出request body缺少字段描述

ApiPost使用 后端 131次浏览

1.
接口导出为swagger3.0时,缺少字段描述
2.

接口导出request body缺少字段描述

"requestBody": {

"content": {

"application/json": {

"schema": {

"type": "object",

"required": [

"projectName",

"issuingUnit",

"startDate",

"endDate",

"remark",

"usageList"

],

"properties": {

"projectName": {

"type": "string",

"example": "资金池冒烟测试1"

},

"issuingUnit": {

"type": "string",

"example": "下达单位测试"

},

"startDate": {

"type": "string",

"example": "2026-05-21"

},

"endDate": {

"type": "string",

"example": "2026-05-31"

},

"remark": {

"type": "string",

"example": "备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注"

},

"usageList": {

"type": "array",

"items": {

"type": "object",

"required": [

"valueMode",

"fundNum",

"maintainUnitIds",

"maintainWays"

],

"properties": {

"valueMode": {

"type": "integer",

"example": 1

},

"fundNum": {

"type": [

"number",

"integer"

],

"example": 12.4

},

"maintainUnitIds": {

"type": "array",

"items": {

"type": "object",

"required": [

"label",

"value"

],

"properties": {

"label": {

"type": "string",

"example": "养护系统测试"

},

"value": {

"type": "string",

"example": "1816391662823378946"

}

}

}

},

"maintainWays": {

"type": "array",

"items": {

"type": "string"

}

}

}

}

}

}

},

"example": "{\n\t\"projectName\": \"资金池冒烟测试1\",\n\t\"issuingUnit\": \"下达单位测试\",\n\t\"startDate\": \"2026-05-21\",\n\t\"endDate\": \"2026-05-31\",\n\t\"remark\": \"备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注\",\n\t\"usageList\": [\n\t\t{\n\t\t\t\"valueMode\": 1,\n\t\t\t\"fundNum\": 12.4,\n\t\t\t\"maintainUnitIds\": [\n\t\t\t\t{\n\t\t\t\t\t\"label\": \"养护系统测试\",\n\t\t\t\t\t\"value\": \"1816391662823378946\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"label\": \"养护系统测试\",\n\t\t\t\t\t\"value\": \"1816391662823378946\"\n\t\t\t\t}\n\t\t\t],\n\t\t\t\"maintainWays\": [\n\t\t\t\t\"amet sint\"\n\t\t\t]\n\t\t}\n\t]\n}"

}

}

}

2 个回答

截图和给的字段对应不上呀?可以联系客服发一下wagger文件,帮您排查确认问题

{

"info": {

"title": "xxxx",

"description": "",

"version": "1.0.0",

"x-project-id": "46756919a07c000"

},

"openapi": "3.0.0",

"tags": [

{

"name": "养护决策系统",

"description": "",

"x-type": "folder",

"x-url": "",

"x-target-id": "3d46075b34714d",

"x-sort": 31000,

"x-parent-id": "0"

}

],

"paths": {

"localhost:8080/yhjc/fundProject/save/T2": {

"post": {

"x-target-id": "3575ae0e74742e",

"x-protocol": "http",

"x-sort": 2000,

"summary": "项目资金-保存",

"description": "",

"tags": [

"养护决策系统"

],

"x-mark-id": "2",

"x-updated-at": "2026-05-22T14:05:56+08:00",

"x-updated-user-name": "觉来水绕山围",

"parameters": [

{

"name": "Systemcode",

"in": "header",

"description": "",

"required": true,

"example": "11",

"schema": {

"type": "string"

}

}

],

"requestBody": {

"content": {

"application/json": {

"schema": {

"type": "object",

"required": [

"projectName",

"issuingUnit",

"startDate",

"endDate",

"remark",

"usageList"

],

"properties": {

"projectName": {

"type": "string",

"example": "资金池冒烟测试1"

},

"issuingUnit": {

"type": "string",

"example": "下达单位测试"

},

"startDate": {

"type": "string",

"example": "2026-05-21"

},

"endDate": {

"type": "string",

"example": "2026-05-31"

},

"remark": {

"type": "string",

"example": "备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注"

},

"usageList": {

"type": "array",

"items": {

"type": "object",

"required": [

"valueMode",

"fundNum",

"maintainUnitIds",

"maintainWays"

],

"properties": {

"valueMode": {

"type": "integer",

"example": 1

},

"fundNum": {

"type": [

"number",

"integer"

],

"example": 12.4

},

"maintainUnitIds": {

"type": "array",

"items": {

"type": "object",

"required": [

"label",

"value"

],

"properties": {

"label": {

"type": "string",

"example": "养护系统测试"

},

"value": {

"type": "string",

"example": "1816391662823378946"

}

}

}

},

"maintainWays": {

"type": "array",

"items": {

"type": "string"

}

}

}

}

}

}

},

"example": "{\n\t\"projectName\": \"资金池冒烟测试1\",\n\t\"issuingUnit\": \"下达单位测试\",\n\t\"startDate\": \"2026-05-21\",\n\t\"endDate\": \"2026-05-31\",\n\t\"remark\": \"备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注\",\n\t\"usageList\": [\n\t\t{\n\t\t\t\"valueMode\": 1,\n\t\t\t\"fundNum\": 12.4,\n\t\t\t\"maintainUnitIds\": [\n\t\t\t\t{\n\t\t\t\t\t\"label\": \"养护系统测试\",\n\t\t\t\t\t\"value\": \"1816391662823378946\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"label\": \"养护系统测试\",\n\t\t\t\t\t\"value\": \"1816391662823378946\"\n\t\t\t\t}\n\t\t\t],\n\t\t\t\"maintainWays\": [\n\t\t\t\t\"amet sint\"\n\t\t\t]\n\t\t}\n\t]\n}"

}

}

},

"responses": {

"200": {

"description": "成功",

"content": {

"application/json": {

"schema": {

"type": "object",

"properties": {}

},

"example": ""

}

}

},

"404": {

"description": "失败",

"content": {

"application/json": {

"schema": {

"type": "object",

"properties": {}

},

"example": ""

}

}

}

}

}

}

},

"servers": [

{

"url": "",

"description": "默认环境",

"x-env-id": "",

"variables": {}

}

]

}

整体swagger如上

Apipost 私有化火热进行中

撰写答案

只服务于

前后端、移动端、测试人员

提问题 发布您遇到的Bug和问题,上万名大牛和开发者来帮您解决!