@@ -11,10 +11,16 @@ testRule('xgen-IPA-005-exception-extension-format', [
1111            'xgen-IPA-100-rule-name' : 'Exception.' , 
1212          } , 
1313        } , 
14+         '/path-short' : { 
15+           'x-xgen-IPA-exception' : { 
16+             'xgen-IPA-100' : 'Exception.' , 
17+           } , 
18+         } , 
1419        '/nested' : { 
1520          post : { 
1621            'x-xgen-IPA-exception' : { 
1722              'xgen-IPA-100-rule-name' : 'Exception.' , 
23+               'xgen-IPA-005' : 'Short format exception.' , 
1824            } , 
1925          } , 
2026        } , 
@@ -61,6 +67,26 @@ testRule('xgen-IPA-005-exception-extension-format', [
6167            'xgen-IPA_100_rule-name' : { } , 
6268          } , 
6369        } , 
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+         } , 
6490      } , 
6591    } , 
6692    errors : [ 
@@ -106,6 +132,30 @@ testRule('xgen-IPA-005-exception-extension-format', [
106132        path : [ 'paths' ,  '/path7' ,  'x-xgen-IPA-exception' ] , 
107133        severity : DiagnosticSeverity . Error , 
108134      } , 
135+       { 
136+         code : 'xgen-IPA-005-exception-extension-format' , 
137+         message : 'IPA exceptions must have a valid key following 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-{rule-name} format.' , 
144+         path : [ 'paths' ,  '/path9' ,  'x-xgen-IPA-exception' ] , 
145+         severity : DiagnosticSeverity . Error , 
146+       } , 
147+       { 
148+         code : 'xgen-IPA-005-exception-extension-format' , 
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' ] , 
151+         severity : DiagnosticSeverity . Error , 
152+       } , 
153+       { 
154+         code : 'xgen-IPA-005-exception-extension-format' , 
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' ] , 
157+         severity : DiagnosticSeverity . Error , 
158+       } , 
109159    ] , 
110160  } , 
111161] ) ; 
0 commit comments