Skip to content

Commit d962ed1

Browse files
author
Sophia Marie Terry
committed
update tests to include expected OperationIds
1 parent 605bda3 commit d962ed1

File tree

6 files changed

+20
-17
lines changed

6 files changed

+20
-17
lines changed

tools/spectral/ipa/__tests__/IPA104ValidOperationID.test.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ testRule('xgen-IPA-104-valid-operation-id', [
2929
errors: [
3030
{
3131
code: 'xgen-IPA-104-valid-operation-id',
32-
message: 'Invalid OperationID. ',
32+
message: "Invalid OperationID. Found 'getProjectIpList', expected 'getGroupAccessList'. ",
3333
path: ['paths', '/api/atlas/v2/groups/{groupId}/accessList/{entryValue}', 'get', 'operationId'],
3434
severity: DiagnosticSeverity.Warning,
3535
},
@@ -49,7 +49,8 @@ testRule('xgen-IPA-104-valid-operation-id', [
4949
errors: [
5050
{
5151
code: 'xgen-IPA-104-valid-operation-id',
52-
message: 'Invalid OperationID. ',
52+
message:
53+
"Invalid OperationID. Found 'listAlertConfigurationsByAlertId', expected 'getGroupAlertAlertConfigs'. ",
5354
path: ['paths', '/api/atlas/v2/groups/{groupId}/alerts/{alertId}/alertConfigs', 'get', 'operationId'],
5455
severity: DiagnosticSeverity.Warning,
5556
},

tools/spectral/ipa/__tests__/IPA105ValidOperationID.test.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ testRule('xgen-IPA-105-valid-operation-id', [
2929
errors: [
3030
{
3131
code: 'xgen-IPA-105-valid-operation-id',
32-
message: 'Invalid OperationID. ',
32+
message: "Invalid OperationID. Found 'getApiVersions', expected 'listOpenapiVersions'. ",
3333
path: ['paths', '/api/atlas/v2/unauth/openapi/versions', 'get', 'operationId'],
3434
severity: DiagnosticSeverity.Warning,
3535
},
@@ -49,7 +49,8 @@ testRule('xgen-IPA-105-valid-operation-id', [
4949
errors: [
5050
{
5151
code: 'xgen-IPA-105-valid-operation-id',
52-
message: 'Invalid OperationID. ',
52+
message:
53+
"Invalid OperationID. Found 'returnAllControlPlaneIpAddresses', expected 'listControlPlaneIPAddresses'. ",
5354
path: ['paths', '/api/atlas/v2/unauth/controlPlaneIPAddresses', 'get', 'operationId'],
5455
severity: DiagnosticSeverity.Warning,
5556
},

tools/spectral/ipa/__tests__/IPA106ValidOperationID.test.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,13 @@ testRule('xgen-IPA-106-valid-operation-id', [
3434
errors: [
3535
{
3636
code: 'xgen-IPA-106-valid-operation-id',
37-
message:
38-
"Invalid OperationID. Found 'addUserToProject', expected 'createGroupAccess'. https://mdb.link/mongodb-atlas-openapi-validation#xgen-IPA-106-valid-operation-id",
37+
message: "Invalid OperationID. Found 'addUserToProject', expected 'createGroupAccess'. ",
3938
path: ['paths', '/api/atlas/v2/groups/{groupId}/access', 'post', 'operationId'],
4039
severity: DiagnosticSeverity.Warning,
4140
},
4241
{
4342
code: 'xgen-IPA-106-valid-operation-id',
44-
message:
45-
"Invalid OperationID. Found 'createProjectInvitation', expected 'createGroupInvite'. https://mdb.link/mongodb-atlas-openapi-validation#xgen-IPA-106-valid-operation-id",
43+
message: "Invalid OperationID. Found 'createProjectInvitation', expected 'createGroupInvite'. ",
4644
path: ['paths', '/api/atlas/v2/groups/{groupId}/invites', 'post', 'operationId'],
4745
severity: DiagnosticSeverity.Warning,
4846
},
@@ -62,7 +60,8 @@ testRule('xgen-IPA-106-valid-operation-id', [
6260
errors: [
6361
{
6462
code: 'xgen-IPA-106-valid-operation-id',
65-
message: 'Invalid OperationID. ',
63+
message:
64+
"Invalid OperationID. Found 'createServiceAccountAccessList', expected 'createOrgServiceAccountAccessList'. ",
6665
path: ['paths', '/api/atlas/v2/orgs/{orgId}/serviceAccounts/{clientId}/accessList', 'post', 'operationId'],
6766
severity: DiagnosticSeverity.Warning,
6867
},

tools/spectral/ipa/__tests__/IPA107ValidOperationID.test.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,13 @@ testRule('xgen-IPA-107-valid-operation-id', [
3939
errors: [
4040
{
4141
code: 'xgen-IPA-107-valid-operation-id',
42-
message: 'Invalid OperationID. ',
42+
message: "Invalid OperationID. Found 'setProjectLimit', expected 'updateGroupLimit'. ",
4343
path: ['paths', '/api/atlas/v2/groups/{groupId}/limits/{limitName}', 'patch', 'operationId'],
4444
severity: DiagnosticSeverity.Warning,
4545
},
4646
{
4747
code: 'xgen-IPA-107-valid-operation-id',
48-
message: 'Invalid OperationID. ',
48+
message: "Invalid OperationID. Found 'updateProjectSettings', expected 'updateGroupSettings'. ",
4949
path: ['paths', '/api/atlas/v2/groups/{groupId}/settings', 'put', 'operationId'],
5050
severity: DiagnosticSeverity.Warning,
5151
},
@@ -65,7 +65,8 @@ testRule('xgen-IPA-107-valid-operation-id', [
6565
errors: [
6666
{
6767
code: 'xgen-IPA-107-valid-operation-id',
68-
message: 'Invalid OperationID. ',
68+
message:
69+
"Invalid OperationID. Found 'updatePushBasedLogConfiguration', expected 'updateGroupPushBasedLogExport'. ",
6970
path: ['paths', '/api/atlas/v2/groups/{groupId}/pushBasedLogExport', 'patch', 'operationId'],
7071
severity: DiagnosticSeverity.Warning,
7172
},

tools/spectral/ipa/__tests__/IPA108ValidOperationID.test.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,13 @@ testRule('xgen-IPA-108-valid-operation-id', [
3434
errors: [
3535
{
3636
code: 'xgen-IPA-108-valid-operation-id',
37-
message: 'Invalid OperationID. ',
37+
message: "Invalid OperationID. Found 'removeProjectApiKey', expected 'deleteGroupApiKey'. ",
3838
path: ['paths', '/api/atlas/v2/groups/{groupId}/apiKeys/{apiUserId}', 'delete', 'operationId'],
3939
severity: DiagnosticSeverity.Warning,
4040
},
4141
{
4242
code: 'xgen-IPA-108-valid-operation-id',
43-
message: 'Invalid OperationID. ',
43+
message: "Invalid OperationID. Found 'deleteProject', expected 'deleteGroup'. ",
4444
path: ['paths', '/api/atlas/v2/groups/{groupId}', 'delete', 'operationId'],
4545
severity: DiagnosticSeverity.Warning,
4646
},
@@ -60,7 +60,8 @@ testRule('xgen-IPA-108-valid-operation-id', [
6060
errors: [
6161
{
6262
code: 'xgen-IPA-108-valid-operation-id',
63-
message: 'Invalid OperationID. ',
63+
message:
64+
"Invalid OperationID. Found 'deleteOneDataFederationInstanceQueryLimit', expected 'deleteGroupDataFederationLimit'. ",
6465
path: [
6566
'paths',
6667
'/api/atlas/v2/groups/{groupId}/dataFederation/{tenantName}/limits/{limitName}',

tools/spectral/ipa/__tests__/IPA109ValidOperationID.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ testRule('xgen-IPA-109-valid-operation-id', [
3434
errors: [
3535
{
3636
code: 'xgen-IPA-109-valid-operation-id',
37-
message: 'Invalid OperationID. ',
37+
message: "Invalid OperationID. Found 'searchClusters', expected 'searchGroupClusters'. ",
3838
path: ['paths', '/api/atlas/v2/groups/{groupId}/clusters:search', 'post', 'operationId'],
3939
severity: DiagnosticSeverity.Warning,
4040
},
@@ -54,7 +54,7 @@ testRule('xgen-IPA-109-valid-operation-id', [
5454
errors: [
5555
{
5656
code: 'xgen-IPA-109-valid-operation-id',
57-
message: 'Invalid OperationID. ',
57+
message: "Invalid OperationID. Found 'migrateProjectToAnotherOrg', expected 'migrateGroup'. ",
5858
path: ['paths', '/api/atlas/v2/groups/{groupId}:migrate', 'post', 'operationId'],
5959
severity: DiagnosticSeverity.Warning,
6060
},

0 commit comments

Comments
 (0)