apipost_update
Modify API documentation with partial updates and field removal. Update rules: unspecified fields remain unchanged, empty values delete fields, new values replace existing ones.
Instructions
修改API接口文档,支持增量更新和字段删除。更新规则:不提供的字段保持不变,提供空值的字段会被删除,提供新值的字段会被替换。
Input Schema
Name | Required | Description | Default |
---|---|---|---|
auth | No | 认证配置JSON字符串(可选)。提供"{}"可删除认证配置。格式:{"type":"bearer","bearer":{"key":"your_token"}} | |
body | No | Body参数JSON数组字符串(可选)。提供"[]"可删除所有body参数。格式:[{"key":"name","desc":"用户名","type":"string","required":true,"example":"张三"}] | |
cookies | No | Cookies参数JSON数组字符串(可选)。提供"[]"可删除所有cookies。格式:[{"key":"session_id","desc":"会话ID","type":"string","required":false,"example":"abc123"}] | |
description | No | 接口详细描述(可选)。提供空字符串""可清空描述 | |
headers | No | Headers参数JSON数组字符串(可选)。提供"[]"可删除所有headers。格式:[{"key":"Content-Type","desc":"内容类型","type":"string","required":true,"example":"application/json"}] | |
method | No | 新的HTTP方法(可选) | |
name | No | 新的接口名称(可选) | |
query | No | Query参数JSON数组字符串(可选)。提供"[]"可删除所有query参数。格式:[{"key":"page","desc":"页码","type":"integer","required":false,"example":"1"}] | |
responses | No | 响应示例JSON数组字符串(可选)。提供"[]"可删除所有响应示例。格式:[{"name":"成功响应","status":200,"data":{"code":0},"fields":[{"key":"code","desc":"状态码","type":"integer","example":"0"}]}] | |
target_id | Yes | 要修改的接口ID | |
url | No | 新的接口URL(可选) |
Input Schema (JSON Schema)
{
"properties": {
"auth": {
"description": "认证配置JSON字符串(可选)。提供\"{}\"可删除认证配置。格式:{\"type\":\"bearer\",\"bearer\":{\"key\":\"your_token\"}}",
"type": "string"
},
"body": {
"description": "Body参数JSON数组字符串(可选)。提供\"[]\"可删除所有body参数。格式:[{\"key\":\"name\",\"desc\":\"用户名\",\"type\":\"string\",\"required\":true,\"example\":\"张三\"}]",
"type": "string"
},
"cookies": {
"description": "Cookies参数JSON数组字符串(可选)。提供\"[]\"可删除所有cookies。格式:[{\"key\":\"session_id\",\"desc\":\"会话ID\",\"type\":\"string\",\"required\":false,\"example\":\"abc123\"}]",
"type": "string"
},
"description": {
"description": "接口详细描述(可选)。提供空字符串\"\"可清空描述",
"type": "string"
},
"headers": {
"description": "Headers参数JSON数组字符串(可选)。提供\"[]\"可删除所有headers。格式:[{\"key\":\"Content-Type\",\"desc\":\"内容类型\",\"type\":\"string\",\"required\":true,\"example\":\"application/json\"}]",
"type": "string"
},
"method": {
"description": "新的HTTP方法(可选)",
"enum": [
"GET",
"POST",
"PUT",
"DELETE"
],
"type": "string"
},
"name": {
"description": "新的接口名称(可选)",
"type": "string"
},
"query": {
"description": "Query参数JSON数组字符串(可选)。提供\"[]\"可删除所有query参数。格式:[{\"key\":\"page\",\"desc\":\"页码\",\"type\":\"integer\",\"required\":false,\"example\":\"1\"}]",
"type": "string"
},
"responses": {
"description": "响应示例JSON数组字符串(可选)。提供\"[]\"可删除所有响应示例。格式:[{\"name\":\"成功响应\",\"status\":200,\"data\":{\"code\":0},\"fields\":[{\"key\":\"code\",\"desc\":\"状态码\",\"type\":\"integer\",\"example\":\"0\"}]}]",
"type": "string"
},
"target_id": {
"description": "要修改的接口ID",
"type": "string"
},
"url": {
"description": "新的接口URL(可选)",
"type": "string"
}
},
"required": [
"target_id"
],
"type": "object"
}