@@ -11,13 +11,13 @@ testRule('xgen-IPA-112-avoid-project-field-names', [
1111 properties : {
1212 group : { type : 'string' } ,
1313 groupId : { type : 'string' } ,
14- otherField : { type : 'number' }
15- }
16- }
17- }
18- }
14+ otherField : { type : 'number' } ,
15+ } ,
16+ } ,
17+ } ,
18+ } ,
1919 } ,
20- errors : [ ]
20+ errors : [ ] ,
2121 } ,
2222 {
2323 name : 'invalid schema - with project field name' ,
@@ -26,20 +26,20 @@ testRule('xgen-IPA-112-avoid-project-field-names', [
2626 schemas : {
2727 SchemaName : {
2828 properties : {
29- project : { type : 'string' }
30- }
31- }
32- }
33- }
29+ project : { type : 'string' } ,
30+ } ,
31+ } ,
32+ } ,
33+ } ,
3434 } ,
3535 errors : [
3636 {
3737 code : 'xgen-IPA-112-avoid-project-field-names' ,
3838 message : 'Field name "project" should be avoided. Consider using "group", "groups", or "groupId" instead.' ,
3939 path : [ 'components' , 'schemas' , 'SchemaName' , 'properties' , 'project' ] ,
40- severity : DiagnosticSeverity . Warning
41- }
42- ]
40+ severity : DiagnosticSeverity . Warning ,
41+ } ,
42+ ] ,
4343 } ,
4444 {
4545 name : 'invalid schema - with projects field name' ,
@@ -48,20 +48,20 @@ testRule('xgen-IPA-112-avoid-project-field-names', [
4848 schemas : {
4949 SchemaName : {
5050 properties : {
51- projects : { type : 'array' }
52- }
53- }
54- }
55- }
51+ projects : { type : 'array' } ,
52+ } ,
53+ } ,
54+ } ,
55+ } ,
5656 } ,
5757 errors : [
5858 {
5959 code : 'xgen-IPA-112-avoid-project-field-names' ,
6060 message : 'Field name "projects" should be avoided. Consider using "group", "groups", or "groupId" instead.' ,
6161 path : [ 'components' , 'schemas' , 'SchemaName' , 'properties' , 'projects' ] ,
62- severity : DiagnosticSeverity . Warning
63- }
64- ]
62+ severity : DiagnosticSeverity . Warning ,
63+ } ,
64+ ] ,
6565 } ,
6666 {
6767 name : 'invalid schema - with projectId field name' ,
@@ -70,20 +70,20 @@ testRule('xgen-IPA-112-avoid-project-field-names', [
7070 schemas : {
7171 SchemaName : {
7272 properties : {
73- projectId : { type : 'string' }
74- }
75- }
76- }
77- }
73+ projectId : { type : 'string' } ,
74+ } ,
75+ } ,
76+ } ,
77+ } ,
7878 } ,
7979 errors : [
8080 {
8181 code : 'xgen-IPA-112-avoid-project-field-names' ,
8282 message : 'Field name "projectId" should be avoided. Consider using "group", "groups", or "groupId" instead.' ,
8383 path : [ 'components' , 'schemas' , 'SchemaName' , 'properties' , 'projectId' ] ,
84- severity : DiagnosticSeverity . Warning
85- }
86- ]
84+ severity : DiagnosticSeverity . Warning ,
85+ } ,
86+ ] ,
8787 } ,
8888 {
8989 name : 'invalid schema - with different case variants' ,
@@ -93,26 +93,26 @@ testRule('xgen-IPA-112-avoid-project-field-names', [
9393 SchemaName : {
9494 properties : {
9595 Project : { type : 'string' } ,
96- PROJECTID : { type : 'string' }
97- }
98- }
99- }
100- }
96+ PROJECTID : { type : 'string' } ,
97+ } ,
98+ } ,
99+ } ,
100+ } ,
101101 } ,
102102 errors : [
103103 {
104104 code : 'xgen-IPA-112-avoid-project-field-names' ,
105105 message : 'Field name "Project" should be avoided. Consider using "group", "groups", or "groupId" instead.' ,
106106 path : [ 'components' , 'schemas' , 'SchemaName' , 'properties' , 'Project' ] ,
107- severity : DiagnosticSeverity . Warning
107+ severity : DiagnosticSeverity . Warning ,
108108 } ,
109109 {
110110 code : 'xgen-IPA-112-avoid-project-field-names' ,
111111 message : 'Field name "PROJECTID" should be avoided. Consider using "group", "groups", or "groupId" instead.' ,
112112 path : [ 'components' , 'schemas' , 'SchemaName' , 'properties' , 'PROJECTID' ] ,
113- severity : DiagnosticSeverity . Warning
114- }
115- ]
113+ severity : DiagnosticSeverity . Warning ,
114+ } ,
115+ ] ,
116116 } ,
117117 {
118118 name : 'invalid schema with exception - project field name with exception' ,
@@ -124,15 +124,15 @@ testRule('xgen-IPA-112-avoid-project-field-names', [
124124 project : {
125125 type : 'string' ,
126126 'x-xgen-IPA-exception' : {
127- 'xgen-IPA-112-avoid-project-field-names' : 'reason'
128- }
129- }
130- }
131- }
132- }
133- }
127+ 'xgen-IPA-112-avoid-project-field-names' : 'reason' ,
128+ } ,
129+ } ,
130+ } ,
131+ } ,
132+ } ,
133+ } ,
134134 } ,
135- errors : [ ]
135+ errors : [ ] ,
136136 } ,
137137 {
138138 name : 'field name containing project substring' ,
@@ -141,20 +141,21 @@ testRule('xgen-IPA-112-avoid-project-field-names', [
141141 schemas : {
142142 SchemaName : {
143143 properties : {
144- myProjectDetails : { type : 'object' }
145- }
146- }
147- }
148- }
144+ myProjectDetails : { type : 'object' } ,
145+ } ,
146+ } ,
147+ } ,
148+ } ,
149149 } ,
150150 errors : [
151151 {
152152 code : 'xgen-IPA-112-avoid-project-field-names' ,
153- message : 'Field name "myProjectDetails" should be avoided. Consider using "group", "groups", or "groupId" instead.' ,
153+ message :
154+ 'Field name "myProjectDetails" should be avoided. Consider using "group", "groups", or "groupId" instead.' ,
154155 path : [ 'components' , 'schemas' , 'SchemaName' , 'properties' , 'myProjectDetails' ] ,
155- severity : DiagnosticSeverity . Warning
156- }
157- ]
156+ severity : DiagnosticSeverity . Warning ,
157+ } ,
158+ ] ,
158159 } ,
159160 {
160161 name : 'exception - field with project substring' ,
@@ -166,15 +167,15 @@ testRule('xgen-IPA-112-avoid-project-field-names', [
166167 myProjectDetails : {
167168 type : 'object' ,
168169 'x-xgen-IPA-exception' : {
169- 'xgen-IPA-112-avoid-project-field-names' : 'Legacy field name that cannot be changed'
170- }
171- }
172- }
173- }
174- }
175- }
170+ 'xgen-IPA-112-avoid-project-field-names' : 'Legacy field name that cannot be changed' ,
171+ } ,
172+ } ,
173+ } ,
174+ } ,
175+ } ,
176+ } ,
176177 } ,
177- errors : [ ]
178+ errors : [ ] ,
178179 } ,
179180 {
180181 name : 'exception - multiple project fields' ,
@@ -186,21 +187,21 @@ testRule('xgen-IPA-112-avoid-project-field-names', [
186187 projectId : {
187188 type : 'string' ,
188189 'x-xgen-IPA-exception' : {
189- 'xgen-IPA-112-avoid-project-field-names' : 'External API compatibility'
190- }
190+ 'xgen-IPA-112-avoid-project-field-names' : 'External API compatibility' ,
191+ } ,
191192 } ,
192193 projects : {
193194 type : 'array' ,
194195 'x-xgen-IPA-exception' : {
195- 'xgen-IPA-112-avoid-project-field-names' : 'External API compatibility'
196- }
197- }
198- }
199- }
200- }
201- }
196+ 'xgen-IPA-112-avoid-project-field-names' : 'External API compatibility' ,
197+ } ,
198+ } ,
199+ } ,
200+ } ,
201+ } ,
202+ } ,
202203 } ,
203- errors : [ ]
204+ errors : [ ] ,
204205 } ,
205206 {
206207 name : 'mixed valid, invalid, and exception fields' ,
@@ -212,23 +213,23 @@ testRule('xgen-IPA-112-avoid-project-field-names', [
212213 project : {
213214 type : 'string' ,
214215 'x-xgen-IPA-exception' : {
215- 'xgen-IPA-112-avoid-project-field-names' : 'Legacy field'
216- }
216+ 'xgen-IPA-112-avoid-project-field-names' : 'Legacy field' ,
217+ } ,
217218 } ,
218219 projectId : { type : 'string' } ,
219- group : { type : 'string' }
220- }
221- }
222- }
223- }
220+ group : { type : 'string' } ,
221+ } ,
222+ } ,
223+ } ,
224+ } ,
224225 } ,
225226 errors : [
226227 {
227228 code : 'xgen-IPA-112-avoid-project-field-names' ,
228229 message : 'Field name "projectId" should be avoided. Consider using "group", "groups", or "groupId" instead.' ,
229230 path : [ 'components' , 'schemas' , 'SchemaName' , 'properties' , 'projectId' ] ,
230- severity : DiagnosticSeverity . Warning
231- }
232- ]
233- }
234- ] ) ;
231+ severity : DiagnosticSeverity . Warning ,
232+ } ,
233+ ] ,
234+ } ,
235+ ] ) ;
0 commit comments