Skip to content

Conversation

@TAYUN
Copy link
Contributor

@TAYUN TAYUN commented Nov 21, 2025

PR Description

This PR enhances the Apifox plugin with more flexible export options and additional parameters support. Remove old version backward compatibility logic to make parameter behavior clear and consistent
apifox openapi: https://apifox-openapi.apifox.cn/api-173411997

Main Changes

Extended export scope type support:

  • Added SELECTED_ENDPOINTS type for exporting by endpoint IDs
  • Added SELECTED_FOLDERS type for exporting by folder IDs
  • Preserved existing ALL and SELECTED_TAGS types

Added parameter support:

  • environmentIds: support specifying environment ID list
  • branchId: support specifying branch ID
  • moduleId: support specifying module ID

Type safety enhancement:

  • Explicitly defined ScopeType enum type
  • Improved interface definitions and parameter validation

Usage Examples

// Export all endpoints
apifox({
  projectId: '项目id',
  apifoxToken: 'APS-你的token',
  scopeType: 'ALL',
})

// Export endpoints by tags
apifox({
  projectId: '项目id',
  apifoxToken: 'APS-你的token',
  scopeType: 'SELECTED_TAGS',
  selectedTags: ['Dessert Shop', 'User Management'],
})

// Export specific endpoints
apifox({
  projectId: '项目id',
  apifoxToken: 'APS-你的token',
  scopeType: 'SELECTED_ENDPOINTS',
  selectedEndpointIds: [12345, 67890],
})

// Export specific folders
apifox({
  projectId: '项目id',
  apifoxToken: 'APS-你的token',
  scopeType: 'SELECTED_FOLDERS',
  selectedFolderIds: [1001, 1002],
})

closes #127

@changeset-bot
Copy link

changeset-bot bot commented Nov 21, 2025

⚠️ No Changeset found

Latest commit: 927794e

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@TAYUN TAYUN changed the title feat(wormhole): enhance apifox plugin export scope configuration feat(wormhole): enhances the Apifox plugin with more flexible export options and additional parameters support. Nov 21, 2025
…behavior

- Set `scopeType` default value to `'ALL'` and `selectedTags` default to empty array
- Remove old version backward compatibility logic to make parameter behavior clear and consistent
@czhlin
Copy link
Contributor

czhlin commented Nov 21, 2025

需要修改一下测试文件

@TAYUN
Copy link
Contributor Author

TAYUN commented Nov 21, 2025

需要修改一下测试文件

好我看下

@czhlin czhlin merged commit 293fe72 into alovajs:main Nov 24, 2025
2 checks passed
@TAYUN
Copy link
Contributor Author

TAYUN commented Jan 6, 2026

这插件破坏性更新了,但是官方文档没有更新,关于这个插件的使用方式还是旧版的。
https://alova.js.org/zh-CN/resource/devtool-plugins/apifox

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

【apifox功能】apifox拉取器功能拓展

2 participants