@apivexa/documentation
v0.1.4
Published
> Internal Documentation IR (Intermediate Representation) — the structured document model used by ApiVexa.
Downloads
103
Readme
@apivexa/documentation
Internal Documentation IR (Intermediate Representation) — the structured document model used by ApiVexa.
Part of ApiVexa — AI-powered API User Guide Generator.
Install
npm install @apivexa/documentationWhat's inside
The Documentation IR is a tree of typed nodes that sits between the generator and the renderers. Every node carries provenance metadata so ApiVexa can track which content came from the OpenAPI spec and which was inferred by AI.
| Node type | Description |
|-----------|-------------|
| DocumentIr | Root node — the whole guide |
| SectionNode | Headed section (Overview, Auth, Endpoints, …) |
| EndpointNode | Single API operation |
| SchemaNode | Data model |
| CodeExampleNode | Code snippet in one language |
| WorkflowNode | Multi-step workflow |
| NoteNode / WarningNode | Callout blocks |
Usage
import { buildDocument, buildSection, buildEndpoint } from '@apivexa/documentation';
const doc = buildDocument({ apiTitle: 'My API', generatedAt: new Date().toISOString() });
const section = buildSection({ title: 'Overview', source: { type: 'OPENAPI_FACT' } });
doc.children.push(section);Renderers (@apivexa/renderer) consume this IR to produce Markdown, HTML,
PDF, or DOCX.
