docusaurus-plugin-openapi-docs 0.0.0-beta.658 → 0.0.0-beta.660

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.
@@ -627,29 +627,25 @@ function createNodes(schema) {
627
627
  }
628
628
  // primitive
629
629
  if (schema.type !== undefined) {
630
- return (0, utils_1.create)("li", {
631
- children: (0, utils_1.create)("div", {
632
- children: [
633
- (0, utils_1.create)("strong", { children: schema.type }),
634
- (0, utils_1.guard)(schema.format, (format) => (0, utils_1.create)("span", {
635
- style: { opacity: "0.6" },
636
- children: ` ${format}`,
637
- })),
638
- (0, utils_1.guard)((0, schema_1.getQualifierMessage)(schema), (message) => (0, utils_1.create)("div", {
639
- style: { marginTop: "var(--ifm-table-cell-padding)" },
640
- children: (0, createDescription_1.createDescription)(message),
641
- })),
642
- (0, utils_1.guard)(schema.description, (description) => (0, utils_1.create)("div", {
643
- style: { marginTop: "var(--ifm-table-cell-padding)" },
644
- children: (0, createDescription_1.createDescription)(description),
645
- })),
646
- ],
647
- }),
630
+ return (0, utils_1.create)("SchemaItem", {
631
+ collapsible: false,
632
+ name: schema.type,
633
+ required: false,
634
+ schemaName: schema.format,
635
+ qualifierMessage: (0, schema_1.getQualifierMessage)(schema),
636
+ schema: schema,
648
637
  });
649
638
  }
650
639
  // Unknown node/schema type should return undefined
651
640
  // So far, haven't seen this hit in testing
652
- return "any";
641
+ return (0, utils_1.create)("SchemaItem", {
642
+ collapsible: false,
643
+ name: "any",
644
+ required: false,
645
+ schemaName: schema.format,
646
+ qualifierMessage: (0, schema_1.getQualifierMessage)(schema),
647
+ schema: schema,
648
+ });
653
649
  }
654
650
  function createRequestSchema({ title, body, ...rest }) {
655
651
  var _a;
@@ -630,29 +630,25 @@ function createNodes(schema) {
630
630
  }
631
631
  // primitive
632
632
  if (schema.type !== undefined) {
633
- return (0, utils_1.create)("li", {
634
- children: (0, utils_1.create)("div", {
635
- children: [
636
- (0, utils_1.create)("strong", { children: schema.type }),
637
- (0, utils_1.guard)(schema.format, (format) => (0, utils_1.create)("span", {
638
- style: { opacity: "0.6" },
639
- children: ` ${format}`,
640
- })),
641
- (0, utils_1.guard)((0, schema_1.getQualifierMessage)(schema), (message) => (0, utils_1.create)("div", {
642
- style: { marginTop: "var(--ifm-table-cell-padding)" },
643
- children: (0, createDescription_1.createDescription)(message),
644
- })),
645
- (0, utils_1.guard)(schema.description, (description) => (0, utils_1.create)("div", {
646
- style: { marginTop: "var(--ifm-table-cell-padding)" },
647
- children: (0, createDescription_1.createDescription)(description),
648
- })),
649
- ],
650
- }),
633
+ return (0, utils_1.create)("SchemaItem", {
634
+ collapsible: false,
635
+ name: schema.type,
636
+ required: false,
637
+ schemaName: schema.format,
638
+ qualifierMessage: (0, schema_1.getQualifierMessage)(schema),
639
+ schema: schema,
651
640
  });
652
641
  }
653
642
  // Unknown node/schema type should return undefined
654
643
  // So far, haven't seen this hit in testing
655
- return "any";
644
+ return (0, utils_1.create)("SchemaItem", {
645
+ collapsible: false,
646
+ name: "any",
647
+ required: false,
648
+ schemaName: schema.format,
649
+ qualifierMessage: (0, schema_1.getQualifierMessage)(schema),
650
+ schema: schema,
651
+ });
656
652
  }
657
653
  function createResponseSchema({ title, body, ...rest }) {
658
654
  if (body === undefined ||
@@ -29,8 +29,8 @@ function createApiPageMD({ title, api: { deprecated, "x-deprecated-description":
29
29
  return (0, utils_1.render)([
30
30
  `import ApiTabs from "@theme/ApiTabs";\n`,
31
31
  `import DiscriminatorTabs from "@theme/DiscriminatorTabs";\n`,
32
- `import MethodEndpoint from "@theme/ApiDemoPanel/MethodEndpoint";\n`,
33
- `import SecuritySchemes from "@theme/ApiDemoPanel/SecuritySchemes";\n`,
32
+ `import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint";\n`,
33
+ `import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes";\n`,
34
34
  `import MimeTabs from "@theme/MimeTabs";\n`,
35
35
  `import ParamsItem from "@theme/ParamsItem";\n`,
36
36
  `import ResponseSamples from "@theme/ResponseSamples";\n`,
@@ -61,7 +61,7 @@ function createInfoPageMD({ info: { title, version, description, contact, licens
61
61
  `import ApiLogo from "@theme/ApiLogo";\n`,
62
62
  `import SchemaTabs from "@theme/SchemaTabs";\n`,
63
63
  `import TabItem from "@theme/TabItem";\n`,
64
- `import Export from "@theme/ApiDemoPanel/Export";\n\n`,
64
+ `import Export from "@theme/ApiExplorer/Export";\n\n`,
65
65
  (0, createVersionBadge_1.createVersionBadge)(version),
66
66
  (0, createDownload_1.createDownload)(downloadUrl),
67
67
  (0, createHeading_1.createHeading)(title.replace(utils_1.lessThan, "<").replace(utils_1.greaterThan, ">")),
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.658",
4
+ "version": "0.0.0-beta.660",
5
5
  "license": "MIT",
6
6
  "keywords": [
7
7
  "openapi",
@@ -60,5 +60,5 @@
60
60
  "engines": {
61
61
  "node": ">=14"
62
62
  },
63
- "gitHead": "e0267b4b1c5c4002fd0b75a5254a55c6944fc9f5"
63
+ "gitHead": "ab105a0abb66443e79dc1331b05b874f362d894f"
64
64
  }
@@ -819,36 +819,26 @@ function createNodes(schema: SchemaObject): any {
819
819
 
820
820
  // primitive
821
821
  if (schema.type !== undefined) {
822
- return create("li", {
823
- children: create("div", {
824
- children: [
825
- create("strong", { children: schema.type }),
826
- guard(schema.format, (format) =>
827
- create("span", {
828
- style: { opacity: "0.6" },
829
- children: ` ${format}`,
830
- })
831
- ),
832
- guard(getQualifierMessage(schema), (message) =>
833
- create("div", {
834
- style: { marginTop: "var(--ifm-table-cell-padding)" },
835
- children: createDescription(message),
836
- })
837
- ),
838
- guard(schema.description, (description) =>
839
- create("div", {
840
- style: { marginTop: "var(--ifm-table-cell-padding)" },
841
- children: createDescription(description),
842
- })
843
- ),
844
- ],
845
- }),
822
+ return create("SchemaItem", {
823
+ collapsible: false,
824
+ name: schema.type,
825
+ required: false,
826
+ schemaName: schema.format,
827
+ qualifierMessage: getQualifierMessage(schema),
828
+ schema: schema,
846
829
  });
847
830
  }
848
831
 
849
832
  // Unknown node/schema type should return undefined
850
833
  // So far, haven't seen this hit in testing
851
- return "any";
834
+ return create("SchemaItem", {
835
+ collapsible: false,
836
+ name: "any",
837
+ required: false,
838
+ schemaName: schema.format,
839
+ qualifierMessage: getQualifierMessage(schema),
840
+ schema: schema,
841
+ });
852
842
  }
853
843
 
854
844
  interface Props {
@@ -826,36 +826,26 @@ function createNodes(schema: SchemaObject): any {
826
826
 
827
827
  // primitive
828
828
  if (schema.type !== undefined) {
829
- return create("li", {
830
- children: create("div", {
831
- children: [
832
- create("strong", { children: schema.type }),
833
- guard(schema.format, (format) =>
834
- create("span", {
835
- style: { opacity: "0.6" },
836
- children: ` ${format}`,
837
- })
838
- ),
839
- guard(getQualifierMessage(schema), (message) =>
840
- create("div", {
841
- style: { marginTop: "var(--ifm-table-cell-padding)" },
842
- children: createDescription(message),
843
- })
844
- ),
845
- guard(schema.description, (description) =>
846
- create("div", {
847
- style: { marginTop: "var(--ifm-table-cell-padding)" },
848
- children: createDescription(description),
849
- })
850
- ),
851
- ],
852
- }),
829
+ return create("SchemaItem", {
830
+ collapsible: false,
831
+ name: schema.type,
832
+ required: false,
833
+ schemaName: schema.format,
834
+ qualifierMessage: getQualifierMessage(schema),
835
+ schema: schema,
853
836
  });
854
837
  }
855
838
 
856
839
  // Unknown node/schema type should return undefined
857
840
  // So far, haven't seen this hit in testing
858
- return "any";
841
+ return create("SchemaItem", {
842
+ collapsible: false,
843
+ name: "any",
844
+ required: false,
845
+ schemaName: schema.format,
846
+ qualifierMessage: getQualifierMessage(schema),
847
+ schema: schema,
848
+ });
859
849
  }
860
850
 
861
851
  interface Props {
@@ -61,8 +61,8 @@ export function createApiPageMD({
61
61
  return render([
62
62
  `import ApiTabs from "@theme/ApiTabs";\n`,
63
63
  `import DiscriminatorTabs from "@theme/DiscriminatorTabs";\n`,
64
- `import MethodEndpoint from "@theme/ApiDemoPanel/MethodEndpoint";\n`,
65
- `import SecuritySchemes from "@theme/ApiDemoPanel/SecuritySchemes";\n`,
64
+ `import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint";\n`,
65
+ `import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes";\n`,
66
66
  `import MimeTabs from "@theme/MimeTabs";\n`,
67
67
  `import ParamsItem from "@theme/ParamsItem";\n`,
68
68
  `import ResponseSamples from "@theme/ResponseSamples";\n`,
@@ -106,7 +106,7 @@ export function createInfoPageMD({
106
106
  `import ApiLogo from "@theme/ApiLogo";\n`,
107
107
  `import SchemaTabs from "@theme/SchemaTabs";\n`,
108
108
  `import TabItem from "@theme/TabItem";\n`,
109
- `import Export from "@theme/ApiDemoPanel/Export";\n\n`,
109
+ `import Export from "@theme/ApiExplorer/Export";\n\n`,
110
110
 
111
111
  createVersionBadge(version),
112
112
  createDownload(downloadUrl),