docusaurus-plugin-openapi-docs 0.0.0-beta.643 → 0.0.0-beta.644
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.
|
@@ -396,32 +396,50 @@ function createDetailsNode(name, schemaName, schema, required, nullable) {
|
|
|
396
396
|
children: [
|
|
397
397
|
(0, createDetailsSummary_1.createDetailsSummary)({
|
|
398
398
|
children: [
|
|
399
|
-
(0, utils_1.create)("strong", { children: name }),
|
|
400
399
|
(0, utils_1.create)("span", {
|
|
401
|
-
|
|
402
|
-
children:
|
|
400
|
+
className: "openapi-schema__container",
|
|
401
|
+
children: [
|
|
402
|
+
(0, utils_1.create)("strong", {
|
|
403
|
+
...(schema.deprecated && {
|
|
404
|
+
className: "openapi-schema__strikethrough",
|
|
405
|
+
}),
|
|
406
|
+
children: name,
|
|
407
|
+
}),
|
|
408
|
+
(0, utils_1.create)("span", {
|
|
409
|
+
className: "openapi-schema__name",
|
|
410
|
+
children: ` ${schemaName}`,
|
|
411
|
+
}),
|
|
412
|
+
(0, utils_1.guard)((Array.isArray(required)
|
|
413
|
+
? required.includes(name)
|
|
414
|
+
: required === true) ||
|
|
415
|
+
schema.deprecated ||
|
|
416
|
+
nullable, () => [
|
|
417
|
+
(0, utils_1.create)("span", {
|
|
418
|
+
className: "openapi-schema__divider",
|
|
419
|
+
}),
|
|
420
|
+
]),
|
|
421
|
+
(0, utils_1.guard)(nullable, () => [
|
|
422
|
+
(0, utils_1.create)("span", {
|
|
423
|
+
className: "badge badge--info openapi-schema__nullable",
|
|
424
|
+
children: "nullable",
|
|
425
|
+
}),
|
|
426
|
+
]),
|
|
427
|
+
(0, utils_1.guard)(Array.isArray(required)
|
|
428
|
+
? required.includes(name)
|
|
429
|
+
: required === true, () => [
|
|
430
|
+
(0, utils_1.create)("span", {
|
|
431
|
+
className: "badge badge--danger openapi-schema__required",
|
|
432
|
+
children: "required",
|
|
433
|
+
}),
|
|
434
|
+
]),
|
|
435
|
+
(0, utils_1.guard)(schema.deprecated, () => [
|
|
436
|
+
(0, utils_1.create)("span", {
|
|
437
|
+
className: "badge badge--warning openapi-schema__deprecated",
|
|
438
|
+
children: "deprecated",
|
|
439
|
+
}),
|
|
440
|
+
]),
|
|
441
|
+
],
|
|
403
442
|
}),
|
|
404
|
-
(0, utils_1.guard)((schema.nullable && schema.nullable === true) ||
|
|
405
|
-
(nullable && nullable === true), () => [
|
|
406
|
-
(0, utils_1.create)("strong", {
|
|
407
|
-
style: {
|
|
408
|
-
fontSize: "var(--ifm-code-font-size)",
|
|
409
|
-
color: "var(--openapi-nullable)",
|
|
410
|
-
},
|
|
411
|
-
children: " nullable",
|
|
412
|
-
}),
|
|
413
|
-
]),
|
|
414
|
-
(0, utils_1.guard)(Array.isArray(required)
|
|
415
|
-
? required.includes(name)
|
|
416
|
-
: required === true, () => [
|
|
417
|
-
(0, utils_1.create)("strong", {
|
|
418
|
-
style: {
|
|
419
|
-
fontSize: "var(--ifm-code-font-size)",
|
|
420
|
-
color: "var(--openapi-required)",
|
|
421
|
-
},
|
|
422
|
-
children: " required",
|
|
423
|
-
}),
|
|
424
|
-
]),
|
|
425
443
|
],
|
|
426
444
|
}),
|
|
427
445
|
(0, utils_1.create)("div", {
|
|
@@ -458,20 +476,25 @@ function createPropertyDiscriminator(name, schemaName, schema, discriminator, re
|
|
|
458
476
|
className: "openapi-discriminator__item",
|
|
459
477
|
children: (0, utils_1.create)("div", {
|
|
460
478
|
children: [
|
|
461
|
-
(0, utils_1.create)("
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
},
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
479
|
+
(0, utils_1.create)("span", {
|
|
480
|
+
className: "openapi-schema__container",
|
|
481
|
+
children: [
|
|
482
|
+
(0, utils_1.create)("strong", {
|
|
483
|
+
className: "openapi-discriminator__name",
|
|
484
|
+
children: name,
|
|
485
|
+
}),
|
|
486
|
+
(0, utils_1.guard)(schemaName, (name) => (0, utils_1.create)("span", {
|
|
487
|
+
className: "openapi-schema__name",
|
|
488
|
+
children: ` ${schemaName}`,
|
|
489
|
+
})),
|
|
490
|
+
(0, utils_1.guard)(required, () => [
|
|
491
|
+
(0, utils_1.create)("span", {
|
|
492
|
+
className: "badge badge--danger openapi-schema__required",
|
|
493
|
+
children: "required",
|
|
494
|
+
}),
|
|
495
|
+
]),
|
|
496
|
+
],
|
|
497
|
+
}),
|
|
475
498
|
(0, utils_1.guard)((0, schema_1.getQualifierMessage)(discriminator), (message) => (0, utils_1.create)("div", {
|
|
476
499
|
style: {
|
|
477
500
|
paddingLeft: "1rem",
|
|
@@ -663,12 +686,9 @@ function createRequestSchema({ title, body, ...rest }) {
|
|
|
663
686
|
children: [
|
|
664
687
|
(0, utils_1.create)("strong", { children: `${title}` }),
|
|
665
688
|
(0, utils_1.guard)(body.required && body.required === true, () => [
|
|
666
|
-
(0, utils_1.create)("
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
color: "var(--openapi-required)",
|
|
670
|
-
},
|
|
671
|
-
children: " required",
|
|
689
|
+
(0, utils_1.create)("span", {
|
|
690
|
+
className: "badge badge--danger openapi-schema__required",
|
|
691
|
+
children: "required",
|
|
672
692
|
}),
|
|
673
693
|
]),
|
|
674
694
|
],
|
|
@@ -729,11 +749,8 @@ function createRequestSchema({ title, body, ...rest }) {
|
|
|
729
749
|
})),
|
|
730
750
|
(0, utils_1.guard)(body.required, () => [
|
|
731
751
|
(0, utils_1.create)("strong", {
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
color: "var(--openapi-required)",
|
|
735
|
-
},
|
|
736
|
-
children: " required",
|
|
752
|
+
className: "badge badge--danger openapi-schema__required",
|
|
753
|
+
children: "required",
|
|
737
754
|
}),
|
|
738
755
|
]),
|
|
739
756
|
],
|
|
@@ -398,32 +398,50 @@ function createDetailsNode(name, schemaName, schema, required, nullable) {
|
|
|
398
398
|
children: [
|
|
399
399
|
(0, createDetailsSummary_1.createDetailsSummary)({
|
|
400
400
|
children: [
|
|
401
|
-
(0, utils_1.create)("strong", { children: name }),
|
|
402
401
|
(0, utils_1.create)("span", {
|
|
403
|
-
|
|
404
|
-
children:
|
|
402
|
+
className: "openapi-schema__container",
|
|
403
|
+
children: [
|
|
404
|
+
(0, utils_1.create)("strong", {
|
|
405
|
+
...(schema.deprecated && {
|
|
406
|
+
className: "openapi-schema__strikethrough",
|
|
407
|
+
}),
|
|
408
|
+
children: name,
|
|
409
|
+
}),
|
|
410
|
+
(0, utils_1.create)("span", {
|
|
411
|
+
className: "openapi-schema__name",
|
|
412
|
+
children: ` ${schemaName}`,
|
|
413
|
+
}),
|
|
414
|
+
(0, utils_1.guard)((Array.isArray(required)
|
|
415
|
+
? required.includes(name)
|
|
416
|
+
: required === true) ||
|
|
417
|
+
schema.deprecated ||
|
|
418
|
+
nullable, () => [
|
|
419
|
+
(0, utils_1.create)("span", {
|
|
420
|
+
className: "openapi-schema__divider",
|
|
421
|
+
}),
|
|
422
|
+
]),
|
|
423
|
+
(0, utils_1.guard)(nullable, () => [
|
|
424
|
+
(0, utils_1.create)("span", {
|
|
425
|
+
className: "badge badge--info openapi-schema__nullable",
|
|
426
|
+
children: "nullable",
|
|
427
|
+
}),
|
|
428
|
+
]),
|
|
429
|
+
(0, utils_1.guard)(Array.isArray(required)
|
|
430
|
+
? required.includes(name)
|
|
431
|
+
: required === true, () => [
|
|
432
|
+
(0, utils_1.create)("span", {
|
|
433
|
+
className: "badge badge--danger openapi-schema__required",
|
|
434
|
+
children: "required",
|
|
435
|
+
}),
|
|
436
|
+
]),
|
|
437
|
+
(0, utils_1.guard)(schema.deprecated, () => [
|
|
438
|
+
(0, utils_1.create)("span", {
|
|
439
|
+
className: "badge badge--warning openapi-schema__deprecated",
|
|
440
|
+
children: "deprecated",
|
|
441
|
+
}),
|
|
442
|
+
]),
|
|
443
|
+
],
|
|
405
444
|
}),
|
|
406
|
-
(0, utils_1.guard)((schema.nullable && schema.nullable === true) ||
|
|
407
|
-
(nullable && nullable === true), () => [
|
|
408
|
-
(0, utils_1.create)("strong", {
|
|
409
|
-
style: {
|
|
410
|
-
fontSize: "var(--ifm-code-font-size)",
|
|
411
|
-
color: "var(--openapi-nullable)",
|
|
412
|
-
},
|
|
413
|
-
children: " nullable",
|
|
414
|
-
}),
|
|
415
|
-
]),
|
|
416
|
-
(0, utils_1.guard)(Array.isArray(required)
|
|
417
|
-
? required.includes(name)
|
|
418
|
-
: required === true, () => [
|
|
419
|
-
(0, utils_1.create)("strong", {
|
|
420
|
-
style: {
|
|
421
|
-
fontSize: "var(--ifm-code-font-size)",
|
|
422
|
-
color: "var(--openapi-required)",
|
|
423
|
-
},
|
|
424
|
-
children: " required",
|
|
425
|
-
}),
|
|
426
|
-
]),
|
|
427
445
|
],
|
|
428
446
|
}),
|
|
429
447
|
(0, utils_1.create)("div", {
|
|
@@ -460,20 +478,25 @@ function createPropertyDiscriminator(name, schemaName, schema, discriminator, re
|
|
|
460
478
|
className: "openapi-discriminator__item",
|
|
461
479
|
children: (0, utils_1.create)("div", {
|
|
462
480
|
children: [
|
|
463
|
-
(0, utils_1.create)("
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
},
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
481
|
+
(0, utils_1.create)("span", {
|
|
482
|
+
className: "openapi-schema__container",
|
|
483
|
+
children: [
|
|
484
|
+
(0, utils_1.create)("strong", {
|
|
485
|
+
className: "openapi-discriminator__name",
|
|
486
|
+
children: name,
|
|
487
|
+
}),
|
|
488
|
+
(0, utils_1.guard)(schemaName, (name) => (0, utils_1.create)("span", {
|
|
489
|
+
className: "openapi-schema__name",
|
|
490
|
+
children: ` ${schemaName}`,
|
|
491
|
+
})),
|
|
492
|
+
(0, utils_1.guard)(required, () => [
|
|
493
|
+
(0, utils_1.create)("span", {
|
|
494
|
+
className: "badge badge--danger openapi-schema__required",
|
|
495
|
+
children: "required",
|
|
496
|
+
}),
|
|
497
|
+
]),
|
|
498
|
+
],
|
|
499
|
+
}),
|
|
477
500
|
(0, utils_1.guard)((0, schema_1.getQualifierMessage)(discriminator), (message) => (0, utils_1.create)("div", {
|
|
478
501
|
style: {
|
|
479
502
|
paddingLeft: "1rem",
|
|
@@ -681,12 +704,9 @@ function createResponseSchema({ title, body, ...rest }) {
|
|
|
681
704
|
children: [
|
|
682
705
|
(0, utils_1.create)("strong", { children: `${title}` }),
|
|
683
706
|
(0, utils_1.guard)(body.required && body.required === true, () => [
|
|
684
|
-
(0, utils_1.create)("
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
color: "var(--openapi-required)",
|
|
688
|
-
},
|
|
689
|
-
children: " required",
|
|
707
|
+
(0, utils_1.create)("span", {
|
|
708
|
+
className: "badge badge--danger openapi-schema__required",
|
|
709
|
+
children: "required",
|
|
690
710
|
}),
|
|
691
711
|
]),
|
|
692
712
|
],
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "docusaurus-plugin-openapi-docs",
|
|
3
3
|
"description": "OpenAPI plugin for Docusaurus.",
|
|
4
|
-
"version": "0.0.0-beta.
|
|
4
|
+
"version": "0.0.0-beta.644",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"openapi",
|
|
@@ -68,5 +68,5 @@
|
|
|
68
68
|
"engines": {
|
|
69
69
|
"node": ">=14"
|
|
70
70
|
},
|
|
71
|
-
"gitHead": "
|
|
71
|
+
"gitHead": "82e67409b8afa0f1d4deaeb77b87b0b5b67e6a9c"
|
|
72
72
|
}
|
|
@@ -469,38 +469,58 @@ function createDetailsNode(
|
|
|
469
469
|
children: [
|
|
470
470
|
createDetailsSummary({
|
|
471
471
|
children: [
|
|
472
|
-
create("strong", { children: name }),
|
|
473
472
|
create("span", {
|
|
474
|
-
|
|
475
|
-
children:
|
|
476
|
-
}),
|
|
477
|
-
guard(
|
|
478
|
-
(schema.nullable && schema.nullable === true) ||
|
|
479
|
-
(nullable && nullable === true),
|
|
480
|
-
() => [
|
|
473
|
+
className: "openapi-schema__container",
|
|
474
|
+
children: [
|
|
481
475
|
create("strong", {
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
children: " nullable",
|
|
476
|
+
...(schema.deprecated && {
|
|
477
|
+
className: "openapi-schema__strikethrough",
|
|
478
|
+
}),
|
|
479
|
+
children: name,
|
|
487
480
|
}),
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
Array.isArray(required)
|
|
492
|
-
? required.includes(name)
|
|
493
|
-
: required === true,
|
|
494
|
-
() => [
|
|
495
|
-
create("strong", {
|
|
496
|
-
style: {
|
|
497
|
-
fontSize: "var(--ifm-code-font-size)",
|
|
498
|
-
color: "var(--openapi-required)",
|
|
499
|
-
},
|
|
500
|
-
children: " required",
|
|
481
|
+
create("span", {
|
|
482
|
+
className: "openapi-schema__name",
|
|
483
|
+
children: ` ${schemaName}`,
|
|
501
484
|
}),
|
|
502
|
-
|
|
503
|
-
|
|
485
|
+
guard(
|
|
486
|
+
(Array.isArray(required)
|
|
487
|
+
? required.includes(name)
|
|
488
|
+
: required === true) ||
|
|
489
|
+
schema.deprecated ||
|
|
490
|
+
nullable,
|
|
491
|
+
() => [
|
|
492
|
+
create("span", {
|
|
493
|
+
className: "openapi-schema__divider",
|
|
494
|
+
}),
|
|
495
|
+
]
|
|
496
|
+
),
|
|
497
|
+
guard(nullable, () => [
|
|
498
|
+
create("span", {
|
|
499
|
+
className: "badge badge--info openapi-schema__nullable",
|
|
500
|
+
children: "nullable",
|
|
501
|
+
}),
|
|
502
|
+
]),
|
|
503
|
+
guard(
|
|
504
|
+
Array.isArray(required)
|
|
505
|
+
? required.includes(name)
|
|
506
|
+
: required === true,
|
|
507
|
+
() => [
|
|
508
|
+
create("span", {
|
|
509
|
+
className:
|
|
510
|
+
"badge badge--danger openapi-schema__required",
|
|
511
|
+
children: "required",
|
|
512
|
+
}),
|
|
513
|
+
]
|
|
514
|
+
),
|
|
515
|
+
guard(schema.deprecated, () => [
|
|
516
|
+
create("span", {
|
|
517
|
+
className:
|
|
518
|
+
"badge badge--warning openapi-schema__deprecated",
|
|
519
|
+
children: "deprecated",
|
|
520
|
+
}),
|
|
521
|
+
]),
|
|
522
|
+
],
|
|
523
|
+
}),
|
|
504
524
|
],
|
|
505
525
|
}),
|
|
506
526
|
create("div", {
|
|
@@ -550,22 +570,27 @@ function createPropertyDiscriminator(
|
|
|
550
570
|
className: "openapi-discriminator__item",
|
|
551
571
|
children: create("div", {
|
|
552
572
|
children: [
|
|
553
|
-
create("
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
573
|
+
create("span", {
|
|
574
|
+
className: "openapi-schema__container",
|
|
575
|
+
children: [
|
|
576
|
+
create("strong", {
|
|
577
|
+
className: "openapi-discriminator__name",
|
|
578
|
+
children: name,
|
|
579
|
+
}),
|
|
580
|
+
guard(schemaName, (name) =>
|
|
581
|
+
create("span", {
|
|
582
|
+
className: "openapi-schema__name",
|
|
583
|
+
children: ` ${schemaName}`,
|
|
584
|
+
})
|
|
585
|
+
),
|
|
586
|
+
guard(required, () => [
|
|
587
|
+
create("span", {
|
|
588
|
+
className: "badge badge--danger openapi-schema__required",
|
|
589
|
+
children: "required",
|
|
590
|
+
}),
|
|
591
|
+
]),
|
|
592
|
+
],
|
|
593
|
+
}),
|
|
569
594
|
guard(getQualifierMessage(discriminator), (message) =>
|
|
570
595
|
create("div", {
|
|
571
596
|
style: {
|
|
@@ -886,12 +911,10 @@ export function createRequestSchema({ title, body, ...rest }: Props) {
|
|
|
886
911
|
children: [
|
|
887
912
|
create("strong", { children: `${title}` }),
|
|
888
913
|
guard(body.required && body.required === true, () => [
|
|
889
|
-
create("
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
},
|
|
894
|
-
children: " required",
|
|
914
|
+
create("span", {
|
|
915
|
+
className:
|
|
916
|
+
"badge badge--danger openapi-schema__required",
|
|
917
|
+
children: "required",
|
|
895
918
|
}),
|
|
896
919
|
]),
|
|
897
920
|
],
|
|
@@ -958,11 +981,8 @@ export function createRequestSchema({ title, body, ...rest }: Props) {
|
|
|
958
981
|
),
|
|
959
982
|
guard(body.required, () => [
|
|
960
983
|
create("strong", {
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
color: "var(--openapi-required)",
|
|
964
|
-
},
|
|
965
|
-
children: " required",
|
|
984
|
+
className: "badge badge--danger openapi-schema__required",
|
|
985
|
+
children: "required",
|
|
966
986
|
}),
|
|
967
987
|
]),
|
|
968
988
|
],
|
|
@@ -476,38 +476,58 @@ function createDetailsNode(
|
|
|
476
476
|
children: [
|
|
477
477
|
createDetailsSummary({
|
|
478
478
|
children: [
|
|
479
|
-
create("strong", { children: name }),
|
|
480
479
|
create("span", {
|
|
481
|
-
|
|
482
|
-
children:
|
|
483
|
-
}),
|
|
484
|
-
guard(
|
|
485
|
-
(schema.nullable && schema.nullable === true) ||
|
|
486
|
-
(nullable && nullable === true),
|
|
487
|
-
() => [
|
|
480
|
+
className: "openapi-schema__container",
|
|
481
|
+
children: [
|
|
488
482
|
create("strong", {
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
children: " nullable",
|
|
483
|
+
...(schema.deprecated && {
|
|
484
|
+
className: "openapi-schema__strikethrough",
|
|
485
|
+
}),
|
|
486
|
+
children: name,
|
|
494
487
|
}),
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
Array.isArray(required)
|
|
499
|
-
? required.includes(name)
|
|
500
|
-
: required === true,
|
|
501
|
-
() => [
|
|
502
|
-
create("strong", {
|
|
503
|
-
style: {
|
|
504
|
-
fontSize: "var(--ifm-code-font-size)",
|
|
505
|
-
color: "var(--openapi-required)",
|
|
506
|
-
},
|
|
507
|
-
children: " required",
|
|
488
|
+
create("span", {
|
|
489
|
+
className: "openapi-schema__name",
|
|
490
|
+
children: ` ${schemaName}`,
|
|
508
491
|
}),
|
|
509
|
-
|
|
510
|
-
|
|
492
|
+
guard(
|
|
493
|
+
(Array.isArray(required)
|
|
494
|
+
? required.includes(name)
|
|
495
|
+
: required === true) ||
|
|
496
|
+
schema.deprecated ||
|
|
497
|
+
nullable,
|
|
498
|
+
() => [
|
|
499
|
+
create("span", {
|
|
500
|
+
className: "openapi-schema__divider",
|
|
501
|
+
}),
|
|
502
|
+
]
|
|
503
|
+
),
|
|
504
|
+
guard(nullable, () => [
|
|
505
|
+
create("span", {
|
|
506
|
+
className: "badge badge--info openapi-schema__nullable",
|
|
507
|
+
children: "nullable",
|
|
508
|
+
}),
|
|
509
|
+
]),
|
|
510
|
+
guard(
|
|
511
|
+
Array.isArray(required)
|
|
512
|
+
? required.includes(name)
|
|
513
|
+
: required === true,
|
|
514
|
+
() => [
|
|
515
|
+
create("span", {
|
|
516
|
+
className:
|
|
517
|
+
"badge badge--danger openapi-schema__required",
|
|
518
|
+
children: "required",
|
|
519
|
+
}),
|
|
520
|
+
]
|
|
521
|
+
),
|
|
522
|
+
guard(schema.deprecated, () => [
|
|
523
|
+
create("span", {
|
|
524
|
+
className:
|
|
525
|
+
"badge badge--warning openapi-schema__deprecated",
|
|
526
|
+
children: "deprecated",
|
|
527
|
+
}),
|
|
528
|
+
]),
|
|
529
|
+
],
|
|
530
|
+
}),
|
|
511
531
|
],
|
|
512
532
|
}),
|
|
513
533
|
create("div", {
|
|
@@ -557,22 +577,27 @@ function createPropertyDiscriminator(
|
|
|
557
577
|
className: "openapi-discriminator__item",
|
|
558
578
|
children: create("div", {
|
|
559
579
|
children: [
|
|
560
|
-
create("
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
580
|
+
create("span", {
|
|
581
|
+
className: "openapi-schema__container",
|
|
582
|
+
children: [
|
|
583
|
+
create("strong", {
|
|
584
|
+
className: "openapi-discriminator__name",
|
|
585
|
+
children: name,
|
|
586
|
+
}),
|
|
587
|
+
guard(schemaName, (name) =>
|
|
588
|
+
create("span", {
|
|
589
|
+
className: "openapi-schema__name",
|
|
590
|
+
children: ` ${schemaName}`,
|
|
591
|
+
})
|
|
592
|
+
),
|
|
593
|
+
guard(required, () => [
|
|
594
|
+
create("span", {
|
|
595
|
+
className: "badge badge--danger openapi-schema__required",
|
|
596
|
+
children: "required",
|
|
597
|
+
}),
|
|
598
|
+
]),
|
|
599
|
+
],
|
|
600
|
+
}),
|
|
576
601
|
guard(getQualifierMessage(discriminator), (message) =>
|
|
577
602
|
create("div", {
|
|
578
603
|
style: {
|
|
@@ -917,12 +942,10 @@ export function createResponseSchema({ title, body, ...rest }: Props) {
|
|
|
917
942
|
guard(
|
|
918
943
|
body.required && body.required === true,
|
|
919
944
|
() => [
|
|
920
|
-
create("
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
},
|
|
925
|
-
children: " required",
|
|
945
|
+
create("span", {
|
|
946
|
+
className:
|
|
947
|
+
"badge badge--danger openapi-schema__required",
|
|
948
|
+
children: "required",
|
|
926
949
|
}),
|
|
927
950
|
]
|
|
928
951
|
),
|