docusaurus-plugin-openapi-docs 0.0.0-613 → 0.0.0-616

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.
@@ -0,0 +1,793 @@
1
+ /* ============================================================================
2
+ * Copyright (c) Palo Alto Networks
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ * ========================================================================== */
7
+
8
+ import { SchemaObject } from "../openapi/types";
9
+ import {
10
+ createClosingArrayBracket,
11
+ createOpeningArrayBracket,
12
+ } from "./createArrayBracket";
13
+ import { createDescription } from "./createDescription";
14
+ import { createDetails } from "./createDetails";
15
+ import { createDetailsSummary } from "./createDetailsSummary";
16
+ import { getQualifierMessage, getSchemaName } from "./schema";
17
+ import { create, guard } from "./utils";
18
+
19
+ const jsonSchemaMergeAllOf = require("json-schema-merge-allof");
20
+
21
+ /**
22
+ * Returns a merged representation of allOf array of schemas.
23
+ */
24
+ export function mergeAllOf(allOf: SchemaObject[]) {
25
+ const mergedSchemas = jsonSchemaMergeAllOf(allOf, {
26
+ resolvers: {
27
+ readOnly: function () {
28
+ return true;
29
+ },
30
+ example: function () {
31
+ return true;
32
+ },
33
+ "x-examples": function () {
34
+ return true;
35
+ },
36
+ },
37
+ ignoreAdditionalProperties: true,
38
+ });
39
+
40
+ const required = allOf.reduce((acc, cur) => {
41
+ if (Array.isArray(cur.required)) {
42
+ const next = [...acc, ...cur.required];
43
+ return next;
44
+ }
45
+ return acc;
46
+ }, [] as any);
47
+
48
+ return { mergedSchemas, required };
49
+ }
50
+
51
+ /**
52
+ * For handling nested anyOf/oneOf.
53
+ */
54
+ function createAnyOneOf(schema: SchemaObject): any {
55
+ const type = schema.oneOf ? "oneOf" : "anyOf";
56
+ return create("div", {
57
+ children: [
58
+ create("span", {
59
+ className: "badge badge--info",
60
+ children: type,
61
+ }),
62
+ create("SchemaTabs", {
63
+ children: schema[type]!.map((anyOneSchema, index) => {
64
+ const label = anyOneSchema.title
65
+ ? anyOneSchema.title
66
+ : `MOD${index + 1}`;
67
+ const anyOneChildren = [];
68
+
69
+ if (anyOneSchema.properties !== undefined) {
70
+ anyOneChildren.push(createProperties(anyOneSchema));
71
+ delete anyOneSchema.properties;
72
+ }
73
+
74
+ if (anyOneSchema.allOf !== undefined) {
75
+ anyOneChildren.push(createNodes(anyOneSchema));
76
+ delete anyOneSchema.allOf;
77
+ }
78
+
79
+ if (anyOneSchema.items !== undefined) {
80
+ anyOneChildren.push(createItems(anyOneSchema));
81
+ delete anyOneSchema.items;
82
+ }
83
+
84
+ if (
85
+ anyOneSchema.type === "string" ||
86
+ anyOneSchema.type === "number" ||
87
+ anyOneSchema.type === "integer" ||
88
+ anyOneSchema.type === "boolean"
89
+ ) {
90
+ anyOneChildren.push(createNodes(anyOneSchema));
91
+ }
92
+ if (anyOneChildren.length) {
93
+ if (schema.type === "array") {
94
+ return create("TabItem", {
95
+ label: label,
96
+ value: `${index}-item-properties`,
97
+ children: [
98
+ createOpeningArrayBracket(),
99
+ anyOneChildren,
100
+ createClosingArrayBracket(),
101
+ ]
102
+ .filter(Boolean)
103
+ .flat(),
104
+ });
105
+ }
106
+ return create("TabItem", {
107
+ label: label,
108
+ value: `${index}-item-properties`,
109
+ children: anyOneChildren.filter(Boolean).flat(),
110
+ });
111
+ }
112
+
113
+ return undefined;
114
+ }),
115
+ }),
116
+ ],
117
+ });
118
+ }
119
+
120
+ /**
121
+ * For handling properties.
122
+ */
123
+ function createProperties(schema: SchemaObject) {
124
+ const discriminator = schema.discriminator;
125
+ return Object.entries(schema.properties!).map(([key, val]) => {
126
+ return createEdges({
127
+ name: key,
128
+ schema: val,
129
+ required: Array.isArray(schema.required)
130
+ ? schema.required.includes(key)
131
+ : false,
132
+ discriminator,
133
+ });
134
+ });
135
+ }
136
+
137
+ /**
138
+ * For handling additionalProperties.
139
+ */
140
+ function createAdditionalProperties(schema: SchemaObject) {
141
+ const additionalProperties = schema.additionalProperties;
142
+ const type: string | unknown = additionalProperties?.type;
143
+ // Handle free-form objects
144
+ if (String(additionalProperties) === "true" && schema.type === "object") {
145
+ return create("SchemaItem", {
146
+ name: "property name*",
147
+ required: false,
148
+ schemaName: "any",
149
+ qualifierMessage: getQualifierMessage(schema.additionalProperties),
150
+ schema: schema,
151
+ collapsible: false,
152
+ discriminator: false,
153
+ });
154
+ }
155
+ if (
156
+ (type === "object" || type === "array") &&
157
+ (additionalProperties?.properties ||
158
+ additionalProperties?.items ||
159
+ additionalProperties?.allOf ||
160
+ additionalProperties?.additionalProperties ||
161
+ additionalProperties?.oneOf ||
162
+ additionalProperties?.anyOf)
163
+ ) {
164
+ const title = additionalProperties.title as string;
165
+ const schemaName = getSchemaName(additionalProperties);
166
+ const required = schema.required ?? false;
167
+ return createDetailsNode(
168
+ "property name*",
169
+ title ?? schemaName,
170
+ additionalProperties,
171
+ required,
172
+ schema.nullable
173
+ );
174
+ }
175
+
176
+ if (
177
+ (schema.additionalProperties?.type as string) === "string" ||
178
+ (schema.additionalProperties?.type as string) === "object" ||
179
+ (schema.additionalProperties?.type as string) === "boolean" ||
180
+ (schema.additionalProperties?.type as string) === "integer" ||
181
+ (schema.additionalProperties?.type as string) === "number"
182
+ ) {
183
+ const additionalProperties =
184
+ schema.additionalProperties?.additionalProperties;
185
+ if (additionalProperties !== undefined) {
186
+ const type = schema.additionalProperties?.additionalProperties?.type;
187
+ const schemaName = getSchemaName(
188
+ schema.additionalProperties?.additionalProperties!
189
+ );
190
+ return create("SchemaItem", {
191
+ name: "property name*",
192
+ required: false,
193
+ schemaName: schemaName ?? type,
194
+ qualifierMessage:
195
+ schema.additionalProperties ??
196
+ getQualifierMessage(schema.additionalProperties),
197
+ schema: schema,
198
+ collapsible: false,
199
+ discriminator: false,
200
+ });
201
+ }
202
+ const schemaName = getSchemaName(schema.additionalProperties!);
203
+ return create("SchemaItem", {
204
+ name: "property name*",
205
+ required: false,
206
+ schemaName: schemaName,
207
+ qualifierMessage: getQualifierMessage(schema),
208
+ schema: schema.additionalProperties,
209
+ collapsible: false,
210
+ discriminator: false,
211
+ });
212
+ }
213
+ return Object.entries(schema.additionalProperties!).map(([key, val]) =>
214
+ createEdges({
215
+ name: key,
216
+ schema: val,
217
+ required: Array.isArray(schema.required)
218
+ ? schema.required.includes(key)
219
+ : false,
220
+ })
221
+ );
222
+ }
223
+
224
+ /**
225
+ * For handling items.
226
+ */
227
+ function createItems(schema: SchemaObject) {
228
+ if (schema.items?.properties !== undefined) {
229
+ return [
230
+ createOpeningArrayBracket(),
231
+ createProperties(schema.items),
232
+ createClosingArrayBracket(),
233
+ ].flat();
234
+ }
235
+
236
+ if (schema.items?.additionalProperties !== undefined) {
237
+ return [
238
+ createOpeningArrayBracket(),
239
+ createAdditionalProperties(schema.items),
240
+ createClosingArrayBracket(),
241
+ ].flat();
242
+ }
243
+
244
+ if (schema.items?.oneOf !== undefined || schema.items?.anyOf !== undefined) {
245
+ return [
246
+ createOpeningArrayBracket(),
247
+ createAnyOneOf(schema.items!),
248
+ createClosingArrayBracket(),
249
+ ].flat();
250
+ }
251
+
252
+ if (schema.items?.allOf !== undefined) {
253
+ // TODO: figure out if and how we should pass merged required array
254
+ const {
255
+ mergedSchemas,
256
+ }: { mergedSchemas: SchemaObject; required: string[] } = mergeAllOf(
257
+ schema.items?.allOf
258
+ );
259
+
260
+ // Handles combo anyOf/oneOf + properties
261
+ if (
262
+ (mergedSchemas.oneOf !== undefined ||
263
+ mergedSchemas.anyOf !== undefined) &&
264
+ mergedSchemas.properties
265
+ ) {
266
+ return [
267
+ createOpeningArrayBracket(),
268
+ createAnyOneOf(mergedSchemas),
269
+ createProperties(mergedSchemas),
270
+ createClosingArrayBracket(),
271
+ ].flat();
272
+ }
273
+
274
+ // Handles only anyOf/oneOf
275
+ if (
276
+ mergedSchemas.oneOf !== undefined ||
277
+ mergedSchemas.anyOf !== undefined
278
+ ) {
279
+ return [
280
+ createOpeningArrayBracket(),
281
+ createAnyOneOf(mergedSchemas),
282
+ createClosingArrayBracket(),
283
+ ].flat();
284
+ }
285
+
286
+ // Handles properties
287
+ if (mergedSchemas.properties !== undefined) {
288
+ return [
289
+ createOpeningArrayBracket(),
290
+ createProperties(mergedSchemas),
291
+ createClosingArrayBracket(),
292
+ ].flat();
293
+ }
294
+ }
295
+
296
+ if (
297
+ schema.items?.type === "string" ||
298
+ schema.items?.type === "number" ||
299
+ schema.items?.type === "integer" ||
300
+ schema.items?.type === "boolean" ||
301
+ schema.items?.type === "object"
302
+ ) {
303
+ return [
304
+ createOpeningArrayBracket(),
305
+ createNodes(schema.items),
306
+ createClosingArrayBracket(),
307
+ ].flat();
308
+ }
309
+
310
+ // TODO: clean this up or eliminate it?
311
+ return [
312
+ createOpeningArrayBracket(),
313
+ Object.entries(schema.items!).map(([key, val]) =>
314
+ createEdges({
315
+ name: key,
316
+ schema: val,
317
+ required: Array.isArray(schema.required)
318
+ ? schema.required.includes(key)
319
+ : false,
320
+ })
321
+ ),
322
+ createClosingArrayBracket(),
323
+ ].flat();
324
+ }
325
+
326
+ /**
327
+ * For handling nested properties.
328
+ */
329
+ function createDetailsNode(
330
+ name: string,
331
+ schemaName: string,
332
+ schema: SchemaObject,
333
+ required: string[] | boolean,
334
+ nullable: boolean | unknown
335
+ ): any {
336
+ return create("SchemaItem", {
337
+ collapsible: true,
338
+ className: "schemaItem",
339
+ children: [
340
+ createDetails({
341
+ children: [
342
+ createDetailsSummary({
343
+ children: [
344
+ create("strong", { children: name }),
345
+ create("span", {
346
+ style: { opacity: "0.6" },
347
+ children: ` ${schemaName}`,
348
+ }),
349
+ guard(
350
+ (schema.nullable && schema.nullable === true) ||
351
+ (nullable && nullable === true),
352
+ () => [
353
+ create("strong", {
354
+ style: {
355
+ fontSize: "var(--ifm-code-font-size)",
356
+ color: "var(--openapi-nullable)",
357
+ },
358
+ children: " nullable",
359
+ }),
360
+ ]
361
+ ),
362
+ guard(
363
+ Array.isArray(required)
364
+ ? required.includes(name)
365
+ : required === true,
366
+ () => [
367
+ create("strong", {
368
+ style: {
369
+ fontSize: "var(--ifm-code-font-size)",
370
+ color: "var(--openapi-required)",
371
+ },
372
+ children: " required",
373
+ }),
374
+ ]
375
+ ),
376
+ ],
377
+ }),
378
+ create("div", {
379
+ style: { marginLeft: "1rem" },
380
+ children: [
381
+ guard(getQualifierMessage(schema), (message) =>
382
+ create("div", {
383
+ style: { marginTop: ".5rem", marginBottom: ".5rem" },
384
+ children: createDescription(message),
385
+ })
386
+ ),
387
+ guard(schema.description, (description) =>
388
+ create("div", {
389
+ style: { marginTop: ".5rem", marginBottom: ".5rem" },
390
+ children: createDescription(description),
391
+ })
392
+ ),
393
+ createNodes(schema),
394
+ ],
395
+ }),
396
+ ],
397
+ }),
398
+ ],
399
+ });
400
+ }
401
+
402
+ /**
403
+ * For handling anyOf/oneOf properties.
404
+ */
405
+ function createAnyOneOfProperty(
406
+ name: string,
407
+ schemaName: string,
408
+ schema: SchemaObject,
409
+ required: string[] | boolean,
410
+ nullable: boolean | unknown
411
+ ): any {
412
+ const type = schema.oneOf ? "oneOf" : "anyOf";
413
+ const children = schema[type] || [];
414
+ return create("SchemaItem", {
415
+ collapsible: true,
416
+ className: "schemaItem",
417
+ children: [
418
+ createDetails({
419
+ children: [
420
+ createDetailsSummary({
421
+ children: [
422
+ create("strong", { children: name }),
423
+ create("span", {
424
+ style: { opacity: "0.6" },
425
+ children: ` ${schemaName}`,
426
+ }),
427
+ guard(
428
+ (schema.nullable && schema.nullable === true) ||
429
+ (nullable && nullable === true),
430
+ () => [
431
+ create("strong", {
432
+ style: {
433
+ fontSize: "var(--ifm-code-font-size)",
434
+ color: "var(--openapi-nullable)",
435
+ },
436
+ children: " nullable",
437
+ }),
438
+ ]
439
+ ),
440
+ guard(
441
+ Array.isArray(required)
442
+ ? required.includes(name)
443
+ : required === true,
444
+ () => [
445
+ create("strong", {
446
+ style: {
447
+ fontSize: "var(--ifm-code-font-size)",
448
+ color: "var(--openapi-required)",
449
+ },
450
+ children: " required",
451
+ }),
452
+ ]
453
+ ),
454
+ ],
455
+ }),
456
+ create("div", {
457
+ style: { marginLeft: "1rem" },
458
+ children: [
459
+ guard(getQualifierMessage(schema), (message) =>
460
+ create("div", {
461
+ style: { marginTop: ".5rem", marginBottom: ".5rem" },
462
+ children: createDescription(message),
463
+ })
464
+ ),
465
+ guard(schema.description, (description) =>
466
+ create("div", {
467
+ style: { marginTop: ".5rem", marginBottom: ".5rem" },
468
+ children: createDescription(description),
469
+ })
470
+ ),
471
+ ],
472
+ }),
473
+ create("div", {
474
+ children: [
475
+ create("span", {
476
+ className: "badge badge--info",
477
+ children: type,
478
+ }),
479
+ create("SchemaTabs", {
480
+ children: children.map((property, index) => {
481
+ const label = property.title ?? `MOD${index + 1}`;
482
+ if (property.properties) {
483
+ return create("TabItem", {
484
+ label: label,
485
+ value: `${index}-property`,
486
+ children: [createNodes(property)],
487
+ });
488
+ }
489
+ return create("TabItem", {
490
+ label: label,
491
+ value: `${index}-property`,
492
+ children: [
493
+ create("p", { children: label }),
494
+ guard(schema.description, (description) =>
495
+ create("div", {
496
+ style: { marginTop: ".5rem", marginBottom: ".5rem" },
497
+ children: createDescription(description),
498
+ })
499
+ ),
500
+ ],
501
+ });
502
+ }),
503
+ }),
504
+ ],
505
+ }),
506
+ ],
507
+ }),
508
+ ],
509
+ });
510
+ }
511
+
512
+ /**
513
+ * For handling discriminators that map to a same-level property (like 'petType').
514
+ * Note: These should only be encountered while iterating through properties.
515
+ */
516
+ function createPropertyDiscriminator(
517
+ name: string,
518
+ schemaName: string,
519
+ schema: SchemaObject,
520
+ discriminator: any,
521
+ required: string[] | boolean
522
+ ) {
523
+ if (schema === undefined) {
524
+ return undefined;
525
+ }
526
+
527
+ if (discriminator.mapping === undefined) {
528
+ return undefined;
529
+ }
530
+
531
+ return create("SchemaItem", {
532
+ name,
533
+ required: Array.isArray(required) ? required.includes(name) : required,
534
+ schemaName: schemaName,
535
+ qualifierMessage: getQualifierMessage(schema),
536
+ schema: schema,
537
+ collapsible: false,
538
+ discriminator: true,
539
+ children: [
540
+ create("DiscriminatorTabs", {
541
+ children: Object.keys(discriminator?.mapping!).map((key, index) => {
542
+ const label = key;
543
+ return create("TabItem", {
544
+ label: label,
545
+ value: `${index}-item-discriminator`,
546
+ children: createNodes(discriminator?.mapping[key]),
547
+ });
548
+ }),
549
+ }),
550
+ ],
551
+ });
552
+ }
553
+
554
+ interface EdgeProps {
555
+ name: string;
556
+ schema: SchemaObject;
557
+ required: string[] | boolean;
558
+ discriminator?: any | unknown;
559
+ }
560
+
561
+ /**
562
+ * Creates the edges or "leaves" of a schema tree. Edges can branch into sub-nodes with createDetails().
563
+ */
564
+ function createEdges({
565
+ name,
566
+ schema,
567
+ required,
568
+ discriminator,
569
+ }: EdgeProps): any {
570
+ const schemaName = getSchemaName(schema);
571
+
572
+ if (discriminator !== undefined && discriminator.propertyName === name) {
573
+ return createPropertyDiscriminator(
574
+ name,
575
+ "string",
576
+ schema,
577
+ discriminator,
578
+ required
579
+ );
580
+ }
581
+
582
+ if (schema.oneOf !== undefined || schema.anyOf !== undefined) {
583
+ return createAnyOneOfProperty(
584
+ name,
585
+ schemaName,
586
+ schema,
587
+ required,
588
+ schema.nullable
589
+ );
590
+ }
591
+
592
+ if (schema.allOf !== undefined) {
593
+ const {
594
+ mergedSchemas,
595
+ required,
596
+ }: { mergedSchemas: SchemaObject; required: string[] | boolean } =
597
+ mergeAllOf(schema.allOf);
598
+ const mergedSchemaName = getSchemaName(mergedSchemas);
599
+
600
+ if (
601
+ mergedSchemas.oneOf !== undefined ||
602
+ mergedSchemas.anyOf !== undefined
603
+ ) {
604
+ return createDetailsNode(
605
+ name,
606
+ mergedSchemaName,
607
+ mergedSchemas,
608
+ required,
609
+ schema.nullable
610
+ );
611
+ }
612
+
613
+ if (mergedSchemas.properties !== undefined) {
614
+ return createDetailsNode(
615
+ name,
616
+ mergedSchemaName,
617
+ mergedSchemas,
618
+ required,
619
+ schema.nullable
620
+ );
621
+ }
622
+
623
+ if (mergedSchemas.additionalProperties !== undefined) {
624
+ return createDetailsNode(
625
+ name,
626
+ mergedSchemaName,
627
+ mergedSchemas,
628
+ required,
629
+ schema.nullable
630
+ );
631
+ }
632
+
633
+ // array of objects
634
+ if (mergedSchemas.items?.properties !== undefined) {
635
+ return createDetailsNode(
636
+ name,
637
+ mergedSchemaName,
638
+ mergedSchemas,
639
+ required,
640
+ schema.nullable
641
+ );
642
+ }
643
+
644
+ if (mergedSchemas.readOnly && mergedSchemas.readOnly === true) {
645
+ return undefined;
646
+ }
647
+
648
+ return create("SchemaItem", {
649
+ collapsible: false,
650
+ name,
651
+ required: Array.isArray(required) ? required.includes(name) : required,
652
+ schemaName: schemaName,
653
+ qualifierMessage: getQualifierMessage(schema),
654
+ schema: mergedSchemas,
655
+ });
656
+ }
657
+
658
+ if (schema.properties !== undefined) {
659
+ return createDetailsNode(
660
+ name,
661
+ schemaName,
662
+ schema,
663
+ required,
664
+ schema.nullable
665
+ );
666
+ }
667
+
668
+ if (schema.additionalProperties !== undefined) {
669
+ return createDetailsNode(
670
+ name,
671
+ schemaName,
672
+ schema,
673
+ required,
674
+ schema.nullable
675
+ );
676
+ }
677
+
678
+ // array of objects
679
+ if (schema.items?.properties !== undefined) {
680
+ return createDetailsNode(
681
+ name,
682
+ schemaName,
683
+ schema,
684
+ required,
685
+ schema.nullable
686
+ );
687
+ }
688
+
689
+ if (schema.items?.anyOf !== undefined || schema.items?.oneOf !== undefined) {
690
+ return createDetailsNode(
691
+ name,
692
+ schemaName,
693
+ schema,
694
+ required,
695
+ schema.nullable
696
+ );
697
+ }
698
+
699
+ if (schema.readOnly && schema.readOnly === true) {
700
+ return undefined;
701
+ }
702
+
703
+ // primitives and array of non-objects
704
+ return create("SchemaItem", {
705
+ collapsible: false,
706
+ name,
707
+ required: Array.isArray(required) ? required.includes(name) : required,
708
+ schemaName: schemaName,
709
+ qualifierMessage: getQualifierMessage(schema),
710
+ schema: schema,
711
+ });
712
+ }
713
+
714
+ /**
715
+ * Creates a hierarchical level of a schema tree. Nodes produce edges that can branch into sub-nodes with edges, recursively.
716
+ */
717
+ export function createNodes(schema: SchemaObject): any {
718
+ const nodes = [];
719
+ // if (schema.discriminator !== undefined) {
720
+ // return createDiscriminator(schema);
721
+ // }
722
+
723
+ if (schema.oneOf !== undefined || schema.anyOf !== undefined) {
724
+ nodes.push(createAnyOneOf(schema));
725
+ }
726
+
727
+ if (schema.allOf !== undefined) {
728
+ const { mergedSchemas } = mergeAllOf(schema.allOf);
729
+
730
+ // allOf seems to always result in properties
731
+ if (mergedSchemas.properties !== undefined) {
732
+ nodes.push(createProperties(mergedSchemas));
733
+ }
734
+ }
735
+
736
+ if (schema.properties !== undefined) {
737
+ nodes.push(createProperties(schema));
738
+ }
739
+
740
+ if (schema.additionalProperties !== undefined) {
741
+ nodes.push(createAdditionalProperties(schema));
742
+ }
743
+
744
+ // TODO: figure out how to handle array of objects
745
+ if (schema.items !== undefined) {
746
+ nodes.push(createItems(schema));
747
+ }
748
+
749
+ if (nodes.length && nodes.length > 0) {
750
+ return nodes.filter(Boolean).flat();
751
+ }
752
+
753
+ // primitive
754
+ if (schema.type !== undefined) {
755
+ if (schema.allOf) {
756
+ //handle circular result in allOf
757
+ if (schema.allOf.length && typeof schema.allOf[0] === "string") {
758
+ return create("div", {
759
+ style: {
760
+ marginTop: ".5rem",
761
+ marginBottom: ".5rem",
762
+ marginLeft: "1rem",
763
+ },
764
+ children: createDescription(schema.allOf[0]),
765
+ });
766
+ }
767
+ }
768
+ return create("div", {
769
+ style: {
770
+ marginTop: ".5rem",
771
+ marginBottom: ".5rem",
772
+ marginLeft: "1rem",
773
+ },
774
+ children: createDescription(schema.type),
775
+ });
776
+ }
777
+
778
+ // handle circular references
779
+ if (typeof schema === "string") {
780
+ return create("div", {
781
+ style: {
782
+ marginTop: ".5rem",
783
+ marginBottom: ".5rem",
784
+ marginLeft: "1rem",
785
+ },
786
+ children: [createDescription(schema)],
787
+ });
788
+ }
789
+
790
+ // Unknown node/schema type should return undefined
791
+ // So far, haven't seen this hit in testing
792
+ return "any";
793
+ }