[{"data":1,"prerenderedAt":2310},["ShallowReactive",2],{"page:\u002Fdocs\u002F5.x\u002Fmigrate\u002Ffrom-v4":3},{"id":4,"title":5,"body":6,"description":2291,"extension":2292,"frontmatter":2293,"heading":2300,"meta":2301,"navigation":2303,"order":2296,"path":2304,"seo":2305,"sitemap":2306,"source":2307,"stem":2308,"__hash__":2309},"docs\u002Fdocs\u002F5.x\u002Fmigrate\u002Ffrom-v4.md","Migrate Kubb v4 to v5 - Config and plugin changes",{"type":7,"value":8,"toc":2266},"minimark",[9,13,18,26,115,119,302,306,782,925,929,944,1038,1042,1107,1151,1155,1246,1253,1396,1400,1537,1560,1632,1636,1695,1714,1721,1725,1732,1822,1828,1832,1887,1893,1897,1908,1912,1922,1961,1972,1976,1989,1993,2008,2012,2040,2046,2050,2065,2071,2075,2090,2094,2097],[10,11,12],"p",{},"Update the packages and the config, run Kubb, then fix the imports and call sites in your app.",[14,15,17],"h2",{"id":16},"before-you-start","Before you start",[10,19,20,21,25],{},"Use Node.js 22.22 or later, also in CI and Docker. Update ",[22,23,24],"code",{},"kubb"," and your plugins to v5. Package names stay the same, except these:",[27,28,29,42],"table",{},[30,31,32],"thead",{},[33,34,35,39],"tr",{},[36,37,38],"th",{},"v4 package",[36,40,41],{},"v5",[43,44,45,65,91,101],"tbody",{},[33,46,47,53],{},[48,49,50],"td",{},[22,51,52],{},"@kubb\u002Fplugin-oas",[48,54,55,56,58,59,64],{},"Remove it. ",[22,57,24],{}," includes the ",[60,61,63],"a",{"href":62},"#adapter-oas","OpenAPI adapter",".",[33,66,67,80],{},[48,68,69,72,73,76,77],{},[22,70,71],{},"@kubb\u002Fplugin-client"," with ",[22,74,75],{},"client: 'axios'"," or ",[22,78,79],{},"'fetch'",[48,81,82,64],{},[60,83,85,76,88],{"href":84},"#plugin-client",[22,86,87],{},"@kubb\u002Fplugin-axios",[22,89,90],{},"@kubb\u002Fplugin-fetch",[33,92,93,98],{},[48,94,95,97],{},[22,96,71],{}," with your own client module",[48,99,100],{},"Keep it.",[33,102,103,112],{},[48,104,105,108,109],{},[22,106,107],{},"@kubb\u002Fplugin-solid-query",", ",[22,110,111],{},"@kubb\u002Fplugin-svelte-query",[48,113,114],{},"Remove them, with no replacement.",[14,116,118],{"id":117},"defaults-that-changed","Defaults that changed",[27,120,121,136],{},[30,122,123],{},[33,124,125,128,131,133],{},[36,126,127],{},"Behavior",[36,129,130],{},"v4",[36,132,41],{},[36,134,135],{},"Keep v4 behavior with",[43,137,138,160,181,200,223,242,261,285],{},[33,139,140,145,150,155],{},[48,141,142],{},[22,143,144],{},"output.format",[48,146,147],{},[22,148,149],{},"'prettier'",[48,151,152],{},[22,153,154],{},"false",[48,156,157],{},[22,158,159],{},"format: 'prettier'",[33,161,162,167,172,176],{},[48,163,164],{},[22,165,166],{},"output.lint",[48,168,169],{},[22,170,171],{},"'auto'",[48,173,174],{},[22,175,154],{},[48,177,178],{},[22,179,180],{},"lint: 'auto'",[33,182,183,186,191,195],{},[48,184,185],{},"Root barrel",[48,187,188],{},[22,189,190],{},"'named'",[48,192,193],{},[22,194,154],{},[48,196,197],{},[22,198,199],{},"output.barrel: { type: 'named' }",[33,201,202,205,210,215],{},[48,203,204],{},"Tag folder",[48,206,207],{},[22,208,209],{},"\u003Ctag>Controller",[48,211,212],{},[22,213,214],{},"\u003Ctag>",[48,216,217],{},[60,218,220],{"href":219},"#output-layout",[22,221,222],{},"group.name",[33,224,225,228,231,237],{},[48,226,227],{},"React and Vue Query hooks",[48,229,230],{},"Generated",[48,232,233,236],{},[22,234,235],{},"hooks: false",", which still writes query keys and option factories",[48,238,239],{},[22,240,241],{},"hooks: true",[33,243,244,247,250,256],{},[48,245,246],{},"Client errors",[48,248,249],{},"Returned",[48,251,252,253],{},"Thrown, ",[22,254,255],{},"throwOnErrorDefault: true",[48,257,258],{},[22,259,260],{},"throwOnErrorDefault: false",[33,262,263,269,274,279],{},[48,264,265,266],{},"OpenAPI ",[22,267,268],{},"int64",[48,270,271],{},[22,272,273],{},"number",[48,275,276],{},[22,277,278],{},"bigint",[48,280,281,284],{},[22,282,283],{},"integerType: 'number'"," on the adapter",[33,286,287,290,293,299],{},[48,288,289],{},"SWR mutation arguments",[48,291,292],{},"Trigger shape opt-in",[48,294,295,296],{},"Always passed through ",[22,297,298],{},"trigger()",[48,300,301],{},"No option",[14,303,305],{"id":304},"migrate-the-config","Migrate the config",[307,308,309,566],"code-group",{},[310,311,315],"pre",{"language":312,"filename":130,"code":313,"class":314},"typescript","import { defineConfig } from '@kubb\u002Fcore'\nimport { pluginOas } from '@kubb\u002Fplugin-oas'\nimport { pluginTs } from '@kubb\u002Fplugin-ts'\nimport { pluginClient } from '@kubb\u002Fplugin-client'\n\nexport default defineConfig({\n  input: { path: '.\u002FpetStore.yaml' },\n  output: { path: '.\u002Fsrc\u002Fgen', barrelType: 'named' },\n  hooks: { done: ['npm run typecheck'] },\n  plugins: [pluginOas({ serverIndex: 0 }), pluginTs({ enumType: 'asConst' }), pluginClient({ client: 'axios' })],\n})","highlights",[22,316,318,345,346,345,362,345,378,345,394,345,396,345,411,345,438,345,470,345,497,345,562],{"class":317},"language-typescript",[319,320,323,327,331,335,338,341],"span",{"class":321,"style":322},"line","display: inline",[319,324,326],{"style":325},"color:#d73a49;--hls-dark:#f97583","import ",[319,328,330],{"style":329},"color:#005cc5;--hls-dark:#79b8ff","{ ",[319,332,334],{"style":333},"color:#24292e;--hls-dark:#e1e4e8","defineConfig ",[319,336,337],{"style":329},"} ",[319,339,340],{"style":325},"from ",[319,342,344],{"style":343},"color:#032f62;--hls-dark:#9ecbff","'@kubb\u002Fcore'","\n",[319,347,348,350,352,355,357,359],{"class":321,"style":322},[319,349,326],{"style":325},[319,351,330],{"style":329},[319,353,354],{"style":333},"pluginOas ",[319,356,337],{"style":329},[319,358,340],{"style":325},[319,360,361],{"style":343},"'@kubb\u002Fplugin-oas'",[319,363,364,366,368,371,373,375],{"class":321,"style":322},[319,365,326],{"style":325},[319,367,330],{"style":329},[319,369,370],{"style":333},"pluginTs ",[319,372,337],{"style":329},[319,374,340],{"style":325},[319,376,377],{"style":343},"'@kubb\u002Fplugin-ts'",[319,379,380,382,384,387,389,391],{"class":321,"style":322},[319,381,326],{"style":325},[319,383,330],{"style":329},[319,385,386],{"style":333},"pluginClient ",[319,388,337],{"style":329},[319,390,340],{"style":325},[319,392,393],{"style":343},"'@kubb\u002Fplugin-client'",[319,395],{"class":321,"style":322},[319,397,398,401,404,408],{"class":321,"style":322},[319,399,400],{"style":325},"export ",[319,402,403],{"style":325},"default ",[319,405,407],{"style":406},"color:#6f42c1;--hls-dark:#b392f0","defineConfig",[319,409,410],{"style":329},"({",[319,412,413,416,419,422,424,427,429,432,435],{"class":321,"style":322},[319,414,415],{"style":329},"  ",[319,417,418],{"style":329},"input",[319,420,421],{"style":325},": ",[319,423,330],{"style":329},[319,425,426],{"style":329},"path",[319,428,421],{"style":325},[319,430,431],{"style":343},"'.\u002FpetStore.yaml' ",[319,433,434],{"style":329},"}",[319,436,437],{"style":325},",",[319,439,440,442,445,447,449,451,453,456,458,461,463,466,468],{"class":321,"style":322},[319,441,415],{"style":325},[319,443,444],{"style":329},"output",[319,446,421],{"style":325},[319,448,330],{"style":329},[319,450,426],{"style":329},[319,452,421],{"style":325},[319,454,455],{"style":343},"'.\u002Fsrc\u002Fgen'",[319,457,108],{"style":325},[319,459,460],{"style":329},"barrelType",[319,462,421],{"style":325},[319,464,465],{"style":343},"'named' ",[319,467,434],{"style":329},[319,469,437],{"style":325},[319,471,472,474,477,479,481,484,486,489,492,495],{"class":321,"style":322},[319,473,415],{"style":325},[319,475,476],{"style":329},"hooks",[319,478,421],{"style":325},[319,480,330],{"style":329},[319,482,483],{"style":329},"done",[319,485,421],{"style":325},[319,487,488],{"style":329},"[",[319,490,491],{"style":343},"'npm run typecheck'",[319,493,494],{"style":329},"] }",[319,496,437],{"style":325},[319,498,499,501,504,506,508,511,514,517,519,522,525,527,530,532,535,537,540,542,544,547,549,552,554,557,560],{"class":321,"style":322},[319,500,415],{"style":325},[319,502,503],{"style":329},"plugins",[319,505,421],{"style":325},[319,507,488],{"style":329},[319,509,510],{"style":406},"pluginOas",[319,512,513],{"style":329},"({ ",[319,515,516],{"style":329},"serverIndex",[319,518,421],{"style":325},[319,520,521],{"style":329},"0 ",[319,523,524],{"style":329},"})",[319,526,108],{"style":325},[319,528,529],{"style":406},"pluginTs",[319,531,513],{"style":329},[319,533,534],{"style":329},"enumType",[319,536,421],{"style":325},[319,538,539],{"style":343},"'asConst' ",[319,541,524],{"style":329},[319,543,108],{"style":325},[319,545,546],{"style":406},"pluginClient",[319,548,513],{"style":329},[319,550,551],{"style":329},"client",[319,553,421],{"style":325},[319,555,556],{"style":343},"'axios' ",[319,558,559],{"style":329},"})]",[319,561,437],{"style":325},[319,563,564],{"class":321,"style":322},[319,565,524],{"style":329},[310,567,569],{"language":312,"filename":41,"code":568,"class":314},"import { defineConfig } from 'kubb\u002Fconfig'\nimport { adapterOas } from '@kubb\u002Fadapter-oas'\nimport { pluginTs } from '@kubb\u002Fplugin-ts'\nimport { pluginAxios } from '@kubb\u002Fplugin-axios'\n\nexport default defineConfig({\n  input: '.\u002FpetStore.yaml',\n  output: { path: '.\u002Fsrc\u002Fgen', barrel: { type: 'named' }, postGenerate: ['npm run typecheck'] },\n  adapter: adapterOas({ server: { index: 0 } }),\n  plugins: [pluginTs({ enum: { type: 'asConst' } }), pluginAxios()],\n})",[22,570,571,345,586,345,602,345,616,345,632,345,634,345,644,345,657,345,706,345,739,345,778],{"class":317},[319,572,573,575,577,579,581,583],{"class":321,"style":322},[319,574,326],{"style":325},[319,576,330],{"style":329},[319,578,334],{"style":333},[319,580,337],{"style":329},[319,582,340],{"style":325},[319,584,585],{"style":343},"'kubb\u002Fconfig'",[319,587,588,590,592,595,597,599],{"class":321,"style":322},[319,589,326],{"style":325},[319,591,330],{"style":329},[319,593,594],{"style":333},"adapterOas ",[319,596,337],{"style":329},[319,598,340],{"style":325},[319,600,601],{"style":343},"'@kubb\u002Fadapter-oas'",[319,603,604,606,608,610,612,614],{"class":321,"style":322},[319,605,326],{"style":325},[319,607,330],{"style":329},[319,609,370],{"style":333},[319,611,337],{"style":329},[319,613,340],{"style":325},[319,615,377],{"style":343},[319,617,618,620,622,625,627,629],{"class":321,"style":322},[319,619,326],{"style":325},[319,621,330],{"style":329},[319,623,624],{"style":333},"pluginAxios ",[319,626,337],{"style":329},[319,628,340],{"style":325},[319,630,631],{"style":343},"'@kubb\u002Fplugin-axios'",[319,633],{"class":321,"style":322},[319,635,636,638,640,642],{"class":321,"style":322},[319,637,400],{"style":325},[319,639,403],{"style":325},[319,641,407],{"style":406},[319,643,410],{"style":329},[319,645,646,648,650,652,655],{"class":321,"style":322},[319,647,415],{"style":329},[319,649,418],{"style":329},[319,651,421],{"style":325},[319,653,654],{"style":343},"'.\u002FpetStore.yaml'",[319,656,437],{"style":325},[319,658,659,661,663,665,667,669,671,673,675,678,680,682,685,687,689,691,693,696,698,700,702,704],{"class":321,"style":322},[319,660,415],{"style":325},[319,662,444],{"style":329},[319,664,421],{"style":325},[319,666,330],{"style":329},[319,668,426],{"style":329},[319,670,421],{"style":325},[319,672,455],{"style":343},[319,674,108],{"style":325},[319,676,677],{"style":329},"barrel",[319,679,421],{"style":325},[319,681,330],{"style":329},[319,683,684],{"style":329},"type",[319,686,421],{"style":325},[319,688,465],{"style":343},[319,690,434],{"style":329},[319,692,108],{"style":325},[319,694,695],{"style":329},"postGenerate",[319,697,421],{"style":325},[319,699,488],{"style":329},[319,701,491],{"style":343},[319,703,494],{"style":329},[319,705,437],{"style":325},[319,707,708,710,713,715,718,720,723,725,727,730,732,734,737],{"class":321,"style":322},[319,709,415],{"style":325},[319,711,712],{"style":329},"adapter",[319,714,421],{"style":325},[319,716,717],{"style":406},"adapterOas",[319,719,513],{"style":329},[319,721,722],{"style":329},"server",[319,724,421],{"style":325},[319,726,330],{"style":329},[319,728,729],{"style":329},"index",[319,731,421],{"style":325},[319,733,521],{"style":329},[319,735,736],{"style":329},"} })",[319,738,437],{"style":325},[319,740,741,743,745,747,749,751,753,756,758,760,762,764,766,768,770,773,776],{"class":321,"style":322},[319,742,415],{"style":325},[319,744,503],{"style":329},[319,746,421],{"style":325},[319,748,488],{"style":329},[319,750,529],{"style":406},[319,752,513],{"style":329},[319,754,755],{"style":325},"enum",[319,757,421],{"style":325},[319,759,330],{"style":329},[319,761,684],{"style":329},[319,763,421],{"style":325},[319,765,539],{"style":343},[319,767,736],{"style":329},[319,769,108],{"style":325},[319,771,772],{"style":406},"pluginAxios",[319,774,775],{"style":329},"()]",[319,777,437],{"style":325},[319,779,780],{"class":321,"style":322},[319,781,524],{"style":329},[27,783,784,792],{},[30,785,786],{},[33,787,788,790],{},[36,789,130],{},[36,791,41],{},[43,793,794,810,826,843,860,872,882,896,908],{},[33,795,796,804],{},[48,797,798,800,801],{},[22,799,407],{}," from ",[22,802,803],{},"@kubb\u002Fcore",[48,805,806,807,64],{},"From ",[22,808,809],{},"kubb\u002Fconfig",[33,811,812,820],{},[48,813,814,76,817],{},[22,815,816],{},"input: { path }",[22,818,819],{},"input: { data }",[48,821,822,823,64],{},"The path, URL, spec string, or parsed object itself. The wrapper fails with ",[22,824,825],{},"KUBB_LEGACY_INPUT",[33,827,828,833],{},[48,829,830],{},[22,831,832],{},"output.storage",[48,834,835,836,839,840,64],{},"Top-level ",[22,837,838],{},"storage",", with helpers from ",[22,841,842],{},"kubb\u002Fkit",[33,844,845,850],{},[48,846,847],{},[22,848,849],{},"hooks.done",[48,851,852,855,856,859],{},[22,853,854],{},"output.postGenerate",": strings or ",[22,857,858],{},"{ name, command }"," objects.",[33,861,862,867],{},[48,863,864],{},[22,865,866],{},"KUBB_HOOK_FAILED",[48,868,869,64],{},[22,870,871],{},"KUBB_POST_GENERATE_FAILED",[33,873,874,879],{},[48,875,876],{},[22,877,878],{},"output.override",[48,880,881],{},"Removed. Use a storage driver to control writes.",[33,883,884,893],{},[48,885,886,889,890],{},[22,887,888],{},"kubb:debug"," hooks, ",[22,891,892],{},"createDebugger",[48,894,895],{},"Removed.",[33,897,898,903],{},[48,899,900],{},[22,901,902],{},"--debug",[48,904,905,64],{},[22,906,907],{},"--reporter file",[33,909,910,915],{},[48,911,912],{},[22,913,914],{},"--log-level debug",[48,916,917,920,921,64],{},[22,918,919],{},"--log-level verbose",", or a ",[60,922,924],{"href":923},"\u002Fdocs\u002F5.x\u002Freference\u002Fconfiguration#reporters","reporter",[926,927,63],"h3",{"id":928},"adapter-oas",[10,930,931,933,934,937,938,941,942,64],{},[22,932,407],{}," adds ",[22,935,936],{},"adapterOas()",", the TypeScript, TSX, and Markdown parsers, and the barrel plugin. To pass adapter options, install ",[22,939,940],{},"@kubb\u002Fadapter-oas"," and set ",[22,943,712],{},[27,945,946,957],{},[30,947,948],{},[33,949,950,952],{},[36,951,130],{},[36,953,954,955],{},"v5 on ",[22,956,717],{},[43,958,959,985,999,1012,1024],{},[33,960,961,982],{},[48,962,963,108,966,108,969,108,972,108,975,108,978,981],{},[22,964,965],{},"dateType",[22,967,968],{},"integerType",[22,970,971],{},"unknownType",[22,973,974],{},"emptySchemaType",[22,976,977],{},"enumSuffix",[22,979,980],{},"contentType"," on plugins",[48,983,984],{},"The same names, set once.",[33,986,987,994],{},[48,988,989,108,991],{},[22,990,516],{},[22,992,993],{},"serverVariables",[48,995,996,64],{},[22,997,998],{},"server: { index, variables }",[33,1000,1001,1006],{},[48,1002,1003],{},[22,1004,1005],{},"discriminator: 'strict'",[48,1007,1008,1011],{},[22,1009,1010],{},"'preserve'",", the default.",[33,1013,1014,1019],{},[48,1015,1016],{},[22,1017,1018],{},"discriminator: 'inherit'",[48,1020,1021,64],{},[22,1022,1023],{},"'propagate'",[33,1025,1026,1031],{},[48,1027,1028],{},[22,1029,1030],{},"validate",[48,1032,1033,1034,1037],{},"Unchanged, ",[22,1035,1036],{},"true"," by default.",[926,1039,1041],{"id":1040},"output-layout","Output layout",[27,1043,1044,1060],{},[30,1045,1046],{},[33,1047,1048,1054],{},[36,1049,1050,1051],{},"v4 ",[22,1052,1053],{},"output.barrelType",[36,1055,1056,1057],{},"v5 ",[22,1058,1059],{},"output.barrel",[43,1061,1062,1073,1085,1097],{},[33,1063,1064,1068],{},[48,1065,1066],{},[22,1067,190],{},[48,1069,1070],{},[22,1071,1072],{},"{ type: 'named' }",[33,1074,1075,1080],{},[48,1076,1077],{},[22,1078,1079],{},"'all'",[48,1081,1082],{},[22,1083,1084],{},"{ type: 'all' }",[33,1086,1087,1092],{},[48,1088,1089,1091],{},[22,1090,1023],{}," (plugin only)",[48,1093,1094],{},[22,1095,1096],{},"{ type: 'named', nested: true }",[33,1098,1099,1103],{},[48,1100,1101],{},[22,1102,154],{},[48,1104,1105],{},[22,1106,154],{},[1108,1109,1110,1120,1137],"ul",{},[1111,1112,1113,1114,1116,1117,1119],"li",{},"An ",[22,1115,444],{}," you pass to a plugin replaces its default named barrel, so repeat ",[22,1118,677],{}," in it.",[1111,1121,1122,1125,1126,1129,1130,1133,1134,64],{},[22,1123,1124],{},"output.mode"," follows ",[22,1127,1128],{},"output.path",": a file extension means one file, otherwise a directory. ",[22,1131,1132],{},"group"," with file mode fails with ",[22,1135,1136],{},"KUBB_INVALID_PLUGIN_OPTIONS",[1111,1138,1139,1140,1143,1144,1147,1148,64],{},"Tag folders drop the ",[22,1141,1142],{},"Controller"," suffix, or ",[22,1145,1146],{},"Requests"," for Cypress and MCP. To keep it, set ",[22,1149,1150],{},"group: { type: 'tag', name: ({ group }) => `${group}Controller` }",[14,1152,1154],{"id":1153},"shared-plugin-options","Shared plugin options",[27,1156,1157,1165],{},[30,1158,1159],{},[33,1160,1161,1163],{},[36,1162,130],{},[36,1164,41],{},[43,1166,1167,1183,1195,1209,1219],{},[33,1168,1169,1174],{},[48,1170,1171],{},[22,1172,1173],{},"transformers.name",[48,1175,1176,1182],{},[60,1177,1179],{"href":1178},"\u002Fdocs\u002F5.x\u002Fhow-to\u002Fcustomize",[22,1180,1181],{},"resolver.name",". Its input casing can differ from v4. Check the names, or call the exported resolver for the default casing.",[33,1184,1185,1190],{},[48,1186,1187],{},[22,1188,1189],{},"transformers.schema",[48,1191,1192,64],{},[22,1193,1194],{},"macros",[33,1196,1197,1202],{},[48,1198,1199],{},[22,1200,1201],{},"mapper",[48,1203,1204,1205,1208],{},"A schema macro or a ",[22,1206,1207],{},"printer.nodes"," override.",[33,1210,1211,1216],{},[48,1212,1213],{},[22,1214,1215],{},"generators",[48,1217,1218],{},"A custom plugin.",[33,1220,1221,1232],{},[48,1222,1223,108,1226,108,1229],{},[22,1224,1225],{},"paramsType",[22,1227,1228],{},"pathParamsType",[22,1230,1231],{},"paramsCasing",[48,1233,1234,1235,1238,1239,1245],{},"One ",[22,1236,1237],{},"{ body, path, query, headers }"," object with the spec's names. For camelCase path params, set ",[60,1240,1242],{"href":1241},"\u002Fextensions\u002Fkubb-labs\u002Fadapter-oas\u002Foptions#pathparamscasing",[22,1243,1244],{},"pathParamsCasing: 'camelcase'"," on the adapter.",[10,1247,1248,1249,1252],{},"A group with a required parameter is required, and an unused group is typed ",[22,1250,1251],{},"never",". Update positional call sites:",[307,1254,1255,1320],{},[310,1256,1258],{"language":312,"filename":130,"code":1257,"class":314},"useGetPet(petId)\nuseFindPets({ status: 'available' })\nuseUpdatePet().mutate({ petId, data: pet })",[22,1259,1260,345,1274,345,1291],{"class":317},[319,1261,1262,1265,1268,1271],{"class":321,"style":322},[319,1263,1264],{"style":406},"useGetPet",[319,1266,1267],{"style":329},"(",[319,1269,1270],{"style":333},"petId",[319,1272,1273],{"style":329},")",[319,1275,1276,1279,1281,1284,1286,1289],{"class":321,"style":322},[319,1277,1278],{"style":406},"useFindPets",[319,1280,513],{"style":329},[319,1282,1283],{"style":329},"status",[319,1285,421],{"style":325},[319,1287,1288],{"style":343},"'available' ",[319,1290,524],{"style":329},[319,1292,1293,1296,1299,1301,1304,1306,1308,1310,1313,1315,1318],{"class":321,"style":322},[319,1294,1295],{"style":406},"useUpdatePet",[319,1297,1298],{"style":329},"()",[319,1300,64],{"style":325},[319,1302,1303],{"style":406},"mutate",[319,1305,513],{"style":329},[319,1307,1270],{"style":333},[319,1309,108],{"style":325},[319,1311,1312],{"style":329},"data",[319,1314,421],{"style":325},[319,1316,1317],{"style":333},"pet ",[319,1319,524],{"style":329},[310,1321,1323],{"language":312,"filename":41,"code":1322,"class":314},"useGetPet({ path: { petId } })\nuseFindPets({ query: { status: 'available' } })\nuseUpdatePet().mutate({ path: { petId }, body: pet })",[22,1324,1325,345,1342,345,1363],{"class":317},[319,1326,1327,1329,1331,1333,1335,1337,1340],{"class":321,"style":322},[319,1328,1264],{"style":406},[319,1330,513],{"style":329},[319,1332,426],{"style":329},[319,1334,421],{"style":325},[319,1336,330],{"style":329},[319,1338,1339],{"style":333},"petId ",[319,1341,736],{"style":329},[319,1343,1344,1346,1348,1351,1353,1355,1357,1359,1361],{"class":321,"style":322},[319,1345,1278],{"style":406},[319,1347,513],{"style":329},[319,1349,1350],{"style":329},"query",[319,1352,421],{"style":325},[319,1354,330],{"style":329},[319,1356,1283],{"style":329},[319,1358,421],{"style":325},[319,1360,1288],{"style":343},[319,1362,736],{"style":329},[319,1364,1365,1367,1369,1371,1373,1375,1377,1379,1381,1383,1385,1387,1390,1392,1394],{"class":321,"style":322},[319,1366,1295],{"style":406},[319,1368,1298],{"style":329},[319,1370,64],{"style":325},[319,1372,1303],{"style":406},[319,1374,513],{"style":329},[319,1376,426],{"style":329},[319,1378,421],{"style":325},[319,1380,330],{"style":329},[319,1382,1339],{"style":333},[319,1384,434],{"style":329},[319,1386,108],{"style":325},[319,1388,1389],{"style":329},"body",[319,1391,421],{"style":325},[319,1393,1317],{"style":333},[319,1395,524],{"style":329},[14,1397,1399],{"id":1398},"plugin-client","HTTP clients",[27,1401,1402,1410],{},[30,1403,1404],{},[33,1405,1406,1408],{},[36,1407,130],{},[36,1409,41],{},[43,1411,1412,1424,1436,1455,1471,1483,1495,1518],{},[33,1413,1414,1419],{},[48,1415,1416],{},[22,1417,1418],{},"pluginClient({ client: 'axios' })",[48,1420,1421],{},[22,1422,1423],{},"pluginAxios()",[33,1425,1426,1431],{},[48,1427,1428],{},[22,1429,1430],{},"pluginClient({ client: 'fetch' })",[48,1432,1433],{},[22,1434,1435],{},"pluginFetch()",[33,1437,1438,1446],{},[48,1439,1440,108,1443],{},[22,1441,1442],{},"clientType",[22,1444,1445],{},"wrapper",[48,1447,1448,1454],{},[60,1449,1451],{"href":1450},"\u002Fextensions\u002Fkubb-labs\u002Fplugin-axios\u002Foptions#sdk",[22,1452,1453],{},"sdk",", a class per tag by default. Leave it unset for the standalone functions query plugins use.",[33,1456,1457,1462],{},[48,1458,1459],{},[22,1460,1461],{},"dataReturnType",[48,1463,1464,1467,1468],{},[22,1465,1466],{},"returnType",", default ",[22,1469,1470],{},"'full'",[33,1472,1473,1478],{},[48,1474,1475],{},[22,1476,1477],{},"parser: 'zod'",[48,1479,1480],{},[22,1481,1482],{},"validator: 'zod'",[33,1484,1485,1490],{},[48,1486,1487],{},[22,1488,1489],{},"parser: 'client'",[48,1491,1492,1011],{},[22,1493,1494],{},"validator: false",[33,1496,1497,1511],{},[48,1498,1499,108,1502,108,1505,108,1508],{},[22,1500,1501],{},"operations",[22,1503,1504],{},"clientType: 'staticClass'",[22,1506,1507],{},"bundle",[22,1509,1510],{},"urlType",[48,1512,1513,1514,1517],{},"Removed. The client goes to ",[22,1515,1516],{},".kubb\u002Fclient.ts",". URL-only helpers need a custom plugin.",[33,1519,1520,1526],{},[48,1521,1522,1525],{},[22,1523,1524],{},"importPath"," to your own client module",[48,1527,1528,1531,1532,76,1534,64],{},[22,1529,1530],{},"pluginClient({ importPath })",", without ",[22,1533,1453],{},[22,1535,1536],{},"baseURL",[1108,1538,1539,1553],{},[1111,1540,1541,1542,1544,1545,1548,1549,1552],{},"Calls return the full result object. Read ",[22,1543,1312],{},", call ",[22,1546,1547],{},".unwrap()",", or set ",[22,1550,1551],{},"returnType: 'data'"," for the body alone.",[1111,1554,1555,1556,1559],{},"To inspect an error without throwing, pass ",[22,1557,1558],{},"throwOnError: false"," on the call.",[307,1561,1562,1590],{},[310,1563,1565],{"language":312,"filename":130,"code":1564,"class":314},"const pet = await getPet(1)",[22,1566,1567],{"class":317},[319,1568,1569,1572,1574,1577,1580,1583,1585,1588],{"class":321,"style":322},[319,1570,1571],{"style":325},"const ",[319,1573,1317],{"style":333},[319,1575,1576],{"style":325},"= ",[319,1578,1579],{"style":325},"await ",[319,1581,1582],{"style":406},"getPet",[319,1584,1267],{"style":329},[319,1586,1587],{"style":329},"1",[319,1589,1273],{"style":329},[310,1591,1593],{"language":312,"filename":41,"code":1592,"class":314},"const { data: pet } = await getPet({ path: { petId: 1 } })",[22,1594,1595],{"class":317},[319,1596,1597,1599,1601,1603,1605,1607,1609,1611,1613,1615,1617,1619,1621,1623,1625,1627,1630],{"class":321,"style":322},[319,1598,1571],{"style":325},[319,1600,330],{"style":329},[319,1602,1312],{"style":329},[319,1604,421],{"style":325},[319,1606,1317],{"style":333},[319,1608,337],{"style":329},[319,1610,1576],{"style":325},[319,1612,1579],{"style":325},[319,1614,1582],{"style":406},[319,1616,513],{"style":329},[319,1618,426],{"style":329},[319,1620,421],{"style":325},[319,1622,330],{"style":329},[319,1624,1270],{"style":329},[319,1626,421],{"style":325},[319,1628,1629],{"style":329},"1 ",[319,1631,736],{"style":329},[14,1633,1635],{"id":1634},"plugin-ts","TypeScript",[27,1637,1638,1646],{},[30,1639,1640],{},[33,1641,1642,1644],{},[36,1643,130],{},[36,1645,41],{},[43,1647,1648,1659,1671,1683],{},[33,1649,1650,1654],{},[48,1651,1652],{},[22,1653,534],{},[48,1655,1656],{},[22,1657,1658],{},"enum.type",[33,1660,1661,1666],{},[48,1662,1663],{},[22,1664,1665],{},"enumTypeSuffix",[48,1667,1668],{},[22,1669,1670],{},"enum.typeSuffix",[33,1672,1673,1678],{},[48,1674,1675],{},[22,1676,1677],{},"enumKeyCasing",[48,1679,1680],{},[22,1681,1682],{},"enum.keyCasing",[33,1684,1685,1690],{},[48,1686,1687],{},[22,1688,1689],{},"enumType: 'asPascalConst'",[48,1691,1692],{},[22,1693,1694],{},"enum: { type: 'asConst', constCasing: 'pascalCase' }",[1108,1696,1697,1707],{},[1111,1698,1699,1700,1703,1704,64],{},"Request input types are named ",[22,1701,1702],{},"*Options"," and keep spec names such as ",[22,1705,1706],{},"pet_id",[1111,1708,1709,1710,1713],{},"Enums default to a const-asserted object plus a ",[22,1711,1712],{},"*Key"," type union. Inline enum names are scoped to their operation.",[10,1715,1716,1717,64],{},"See ",[60,1718,1720],{"href":1719},"\u002Fextensions\u002Fkubb-labs\u002Fplugin-ts\u002Foptions","TypeScript options",[14,1722,1724],{"id":1723},"plugin-zod","Zod",[10,1726,1727,1728,1731],{},"Upgrade ",[22,1729,1730],{},"zod"," to v4.",[27,1733,1734,1742],{},[30,1735,1736],{},[33,1737,1738,1740],{},[36,1739,130],{},[36,1741,41],{},[43,1743,1744,1754,1772,1785,1801,1810],{},[33,1745,1746,1751],{},[48,1747,1748],{},[22,1749,1750],{},"version",[48,1752,1753],{},"Removed. v5 prints Zod 4.",[33,1755,1756,1761],{},[48,1757,1758],{},[22,1759,1760],{},"typed: true",[48,1762,1763,1764,1767,1768,1771],{},"Removed. Set ",[22,1765,1766],{},"inferred: true"," to export ",[22,1769,1770],{},"z.infer"," type aliases.",[33,1773,1774,1780],{},[48,1775,1776,1777],{},"Inferred alias ",[22,1778,1779],{},"PetSchema",[48,1781,1782],{},[22,1783,1784],{},"PetSchemaType",[33,1786,1787,1792],{},[48,1788,1789],{},[22,1790,1791],{},"wrapOutput",[48,1793,1794,1795,1797,1798,64],{},"A ",[22,1796,1207],{}," override that decorates ",[22,1799,1800],{},"this.base(node)",[33,1802,1803,1807],{},[48,1804,1805],{},[22,1806,1501],{},[48,1808,1809],{},"Removed. Its operation and path maps need a custom plugin.",[33,1811,1812,1817],{},[48,1813,1814],{},[22,1815,1816],{},"listPets200Schema",[48,1818,1819],{},[22,1820,1821],{},"listPetsStatus200Schema",[10,1823,1716,1824,64],{},[60,1825,1827],{"href":1826},"\u002Fextensions\u002Fkubb-labs\u002Fplugin-zod\u002Foptions","Zod options",[14,1829,1831],{"id":1830},"plugin-react-query","React Query",[1108,1833,1834,1839,1848,1858,1865,1874],{},[1111,1835,1836,1837,64],{},"Register a client plugin: Axios, Fetch, or ",[22,1838,71],{},[1111,1840,1841,1842,1844,1845,64],{},"Move ",[22,1843,1536],{}," and validation to the client plugin, and remove ",[22,1846,1847],{},"parser",[1111,1849,1850,1851,1853,1854,1857],{},"Set ",[22,1852,241],{}," to keep the ",[22,1855,1856],{},"use*"," hooks.",[1111,1859,1860,1861,1864],{},"Replace ",[22,1862,1863],{},"*MutationKey"," type imports with the runtime key helper.",[1111,1866,1867,1870,1871,64],{},[22,1868,1869],{},"TData"," holds only 2xx responses, and errors use ",[22,1872,1873],{},"TError",[1111,1875,1876,1877,76,1880,1883,1884,1886],{},"To defer a request, set TanStack Query's ",[22,1878,1879],{},"enabled",[22,1881,1882],{},"skipToken",". The generated ",[22,1885,1879],{}," guard is gone.",[10,1888,1716,1889,64],{},[60,1890,1892],{"href":1891},"\u002Fextensions\u002Fkubb-labs\u002Fplugin-react-query\u002Foptions","React Query options",[14,1894,1896],{"id":1895},"plugin-vue-query","Vue Query",[10,1898,1899,1900,1903,1904,64],{},"Apply the ",[60,1901,1831],{"href":1902},"#plugin-react-query"," changes. See ",[60,1905,1907],{"href":1906},"\u002Fextensions\u002Fkubb-labs\u002Fplugin-vue-query\u002Foptions","Vue Query options",[14,1909,1911],{"id":1910},"plugin-swr","SWR",[10,1913,1914,1915,1917,1918,1921],{},"Apply the client and validation changes from ",[60,1916,1831],{"href":1902},", and remove ",[22,1919,1920],{},"mutation.paramsToTrigger",":",[310,1923,1926],{"language":312,"filename":1924,"code":1925,"class":314},"src\u002Fapp.ts","useUpdatePet().trigger({ path: { petId }, body: pet })",[22,1927,1928],{"class":317},[319,1929,1930,1932,1934,1936,1939,1941,1943,1945,1947,1949,1951,1953,1955,1957,1959],{"class":321,"style":322},[319,1931,1295],{"style":406},[319,1933,1298],{"style":329},[319,1935,64],{"style":325},[319,1937,1938],{"style":406},"trigger",[319,1940,513],{"style":329},[319,1942,426],{"style":329},[319,1944,421],{"style":325},[319,1946,330],{"style":329},[319,1948,1339],{"style":333},[319,1950,434],{"style":329},[319,1952,108],{"style":325},[319,1954,1389],{"style":329},[319,1956,421],{"style":325},[319,1958,1317],{"style":333},[319,1960,524],{"style":329},[10,1962,1963,1964,1967,1968,64],{},"To skip a request, set ",[22,1965,1966],{},"shouldFetch: false",". The parameter-presence guard is gone. See ",[60,1969,1971],{"href":1970},"\u002Fextensions\u002Fkubb-labs\u002Fplugin-swr\u002Foptions","SWR options",[14,1973,1975],{"id":1974},"plugin-faker","Faker",[10,1977,1978,1979,1981,1982,1984,1985,64],{},"Remove ",[22,1980,1231],{}," and ",[22,1983,1201],{},". Use macros or printers instead. See ",[60,1986,1988],{"href":1987},"\u002Fextensions\u002Fkubb-labs\u002Fplugin-faker\u002Foptions","Faker options",[14,1990,1992],{"id":1991},"plugin-msw","MSW",[10,1994,1995,108,1997,2000,2001,2003,2004,64],{},[22,1996,1847],{},[22,1998,1999],{},"handlers",", and ",[22,2002,1536],{}," keep their v4 behavior. See ",[60,2005,2007],{"href":2006},"\u002Fextensions\u002Fkubb-labs\u002Fplugin-msw\u002Foptions","MSW options",[14,2009,2011],{"id":2010},"plugin-cypress","Cypress",[1108,2013,2014,2023,2031],{},[1111,2015,2016,2017,2019,2020,64],{},"Request helpers take grouped ",[22,2018,1702],{},", then the unchanged ",[22,2021,2022],{},"Partial\u003CCypress.RequestOptions>",[1111,2024,1978,2025,2027,2028,64],{},[22,2026,1461],{},". Helpers yield the body as ",[22,2029,2030],{},"Cypress.Chainable\u003CT>",[1111,2032,2033,2034,1981,2036,2039],{},"Imports use ",[22,2035,1702],{},[22,2037,2038],{},"*Response"," names.",[10,2041,1716,2042,64],{},[60,2043,2045],{"href":2044},"\u002Fextensions\u002Fkubb-labs\u002Fplugin-cypress\u002Foptions","Cypress options",[14,2047,2049],{"id":2048},"plugin-mcp","MCP",[1108,2051,2052,2058],{},[1111,2053,2054,2055,2057],{},"Register TypeScript, Zod, and an Axios or Fetch client, which ",[22,2056,551],{}," selects.",[1111,2059,1841,2060,2062,2063,64],{},[22,2061,1536],{}," to that client and remove ",[22,2064,1231],{},[10,2066,1716,2067,64],{},[60,2068,2070],{"href":2069},"\u002Fextensions\u002Fkubb-labs\u002Fplugin-mcp\u002Foptions","MCP options",[14,2072,2074],{"id":2073},"verify-the-upgrade","Verify the upgrade",[10,2076,2077,2078,2081,2082,2085,2086,2089],{},"Run ",[22,2079,2080],{},"kubb generate",", review the changed files, and type-check your app. Most errors come from renamed imports, such as ",[22,2083,2084],{},"Status\u003Ccode>"," response names and ",[22,2087,2088],{},"SchemaType"," Zod types.",[14,2091,2093],{"id":2092},"v4-upgrade-edge-cases","Less common changes",[10,2095,2096],{},"Check the rows for your plugins.",[27,2098,2099,2109],{},[30,2100,2101],{},[33,2102,2103,2106],{},[36,2104,2105],{},"Area",[36,2107,2108],{},"Change",[43,2110,2111,2124,2135,2154,2165,2191,2205,2219,2230,2249],{},[33,2112,2113,2116],{},[48,2114,2115],{},"Output",[48,2117,2118,1981,2121,2123],{},[22,2119,2120],{},"format: 'auto'",[22,2122,180],{}," try the oxc tools first.",[33,2125,2126,2128],{},[48,2127,1399],{},[48,2129,2130,2131,2134],{},"The client's ",[22,2132,2133],{},"auth"," resolver follows the spec's security schemes.",[33,2136,2137,2139],{},[48,2138,1635],{},[48,2140,2141,2142,2145,2146,2149,2150,2153],{},"Open string unions keep suggestions with ",[22,2143,2144],{},"(string & {})",". Shared fields of a discriminated union move into a common intersection. JSDoc drops the format suffix from ",[22,2147,2148],{},"@type",", adds the spec's examples, and adds ",[22,2151,2152],{},"@type object"," for objects.",[33,2155,2156,2158],{},[48,2157,1724],{},[48,2159,2160,2161,2164],{},"Output uses chained Zod 4 calls, functional wrappers with ",[22,2162,2163],{},"mini: true",", and getters only for circular references.",[33,2166,2167,2169],{},[48,2168,1831],{},[48,2170,2171,2173,2174,2177,2178,108,2180,108,2182,108,2184,2000,2187,2190],{},[22,2172,551],{}," is ",[22,2175,2176],{},"'axios' | 'fetch' | 'client'",", detected when exactly one is registered. The trailing client config excludes ",[22,2179,426],{},[22,2181,1350],{},[22,2183,1389],{},[22,2185,2186],{},"headers",[22,2188,2189],{},"url",". Suspense hooks always run.",[33,2192,2193,2195],{},[48,2194,1896],{},[48,2196,2197,2198,2201,2202,64],{},"Parameter groups accept ",[22,2199,2200],{},"MaybeRefOrGetter",", unwrapped with ",[22,2203,2204],{},"toValue()",[33,2206,2207,2209],{},[48,2208,1975],{},[48,2210,2211,2212,2215,2216,2218],{},"Factories such as ",[22,2213,2214],{},"createPet"," keep their names and take a generic ",[22,2217,1869],{},", so overrides keep their types.",[33,2220,2221,2223],{},[48,2222,1992],{},[48,2224,2225,2226,2229],{},"A handler for an operation with a body accepts an ",[22,2227,2228],{},"HttpResponseResolver"," typed against that body.",[33,2231,2232,2234],{},[48,2233,2011],{},[48,2235,2236,2237,108,2239,108,2242,2000,2245,2248],{},"HTTP methods are uppercase. ",[22,2238,1536],{},[22,2240,2241],{},"exclude",[22,2243,2244],{},"include",[22,2246,2247],{},"override"," keep their shape. There is no validator option.",[33,2250,2251,2253],{},[48,2252,2049],{},[48,2254,2255,2256,2258,2259,2262,2263,64],{},"Handlers receive grouped ",[22,2257,1702],{}," plus the MCP ",[22,2260,2261],{},"ServerContext",", call the generated client operations, and read ",[22,2264,2265],{},"res.data",{"title":2267,"searchDepth":2268,"depth":2268,"links":2269},"",5,[2270,2272,2273,2278,2279,2280,2281,2282,2283,2284,2285,2286,2287,2288,2289,2290],{"id":16,"depth":2271,"text":17},2,{"id":117,"depth":2271,"text":118},{"id":304,"depth":2271,"text":305,"children":2274},[2275,2277],{"id":928,"depth":2276,"text":63},3,{"id":1040,"depth":2276,"text":1041},{"id":1153,"depth":2271,"text":1154},{"id":1398,"depth":2271,"text":1399},{"id":1634,"depth":2271,"text":1635},{"id":1723,"depth":2271,"text":1724},{"id":1830,"depth":2271,"text":1831},{"id":1895,"depth":2271,"text":1896},{"id":1910,"depth":2271,"text":1911},{"id":1974,"depth":2271,"text":1975},{"id":1991,"depth":2271,"text":1992},{"id":2010,"depth":2271,"text":2011},{"id":2048,"depth":2271,"text":2049},{"id":2073,"depth":2271,"text":2074},{"id":2092,"depth":2271,"text":2093},"Upgrade a Kubb v4 project to v5 with before and after tables for the config, the OpenAPI adapter, shared options, and each official plugin.","md",{"layout":2294,"title":5,"description":2291,"outline":2295,"order":2296,"navigation":2297},"doc",[2271,2276],4,{"title":2298,"icon":2299},"Upgrade to v5","i-iconoir-transition-up","Upgrade from v4 to v5",{"layout":2294,"outline":2302},[2271,2276],{"title":2298,"icon":2299},"\u002Fdocs\u002F5.x\u002Fmigrate\u002Ffrom-v4",{"title":5,"description":2291},{"loc":2304},"kubb-labs\u002Fkubb\u002Fdocs\u002F5.x\u002Fmigrate\u002Ffrom-v4.md","docs\u002F5.x\u002Fmigrate\u002Ffrom-v4","YSPVa6M03ovxAYuS-mMRnJYIvseqXZIQbFfnN8d2c9U",1795021320865]