Vitepress Site
Requirements
Requirement: docs directory contains a runnable VitePress site
A docs/ directory SHALL exist at the repository root containing a complete VitePress site with its own package.json, .vitepress/config.ts, and at least one content page (index.md).
Local dev server starts
- WHEN
npm run docs:devis run from the repository root - THEN VitePress starts a local dev server without errors
Production build succeeds
- WHEN
npm run docs:buildis run from the repository root (afternpm run build) - THEN VitePress produces a
docs/.vitepress/dist/directory containingindex.html
Requirement: Site uses vitepress-plugin-openspec with the Petstore example spec
The VitePress config SHALL register openspec() as a Vite plugin, pointing at docs/petstore.yaml and writing generated pages to docs/api/.
API pages are generated during build
- WHEN
npm run docs:buildcompletes - THEN
docs/.vitepress/dist/api/contains at least one HTML file per Petstore endpoint
Plugin references the local build
- WHEN
docs/package.jsonis inspected - THEN the
vitepress-plugin-openspecdependency references the local package viafile:../or equivalent workspace notation
Requirement: Site nav includes an API Reference entry
The VitePress themeConfig.nav SHALL contain an entry pointing to the generated API section (e.g. /api/).
Nav entry is present
- WHEN the built site's
index.htmlis inspected - THEN the navigation bar contains a link labelled "API Reference" (or the spec's
info.title) pointing to/api/
Requirement: Root package.json exposes docs scripts
The root package.json SHALL contain docs:dev and docs:build scripts that delegate to the docs/ sub-package.
docs:build script exists
- WHEN
npm runis executed at the repo root - THEN both
docs:devanddocs:buildare listed as available scripts