Skip to content

fix(api-docs): indent multi-line Param descriptions + bump postman#25

Merged
roncodes merged 1 commit into
mainfrom
fix/api-doc-multiline-param-descriptions
May 27, 2026
Merged

fix(api-docs): indent multi-line Param descriptions + bump postman#25
roncodes merged 1 commit into
mainfrom
fix/api-doc-multiline-param-descriptions

Conversation

@roncodes
Copy link
Copy Markdown
Member

Summary

  • Fixes a bug in scripts/generate-api-docs.mjs where multi-line <Param> descriptions only indented their first line, dedenting any markdown content (bullet lists, etc.) below the surrounding JSX column and causing MDX to treat the closer </Param> as orphaned.
  • Bumps vendor/postman to f00acb0 (postman #7 — Customers folder + Order Configs).

Supersedes #24, which hit:

order-configs.mdx:167:5-167:13: Expected the closing tag </Param> either after the end of listItem (173:13) or another opening tag after the start of listItem (166:3)

The crash was triggered by the new Order Configs/.resources/object.yaml whose flow field has a multi-line description with a markdown bullet list — the only file in the API docs with that pattern.

Root cause

scripts/generate-api-docs.mjs:917 emitted descriptions as:

lines.push(`${indent}  ${escapeJsxText(desc)}`);

So a description like:

Ordered list of activities... Each activity carries:
  - `code` (string) — ...
  - `status` (string) — ...

rendered as:

    <Param name="flow" type="array of objects">
      Ordered list of activities... Each activity carries:
  - `code` (string) — ...
  - `status` (string) — ...
    </Param>

The dedented list items end the JSX block as far as MDX is concerned, so </Param> has nothing to close.

Fix

Split the description on newlines and indent every line at the JSX content column so markdown blocks remain inside the <Param>.

Test plan

  • node scripts/generate-api-docs.mjs — regenerates without errors; order-configs.mdx list items now sit at the 8-space JSX content column.
  • pnpm run build — completes successfully end-to-end (previously failed at the order-configs.mdx MDX parse).
  • Verify Vercel preview deploy is green.
  • Spot-check /docs/api/fleetbase/order-configs renders the flow field with the bullet list inside the description.

🤖 Generated with Claude Code

The generator only prefixed the first line of <Param> descriptions with
the JSX content indent, so multi-line descriptions (e.g. an intro line
followed by a markdown bullet list) left subsequent lines at a shallower
column than the JSX block. MDX treated the dedent as exiting the JSX
element, leaving the closing </Param> tag orphaned and failing the build.

Re-indent every line of the description with the JSX content indent so
markdown blocks stay inside the <Param>. Also bumps vendor/postman to
f00acb0 (PR #7: Customers + Order Configs) which is the input that
surfaced this bug.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented May 27, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
fleetbase-io Ready Ready Preview, Comment May 27, 2026 6:27am

Request Review

@roncodes roncodes merged commit 7bcd3c2 into main May 27, 2026
2 checks passed
@roncodes roncodes deleted the fix/api-doc-multiline-param-descriptions branch May 27, 2026 06:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant