Skip to content

Commit b57466a

Browse files
address the comments
1 parent edbcd5d commit b57466a

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,25 +45,25 @@ testRule('xgen-IPA-109-custom-method-must-use-camel-case', [
4545
errors: [
4646
{
4747
code: 'xgen-IPA-109-custom-method-must-use-camel-case',
48-
message: 'The custom method name must use camelCase format. Method name: MethodName. http://go/ipa/109',
48+
message: 'MethodName must use camelCase format. http://go/ipa/109',
4949
path: ['paths', '/a/{exampleId}:MethodName'],
5050
severity: DiagnosticSeverity.Warning,
5151
},
5252
{
5353
code: 'xgen-IPA-109-custom-method-must-use-camel-case',
54-
message: 'The custom method name must use camelCase format. Method name: MethodName. http://go/ipa/109',
54+
message: 'MethodName must use camelCase format. http://go/ipa/109',
5555
path: ['paths', '/a:MethodName'],
5656
severity: DiagnosticSeverity.Warning,
5757
},
5858
{
5959
code: 'xgen-IPA-109-custom-method-must-use-camel-case',
60-
message: 'The custom method name must use camelCase format. Method name: method_name. http://go/ipa/109',
60+
message: 'method_name must use camelCase format. http://go/ipa/109',
6161
path: ['paths', '/a/{exampleId}:method_name'],
6262
severity: DiagnosticSeverity.Warning,
6363
},
6464
{
6565
code: 'xgen-IPA-109-custom-method-must-use-camel-case',
66-
message: 'The custom method name must use camelCase format. Method name: method_name. http://go/ipa/109',
66+
message: 'method_name must use camelCase format. http://go/ipa/109',
6767
path: ['paths', '/a:method_name'],
6868
severity: DiagnosticSeverity.Warning,
6969
},

tools/spectral/ipa/rulesets/functions/eachCustomMethodMustUseCamelCase.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import { hasException } from './utils/exceptions.js';
33
import { casing } from '@stoplight/spectral-functions';
44

55
const RULE_NAME = 'xgen-IPA-109-custom-method-must-use-camel-case';
6-
const ERROR_MESSAGE = 'The custom method name must use camelCase format.';
76

87
export default (input, opts, { path }) => {
98
// Extract the path key (e.g., '/a/{exampleId}:method') from the JSONPath.
@@ -21,6 +20,6 @@ export default (input, opts, { path }) => {
2120
}
2221

2322
if (casing(methodName, { type: 'camel', disallowDigits: true })) {
24-
return [{ message: `${ERROR_MESSAGE} Method name: ${methodName}.` }];
23+
return [{ message: `${methodName} must use camelCase format.` }];
2524
}
2625
};

0 commit comments

Comments
 (0)