[{"data":1,"prerenderedAt":2140,"buildId":2141},["ShallowReactive",2],{"page:\u002Fextensions\u002Fkubb-labs\u002Fplugin-zod\u002Foptions":3},{"id":4,"frontmatter":5,"title":6,"heading":6,"body":7,"path":2139,"source":4},"extensions\u002Fkubb-labs\u002Fplugin-zod\u002Foptions.md",{},"Options",{"type":8,"value":9,"toc":2118},"minimark",[10,25,30,383,387,391,396,436,455,457,463,500,533,618,644,646,653,690,713,724,727,731,768,783,786,799,836,848,851,860,897,911,913,919,956,965,976,978,992,1029,1097,1100,1111,1148,1173,1347,1349,1374,1403,1512,1523,1527,1535,1546,2100,2104],[11,12,13,14,18,19,24],"p",{},"Pass these options to ",[15,16,17],"code",{},"pluginZod()",". Shared options link to ",[20,21,23],"a",{"href":22},"https:\u002F\u002Fkubb.dev\u002Fdocs\u002F5.x\u002Freference\u002Fplugin-options","Shared plugin options",".",[26,27,29],"h2",{"id":28},"options-overview","Options overview",[31,32,33,49],"table",{},[34,35,36],"thead",{},[37,38,39,43,46],"tr",{},[40,41,42],"th",{},"Option",[40,44,45],{},"Purpose",[40,47,48],{},"Default",[50,51,52,71,87,117,135,152,173,195,217,238,254,279,294,309,327,344,366],"tbody",{},[37,53,54,63,66],{},[55,56,57],"td",{},[20,58,60],{"href":59},"https:\u002F\u002Fkubb.dev\u002Fdocs\u002F5.x\u002Freference\u002Fplugin-options#output",[15,61,62],{},"output",[55,64,65],{},"Where files are written.",[55,67,68],{},[15,69,70],{},"{ path: 'zod', barrel: { type: 'named' } }",[37,72,73,81,84],{},[55,74,75],{},[20,76,78],{"href":77},"https:\u002F\u002Fkubb.dev\u002Fdocs\u002F5.x\u002Freference\u002Fplugin-options#group",[15,79,80],{},"group",[55,82,83],{},"Split output by tag or path.",[55,85,86],{},"None",[37,88,89,97,104],{},[55,90,91],{},[20,92,94],{"href":93},"#importpath",[15,95,96],{},"importPath",[55,98,99,100,103],{},"Module the generated files import ",[15,101,102],{},"z"," from.",[55,105,106,109,110,113,114],{},[15,107,108],{},"'zod'",", or ",[15,111,112],{},"'zod\u002Fmini'"," with ",[15,115,116],{},"mini",[37,118,119,127,130],{},[55,120,121],{},[20,122,124],{"href":123},"#inferred",[15,125,126],{},"inferred",[55,128,129],{},"Export a type next to each schema.",[55,131,132],{},[15,133,134],{},"false",[37,136,137,145,148],{},[55,138,139],{},[20,140,142],{"href":141},"#coercion",[15,143,144],{},"coercion",[55,146,147],{},"Coerce input before validation.",[55,149,150],{},[15,151,134],{},[37,153,154,162,168],{},[55,155,156],{},[20,157,159],{"href":158},"#guidtype",[15,160,161],{},"guidType",[55,163,164,165,24],{},"Validator for ",[15,166,167],{},"format: uuid",[55,169,170],{},[15,171,172],{},"'uuid'",[37,174,175,183,190],{},[55,176,177],{},[20,178,180],{"href":179},"#regextype",[15,181,182],{},"regexType",[55,184,185,186,189],{},"How an OpenAPI ",[15,187,188],{},"pattern"," is written.",[55,191,192],{},[15,193,194],{},"'literal'",[37,196,197,205,212],{},[55,198,199],{},[20,200,202],{"href":201},"#oneoftype",[15,203,204],{},"oneOfType",[55,206,207,208,211],{},"How a ",[15,209,210],{},"oneOf"," is validated.",[55,213,214],{},[15,215,216],{},"'union'",[37,218,219,227,234],{},[55,220,221],{},[20,222,224],{"href":223},"#compile",[15,225,226],{},"compile",[55,228,229,230,233],{},"Wrap schemas in ",[15,231,232],{},"z.compile"," for fast-path validation.",[55,235,236],{},[15,237,134],{},[37,239,240,247,250],{},[55,241,242],{},[20,243,245],{"href":244},"#mini",[15,246,116],{},[55,248,249],{},"Generate Zod Mini schemas.",[55,251,252],{},[15,253,134],{},[37,255,256,264,275],{},[55,257,258],{},[20,259,261],{"href":260},"#typeguards",[15,262,263],{},"typeGuards",[55,265,266,267,270,271,274],{},"Generate ",[15,268,269],{},"is*"," type guards and ",[15,272,273],{},"assert*"," assertions.",[55,276,277],{},[15,278,134],{},[37,280,281,289,292],{},[55,282,283],{},[20,284,286],{"href":285},"#printer",[15,287,288],{},"printer",[55,290,291],{},"Replace the handler for a schema type.",[55,293,86],{},[37,295,296,304,307],{},[55,297,298],{},[20,299,301],{"href":300},"https:\u002F\u002Fkubb.dev\u002Fdocs\u002F5.x\u002Freference\u002Fplugin-options#include",[15,302,303],{},"include",[55,305,306],{},"Keep only operations and schemas that match.",[55,308,86],{},[37,310,311,319,322],{},[55,312,313],{},[20,314,316],{"href":315},"https:\u002F\u002Fkubb.dev\u002Fdocs\u002F5.x\u002Freference\u002Fplugin-options#exclude",[15,317,318],{},"exclude",[55,320,321],{},"Skip operations and schemas that match.",[55,323,324],{},[15,325,326],{},"[]",[37,328,329,337,340],{},[55,330,331],{},[20,332,334],{"href":333},"https:\u002F\u002Fkubb.dev\u002Fdocs\u002F5.x\u002Freference\u002Fplugin-options#override",[15,335,336],{},"override",[55,338,339],{},"Apply different options per pattern.",[55,341,342],{},[15,343,326],{},[37,345,346,354,361],{},[55,347,348],{},[20,349,351],{"href":350},"https:\u002F\u002Fkubb.dev\u002Fdocs\u002F5.x\u002Freference\u002Fplugin-options#resolver",[15,352,353],{},"resolver",[55,355,356,357,24],{},"Customize generated names and file paths. See ",[20,358,360],{"href":359},"#resolver-members","resolver members",[55,362,363],{},[15,364,365],{},"resolverZod",[37,367,368,376,379],{},[55,369,370],{},[20,371,373],{"href":372},"https:\u002F\u002Fkubb.dev\u002Fdocs\u002F5.x\u002Freference\u002Fplugin-options#macros",[15,374,375],{},"macros",[55,377,378],{},"Rewrite AST nodes before printing.",[55,380,381],{},[15,382,326],{},[26,384,386],{"id":385},"option-details","Option details",[388,389,96],"h3",{"id":390},"importpath",[11,392,99,393,395],{},[15,394,102],{}," from, such as your own module that re-exports Zod.",[31,397,398,406],{},[34,399,400],{},[37,401,402,404],{},[40,403],{},[40,405],{},[50,407,408,418,427],{},[37,409,410,413],{},[55,411,412],{},"Type",[55,414,415],{},[15,416,417],{},"'zod' | 'zod\u002Fmini' | string",[37,419,420,423],{},[55,421,422],{},"Required",[55,424,425],{},[15,426,134],{},[37,428,429,431],{},[55,430,48],{},[55,432,433],{},[15,434,435],{},"mini ? 'zod\u002Fmini' : 'zod'",[11,437,438,440,441,443,444,447,448,451,452,454],{},[15,439,108],{}," and ",[15,442,112],{}," are imported as ",[15,445,446],{},"import * as z",". Any other module is imported as ",[15,449,450],{},"import { z }",", so export ",[15,453,102],{}," by name.",[388,456,126],{"id":126},[11,458,459,460,24],{},"Exports a type next to each schema, so you do not need ",[15,461,462],{},"@kubb\u002Fplugin-ts",[31,464,465,473],{},[34,466,467],{},[37,468,469,471],{},[40,470],{},[40,472],{},[50,474,475,484,492],{},[37,476,477,479],{},[55,478,412],{},[55,480,481],{},[15,482,483],{},"boolean | 'codec' | 'direction'",[37,485,486,488],{},[55,487,422],{},[55,489,490],{},[15,491,134],{},[37,493,494,496],{},[55,495,48],{},[55,497,498],{},[15,499,134],{},[501,502,503,512,527],"field-group",{},[504,505,507,508,511],"field",{"name":506},"true","Writes ",[15,509,510],{},"z.infer\u003Ctypeof schema>"," for every schema.",[504,513,507,515,518,519,522,523,24],{"name":514},"'codec'",[15,516,517],{},"z.input"," for request schemas and ",[15,520,521],{},"z.output"," for response schemas, for codecs. See ",[20,524,526],{"href":525},"https:\u002F\u002Fkubb.dev\u002Fextensions\u002Fkubb-labs\u002Fplugin-zod\u002Fguides\u002Finferred-types#type-codecs-on-each-side","Type codecs on each side",[504,528,530,531,24],{"name":529},"'direction'","Deprecated name for ",[15,532,514],{},[534,535,536,585],"code-group",{},[537,538,542],"pre",{"language":539,"filename":506,"code":540,"class":541},"typescript","export type PetSchemaType = z.infer\u003Ctypeof petSchema>","highlights",[15,543,545],{"class":544},"language-typescript",[546,547,550,554,557,561,564,567,569,573,576,579,582],"span",{"class":548,"style":549},"line","display: inline",[546,551,553],{"style":552},"color:#d73a49;--hls-dark:#f97583","export ",[546,555,556],{"style":552},"type ",[546,558,560],{"style":559},"color:#6f42c1;--hls-dark:#b392f0","PetSchemaType ",[546,562,563],{"style":552},"= ",[546,565,102],{"style":566},"color:#24292e;--hls-dark:#e1e4e8",[546,568,24],{"style":552},[546,570,572],{"style":571},"color:#005cc5;--hls-dark:#79b8ff","infer",[546,574,575],{"style":552},"\u003C",[546,577,578],{"style":552},"typeof ",[546,580,581],{"style":566},"petSchema",[546,583,584],{"style":552},">",[537,586,589],{"language":539,"filename":587,"code":588,"class":541},"'codec' (request)","export type PutEventBodySchemaType = z.input\u003Ctypeof putEventBodySchema>",[15,590,591],{"class":544},[546,592,593,595,597,600,602,604,606,609,611,613,616],{"class":548,"style":549},[546,594,553],{"style":552},[546,596,556],{"style":552},[546,598,599],{"style":559},"PutEventBodySchemaType ",[546,601,563],{"style":552},[546,603,102],{"style":566},[546,605,24],{"style":552},[546,607,608],{"style":571},"input",[546,610,575],{"style":552},[546,612,578],{"style":552},[546,614,615],{"style":566},"putEventBodySchema",[546,617,584],{"style":552},[619,620,622,623,625,626,629,630,636,637,643],"blockquote",{"as":621},"warning","With ",[15,624,514],{},", set ",[15,627,628],{},"validator: { request: 'zod', params: 'zod' }"," in ",[20,631,633],{"href":632},"https:\u002F\u002Fkubb.dev\u002Fextensions\u002Fkubb-labs\u002Fplugin-fetch\u002Foptions#validator",[15,634,635],{},"@kubb\u002Fplugin-fetch"," or ",[20,638,640],{"href":639},"https:\u002F\u002Fkubb.dev\u002Fextensions\u002Fkubb-labs\u002Fplugin-axios\u002Foptions#validator",[15,641,642],{},"@kubb\u002Fplugin-axios",", or the client sends the domain value unencoded.",[388,645,144],{"id":144},[11,647,648,649,652],{},"Wraps schemas in ",[15,650,651],{},"z.coerce"," to convert input, such as form data and query params, before validation.",[31,654,655,663],{},[34,656,657],{},[37,658,659,661],{},[40,660],{},[40,662],{},[50,664,665,674,682],{},[37,666,667,669],{},[55,668,412],{},[55,670,671],{},[15,672,673],{},"boolean | { dates?: boolean, strings?: boolean, numbers?: boolean }",[37,675,676,678],{},[55,677,422],{},[55,679,680],{},[15,681,134],{},[37,683,684,686],{},[55,685,48],{},[55,687,688],{},[15,689,134],{},[501,691,692,706,709],{},[504,693,694,695,698,699,702,703,24],{"name":134},"No coercion, except ",[15,696,697],{},"format: int64"," fields, which use ",[15,700,701],{},"z.coerce.bigint().pipe(z.int64())"," with the adapter's default ",[15,704,705],{},"integerType: 'bigint'",[504,707,708],{"name":506},"Coerces strings, numbers, and dates.",[504,710,712],{"name":711},"{ dates?, strings?, numbers? }","Coerces only the primitives you pick.",[11,714,715,716,719,720,24],{},"Coerced fields lose some format checks, such as ",[15,717,718],{},"jwt",". See ",[20,721,723],{"href":722},"https:\u002F\u002Fkubb.dev\u002Fextensions\u002Fkubb-labs\u002Fplugin-zod\u002Fguides\u002Fcoercion","Coerce input with Zod",[388,725,161],{"id":726},"guidtype",[11,728,164,729,24],{},[15,730,167],{},[31,732,733,741],{},[34,734,735],{},[37,736,737,739],{},[40,738],{},[40,740],{},[50,742,743,752,760],{},[37,744,745,747],{},[55,746,412],{},[55,748,749],{},[15,750,751],{},"'uuid' | 'guid'",[37,753,754,756],{},[55,755,422],{},[55,757,758],{},[15,759,134],{},[37,761,762,764],{},[55,763,48],{},[55,765,766],{},[15,767,172],{},[501,769,770,776],{},[504,771,507,772,775],{"name":172},[15,773,774],{},"z.uuid()",", for a standard RFC 4122 UUID.",[504,777,507,779,782],{"name":778},"'guid'",[15,780,781],{},"z.guid()",", which also accepts Microsoft-style GUIDs.",[388,784,182],{"id":785},"regextype",[11,787,185,788,790,791,794,795,798],{},[15,789,188],{}," is written inside ",[15,792,793],{},".regex(...)",". Use ",[15,796,797],{},"'constructor'"," when a regex literal breaks your build or you need a string pattern.",[31,800,801,809],{},[34,802,803],{},[37,804,805,807],{},[40,806],{},[40,808],{},[50,810,811,820,828],{},[37,812,813,815],{},[55,814,412],{},[55,816,817],{},[15,818,819],{},"'literal' | 'constructor'",[37,821,822,824],{},[55,823,422],{},[55,825,826],{},[15,827,134],{},[37,829,830,832],{},[55,831,48],{},[55,833,834],{},[15,835,194],{},[501,837,838,843],{},[504,839,507,840,24],{"name":194},[15,841,842],{},".regex(\u002F^[a-z]+$\u002F)",[504,844,507,845,24],{"name":797},[15,846,847],{},".regex(new RegExp(\"^[a-z]+$\"))",[388,849,204],{"id":850},"oneoftype",[11,852,207,853,855,856,859],{},[15,854,210],{}," without a discriminator is validated. Use ",[15,857,858],{},"'xor'"," when values may carry extra keys.",[31,861,862,870],{},[34,863,864],{},[37,865,866,868],{},[40,867],{},[40,869],{},[50,871,872,881,889],{},[37,873,874,876],{},[55,875,412],{},[55,877,878],{},[15,879,880],{},"'union' | 'xor'",[37,882,883,885],{},[55,884,422],{},[55,886,887],{},[15,888,134],{},[37,890,891,893],{},[55,892,48],{},[55,894,895],{},[15,896,216],{},[501,898,899,905],{},[504,900,507,901,904],{"name":216},[15,902,903],{},"z.union([...])"," with strict object members, so extra keys fail, even keys the spec allows.",[504,906,507,907,910],{"name":858},[15,908,909],{},"z.xor([...])",", which passes only when exactly one member matches. Needs Zod 4.2 or later.",[388,912,226],{"id":226},[11,914,648,915,918],{},[15,916,917],{},"z.compile(...)",", which generates validation code instead of interpreting the schema on each call. Needs Zod 4.5 or later.",[31,920,921,929],{},[34,922,923],{},[37,924,925,927],{},[40,926],{},[40,928],{},[50,930,931,940,948],{},[37,932,933,935],{},[55,934,412],{},[55,936,937],{},[15,938,939],{},"boolean | { strict?: boolean }",[37,941,942,944],{},[55,943,422],{},[55,945,946],{},[15,947,134],{},[37,949,950,952],{},[55,951,48],{},[55,953,954],{},[15,955,134],{},[501,957,958,961],{},[504,959,960],{"name":506},"Compiles schemas. Parts that cannot compile fall back to the interpreter.",[504,962,964],{"name":963},"{ strict: true }","Zod throws when a part cannot be compiled, except in schemas Kubb leaves uncompiled.",[11,966,967,968,971,972,24],{},"Circular schemas and coerced fields, ",[15,969,970],{},"int64"," included, stay on the interpreter. See ",[20,973,975],{"href":974},"https:\u002F\u002Fkubb.dev\u002Fextensions\u002Fkubb-labs\u002Fplugin-zod\u002Fguides\u002Fcompiled-schemas","Compile Zod schemas",[388,977,116],{"id":116},[11,979,980,981,985,986,988,989,991],{},"Generates ",[20,982,984],{"href":983},"https:\u002F\u002Fzod.dev\u002Fpackages\u002Fmini","Zod Mini"," schemas, which use functions instead of method chains so bundlers can drop unused validators. It sets the ",[15,987,96],{}," default to ",[15,990,112],{},". In beta.",[31,993,994,1002],{},[34,995,996],{},[37,997,998,1000],{},[40,999],{},[40,1001],{},[50,1003,1004,1013,1021],{},[37,1005,1006,1008],{},[55,1007,412],{},[55,1009,1010],{},[15,1011,1012],{},"boolean",[37,1014,1015,1017],{},[55,1016,422],{},[55,1018,1019],{},[15,1020,134],{},[37,1022,1023,1025],{},[55,1024,48],{},[55,1026,1027],{},[15,1028,134],{},[534,1030,1031,1065],{},[537,1032,1035],{"language":539,"filename":1033,"code":1034,"class":541},"mini: false","status: z.string().optional(),",[15,1036,1037],{"class":544},[546,1038,1039,1042,1045,1047,1049,1052,1055,1057,1060,1062],{"class":548,"style":549},[546,1040,1041],{"style":566},"status",[546,1043,1044],{"style":552},": ",[546,1046,102],{"style":566},[546,1048,24],{"style":552},[546,1050,1051],{"style":559},"string",[546,1053,1054],{"style":571},"()",[546,1056,24],{"style":552},[546,1058,1059],{"style":559},"optional",[546,1061,1054],{"style":571},[546,1063,1064],{"style":552},",",[537,1066,1069],{"language":539,"filename":1067,"code":1068,"class":541},"mini: true","status: z.optional(z.string()),",[15,1070,1071],{"class":544},[546,1072,1073,1075,1077,1079,1081,1083,1086,1088,1090,1092,1095],{"class":548,"style":549},[546,1074,1041],{"style":566},[546,1076,1044],{"style":552},[546,1078,102],{"style":566},[546,1080,24],{"style":552},[546,1082,1059],{"style":559},[546,1084,1085],{"style":571},"(",[546,1087,102],{"style":566},[546,1089,24],{"style":552},[546,1091,1051],{"style":559},[546,1093,1094],{"style":571},"())",[546,1096,1064],{"style":552},[388,1098,263],{"id":1099},"typeguards",[11,1101,980,1102,270,1104,1106,1107,1110],{},[15,1103,269],{},[15,1105,273],{}," assertions with Zod's ",[15,1108,1109],{},"validate"," API. Needs Zod 4.6 or later.",[31,1112,1113,1121],{},[34,1114,1115],{},[37,1116,1117,1119],{},[40,1118],{},[40,1120],{},[50,1122,1123,1132,1140],{},[37,1124,1125,1127],{},[55,1126,412],{},[55,1128,1129],{},[15,1130,1131],{},"boolean | { is?: boolean, assert?: boolean }",[37,1133,1134,1136],{},[55,1135,422],{},[55,1137,1138],{},[15,1139,134],{},[37,1141,1142,1144],{},[55,1143,48],{},[55,1145,1146],{},[15,1147,134],{},[501,1149,1150,1159],{},[504,1151,1152,1153,440,1156,24],{"name":506},"Writes both ",[15,1154,1155],{},"is\u003CSchema>",[15,1157,1158],{},"assert\u003CSchema>",[504,1160,1162,1163,1165,1166,1169,1170,1172],{"name":1161},"{ is?, assert? }","Both default to ",[15,1164,506],{},", so ",[15,1167,1168],{},"{ assert: false }"," writes only the ",[15,1171,269],{}," guards.",[1174,1175,1177],"code-collapse",{"name":1176},"Guards added to petSchema.ts with typeGuards: true",[537,1178,1181],{"language":539,"filename":1179,"code":1180,"class":541},"src\u002Fgen\u002Fzod\u002FpetSchema.ts","export const isPet = (data: unknown): data is z.infer\u003Ctypeof petSchema> => petSchema.validate(data)\n\nexport function assertPet(data: unknown): asserts data is z.infer\u003Ctypeof petSchema> {\n if (!petSchema.validate(data)) {\n petSchema.parse(data)\n }\n}",[15,1182,1183,1243,1244,1243,1246,1243,1293,1243,1319,1243,1337,1243,1342],{"class":544},[546,1184,1185,1187,1190,1193,1195,1197,1200,1202,1205,1208,1210,1213,1216,1218,1220,1222,1224,1226,1228,1231,1233,1235,1237,1239,1241],{"class":548,"style":549},[546,1186,553],{"style":552},[546,1188,1189],{"style":552},"const ",[546,1191,1192],{"style":566},"isPet ",[546,1194,563],{"style":552},[546,1196,1085],{"style":571},[546,1198,1199],{"style":566},"data",[546,1201,1044],{"style":566},[546,1203,1204],{"style":559},"unknown",[546,1206,1207],{"style":571},")",[546,1209,1044],{"style":552},[546,1211,1212],{"style":566},"data ",[546,1214,1215],{"style":552},"is ",[546,1217,102],{"style":566},[546,1219,24],{"style":552},[546,1221,572],{"style":571},[546,1223,575],{"style":552},[546,1225,578],{"style":552},[546,1227,581],{"style":566},[546,1229,1230],{"style":552},"> => ",[546,1232,581],{"style":566},[546,1234,24],{"style":552},[546,1236,1109],{"style":559},[546,1238,1085],{"style":571},[546,1240,1199],{"style":566},[546,1242,1207],{"style":571},"\n",[546,1245],{"class":548,"style":549},[546,1247,1248,1250,1253,1256,1258,1260,1262,1264,1266,1268,1271,1273,1275,1277,1279,1281,1283,1285,1287,1290],{"class":548,"style":549},[546,1249,553],{"style":552},[546,1251,1252],{"style":552},"function ",[546,1254,1255],{"style":559},"assertPet",[546,1257,1085],{"style":571},[546,1259,1199],{"style":566},[546,1261,1044],{"style":566},[546,1263,1204],{"style":559},[546,1265,1207],{"style":571},[546,1267,1044],{"style":552},[546,1269,1270],{"style":552},"asserts ",[546,1272,1212],{"style":566},[546,1274,1215],{"style":552},[546,1276,102],{"style":566},[546,1278,24],{"style":552},[546,1280,572],{"style":571},[546,1282,575],{"style":552},[546,1284,578],{"style":552},[546,1286,581],{"style":566},[546,1288,1289],{"style":552},"> ",[546,1291,1292],{"style":571},"{",[546,1294,1295,1298,1301,1303,1306,1308,1310,1312,1314,1316],{"class":548,"style":549},[546,1296,1297],{"style":571}," ",[546,1299,1300],{"style":552},"if ",[546,1302,1085],{"style":571},[546,1304,1305],{"style":552},"!",[546,1307,581],{"style":566},[546,1309,24],{"style":552},[546,1311,1109],{"style":559},[546,1313,1085],{"style":571},[546,1315,1199],{"style":566},[546,1317,1318],{"style":571},")) {",[546,1320,1321,1324,1326,1328,1331,1333,1335],{"class":548,"style":549},[546,1322,1323],{"style":571}," ",[546,1325,581],{"style":566},[546,1327,24],{"style":552},[546,1329,1330],{"style":559},"parse",[546,1332,1085],{"style":571},[546,1334,1199],{"style":566},[546,1336,1207],{"style":571},[546,1338,1339],{"class":548,"style":549},[546,1340,1341],{"style":571}," }",[546,1343,1344],{"class":548,"style":549},[546,1345,1346],{"style":571},"}",[388,1348,288],{"id":288},[11,1350,1351,1352,1355,1356,1358,1359,1361,1362,1365,1366,1369,1370,24],{},"Replaces the handler for a schema type such as ",[15,1353,1354],{},"'integer'",". Each handler returns the Zod expression as a string, in Zod Mini syntax when ",[15,1357,116],{}," is ",[15,1360,506],{},". ",[15,1363,1364],{},"this.base(node)"," returns the built-in output, and ",[15,1367,1368],{},"this.transform(node)"," recurses into nested nodes. See the ",[20,1371,1373],{"href":1372},"https:\u002F\u002Fkubb.dev\u002Fdocs\u002F5.x\u002Fhow-to\u002Fcustomize#printers","printer guide",[31,1375,1376,1384],{},[34,1377,1378],{},[37,1379,1380,1382],{},[40,1381],{},[40,1383],{},[50,1385,1386,1395],{},[37,1387,1388,1390],{},[55,1389,412],{},[55,1391,1392],{},[15,1393,1394],{},"{ nodes?: PrinterZodNodes | PrinterZodMiniNodes }",[37,1396,1397,1399],{},[55,1398,422],{},[55,1400,1401],{},[15,1402,134],{},[537,1404,1407],{"language":539,"filename":1405,"code":1406,"class":541},"kubb.config.ts","import { pluginZod } from '@kubb\u002Fplugin-zod'\n\npluginZod({\n printer: {\n nodes: {\n integer() {\n return 'z.number()'\n },\n },\n },\n})",[15,1408,1409,1243,1430,1243,1432,1243,1440,1243,1450,1243,1461,1243,1472,1243,1483,1243,1491,1243,1499,1243,1507],{"class":544},[546,1410,1411,1414,1417,1420,1423,1426],{"class":548,"style":549},[546,1412,1413],{"style":552},"import ",[546,1415,1416],{"style":571},"{ ",[546,1418,1419],{"style":566},"pluginZod ",[546,1421,1422],{"style":571},"} ",[546,1424,1425],{"style":552},"from ",[546,1427,1429],{"style":1428},"color:#032f62;--hls-dark:#9ecbff","'@kubb\u002Fplugin-zod'",[546,1431],{"class":548,"style":549},[546,1433,1434,1437],{"class":548,"style":549},[546,1435,1436],{"style":559},"pluginZod",[546,1438,1439],{"style":571},"({",[546,1441,1442,1444,1446,1448],{"class":548,"style":549},[546,1443,1297],{"style":571},[546,1445,288],{"style":571},[546,1447,1044],{"style":552},[546,1449,1292],{"style":571},[546,1451,1452,1454,1457,1459],{"class":548,"style":549},[546,1453,1323],{"style":571},[546,1455,1456],{"style":571},"nodes",[546,1458,1044],{"style":552},[546,1460,1292],{"style":571},[546,1462,1463,1466,1469],{"class":548,"style":549},[546,1464,1465],{"style":571}," ",[546,1467,1468],{"style":559},"integer",[546,1470,1471],{"style":571},"() {",[546,1473,1474,1477,1480],{"class":548,"style":549},[546,1475,1476],{"style":571}," ",[546,1478,1479],{"style":552},"return ",[546,1481,1482],{"style":1428},"'z.number()'",[546,1484,1485,1487,1489],{"class":548,"style":549},[546,1486,1465],{"style":1428},[546,1488,1346],{"style":571},[546,1490,1064],{"style":552},[546,1492,1493,1495,1497],{"class":548,"style":549},[546,1494,1323],{"style":552},[546,1496,1346],{"style":571},[546,1498,1064],{"style":552},[546,1500,1501,1503,1505],{"class":548,"style":549},[546,1502,1297],{"style":552},[546,1504,1346],{"style":571},[546,1506,1064],{"style":552},[546,1508,1509],{"class":548,"style":549},[546,1510,1511],{"style":571},"})",[11,1513,1514,1515,1518,1519,24],{},"To convert requests and responses differently, branch on ",[15,1516,1517],{},"this.options.direction",", as in ",[20,1520,1522],{"href":1521},"https:\u002F\u002Fkubb.dev\u002Fextensions\u002Fkubb-labs\u002Fplugin-zod\u002Fguides\u002Fcustomization#encode-custom-types","Encode custom types",[26,1524,1526],{"id":1525},"resolver-members","Resolver members",[11,1528,1529,1531,1532,1534],{},[15,1530,353],{}," takes one patch or an array of patches. An array merges over ",[15,1533,365],{}," from left to right.",[11,1536,1537,1538,1542,1543,1545],{},"Besides the shared members of ",[20,1539,1540],{"href":350},[15,1541,353],{},", ",[15,1544,365],{}," has these. Members you leave out keep the default.",[1174,1547,1549],{"name":1548},"ResolverZod patch members",[537,1550,1553],{"language":539,"filename":1551,"code":1552,"class":541},"Partial override","type ResolverZodPatch = {\n schema?: {\n typeName?(name: string): string\n type?(name: string): string\n inputName?(name: string): string\n inputTypeName?(name: string): string\n isName?(name: string): string\n assertName?(name: string): string\n }\n param?: {\n name?(node: OperationNode, param: ParameterNode): string\n path?(node: OperationNode, param: ParameterNode): string\n query?(node: OperationNode, param: ParameterNode): string\n headers?(node: OperationNode, param: ParameterNode): string\n cookies?(node: OperationNode, param: ParameterNode): string\n }\n response?: {\n status?(node: OperationNode, statusCode: StatusCode): string\n headers?(node: OperationNode, statusCode: StatusCode): string\n body?(node: OperationNode): string\n responses?(node: OperationNode): string\n response?(node: OperationNode): string\n error?(node: OperationNode): string\n options?(node: OperationNode): string\n }\n}",[15,1554,1555,1243,1566,1243,1580,1243,1604,1243,1627,1243,1650,1243,1673,1243,1696,1243,1719,1243,1725,1243,1738,1243,1771,1243,1802,1243,1833,1243,1864,1243,1895,1243,1901,1243,1914,1243,1946,1243,1976,1243,1999,1243,2022,1243,2044,1243,2067,1243,2090,1243,2096],{"class":544},[546,1556,1557,1559,1562,1564],{"class":548,"style":549},[546,1558,556],{"style":552},[546,1560,1561],{"style":559},"ResolverZodPatch ",[546,1563,563],{"style":552},[546,1565,1292],{"style":571},[546,1567,1568,1570,1573,1576,1578],{"class":548,"style":549},[546,1569,1297],{"style":571},[546,1571,1572],{"style":571},"schema",[546,1574,1575],{"style":566},"?",[546,1577,1044],{"style":552},[546,1579,1292],{"style":571},[546,1581,1582,1584,1587,1589,1591,1594,1596,1598,1600,1602],{"class":548,"style":549},[546,1583,1323],{"style":571},[546,1585,1586],{"style":566},"typeName",[546,1588,1575],{"style":552},[546,1590,1085],{"style":571},[546,1592,1593],{"style":566},"name",[546,1595,1044],{"style":566},[546,1597,1051],{"style":559},[546,1599,1207],{"style":571},[546,1601,1044],{"style":566},[546,1603,1051],{"style":559},[546,1605,1606,1608,1611,1613,1615,1617,1619,1621,1623,1625],{"class":548,"style":549},[546,1607,1323],{"style":559},[546,1609,1610],{"style":566},"type",[546,1612,1575],{"style":552},[546,1614,1085],{"style":571},[546,1616,1593],{"style":566},[546,1618,1044],{"style":566},[546,1620,1051],{"style":559},[546,1622,1207],{"style":571},[546,1624,1044],{"style":566},[546,1626,1051],{"style":559},[546,1628,1629,1631,1634,1636,1638,1640,1642,1644,1646,1648],{"class":548,"style":549},[546,1630,1323],{"style":559},[546,1632,1633],{"style":566},"inputName",[546,1635,1575],{"style":552},[546,1637,1085],{"style":571},[546,1639,1593],{"style":566},[546,1641,1044],{"style":566},[546,1643,1051],{"style":559},[546,1645,1207],{"style":571},[546,1647,1044],{"style":566},[546,1649,1051],{"style":559},[546,1651,1652,1654,1657,1659,1661,1663,1665,1667,1669,1671],{"class":548,"style":549},[546,1653,1323],{"style":559},[546,1655,1656],{"style":566},"inputTypeName",[546,1658,1575],{"style":552},[546,1660,1085],{"style":571},[546,1662,1593],{"style":566},[546,1664,1044],{"style":566},[546,1666,1051],{"style":559},[546,1668,1207],{"style":571},[546,1670,1044],{"style":566},[546,1672,1051],{"style":559},[546,1674,1675,1677,1680,1682,1684,1686,1688,1690,1692,1694],{"class":548,"style":549},[546,1676,1323],{"style":559},[546,1678,1679],{"style":566},"isName",[546,1681,1575],{"style":552},[546,1683,1085],{"style":571},[546,1685,1593],{"style":566},[546,1687,1044],{"style":566},[546,1689,1051],{"style":559},[546,1691,1207],{"style":571},[546,1693,1044],{"style":566},[546,1695,1051],{"style":559},[546,1697,1698,1700,1703,1705,1707,1709,1711,1713,1715,1717],{"class":548,"style":549},[546,1699,1323],{"style":559},[546,1701,1702],{"style":566},"assertName",[546,1704,1575],{"style":552},[546,1706,1085],{"style":571},[546,1708,1593],{"style":566},[546,1710,1044],{"style":566},[546,1712,1051],{"style":559},[546,1714,1207],{"style":571},[546,1716,1044],{"style":566},[546,1718,1051],{"style":559},[546,1720,1721,1723],{"class":548,"style":549},[546,1722,1297],{"style":559},[546,1724,1346],{"style":571},[546,1726,1727,1729,1732,1734,1736],{"class":548,"style":549},[546,1728,1297],{"style":571},[546,1730,1731],{"style":566},"param",[546,1733,1575],{"style":566},[546,1735,1044],{"style":552},[546,1737,1292],{"style":571},[546,1739,1740,1742,1744,1746,1748,1751,1753,1756,1758,1760,1762,1765,1767,1769],{"class":548,"style":549},[546,1741,1323],{"style":571},[546,1743,1593],{"style":566},[546,1745,1575],{"style":552},[546,1747,1085],{"style":571},[546,1749,1750],{"style":566},"node",[546,1752,1044],{"style":566},[546,1754,1755],{"style":559},"OperationNode",[546,1757,1542],{"style":552},[546,1759,1731],{"style":566},[546,1761,1044],{"style":566},[546,1763,1764],{"style":559},"ParameterNode",[546,1766,1207],{"style":571},[546,1768,1044],{"style":566},[546,1770,1051],{"style":559},[546,1772,1773,1775,1778,1780,1782,1784,1786,1788,1790,1792,1794,1796,1798,1800],{"class":548,"style":549},[546,1774,1323],{"style":559},[546,1776,1777],{"style":566},"path",[546,1779,1575],{"style":552},[546,1781,1085],{"style":571},[546,1783,1750],{"style":566},[546,1785,1044],{"style":566},[546,1787,1755],{"style":559},[546,1789,1542],{"style":552},[546,1791,1731],{"style":566},[546,1793,1044],{"style":566},[546,1795,1764],{"style":559},[546,1797,1207],{"style":571},[546,1799,1044],{"style":566},[546,1801,1051],{"style":559},[546,1803,1804,1806,1809,1811,1813,1815,1817,1819,1821,1823,1825,1827,1829,1831],{"class":548,"style":549},[546,1805,1323],{"style":559},[546,1807,1808],{"style":566},"query",[546,1810,1575],{"style":552},[546,1812,1085],{"style":571},[546,1814,1750],{"style":566},[546,1816,1044],{"style":566},[546,1818,1755],{"style":559},[546,1820,1542],{"style":552},[546,1822,1731],{"style":566},[546,1824,1044],{"style":566},[546,1826,1764],{"style":559},[546,1828,1207],{"style":571},[546,1830,1044],{"style":566},[546,1832,1051],{"style":559},[546,1834,1835,1837,1840,1842,1844,1846,1848,1850,1852,1854,1856,1858,1860,1862],{"class":548,"style":549},[546,1836,1323],{"style":559},[546,1838,1839],{"style":566},"headers",[546,1841,1575],{"style":552},[546,1843,1085],{"style":571},[546,1845,1750],{"style":566},[546,1847,1044],{"style":566},[546,1849,1755],{"style":559},[546,1851,1542],{"style":552},[546,1853,1731],{"style":566},[546,1855,1044],{"style":566},[546,1857,1764],{"style":559},[546,1859,1207],{"style":571},[546,1861,1044],{"style":566},[546,1863,1051],{"style":559},[546,1865,1866,1868,1871,1873,1875,1877,1879,1881,1883,1885,1887,1889,1891,1893],{"class":548,"style":549},[546,1867,1323],{"style":559},[546,1869,1870],{"style":566},"cookies",[546,1872,1575],{"style":552},[546,1874,1085],{"style":571},[546,1876,1750],{"style":566},[546,1878,1044],{"style":566},[546,1880,1755],{"style":559},[546,1882,1542],{"style":552},[546,1884,1731],{"style":566},[546,1886,1044],{"style":566},[546,1888,1764],{"style":559},[546,1890,1207],{"style":571},[546,1892,1044],{"style":566},[546,1894,1051],{"style":559},[546,1896,1897,1899],{"class":548,"style":549},[546,1898,1297],{"style":559},[546,1900,1346],{"style":571},[546,1902,1903,1905,1908,1910,1912],{"class":548,"style":549},[546,1904,1297],{"style":571},[546,1906,1907],{"style":566},"response",[546,1909,1575],{"style":566},[546,1911,1044],{"style":552},[546,1913,1292],{"style":571},[546,1915,1916,1918,1920,1922,1924,1926,1928,1930,1932,1935,1937,1940,1942,1944],{"class":548,"style":549},[546,1917,1323],{"style":571},[546,1919,1041],{"style":566},[546,1921,1575],{"style":552},[546,1923,1085],{"style":571},[546,1925,1750],{"style":566},[546,1927,1044],{"style":566},[546,1929,1755],{"style":559},[546,1931,1542],{"style":552},[546,1933,1934],{"style":566},"statusCode",[546,1936,1044],{"style":566},[546,1938,1939],{"style":559},"StatusCode",[546,1941,1207],{"style":571},[546,1943,1044],{"style":566},[546,1945,1051],{"style":559},[546,1947,1948,1950,1952,1954,1956,1958,1960,1962,1964,1966,1968,1970,1972,1974],{"class":548,"style":549},[546,1949,1323],{"style":559},[546,1951,1839],{"style":566},[546,1953,1575],{"style":552},[546,1955,1085],{"style":571},[546,1957,1750],{"style":566},[546,1959,1044],{"style":566},[546,1961,1755],{"style":559},[546,1963,1542],{"style":552},[546,1965,1934],{"style":566},[546,1967,1044],{"style":566},[546,1969,1939],{"style":559},[546,1971,1207],{"style":571},[546,1973,1044],{"style":566},[546,1975,1051],{"style":559},[546,1977,1978,1980,1983,1985,1987,1989,1991,1993,1995,1997],{"class":548,"style":549},[546,1979,1323],{"style":559},[546,1981,1982],{"style":566},"body",[546,1984,1575],{"style":552},[546,1986,1085],{"style":571},[546,1988,1750],{"style":566},[546,1990,1044],{"style":566},[546,1992,1755],{"style":559},[546,1994,1207],{"style":571},[546,1996,1044],{"style":566},[546,1998,1051],{"style":559},[546,2000,2001,2003,2006,2008,2010,2012,2014,2016,2018,2020],{"class":548,"style":549},[546,2002,1323],{"style":559},[546,2004,2005],{"style":566},"responses",[546,2007,1575],{"style":552},[546,2009,1085],{"style":571},[546,2011,1750],{"style":566},[546,2013,1044],{"style":566},[546,2015,1755],{"style":559},[546,2017,1207],{"style":571},[546,2019,1044],{"style":566},[546,2021,1051],{"style":559},[546,2023,2024,2026,2028,2030,2032,2034,2036,2038,2040,2042],{"class":548,"style":549},[546,2025,1323],{"style":559},[546,2027,1907],{"style":566},[546,2029,1575],{"style":552},[546,2031,1085],{"style":571},[546,2033,1750],{"style":566},[546,2035,1044],{"style":566},[546,2037,1755],{"style":559},[546,2039,1207],{"style":571},[546,2041,1044],{"style":566},[546,2043,1051],{"style":559},[546,2045,2046,2048,2051,2053,2055,2057,2059,2061,2063,2065],{"class":548,"style":549},[546,2047,1323],{"style":559},[546,2049,2050],{"style":566},"error",[546,2052,1575],{"style":552},[546,2054,1085],{"style":571},[546,2056,1750],{"style":566},[546,2058,1044],{"style":566},[546,2060,1755],{"style":559},[546,2062,1207],{"style":571},[546,2064,1044],{"style":566},[546,2066,1051],{"style":559},[546,2068,2069,2071,2074,2076,2078,2080,2082,2084,2086,2088],{"class":548,"style":549},[546,2070,1323],{"style":559},[546,2072,2073],{"style":566},"options",[546,2075,1575],{"style":552},[546,2077,1085],{"style":571},[546,2079,1750],{"style":566},[546,2081,1044],{"style":566},[546,2083,1755],{"style":559},[546,2085,1207],{"style":571},[546,2087,1044],{"style":566},[546,2089,1051],{"style":559},[546,2091,2092,2094],{"class":548,"style":549},[546,2093,1297],{"style":559},[546,2095,1346],{"style":571},[546,2097,2098],{"class":548,"style":549},[546,2099,1346],{"style":571},[26,2101,2103],{"id":2102},"format-and-type-mappings","Format and type mappings",[11,2105,2106,2107,2110,2111,719,2114,24],{},"Kubb maps each OpenAPI format to its Zod v4 call, such as ",[15,2108,2109],{},"format: email"," to ",[15,2112,2113],{},"z.email()",[20,2115,2117],{"href":2116},"https:\u002F\u002Fkubb.dev\u002Fextensions\u002Fkubb-labs\u002Fplugin-zod\u002Fguides\u002Fformat-mappings","Zod validators for OpenAPI formats",{"title":2119,"searchDepth":2120,"depth":2120,"links":2121},"",5,[2122,2124,2137,2138],{"id":28,"depth":2123,"text":29},2,{"id":385,"depth":2123,"text":386,"children":2125},[2126,2128,2129,2130,2131,2132,2133,2134,2135,2136],{"id":390,"depth":2127,"text":96},3,{"id":126,"depth":2127,"text":126},{"id":144,"depth":2127,"text":144},{"id":726,"depth":2127,"text":161},{"id":785,"depth":2127,"text":182},{"id":850,"depth":2127,"text":204},{"id":226,"depth":2127,"text":226},{"id":116,"depth":2127,"text":116},{"id":1099,"depth":2127,"text":263},{"id":288,"depth":2127,"text":288},{"id":1525,"depth":2123,"text":1526},{"id":2102,"depth":2123,"text":2103},"\u002Fextensions\u002Fkubb-labs\u002Fplugin-zod\u002Foptions",1795727682810,"1b64b1eb-29b7-4f90-ad41-6f24721e1669"]