@botpress/cli 5.0.1 → 5.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/.turbo/turbo-build.log +9 -9
  2. package/dist/command-implementations/lint-command.js +6 -3
  3. package/dist/command-implementations/lint-command.js.map +2 -2
  4. package/dist/linter/base-linter.d.ts +1 -1
  5. package/dist/linter/base-linter.js +21 -1
  6. package/dist/linter/base-linter.js.map +2 -2
  7. package/dist/linter/bot-linter.d.ts +2 -1
  8. package/dist/linter/bot-linter.js +2 -2
  9. package/dist/linter/bot-linter.js.map +2 -2
  10. package/dist/linter/integration-linter.d.ts +2 -1
  11. package/dist/linter/integration-linter.js +2 -2
  12. package/dist/linter/integration-linter.js.map +2 -2
  13. package/dist/linter/interface-linter.d.ts +2 -1
  14. package/dist/linter/interface-linter.js +2 -2
  15. package/dist/linter/interface-linter.js.map +2 -2
  16. package/dist/linter/ruleset-tests/bot.ruleset.test.js +322 -0
  17. package/dist/linter/ruleset-tests/bot.ruleset.test.js.map +2 -2
  18. package/dist/linter/ruleset-tests/integration.ruleset.test.js +713 -0
  19. package/dist/linter/ruleset-tests/integration.ruleset.test.js.map +2 -2
  20. package/dist/linter/ruleset-tests/interface.ruleset.test.js +502 -0
  21. package/dist/linter/ruleset-tests/interface.ruleset.test.js.map +2 -2
  22. package/dist/linter/rulesets/bot.ruleset.d.ts +12 -36
  23. package/dist/linter/rulesets/bot.ruleset.js +24 -6
  24. package/dist/linter/rulesets/bot.ruleset.js.map +2 -2
  25. package/dist/linter/rulesets/integration.ruleset.d.ts +27 -81
  26. package/dist/linter/rulesets/integration.ruleset.js +48 -16
  27. package/dist/linter/rulesets/integration.ruleset.js.map +2 -2
  28. package/dist/linter/rulesets/interface.ruleset.d.ts +10 -30
  29. package/dist/linter/rulesets/interface.ruleset.js +32 -8
  30. package/dist/linter/rulesets/interface.ruleset.js.map +2 -2
  31. package/dist/linter/spectral-functions.d.ts +25 -5
  32. package/dist/linter/spectral-functions.js +107 -6
  33. package/dist/linter/spectral-functions.js.map +2 -2
  34. package/dist/utils/file-watcher.d.ts +1 -1
  35. package/dist/utils/file-watcher.js +2 -2
  36. package/dist/utils/file-watcher.js.map +3 -3
  37. package/package.json +3 -1
@@ -150,6 +150,24 @@ describeRule("action-inputparams-should-have-a-title", (lint) => {
150
150
  (0, import_vitest.expect)(results[0]?.path).toEqual(["actions", ACTION_NAME, "input", "schema", "properties", paramName, ZUI]);
151
151
  (0, import_vitest.expect)(results[0]?.message).toContain("title");
152
152
  });
153
+ import_vitest.test.each(PARAM_NAMES)("missing title with anyOf should trigger (%s)", async (paramName) => {
154
+ const definition = {
155
+ actions: {
156
+ [ACTION_NAME]: {
157
+ input: {
158
+ schema: {
159
+ properties: { [paramName]: { anyOf: [{ type: "object", [ZUI]: {} }, { type: "null" }], [ZUI]: {} } }
160
+ }
161
+ }
162
+ }
163
+ }
164
+ };
165
+ const results = await lint(definition);
166
+ (0, import_vitest.expect)(results).toHaveLength(1);
167
+ (0, import_vitest.expect)(results[0]?.path).toEqual(["actions", ACTION_NAME, "input", "schema", "properties", paramName, ZUI]);
168
+ (0, import_vitest.expect)(results[0]?.message).toContain("title");
169
+ (0, import_vitest.expect)(results[0]?.message).toContain(paramName);
170
+ });
153
171
  import_vitest.test.each(PARAM_NAMES)("empty title should trigger (%s)", async (paramName) => {
154
172
  const definition = {
155
173
  actions: {
@@ -161,6 +179,40 @@ describeRule("action-inputparams-should-have-a-title", (lint) => {
161
179
  (0, import_vitest.expect)(results[0]?.path).toEqual(["actions", ACTION_NAME, "input", "schema", "properties", paramName, ZUI, "title"]);
162
180
  (0, import_vitest.expect)(results[0]?.message).toContain("title");
163
181
  });
182
+ import_vitest.test.each(PARAM_NAMES)("empty title nested in anyOf should trigger (%s)", async (paramName) => {
183
+ const definition = {
184
+ actions: {
185
+ [ACTION_NAME]: {
186
+ input: {
187
+ schema: {
188
+ properties: {
189
+ [paramName]: {
190
+ anyOf: [{ type: "object", [ZUI]: { title: EMPTY_STRING } }, { type: "null" }],
191
+ [ZUI]: {}
192
+ }
193
+ }
194
+ }
195
+ }
196
+ }
197
+ }
198
+ };
199
+ const results = await lint(definition);
200
+ (0, import_vitest.expect)(results).toHaveLength(1);
201
+ (0, import_vitest.expect)(results[0]?.path).toEqual([
202
+ "actions",
203
+ ACTION_NAME,
204
+ "input",
205
+ "schema",
206
+ "properties",
207
+ paramName,
208
+ "anyOf",
209
+ "0",
210
+ ZUI,
211
+ "title"
212
+ ]);
213
+ (0, import_vitest.expect)(results[0]?.message).toContain("title");
214
+ (0, import_vitest.expect)(results[0]?.message).toContain(paramName);
215
+ });
164
216
  import_vitest.test.each(PARAM_NAMES)("valid title should not trigger (%s)", async (paramName) => {
165
217
  const definition = {
166
218
  actions: {
@@ -170,6 +222,26 @@ describeRule("action-inputparams-should-have-a-title", (lint) => {
170
222
  const results = await lint(definition);
171
223
  (0, import_vitest.expect)(results).toHaveLength(0);
172
224
  });
225
+ import_vitest.test.each(PARAM_NAMES)("valid title nested in anyOf should not trigger (%s)", async (paramName) => {
226
+ const definition = {
227
+ actions: {
228
+ [ACTION_NAME]: {
229
+ input: {
230
+ schema: {
231
+ properties: {
232
+ [paramName]: {
233
+ anyOf: [{ type: "object", [ZUI]: { title: TRUTHY_STRING } }, { type: "null" }],
234
+ [ZUI]: {}
235
+ }
236
+ }
237
+ }
238
+ }
239
+ }
240
+ }
241
+ };
242
+ const results = await lint(definition);
243
+ (0, import_vitest.expect)(results).toHaveLength(0);
244
+ });
173
245
  });
174
246
  describeRule("action-inputparams-must-have-a-description", (lint) => {
175
247
  import_vitest.test.each(PARAM_NAMES)("missing description should trigger (%s)", async (paramName) => {
@@ -181,6 +253,24 @@ describeRule("action-inputparams-must-have-a-description", (lint) => {
181
253
  (0, import_vitest.expect)(results[0]?.path).toEqual(["actions", ACTION_NAME, "input", "schema", "properties", paramName]);
182
254
  (0, import_vitest.expect)(results[0]?.message).toContain("description");
183
255
  });
256
+ import_vitest.test.each(PARAM_NAMES)("missing description with anyOf should trigger (%s)", async (paramName) => {
257
+ const definition = {
258
+ actions: {
259
+ [ACTION_NAME]: {
260
+ input: {
261
+ schema: {
262
+ properties: { [paramName]: { anyOf: [{ type: "object" }, { type: "null" }] } }
263
+ }
264
+ }
265
+ }
266
+ }
267
+ };
268
+ const results = await lint(definition);
269
+ (0, import_vitest.expect)(results).toHaveLength(1);
270
+ (0, import_vitest.expect)(results[0]?.path).toEqual(["actions", ACTION_NAME, "input", "schema", "properties", paramName]);
271
+ (0, import_vitest.expect)(results[0]?.message).toContain("description");
272
+ (0, import_vitest.expect)(results[0]?.message).toContain(paramName);
273
+ });
184
274
  import_vitest.test.each(PARAM_NAMES)("empty description should trigger (%s)", async (paramName) => {
185
275
  const definition = {
186
276
  actions: {
@@ -200,6 +290,36 @@ describeRule("action-inputparams-must-have-a-description", (lint) => {
200
290
  ]);
201
291
  (0, import_vitest.expect)(results[0]?.message).toContain("description");
202
292
  });
293
+ import_vitest.test.each(PARAM_NAMES)("empty description nested in anyOf should trigger (%s)", async (paramName) => {
294
+ const definition = {
295
+ actions: {
296
+ [ACTION_NAME]: {
297
+ input: {
298
+ schema: {
299
+ properties: {
300
+ [paramName]: { anyOf: [{ type: "object", description: EMPTY_STRING }, { type: "null" }] }
301
+ }
302
+ }
303
+ }
304
+ }
305
+ }
306
+ };
307
+ const results = await lint(definition);
308
+ (0, import_vitest.expect)(results).toHaveLength(1);
309
+ (0, import_vitest.expect)(results[0]?.path).toEqual([
310
+ "actions",
311
+ ACTION_NAME,
312
+ "input",
313
+ "schema",
314
+ "properties",
315
+ paramName,
316
+ "anyOf",
317
+ "0",
318
+ "description"
319
+ ]);
320
+ (0, import_vitest.expect)(results[0]?.message).toContain("description");
321
+ (0, import_vitest.expect)(results[0]?.message).toContain(paramName);
322
+ });
203
323
  import_vitest.test.each(PARAM_NAMES)("valid description should not trigger (%s)", async (paramName) => {
204
324
  const definition = {
205
325
  actions: {
@@ -209,6 +329,23 @@ describeRule("action-inputparams-must-have-a-description", (lint) => {
209
329
  const results = await lint(definition);
210
330
  (0, import_vitest.expect)(results).toHaveLength(0);
211
331
  });
332
+ import_vitest.test.each(PARAM_NAMES)("valid description nested in anyOf should not trigger (%s)", async (paramName) => {
333
+ const definition = {
334
+ actions: {
335
+ [ACTION_NAME]: {
336
+ input: {
337
+ schema: {
338
+ properties: {
339
+ [paramName]: { anyOf: [{ type: "object", description: TRUTHY_STRING }, { type: "null" }] }
340
+ }
341
+ }
342
+ }
343
+ }
344
+ }
345
+ };
346
+ const results = await lint(definition);
347
+ (0, import_vitest.expect)(results).toHaveLength(0);
348
+ });
212
349
  });
213
350
  describeRule("action-outputparams-should-have-a-title", (lint) => {
214
351
  import_vitest.test.each(PARAM_NAMES)("missing title should trigger (%s)", async (paramName) => {
@@ -220,6 +357,24 @@ describeRule("action-outputparams-should-have-a-title", (lint) => {
220
357
  (0, import_vitest.expect)(results[0]?.path).toEqual(["actions", ACTION_NAME, "output", "schema", "properties", paramName, ZUI]);
221
358
  (0, import_vitest.expect)(results[0]?.message).toContain("title");
222
359
  });
360
+ import_vitest.test.each(PARAM_NAMES)("missing title with anyOf should trigger (%s)", async (paramName) => {
361
+ const definition = {
362
+ actions: {
363
+ [ACTION_NAME]: {
364
+ output: {
365
+ schema: {
366
+ properties: { [paramName]: { anyOf: [{ type: "object", [ZUI]: {} }, { type: "null" }], [ZUI]: {} } }
367
+ }
368
+ }
369
+ }
370
+ }
371
+ };
372
+ const results = await lint(definition);
373
+ (0, import_vitest.expect)(results).toHaveLength(1);
374
+ (0, import_vitest.expect)(results[0]?.path).toEqual(["actions", ACTION_NAME, "output", "schema", "properties", paramName, ZUI]);
375
+ (0, import_vitest.expect)(results[0]?.message).toContain("title");
376
+ (0, import_vitest.expect)(results[0]?.message).toContain(paramName);
377
+ });
223
378
  import_vitest.test.each(PARAM_NAMES)("empty title should trigger (%s)", async (paramName) => {
224
379
  const definition = {
225
380
  actions: {
@@ -240,6 +395,40 @@ describeRule("action-outputparams-should-have-a-title", (lint) => {
240
395
  ]);
241
396
  (0, import_vitest.expect)(results[0]?.message).toContain("title");
242
397
  });
398
+ import_vitest.test.each(PARAM_NAMES)("empty title nested in anyOf should trigger (%s)", async (paramName) => {
399
+ const definition = {
400
+ actions: {
401
+ [ACTION_NAME]: {
402
+ output: {
403
+ schema: {
404
+ properties: {
405
+ [paramName]: {
406
+ anyOf: [{ type: "object", [ZUI]: { title: EMPTY_STRING } }, { type: "null" }],
407
+ [ZUI]: {}
408
+ }
409
+ }
410
+ }
411
+ }
412
+ }
413
+ }
414
+ };
415
+ const results = await lint(definition);
416
+ (0, import_vitest.expect)(results).toHaveLength(1);
417
+ (0, import_vitest.expect)(results[0]?.path).toEqual([
418
+ "actions",
419
+ ACTION_NAME,
420
+ "output",
421
+ "schema",
422
+ "properties",
423
+ paramName,
424
+ "anyOf",
425
+ "0",
426
+ ZUI,
427
+ "title"
428
+ ]);
429
+ (0, import_vitest.expect)(results[0]?.message).toContain("title");
430
+ (0, import_vitest.expect)(results[0]?.message).toContain(paramName);
431
+ });
243
432
  import_vitest.test.each(PARAM_NAMES)("valid title should not trigger (%s)", async (paramName) => {
244
433
  const definition = {
245
434
  actions: {
@@ -249,6 +438,26 @@ describeRule("action-outputparams-should-have-a-title", (lint) => {
249
438
  const results = await lint(definition);
250
439
  (0, import_vitest.expect)(results).toHaveLength(0);
251
440
  });
441
+ import_vitest.test.each(PARAM_NAMES)("valid title nested in anyOf should not trigger (%s)", async (paramName) => {
442
+ const definition = {
443
+ actions: {
444
+ [ACTION_NAME]: {
445
+ output: {
446
+ schema: {
447
+ properties: {
448
+ [paramName]: {
449
+ anyOf: [{ type: "object", [ZUI]: { title: TRUTHY_STRING } }, { type: "null" }],
450
+ [ZUI]: {}
451
+ }
452
+ }
453
+ }
454
+ }
455
+ }
456
+ }
457
+ };
458
+ const results = await lint(definition);
459
+ (0, import_vitest.expect)(results).toHaveLength(0);
460
+ });
252
461
  });
253
462
  describeRule("action-outputparams-must-have-a-description", (lint) => {
254
463
  import_vitest.test.each(PARAM_NAMES)("missing description should trigger (%s)", async (paramName) => {
@@ -260,6 +469,24 @@ describeRule("action-outputparams-must-have-a-description", (lint) => {
260
469
  (0, import_vitest.expect)(results[0]?.path).toEqual(["actions", ACTION_NAME, "output", "schema", "properties", paramName]);
261
470
  (0, import_vitest.expect)(results[0]?.message).toContain("description");
262
471
  });
472
+ import_vitest.test.each(PARAM_NAMES)("missing description with anyOf should trigger (%s)", async (paramName) => {
473
+ const definition = {
474
+ actions: {
475
+ [ACTION_NAME]: {
476
+ output: {
477
+ schema: {
478
+ properties: { [paramName]: { anyOf: [{ type: "object" }, { type: "null" }] } }
479
+ }
480
+ }
481
+ }
482
+ }
483
+ };
484
+ const results = await lint(definition);
485
+ (0, import_vitest.expect)(results).toHaveLength(1);
486
+ (0, import_vitest.expect)(results[0]?.path).toEqual(["actions", ACTION_NAME, "output", "schema", "properties", paramName]);
487
+ (0, import_vitest.expect)(results[0]?.message).toContain("description");
488
+ (0, import_vitest.expect)(results[0]?.message).toContain(paramName);
489
+ });
263
490
  import_vitest.test.each(PARAM_NAMES)("empty description should trigger (%s)", async (paramName) => {
264
491
  const definition = {
265
492
  actions: {
@@ -279,6 +506,36 @@ describeRule("action-outputparams-must-have-a-description", (lint) => {
279
506
  ]);
280
507
  (0, import_vitest.expect)(results[0]?.message).toContain("description");
281
508
  });
509
+ import_vitest.test.each(PARAM_NAMES)("empty description nested in anyOf should trigger (%s)", async (paramName) => {
510
+ const definition = {
511
+ actions: {
512
+ [ACTION_NAME]: {
513
+ output: {
514
+ schema: {
515
+ properties: {
516
+ [paramName]: { anyOf: [{ type: "object", description: EMPTY_STRING }, { type: "null" }] }
517
+ }
518
+ }
519
+ }
520
+ }
521
+ }
522
+ };
523
+ const results = await lint(definition);
524
+ (0, import_vitest.expect)(results).toHaveLength(1);
525
+ (0, import_vitest.expect)(results[0]?.path).toEqual([
526
+ "actions",
527
+ ACTION_NAME,
528
+ "output",
529
+ "schema",
530
+ "properties",
531
+ paramName,
532
+ "anyOf",
533
+ "0",
534
+ "description"
535
+ ]);
536
+ (0, import_vitest.expect)(results[0]?.message).toContain("description");
537
+ (0, import_vitest.expect)(results[0]?.message).toContain(paramName);
538
+ });
282
539
  import_vitest.test.each(PARAM_NAMES)("valid description should not trigger (%s)", async (paramName) => {
283
540
  const definition = {
284
541
  actions: {
@@ -288,6 +545,23 @@ describeRule("action-outputparams-must-have-a-description", (lint) => {
288
545
  const results = await lint(definition);
289
546
  (0, import_vitest.expect)(results).toHaveLength(0);
290
547
  });
548
+ import_vitest.test.each(PARAM_NAMES)("valid description nested in anyOf should not trigger (%s)", async (paramName) => {
549
+ const definition = {
550
+ actions: {
551
+ [ACTION_NAME]: {
552
+ output: {
553
+ schema: {
554
+ properties: {
555
+ [paramName]: { anyOf: [{ type: "object", description: TRUTHY_STRING }, { type: "null" }] }
556
+ }
557
+ }
558
+ }
559
+ }
560
+ }
561
+ };
562
+ const results = await lint(definition);
563
+ (0, import_vitest.expect)(results).toHaveLength(0);
564
+ });
291
565
  });
292
566
  describeRule("event-outputparams-should-have-title", (lint) => {
293
567
  import_vitest.test.each(PARAM_NAMES)("missing title should trigger (%s)", async (paramName) => {
@@ -299,6 +573,22 @@ describeRule("event-outputparams-should-have-title", (lint) => {
299
573
  (0, import_vitest.expect)(results[0]?.path).toEqual(["events", EVENT_NAME, "schema", "properties", paramName, ZUI]);
300
574
  (0, import_vitest.expect)(results[0]?.message).toContain("title");
301
575
  });
576
+ import_vitest.test.each(PARAM_NAMES)("missing title with anyOf should trigger (%s)", async (paramName) => {
577
+ const definition = {
578
+ events: {
579
+ [EVENT_NAME]: {
580
+ schema: {
581
+ properties: { [paramName]: { anyOf: [{ type: "object", [ZUI]: {} }, { type: "null" }], [ZUI]: {} } }
582
+ }
583
+ }
584
+ }
585
+ };
586
+ const results = await lint(definition);
587
+ (0, import_vitest.expect)(results).toHaveLength(1);
588
+ (0, import_vitest.expect)(results[0]?.path).toEqual(["events", EVENT_NAME, "schema", "properties", paramName, ZUI]);
589
+ (0, import_vitest.expect)(results[0]?.message).toContain("title");
590
+ (0, import_vitest.expect)(results[0]?.message).toContain(paramName);
591
+ });
302
592
  import_vitest.test.each(PARAM_NAMES)("empty title should trigger (%s)", async (paramName) => {
303
593
  const definition = {
304
594
  events: {
@@ -310,6 +600,37 @@ describeRule("event-outputparams-should-have-title", (lint) => {
310
600
  (0, import_vitest.expect)(results[0]?.path).toEqual(["events", EVENT_NAME, "schema", "properties", paramName, ZUI, "title"]);
311
601
  (0, import_vitest.expect)(results[0]?.message).toContain("title");
312
602
  });
603
+ import_vitest.test.each(PARAM_NAMES)("empty title nested in anyOf should trigger (%s)", async (paramName) => {
604
+ const definition = {
605
+ events: {
606
+ [EVENT_NAME]: {
607
+ schema: {
608
+ properties: {
609
+ [paramName]: {
610
+ anyOf: [{ type: "object", [ZUI]: { title: EMPTY_STRING } }, { type: "null" }],
611
+ [ZUI]: {}
612
+ }
613
+ }
614
+ }
615
+ }
616
+ }
617
+ };
618
+ const results = await lint(definition);
619
+ (0, import_vitest.expect)(results).toHaveLength(1);
620
+ (0, import_vitest.expect)(results[0]?.path).toEqual([
621
+ "events",
622
+ EVENT_NAME,
623
+ "schema",
624
+ "properties",
625
+ paramName,
626
+ "anyOf",
627
+ "0",
628
+ ZUI,
629
+ "title"
630
+ ]);
631
+ (0, import_vitest.expect)(results[0]?.message).toContain("title");
632
+ (0, import_vitest.expect)(results[0]?.message).toContain(paramName);
633
+ });
313
634
  import_vitest.test.each(PARAM_NAMES)("valid title should not trigger (%s)", async (paramName) => {
314
635
  const definition = {
315
636
  events: {
@@ -319,6 +640,24 @@ describeRule("event-outputparams-should-have-title", (lint) => {
319
640
  const results = await lint(definition);
320
641
  (0, import_vitest.expect)(results).toHaveLength(0);
321
642
  });
643
+ import_vitest.test.each(PARAM_NAMES)("valid title nested in anyOf should not trigger (%s)", async (paramName) => {
644
+ const definition = {
645
+ events: {
646
+ [EVENT_NAME]: {
647
+ schema: {
648
+ properties: {
649
+ [paramName]: {
650
+ anyOf: [{ type: "object", [ZUI]: { title: TRUTHY_STRING } }, { type: "null" }],
651
+ [ZUI]: {}
652
+ }
653
+ }
654
+ }
655
+ }
656
+ }
657
+ };
658
+ const results = await lint(definition);
659
+ (0, import_vitest.expect)(results).toHaveLength(0);
660
+ });
322
661
  });
323
662
  describeRule("event-outputparams-must-have-description", (lint) => {
324
663
  import_vitest.test.each(PARAM_NAMES)("missing description should trigger (%s)", async (paramName) => {
@@ -330,6 +669,20 @@ describeRule("event-outputparams-must-have-description", (lint) => {
330
669
  (0, import_vitest.expect)(results[0]?.path).toEqual(["events", EVENT_NAME, "schema", "properties", paramName]);
331
670
  (0, import_vitest.expect)(results[0]?.message).toContain("description");
332
671
  });
672
+ import_vitest.test.each(PARAM_NAMES)("missing description with anyOf should trigger (%s)", async (paramName) => {
673
+ const definition = {
674
+ events: {
675
+ [EVENT_NAME]: {
676
+ schema: { properties: { [paramName]: { anyOf: [{ type: "object" }, { type: "null" }] } } }
677
+ }
678
+ }
679
+ };
680
+ const results = await lint(definition);
681
+ (0, import_vitest.expect)(results).toHaveLength(1);
682
+ (0, import_vitest.expect)(results[0]?.path).toEqual(["events", EVENT_NAME, "schema", "properties", paramName]);
683
+ (0, import_vitest.expect)(results[0]?.message).toContain("description");
684
+ (0, import_vitest.expect)(results[0]?.message).toContain(paramName);
685
+ });
333
686
  import_vitest.test.each(PARAM_NAMES)("empty description should trigger (%s)", async (paramName) => {
334
687
  const definition = {
335
688
  events: {
@@ -341,6 +694,31 @@ describeRule("event-outputparams-must-have-description", (lint) => {
341
694
  (0, import_vitest.expect)(results[0]?.path).toEqual(["events", EVENT_NAME, "schema", "properties", paramName, "description"]);
342
695
  (0, import_vitest.expect)(results[0]?.message).toContain("description");
343
696
  });
697
+ import_vitest.test.each(PARAM_NAMES)("empty description nested in anyOf should trigger (%s)", async (paramName) => {
698
+ const definition = {
699
+ events: {
700
+ [EVENT_NAME]: {
701
+ schema: {
702
+ properties: { [paramName]: { anyOf: [{ type: "object", description: EMPTY_STRING }, { type: "null" }] } }
703
+ }
704
+ }
705
+ }
706
+ };
707
+ const results = await lint(definition);
708
+ (0, import_vitest.expect)(results).toHaveLength(1);
709
+ (0, import_vitest.expect)(results[0]?.path).toEqual([
710
+ "events",
711
+ EVENT_NAME,
712
+ "schema",
713
+ "properties",
714
+ paramName,
715
+ "anyOf",
716
+ "0",
717
+ "description"
718
+ ]);
719
+ (0, import_vitest.expect)(results[0]?.message).toContain("description");
720
+ (0, import_vitest.expect)(results[0]?.message).toContain(paramName);
721
+ });
344
722
  import_vitest.test.each(PARAM_NAMES)("valid description should not trigger (%s)", async (paramName) => {
345
723
  const definition = {
346
724
  events: {
@@ -350,6 +728,19 @@ describeRule("event-outputparams-must-have-description", (lint) => {
350
728
  const results = await lint(definition);
351
729
  (0, import_vitest.expect)(results).toHaveLength(0);
352
730
  });
731
+ import_vitest.test.each(PARAM_NAMES)("valid description nested in anyOf should not trigger (%s)", async (paramName) => {
732
+ const definition = {
733
+ events: {
734
+ [EVENT_NAME]: {
735
+ schema: {
736
+ properties: { [paramName]: { anyOf: [{ type: "object", description: TRUTHY_STRING }, { type: "null" }] } }
737
+ }
738
+ }
739
+ }
740
+ };
741
+ const results = await lint(definition);
742
+ (0, import_vitest.expect)(results).toHaveLength(0);
743
+ });
353
744
  });
354
745
  describeRule("events-must-have-a-title", (lint) => {
355
746
  (0, import_vitest.test)("missing title should trigger", async () => {
@@ -405,6 +796,20 @@ describeRule("configuration-fields-must-have-a-title", (lint) => {
405
796
  (0, import_vitest.expect)(results[0]?.path).toEqual(["configuration", "schema", "properties", paramName, ZUI]);
406
797
  (0, import_vitest.expect)(results[0]?.message).toContain("title");
407
798
  });
799
+ import_vitest.test.each(PARAM_NAMES)("missing title with anyOf should trigger (%s)", async (paramName) => {
800
+ const definition = {
801
+ configuration: {
802
+ schema: {
803
+ properties: { [paramName]: { anyOf: [{ type: "object", [ZUI]: {} }, { type: "null" }], [ZUI]: {} } }
804
+ }
805
+ }
806
+ };
807
+ const results = await lint(definition);
808
+ (0, import_vitest.expect)(results).toHaveLength(1);
809
+ (0, import_vitest.expect)(results[0]?.path).toEqual(["configuration", "schema", "properties", paramName, ZUI]);
810
+ (0, import_vitest.expect)(results[0]?.message).toContain("title");
811
+ (0, import_vitest.expect)(results[0]?.message).toContain(paramName);
812
+ });
408
813
  import_vitest.test.each(PARAM_NAMES)("empty title should trigger (%s)", async (paramName) => {
409
814
  const definition = {
410
815
  configuration: { schema: { properties: { [paramName]: { [ZUI]: { title: EMPTY_STRING } } } } }
@@ -414,6 +819,22 @@ describeRule("configuration-fields-must-have-a-title", (lint) => {
414
819
  (0, import_vitest.expect)(results[0]?.path).toEqual(["configuration", "schema", "properties", paramName, ZUI, "title"]);
415
820
  (0, import_vitest.expect)(results[0]?.message).toContain("title");
416
821
  });
822
+ import_vitest.test.each(PARAM_NAMES)("empty title nested in anyOf should trigger (%s)", async (paramName) => {
823
+ const definition = {
824
+ configuration: {
825
+ schema: {
826
+ properties: {
827
+ [paramName]: { anyOf: [{ type: "object", [ZUI]: { title: EMPTY_STRING } }, { type: "null" }], [ZUI]: {} }
828
+ }
829
+ }
830
+ }
831
+ };
832
+ const results = await lint(definition);
833
+ (0, import_vitest.expect)(results).toHaveLength(1);
834
+ (0, import_vitest.expect)(results[0]?.path).toEqual(["configuration", "schema", "properties", paramName, "anyOf", "0", ZUI, "title"]);
835
+ (0, import_vitest.expect)(results[0]?.message).toContain("title");
836
+ (0, import_vitest.expect)(results[0]?.message).toContain(paramName);
837
+ });
417
838
  import_vitest.test.each(PARAM_NAMES)("valid title should not trigger (%s)", async (paramName) => {
418
839
  const definition = {
419
840
  configuration: { schema: { properties: { [paramName]: { [ZUI]: { title: TRUTHY_STRING } } } } }
@@ -421,6 +842,19 @@ describeRule("configuration-fields-must-have-a-title", (lint) => {
421
842
  const results = await lint(definition);
422
843
  (0, import_vitest.expect)(results).toHaveLength(0);
423
844
  });
845
+ import_vitest.test.each(PARAM_NAMES)("valid title nested in anyOf should not trigger (%s)", async (paramName) => {
846
+ const definition = {
847
+ configuration: {
848
+ schema: {
849
+ properties: {
850
+ [paramName]: { anyOf: [{ type: "object", [ZUI]: { title: TRUTHY_STRING } }, { type: "null" }], [ZUI]: {} }
851
+ }
852
+ }
853
+ }
854
+ };
855
+ const results = await lint(definition);
856
+ (0, import_vitest.expect)(results).toHaveLength(0);
857
+ });
424
858
  });
425
859
  describeRule("configuration-fields-must-have-a-description", (lint) => {
426
860
  import_vitest.test.each(PARAM_NAMES)("missing description should trigger (%s)", async (paramName) => {
@@ -432,6 +866,16 @@ describeRule("configuration-fields-must-have-a-description", (lint) => {
432
866
  (0, import_vitest.expect)(results[0]?.path).toEqual(["configuration", "schema", "properties", paramName]);
433
867
  (0, import_vitest.expect)(results[0]?.message).toContain("description");
434
868
  });
869
+ import_vitest.test.each(PARAM_NAMES)("missing description with anyOf should trigger (%s)", async (paramName) => {
870
+ const definition = {
871
+ configuration: { schema: { properties: { [paramName]: { anyOf: [{ type: "object" }, { type: "null" }] } } } }
872
+ };
873
+ const results = await lint(definition);
874
+ (0, import_vitest.expect)(results).toHaveLength(1);
875
+ (0, import_vitest.expect)(results[0]?.path).toEqual(["configuration", "schema", "properties", paramName]);
876
+ (0, import_vitest.expect)(results[0]?.message).toContain("description");
877
+ (0, import_vitest.expect)(results[0]?.message).toContain(paramName);
878
+ });
435
879
  import_vitest.test.each(PARAM_NAMES)("empty description should trigger (%s)", async (paramName) => {
436
880
  const definition = {
437
881
  configuration: { schema: { properties: { [paramName]: { description: EMPTY_STRING } } } }
@@ -441,6 +885,20 @@ describeRule("configuration-fields-must-have-a-description", (lint) => {
441
885
  (0, import_vitest.expect)(results[0]?.path).toEqual(["configuration", "schema", "properties", paramName, "description"]);
442
886
  (0, import_vitest.expect)(results[0]?.message).toContain("description");
443
887
  });
888
+ import_vitest.test.each(PARAM_NAMES)("empty description nested in anyOf should trigger (%s)", async (paramName) => {
889
+ const definition = {
890
+ configuration: {
891
+ schema: {
892
+ properties: { [paramName]: { anyOf: [{ type: "object", description: EMPTY_STRING }, { type: "null" }] } }
893
+ }
894
+ }
895
+ };
896
+ const results = await lint(definition);
897
+ (0, import_vitest.expect)(results).toHaveLength(1);
898
+ (0, import_vitest.expect)(results[0]?.path).toEqual(["configuration", "schema", "properties", paramName, "anyOf", "0", "description"]);
899
+ (0, import_vitest.expect)(results[0]?.message).toContain("description");
900
+ (0, import_vitest.expect)(results[0]?.message).toContain(paramName);
901
+ });
444
902
  import_vitest.test.each(PARAM_NAMES)("valid description should not trigger (%s)", async (paramName) => {
445
903
  const definition = {
446
904
  configuration: { schema: { properties: { [paramName]: { description: TRUTHY_STRING } } } }
@@ -448,6 +906,17 @@ describeRule("configuration-fields-must-have-a-description", (lint) => {
448
906
  const results = await lint(definition);
449
907
  (0, import_vitest.expect)(results).toHaveLength(0);
450
908
  });
909
+ import_vitest.test.each(PARAM_NAMES)("valid description nested in anyOf should not trigger (%s)", async (paramName) => {
910
+ const definition = {
911
+ configuration: {
912
+ schema: {
913
+ properties: { [paramName]: { anyOf: [{ type: "object", description: TRUTHY_STRING }, { type: "null" }] } }
914
+ }
915
+ }
916
+ };
917
+ const results = await lint(definition);
918
+ (0, import_vitest.expect)(results).toHaveLength(0);
919
+ });
451
920
  });
452
921
  describeRule("multiple-configurations-must-have-a-title", (lint) => {
453
922
  (0, import_vitest.test)("missing title should trigger", async () => {
@@ -513,6 +982,24 @@ describeRule("multipes-configurations-fields-must-have-a-title", (lint) => {
513
982
  (0, import_vitest.expect)(results[0]?.path).toEqual(["configurations", CONFIG_NAME, "schema", "properties", paramName, ZUI]);
514
983
  (0, import_vitest.expect)(results[0]?.message).toContain("title");
515
984
  });
985
+ import_vitest.test.each(PARAM_NAMES)("missing title with anyOf should trigger (%s)", async (paramName) => {
986
+ const definition = {
987
+ configurations: {
988
+ [CONFIG_NAME]: {
989
+ schema: {
990
+ properties: {
991
+ [paramName]: { anyOf: [{ type: "object", [ZUI]: {} }, { type: "null" }], [ZUI]: {} }
992
+ }
993
+ }
994
+ }
995
+ }
996
+ };
997
+ const results = await lint(definition);
998
+ (0, import_vitest.expect)(results).toHaveLength(1);
999
+ (0, import_vitest.expect)(results[0]?.path).toEqual(["configurations", CONFIG_NAME, "schema", "properties", paramName, ZUI]);
1000
+ (0, import_vitest.expect)(results[0]?.message).toContain("title");
1001
+ (0, import_vitest.expect)(results[0]?.message).toContain(paramName);
1002
+ });
516
1003
  import_vitest.test.each(PARAM_NAMES)("empty title should trigger (%s)", async (paramName) => {
517
1004
  const definition = {
518
1005
  configurations: {
@@ -524,6 +1011,34 @@ describeRule("multipes-configurations-fields-must-have-a-title", (lint) => {
524
1011
  (0, import_vitest.expect)(results[0]?.path).toEqual(["configurations", CONFIG_NAME, "schema", "properties", paramName, ZUI, "title"]);
525
1012
  (0, import_vitest.expect)(results[0]?.message).toContain("title");
526
1013
  });
1014
+ import_vitest.test.each(PARAM_NAMES)("empty title nested in anyOf should trigger (%s)", async (paramName) => {
1015
+ const definition = {
1016
+ configurations: {
1017
+ [CONFIG_NAME]: {
1018
+ schema: {
1019
+ properties: {
1020
+ [paramName]: { anyOf: [{ type: "object", [ZUI]: { title: EMPTY_STRING } }, { type: "null" }], [ZUI]: {} }
1021
+ }
1022
+ }
1023
+ }
1024
+ }
1025
+ };
1026
+ const results = await lint(definition);
1027
+ (0, import_vitest.expect)(results).toHaveLength(1);
1028
+ (0, import_vitest.expect)(results[0]?.path).toEqual([
1029
+ "configurations",
1030
+ CONFIG_NAME,
1031
+ "schema",
1032
+ "properties",
1033
+ paramName,
1034
+ "anyOf",
1035
+ "0",
1036
+ ZUI,
1037
+ "title"
1038
+ ]);
1039
+ (0, import_vitest.expect)(results[0]?.message).toContain("title");
1040
+ (0, import_vitest.expect)(results[0]?.message).toContain(paramName);
1041
+ });
527
1042
  import_vitest.test.each(PARAM_NAMES)("valid title should not trigger (%s)", async (paramName) => {
528
1043
  const definition = {
529
1044
  configurations: {
@@ -533,6 +1048,24 @@ describeRule("multipes-configurations-fields-must-have-a-title", (lint) => {
533
1048
  const results = await lint(definition);
534
1049
  (0, import_vitest.expect)(results).toHaveLength(0);
535
1050
  });
1051
+ import_vitest.test.each(PARAM_NAMES)("valid title nested in anyOf should not trigger (%s)", async (paramName) => {
1052
+ const definition = {
1053
+ configurations: {
1054
+ [CONFIG_NAME]: {
1055
+ schema: {
1056
+ properties: {
1057
+ [paramName]: {
1058
+ anyOf: [{ type: "object", [ZUI]: { title: TRUTHY_STRING } }, { type: "null" }],
1059
+ [ZUI]: {}
1060
+ }
1061
+ }
1062
+ }
1063
+ }
1064
+ }
1065
+ };
1066
+ const results = await lint(definition);
1067
+ (0, import_vitest.expect)(results).toHaveLength(0);
1068
+ });
536
1069
  });
537
1070
  describeRule("multipes-configurations-fields-must-have-a-description", (lint) => {
538
1071
  import_vitest.test.each(PARAM_NAMES)("missing description should trigger (%s)", async (paramName) => {
@@ -544,6 +1077,24 @@ describeRule("multipes-configurations-fields-must-have-a-description", (lint) =>
544
1077
  (0, import_vitest.expect)(results[0]?.path).toEqual(["configurations", CONFIG_NAME, "schema", "properties", paramName]);
545
1078
  (0, import_vitest.expect)(results[0]?.message).toContain("description");
546
1079
  });
1080
+ import_vitest.test.each(PARAM_NAMES)("missing description with anyOf should trigger (%s)", async (paramName) => {
1081
+ const definition = {
1082
+ configurations: {
1083
+ [CONFIG_NAME]: {
1084
+ schema: {
1085
+ properties: {
1086
+ [paramName]: { anyOf: [{ type: "object" }, { type: "null" }] }
1087
+ }
1088
+ }
1089
+ }
1090
+ }
1091
+ };
1092
+ const results = await lint(definition);
1093
+ (0, import_vitest.expect)(results).toHaveLength(1);
1094
+ (0, import_vitest.expect)(results[0]?.path).toEqual(["configurations", CONFIG_NAME, "schema", "properties", paramName]);
1095
+ (0, import_vitest.expect)(results[0]?.message).toContain("description");
1096
+ (0, import_vitest.expect)(results[0]?.message).toContain(paramName);
1097
+ });
547
1098
  import_vitest.test.each(PARAM_NAMES)("empty description should trigger (%s)", async (paramName) => {
548
1099
  const definition = {
549
1100
  configurations: {
@@ -555,6 +1106,33 @@ describeRule("multipes-configurations-fields-must-have-a-description", (lint) =>
555
1106
  (0, import_vitest.expect)(results[0]?.path).toEqual(["configurations", CONFIG_NAME, "schema", "properties", paramName, "description"]);
556
1107
  (0, import_vitest.expect)(results[0]?.message).toContain("description");
557
1108
  });
1109
+ import_vitest.test.each(PARAM_NAMES)("empty description nested in anyOf should trigger (%s)", async (paramName) => {
1110
+ const definition = {
1111
+ configurations: {
1112
+ [CONFIG_NAME]: {
1113
+ schema: {
1114
+ properties: {
1115
+ [paramName]: { anyOf: [{ type: "object", description: EMPTY_STRING }, { type: "null" }] }
1116
+ }
1117
+ }
1118
+ }
1119
+ }
1120
+ };
1121
+ const results = await lint(definition);
1122
+ (0, import_vitest.expect)(results).toHaveLength(1);
1123
+ (0, import_vitest.expect)(results[0]?.path).toEqual([
1124
+ "configurations",
1125
+ CONFIG_NAME,
1126
+ "schema",
1127
+ "properties",
1128
+ paramName,
1129
+ "anyOf",
1130
+ "0",
1131
+ "description"
1132
+ ]);
1133
+ (0, import_vitest.expect)(results[0]?.message).toContain("description");
1134
+ (0, import_vitest.expect)(results[0]?.message).toContain(paramName);
1135
+ });
558
1136
  import_vitest.test.each(PARAM_NAMES)("valid description should not trigger (%s)", async (paramName) => {
559
1137
  const definition = {
560
1138
  configurations: {
@@ -564,6 +1142,21 @@ describeRule("multipes-configurations-fields-must-have-a-description", (lint) =>
564
1142
  const results = await lint(definition);
565
1143
  (0, import_vitest.expect)(results).toHaveLength(0);
566
1144
  });
1145
+ import_vitest.test.each(PARAM_NAMES)("valid description nested in anyOf should not trigger (%s)", async (paramName) => {
1146
+ const definition = {
1147
+ configurations: {
1148
+ [CONFIG_NAME]: {
1149
+ schema: {
1150
+ properties: {
1151
+ [paramName]: { anyOf: [{ type: "object", description: TRUTHY_STRING }, { type: "null" }] }
1152
+ }
1153
+ }
1154
+ }
1155
+ }
1156
+ };
1157
+ const results = await lint(definition);
1158
+ (0, import_vitest.expect)(results).toHaveLength(0);
1159
+ });
567
1160
  });
568
1161
  describeRule("user-tags-should-have-a-title", (lint) => {
569
1162
  (0, import_vitest.test)("missing title should trigger", async () => {
@@ -821,6 +1414,23 @@ describeRule("state-fields-should-have-title", (lint) => {
821
1414
  const results = await lint(definition);
822
1415
  (0, import_vitest.expect)(results).toHaveLength(1);
823
1416
  (0, import_vitest.expect)(results[0]?.path).toEqual(["states", STATE_NAME, "schema", "properties", paramName, ZUI]);
1417
+ (0, import_vitest.expect)(results[0]?.message).toContain("title");
1418
+ });
1419
+ import_vitest.test.each(PARAM_NAMES)("missing title with anyOf should trigger (%s)", async (paramName) => {
1420
+ const definition = {
1421
+ states: {
1422
+ [STATE_NAME]: {
1423
+ schema: {
1424
+ properties: { [paramName]: { anyOf: [{ type: "object", [ZUI]: {} }, { type: "null" }], [ZUI]: {} } }
1425
+ }
1426
+ }
1427
+ }
1428
+ };
1429
+ const results = await lint(definition);
1430
+ (0, import_vitest.expect)(results).toHaveLength(1);
1431
+ (0, import_vitest.expect)(results[0]?.path).toEqual(["states", STATE_NAME, "schema", "properties", paramName, ZUI]);
1432
+ (0, import_vitest.expect)(results[0]?.message).toContain("title");
1433
+ (0, import_vitest.expect)(results[0]?.message).toContain(paramName);
824
1434
  });
825
1435
  import_vitest.test.each(PARAM_NAMES)("empty title should trigger (%s)", async (paramName) => {
826
1436
  const definition = {
@@ -829,6 +1439,35 @@ describeRule("state-fields-should-have-title", (lint) => {
829
1439
  const results = await lint(definition);
830
1440
  (0, import_vitest.expect)(results).toHaveLength(1);
831
1441
  (0, import_vitest.expect)(results[0]?.path).toEqual(["states", STATE_NAME, "schema", "properties", paramName, ZUI, "title"]);
1442
+ (0, import_vitest.expect)(results[0]?.message).toContain("title");
1443
+ });
1444
+ import_vitest.test.each(PARAM_NAMES)("empty title nested in anyOf should trigger (%s)", async (paramName) => {
1445
+ const definition = {
1446
+ states: {
1447
+ [STATE_NAME]: {
1448
+ schema: {
1449
+ properties: {
1450
+ [paramName]: { anyOf: [{ type: "object", [ZUI]: { title: EMPTY_STRING } }, { type: "null" }], [ZUI]: {} }
1451
+ }
1452
+ }
1453
+ }
1454
+ }
1455
+ };
1456
+ const results = await lint(definition);
1457
+ (0, import_vitest.expect)(results).toHaveLength(1);
1458
+ (0, import_vitest.expect)(results[0]?.path).toEqual([
1459
+ "states",
1460
+ STATE_NAME,
1461
+ "schema",
1462
+ "properties",
1463
+ paramName,
1464
+ "anyOf",
1465
+ "0",
1466
+ ZUI,
1467
+ "title"
1468
+ ]);
1469
+ (0, import_vitest.expect)(results[0]?.message).toContain("title");
1470
+ (0, import_vitest.expect)(results[0]?.message).toContain(paramName);
832
1471
  });
833
1472
  import_vitest.test.each(PARAM_NAMES)("valid title should not trigger (%s)", async (paramName) => {
834
1473
  const definition = {
@@ -837,6 +1476,24 @@ describeRule("state-fields-should-have-title", (lint) => {
837
1476
  const results = await lint(definition);
838
1477
  (0, import_vitest.expect)(results).toHaveLength(0);
839
1478
  });
1479
+ import_vitest.test.each(PARAM_NAMES)("valid title nested in anyOf should not trigger (%s)", async (paramName) => {
1480
+ const definition = {
1481
+ states: {
1482
+ [STATE_NAME]: {
1483
+ schema: {
1484
+ properties: {
1485
+ [paramName]: {
1486
+ anyOf: [{ type: "object", [ZUI]: { title: TRUTHY_STRING } }, { type: "null" }],
1487
+ [ZUI]: {}
1488
+ }
1489
+ }
1490
+ }
1491
+ }
1492
+ }
1493
+ };
1494
+ const results = await lint(definition);
1495
+ (0, import_vitest.expect)(results).toHaveLength(0);
1496
+ });
840
1497
  });
841
1498
  describeRule("state-fields-must-have-description", (lint) => {
842
1499
  import_vitest.test.each(PARAM_NAMES)("missing description should trigger (%s)", async (paramName) => {
@@ -846,6 +1503,23 @@ describeRule("state-fields-must-have-description", (lint) => {
846
1503
  const results = await lint(definition);
847
1504
  (0, import_vitest.expect)(results).toHaveLength(1);
848
1505
  (0, import_vitest.expect)(results[0]?.path).toEqual(["states", STATE_NAME, "schema", "properties", paramName]);
1506
+ (0, import_vitest.expect)(results[0]?.message).toContain("description");
1507
+ });
1508
+ import_vitest.test.each(PARAM_NAMES)("missing description with anyOf should trigger (%s)", async (paramName) => {
1509
+ const definition = {
1510
+ states: {
1511
+ [STATE_NAME]: {
1512
+ schema: {
1513
+ properties: { [paramName]: { anyOf: [{ type: "object" }, { type: "null" }] } }
1514
+ }
1515
+ }
1516
+ }
1517
+ };
1518
+ const results = await lint(definition);
1519
+ (0, import_vitest.expect)(results).toHaveLength(1);
1520
+ (0, import_vitest.expect)(results[0]?.path).toEqual(["states", STATE_NAME, "schema", "properties", paramName]);
1521
+ (0, import_vitest.expect)(results[0]?.message).toContain("description");
1522
+ (0, import_vitest.expect)(results[0]?.message).toContain(paramName);
849
1523
  });
850
1524
  import_vitest.test.each(PARAM_NAMES)("empty description should trigger (%s)", async (paramName) => {
851
1525
  const definition = {
@@ -854,6 +1528,32 @@ describeRule("state-fields-must-have-description", (lint) => {
854
1528
  const results = await lint(definition);
855
1529
  (0, import_vitest.expect)(results).toHaveLength(1);
856
1530
  (0, import_vitest.expect)(results[0]?.path).toEqual(["states", STATE_NAME, "schema", "properties", paramName, "description"]);
1531
+ (0, import_vitest.expect)(results[0]?.message).toContain("description");
1532
+ });
1533
+ import_vitest.test.each(PARAM_NAMES)("empty description nested in anyOf should trigger (%s)", async (paramName) => {
1534
+ const definition = {
1535
+ states: {
1536
+ [STATE_NAME]: {
1537
+ schema: {
1538
+ properties: { [paramName]: { anyOf: [{ type: "object", description: EMPTY_STRING }, { type: "null" }] } }
1539
+ }
1540
+ }
1541
+ }
1542
+ };
1543
+ const results = await lint(definition);
1544
+ (0, import_vitest.expect)(results).toHaveLength(1);
1545
+ (0, import_vitest.expect)(results[0]?.path).toEqual([
1546
+ "states",
1547
+ STATE_NAME,
1548
+ "schema",
1549
+ "properties",
1550
+ paramName,
1551
+ "anyOf",
1552
+ "0",
1553
+ "description"
1554
+ ]);
1555
+ (0, import_vitest.expect)(results[0]?.message).toContain("description");
1556
+ (0, import_vitest.expect)(results[0]?.message).toContain(paramName);
857
1557
  });
858
1558
  import_vitest.test.each(PARAM_NAMES)("valid description should not trigger (%s)", async (paramName) => {
859
1559
  const definition = {
@@ -862,6 +1562,19 @@ describeRule("state-fields-must-have-description", (lint) => {
862
1562
  const results = await lint(definition);
863
1563
  (0, import_vitest.expect)(results).toHaveLength(0);
864
1564
  });
1565
+ import_vitest.test.each(PARAM_NAMES)("valid description nested in anyOf should not trigger (%s)", async (paramName) => {
1566
+ const definition = {
1567
+ states: {
1568
+ [STATE_NAME]: {
1569
+ schema: {
1570
+ properties: { [paramName]: { anyOf: [{ type: "object", description: TRUTHY_STRING }, { type: "null" }] } }
1571
+ }
1572
+ }
1573
+ }
1574
+ };
1575
+ const results = await lint(definition);
1576
+ (0, import_vitest.expect)(results).toHaveLength(0);
1577
+ });
865
1578
  });
866
1579
  describeRule("secrets-must-have-a-description", (lint) => {
867
1580
  (0, import_vitest.test)("missing description should trigger", async () => {