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