[{"data":1,"prerenderedAt":304},["ShallowReactive",2],{"page:\u002Fextensions\u002Fkubb-labs\u002Fplugin-redoc":3},{"id":4,"title":5,"body":6,"description":285,"extension":293,"frontmatter":294,"heading":5,"meta":295,"navigation":296,"order":297,"path":298,"seo":299,"sitemap":300,"source":4,"stem":301,"__hash__":302,"hasPopups":303},"extensions\u002Fextensions\u002Fkubb-labs\u002Fplugin-redoc\u002Findex.md","Redoc",{"type":7,"value":8,"toc":284},"minimark",[9,13,16,21,106,127,131,138,142,163,171,175,181],[10,11,12],"p",{},"The Redoc plugin generates a single HTML page that documents your OpenAPI spec with Redoc.",[10,14,15],{},"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.",[17,18,20],"h2",{"id":19},"installation","Installation",[22,23,25,55,72,90],"code-group",{"sync":24},"package-manager",[26,27,32],"pre",{"language":28,"filename":29,"code":30,"class":31},"shell","bun","bun add -d @kubb\u002Fplugin-redoc","shiki shiki-themes github-light github-dark dark:github-dark",[33,34,36],"code",{"class":35},"language-shell",[37,38,41,44,48,52],"span",{"class":39,"style":40},"line","display: inline",[37,42,29],{"style":43},"color:#6F42C1;--shiki-dark:#B392F0",[37,45,47],{"style":46},"color:#032F62;--shiki-dark:#9ECBFF"," add",[37,49,51],{"style":50},"color:#005CC5;--shiki-dark:#79B8FF"," -d",[37,53,54],{"style":46}," @kubb\u002Fplugin-redoc",[26,56,59],{"language":28,"filename":57,"code":58,"class":31},"pnpm","pnpm add -D @kubb\u002Fplugin-redoc",[33,60,61],{"class":35},[37,62,63,65,67,70],{"class":39,"style":40},[37,64,57],{"style":43},[37,66,47],{"style":46},[37,68,69],{"style":50}," -D",[37,71,54],{"style":46},[26,73,76],{"language":28,"filename":74,"code":75,"class":31},"npm","npm install --save-dev @kubb\u002Fplugin-redoc",[33,77,78],{"class":35},[37,79,80,82,85,88],{"class":39,"style":40},[37,81,74],{"style":43},[37,83,84],{"style":46}," install",[37,86,87],{"style":50}," --save-dev",[37,89,54],{"style":46},[26,91,94],{"language":28,"filename":92,"code":93,"class":31},"yarn","yarn add -D @kubb\u002Fplugin-redoc",[33,95,96],{"class":35},[37,97,98,100,102,104],{"class":39,"style":40},[37,99,92],{"style":43},[37,101,47],{"style":46},[37,103,69],{"style":50},[37,105,54],{"style":46},[10,107,108,109,112,113,118,119,122,123,126],{},"Or run ",[33,110,111],{},"kubb add plugin-redoc"," to install the version the ",[114,115,117],"a",{"href":116},"\u002Fregistry","Kubb registry"," pins and add ",[33,120,121],{},"pluginRedoc()"," to ",[33,124,125],{},"kubb.config.ts",".",[17,128,130],{"id":129},"setup","Setup",[10,132,133,134,137],{},"No other plugins or packages are needed. The plugin reads the spec through the default OpenAPI adapter, ",[33,135,136],{},"adapterOas",", and fails with any other adapter.",[17,139,141],{"id":140},"options-worth-knowing","Options worth knowing",[143,144,145],"ul",{},[146,147,148,151,152,154,155,158,159,162],"li",{},[33,149,150],{},"output.path"," sets the HTML file path, relative to the root ",[33,153,150],{},". The default is ",[33,156,157],{},"docs.html",". End it with ",[33,160,161],{},".html",", because it names a file, not a folder.",[10,164,165,166,170],{},"The plugin has no other options. See ",[114,167,169],{"href":168},"https:\u002F\u002Fkubb.dev\u002Fextensions\u002Fkubb-labs\u002Fplugin-redoc\u002Foptions","Options"," for its type and default.",[17,172,174],{"id":173},"example","Example",[10,176,177,178,126],{},"The config below writes the page to ",[33,179,180],{},"src\u002Fgen\u002Fdocs.html",[26,182,185],{"language":183,"filename":125,"code":184,"class":31},"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})",[33,186,188,204,205,204,217,204,219,204,233,204,244,204,255,204,260,204,274,204,279],{"class":187},"language-typescript",[37,189,190,194,198,201],{"class":39,"style":40},[37,191,193],{"style":192},"color:#D73A49;--shiki-dark:#F97583","import",[37,195,197],{"style":196},"color:#24292E;--shiki-dark:#E1E4E8"," { defineConfig } ",[37,199,200],{"style":192},"from",[37,202,203],{"style":46}," 'kubb\u002Fconfig'","\n",[37,206,207,209,212,214],{"class":39,"style":40},[37,208,193],{"style":192},[37,210,211],{"style":196}," { pluginRedoc } ",[37,213,200],{"style":192},[37,215,216],{"style":46}," '@kubb\u002Fplugin-redoc'",[37,218],{"class":39,"style":40},[37,220,221,224,227,230],{"class":39,"style":40},[37,222,223],{"style":192},"export",[37,225,226],{"style":192}," default",[37,228,229],{"style":43}," defineConfig",[37,231,232],{"style":196},"({",[37,234,235,238,241],{"class":39,"style":40},[37,236,237],{"style":196},"  input: ",[37,239,240],{"style":46},"'.\u002FpetStore.yaml'",[37,242,243],{"style":196},",",[37,245,246,249,252],{"class":39,"style":40},[37,247,248],{"style":196},"  output: { path: ",[37,250,251],{"style":46},"'.\u002Fsrc\u002Fgen'",[37,253,254],{"style":196}," },",[37,256,257],{"class":39,"style":40},[37,258,259],{"style":196},"  plugins: [",[37,261,262,265,268,271],{"class":39,"style":40},[37,263,264],{"style":43},"    pluginRedoc",[37,266,267],{"style":196},"({ output: { path: ",[37,269,270],{"style":46},"'docs.html'",[37,272,273],{"style":196}," } }),",[37,275,276],{"class":39,"style":40},[37,277,278],{"style":196},"  ],",[37,280,281],{"class":39,"style":40},[37,282,283],{"style":196},"})",{"title":285,"searchDepth":286,"depth":286,"links":287},"",5,[288,290,291,292],{"id":19,"depth":289,"text":20},2,{"id":129,"depth":289,"text":130},{"id":140,"depth":289,"text":141},{"id":173,"depth":289,"text":174},"md",{},{},true,null,"\u002Fextensions\u002Fkubb-labs\u002Fplugin-redoc",{"title":5},{"loc":298},"extensions\u002Fkubb-labs\u002Fplugin-redoc\u002Findex","CC_y9J-qTeFQDTub8LrIvimNZgpaAtDlPSwYMwbAh48",false,1792602034070]