-
Notifications
You must be signed in to change notification settings - Fork 162
fix: operation ids in the openapi spec #720
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR updates API client method names to align with the latest MongoDB Atlas OpenAPI specification's operation IDs. The changes ensure consistency between the client-side API wrapper and the server's OpenAPI contract.
- Updates method names in
ApiClientto match new OpenAPI operation IDs (e.g.,listProjects→listGroups,listOrganizations→listOrgs) - Updates all call sites across test files and tool implementations to use the new method names
- Updates the OpenAPI operation filter list to allow only the renamed operations
Reviewed Changes
Copilot reviewed 19 out of 20 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/common/atlas/apiClient.ts | Renames API client methods to match updated OpenAPI operation IDs |
| src/common/atlas/accessListUtils.ts | Updates call to renamed createAccessListEntry method |
| src/common/atlas/performanceAdvisorUtils.ts | Updates calls to renamed drop index and slow query methods |
| src/tools/atlas/create/createAccessList.ts | Updates call to renamed createAccessListEntry method |
| src/tools/atlas/create/createProject.ts | Updates calls to renamed listOrgs and createGroup methods |
| src/tools/atlas/read/inspectAccessList.ts | Updates call to renamed listAccessListEntries method |
| src/tools/atlas/read/listClusters.ts | Updates calls to renamed listClusterDetails and getGroup methods |
| src/tools/atlas/read/listOrgs.ts | Updates call to renamed listOrgs method |
| src/tools/atlas/read/listProjects.ts | Updates calls to renamed listOrgs, getOrgGroups, and listGroups methods |
| tests/unit/common/apiClient.test.ts | Updates test calls to use renamed listGroups method |
| tests/integration/common/apiClient.test.ts | Updates test calls to use renamed listOrgs method |
| tests/integration/tools/atlas/accessLists.test.ts | Updates test calls to use renamed deleteAccessListEntry and listAccessListEntries methods |
| tests/integration/tools/atlas/atlasHelpers.ts | Updates test helper to use renamed createGroup, deleteGroup, listOrgs, and createAccessListEntry methods |
| tests/integration/tools/atlas/clusters.test.ts | Updates test calls to use renamed listAccessListEntries and createAccessListEntry methods |
| tests/integration/tools/atlas/dbUsers.test.ts | Updates test call to use renamed listAccessListEntries method |
| tests/integration/tools/atlas/projects.test.ts | Updates test calls to use renamed listGroups, deleteGroup, and listOrgs methods |
| scripts/filter.ts | Updates allowed operations list to include renamed operation IDs |
| scripts/cleanupAtlasTestLeftovers.test.ts | Updates cleanup script calls to use renamed listOrgs, getOrgGroups, and deleteGroup methods |
| package.json | Splits generate script into separate api and arguments generation steps |
| } | ||
|
|
||
| // eslint-disable-next-line @typescript-eslint/explicit-function-return-type | ||
| async createProjectIpAccessList(options: FetchOptions<operations["createProjectIpAccessList"]>) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[q] what happened to all these delete ones, are they unused?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm checking
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is to do with x-xgen-operation-id-override
Pull Request Test Coverage Report for Build 19232052581Warning: This coverage report may be inaccurate.This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
Details
💛 - Coveralls |
Proposed changes
fixes the case where the openapi spec was not updating given the operation IDs changed
Checklist