ml_switcheroo.utils.doc_renderer

Documentation Page Renderer.

This module converts the dictionary View Model (produced by DocContextBuilder) into final ReStructuredText (RST) content. It embeds custom HTML/CSS/JS logic to create an interactive “Vertical Tabs” layout for displaying framework variants side-by-side.

Classes

OpPageRenderer

Renders RST/HTML for a single Operation documentation page.

Module Contents

class ml_switcheroo.utils.doc_renderer.OpPageRenderer[source]

Renders RST/HTML for a single Operation documentation page.

render_rst(context: Dict[str, Any]) str[source]

Generates the full .rst content for the operation.

Parameters:

context – View Model dict containing name, description, args, and variants.

Returns:

ReStructuredText source string.

Return type:

str