fix(api-docs): indent multi-line Param descriptions + bump postman#25
Merged
Merged
Conversation
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>
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
scripts/generate-api-docs.mjswhere 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.vendor/postmanto f00acb0 (postman #7 — Customers folder + Order Configs).Supersedes #24, which hit:
The crash was triggered by the new
Order Configs/.resources/object.yamlwhoseflowfield 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:917emitted descriptions as:So a description like:
rendered as:
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.mdxlist items now sit at the 8-space JSX content column.pnpm run build— completes successfully end-to-end (previously failed at theorder-configs.mdxMDX parse)./docs/api/fleetbase/order-configsrenders theflowfield with the bullet list inside the description.🤖 Generated with Claude Code