export_openapi
Export API documentation from Apifox projects to OpenAPI format. Choose summary mode to view directory structures or full mode for complete specifications, helping maintain organized API documentation.
Instructions
查看 Apifox 接口文档:从 Apifox 项目导出接口信息。重要:在导入新接口前,务必先使用 summary 模式查看现有目录结构和接口列表,以便将新接口放入合适的目录中,保持项目结构一致性。
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| exportFormat | No | 导出格式,默认为 JSON(仅 full 模式有效) | |
| mode | No | 导出模式:summary=仅导出目录结构和接口列表(推荐,节省上下文),full=导出完整的 OpenAPI 规范。默认为 summary | |
| oasVersion | No | OpenAPI 规范版本,默认为 3.0(仅 full 模式有效) | |
| pathFilter | No | 路径过滤器,只导出匹配的接口路径(支持前缀匹配),如 "/api/user" 只导出用户相关接口 |
Input Schema (JSON Schema)
{
"properties": {
"exportFormat": {
"description": "导出格式,默认为 JSON(仅 full 模式有效)",
"enum": [
"JSON",
"YAML"
],
"type": "string"
},
"mode": {
"description": "导出模式:summary=仅导出目录结构和接口列表(推荐,节省上下文),full=导出完整的 OpenAPI 规范。默认为 summary",
"enum": [
"summary",
"full"
],
"type": "string"
},
"oasVersion": {
"description": "OpenAPI 规范版本,默认为 3.0(仅 full 模式有效)",
"enum": [
"2.0",
"3.0",
"3.1"
],
"type": "string"
},
"pathFilter": {
"description": "路径过滤器,只导出匹配的接口路径(支持前缀匹配),如 \"/api/user\" 只导出用户相关接口",
"type": "string"
}
},
"type": "object"
}