Skip to content

Commit 46d51b7

Browse files
CLOUDP-331821: Address review comment
1 parent 36953d5 commit 46d51b7

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

tools/spectral/ipa/__tests__/utils/validations/validateOperationIdAndReturnErrors.test.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,8 @@ describe('tools/spectral/ipa/rulesets/functions/utils/validations/validateOperat
272272
).toEqual([
273273
{
274274
path: ['paths', '/some/{id}/resource/{resourceId}', 'get', 'x-xgen-operation-id-override'],
275-
message: "Please remove the 'x-xgen-operation-id-override' extension from the operation.",
275+
message:
276+
"Please remove the 'x-xgen-operation-id-override' extension from the operation. The Operation ID already has a valid length (<=4 words).",
276277
},
277278
]);
278279
});

tools/spectral/ipa/rulesets/functions/utils/validations/validateOperationIdAndReturnErrors.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@ const TOO_LONG_OP_ID_ERROR_MESSAGE =
99
OPERATION_ID_OVERRIDE_EXTENSION +
1010
"' extension to the operation with a shorter operation ID.";
1111
const REMOVE_OP_ID_OVERRIDE_ERROR_MESSAGE =
12-
"Please remove the '" + OPERATION_ID_OVERRIDE_EXTENSION + "' extension from the operation.";
12+
"Please remove the '" +
13+
OPERATION_ID_OVERRIDE_EXTENSION +
14+
"' extension from the operation. The Operation ID already has a valid length (<=4 words).";
1315

1416
/**
1517
* Validates the operationId of an operation object and returns errors if it does not match the expected format. Also validates that the operationId override, if present, follows the expected rules.

0 commit comments

Comments
 (0)