[{"data":1,"prerenderedAt":783,"buildId":784},["ShallowReactive",2],{"page:\u002Fdocs\u002F5.x\u002Fintroduction\u002Farchitecture":3},{"id":4,"title":5,"body":6,"description":766,"extension":767,"frontmatter":768,"heading":772,"meta":774,"navigation":776,"order":757,"path":777,"seo":778,"sitemap":779,"source":780,"stem":781,"__hash__":782},"docs\u002Fdocs\u002F5.x\u002Fintroduction\u002Farchitecture.md","Kubb architecture - Adapters, AST, plugins, and parsers",{"type":7,"value":8,"toc":746},"minimark",[9,13,16,117,122,137,174,181,185,198,202,205,211,214,230,233,251,254,259,262,314,330,334,340,344,355,359,380,384,387,444,451,455,458,462,497,500,542,544,550,553,556,606,610,625,628],[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 templates 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 templates, a resolver, and macros.",[252,253],"plugin-anatomy",{},[255,256,258],"h3",{"id":257},"templates","Templates",[10,260,261],{},"A template turns AST nodes of one kind into files.",[17,263,264,278],{},[20,265,266],{},[23,267,268,272],{},[26,269,270],{},[55,271,219],{},[26,273,274,275],{},"Kubb calls ",[55,276,277],{},"render",[36,279,280,290,300],{},[23,281,282,287],{},[41,283,284],{},[55,285,286],{},"Schema",[41,288,289],{},"Once per schema node",[23,291,292,297],{},[41,293,294],{},[55,295,296],{},"Operation",[41,298,299],{},"Once per operation node",[23,301,302,307],{},[41,303,304],{},[55,305,306],{},"Operations",[41,308,309,310,313],{},"Once per plugin, with an ",[55,311,312],{},"OperationsNode"," that holds every operation its filters keep",[10,315,316,318,319,323,324,326,327,229],{},[55,317,277],{}," returns JSX for a ",[44,320,322],{"href":321},"#renderers","renderer",", or ",[55,325,87],{},"s. See ",[44,328,258],{"href":329},"\u002Fdocs\u002F5.x\u002Freference\u002Fkit\u002Ftemplates",[255,331,333],{"id":332},"resolvers","Resolvers",[10,335,336,337,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,338,333],{"href":339},"\u002Fdocs\u002F5.x\u002Fhow-to\u002Fcustomize#resolvers",[255,341,343],{"id":342},"macros","Macros and printers",[10,345,346,347,159,351,229],{},"A macro rewrites AST nodes before the templates see them, per plugin, so a change reaches every template 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,348,350],{"href":349},"\u002Fdocs\u002F5.x\u002Fhow-to\u002Fcustomize#macros","Macros",[44,352,354],{"href":353},"\u002Fdocs\u002F5.x\u002Fhow-to\u002Fcustomize#printers","Printers",[255,356,358],{"id":357},"renderers","Renderers",[10,360,361,362,364,365,368,369,372,373,224,376,229],{},"A renderer turns the elements a template returns into ",[55,363,87],{},"s. ",[55,366,367],{},"jsxRenderer"," from ",[55,370,371],{},"kubb\u002Fjsx"," renders JSX without React, and kit uses it unless you pass another with ",[55,374,375],{},"addTemplate(template, { renderer })",[44,377,379],{"href":378},"\u002Fdocs\u002F5.x\u002Freference\u002Fjsx#renderers","JSX renderer",[255,381,383],{"id":382},"lifecycle","Lifecycle",[385,386],"lifecycle-timeline",{},[138,388,389,392,405,420,430,437],{},[141,390,391],{},"The adapter parses the spec.",[141,393,394,395,159,397,400,401,229],{},"Each plugin's ",[55,396,249],{},[55,398,399],{},"kubb:plugin:setup"," run once, in ",[44,402,404],{"href":403},"#dependencies","plugin order",[141,406,407,408,411,412,415,416,419],{},"Kubb walks the AST once, schemas first. Each node goes to every plugin, through its macros and ",[55,409,410],{},"include",", ",[55,413,414],{},"exclude",", and ",[55,417,418],{},"override"," filters.",[141,421,394,422,425,426,429],{},[55,423,424],{},"operations"," handler runs, then ",[55,427,428],{},"kubb:plugin:end"," fires.",[141,431,432,433,436],{},"After ",[55,434,435],{},"kubb:plugins:end",", Kubb writes all files through the parsers and storage.",[141,438,439,440,443],{},"Format, lint, and ",[55,441,442],{},"postGenerate"," run when the config sets them.",[10,445,446,450],{},[44,447,449],{"href":448},"\u002Fdocs\u002F5.x\u002Freference\u002Fkit\u002Fhooks","Lifecycle hooks"," lists every hook.",[255,452,454],{"id":453},"dependencies","Dependencies and ordering",[10,456,457],{},"Kubb orders the plugins before setup:",[459,460],"mermaid",{"svg":461},"\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,463,464,468,469,472,473,475,476,411,479,481,482,484,485,488,489,492,493,496],{},[44,465,467],{"href":466},"\u002Fdocs\u002F5.x\u002Freference\u002Fkit\u002Fextensions#dependencies","Dependencies"," win over ",[55,470,471],{},"enforce",", and ties keep their order in ",[55,474,232],{},". With ",[55,477,478],{},"plugins: [pluginAxios(), pluginTs()]",[55,480,155],{}," comes first because ",[55,483,166],{}," depends on it. ",[55,486,487],{},"plugin-barrel",", which ",[55,490,491],{},"defineConfig"," adds, sets ",[55,494,495],{},"enforce: 'post'",", so it runs last and sees every file the others emitted.",[118,498,96],{"id":499},"parsers",[10,501,502,503,505,506,508,509,511,512,128,515,411,518,521,522,128,525,411,528,531,532,128,535,411,538,541],{},"Kubb sends each ",[55,504,87],{}," to the parser that claims its extension. Without a ",[55,507,499],{}," option, ",[55,510,491],{}," adds ",[55,513,514],{},"parserTs",[55,516,517],{},".ts",[55,519,520],{},".js","), ",[55,523,524],{},"parserTsx",[55,526,527],{},".tsx",[55,529,530],{},".jsx","), and ",[55,533,534],{},"parserMd",[55,536,537],{},".md",[55,539,540],{},".markdown","). The TypeScript parser prints a file's banner, imports, and source nodes:",[199,543],{"preset":499},[10,545,546,547,229],{},"To write one, see ",[44,548,96],{"href":549},"\u002Fdocs\u002F5.x\u002Freference\u002Fkit\u002Fparsers",[118,551,110],{"id":552},"storage",[10,554,555],{},"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,557,558,568],{},[20,559,560],{},[23,561,562,565],{},[26,563,564],{},"Driver",[26,566,567],{},"Writes to",[36,569,570,580,594],{},[23,571,572,577],{},[41,573,574],{},[55,575,576],{},"fsStorage()",[41,578,579],{},"Disk. The default.",[23,581,582,587],{},[41,583,584],{},[55,585,586],{},"memoryStorage()",[41,588,589,590,593],{},"A ",[55,591,592],{},"Map"," in memory",[23,595,596,599],{},[41,597,598],{},"Your own",[41,600,601,602],{},"Any backend that implements the ",[44,603,605],{"href":604},"\u002Fdocs\u002F5.x\u002Freference\u002Fkit\u002Fstorage#storage-interface","Storage interface",[118,607,609],{"id":608},"choose-an-extension","Choose an extension",[10,611,612,613,617,618,621,622,229],{},"If an existing ",[44,614,616],{"href":615},"\u002Fextensions\u002Fkind\u002Fplugins","plugin"," generates the output you need, use it. Otherwise, build on ",[55,619,620],{},"kubb\u002Fkit",", which ships with ",[55,623,624],{},"kubb",[459,626],{"svg":627},"\u003Csvg xmlns=\"http:\u002F\u002Fwww.w3.org\u002F2000\u002Fsvg\" class=\"pele pele-flowchart\" viewBox=\"0 0 799 506\" width=\"799\" 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=\"M413.34,134.6C413.34,167.88 347.15,188.28 239.15,188.28C131.16,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=\"M429.34,144.6C429.34,179.12 394.23,200.28 336.95,200.28C279.67,200.28 244.57,210.92 244.57,228.28L244.57,297.46\"\u002F>\u003Cpath class=\"pele-marker\" d=\"M244.57,304.46L241.21,296.46L247.93,296.46Z\" fill=\"var(--_l)\" stroke=\"none\"\u002F>\u003C\u002Fg>\u003Cg class=\"pele-edge\" data-id=\"L_Q_O_0\">\u003Cpath d=\"M454.43,160.28L454.43,273.78\"\u002F>\u003Cpath class=\"pele-marker\" d=\"M454.43,280.78L451.07,272.78L457.79,272.78Z\" fill=\"var(--_l)\" stroke=\"none\"\u002F>\u003C\u002Fg>\u003Cg class=\"pele-edge\" data-id=\"L_O_M_0\">\u003Cpath d=\"M438.43,366.13C438.43,381.38 272.75,381.38 272.75,396.63L272.75,442.13\"\u002F>\u003Cpath class=\"pele-marker\" d=\"M272.75,449.13L269.39,441.13L276.11,441.13Z\" fill=\"var(--_l)\" stroke=\"none\"\u002F>\u003C\u002Fg>\u003Cg class=\"pele-edge\" data-id=\"L_O_PR_0\">\u003Cpath d=\"M454.43,376.13L454.43,442.13\"\u002F>\u003Cpath class=\"pele-marker\" d=\"M454.43,449.13L451.07,441.13L457.79,441.13Z\" fill=\"var(--_l)\" stroke=\"none\"\u002F>\u003C\u002Fg>\u003Cg class=\"pele-edge\" data-id=\"L_O_R_0\">\u003Cpath d=\"M470.43,366.13C470.43,381.38 625.99,381.38 625.99,396.63L625.99,442.13\"\u002F>\u003Cpath class=\"pele-marker\" d=\"M625.99,449.13L622.63,441.13L629.35,441.13Z\" fill=\"var(--_l)\" stroke=\"none\"\u002F>\u003C\u002Fg>\u003Cg class=\"pele-edge\" data-id=\"L_Q_PA_0\">\u003Cpath d=\"M479.53,144.6C479.53,179.12 504.75,200.28 545.9,200.28C587.05,200.28 612.27,210.92 612.27,228.28L612.27,297.46\"\u002F>\u003Cpath class=\"pele-marker\" d=\"M612.27,304.46L608.91,296.46L615.63,296.46Z\" fill=\"var(--_l)\" stroke=\"none\"\u002F>\u003C\u002Fg>\u003Cg class=\"pele-edge\" data-id=\"L_Q_S_0\">\u003Cpath d=\"M495.53,134.6C495.53,167.88 541.95,188.28 617.69,188.28C693.43,188.28 739.85,203.48 739.85,228.28L739.85,297.46\"\u002F>\u003Cpath class=\"pele-marker\" d=\"M739.85,304.46L736.49,296.46L743.21,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=\"186.09\" y=\"230.28\" width=\"116.96\" height=\"21\" rx=\"3\" fill=\"var(--_bg)\"\u002F>\u003Ctext x=\"244.57\" 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=\"394.79\" y=\"230.28\" width=\"119.29\" height=\"21\" rx=\"3\" fill=\"var(--_bg)\"\u002F>\u003Ctext x=\"454.43\" 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=\"197.17\" y=\"398.63\" width=\"151.16\" height=\"21\" rx=\"3\" fill=\"var(--_bg)\"\u002F>\u003Ctext x=\"272.75\" 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=\"368.34\" y=\"398.63\" width=\"172.19\" height=\"21\" rx=\"3\" fill=\"var(--_bg)\"\u002F>\u003Ctext x=\"454.43\" 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=\"560.53\" y=\"398.63\" width=\"130.93\" height=\"21\" rx=\"3\" fill=\"var(--_bg)\"\u002F>\u003Ctext x=\"625.99\" 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=\"574.82\" y=\"230.28\" width=\"74.91\" height=\"21\" rx=\"3\" fill=\"var(--_bg)\"\u002F>\u003Ctext x=\"612.27\" 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=\"691.11\" y=\"230.28\" width=\"97.47\" height=\"21\" rx=\"3\" fill=\"var(--_bg)\"\u002F>\u003Ctext x=\"739.85\" 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(454.43,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(244.57,328.46)\">\u003Crect x=\"-93.58\" y=\"-24\" width=\"187.17\" 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 templates\u003C\u002Ftext>\u003C\u002Fg>\u003Cg class=\"pele-node pele-shape-diam\" data-id=\"O\" transform=\"translate(454.43,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(272.75,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(454.43,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(625.99,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(612.27,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(739.85,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,629,630,643],{},[20,631,632],{},[23,633,634,637,640],{},[26,635,636],{},"Extension",[26,638,639],{},"Example",[26,641,642],{},"Start with",[36,644,645,656,670,690,710,722,734],{},[23,646,647,649,652],{},[41,648,47],{},[41,650,651],{},"Read a format other than OpenAPI",[41,653,654],{},[44,655,184],{"href":195},[23,657,658,661,664],{},[41,659,660],{},"Plugin",[41,662,663],{},"Generate a new kind of file",[41,665,666],{},[44,667,669],{"href":668},"\u002Fdocs\u002F5.x\u002Ftutorials\u002Fcreating-plugins","Create a plugin",[23,671,672,675,686],{},[41,673,674],{},"Macro",[41,676,677,678,681,682,685],{},"Treat every ",[55,679,680],{},"integer"," as a ",[55,683,684],{},"string"," in one plugin",[41,687,688],{},[44,689,350],{"href":349},[23,691,692,695,706],{},[41,693,694],{},"Printer",[41,696,697,698,701,702,705],{},"Print ",[55,699,700],{},"date"," schemas as the TypeScript ",[55,703,704],{},"Date"," type",[41,707,708],{},[44,709,354],{"href":353},[23,711,712,715,718],{},[41,713,714],{},"Resolver",[41,716,717],{},"Move model files into a folder",[41,719,720],{},[44,721,333],{"href":339},[23,723,724,727,730],{},[41,725,726],{},"Parser",[41,728,729],{},"Emit a new file type",[41,731,732],{},[44,733,96],{"href":549},[23,735,736,738,741],{},[41,737,110],{},[41,739,740],{},"Write to a remote store",[41,742,743],{},[44,744,110],{"href":745},"\u002Fdocs\u002F5.x\u002Freference\u002Fkit\u002Fstorage",{"title":747,"searchDepth":748,"depth":748,"links":749},"",5,[750,752,753,754,763,764,765],{"id":120,"depth":751,"text":121},2,{"id":183,"depth":751,"text":184},{"id":204,"depth":751,"text":65},{"id":232,"depth":751,"text":79,"children":755},[756,758,759,760,761,762],{"id":257,"depth":757,"text":258},3,{"id":332,"depth":757,"text":333},{"id":342,"depth":757,"text":343},{"id":357,"depth":757,"text":358},{"id":382,"depth":757,"text":383},{"id":453,"depth":757,"text":454},{"id":499,"depth":751,"text":96},{"id":552,"depth":751,"text":110},{"id":608,"depth":751,"text":609},"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":769,"title":5,"description":766,"outline":770,"order":757,"navigation":771},"doc",[751,757],{"title":772,"icon":773},"Architecture","i-iconoir-cube",{"layout":769,"outline":775},[751,757],{"title":772,"icon":773},"\u002Fdocs\u002F5.x\u002Fintroduction\u002Farchitecture",{"title":5,"description":766},{"loc":777},"kubb-labs\u002Fkubb\u002Fdocs\u002F5.x\u002Fintroduction\u002Farchitecture.md","docs\u002F5.x\u002Fintroduction\u002Farchitecture","et7eh-ovErCe9Jxk7rdhmWuH2rwkY26C6yB34fKpBy4",1795727673252,"1b64b1eb-29b7-4f90-ad41-6f24721e1669"]