[{"data":1,"prerenderedAt":770},["ShallowReactive",2],{"page:\u002Fdocs\u002F5.x\u002Fintroduction\u002Farchitecture":3},{"id":4,"title":5,"body":6,"description":753,"extension":754,"frontmatter":755,"heading":759,"meta":761,"navigation":763,"order":744,"path":764,"seo":765,"sitemap":766,"source":767,"stem":768,"__hash__":769},"docs\u002Fdocs\u002F5.x\u002Fintroduction\u002Farchitecture.md","Kubb architecture - Adapters, AST, plugins, and parsers",{"type":7,"value":8,"toc":733},"minimark",[9,13,16,117,122,137,174,181,185,198,202,205,211,214,230,233,251,254,259,262,306,319,323,329,333,344,348,368,372,375,431,438,442,445,449,484,487,529,531,537,540,543,593,597,612,615],[10,11,12],"p",{},"Kubb runs your spec through one pipeline, and you can replace or extend each stage.",[14,15],"architecture-pipeline",{},[17,18,19,35],"table",{},[20,21,22],"thead",{},[23,24,25,29,32],"tr",{},[26,27,28],"th",{},"Stage",[26,30,31],{},"Job",[26,33,34],{},"Output",[36,37,38,58,72,89,103],"tbody",{},[23,39,40,48,51],{},[41,42,43],"td",{},[44,45,47],"a",{"href":46},"#adapters","Adapter",[41,49,50],{},"Reads the spec and resolves its references",[41,52,53,54],{},"An ",[55,56,57],"code",{},"InputNode",[23,59,60,66,69],{},[41,61,62],{},[44,63,65],{"href":64},"#ast","AST",[41,67,68],{},"Describes schemas and operations without naming a spec format or a library",[41,70,71],{},"Schema and operation nodes",[23,73,74,80,83],{},[41,75,76],{},[44,77,79],{"href":78},"#plugins","Plugins",[41,81,82],{},"Run generators that decide which files and declarations to emit",[41,84,85,88],{},[55,86,87],{},"FileNode","s",[23,90,91,97,100],{},[41,92,93],{},[44,94,96],{"href":95},"#parsers","Parsers",[41,98,99],{},"Turn each file's nodes into source text",[41,101,102],{},"Source code",[23,104,105,111,114],{},[41,106,107],{},[44,108,110],{"href":109},"#storage","Storage",[41,112,113],{},"Writes the files",[41,115,116],{},"Files on disk or in memory",[118,119,121],"h2",{"id":120},"from-one-operation-to-generated-files","From one operation to generated files",[10,123,124,125,128,129,132,133,136],{},"Take ",[55,126,127],{},"GET \u002Fpet\u002F{petId}"," (",[55,130,131],{},"getPetById","), whose response refers to a ",[55,134,135],{},"Pet"," schema:",[138,139,140,151,171],"ol",{},[141,142,143,144,147,148,150],"li",{},"The adapter resolves the ",[55,145,146],{},"$ref"," into an operation node and a ",[55,149,135],{}," schema node.",[141,152,153,156,157,159,160,163,164,167,168,170],{},[55,154,155],{},"plugin-ts"," emits the ",[55,158,135],{}," and ",[55,161,162],{},"GetPetById"," types, and ",[55,165,166],{},"plugin-axios"," emits a ",[55,169,131],{}," function that imports them.",[141,172,173],{},"A parser prints each file, and storage writes it.",[10,175,176,180],{},[44,177,179],{"href":178},"\u002Fdocs\u002F5.x\u002Ftutorials\u002Fquickstart","Generate your first client"," builds this example.",[118,182,184],{"id":183},"adapters","Adapters",[10,186,187,188,192,193,197],{},"An adapter handles everything specific to the input format: references, nullability, discriminators, and formats. The default is the ",[44,189,191],{"href":190},"\u002Fextensions\u002Fkubb-labs\u002Fadapter-oas","OpenAPI adapter",". A ",[44,194,196],{"href":195},"\u002Fdocs\u002F5.x\u002Freference\u002Fkit\u002Fadapters","custom adapter"," converts another format into the same AST, so every plugin works with it.",[199,200],"flow-diagram",{"preset":201},"adapter",[118,203,65],{"id":204},"ast",[10,206,207,208,210],{},"The AST is the model the adapter and the plugins share, so no plugin resolves references itself. An ",[55,209,57],{}," holds the reusable schemas and the operations, and operations link parameters, request bodies, and responses to schema nodes.",[212,213],"ast-tree",{},[10,215,216,217,220,221,224,225,229],{},"Every node has a ",[55,218,219],{},"kind",", and schema nodes also have a ",[55,222,223],{},"type",". See ",[44,226,228],{"href":227},"\u002Fdocs\u002F5.x\u002Freference\u002Fkit\u002Fast","AST and node builders",".",[118,231,79],{"id":232},"plugins",[10,234,235,236,242,243,246,247,250],{},"Each plugin owns one output, such as types, a client, or your own files. ",[44,237,239],{"href":238},"\u002Fdocs\u002F5.x\u002Freference\u002Fkit\u002Fplugins",[55,240,241],{},"defineExtension({ kind: 'plugin' })"," returns the factory you call in ",[55,244,245],{},"kubb.config.ts",". Its ",[55,248,249],{},"setup"," runs once and registers generators, a resolver, and macros.",[252,253],"plugin-anatomy",{},[255,256,258],"h3",{"id":257},"generators","Generators",[10,260,261],{},"A generator turns AST nodes into files.",[17,263,264,274],{},[20,265,266],{},[23,267,268,271],{},[26,269,270],{},"Handler",[26,272,273],{},"Kubb calls it",[36,275,276,286,296],{},[23,277,278,283],{},[41,279,280],{},[55,281,282],{},"schema",[41,284,285],{},"Once per schema node",[23,287,288,293],{},[41,289,290],{},[55,291,292],{},"operation",[41,294,295],{},"Once per operation node",[23,297,298,303],{},[41,299,300],{},[55,301,302],{},"operations",[41,304,305],{},"Once per plugin, with every operation node its filters keep",[10,307,308,309,311,312,224,316,229],{},"A handler returns ",[55,310,87],{},"s or elements for a ",[44,313,315],{"href":314},"#renderers","renderer",[44,317,258],{"href":318},"\u002Fdocs\u002F5.x\u002Freference\u002Fkit\u002Fgenerators",[255,320,322],{"id":321},"resolvers","Resolvers",[10,324,325,326,229],{},"A resolver decides identifiers, file names, and paths. A plugin that builds on another reads its resolver, so the Axios client still imports the right names after you rename the types. See ",[44,327,322],{"href":328},"\u002Fdocs\u002F5.x\u002Fhow-to\u002Fcustomize#resolvers",[255,330,332],{"id":331},"macros","Macros and printers",[10,334,335,336,159,340,229],{},"A macro rewrites AST nodes before the generators see them, per plugin, so a change reaches every generator of that plugin and no other. A printer turns a schema node into code for one target, such as a TypeScript type or a Zod expression. See ",[44,337,339],{"href":338},"\u002Fdocs\u002F5.x\u002Fhow-to\u002Fcustomize#macros","Macros",[44,341,343],{"href":342},"\u002Fdocs\u002F5.x\u002Fhow-to\u002Fcustomize#printers","Printers",[255,345,347],{"id":346},"renderers","Renderers",[10,349,350,351,353,354,357,358,361,362,224,364,229],{},"A renderer turns the elements a generator returns into ",[55,352,87],{},"s. ",[55,355,356],{},"jsxRenderer"," from ",[55,359,360],{},"kubb\u002Fjsx"," renders JSX without React. Set it per generator with ",[55,363,315],{},[44,365,367],{"href":366},"\u002Fdocs\u002F5.x\u002Freference\u002Fjsx#renderers","JSX renderer",[255,369,371],{"id":370},"lifecycle","Lifecycle",[373,374],"lifecycle-timeline",{},[138,376,377,380,393,408,417,424],{},[141,378,379],{},"The adapter parses the spec.",[141,381,382,383,159,385,388,389,229],{},"Each plugin's ",[55,384,249],{},[55,386,387],{},"kubb:plugin:setup"," run once, in ",[44,390,392],{"href":391},"#dependencies","plugin order",[141,394,395,396,399,400,403,404,407],{},"Kubb walks the AST once, schemas first. Each node goes to every plugin, through its macros and ",[55,397,398],{},"include",", ",[55,401,402],{},"exclude",", and ",[55,405,406],{},"override"," filters.",[141,409,382,410,412,413,416],{},[55,411,302],{}," handler runs, then ",[55,414,415],{},"kubb:plugin:end"," fires.",[141,418,419,420,423],{},"After ",[55,421,422],{},"kubb:plugins:end",", Kubb writes all files through the parsers and storage.",[141,425,426,427,430],{},"Format, lint, and ",[55,428,429],{},"postGenerate"," run when the config sets them.",[10,432,433,437],{},[44,434,436],{"href":435},"\u002Fdocs\u002F5.x\u002Freference\u002Fkit\u002Fhooks","Lifecycle hooks"," lists every hook.",[255,439,441],{"id":440},"dependencies","Dependencies and ordering",[10,443,444],{},"Kubb orders the plugins before setup:",[446,447],"mermaid",{"svg":448},"\u003Csvg xmlns=\"http:\u002F\u002Fwww.w3.org\u002F2000\u002Fsvg\" class=\"pele pele-flowchart\" viewBox=\"0 0 821 188\" width=\"821\" height=\"188\" style=\"--_bg:var(--pele-bg,#fff);--_fg:var(--pele-fg,#1f1f1f);--_m:var(--pele-muted,#6e6e6e);--_l:var(--pele-line,#1f1f1f);--_s:var(--pele-surface,#f3f3f3);--_a:var(--pele-surface-alt,#e6e6e6);--_b:var(--pele-border,#8a8a8a);--_c:var(--pele-accent,#5b7bd5);color:var(--_fg);--_r:var(--pele-radius,4px);--_fm:var(--pele-font-mono,monospace);font:16px sans-serif;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;font-family:var(--pele-font,sans-serif)\" fill=\"var(--_fg)\" role=\"graphics-document document\" aria-roledescription=\"flowchart\">\u003Cg class=\"pele-edges\" fill=\"none\" stroke=\"var(--_l)\" stroke-linecap=\"round\">\u003Cg class=\"pele-edge\" data-id=\"L_A_B_0\">\u003Cpath d=\"M164.05,93.87L205.05,93.87\"\u002F>\u003Cpath class=\"pele-marker\" d=\"M212.05,93.87L204.05,97.23L204.05,90.51Z\" fill=\"var(--_l)\" stroke=\"none\"\u002F>\u003C\u002Fg>\u003Cg class=\"pele-edge\" data-id=\"L_B_C_0\">\u003Cpath d=\"M406.71,43.8L606.74,43.8\"\u002F>\u003Cpath class=\"pele-marker\" d=\"M613.74,43.8L605.74,47.16L605.74,40.44Z\" fill=\"var(--_l)\" stroke=\"none\"\u002F>\u003C\u002Fg>\u003Cg class=\"pele-edge\" data-id=\"L_C_B_0\">\u003Cpath d=\"M613.74,59.8L603.24,59.8C596.49,59.8 596.49,93.87 589.74,93.87L493.82,93.87\"\u002F>\u003Cpath class=\"pele-marker\" d=\"M486.82,93.87L494.82,90.51L494.82,97.23Z\" fill=\"var(--_l)\" stroke=\"none\"\u002F>\u003C\u002Fg>\u003Cg class=\"pele-edge\" data-id=\"L_B_D_0\">\u003Cpath d=\"M404.52,145.3L606.74,145.3\"\u002F>\u003Cpath class=\"pele-marker\" d=\"M613.74,145.3L605.74,148.66L605.74,141.94Z\" fill=\"var(--_l)\" stroke=\"none\"\u002F>\u003C\u002Fg>\u003C\u002Fg>\u003Cg class=\"pele-edge-labels\" font-size=\"14\">\u003Cg class=\"pele-edge-label\" data-id=\"L_B_C_0\">\u003Crect x=\"528.76\" y=\"33.3\" width=\"43.03\" height=\"21\" rx=\"3\" fill=\"var(--_bg)\"\u002F>\u003Ctext x=\"550.28\" y=\"48.7\" text-anchor=\"middle\">found\u003C\u002Ftext>\u003C\u002Fg>\u003Cg class=\"pele-edge-label\" data-id=\"L_C_B_0\">\u003Crect x=\"512.82\" y=\"83.37\" width=\"74.92\" height=\"21\" rx=\"3\" fill=\"var(--_bg)\"\u002F>\u003Ctext x=\"550.28\" y=\"98.77\" text-anchor=\"middle\">plugins left\u003C\u002Ftext>\u003C\u002Fg>\u003Cg class=\"pele-edge-label\" data-id=\"L_B_D_0\">\u003Crect x=\"530.71\" y=\"134.8\" width=\"39.14\" height=\"21\" rx=\"3\" fill=\"var(--_bg)\"\u002F>\u003Ctext x=\"550.28\" y=\"150.2\" text-anchor=\"middle\">none\u003C\u002Ftext>\u003C\u002Fg>\u003C\u002Fg>\u003Cg class=\"pele-nodes\">\u003Cg class=\"pele-node pele-shape-rect\" data-id=\"A\" transform=\"translate(86.02,93.87)\">\u003Crect x=\"-78.02\" y=\"-33\" width=\"156.05\" height=\"66\" fill=\"var(--_s)\" stroke=\"var(--_b)\" style=\"rx:var(--_r)\"\u002F>\u003Ctext class=\"pele-label\" text-anchor=\"middle\" xml:space=\"preserve\">\u003Ctspan x=\"0\" y=\"-4.9\">Sort by enforce:\u003C\u002Ftspan>\u003Ctspan x=\"0\" y=\"16.1\">pre, normal, post\u003C\u002Ftspan>\u003C\u002Ftext>\u003C\u002Fg>\u003Cg class=\"pele-node pele-shape-diam\" data-id=\"B\" transform=\"translate(349.43,93.87)\">\u003Cpolygon points=\"0,-85.86 137.38,0 0,85.87 -137.38,0\" fill=\"var(--_s)\" stroke=\"var(--_b)\"\u002F>\u003Ctext class=\"pele-label\" text-anchor=\"middle\" xml:space=\"preserve\">\u003Ctspan x=\"0\" y=\"-4.9\">First plugin whose\u003C\u002Ftspan>\u003Ctspan x=\"0\" y=\"16.1\">dependencies are placed\u003C\u002Ftspan>\u003C\u002Ftext>\u003C\u002Fg>\u003Cg class=\"pele-node pele-shape-rect\" data-id=\"C\" transform=\"translate(675.31,51.8)\">\u003Crect x=\"-61.58\" y=\"-24\" width=\"123.15\" height=\"48\" fill=\"var(--_s)\" stroke=\"var(--_b)\" style=\"rx:var(--_r)\"\u002F>\u003Ctext class=\"pele-label\" x=\"0\" y=\"5.6\" text-anchor=\"middle\">Place it next\u003C\u002Ftext>\u003C\u002Fg>\u003Cg class=\"pele-node pele-shape-rect\" data-id=\"D\" transform=\"translate(713.1,145.3)\">\u003Crect x=\"-99.37\" y=\"-24\" width=\"198.74\" height=\"48\" fill=\"var(--_s)\" stroke=\"var(--_b)\" style=\"rx:var(--_r)\"\u002F>\u003Ctext class=\"pele-label\" x=\"0\" y=\"5.6\" text-anchor=\"middle\">Fail: dependency cycle\u003C\u002Ftext>\u003C\u002Fg>\u003C\u002Fg>\u003C\u002Fsvg>",[10,450,451,455,456,459,460,462,463,399,466,468,469,471,472,475,476,479,480,483],{},[44,452,454],{"href":453},"\u002Fdocs\u002F5.x\u002Freference\u002Fkit\u002Fextensions#dependencies","Dependencies"," win over ",[55,457,458],{},"enforce",", and ties keep their order in ",[55,461,232],{},". With ",[55,464,465],{},"plugins: [pluginAxios(), pluginTs()]",[55,467,155],{}," comes first because ",[55,470,166],{}," depends on it. ",[55,473,474],{},"plugin-barrel",", which ",[55,477,478],{},"defineConfig"," adds, sets ",[55,481,482],{},"enforce: 'post'",", so it runs last and sees every file the others emitted.",[118,485,96],{"id":486},"parsers",[10,488,489,490,492,493,495,496,498,499,128,502,399,505,508,509,128,512,399,515,518,519,128,522,399,525,528],{},"Kubb sends each ",[55,491,87],{}," to the parser that claims its extension. Without a ",[55,494,486],{}," option, ",[55,497,478],{}," adds ",[55,500,501],{},"parserTs",[55,503,504],{},".ts",[55,506,507],{},".js","), ",[55,510,511],{},"parserTsx",[55,513,514],{},".tsx",[55,516,517],{},".jsx","), and ",[55,520,521],{},"parserMd",[55,523,524],{},".md",[55,526,527],{},".markdown","). The TypeScript parser prints a file's banner, imports, and source nodes:",[199,530],{"preset":486},[10,532,533,534,229],{},"To write one, see ",[44,535,96],{"href":536},"\u002Fdocs\u002F5.x\u002Freference\u002Fkit\u002Fparsers",[118,538,110],{"id":539},"storage",[10,541,542],{},"Storage decides where files go, so the same build writes to disk from the CLI or to memory in a test. Kubb skips files whose content has not changed.",[17,544,545,555],{},[20,546,547],{},[23,548,549,552],{},[26,550,551],{},"Driver",[26,553,554],{},"Writes to",[36,556,557,567,581],{},[23,558,559,564],{},[41,560,561],{},[55,562,563],{},"fsStorage()",[41,565,566],{},"Disk. The default.",[23,568,569,574],{},[41,570,571],{},[55,572,573],{},"memoryStorage()",[41,575,576,577,580],{},"A ",[55,578,579],{},"Map"," in memory",[23,582,583,586],{},[41,584,585],{},"Your own",[41,587,588,589],{},"Any backend that implements the ",[44,590,592],{"href":591},"\u002Fdocs\u002F5.x\u002Freference\u002Fkit\u002Fstorage#storage-interface","Storage interface",[118,594,596],{"id":595},"choose-an-extension","Choose an extension",[10,598,599,600,604,605,608,609,229],{},"If an existing ",[44,601,603],{"href":602},"\u002Fextensions\u002Fkind\u002Fplugins","plugin"," generates the output you need, use it. Otherwise, build on ",[55,606,607],{},"kubb\u002Fkit",", which ships with ",[55,610,611],{},"kubb",[446,613],{"svg":614},"\u003Csvg xmlns=\"http:\u002F\u002Fwww.w3.org\u002F2000\u002Fsvg\" class=\"pele pele-flowchart\" viewBox=\"0 0 806 506\" width=\"806\" height=\"506\" style=\"--_bg:var(--pele-bg,#fff);--_fg:var(--pele-fg,#1f1f1f);--_m:var(--pele-muted,#6e6e6e);--_l:var(--pele-line,#1f1f1f);--_s:var(--pele-surface,#f3f3f3);--_a:var(--pele-surface-alt,#e6e6e6);--_b:var(--pele-border,#8a8a8a);--_c:var(--pele-accent,#5b7bd5);color:var(--_fg);--_r:var(--pele-radius,4px);--_fm:var(--pele-font-mono,monospace);font:16px sans-serif;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;font-family:var(--pele-font,sans-serif)\" fill=\"var(--_fg)\" role=\"graphics-document document\" aria-roledescription=\"flowchart\">\u003Cg class=\"pele-edges\" fill=\"none\" stroke=\"var(--_l)\" stroke-linecap=\"round\">\u003Cg class=\"pele-edge\" data-id=\"L_Q_A_0\">\u003Cpath d=\"M420.46,134.6C420.46,167.88 352.91,188.28 242.71,188.28C132.51,188.28 64.97,203.48 64.97,228.28L64.97,297.46\"\u002F>\u003Cpath class=\"pele-marker\" d=\"M64.97,304.46L61.61,296.46L68.33,296.46Z\" fill=\"var(--_l)\" stroke=\"none\"\u002F>\u003C\u002Fg>\u003Cg class=\"pele-edge\" data-id=\"L_Q_P_0\">\u003Cpath d=\"M436.46,144.6C436.46,179.12 400.67,200.28 342.29,200.28C283.91,200.28 248.13,210.92 248.13,228.28L248.13,297.46\"\u002F>\u003Cpath class=\"pele-marker\" d=\"M248.13,304.46L244.77,296.46L251.49,296.46Z\" fill=\"var(--_l)\" stroke=\"none\"\u002F>\u003C\u002Fg>\u003Cg class=\"pele-edge\" data-id=\"L_Q_O_0\">\u003Cpath d=\"M461.55,160.28L461.55,273.78\"\u002F>\u003Cpath class=\"pele-marker\" d=\"M461.55,280.78L458.19,272.78L464.91,272.78Z\" fill=\"var(--_l)\" stroke=\"none\"\u002F>\u003C\u002Fg>\u003Cg class=\"pele-edge\" data-id=\"L_O_M_0\">\u003Cpath d=\"M445.55,366.13C445.55,381.38 279.87,381.38 279.87,396.63L279.87,442.13\"\u002F>\u003Cpath class=\"pele-marker\" d=\"M279.87,449.13L276.51,441.13L283.23,441.13Z\" fill=\"var(--_l)\" stroke=\"none\"\u002F>\u003C\u002Fg>\u003Cg class=\"pele-edge\" data-id=\"L_O_PR_0\">\u003Cpath d=\"M461.55,376.13L461.55,442.13\"\u002F>\u003Cpath class=\"pele-marker\" d=\"M461.55,449.13L458.19,441.13L464.91,441.13Z\" fill=\"var(--_l)\" stroke=\"none\"\u002F>\u003C\u002Fg>\u003Cg class=\"pele-edge\" data-id=\"L_O_R_0\">\u003Cpath d=\"M477.55,366.13C477.55,381.38 633.11,381.38 633.11,396.63L633.11,442.13\"\u002F>\u003Cpath class=\"pele-marker\" d=\"M633.11,449.13L629.75,441.13L636.47,441.13Z\" fill=\"var(--_l)\" stroke=\"none\"\u002F>\u003C\u002Fg>\u003Cg class=\"pele-edge\" data-id=\"L_Q_PA_0\">\u003Cpath d=\"M486.65,144.6C486.65,179.12 511.87,200.28 553.02,200.28C594.17,200.28 619.39,210.92 619.39,228.28L619.39,297.46\"\u002F>\u003Cpath class=\"pele-marker\" d=\"M619.39,304.46L616.03,296.46L622.75,296.46Z\" fill=\"var(--_l)\" stroke=\"none\"\u002F>\u003C\u002Fg>\u003Cg class=\"pele-edge\" data-id=\"L_Q_S_0\">\u003Cpath d=\"M502.65,134.6C502.65,167.88 549.07,188.28 624.81,188.28C700.55,188.28 746.97,203.48 746.97,228.28L746.97,297.46\"\u002F>\u003Cpath class=\"pele-marker\" d=\"M746.97,304.46L743.61,296.46L750.33,296.46Z\" fill=\"var(--_l)\" stroke=\"none\"\u002F>\u003C\u002Fg>\u003C\u002Fg>\u003Cg class=\"pele-edge-labels\" font-size=\"14\">\u003Cg class=\"pele-edge-label\" data-id=\"L_Q_A_0\">\u003Crect x=\"10\" y=\"230.28\" width=\"109.93\" height=\"21\" rx=\"3\" fill=\"var(--_bg)\"\u002F>\u003Ctext x=\"64.97\" y=\"245.68\" text-anchor=\"middle\">The input format\u003C\u002Ftext>\u003C\u002Fg>\u003Cg class=\"pele-edge-label\" data-id=\"L_Q_P_0\">\u003Crect x=\"189.65\" y=\"230.28\" width=\"116.96\" height=\"21\" rx=\"3\" fill=\"var(--_bg)\"\u002F>\u003Ctext x=\"248.13\" y=\"245.68\" text-anchor=\"middle\">Add a new output\u003C\u002Ftext>\u003C\u002Fg>\u003Cg class=\"pele-edge-label\" data-id=\"L_Q_O_0\">\u003Crect x=\"401.91\" y=\"230.28\" width=\"119.29\" height=\"21\" rx=\"3\" fill=\"var(--_bg)\"\u002F>\u003Ctext x=\"461.55\" y=\"245.68\" text-anchor=\"middle\">An existing output\u003C\u002Ftext>\u003C\u002Fg>\u003Cg class=\"pele-edge-label\" data-id=\"L_O_M_0\">\u003Crect x=\"204.29\" y=\"398.63\" width=\"151.16\" height=\"21\" rx=\"3\" fill=\"var(--_bg)\"\u002F>\u003Ctext x=\"279.87\" y=\"414.03\" text-anchor=\"middle\">What a schema means\u003C\u002Ftext>\u003C\u002Fg>\u003Cg class=\"pele-edge-label\" data-id=\"L_O_PR_0\">\u003Crect x=\"375.46\" y=\"398.63\" width=\"172.19\" height=\"21\" rx=\"3\" fill=\"var(--_bg)\"\u002F>\u003Ctext x=\"461.55\" y=\"414.03\" text-anchor=\"middle\">Code for one schema type\u003C\u002Ftext>\u003C\u002Fg>\u003Cg class=\"pele-edge-label\" data-id=\"L_O_R_0\">\u003Crect x=\"567.65\" y=\"398.63\" width=\"130.93\" height=\"21\" rx=\"3\" fill=\"var(--_bg)\"\u002F>\u003Ctext x=\"633.11\" y=\"414.03\" text-anchor=\"middle\">File names or paths\u003C\u002Ftext>\u003C\u002Fg>\u003Cg class=\"pele-edge-label\" data-id=\"L_Q_PA_0\">\u003Crect x=\"581.94\" y=\"230.28\" width=\"74.91\" height=\"21\" rx=\"3\" fill=\"var(--_bg)\"\u002F>\u003Ctext x=\"619.39\" y=\"245.68\" text-anchor=\"middle\">File syntax\u003C\u002Ftext>\u003C\u002Fg>\u003Cg class=\"pele-edge-label\" data-id=\"L_Q_S_0\">\u003Crect x=\"698.23\" y=\"230.28\" width=\"97.47\" height=\"21\" rx=\"3\" fill=\"var(--_bg)\"\u002F>\u003Ctext x=\"746.97\" y=\"245.68\" text-anchor=\"middle\">Where files go\u003C\u002Ftext>\u003C\u002Fg>\u003C\u002Fg>\u003Cg class=\"pele-nodes\">\u003Cg class=\"pele-node pele-shape-diam\" data-id=\"Q\" transform=\"translate(461.55,84.14)\">\u003Cpolygon points=\"0,-76.14 121.82,0 0,76.14 -121.82,0\" fill=\"var(--_s)\" stroke=\"var(--_b)\"\u002F>\u003Ctext class=\"pele-label\" text-anchor=\"middle\" xml:space=\"preserve\">\u003Ctspan x=\"0\" y=\"-4.9\">What do you need to\u003C\u002Ftspan>\u003Ctspan x=\"0\" y=\"16.1\">change?\u003C\u002Ftspan>\u003C\u002Ftext>\u003C\u002Fg>\u003Cg class=\"pele-node pele-shape-rect\" data-id=\"A\" transform=\"translate(64.97,328.46)\">\u003Crect x=\"-46.02\" y=\"-24\" width=\"92.03\" height=\"48\" fill=\"var(--_s)\" stroke=\"var(--_b)\" style=\"rx:var(--_r)\"\u002F>\u003Ctext class=\"pele-label\" x=\"0\" y=\"5.6\" text-anchor=\"middle\">Adapter\u003C\u002Ftext>\u003C\u002Fg>\u003Cg class=\"pele-node pele-shape-rect\" data-id=\"P\" transform=\"translate(248.13,328.46)\">\u003Crect x=\"-97.14\" y=\"-24\" width=\"194.29\" height=\"48\" fill=\"var(--_s)\" stroke=\"var(--_b)\" style=\"rx:var(--_r)\"\u002F>\u003Ctext class=\"pele-label\" x=\"0\" y=\"5.6\" text-anchor=\"middle\">Plugin with generators\u003C\u002Ftext>\u003C\u002Fg>\u003Cg class=\"pele-node pele-shape-diam\" data-id=\"O\" transform=\"translate(461.55,328.46)\">\u003Cpolygon points=\"0,-47.67 76.28,0 0,47.68 -76.28,0\" fill=\"var(--_s)\" stroke=\"var(--_b)\"\u002F>\u003Ctext class=\"pele-label\" x=\"0\" y=\"5.6\" text-anchor=\"middle\">Which part?\u003C\u002Ftext>\u003C\u002Fg>\u003Cg class=\"pele-node pele-shape-rect\" data-id=\"M\" transform=\"translate(279.87,473.13)\">\u003Crect x=\"-40.22\" y=\"-24\" width=\"80.45\" height=\"48\" fill=\"var(--_s)\" stroke=\"var(--_b)\" style=\"rx:var(--_r)\"\u002F>\u003Ctext class=\"pele-label\" x=\"0\" y=\"5.6\" text-anchor=\"middle\">Macro\u003C\u002Ftext>\u003C\u002Fg>\u003Cg class=\"pele-node pele-shape-rect\" data-id=\"PR\" transform=\"translate(461.55,473.13)\">\u003Crect x=\"-41.56\" y=\"-24\" width=\"83.12\" height=\"48\" fill=\"var(--_s)\" stroke=\"var(--_b)\" style=\"rx:var(--_r)\"\u002F>\u003Ctext class=\"pele-label\" x=\"0\" y=\"5.6\" text-anchor=\"middle\">Printer\u003C\u002Ftext>\u003C\u002Fg>\u003Cg class=\"pele-node pele-shape-rect\" data-id=\"R\" transform=\"translate(633.11,473.13)\">\u003Crect x=\"-49.56\" y=\"-24\" width=\"99.12\" height=\"48\" fill=\"var(--_s)\" stroke=\"var(--_b)\" style=\"rx:var(--_r)\"\u002F>\u003Ctext class=\"pele-label\" x=\"0\" y=\"5.6\" text-anchor=\"middle\">Resolver\u003C\u002Ftext>\u003C\u002Fg>\u003Cg class=\"pele-node pele-shape-rect\" data-id=\"PA\" transform=\"translate(619.39,328.46)\">\u003Crect x=\"-41.56\" y=\"-24\" width=\"83.12\" height=\"48\" fill=\"var(--_s)\" stroke=\"var(--_b)\" style=\"rx:var(--_r)\"\u002F>\u003Ctext class=\"pele-label\" x=\"0\" y=\"5.6\" text-anchor=\"middle\">Parser\u003C\u002Ftext>\u003C\u002Fg>\u003Cg class=\"pele-node pele-shape-rect\" data-id=\"S\" transform=\"translate(746.97,328.46)\">\u003Crect x=\"-46.02\" y=\"-24\" width=\"92.03\" height=\"48\" fill=\"var(--_s)\" stroke=\"var(--_b)\" style=\"rx:var(--_r)\"\u002F>\u003Ctext class=\"pele-label\" x=\"0\" y=\"5.6\" text-anchor=\"middle\">Storage\u003C\u002Ftext>\u003C\u002Fg>\u003C\u002Fg>\u003C\u002Fsvg>",[17,616,617,630],{},[20,618,619],{},[23,620,621,624,627],{},[26,622,623],{},"Extension",[26,625,626],{},"Example",[26,628,629],{},"Start with",[36,631,632,643,657,677,697,709,721],{},[23,633,634,636,639],{},[41,635,47],{},[41,637,638],{},"Read a format other than OpenAPI",[41,640,641],{},[44,642,184],{"href":195},[23,644,645,648,651],{},[41,646,647],{},"Plugin",[41,649,650],{},"Generate a new kind of file",[41,652,653],{},[44,654,656],{"href":655},"\u002Fdocs\u002F5.x\u002Ftutorials\u002Fcreating-plugins","Create a plugin",[23,658,659,662,673],{},[41,660,661],{},"Macro",[41,663,664,665,668,669,672],{},"Treat every ",[55,666,667],{},"integer"," as a ",[55,670,671],{},"string"," in one plugin",[41,674,675],{},[44,676,339],{"href":338},[23,678,679,682,693],{},[41,680,681],{},"Printer",[41,683,684,685,688,689,692],{},"Print ",[55,686,687],{},"date"," schemas as the TypeScript ",[55,690,691],{},"Date"," type",[41,694,695],{},[44,696,343],{"href":342},[23,698,699,702,705],{},[41,700,701],{},"Resolver",[41,703,704],{},"Move model files into a folder",[41,706,707],{},[44,708,322],{"href":328},[23,710,711,714,717],{},[41,712,713],{},"Parser",[41,715,716],{},"Emit a new file type",[41,718,719],{},[44,720,96],{"href":536},[23,722,723,725,728],{},[41,724,110],{},[41,726,727],{},"Write to a remote store",[41,729,730],{},[44,731,110],{"href":732},"\u002Fdocs\u002F5.x\u002Freference\u002Fkit\u002Fstorage",{"title":734,"searchDepth":735,"depth":735,"links":736},"",5,[737,739,740,741,750,751,752],{"id":120,"depth":738,"text":121},2,{"id":183,"depth":738,"text":184},{"id":204,"depth":738,"text":65},{"id":232,"depth":738,"text":79,"children":742},[743,745,746,747,748,749],{"id":257,"depth":744,"text":258},3,{"id":321,"depth":744,"text":322},{"id":331,"depth":744,"text":332},{"id":346,"depth":744,"text":347},{"id":370,"depth":744,"text":371},{"id":440,"depth":744,"text":441},{"id":486,"depth":738,"text":96},{"id":539,"depth":738,"text":110},{"id":595,"depth":738,"text":596},"Follow an API spec through Kubb's pipeline, from adapter to AST, plugins, parsers, and storage, and see which extension point changes each stage.","md",{"layout":756,"title":5,"description":753,"outline":757,"order":744,"navigation":758},"doc",[738,744],{"title":759,"icon":760},"Architecture","i-iconoir-cube",{"layout":756,"outline":762},[738,744],{"title":759,"icon":760},"\u002Fdocs\u002F5.x\u002Fintroduction\u002Farchitecture",{"title":5,"description":753},{"loc":764},"kubb-labs\u002Fkubb\u002Fdocs\u002F5.x\u002Fintroduction\u002Farchitecture.md","docs\u002F5.x\u002Fintroduction\u002Farchitecture","GVxgTvWpvi0unap0kiS0yLlTKG0Tmi5O5zXBZziFmqs",1795021319993]