xyd 0.1.0-alpha - Coming Soon

API Pages
/
APIToolchain

APIToolchainComing Soon

Learn how to use API Docs generation tools in library mode

APIToolchain is a set of tools that allows you to generate API documentation from multiple sources like GraphQL, OpenAPI or TypeScript into one unified format called uniform.

List of all availalbe converters:

  1. @apitoolchain/uni-gql - converts GraphQL into uniform

  2. @apitoolchain/uni-openapi - converts OpenAPI into uniform

  3. @apitoolchain/uni-ts - converts TypeScript into uniform

More converts like Python or Go coming soon.

Uniform Overview

Uniform format allows to easily embeed API docs. The structure of this format was designed to easily use that on web and make them extendable with plugins. Additionaly uniform can be used by other libraries.

Web Usage

After convering into uniform format you can easy embed that on the web using APIAtlas library. It's a set of components to render API docs elements.

Example using React:

import type {Uniform} from "@apitoolchain/uniform"
import {Atlas} from "@apiatlas/react"
export function MyAPIDocsPage({uniform}: {uniform: Uniform}) {
return <Atlas
uniform={uniform}
/>
}

above component will render an API Docs Page similar to .

Usage in Other Libs

You can also use APIToolchain in your code to connect into your custom workflow. For example you can generate API docs elements to show your library settings that comes from your TypeScript codebase:

myLibrarySettings.ts
/**
* Your library configuration interface.
*
* APIToolchain will automatically generate documentation for these settings.
*
*/
export interface Settings {
/** The name of your library */
yourLibraryName: string
}

and exmaple usage in React:

import {convert} from "@apitoolchain/uni-ts"
import {Atlas} from "@apiatlas/react"
export async function MyDocsPage() {
const uniform = await convert("./myLibrarySettings.ts#Settings")
return <Atlas uniform={uniform}/>
}

or even in AI agents:

import {markdown} from "apitoolchain"
import {convert} from "@apitoolchain/uni-ts"
export async function myAiAgentFunctionCall(libraryPath: string) {
const uniform = await convert(libraryPath)
return await markdown(uniform)
}

Docs FrameworksComing Soon

APIToolchain and Atlas can be also used in other docs frameworks:

  • Docusaurus (coming soon)
Built with

Show your support! Star us on GitHub ⭐️