Skip to content

Commit 8dcbfe3

Browse files
Exception Format Fix for Rule Tests
1 parent a8ccb4b commit 8dcbfe3

File tree

4 files changed

+7
-13
lines changed

4 files changed

+7
-13
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,14 @@ testRule('xgen-IPA-109-custom-method-must-be-GET-or-POST', [
3838
get: {},
3939
post: {},
4040
'x-xgen-IPA-exception': {
41-
'xgen-IPA-109-custom-method-must-be-GET-or-POST': {},
41+
'xgen-IPA-109-custom-method-must-be-GET-or-POST': 'reason',
4242
},
4343
},
4444
'/d:method': {
4545
get: {},
4646
post: {},
4747
'x-xgen-IPA-exception': {
48-
'xgen-IPA-109-custom-method-must-be-GET-or-POST': {},
48+
'xgen-IPA-109-custom-method-must-be-GET-or-POST': 'reason',
4949
},
5050
},
5151
},

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@ testRule('xgen-IPA-109-custom-method-must-use-camel-case', [
1818
paths: {
1919
'/b/{exampleId}:MethodName': {
2020
'x-xgen-IPA-exception': {
21-
'xgen-IPA-109-custom-method-must-use-camel-case': {},
21+
'xgen-IPA-109-custom-method-must-use-camel-case': 'reason',
2222
},
2323
},
2424
'/b:MethodName': {
2525
'x-xgen-IPA-exception': {
26-
'xgen-IPA-109-custom-method-must-use-camel-case': {},
26+
'xgen-IPA-109-custom-method-must-use-camel-case': 'reason',
2727
},
2828
},
2929
},

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

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -140,16 +140,12 @@ testRule('xgen-IPA-102-path-alternate-resource-name-path-param', [
140140
paths: {
141141
'/api/atlas/v2/unauth/resourceName1/resourceName2': {
142142
'x-xgen-IPA-exception': {
143-
'xgen-IPA-102-path-alternate-resource-name-path-param': {
144-
reason: 'test',
145-
},
143+
'xgen-IPA-102-path-alternate-resource-name-path-param': 'reason',
146144
},
147145
},
148146
'/api/atlas/v2/resourceName/{pathParam1}/{pathParam2}': {
149147
'x-xgen-IPA-exception': {
150-
'xgen-IPA-102-path-alternate-resource-name-path-param': {
151-
reason: 'test',
152-
},
148+
'xgen-IPA-102-path-alternate-resource-name-path-param': 'reason',
153149
},
154150
},
155151
},

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -133,9 +133,7 @@ testRule('xgen-IPA-104-resource-has-GET', [
133133
post: {},
134134
get: {},
135135
'x-xgen-IPA-exception': {
136-
'xgen-IPA-104-resource-has-GET': {
137-
reason: 'test',
138-
},
136+
'xgen-IPA-104-resource-has-GET': 'reason',
139137
},
140138
},
141139
'/standard/{exampleId}': {

0 commit comments

Comments
 (0)