[{"data":1,"prerenderedAt":433,"buildId":434},["ShallowReactive",2],{"page:\u002Fextensions\u002Fkubb-labs\u002Fplugin-redoc":3},{"id":4,"frontmatter":5,"title":6,"heading":6,"body":7,"path":432,"source":4},"extensions\u002Fkubb-labs\u002Fplugin-redoc\u002Findex.md",{},"Redoc",{"type":8,"value":9,"toc":423},"minimark",[10,14,19,24,125,155,159,170,174,222,225,229,239],[11,12,13],"p",{},"The Redoc plugin generates one Redoc HTML page with your OpenAPI spec embedded. Publish it to any static host without a build step.",[15,16,18],"blockquote",{"as":17},"note","Viewing the page needs network access. It loads a pinned Redoc bundle from jsDelivr, checked with a Subresource Integrity hash, and its fonts from Google Fonts.",[20,21,23],"h2",{"id":22},"installation","Installation",[25,26,28,52,72,90,108],"code-group",{"sync":27},"install",[29,30,35],"pre",{"language":31,"filename":32,"code":33,"class":34},"shell","kubb","kubb add plugin-redoc","highlights",[36,37,39],"code",{"class":38},"language-shell",[40,41,44,48],"span",{"class":42,"style":43},"line","display: inline",[40,45,47],{"style":46},"color:#6f42c1;--hls-dark:#b392f0","kubb ",[40,49,51],{"style":50},"color:#24292e;--hls-dark:#e1e4e8","add plugin-redoc",[29,53,56],{"language":31,"filename":54,"code":55,"class":34},"bun","bun add -d @kubb\u002Fplugin-redoc",[36,57,58],{"class":38},[40,59,60,63,66,69],{"class":42,"style":43},[40,61,62],{"style":46},"bun ",[40,64,65],{"style":50},"add -d ",[40,67,68],{"style":50},"@",[40,70,71],{"style":50},"kubb\u002Fplugin-redoc",[29,73,76],{"language":31,"filename":74,"code":75,"class":34},"pnpm","pnpm add -D @kubb\u002Fplugin-redoc",[36,77,78],{"class":38},[40,79,80,83,86,88],{"class":42,"style":43},[40,81,82],{"style":46},"pnpm ",[40,84,85],{"style":50},"add -D ",[40,87,68],{"style":50},[40,89,71],{"style":50},[29,91,94],{"language":31,"filename":92,"code":93,"class":34},"npm","npm install --save-dev @kubb\u002Fplugin-redoc",[36,95,96],{"class":38},[40,97,98,101,104,106],{"class":42,"style":43},[40,99,100],{"style":46},"npm ",[40,102,103],{"style":50},"install --save-dev ",[40,105,68],{"style":50},[40,107,71],{"style":50},[29,109,112],{"language":31,"filename":110,"code":111,"class":34},"yarn","yarn add -D @kubb\u002Fplugin-redoc",[36,113,114],{"class":38},[40,115,116,119,121,123],{"class":42,"style":43},[40,117,118],{"style":46},"yarn ",[40,120,85],{"style":50},[40,122,68],{"style":50},[40,124,71],{"style":50},[11,126,127,130,131,136,137,140,141,144,145,147,148,154],{},[36,128,129],{},"kubb add"," installs the version the ",[132,133,135],"a",{"href":134},"\u002Fregistry","Kubb registry"," pins and adds ",[36,138,139],{},"pluginRedoc()"," to ",[36,142,143],{},"kubb.config.ts",". It needs a ",[36,146,143],{},", so run ",[132,149,151],{"href":150},"\u002Fdocs\u002F5.x\u002Freference\u002Fcommands\u002Finit",[36,152,153],{},"kubb init"," first in a new project.",[20,156,158],{"id":157},"setup","Setup",[11,160,161,162,165,166,169],{},"No other plugins or packages are needed. The plugin needs an adapter that produces an OpenAPI 3 or Swagger 2 document, such as the default ",[36,163,164],{},"adapterOas",". Without one it fails with ",[36,167,168],{},"KUBB_ADAPTER_REQUIRED",".",[20,171,173],{"id":172},"options-worth-knowing","Options worth knowing",[175,176,177,193],"table",{},[178,179,180],"thead",{},[181,182,183,187,190],"tr",{},[184,185,186],"th",{},"Option",[184,188,189],{},"Default",[184,191,192],{},"What it does",[194,195,196],"tbody",{},[181,197,198,207,212],{},[199,200,201],"td",{},[132,202,204],{"href":203},"https:\u002F\u002Fkubb.dev\u002Fextensions\u002Fkubb-labs\u002Fplugin-redoc\u002Foptions#outputpath",[36,205,206],{},"output.path",[199,208,209],{},[36,210,211],{},"'docs.html'",[199,213,214,215,217,218,221],{},"Path of the HTML file, relative to the root ",[36,216,206],{},". End it with ",[36,219,220],{},".html",", because it names a file.",[11,223,224],{},"The plugin has no other options.",[20,226,228],{"id":227},"example","Example",[11,230,231,232,235,236,169],{},"This config writes the page to ",[36,233,234],{},"src\u002Fgen\u002Fdocs.html",", titled with the spec's ",[36,237,238],{},"info.title",[25,240,241,400],{},[29,242,245],{"language":243,"filename":143,"code":244,"class":34},"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})",[36,246,248,271,272,271,288,271,290,271,304,271,321,271,345,271,357,271,386,271,395],{"class":247},"language-typescript",[40,249,250,254,258,261,264,267],{"class":42,"style":43},[40,251,253],{"style":252},"color:#d73a49;--hls-dark:#f97583","import ",[40,255,257],{"style":256},"color:#005cc5;--hls-dark:#79b8ff","{ ",[40,259,260],{"style":50},"defineConfig ",[40,262,263],{"style":256},"} ",[40,265,266],{"style":252},"from ",[40,268,270],{"style":269},"color:#032f62;--hls-dark:#9ecbff","'kubb\u002Fconfig'","\n",[40,273,274,276,278,281,283,285],{"class":42,"style":43},[40,275,253],{"style":252},[40,277,257],{"style":256},[40,279,280],{"style":50},"pluginRedoc ",[40,282,263],{"style":256},[40,284,266],{"style":252},[40,286,287],{"style":269},"'@kubb\u002Fplugin-redoc'",[40,289],{"class":42,"style":43},[40,291,292,295,298,301],{"class":42,"style":43},[40,293,294],{"style":252},"export ",[40,296,297],{"style":252},"default ",[40,299,300],{"style":46},"defineConfig",[40,302,303],{"style":256},"({",[40,305,306,309,312,315,318],{"class":42,"style":43},[40,307,308],{"style":256}," ",[40,310,311],{"style":256},"input",[40,313,314],{"style":252},": ",[40,316,317],{"style":269},"'.\u002FpetStore.yaml'",[40,319,320],{"style":252},",",[40,322,323,325,328,330,332,335,337,340,343],{"class":42,"style":43},[40,324,308],{"style":252},[40,326,327],{"style":256},"output",[40,329,314],{"style":252},[40,331,257],{"style":256},[40,333,334],{"style":256},"path",[40,336,314],{"style":252},[40,338,339],{"style":269},"'.\u002Fsrc\u002Fgen' ",[40,341,342],{"style":256},"}",[40,344,320],{"style":252},[40,346,347,349,352,354],{"class":42,"style":43},[40,348,308],{"style":252},[40,350,351],{"style":256},"plugins",[40,353,314],{"style":252},[40,355,356],{"style":256},"[",[40,358,359,362,365,368,370,372,374,376,378,381,384],{"class":42,"style":43},[40,360,361],{"style":256}," ",[40,363,364],{"style":46},"pluginRedoc",[40,366,367],{"style":256},"({ ",[40,369,327],{"style":256},[40,371,314],{"style":252},[40,373,257],{"style":256},[40,375,334],{"style":256},[40,377,314],{"style":252},[40,379,380],{"style":269},"'docs.html' ",[40,382,383],{"style":256},"} })",[40,385,320],{"style":252},[40,387,388,390,393],{"class":42,"style":43},[40,389,308],{"style":252},[40,391,392],{"style":256},"]",[40,394,320],{"style":252},[40,396,397],{"class":42,"style":43},[40,398,399],{"style":256},"})",[29,401,405],{"language":402,"filename":403,"code":404,"class":34},"text","Output","src\u002F\n└── gen\u002F\n └── docs.html",[36,406,408,271,413,271,418],{"class":407},"language-text",[40,409,410],{"class":42,"style":43},[40,411,412],{"style":50},"src\u002F",[40,414,415],{"class":42,"style":43},[40,416,417],{"style":50},"└── gen\u002F",[40,419,420],{"class":42,"style":43},[40,421,422],{"style":50}," └── docs.html",{"title":424,"searchDepth":425,"depth":425,"links":426},"",5,[427,429,430,431],{"id":22,"depth":428,"text":23},2,{"id":157,"depth":428,"text":158},{"id":172,"depth":428,"text":173},{"id":227,"depth":428,"text":228},"\u002Fextensions\u002Fkubb-labs\u002Fplugin-redoc",1795727681625,"1b64b1eb-29b7-4f90-ad41-6f24721e1669"]