Skip to content

生成的swaggerjson,导入到runapi, 请求body参数不能自动添加到json字段说明中 #2409

@lixianghong66

Description

@lixianghong66

"post": {
"tags": [
"渠道接口控制器,遵循 REST 规范提供 CRUD 接口。"
],
"summary": "新增渠道。",
"parameters": [
{
"name": "Authorization",
"in": "header",
"description": "Bearer token。示例:Bearer xxxx",
"required": true,
"schema": {
"type": "string",
"default": "{{authorization}}",
"example": "{{authorization}}"
},
"example": "{{authorization}}"
}
],
"requestBody": {
"content": {
"application/json-patch+json": {
"schema": {
"$ref": "#/components/schemas/AddChannelCommand"
}
},
"application/json": {
"schema": {
"$ref": "#/components/schemas/AddChannelCommand"
}
},
"text/json": {
"schema": {
"$ref": "#/components/schemas/AddChannelCommand"
}
},
"application/*+json": {
"schema": {
"$ref": "#/components/schemas/AddChannelCommand"
}
}
}
},
"responses": {
"200": {
"description": "OK",
"content": {
"text/plain": {
"schema": {
"type": "boolean",
"example": true
}
},
"application/json": {
"schema": {
"type": "boolean",
"example": true
}
},
"text/json": {
"schema": {
"type": "boolean",
"example": true
}
}
}
}
}


"components": {
"schemas": {
"AddChannelCommand": {
"type": "object",
"properties": {
"channelName": {
"type": "string",
"description": "渠道名称,1-50字符,支持中英文数字及常用符号。",
"nullable": true
},
"phone": {
"type": "string",
"description": "手机号,必须为11位数字。",
"nullable": true
},
"businessType": {
"type": "array",
"items": {
"$ref": "#/components/schemas/BusinessCategoryEnum"
},
"description": "业务分类,必填,默认值为["写作"],选项范围:["写作", "发表"]。",
"nullable": true
},
"writingType": {
"type": "array",
"items": {
"$ref": "#/components/schemas/WritingTypeEnum"
},
"description": "写作类型,当业务分类包含"写作"时必填,选项范围:["论文写作","案例协作","调研报告","财务分析","加字符","降重","单独修改"]。",
"nullable": true
},
"enable": {
"type": "boolean",
"description": "状态,必填,默认值为true。",
"example": true
},
"creatorEmployeeId": {
"type": "string",
"description": "创建人编号。",
"nullable": true,
"readOnly": true
}
},
"additionalProperties": false,
"description": "新增渠道命令。"
},

导入到runapi之后,如截图,json字段说明中不会自动添加对应的字段。请帮忙解决

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions