[{"data":1,"prerenderedAt":353},["ShallowReactive",2],{"page:\u002Fextensions\u002Fkubb-labs\u002Fplugin-redoc":3},{"id":4,"frontmatter":5,"title":6,"heading":6,"body":7,"path":352,"source":4},"extensions\u002Fkubb-labs\u002Fplugin-redoc\u002Findex.md",{},"Redoc",{"type":8,"value":9,"toc":343},"minimark",[10,14,17,22,109,130,134,141,145,166,174,178,184],[11,12,13],"p",{},"The Redoc plugin generates a single HTML page that documents your OpenAPI spec with Redoc.",[11,15,16],{},"The whole spec is embedded in the page, so you can publish the page to any static host without a build step. Viewing the page needs network access, because it loads a pinned Redoc bundle from jsDelivr, checked with a Subresource Integrity hash, and its fonts from Google Fonts.",[18,19,21],"h2",{"id":20},"installation","Installation",[23,24,26,56,74,92],"code-group",{"sync":25},"package-manager",[27,28,33],"pre",{"language":29,"filename":30,"code":31,"class":32},"shell","bun","bun add -d @kubb\u002Fplugin-redoc","highlights",[34,35,37],"code",{"class":36},"language-shell",[38,39,42,46,50,53],"span",{"class":40,"style":41},"line","display: inline",[38,43,45],{"style":44},"color:#6f42c1;--hls-dark:#b392f0","bun ",[38,47,49],{"style":48},"color:#24292e;--hls-dark:#e1e4e8","add -d ",[38,51,52],{"style":48},"@",[38,54,55],{"style":48},"kubb\u002Fplugin-redoc",[27,57,60],{"language":29,"filename":58,"code":59,"class":32},"pnpm","pnpm add -D @kubb\u002Fplugin-redoc",[34,61,62],{"class":36},[38,63,64,67,70,72],{"class":40,"style":41},[38,65,66],{"style":44},"pnpm ",[38,68,69],{"style":48},"add -D ",[38,71,52],{"style":48},[38,73,55],{"style":48},[27,75,78],{"language":29,"filename":76,"code":77,"class":32},"npm","npm install --save-dev @kubb\u002Fplugin-redoc",[34,79,80],{"class":36},[38,81,82,85,88,90],{"class":40,"style":41},[38,83,84],{"style":44},"npm ",[38,86,87],{"style":48},"install --save-dev ",[38,89,52],{"style":48},[38,91,55],{"style":48},[27,93,96],{"language":29,"filename":94,"code":95,"class":32},"yarn","yarn add -D @kubb\u002Fplugin-redoc",[34,97,98],{"class":36},[38,99,100,103,105,107],{"class":40,"style":41},[38,101,102],{"style":44},"yarn ",[38,104,69],{"style":48},[38,106,52],{"style":48},[38,108,55],{"style":48},[11,110,111,112,115,116,121,122,125,126,129],{},"Or run ",[34,113,114],{},"kubb add plugin-redoc"," to install the version the ",[117,118,120],"a",{"href":119},"\u002Fregistry","Kubb registry"," pins and add ",[34,123,124],{},"pluginRedoc()"," to ",[34,127,128],{},"kubb.config.ts",".",[18,131,133],{"id":132},"setup","Setup",[11,135,136,137,140],{},"No other plugins or packages are needed. The plugin reads the spec through the default OpenAPI adapter, ",[34,138,139],{},"adapterOas",", and fails with any other adapter.",[18,142,144],{"id":143},"options-worth-knowing","Options worth knowing",[146,147,148],"ul",{},[149,150,151,154,155,157,158,161,162,165],"li",{},[34,152,153],{},"output.path"," sets the HTML file path, relative to the root ",[34,156,153],{},". The default is ",[34,159,160],{},"docs.html",". End it with ",[34,163,164],{},".html",", because it names a file, not a folder.",[11,167,168,169,173],{},"The plugin has no other options. See ",[117,170,172],{"href":171},"https:\u002F\u002Fkubb.dev\u002Fextensions\u002Fkubb-labs\u002Fplugin-redoc\u002Foptions","Options"," for its type and default.",[18,175,177],{"id":176},"example","Example",[11,179,180,181,129],{},"The config below writes the page to ",[34,182,183],{},"src\u002Fgen\u002Fdocs.html",[27,185,188],{"language":186,"filename":128,"code":187,"class":32},"typescript","import { defineConfig } from 'kubb\u002Fconfig'\nimport { pluginRedoc } from '@kubb\u002Fplugin-redoc'\n\nexport default defineConfig({\n  input: '.\u002FpetStore.yaml',\n  output: { path: '.\u002Fsrc\u002Fgen' },\n  plugins: [\n    pluginRedoc({ output: { path: 'docs.html' } }),\n  ],\n})",[34,189,191,214,215,214,231,214,233,214,247,214,264,214,288,214,300,214,329,214,338],{"class":190},"language-typescript",[38,192,193,197,201,204,207,210],{"class":40,"style":41},[38,194,196],{"style":195},"color:#d73a49;--hls-dark:#f97583","import ",[38,198,200],{"style":199},"color:#005cc5;--hls-dark:#79b8ff","{ ",[38,202,203],{"style":48},"defineConfig ",[38,205,206],{"style":199},"} ",[38,208,209],{"style":195},"from ",[38,211,213],{"style":212},"color:#032f62;--hls-dark:#9ecbff","'kubb\u002Fconfig'","\n",[38,216,217,219,221,224,226,228],{"class":40,"style":41},[38,218,196],{"style":195},[38,220,200],{"style":199},[38,222,223],{"style":48},"pluginRedoc ",[38,225,206],{"style":199},[38,227,209],{"style":195},[38,229,230],{"style":212},"'@kubb\u002Fplugin-redoc'",[38,232],{"class":40,"style":41},[38,234,235,238,241,244],{"class":40,"style":41},[38,236,237],{"style":195},"export ",[38,239,240],{"style":195},"default ",[38,242,243],{"style":44},"defineConfig",[38,245,246],{"style":199},"({",[38,248,249,252,255,258,261],{"class":40,"style":41},[38,250,251],{"style":199},"  ",[38,253,254],{"style":199},"input",[38,256,257],{"style":195},": ",[38,259,260],{"style":212},"'.\u002FpetStore.yaml'",[38,262,263],{"style":195},",",[38,265,266,268,271,273,275,278,280,283,286],{"class":40,"style":41},[38,267,251],{"style":195},[38,269,270],{"style":199},"output",[38,272,257],{"style":195},[38,274,200],{"style":199},[38,276,277],{"style":199},"path",[38,279,257],{"style":195},[38,281,282],{"style":212},"'.\u002Fsrc\u002Fgen' ",[38,284,285],{"style":199},"}",[38,287,263],{"style":195},[38,289,290,292,295,297],{"class":40,"style":41},[38,291,251],{"style":195},[38,293,294],{"style":199},"plugins",[38,296,257],{"style":195},[38,298,299],{"style":199},"[",[38,301,302,305,308,311,313,315,317,319,321,324,327],{"class":40,"style":41},[38,303,304],{"style":199},"    ",[38,306,307],{"style":44},"pluginRedoc",[38,309,310],{"style":199},"({ ",[38,312,270],{"style":199},[38,314,257],{"style":195},[38,316,200],{"style":199},[38,318,277],{"style":199},[38,320,257],{"style":195},[38,322,323],{"style":212},"'docs.html' ",[38,325,326],{"style":199},"} })",[38,328,263],{"style":195},[38,330,331,333,336],{"class":40,"style":41},[38,332,251],{"style":195},[38,334,335],{"style":199},"]",[38,337,263],{"style":195},[38,339,340],{"class":40,"style":41},[38,341,342],{"style":199},"})",{"title":344,"searchDepth":345,"depth":345,"links":346},"",5,[347,349,350,351],{"id":20,"depth":348,"text":21},2,{"id":132,"depth":348,"text":133},{"id":143,"depth":348,"text":144},{"id":176,"depth":348,"text":177},"\u002Fextensions\u002Fkubb-labs\u002Fplugin-redoc",1793747912576]