Skip to content

Commit 1d6e1e4

Browse files
author
Sophia Marie Terry
committed
Move ignore list to functionOptions
1 parent 97d448f commit 1d6e1e4

14 files changed

+32
-22
lines changed

tools/spectral/ipa/rulesets/IPA-104.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,3 +115,5 @@ rules:
115115
function: 'IPA104ValidOperationID'
116116
functionOptions:
117117
methodName: 'get'
118+
ignoreList:
119+
- 'Fts'

tools/spectral/ipa/rulesets/IPA-105.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,3 +95,5 @@ rules:
9595
function: 'IPA105ValidOperationID'
9696
functionOptions:
9797
methodName: 'list'
98+
ignoreList:
99+
- 'Fts'

tools/spectral/ipa/rulesets/IPA-106.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,3 +129,5 @@ rules:
129129
function: 'IPA106ValidOperationID'
130130
functionOptions:
131131
methodName: 'create'
132+
ignoreList:
133+
- 'Fts'

tools/spectral/ipa/rulesets/IPA-107.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,3 +130,5 @@ rules:
130130
function: 'IPA107ValidOperationID'
131131
functionOptions:
132132
methodName: 'update'
133+
ignoreList:
134+
- 'Fts'

tools/spectral/ipa/rulesets/IPA-108.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,8 @@ rules:
7171
function: 'IPA108ValidOperationID'
7272
functionOptions:
7373
methodName: 'delete'
74+
ignoreList:
75+
- 'Fts'
7476

7577
functions:
7678
- IPA108DeleteMethodResponseShouldNotHaveSchema

tools/spectral/ipa/rulesets/IPA-109.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,3 +75,6 @@ rules:
7575
given: '$.paths[*][*]'
7676
then:
7777
function: 'IPA109ValidOperationID'
78+
functionOptions:
79+
ignoreList:
80+
- 'Fts'

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { validateOperationIdAndReturnErrors } from './utils/validations/validate
66

77
const RULE_NAME = 'xgen-IPA-104-valid-operation-id';
88

9-
export default (input, { methodName }, { path, documentInventory }) => {
9+
export default (input, { methodName, ignoreList }, { path, documentInventory }) => {
1010
const resourcePath = path[1];
1111
const oas = documentInventory.resolved;
1212
const resourcePaths = getResourcePathItems(resourcePath, oas.paths);
@@ -23,7 +23,7 @@ export default (input, { methodName }, { path, documentInventory }) => {
2323
if (hasMethodVerbOverride(input, methodName)) {
2424
methodName = input[VERB_OVERRIDE_EXTENSION].verb;
2525
}
26-
const errors = validateOperationIdAndReturnErrors(methodName, resourcePath, input, path);
26+
const errors = validateOperationIdAndReturnErrors(methodName, resourcePath, input, path, ignoreList);
2727

2828
return evaluateAndCollectAdoptionStatus(errors, RULE_NAME, input, path);
2929
} catch (e) {

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { validateOperationIdAndReturnErrors } from './utils/validations/validate
66

77
const RULE_NAME = 'xgen-IPA-105-valid-operation-id';
88

9-
export default (input, { methodName }, { path, documentInventory }) => {
9+
export default (input, { methodName, ignoreList }, { path, documentInventory }) => {
1010
const resourcePath = path[1];
1111
const oas = documentInventory.resolved;
1212
const resourcePaths = getResourcePathItems(resourcePath, oas.paths);
@@ -24,7 +24,7 @@ export default (input, { methodName }, { path, documentInventory }) => {
2424
}
2525

2626
try {
27-
const errors = validateOperationIdAndReturnErrors(methodName, resourcePath, input, path);
27+
const errors = validateOperationIdAndReturnErrors(methodName, resourcePath, input, path, ignoreList);
2828
return evaluateAndCollectAdoptionStatus(errors, RULE_NAME, input, path);
2929
} catch (e) {
3030
return handleInternalError(RULE_NAME, path, e);

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { validateOperationIdAndReturnErrors } from './utils/validations/validate
55

66
const RULE_NAME = 'xgen-IPA-106-valid-operation-id';
77

8-
export default (input, { methodName }, { path }) => {
8+
export default (input, { methodName, ignoreList }, { path }) => {
99
const resourcePath = path[1];
1010

1111
if (hasCustomMethodOverride(input) || isCustomMethodIdentifier(resourcePath)) {
@@ -17,7 +17,7 @@ export default (input, { methodName }, { path }) => {
1717
}
1818

1919
try {
20-
const errors = validateOperationIdAndReturnErrors(methodName, resourcePath, input, path);
20+
const errors = validateOperationIdAndReturnErrors(methodName, resourcePath, input, path, ignoreList);
2121
return evaluateAndCollectAdoptionStatus(errors, RULE_NAME, input, path);
2222
} catch (e) {
2323
return handleInternalError(RULE_NAME, path, e);

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { validateOperationIdAndReturnErrors } from './utils/validations/validate
55

66
const RULE_NAME = 'xgen-IPA-107-valid-operation-id';
77

8-
export default (input, { methodName }, { path }) => {
8+
export default (input, { methodName, ignoreList }, { path }) => {
99
const resourcePath = path[1];
1010

1111
if (isCustomMethodIdentifier(resourcePath) || hasCustomMethodOverride(input)) {
@@ -17,7 +17,7 @@ export default (input, { methodName }, { path }) => {
1717
}
1818

1919
try {
20-
const errors = validateOperationIdAndReturnErrors(methodName, resourcePath, input, path);
20+
const errors = validateOperationIdAndReturnErrors(methodName, resourcePath, input, path, ignoreList);
2121
return evaluateAndCollectAdoptionStatus(errors, RULE_NAME, input, path);
2222
} catch (e) {
2323
return handleInternalError(RULE_NAME, path, e);

0 commit comments

Comments
 (0)