Why
The plugin is called vitepress-plugin-openspec because it is meant to integrate OpenSpec project documentation (openspec.dev) into VitePress — not OpenAPI or Swagger. The previous implementation was based on a misunderstanding. This change replaces it with the correct functionality: the artifacts from a project's openspec/ folder are rendered as structured, navigable VitePress documentation pages.
What Changes
- BREAKING: The existing OpenAPI/Swagger implementation (
loadSpecFile,extractEndpoints,parseSpec,generateEndpointMarkdown, OpenAPI-specific types) is completely replaced - The plugin reads the project's
openspec/folder and generates VitePress pages from it - Canonical specs (
openspec/specs/<capability>/spec.md) → one page per capability - Change artifacts (
openspec/changes/<name>/{proposal,design,tasks}.md) → one page per artifact, grouped by change - Archived changes (
openspec/changes/archive/) are presented as a separate collapsed sidebar section generateSidebarFromSpec()→ BREAKING replaced bygenerateOpenSpecSidebar()openspecNav()is retained as a concept but reads theopenspec/folder instead of an OpenAPI file
Capabilities
New Capabilities
openspec-folder-reader: Scans theopenspec/folder and returns a structured representation of all specs, changes, and archived changesspec-pages: Generates VitePress pages for all canonical specs fromopenspec/specs/with an index pagechange-pages: Generates VitePress pages for all active and archived changes fromopenspec/changes/with an index page per changeopenspec-navigation:generateOpenSpecSidebar()andopenspecNav()for the VitePress configuration
Modified Capabilities
(none — complete rewrite)
Impact
src/types.ts— completely rewritten with OpenSpec-specific types;NavItemandSidebarItemare retainedsrc/utils.ts— completely rewritten: OpenSpec folder reader and page generator instead of OpenAPI parsersrc/plugin.ts— completely rewritten: readsopenspec/folder instead of OpenAPI YAML filessrc/index.ts— updated exports;generateSidebarFromSpecremoved,generateOpenSpecSidebaraddedsrc/__tests__/— all existing tests replaced;sample.yamlremoveddocs/.vitepress/config.ts— must be updated to the new API