apipost_smart_create
Generate complete API documentation by specifying HTTP methods, URL paths, parameters, headers, authentication, and response formats for clear interface specifications.
Instructions
API接口文档生成器。支持通过分离参数创建完整的API文档,包括请求参数、响应格式、认证方式等。
Input Schema
Name | Required | Description | Default |
---|---|---|---|
auth | No | 认证配置JSON字符串(可选)。格式:{"type":"bearer","bearer":{"key":"your_token"}} | |
body | No | Body参数JSON数组字符串(可选)。格式:[{"key":"name","desc":"用户名","type":"string","required":true,"example":"张三"}] | |
cookies | No | Cookies参数JSON数组字符串(可选)。格式:[{"key":"session_id","desc":"会话ID","type":"string","required":false,"example":"abc123"}] | |
description | No | 接口详细描述(可选) | |
headers | No | Headers参数JSON数组字符串(可选)。格式:[{"key":"Content-Type","desc":"内容类型","type":"string","required":true,"example":"application/json"}] | |
method | Yes | HTTP方法 | |
name | Yes | 接口名称 | |
parent_id | No | 父目录ID,使用"0"表示根目录,默认为"0" | |
query | No | Query参数JSON数组字符串(可选)。格式:[{"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"}]}] | |
url | Yes | 接口URL路径 |
Input Schema (JSON Schema)
{
"properties": {
"auth": {
"description": "认证配置JSON字符串(可选)。格式:{\"type\":\"bearer\",\"bearer\":{\"key\":\"your_token\"}}",
"type": "string"
},
"body": {
"description": "Body参数JSON数组字符串(可选)。格式:[{\"key\":\"name\",\"desc\":\"用户名\",\"type\":\"string\",\"required\":true,\"example\":\"张三\"}]",
"type": "string"
},
"cookies": {
"description": "Cookies参数JSON数组字符串(可选)。格式:[{\"key\":\"session_id\",\"desc\":\"会话ID\",\"type\":\"string\",\"required\":false,\"example\":\"abc123\"}]",
"type": "string"
},
"description": {
"description": "接口详细描述(可选)",
"type": "string"
},
"headers": {
"description": "Headers参数JSON数组字符串(可选)。格式:[{\"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"
},
"parent_id": {
"description": "父目录ID,使用\"0\"表示根目录,默认为\"0\"",
"type": "string"
},
"query": {
"description": "Query参数JSON数组字符串(可选)。格式:[{\"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"
},
"url": {
"description": "接口URL路径",
"type": "string"
}
},
"required": [
"method",
"url",
"name"
],
"type": "object"
}