The Starlight OpenAPI plugin generates documentation using OpenAPI specifications.
import
import starlightOpenAPI, { openAPISidebarGroups } from "starlight-openapi";
plugins
plugins: [ // Generate the OpenAPI documentation pages. starlightOpenAPI([ { base: "api/openai", label: "openAI", schema: "./src/assets/openapi-documents/openai.yaml", }, { base: "api/pokeapi", label: "PokeAPI", schema: "./src/assets/openapi-documents/pokeapi.yaml", }, ]),],
sidebar
sidebar: [ { label: "OpenAPI", items: [ { label: "starlight-openapi", items: [ ,"starlight-openapi", ...openAPISidebarGroups ], }, { label: "Stoplight Elements", autogenerate: { directory: "openapi/stoplight-elements" }, }, { label: "RapiDoc", autogenerate: { directory: "openapi/rapidoc" }, }, ], },],