v5.8.5 21 February 2026 Improvement

SpeyDocs Rendering Overhaul — Stripe-Tier Endpoint Pages

Documentation Renderer Upgraded

The API documentation at docs.speybooks.com now renders endpoint pages with Stripe-quality layout and progressive disclosure.

Endpoint Pages

  • Semantic section structure — parameters, request body, response, and error codes render as distinct visual blocks with section dividers, replacing the previous flat field dump.
  • Progressive disclosure — response fields are collapsed by default behind “Show response fields” toggles. Nested objects and arrays collapse behind “Show child attributes”. The response shape is visible at a glance; detail on interaction.
  • Envelope unwrapping — the {success, data} response envelope is stripped automatically. Response sections show the data-level fields directly (e.g. accounts, meta), matching what developers actually work with.
  • Field metadata badges — nullable fields show a NULLABLE badge, timestamp fields show DATE-TIME, and enum values render as discrete chips instead of inline text.
  • Required-first ordering — fields sort required before optional, then alphabetically within each group.

Resource Landing Pages

  • Terminal-style endpoint list — the right column now shows endpoints in a dark code-block container with method badges and paths, matching the existing code block aesthetic. Each row is a hyperlink to the endpoint detail page.
  • Object example — resource landing pages now display the resource’s JSON object example below the endpoint list, giving developers the full picture without navigating away.

Code Panel Elevation

  • Visual separation between request and response — the request block uses a deeper background (Deep Obsidian) while the response block uses a lighter elevated background (Elevated Slate). The luminance shift creates an immediate sense of input vs. output without breaking syntax highlighting contrast.
  • Light mode contrast fixed — code block labels, copy buttons, and language tags now use fixed dark-background tokens, ensuring visibility in both light and dark themes.
  • Missing codeblock-comment token defined — resolved an undefined CSS variable that caused the COPY button to be invisible in light mode.

CSS Token Compliance

  • No raw hex in component CSS — all new styles use the existing --sd-* token system from the design token contract. No [data-theme] overrides required.
  • Existing class names preserved — the renderer reuses sd-param-*, sd-child-params-*, sd-section-title, and sd-response-* classes from the production stylesheet. Six new classes added for badges, enum chips, and error rows.

Bug Fixes

  • Fixed code panel background switching to white in light mode, breaking contrast for all code blocks.
  • Fixed COPY button invisible in light mode due to undefined --sd-codeblock-comment CSS variable.
  • Fixed response fields rendering fully expanded by default, causing excessive vertical scroll on endpoints with complex response schemas.