Turn any OpenAPI 3.1 spec into a clean, interactive developer portal. Add a /docs route to Express or Fastify in one call — or use the Web Component anywhere.
Everything your API spec defines — rendered beautifully and interactively.
$ref resolution, oneOf/anyOf/allOf.**bold**, *italic*, `code`, and [links](url) in OpenAPI descriptions. Zero deps, XSS-safe.A clean interface with light and dark themes that makes complex APIs feel approachable.
One function call for Express or Fastify. One Web Component for everything else.
import express from 'express'; import { pureDocs } from 'puredocs'; const app = express(); pureDocs.express(app, { route: '/docs', specUrl: '/openapi.json', }); app.listen(3000);
import Fastify from 'fastify'; import { pureDocs } from 'puredocs'; const app = Fastify(); pureDocs.fastify(app, { route: '/docs', specUrl: '/openapi.json', }); app.listen({ port: 3000 });
import { pureDocs } from 'puredocs'; const html = pureDocs.html({ specUrl: '/openapi.json', title: 'My API', }); // Serve `html` from any HTTP framework: // Hono, Koa, Hapi, Elysia, h3, etc.
<pure-docs spec-url="/openapi.json" theme="auto" ></pure-docs> <script type="module"> import 'puredocs/web'; import 'puredocs/style.css'; </script>
<link rel="stylesheet" href="https://unpkg.com/puredocs/dist/puredocs.css" /> <pure-docs spec-url="/openapi.yaml"></pure-docs> <script src="https://unpkg.com/puredocs/dist/puredocs.umd.js"></script>
<pure-docs spec-url="/openapi.json" theme="auto" primary-color="#0ea5e9" title="Example API" ></pure-docs>
<pure-docs> into React, Vue, Angular, Next.js, Nuxt, Svelte, or plain HTML.
Open source and free for non-commercial use. Full OpenAPI 3.1 support.