Skip to content

Conversation

@B4nan
Copy link
Member

@B4nan B4nan commented Feb 11, 2026

Summary

  • The @signalwire/docusaurus-plugin-llms-txt plugin generates .md files from static (SSR) HTML, but three OpenAPI theme components (ResponseSchema, ParamsDetails, RequestSchema) were wrapped in BrowserOnly, rendering only <div class="openapi-skeleton"> placeholders during SSR
  • Removed the BrowserOnly wrapper from these three components so the full content (response examples, schema definitions, request parameters) renders server-side and appears in the .md exports
  • This is safe because the ApiItem component already creates a Redux store for SSR and none of these components use browser-specific APIs

Test plan

🤖 Generated with Claude Code

The llms-txt plugin generates .md files from static HTML, but three
OpenAPI theme components (ResponseSchema, ParamsDetails, RequestSchema)
were wrapped in BrowserOnly, rendering only skeleton placeholders during
SSR. This removed the BrowserOnly wrapper so the full content renders
server-side and appears in the .md exports.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
@github-actions github-actions bot added this to the 134th sprint - Tooling team milestone Feb 11, 2026
@github-actions github-actions bot added the t-tooling Issues with this label are in the ownership of the tooling team. label Feb 11, 2026
@apify-service-account
Copy link

Preview for this PR was built for commit 4c76590 and is ready at https://pr-2239.preview.docs.apify.com!

The .md export was mixing content from different response codes (200, 400)
together because tab UI doesn't translate to markdown hierarchy. Add sr-only
h3 headings per status code so the llms-txt plugin produces proper nesting.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
@B4nan B4nan added the adhoc Ad-hoc unplanned task added during the sprint. label Feb 11, 2026
@apify-service-account
Copy link

Preview for this PR was built for commit bf45f056 and is ready at https://pr-2239.preview.docs.apify.com!

Add whitespace between property names, types, and badges (required,
nullable, deprecated) so they don't run together in markdown output.
Move label spaces outside <strong> elements to prevent &#x20; HTML
entities and <!-- --> SSR comments in the exported .md files.

Components patched: SchemaItem, Schema (Summary), ParamsItem, Example.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
@apify-service-account
Copy link

Preview for this PR was built for commit 3e95c3f7 and is ready at https://pr-2239.preview.docs.apify.com!

Render Array [ and ] brackets via CSS ::before pseudo-elements instead
of DOM text content so they don't leak into the markdown export. Also
fixes remaining SSR comment artifacts in Schema Summary and ParamsItem.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
@apify-service-account
Copy link

Preview for this PR was built for commit 03ecd56d and is ready at https://pr-2239.preview.docs.apify.com!

Change SchemaItem wrapper from <div> to <li> and SchemaNodeDetails
nesting wrapper from <div> to <ul> so the HTML-to-markdown converter
produces properly indented nested lists reflecting the schema hierarchy.
Also fix remaining SSR comment in discriminator section.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
@apify-service-account
Copy link

Preview for this PR was built for commit 12ea5831 and is ready at https://pr-2239.preview.docs.apify.com!

- ArrayBrackets: remove <li> wrapper (empty brackets produced stray `*`)
- SchemaItem: use Fragment instead of <div> wrapper to avoid loose lists
- Example/DefaultValue/ConstValue: use <br> + <span> instead of <div>
  to get line breaks without blank-line paragraph separation
- SchemaNodeDetails: move description outside <ul> to avoid invalid
  block elements inside lists

Co-Authored-By: Claude Opus 4.6 <[email protected]>
@apify-service-account
Copy link

Preview for this PR was built for commit 62ae3886 and is ready at https://pr-2239.preview.docs.apify.com!

- Patch llms-txt plugin to use {type:'break'} instead of raw HTML for
  <br> handler, producing clean \ line breaks instead of <br /> tags
- Conditionally render name <strong> in SchemaItem only when present,
  preventing empty bold (****) for unnamed anyOf/oneOf schema options

Co-Authored-By: Claude Opus 4.6 <[email protected]>
@apify-service-account
Copy link

Preview for this PR was built for commit c00e8545 and is ready at https://pr-2239.preview.docs.apify.com!

… labels

Hide status code, MIME type, and Example/Schema tab lists during SSR
so they don't leak as bullet points into the markdown export. SchemaTabs
uses a selective `hideTabListSSR` prop so anyOf/oneOf option labels
(used by AnyOneOf) remain visible in the markdown.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
@apify-service-account
Copy link

Preview for this PR was built for commit 246e81b2 and is ready at https://pr-2239.preview.docs.apify.com!

@B4nan B4nan changed the title fix: render API doc response examples and schemas in SSR for .md export feat: render API doc response examples and schemas in SSR for .md export Feb 11, 2026
Add display:none to <br> elements used for markdown line breaks.
The rehype-remark converter still processes them in the HTML AST,
but they no longer create visual gaps in the browser.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
@apify-service-account
Copy link

Preview for this PR was built for commit 42cb3613 and is ready at https://pr-2239.preview.docs.apify.com!

@B4nan B4nan requested a review from barjin February 11, 2026 13:13
@B4nan
Copy link
Member Author

B4nan commented Feb 11, 2026

I wouldn't try to review the patches much, let's focus on how it looks and works in the preview.

I checked it and there are just a few whitespace differences, looks good to me.

Copy link
Member

@barjin barjin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The rendered md documents seem mostly fine to me 👍

The only nit is that the markdown render drops the discriminator value for the tabs (e.g. FREE, PRICE_PER_DATASET_ITEM here)

docs md
Image Image

So there is no way of knowing why there are three similar sections on top of each other.

Also, docusaurus-theme-openapi-docs deserves a fork at this point 👀

@apify-service-account
Copy link

Preview for this PR was built for commit f6aa084c and is ready at https://pr-2239.preview.docs.apify.com!

Two fixes for discriminator schemas (e.g., pricingModel with
PAY_PER_EVENT, PRICE_PER_DATASET_ITEM, etc.):

1. Pre-merge allOf subschemas in DiscriminatorNode so SchemaNode
   doesn't re-merge them and bring back the deleted discriminator
   property. This eliminates repeated pricingModel enum values.

2. Render discriminator variants with proper nesting during SSR:
   each variant label is a list item with its schema fields nested
   in a child <ul>, skipping the TabItem <div> wrapper that would
   break <li> nesting in HTML.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
@B4nan B4nan force-pushed the fix/api-docs-markdown-ssr-content branch from f6aa084 to e4cd321 Compare February 12, 2026 12:46
@apify-service-account
Copy link

Preview for this PR was built for commit e4cd3219 and is ready at https://pr-2239.preview.docs.apify.com!

@B4nan
Copy link
Member Author

B4nan commented Feb 12, 2026

This is how it looks now, should be good enough for now.

image

@B4nan B4nan merged commit 3fbaaf6 into master Feb 12, 2026
13 checks passed
@B4nan B4nan deleted the fix/api-docs-markdown-ssr-content branch February 12, 2026 12:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

adhoc Ad-hoc unplanned task added during the sprint. t-tooling Issues with this label are in the ownership of the tooling team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants