Skip to main content

Module parser

Module parser 

Source
Expand description

MDX documentation parser for extracting frontmatter and components.

This module provides functionality to parse MDX (Markdown with JSX) content, extracting YAML frontmatter and converting custom components like Cards, Tabs, Steps, and Callouts into an intermediate representation for rendering.

Structs§

AccordionGroupNode
Accordion group container.
AccordionNode
Collapsible accordion item.
ApiInfo
API metadata.
ApiOperation
API endpoint operation.
ApiParameter
API parameter.
ApiRequestBody
Request body definition.
ApiResponse
API response definition.
ApiServer
Server configuration.
ApiTag
Tag metadata.
CalloutNode
Callout box node.
CardGroupNode
Grid group of cards.
CardNode
Card node with optional link and icon.
CodeBlockNode
Fenced code block.
CodeGroupNode
Code group with multiple language variants.
DocFrontmatter
YAML frontmatter metadata from MDX files.
ExpandableNode
Expandable section for nested content.
MediaTypeContent
Content for a specific media type.
OpenApiNode
OpenAPI specification viewer node.
OpenApiSpec
Parsed OpenAPI specification.
ParamFieldNode
API parameter documentation field.
ParsedDoc
Parsed documentation page with frontmatter and content.
RequestExampleNode
Container for API request examples.
ResponseExampleNode
Container for API response examples.
ResponseFieldNode
API response field documentation.
SchemaDefinition
Schema definition for a type.
StepNode
Individual step in a steps guide.
StepsNode
Sequential steps container.
TabNode
Tab in a tabbed interface.
TabsNode
Tabbed content container.
UpdateNode
Changelog version update entry.

Enums§

CalloutType
Callout variant type.
DocNode
A node in the parsed documentation tree.
HttpMethod
HTTP method.
OpenApiError
Error type for OpenAPI parsing.
ParamLocation
Location of a parameter in an API request.
ParameterLocation
Parameter location.
SchemaType
Schema type.

Functions§

extract_frontmatter
Extract YAML frontmatter from MDX content.
get_raw_markdown
Get raw markdown from parsed content (for fallback rendering).
highlight_code
Apply syntax highlighting to code.
parse_document
Parse a complete MDX document, extracting frontmatter and content.
parse_mdx
Parse MDX content into a tree of DocNodes. Automatically strips frontmatter and import statements.
parse_openapi
Parse an OpenAPI specification from YAML or JSON content.