yapi_import_data
Import API definitions from Swagger, Postman, HAR, or JSON into YApi projects. Specify project, category, and sync mode to merge or overwrite existing interfaces.
Instructions
Import interface data from external sources
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"type": "<type>",
"project_id": "<project_id>",
"catid": "<catid>",
"data_source": "<data_source>"
},
"name": "yapi_import_data"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| type | Yes | Import data type | |
| catid | Yes | Target category ID | |
| sync_mode | No | Sync mode: normal (normal), good (intelligent merge), merge (completely overwrite) | |
| project_id | Yes | Target project ID | |
| data_source | Yes | Import data source (JSON string or URL) |