[{"data":1,"prerenderedAt":2314,"buildId":2315},["ShallowReactive",2],{"page:\u002Fdocs\u002F5.x\u002Fmigrate\u002Ffrom-v4":3},{"id":4,"title":5,"body":6,"description":2295,"extension":2296,"frontmatter":2297,"heading":2304,"meta":2305,"navigation":2307,"order":2300,"path":2308,"seo":2309,"sitemap":2310,"source":2311,"stem":2312,"__hash__":2313},"docs\u002Fdocs\u002F5.x\u002Fmigrate\u002Ffrom-v4.md","Migrate Kubb v4 to v5 - Config and plugin changes",{"type":7,"value":8,"toc":2270},"minimark",[9,13,18,26,115,119,302,306,782,925,929,944,1038,1042,1107,1151,1155,1250,1257,1400,1404,1541,1564,1636,1640,1699,1718,1725,1729,1736,1826,1832,1836,1891,1897,1901,1912,1916,1926,1965,1976,1980,1993,1997,2012,2016,2044,2050,2054,2069,2075,2079,2094,2098,2101],[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,1223],{},[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,1219,64],{},"A custom plugin with ",[60,1220,1222],{"href":1221},"\u002Fdocs\u002F5.x\u002Freference\u002Fkit\u002Ftemplates","templates",[33,1224,1225,1236],{},[48,1226,1227,108,1230,108,1233],{},[22,1228,1229],{},"paramsType",[22,1231,1232],{},"pathParamsType",[22,1234,1235],{},"paramsCasing",[48,1237,1238,1239,1242,1243,1249],{},"One ",[22,1240,1241],{},"{ body, path, query, headers }"," object with the spec's names. For camelCase path params, set ",[60,1244,1246],{"href":1245},"\u002Fextensions\u002Fkubb-labs\u002Fadapter-oas\u002Foptions#pathparamscasing",[22,1247,1248],{},"pathParamsCasing: 'camelcase'"," on the adapter.",[10,1251,1252,1253,1256],{},"A group with a required parameter is required, and an unused group is typed ",[22,1254,1255],{},"never",". Update positional call sites:",[307,1258,1259,1324],{},[310,1260,1262],{"language":312,"filename":130,"code":1261,"class":314},"useGetPet(petId)\nuseFindPets({ status: 'available' })\nuseUpdatePet().mutate({ petId, data: pet })",[22,1263,1264,345,1278,345,1295],{"class":317},[319,1265,1266,1269,1272,1275],{"class":321,"style":322},[319,1267,1268],{"style":406},"useGetPet",[319,1270,1271],{"style":329},"(",[319,1273,1274],{"style":333},"petId",[319,1276,1277],{"style":329},")",[319,1279,1280,1283,1285,1288,1290,1293],{"class":321,"style":322},[319,1281,1282],{"style":406},"useFindPets",[319,1284,513],{"style":329},[319,1286,1287],{"style":329},"status",[319,1289,421],{"style":325},[319,1291,1292],{"style":343},"'available' ",[319,1294,524],{"style":329},[319,1296,1297,1300,1303,1305,1308,1310,1312,1314,1317,1319,1322],{"class":321,"style":322},[319,1298,1299],{"style":406},"useUpdatePet",[319,1301,1302],{"style":329},"()",[319,1304,64],{"style":325},[319,1306,1307],{"style":406},"mutate",[319,1309,513],{"style":329},[319,1311,1274],{"style":333},[319,1313,108],{"style":325},[319,1315,1316],{"style":329},"data",[319,1318,421],{"style":325},[319,1320,1321],{"style":333},"pet ",[319,1323,524],{"style":329},[310,1325,1327],{"language":312,"filename":41,"code":1326,"class":314},"useGetPet({ path: { petId } })\nuseFindPets({ query: { status: 'available' } })\nuseUpdatePet().mutate({ path: { petId }, body: pet })",[22,1328,1329,345,1346,345,1367],{"class":317},[319,1330,1331,1333,1335,1337,1339,1341,1344],{"class":321,"style":322},[319,1332,1268],{"style":406},[319,1334,513],{"style":329},[319,1336,426],{"style":329},[319,1338,421],{"style":325},[319,1340,330],{"style":329},[319,1342,1343],{"style":333},"petId ",[319,1345,736],{"style":329},[319,1347,1348,1350,1352,1355,1357,1359,1361,1363,1365],{"class":321,"style":322},[319,1349,1282],{"style":406},[319,1351,513],{"style":329},[319,1353,1354],{"style":329},"query",[319,1356,421],{"style":325},[319,1358,330],{"style":329},[319,1360,1287],{"style":329},[319,1362,421],{"style":325},[319,1364,1292],{"style":343},[319,1366,736],{"style":329},[319,1368,1369,1371,1373,1375,1377,1379,1381,1383,1385,1387,1389,1391,1394,1396,1398],{"class":321,"style":322},[319,1370,1299],{"style":406},[319,1372,1302],{"style":329},[319,1374,64],{"style":325},[319,1376,1307],{"style":406},[319,1378,513],{"style":329},[319,1380,426],{"style":329},[319,1382,421],{"style":325},[319,1384,330],{"style":329},[319,1386,1343],{"style":333},[319,1388,434],{"style":329},[319,1390,108],{"style":325},[319,1392,1393],{"style":329},"body",[319,1395,421],{"style":325},[319,1397,1321],{"style":333},[319,1399,524],{"style":329},[14,1401,1403],{"id":1402},"plugin-client","HTTP clients",[27,1405,1406,1414],{},[30,1407,1408],{},[33,1409,1410,1412],{},[36,1411,130],{},[36,1413,41],{},[43,1415,1416,1428,1440,1459,1475,1487,1499,1522],{},[33,1417,1418,1423],{},[48,1419,1420],{},[22,1421,1422],{},"pluginClient({ client: 'axios' })",[48,1424,1425],{},[22,1426,1427],{},"pluginAxios()",[33,1429,1430,1435],{},[48,1431,1432],{},[22,1433,1434],{},"pluginClient({ client: 'fetch' })",[48,1436,1437],{},[22,1438,1439],{},"pluginFetch()",[33,1441,1442,1450],{},[48,1443,1444,108,1447],{},[22,1445,1446],{},"clientType",[22,1448,1449],{},"wrapper",[48,1451,1452,1458],{},[60,1453,1455],{"href":1454},"\u002Fextensions\u002Fkubb-labs\u002Fplugin-axios\u002Foptions#sdk",[22,1456,1457],{},"sdk",", a class per tag by default. Leave it unset for the standalone functions query plugins use.",[33,1460,1461,1466],{},[48,1462,1463],{},[22,1464,1465],{},"dataReturnType",[48,1467,1468,1471,1472],{},[22,1469,1470],{},"returnType",", default ",[22,1473,1474],{},"'full'",[33,1476,1477,1482],{},[48,1478,1479],{},[22,1480,1481],{},"parser: 'zod'",[48,1483,1484],{},[22,1485,1486],{},"validator: 'zod'",[33,1488,1489,1494],{},[48,1490,1491],{},[22,1492,1493],{},"parser: 'client'",[48,1495,1496,1011],{},[22,1497,1498],{},"validator: false",[33,1500,1501,1515],{},[48,1502,1503,108,1506,108,1509,108,1512],{},[22,1504,1505],{},"operations",[22,1507,1508],{},"clientType: 'staticClass'",[22,1510,1511],{},"bundle",[22,1513,1514],{},"urlType",[48,1516,1517,1518,1521],{},"Removed. The client goes to ",[22,1519,1520],{},".kubb\u002Fclient.ts",". URL-only helpers need a custom plugin.",[33,1523,1524,1530],{},[48,1525,1526,1529],{},[22,1527,1528],{},"importPath"," to your own client module",[48,1531,1532,1535,1536,76,1538,64],{},[22,1533,1534],{},"pluginClient({ importPath })",", without ",[22,1537,1457],{},[22,1539,1540],{},"baseURL",[1108,1542,1543,1557],{},[1111,1544,1545,1546,1548,1549,1552,1553,1556],{},"Calls return the full result object. Read ",[22,1547,1316],{},", call ",[22,1550,1551],{},".unwrap()",", or set ",[22,1554,1555],{},"returnType: 'data'"," for the body alone.",[1111,1558,1559,1560,1563],{},"To inspect an error without throwing, pass ",[22,1561,1562],{},"throwOnError: false"," on the call.",[307,1565,1566,1594],{},[310,1567,1569],{"language":312,"filename":130,"code":1568,"class":314},"const pet = await getPet(1)",[22,1570,1571],{"class":317},[319,1572,1573,1576,1578,1581,1584,1587,1589,1592],{"class":321,"style":322},[319,1574,1575],{"style":325},"const ",[319,1577,1321],{"style":333},[319,1579,1580],{"style":325},"= ",[319,1582,1583],{"style":325},"await ",[319,1585,1586],{"style":406},"getPet",[319,1588,1271],{"style":329},[319,1590,1591],{"style":329},"1",[319,1593,1277],{"style":329},[310,1595,1597],{"language":312,"filename":41,"code":1596,"class":314},"const { data: pet } = await getPet({ path: { petId: 1 } })",[22,1598,1599],{"class":317},[319,1600,1601,1603,1605,1607,1609,1611,1613,1615,1617,1619,1621,1623,1625,1627,1629,1631,1634],{"class":321,"style":322},[319,1602,1575],{"style":325},[319,1604,330],{"style":329},[319,1606,1316],{"style":329},[319,1608,421],{"style":325},[319,1610,1321],{"style":333},[319,1612,337],{"style":329},[319,1614,1580],{"style":325},[319,1616,1583],{"style":325},[319,1618,1586],{"style":406},[319,1620,513],{"style":329},[319,1622,426],{"style":329},[319,1624,421],{"style":325},[319,1626,330],{"style":329},[319,1628,1274],{"style":329},[319,1630,421],{"style":325},[319,1632,1633],{"style":329},"1 ",[319,1635,736],{"style":329},[14,1637,1639],{"id":1638},"plugin-ts","TypeScript",[27,1641,1642,1650],{},[30,1643,1644],{},[33,1645,1646,1648],{},[36,1647,130],{},[36,1649,41],{},[43,1651,1652,1663,1675,1687],{},[33,1653,1654,1658],{},[48,1655,1656],{},[22,1657,534],{},[48,1659,1660],{},[22,1661,1662],{},"enum.type",[33,1664,1665,1670],{},[48,1666,1667],{},[22,1668,1669],{},"enumTypeSuffix",[48,1671,1672],{},[22,1673,1674],{},"enum.typeSuffix",[33,1676,1677,1682],{},[48,1678,1679],{},[22,1680,1681],{},"enumKeyCasing",[48,1683,1684],{},[22,1685,1686],{},"enum.keyCasing",[33,1688,1689,1694],{},[48,1690,1691],{},[22,1692,1693],{},"enumType: 'asPascalConst'",[48,1695,1696],{},[22,1697,1698],{},"enum: { type: 'asConst', constCasing: 'pascalCase' }",[1108,1700,1701,1711],{},[1111,1702,1703,1704,1707,1708,64],{},"Request input types are named ",[22,1705,1706],{},"*Options"," and keep spec names such as ",[22,1709,1710],{},"pet_id",[1111,1712,1713,1714,1717],{},"Enums default to a const-asserted object plus a ",[22,1715,1716],{},"*Key"," type union. Inline enum names are scoped to their operation.",[10,1719,1720,1721,64],{},"See ",[60,1722,1724],{"href":1723},"\u002Fextensions\u002Fkubb-labs\u002Fplugin-ts\u002Foptions","TypeScript options",[14,1726,1728],{"id":1727},"plugin-zod","Zod",[10,1730,1731,1732,1735],{},"Upgrade ",[22,1733,1734],{},"zod"," to v4.",[27,1737,1738,1746],{},[30,1739,1740],{},[33,1741,1742,1744],{},[36,1743,130],{},[36,1745,41],{},[43,1747,1748,1758,1776,1789,1805,1814],{},[33,1749,1750,1755],{},[48,1751,1752],{},[22,1753,1754],{},"version",[48,1756,1757],{},"Removed. v5 prints Zod 4.",[33,1759,1760,1765],{},[48,1761,1762],{},[22,1763,1764],{},"typed: true",[48,1766,1767,1768,1771,1772,1775],{},"Removed. Set ",[22,1769,1770],{},"inferred: true"," to export ",[22,1773,1774],{},"z.infer"," type aliases.",[33,1777,1778,1784],{},[48,1779,1780,1781],{},"Inferred alias ",[22,1782,1783],{},"PetSchema",[48,1785,1786],{},[22,1787,1788],{},"PetSchemaType",[33,1790,1791,1796],{},[48,1792,1793],{},[22,1794,1795],{},"wrapOutput",[48,1797,1798,1799,1801,1802,64],{},"A ",[22,1800,1207],{}," override that decorates ",[22,1803,1804],{},"this.base(node)",[33,1806,1807,1811],{},[48,1808,1809],{},[22,1810,1505],{},[48,1812,1813],{},"Removed. Its operation and path maps need a custom plugin.",[33,1815,1816,1821],{},[48,1817,1818],{},[22,1819,1820],{},"listPets200Schema",[48,1822,1823],{},[22,1824,1825],{},"listPetsStatus200Schema",[10,1827,1720,1828,64],{},[60,1829,1831],{"href":1830},"\u002Fextensions\u002Fkubb-labs\u002Fplugin-zod\u002Foptions","Zod options",[14,1833,1835],{"id":1834},"plugin-react-query","React Query",[1108,1837,1838,1843,1852,1862,1869,1878],{},[1111,1839,1840,1841,64],{},"Register a client plugin: Axios, Fetch, or ",[22,1842,71],{},[1111,1844,1845,1846,1848,1849,64],{},"Move ",[22,1847,1540],{}," and validation to the client plugin, and remove ",[22,1850,1851],{},"parser",[1111,1853,1854,1855,1857,1858,1861],{},"Set ",[22,1856,241],{}," to keep the ",[22,1859,1860],{},"use*"," hooks.",[1111,1863,1864,1865,1868],{},"Replace ",[22,1866,1867],{},"*MutationKey"," type imports with the runtime key helper.",[1111,1870,1871,1874,1875,64],{},[22,1872,1873],{},"TData"," holds only 2xx responses, and errors use ",[22,1876,1877],{},"TError",[1111,1879,1880,1881,76,1884,1887,1888,1890],{},"To defer a request, set TanStack Query's ",[22,1882,1883],{},"enabled",[22,1885,1886],{},"skipToken",". The generated ",[22,1889,1883],{}," guard is gone.",[10,1892,1720,1893,64],{},[60,1894,1896],{"href":1895},"\u002Fextensions\u002Fkubb-labs\u002Fplugin-react-query\u002Foptions","React Query options",[14,1898,1900],{"id":1899},"plugin-vue-query","Vue Query",[10,1902,1903,1904,1907,1908,64],{},"Apply the ",[60,1905,1835],{"href":1906},"#plugin-react-query"," changes. See ",[60,1909,1911],{"href":1910},"\u002Fextensions\u002Fkubb-labs\u002Fplugin-vue-query\u002Foptions","Vue Query options",[14,1913,1915],{"id":1914},"plugin-swr","SWR",[10,1917,1918,1919,1921,1922,1925],{},"Apply the client and validation changes from ",[60,1920,1835],{"href":1906},", and remove ",[22,1923,1924],{},"mutation.paramsToTrigger",":",[310,1927,1930],{"language":312,"filename":1928,"code":1929,"class":314},"src\u002Fapp.ts","useUpdatePet().trigger({ path: { petId }, body: pet })",[22,1931,1932],{"class":317},[319,1933,1934,1936,1938,1940,1943,1945,1947,1949,1951,1953,1955,1957,1959,1961,1963],{"class":321,"style":322},[319,1935,1299],{"style":406},[319,1937,1302],{"style":329},[319,1939,64],{"style":325},[319,1941,1942],{"style":406},"trigger",[319,1944,513],{"style":329},[319,1946,426],{"style":329},[319,1948,421],{"style":325},[319,1950,330],{"style":329},[319,1952,1343],{"style":333},[319,1954,434],{"style":329},[319,1956,108],{"style":325},[319,1958,1393],{"style":329},[319,1960,421],{"style":325},[319,1962,1321],{"style":333},[319,1964,524],{"style":329},[10,1966,1967,1968,1971,1972,64],{},"To skip a request, set ",[22,1969,1970],{},"shouldFetch: false",". The parameter-presence guard is gone. See ",[60,1973,1975],{"href":1974},"\u002Fextensions\u002Fkubb-labs\u002Fplugin-swr\u002Foptions","SWR options",[14,1977,1979],{"id":1978},"plugin-faker","Faker",[10,1981,1982,1983,1985,1986,1988,1989,64],{},"Remove ",[22,1984,1235],{}," and ",[22,1987,1201],{},". Use macros or printers instead. See ",[60,1990,1992],{"href":1991},"\u002Fextensions\u002Fkubb-labs\u002Fplugin-faker\u002Foptions","Faker options",[14,1994,1996],{"id":1995},"plugin-msw","MSW",[10,1998,1999,108,2001,2004,2005,2007,2008,64],{},[22,2000,1851],{},[22,2002,2003],{},"handlers",", and ",[22,2006,1540],{}," keep their v4 behavior. See ",[60,2009,2011],{"href":2010},"\u002Fextensions\u002Fkubb-labs\u002Fplugin-msw\u002Foptions","MSW options",[14,2013,2015],{"id":2014},"plugin-cypress","Cypress",[1108,2017,2018,2027,2035],{},[1111,2019,2020,2021,2023,2024,64],{},"Request helpers take grouped ",[22,2022,1706],{},", then the unchanged ",[22,2025,2026],{},"Partial\u003CCypress.RequestOptions>",[1111,2028,1982,2029,2031,2032,64],{},[22,2030,1465],{},". Helpers yield the body as ",[22,2033,2034],{},"Cypress.Chainable\u003CT>",[1111,2036,2037,2038,1985,2040,2043],{},"Imports use ",[22,2039,1706],{},[22,2041,2042],{},"*Response"," names.",[10,2045,1720,2046,64],{},[60,2047,2049],{"href":2048},"\u002Fextensions\u002Fkubb-labs\u002Fplugin-cypress\u002Foptions","Cypress options",[14,2051,2053],{"id":2052},"plugin-mcp","MCP",[1108,2055,2056,2062],{},[1111,2057,2058,2059,2061],{},"Register TypeScript, Zod, and an Axios or Fetch client, which ",[22,2060,551],{}," selects.",[1111,2063,1845,2064,2066,2067,64],{},[22,2065,1540],{}," to that client and remove ",[22,2068,1235],{},[10,2070,1720,2071,64],{},[60,2072,2074],{"href":2073},"\u002Fextensions\u002Fkubb-labs\u002Fplugin-mcp\u002Foptions","MCP options",[14,2076,2078],{"id":2077},"verify-the-upgrade","Verify the upgrade",[10,2080,2081,2082,2085,2086,2089,2090,2093],{},"Run ",[22,2083,2084],{},"kubb generate",", review the changed files, and type-check your app. Most errors come from renamed imports, such as ",[22,2087,2088],{},"Status\u003Ccode>"," response names and ",[22,2091,2092],{},"SchemaType"," Zod types.",[14,2095,2097],{"id":2096},"v4-upgrade-edge-cases","Less common changes",[10,2099,2100],{},"Check the rows for your plugins.",[27,2102,2103,2113],{},[30,2104,2105],{},[33,2106,2107,2110],{},[36,2108,2109],{},"Area",[36,2111,2112],{},"Change",[43,2114,2115,2128,2139,2158,2169,2195,2209,2223,2234,2253],{},[33,2116,2117,2120],{},[48,2118,2119],{},"Output",[48,2121,2122,1985,2125,2127],{},[22,2123,2124],{},"format: 'auto'",[22,2126,180],{}," try the oxc tools first.",[33,2129,2130,2132],{},[48,2131,1403],{},[48,2133,2134,2135,2138],{},"The client's ",[22,2136,2137],{},"auth"," resolver follows the spec's security schemes.",[33,2140,2141,2143],{},[48,2142,1639],{},[48,2144,2145,2146,2149,2150,2153,2154,2157],{},"Open string unions keep suggestions with ",[22,2147,2148],{},"(string & {})",". Shared fields of a discriminated union move into a common intersection. JSDoc drops the format suffix from ",[22,2151,2152],{},"@type",", adds the spec's examples, and adds ",[22,2155,2156],{},"@type object"," for objects.",[33,2159,2160,2162],{},[48,2161,1728],{},[48,2163,2164,2165,2168],{},"Output uses chained Zod 4 calls, functional wrappers with ",[22,2166,2167],{},"mini: true",", and getters only for circular references.",[33,2170,2171,2173],{},[48,2172,1835],{},[48,2174,2175,2177,2178,2181,2182,108,2184,108,2186,108,2188,2004,2191,2194],{},[22,2176,551],{}," is ",[22,2179,2180],{},"'axios' | 'fetch' | 'client'",", detected when exactly one is registered. The trailing client config excludes ",[22,2183,426],{},[22,2185,1354],{},[22,2187,1393],{},[22,2189,2190],{},"headers",[22,2192,2193],{},"url",". Suspense hooks always run.",[33,2196,2197,2199],{},[48,2198,1900],{},[48,2200,2201,2202,2205,2206,64],{},"Parameter groups accept ",[22,2203,2204],{},"MaybeRefOrGetter",", unwrapped with ",[22,2207,2208],{},"toValue()",[33,2210,2211,2213],{},[48,2212,1979],{},[48,2214,2215,2216,2219,2220,2222],{},"Factories such as ",[22,2217,2218],{},"createPet"," keep their names and take a generic ",[22,2221,1873],{},", so overrides keep their types.",[33,2224,2225,2227],{},[48,2226,1996],{},[48,2228,2229,2230,2233],{},"A handler for an operation with a body accepts an ",[22,2231,2232],{},"HttpResponseResolver"," typed against that body.",[33,2235,2236,2238],{},[48,2237,2015],{},[48,2239,2240,2241,108,2243,108,2246,2004,2249,2252],{},"HTTP methods are uppercase. ",[22,2242,1540],{},[22,2244,2245],{},"exclude",[22,2247,2248],{},"include",[22,2250,2251],{},"override"," keep their shape. There is no validator option.",[33,2254,2255,2257],{},[48,2256,2053],{},[48,2258,2259,2260,2262,2263,2266,2267,64],{},"Handlers receive grouped ",[22,2261,1706],{}," plus the MCP ",[22,2264,2265],{},"ServerContext",", call the generated client operations, and read ",[22,2268,2269],{},"res.data",{"title":2271,"searchDepth":2272,"depth":2272,"links":2273},"",5,[2274,2276,2277,2282,2283,2284,2285,2286,2287,2288,2289,2290,2291,2292,2293,2294],{"id":16,"depth":2275,"text":17},2,{"id":117,"depth":2275,"text":118},{"id":304,"depth":2275,"text":305,"children":2278},[2279,2281],{"id":928,"depth":2280,"text":63},3,{"id":1040,"depth":2280,"text":1041},{"id":1153,"depth":2275,"text":1154},{"id":1402,"depth":2275,"text":1403},{"id":1638,"depth":2275,"text":1639},{"id":1727,"depth":2275,"text":1728},{"id":1834,"depth":2275,"text":1835},{"id":1899,"depth":2275,"text":1900},{"id":1914,"depth":2275,"text":1915},{"id":1978,"depth":2275,"text":1979},{"id":1995,"depth":2275,"text":1996},{"id":2014,"depth":2275,"text":2015},{"id":2052,"depth":2275,"text":2053},{"id":2077,"depth":2275,"text":2078},{"id":2096,"depth":2275,"text":2097},"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":2298,"title":5,"description":2295,"outline":2299,"order":2300,"navigation":2301},"doc",[2275,2280],4,{"title":2302,"icon":2303},"Upgrade to v5","i-iconoir-transition-up","Upgrade from v4 to v5",{"layout":2298,"outline":2306},[2275,2280],{"title":2302,"icon":2303},"\u002Fdocs\u002F5.x\u002Fmigrate\u002Ffrom-v4",{"title":5,"description":2295},{"loc":2308},"kubb-labs\u002Fkubb\u002Fdocs\u002F5.x\u002Fmigrate\u002Ffrom-v4.md","docs\u002F5.x\u002Fmigrate\u002Ffrom-v4","SFEejhv3xtj3YAwCUsFAxGSu5Sp3ijOna855g7T9kKE",1795727674855,"1b64b1eb-29b7-4f90-ad41-6f24721e1669"]