@@ -8,13 +8,19 @@ testRule('xgen-IPA-005-exception-extension-format', [
88 paths : {
99 '/path' : {
1010 'x-xgen-IPA-exception' : {
11- 'xgen-IPA-100-rule-name' : 'Exception' ,
11+ 'xgen-IPA-100-rule-name' : 'Exception.' ,
12+ } ,
13+ } ,
14+ '/path-short' : {
15+ 'x-xgen-IPA-exception' : {
16+ 'xgen-IPA-100' : 'Exception.' ,
1217 } ,
1318 } ,
1419 '/nested' : {
1520 post : {
1621 'x-xgen-IPA-exception' : {
17- 'xgen-IPA-100-rule-name' : 'Exception' ,
22+ 'xgen-IPA-100-rule-name' : 'Exception.' ,
23+ 'xgen-IPA-005' : 'Short format exception.' ,
1824 } ,
1925 } ,
2026 } ,
@@ -46,31 +52,108 @@ testRule('xgen-IPA-005-exception-extension-format', [
4652 'xgen-IPA-100-rule-name' : { } ,
4753 } ,
4854 } ,
55+ '/path5' : {
56+ 'x-xgen-IPA-exception' : {
57+ 'xgen-IPA-1001-rule-name' : { } ,
58+ } ,
59+ } ,
60+ '/path6' : {
61+ 'x-xgen-IPA-exception' : {
62+ 'xgen-IPA-1001-rule_name' : { } ,
63+ } ,
64+ } ,
65+ '/path7' : {
66+ 'x-xgen-IPA-exception' : {
67+ 'xgen-IPA_100_rule-name' : { } ,
68+ } ,
69+ } ,
70+ '/path8' : {
71+ 'x-xgen-IPA-exception' : {
72+ 'xgen-IPA-100-' : 'Exception.' ,
73+ } ,
74+ } ,
75+ '/path9' : {
76+ 'x-xgen-IPA-exception' : {
77+ 'xgen-IPA-5' : 'Exception.' ,
78+ } ,
79+ } ,
80+ '/path10' : {
81+ 'x-xgen-IPA-exception' : {
82+ 'xgen-IPA-100' : 'exception without uppercase.' ,
83+ } ,
84+ } ,
85+ '/path11' : {
86+ 'x-xgen-IPA-exception' : {
87+ 'xgen-IPA-100' : 'Exception without period' ,
88+ } ,
89+ } ,
4990 } ,
5091 } ,
5192 errors : [
5293 {
5394 code : 'xgen-IPA-005-exception-extension-format' ,
54- message : 'IPA exceptions must have a valid rule name and a reason .' ,
95+ message : 'IPA exceptions must have a valid key following xgen-IPA-XXX or xgen-IPA-XXX-{rule-name} format .' ,
5596 path : [ 'paths' , '/path1' , 'x-xgen-IPA-exception' ] ,
5697 severity : DiagnosticSeverity . Error ,
5798 } ,
5899 {
59100 code : 'xgen-IPA-005-exception-extension-format' ,
60- message : 'IPA exceptions must have a valid rule name and a reason.' ,
61- path : [ 'paths' , '/path2' , 'x-xgen-IPA-exception' , 'xgen-IPA-100-rule-name' ] ,
101+ message : 'IPA exceptions must have a non-empty reason that starts with uppercase and ends with a full stop.' ,
102+ path : [ 'paths' , '/path2' , 'x-xgen-IPA-exception' ] ,
103+ severity : DiagnosticSeverity . Error ,
104+ } ,
105+ {
106+ code : 'xgen-IPA-005-exception-extension-format' ,
107+ message : 'IPA exceptions must have a valid key following xgen-IPA-XXX or xgen-IPA-XXX-{rule-name} format.' ,
108+ path : [ 'paths' , '/path3' , 'x-xgen-IPA-exception' ] ,
109+ severity : DiagnosticSeverity . Error ,
110+ } ,
111+ {
112+ code : 'xgen-IPA-005-exception-extension-format' ,
113+ message : 'IPA exceptions must have a non-empty reason that starts with uppercase and ends with a full stop.' ,
114+ path : [ 'paths' , '/path4' , 'x-xgen-IPA-exception' ] ,
115+ severity : DiagnosticSeverity . Error ,
116+ } ,
117+ {
118+ code : 'xgen-IPA-005-exception-extension-format' ,
119+ message : 'IPA exceptions must have a valid key following xgen-IPA-XXX or xgen-IPA-XXX-{rule-name} format.' ,
120+ path : [ 'paths' , '/path5' , 'x-xgen-IPA-exception' ] ,
121+ severity : DiagnosticSeverity . Error ,
122+ } ,
123+ {
124+ code : 'xgen-IPA-005-exception-extension-format' ,
125+ message : 'IPA exceptions must have a valid key following xgen-IPA-XXX or xgen-IPA-XXX-{rule-name} format.' ,
126+ path : [ 'paths' , '/path6' , 'x-xgen-IPA-exception' ] ,
127+ severity : DiagnosticSeverity . Error ,
128+ } ,
129+ {
130+ code : 'xgen-IPA-005-exception-extension-format' ,
131+ message : 'IPA exceptions must have a valid key following xgen-IPA-XXX or xgen-IPA-XXX-{rule-name} format.' ,
132+ path : [ 'paths' , '/path7' , 'x-xgen-IPA-exception' ] ,
133+ severity : DiagnosticSeverity . Error ,
134+ } ,
135+ {
136+ code : 'xgen-IPA-005-exception-extension-format' ,
137+ message : 'IPA exceptions must have a valid key following xgen-IPA-XXX or xgen-IPA-XXX-{rule-name} format.' ,
138+ path : [ 'paths' , '/path8' , 'x-xgen-IPA-exception' ] ,
139+ severity : DiagnosticSeverity . Error ,
140+ } ,
141+ {
142+ code : 'xgen-IPA-005-exception-extension-format' ,
143+ message : 'IPA exceptions must have a valid key following xgen-IPA-XXX or xgen-IPA-XXX-{rule-name} format.' ,
144+ path : [ 'paths' , '/path9' , 'x-xgen-IPA-exception' ] ,
62145 severity : DiagnosticSeverity . Error ,
63146 } ,
64147 {
65148 code : 'xgen-IPA-005-exception-extension-format' ,
66- message : 'IPA exceptions must have a valid rule name and a reason .' ,
67- path : [ 'paths' , '/path3 ' , 'x-xgen-IPA-exception' , 'invalid-rule-name '] ,
149+ message : 'IPA exceptions must have a non-empty reason that starts with uppercase and ends with a full stop .' ,
150+ path : [ 'paths' , '/path10 ' , 'x-xgen-IPA-exception' ] ,
68151 severity : DiagnosticSeverity . Error ,
69152 } ,
70153 {
71154 code : 'xgen-IPA-005-exception-extension-format' ,
72- message : 'IPA exceptions must have a valid rule name and a reason .' ,
73- path : [ 'paths' , '/path4 ' , 'x-xgen-IPA-exception' , 'xgen-IPA-100-rule-name '] ,
155+ message : 'IPA exceptions must have a non-empty reason that starts with uppercase and ends with a full stop .' ,
156+ path : [ 'paths' , '/path11 ' , 'x-xgen-IPA-exception' ] ,
74157 severity : DiagnosticSeverity . Error ,
75158 } ,
76159 ] ,
0 commit comments