generate_api_code
Generate TypeScript API code from Swagger/OpenAPI documentation. Produce whole modules by tag or single endpoints by path and method, with automatic service inference.
Instructions
生成TypeScript API代码。可以按tag生成整个模块,或按单个接口生成。会根据path自动推断对应的服务。
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "generate_api_code"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tag | No | 按tag生成整个模块的代码(与path/method二选一) | |
| path | No | 生成单个接口的代码(与tag二选一) | |
| method | No | 配合path使用的HTTP方法 | |
| swagger_url | No | Swagger JSON文档的URL(可选,会根据path自动推断服务) |