diff --git a/packages/docusaurus-plugin-openapi-docs/src/markdown/__snapshots__/createSchema.test.ts.snap b/packages/docusaurus-plugin-openapi-docs/src/markdown/__snapshots__/createSchema.test.ts.snap index 8a1b9c507..9bf878b02 100644 --- a/packages/docusaurus-plugin-openapi-docs/src/markdown/__snapshots__/createSchema.test.ts.snap +++ b/packages/docusaurus-plugin-openapi-docs/src/markdown/__snapshots__/createSchema.test.ts.snap @@ -35,13 +35,7 @@ Array [ Array [ -
+
string
  • @@ -57,35 +51,17 @@ Array [
  • -
    +
    boolean
    -
    +
    number
    -
    +
    string
    diff --git a/packages/docusaurus-plugin-openapi-docs/src/markdown/createSchema.ts b/packages/docusaurus-plugin-openapi-docs/src/markdown/createSchema.ts index 5c93db087..6cd888885 100644 --- a/packages/docusaurus-plugin-openapi-docs/src/markdown/createSchema.ts +++ b/packages/docusaurus-plugin-openapi-docs/src/markdown/createSchema.ts @@ -817,9 +817,18 @@ export function createNodes( style: { marginTop: ".5rem", marginBottom: ".5rem", - marginLeft: "1rem", }, - children: createDescription(schema.type), + children: [ + createDescription(schema.type), + guard(getQualifierMessage(schema), (message) => + create("div", { + style: { + paddingTop: "1rem", + }, + children: createDescription(message), + }) + ), + ], }); } @@ -829,9 +838,18 @@ export function createNodes( style: { marginTop: ".5rem", marginBottom: ".5rem", - marginLeft: "1rem", }, - children: [createDescription(schema)], + children: [ + createDescription(schema), + guard(getQualifierMessage(schema), (message) => + create("div", { + style: { + paddingTop: "1rem", + }, + children: createDescription(message), + }) + ), + ], }); }