Skip to content

VitePress OpenAPI Docs

Drop interactive API endpoints anywhere in your markdown.

See it live

A real Petstore endpoint rendered inline - click Send request, get a response:

GET/pet/{petId}

Find pet by ID

Parameters 1

NameTypeDescription
petIdrequiredpath · integerID of pet to return

This site documents two APIs: Petstore (19 ops) and a Mock API (107 ops). Each has its own sidebar and search index.

Install

bash
npm create vitepress-openapi-docs@latest my-api-docs
cd my-api-docs && npm install && npm run dev

Or add to an existing VitePress site.

What you get

  • Inline composition — endpoints render as Vue components in light DOM. Weave them into tutorials, drop them between paragraphs, theme them with VitePress CSS variables.
  • Multiple APIs — array of specs, each with its own sidebar, URL prefix, and search index.
  • Auth and SDK snippets - bearer / basic / API key / OAuth2 with session persistence. curl / fetch / Python snippets with syntax highlighting, refreshed live as credentials change.
  • < 14 KB client bundle - peer dependencies (Vue, VitePress, vue-api-playground) excluded.

Released under the MIT License.