Skip to content

Commit 2af9621

Browse files
author
Sophia Marie Terry
committed
Shortened error messages
1 parent 02d7e53 commit 2af9621

File tree

5 files changed

+5
-10
lines changed

5 files changed

+5
-10
lines changed

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@ import {
1010
} from './utils/resourceEvaluation.js';
1111

1212
const RULE_NAME = 'xgen-IPA-104-valid-operation-id';
13-
const ERROR_MESSAGE =
14-
'Invalid OperationID. The Operation ID must start with the verb “get” and should be followed by a noun or compound noun. The noun(s) should be the collection identifiers from the resource identifier in singular form.';
13+
const ERROR_MESSAGE = 'Invalid OperationID.';
1514

1615
export default (input, { methodName }, { path, documentInventory }) => {
1716
const resourcePath = path[1];

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@ import {
99
import { generateOperationID } from './utils/operationIdGeneration.js';
1010

1111
const RULE_NAME = 'xgen-IPA-105-valid-operation-id';
12-
const ERROR_MESSAGE =
13-
'Invalid OperationID. The Operation ID must start with the verb “list” and should be followed by a noun or compound noun. The noun(s) should be the collection identifiers from the resource identifier in singular form, where the last noun is in plural form.';
12+
const ERROR_MESSAGE = 'Invalid OperationID.';
1413

1514
export default (input, { methodName }, { path, documentInventory }) => {
1615
const resourcePath = path[1];

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@ import {
99
import { generateOperationID } from './utils/operationIdGeneration.js';
1010

1111
const RULE_NAME = 'xgen-IPA-106-valid-operation-id';
12-
const ERROR_MESSAGE =
13-
'Invalid OperationID. The Operation ID must start with the verb “create” and should be followed by a noun or compound noun. The noun(s) in the Operation ID should be the collection identifiers from the resource identifier in singular form.';
12+
const ERROR_MESSAGE = 'Invalid OperationID.';
1413

1514
export default (input, { methodName }, { path, documentInventory }) => {
1615
const resourcePath = path[1];

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@ import {
1010
import { generateOperationID } from './utils/operationIdGeneration.js';
1111

1212
const RULE_NAME = 'xgen-IPA-107-valid-operation-id';
13-
const ERROR_MESSAGE =
14-
'Invalid OperationID. The Operation ID must start with the verb “update” and should be followed by a noun or compound noun. The noun(s) in the Operation ID should be the collection identifiers from the resource identifier in singular form. For singleton resources - the last noun may be in plural form.';
13+
const ERROR_MESSAGE = 'Invalid OperationID.';
1514

1615
export default (input, { methodName }, { path, documentInventory }) => {
1716
const resourcePath = path[1];

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@ import { isCustomMethodIdentifier, isSingleResourceIdentifier } from './utils/re
44
import { generateOperationID } from './utils/operationIdGeneration.js';
55

66
const RULE_NAME = 'xgen-IPA-108-valid-operation-id';
7-
const ERROR_MESSAGE =
8-
'Invalid OperationID. The Operation ID must start with the verb “delete” and should be followed by a noun or compound noun. The noun(s) in the Operation ID should be the collection identifiers from the resource identifier in singular form.';
7+
const ERROR_MESSAGE = 'Invalid OperationID.';
98

109
export default (input, { methodName }, { path }) => {
1110
const resourcePath = path[1];

0 commit comments

Comments
 (0)