diff --git a/packages/docusaurus-theme-openapi-docs/src/theme/ParamsItem/index.tsx b/packages/docusaurus-theme-openapi-docs/src/theme/ParamsItem/index.tsx index 4a9bf9f08..6d9512576 100644 --- a/packages/docusaurus-theme-openapi-docs/src/theme/ParamsItem/index.tsx +++ b/packages/docusaurus-theme-openapi-docs/src/theme/ParamsItem/index.tsx @@ -7,16 +7,12 @@ import React from "react"; -import CodeBlock from "@theme/CodeBlock"; +import Markdown from "@theme/Markdown"; import SchemaTabs from "@theme/SchemaTabs"; import TabItem from "@theme/TabItem"; /* eslint-disable import/no-extraneous-dependencies*/ import clsx from "clsx"; -import ReactMarkdown from "react-markdown"; -import rehypeRaw from "rehype-raw"; -import remarkGfm from "remark-gfm"; -import { createDescription } from "../../markdown/createDescription"; import { getQualifierMessage, getSchemaName } from "../../markdown/schema"; import { guard, toString } from "../../markdown/utils"; @@ -97,34 +93,12 @@ function ParamsItem({ param, ...rest }: Props) { deprecated )); - const renderSchema = guard(getQualifierMessage(schema), (message) => ( -
- -
+ const renderQualifier = guard(getQualifierMessage(schema), (qualifier) => ( + {qualifier} )); const renderDescription = guard(description, (description) => ( - <> - {children}; - return !inline && match ? ( - {children} - ) : ( - {children} - ); - }, - }} - rehypePlugins={[rehypeRaw]} - /> - + {description} )); const renderEnumDescriptions = guard( @@ -132,11 +106,7 @@ function ParamsItem({ param, ...rest }: Props) { (value) => { return (
- + {value}
); } @@ -217,7 +187,7 @@ function ParamsItem({ param, ...rest }: Props) { {renderSchemaRequired} {renderDeprecated} - {renderSchema} + {renderQualifier} {renderDescription} {renderEnumDescriptions} {renderDefaultValue()}