[{"data":1,"prerenderedAt":1320,"buildId":1321},["ShallowReactive",2],{"page:\u002Fextensions\u002Fkubb-labs\u002Fplugin-zod\u002Fguides\u002Fcustomization":3},{"id":4,"frontmatter":5,"title":6,"heading":6,"body":7,"path":1319,"source":4},"extensions\u002Fkubb-labs\u002Fplugin-zod\u002Fguides\u002Fcustomization.md",{},"Customize generated schemas",{"type":8,"value":9,"toc":1304},"minimark",[10,14,33,38,53,280,285,289,303,466,479,483,494,509,528,532,542,989,1007,1018,1022,1036,1287,1297],[11,12,13],"p",{},"Prefix inferred types, change Zod validators, and encode custom request types.",[11,15,16,17,21,22,27,28,32],{},"Add each change to ",[18,19,20],"code",{},"pluginZod()"," in the ",[23,24,26],"a",{"href":25},"https:\u002F\u002Fkubb.dev\u002Fextensions\u002Fkubb-labs\u002Fplugin-zod#example","Zod plugin configuration",". ",[23,29,31],{"href":30},"https:\u002F\u002Fkubb.dev\u002Fextensions\u002Fkubb-labs\u002Fplugin-zod\u002Foptions#format-and-type-mappings","Format and type mappings"," covers the default Zod calls.",[34,35,37],"h2",{"id":36},"prefix-inferred-types","Prefix inferred types",[11,39,40,41,44,45,48,49,52],{},"Turn on ",[18,42,43],{},"inferred"," and override ",[18,46,47],{},"resolver.schema.typeName",". The callback receives the schema name, such as ",[18,50,51],{},"Pet",", and returns the type name.",[54,55,56,208,249],"code-group",{},[57,58,63],"pre",{"language":59,"filename":60,"code":61,"class":62},"typescript","kubb.config.ts","import { pluginZod } from '@kubb\u002Fplugin-zod'\n\npluginZod({\n inferred: true,\n resolver: {\n schema: {\n typeName(name) {\n return 'Api' + name\n },\n },\n },\n})","highlights",[18,64,66,93,94,93,96,93,105,93,121,93,133,93,145,93,162,93,178,93,187,93,195,93,203],{"class":65},"language-typescript",[67,68,71,75,79,83,86,89],"span",{"class":69,"style":70},"line","display: inline",[67,72,74],{"style":73},"color:#d73a49;--hls-dark:#f97583","import ",[67,76,78],{"style":77},"color:#005cc5;--hls-dark:#79b8ff","{ ",[67,80,82],{"style":81},"color:#24292e;--hls-dark:#e1e4e8","pluginZod ",[67,84,85],{"style":77},"} ",[67,87,88],{"style":73},"from ",[67,90,92],{"style":91},"color:#032f62;--hls-dark:#9ecbff","'@kubb\u002Fplugin-zod'","\n",[67,95],{"class":69,"style":70},[67,97,98,102],{"class":69,"style":70},[67,99,101],{"style":100},"color:#6f42c1;--hls-dark:#b392f0","pluginZod",[67,103,104],{"style":77},"({",[67,106,107,110,112,115,118],{"class":69,"style":70},[67,108,109],{"style":77}," ",[67,111,43],{"style":77},[67,113,114],{"style":73},": ",[67,116,117],{"style":77},"true",[67,119,120],{"style":73},",",[67,122,123,125,128,130],{"class":69,"style":70},[67,124,109],{"style":73},[67,126,127],{"style":77},"resolver",[67,129,114],{"style":73},[67,131,132],{"style":77},"{",[67,134,135,138,141,143],{"class":69,"style":70},[67,136,137],{"style":77}," ",[67,139,140],{"style":77},"schema",[67,142,114],{"style":73},[67,144,132],{"style":77},[67,146,147,150,153,156,159],{"class":69,"style":70},[67,148,149],{"style":77}," ",[67,151,152],{"style":100},"typeName",[67,154,155],{"style":77},"(",[67,157,158],{"style":81},"name",[67,160,161],{"style":77},") {",[67,163,164,167,170,173,176],{"class":69,"style":70},[67,165,166],{"style":77}," ",[67,168,169],{"style":73},"return ",[67,171,172],{"style":91},"'Api' ",[67,174,175],{"style":73},"+ ",[67,177,158],{"style":81},[67,179,180,182,185],{"class":69,"style":70},[67,181,149],{"style":81},[67,183,184],{"style":77},"}",[67,186,120],{"style":73},[67,188,189,191,193],{"class":69,"style":70},[67,190,137],{"style":73},[67,192,184],{"style":77},[67,194,120],{"style":73},[67,196,197,199,201],{"class":69,"style":70},[67,198,109],{"style":73},[67,200,184],{"style":77},[67,202,120],{"style":73},[67,204,205],{"class":69,"style":70},[67,206,207],{"style":77},"})",[57,209,212],{"language":59,"filename":210,"code":211,"class":62},"Before","export type PetSchemaType = z.infer\u003Ctypeof petSchema>",[18,213,214],{"class":65},[67,215,216,219,222,225,228,231,234,237,240,243,246],{"class":69,"style":70},[67,217,218],{"style":73},"export ",[67,220,221],{"style":73},"type ",[67,223,224],{"style":100},"PetSchemaType ",[67,226,227],{"style":73},"= ",[67,229,230],{"style":81},"z",[67,232,233],{"style":73},".",[67,235,236],{"style":77},"infer",[67,238,239],{"style":73},"\u003C",[67,241,242],{"style":73},"typeof ",[67,244,245],{"style":81},"petSchema",[67,247,248],{"style":73},">",[57,250,253],{"language":59,"filename":251,"code":252,"class":62},"After","export type ApiPet = z.infer\u003Ctypeof petSchema>",[18,254,255],{"class":65},[67,256,257,259,261,264,266,268,270,272,274,276,278],{"class":69,"style":70},[67,258,218],{"style":73},[67,260,221],{"style":73},[67,262,263],{"style":100},"ApiPet ",[67,265,227],{"style":73},[67,267,230],{"style":81},[67,269,233],{"style":73},[67,271,236],{"style":77},[67,273,239],{"style":73},[67,275,242],{"style":73},[67,277,245],{"style":81},[67,279,248],{"style":73},[11,281,282,283,233],{},"The schema constant stays ",[18,284,245],{},[34,286,288],{"id":287},"use-numbers-for-int64-fields","Use numbers for int64 fields",[11,290,291,292,295,296,299,300,233],{},"Replace the ",[18,293,294],{},"bigint"," printer handler to validate ",[18,297,298],{},"int64"," fields with ",[18,301,302],{},"z.int()",[54,304,305,400,444],{},[57,306,308],{"language":59,"filename":60,"code":307,"class":62},"import { pluginZod } from '@kubb\u002Fplugin-zod'\n\npluginZod({\n printer: {\n nodes: {\n bigint() {\n return 'z.int()'\n },\n },\n },\n})",[18,309,310,93,324,93,326,93,332,93,343,93,354,93,363,93,372,93,380,93,388,93,396],{"class":65},[67,311,312,314,316,318,320,322],{"class":69,"style":70},[67,313,74],{"style":73},[67,315,78],{"style":77},[67,317,82],{"style":81},[67,319,85],{"style":77},[67,321,88],{"style":73},[67,323,92],{"style":91},[67,325],{"class":69,"style":70},[67,327,328,330],{"class":69,"style":70},[67,329,101],{"style":100},[67,331,104],{"style":77},[67,333,334,336,339,341],{"class":69,"style":70},[67,335,109],{"style":77},[67,337,338],{"style":77},"printer",[67,340,114],{"style":73},[67,342,132],{"style":77},[67,344,345,347,350,352],{"class":69,"style":70},[67,346,137],{"style":77},[67,348,349],{"style":77},"nodes",[67,351,114],{"style":73},[67,353,132],{"style":77},[67,355,356,358,360],{"class":69,"style":70},[67,357,149],{"style":77},[67,359,294],{"style":100},[67,361,362],{"style":77},"() {",[67,364,365,367,369],{"class":69,"style":70},[67,366,166],{"style":77},[67,368,169],{"style":73},[67,370,371],{"style":91},"'z.int()'",[67,373,374,376,378],{"class":69,"style":70},[67,375,149],{"style":91},[67,377,184],{"style":77},[67,379,120],{"style":73},[67,381,382,384,386],{"class":69,"style":70},[67,383,137],{"style":73},[67,385,184],{"style":77},[67,387,120],{"style":73},[67,389,390,392,394],{"class":69,"style":70},[67,391,109],{"style":73},[67,393,184],{"style":77},[67,395,120],{"style":73},[67,397,398],{"class":69,"style":70},[67,399,207],{"style":77},[57,401,403],{"language":59,"filename":210,"code":402,"class":62},"id: z.coerce.bigint().pipe(z.int64()),",[18,404,405],{"class":65},[67,406,407,410,412,414,416,419,421,423,426,428,431,433,435,437,439,442],{"class":69,"style":70},[67,408,409],{"style":81},"id",[67,411,114],{"style":73},[67,413,230],{"style":81},[67,415,233],{"style":73},[67,417,418],{"style":77},"coerce",[67,420,233],{"style":73},[67,422,294],{"style":100},[67,424,425],{"style":77},"()",[67,427,233],{"style":73},[67,429,430],{"style":100},"pipe",[67,432,155],{"style":77},[67,434,230],{"style":81},[67,436,233],{"style":73},[67,438,298],{"style":100},[67,440,441],{"style":77},"())",[67,443,120],{"style":73},[57,445,447],{"language":59,"filename":251,"code":446,"class":62},"id: z.int(),",[18,448,449],{"class":65},[67,450,451,453,455,457,459,462,464],{"class":69,"style":70},[67,452,409],{"style":81},[67,454,114],{"style":73},[67,456,230],{"style":81},[67,458,233],{"style":73},[67,460,461],{"style":100},"int",[67,463,425],{"style":77},[67,465,120],{"style":73},[11,467,468,469,471,472,478],{},"To change ",[18,470,298],{}," fields for every plugin, set the adapter's ",[23,473,475],{"href":474},"https:\u002F\u002Fkubb.dev\u002Fextensions\u002Fkubb-labs\u002Fadapter-oas\u002Foptions#integertype",[18,476,477],{},"integerType"," instead.",[34,480,482],{"id":481},"remove-descriptions","Remove descriptions",[11,484,485,486,489,490,493],{},"A schema's ",[18,487,488],{},"description"," prints twice: as a ",[18,491,492],{},".describe()"," call, and as the JSDoc comment above the schema const, so an editor shows it on hover.",[11,495,496,497,501,502,505,506,508],{},"Pass the ",[23,498,500],{"href":499},"https:\u002F\u002Fkubb.dev\u002Fextensions\u002Fkubb-labs\u002Fplugin-ts\u002Fguides\u002Fcustomization#remove-descriptions","description-removal macro"," to ",[18,503,504],{},"pluginZod({ macros: [dropDescriptions] })",". Schemas then omit their own ",[18,507,492],{}," calls.",[510,511,513,514,517,518,520,521,524,525,527],"blockquote",{"as":512},"note","A ",[18,515,516],{},"$ref"," to a described component keeps its ",[18,519,492],{}," call, such as ",[18,522,523],{},"owner: ownerSchema.describe('An owner')",", because a macro does not visit the schema a ",[18,526,516],{}," points to.",[34,529,531],{"id":530},"encode-custom-types","Encode custom types",[11,533,534,535,538,539,233],{},"A printer handler that reads ",[18,536,537],{},"this.options.direction"," decodes response values and encodes request values. This example converts ISO time strings to ",[18,540,541],{},"Temporal.PlainTime",[543,544,546,551,573,769,790,804,808,814,979,983],"steps",{"level":545},"3",[547,548,550],"h3",{"id":549},"write-a-direction-aware-handler","Write a direction-aware handler",[11,552,553,554,557,558,561,562,565,566,569,570,572],{},"Return one expression for ",[18,555,556],{},"'encode'"," (request bodies and parameters) and another for ",[18,559,560],{},"'decode'"," (responses). Set ",[18,563,564],{},"inferred: 'codec'"," so the client types follow the conversion, and set the client ",[18,567,568],{},"validator"," so the client runs it. Without request validation, the client sends the ",[18,571,541],{}," unencoded.",[57,574,576],{"language":59,"filename":60,"code":575,"class":62},"import { pluginZod, type PrinterZodNodes } from '@kubb\u002Fplugin-zod'\nimport { pluginFetch } from '@kubb\u002Fplugin-fetch'\n\nconst nodes: PrinterZodNodes = {\n time() {\n return this.options.direction === 'encode'\n ? 'z.instanceof(Temporal.PlainTime).transform((value) => value.toString())'\n : 'z.iso.time().transform((value) => Temporal.PlainTime.from(value))'\n },\n}\n\npluginZod({ inferred: 'codec', printer: { nodes } })\npluginFetch({ validator: { request: 'zod', params: 'zod', response: 'zod' } })",[18,577,578,93,600,93,616,93,618,93,633,93,642,93,666,93,676,93,685,93,693,93,697,93,699,93,727],{"class":65},[67,579,580,582,584,586,589,591,594,596,598],{"class":69,"style":70},[67,581,74],{"style":73},[67,583,78],{"style":77},[67,585,101],{"style":81},[67,587,588],{"style":73},", ",[67,590,221],{"style":73},[67,592,593],{"style":100},"PrinterZodNodes ",[67,595,85],{"style":77},[67,597,88],{"style":73},[67,599,92],{"style":91},[67,601,602,604,606,609,611,613],{"class":69,"style":70},[67,603,74],{"style":73},[67,605,78],{"style":77},[67,607,608],{"style":81},"pluginFetch ",[67,610,85],{"style":77},[67,612,88],{"style":73},[67,614,615],{"style":91},"'@kubb\u002Fplugin-fetch'",[67,617],{"class":69,"style":70},[67,619,620,623,625,627,629,631],{"class":69,"style":70},[67,621,622],{"style":73},"const ",[67,624,349],{"style":81},[67,626,114],{"style":81},[67,628,593],{"style":100},[67,630,227],{"style":73},[67,632,132],{"style":77},[67,634,635,637,640],{"class":69,"style":70},[67,636,109],{"style":77},[67,638,639],{"style":100},"time",[67,641,362],{"style":77},[67,643,644,646,648,651,653,656,658,661,664],{"class":69,"style":70},[67,645,137],{"style":77},[67,647,169],{"style":73},[67,649,650],{"style":81},"this",[67,652,233],{"style":73},[67,654,655],{"style":77},"options",[67,657,233],{"style":73},[67,659,660],{"style":77},"direction ",[67,662,663],{"style":73},"=== ",[67,665,556],{"style":91},[67,667,668,670,673],{"class":69,"style":70},[67,669,149],{"style":91},[67,671,672],{"style":73},"? ",[67,674,675],{"style":91},"'z.instanceof(Temporal.PlainTime).transform((value) => value.toString())'",[67,677,678,680,682],{"class":69,"style":70},[67,679,149],{"style":91},[67,681,114],{"style":73},[67,683,684],{"style":91},"'z.iso.time().transform((value) => Temporal.PlainTime.from(value))'",[67,686,687,689,691],{"class":69,"style":70},[67,688,109],{"style":91},[67,690,184],{"style":77},[67,692,120],{"style":73},[67,694,695],{"class":69,"style":70},[67,696,184],{"style":77},[67,698],{"class":69,"style":70},[67,700,701,703,706,708,710,713,715,717,719,721,724],{"class":69,"style":70},[67,702,101],{"style":100},[67,704,705],{"style":77},"({ ",[67,707,43],{"style":77},[67,709,114],{"style":73},[67,711,712],{"style":91},"'codec'",[67,714,588],{"style":73},[67,716,338],{"style":77},[67,718,114],{"style":73},[67,720,78],{"style":77},[67,722,723],{"style":81},"nodes ",[67,725,726],{"style":77},"} })",[67,728,729,732,734,736,738,740,743,745,748,750,753,755,757,759,762,764,767],{"class":69,"style":70},[67,730,731],{"style":100},"pluginFetch",[67,733,705],{"style":77},[67,735,568],{"style":77},[67,737,114],{"style":73},[67,739,78],{"style":77},[67,741,742],{"style":77},"request",[67,744,114],{"style":73},[67,746,747],{"style":91},"'zod'",[67,749,588],{"style":73},[67,751,752],{"style":77},"params",[67,754,114],{"style":73},[67,756,747],{"style":91},[67,758,588],{"style":73},[67,760,761],{"style":77},"response",[67,763,114],{"style":73},[67,765,766],{"style":91},"'zod' ",[67,768,726],{"style":77},[11,770,771,772,588,774,777,778,781,782,588,784,777,786,789],{},"The formats ",[18,773,639],{},[18,775,776],{},"date",", and ",[18,779,780],{},"date-time"," use the ",[18,783,639],{},[18,785,776],{},[18,787,788],{},"datetime"," handlers.",[11,791,792,793,796,797,800,801,233],{},"Type the handlers as ",[18,794,795],{},"PrinterZodNodes",", because the inline ",[18,798,799],{},"printer.nodes"," type also covers Zod Mini, which has no ",[18,802,803],{},"direction",[547,805,807],{"id":806},"check-the-generated-schemas","Check the generated schemas",[11,809,810,811,813],{},"Kubb writes a response schema and an input schema, also for schemas reached through a ",[18,812,516],{},":",[57,815,818],{"language":59,"filename":816,"code":817,"class":62},"src\u002Fgen\u002Fzod\u002FslotSchema.ts","export const slotSchema = z.object({\n startsAt: z.iso.time().transform((value) => Temporal.PlainTime.from(value)),\n})\n\nexport const slotInputSchema = z.object({\n startsAt: z.instanceof(Temporal.PlainTime).transform((value) => value.toString()),\n})",[18,819,820,93,840,93,901,93,905,93,907,93,926,93,975],{"class":65},[67,821,822,824,826,829,831,833,835,838],{"class":69,"style":70},[67,823,218],{"style":73},[67,825,622],{"style":73},[67,827,828],{"style":81},"slotSchema ",[67,830,227],{"style":73},[67,832,230],{"style":81},[67,834,233],{"style":73},[67,836,837],{"style":100},"object",[67,839,104],{"style":77},[67,841,842,844,847,849,851,853,856,858,860,862,864,867,870,873,876,879,882,884,887,889,892,894,896,899],{"class":69,"style":70},[67,843,109],{"style":77},[67,845,846],{"style":77},"startsAt",[67,848,114],{"style":73},[67,850,230],{"style":81},[67,852,233],{"style":73},[67,854,855],{"style":77},"iso",[67,857,233],{"style":73},[67,859,639],{"style":100},[67,861,425],{"style":77},[67,863,233],{"style":73},[67,865,866],{"style":100},"transform",[67,868,869],{"style":77},"((",[67,871,872],{"style":81},"value",[67,874,875],{"style":77},") ",[67,877,878],{"style":73},"=> ",[67,880,881],{"style":100},"Temporal",[67,883,233],{"style":73},[67,885,886],{"style":77},"PlainTime",[67,888,233],{"style":73},[67,890,891],{"style":100},"from",[67,893,155],{"style":77},[67,895,872],{"style":81},[67,897,898],{"style":77},"))",[67,900,120],{"style":73},[67,902,903],{"class":69,"style":70},[67,904,207],{"style":77},[67,906],{"class":69,"style":70},[67,908,909,911,913,916,918,920,922,924],{"class":69,"style":70},[67,910,218],{"style":73},[67,912,622],{"style":73},[67,914,915],{"style":81},"slotInputSchema ",[67,917,227],{"style":73},[67,919,230],{"style":81},[67,921,233],{"style":73},[67,923,837],{"style":100},[67,925,104],{"style":77},[67,927,928,930,932,934,936,938,941,943,945,947,949,952,954,956,958,960,962,964,966,968,971,973],{"class":69,"style":70},[67,929,109],{"style":77},[67,931,846],{"style":77},[67,933,114],{"style":73},[67,935,230],{"style":81},[67,937,233],{"style":73},[67,939,940],{"style":100},"instanceof",[67,942,155],{"style":77},[67,944,881],{"style":100},[67,946,233],{"style":73},[67,948,886],{"style":77},[67,950,951],{"style":77},")",[67,953,233],{"style":73},[67,955,866],{"style":100},[67,957,869],{"style":77},[67,959,872],{"style":81},[67,961,875],{"style":77},[67,963,878],{"style":73},[67,965,872],{"style":81},[67,967,233],{"style":73},[67,969,970],{"style":100},"toString",[67,972,441],{"style":77},[67,974,120],{"style":73},[67,976,977],{"class":69,"style":70},[67,978,207],{"style":77},[547,980,982],{"id":981},"provide-temporal","Provide Temporal",[11,984,985,986,988],{},"Use a runtime that provides ",[18,987,881],{},", or add its polyfill through a generated import or banner.",[510,990,992,993,996,997,999,1000,1002,1003,1006],{"as":991},"important","With ",[18,994,995],{},"inferred: true"," instead of ",[18,998,712],{},", a request type is the encoded string, not ",[18,1001,541],{},". Types from ",[18,1004,1005],{},"pluginTs"," describe the wire format.",[11,1008,1009,1010,1013,1014,1017],{},"For built-in ",[18,1011,1012],{},"Date"," conversion, set ",[18,1015,1016],{},"dateType: 'date'"," on the adapter instead.",[34,1019,1021],{"id":1020},"import-a-custom-codec","Import a custom codec",[11,1023,1024,1025,1028,1029,1032,1033,1035],{},"Override a printer handler and register its import with ",[18,1026,1027],{},"this.import",". This example uses ",[18,1030,1031],{},"myCodec.uint64()"," from your package for ",[18,1034,298],{}," fields:",[54,1037,1038,1215],{},[57,1039,1041],{"language":59,"filename":60,"code":1040,"class":62},"import { ast } from 'kubb\u002Fkit'\nimport { pluginZod } from '@kubb\u002Fplugin-zod'\n\npluginZod({\n printer: {\n nodes: {\n bigint() {\n this.import(ast.factory.createImport({\n name: ['myCodec'],\n path: 'my-codec\u002Fzod',\n }))\n return 'myCodec.uint64()'\n },\n },\n },\n})",[18,1042,1043,93,1059,93,1073,93,1075,93,1081,93,1091,93,1101,93,1109,93,1137,93,1157,93,1171,93,1178,93,1187,93,1195,93,1203,93,1211],{"class":65},[67,1044,1045,1047,1049,1052,1054,1056],{"class":69,"style":70},[67,1046,74],{"style":73},[67,1048,78],{"style":77},[67,1050,1051],{"style":81},"ast ",[67,1053,85],{"style":77},[67,1055,88],{"style":73},[67,1057,1058],{"style":91},"'kubb\u002Fkit'",[67,1060,1061,1063,1065,1067,1069,1071],{"class":69,"style":70},[67,1062,74],{"style":73},[67,1064,78],{"style":77},[67,1066,82],{"style":81},[67,1068,85],{"style":77},[67,1070,88],{"style":73},[67,1072,92],{"style":91},[67,1074],{"class":69,"style":70},[67,1076,1077,1079],{"class":69,"style":70},[67,1078,101],{"style":100},[67,1080,104],{"style":77},[67,1082,1083,1085,1087,1089],{"class":69,"style":70},[67,1084,109],{"style":77},[67,1086,338],{"style":77},[67,1088,114],{"style":73},[67,1090,132],{"style":77},[67,1092,1093,1095,1097,1099],{"class":69,"style":70},[67,1094,137],{"style":77},[67,1096,349],{"style":77},[67,1098,114],{"style":73},[67,1100,132],{"style":77},[67,1102,1103,1105,1107],{"class":69,"style":70},[67,1104,149],{"style":77},[67,1106,294],{"style":100},[67,1108,362],{"style":77},[67,1110,1111,1113,1115,1117,1120,1122,1125,1127,1130,1132,1135],{"class":69,"style":70},[67,1112,166],{"style":77},[67,1114,650],{"style":81},[67,1116,233],{"style":73},[67,1118,1119],{"style":100},"import",[67,1121,155],{"style":77},[67,1123,1124],{"style":81},"ast",[67,1126,233],{"style":73},[67,1128,1129],{"style":77},"factory",[67,1131,233],{"style":73},[67,1133,1134],{"style":100},"createImport",[67,1136,104],{"style":77},[67,1138,1139,1142,1144,1146,1149,1152,1155],{"class":69,"style":70},[67,1140,1141],{"style":77}," ",[67,1143,158],{"style":77},[67,1145,114],{"style":73},[67,1147,1148],{"style":77},"[",[67,1150,1151],{"style":91},"'myCodec'",[67,1153,1154],{"style":77},"]",[67,1156,120],{"style":73},[67,1158,1159,1161,1164,1166,1169],{"class":69,"style":70},[67,1160,1141],{"style":73},[67,1162,1163],{"style":77},"path",[67,1165,114],{"style":73},[67,1167,1168],{"style":91},"'my-codec\u002Fzod'",[67,1170,120],{"style":73},[67,1172,1173,1175],{"class":69,"style":70},[67,1174,166],{"style":73},[67,1176,1177],{"style":77},"}))",[67,1179,1180,1182,1184],{"class":69,"style":70},[67,1181,166],{"style":77},[67,1183,169],{"style":73},[67,1185,1186],{"style":91},"'myCodec.uint64()'",[67,1188,1189,1191,1193],{"class":69,"style":70},[67,1190,149],{"style":91},[67,1192,184],{"style":77},[67,1194,120],{"style":73},[67,1196,1197,1199,1201],{"class":69,"style":70},[67,1198,137],{"style":73},[67,1200,184],{"style":77},[67,1202,120],{"style":73},[67,1204,1205,1207,1209],{"class":69,"style":70},[67,1206,109],{"style":73},[67,1208,184],{"style":77},[67,1210,120],{"style":73},[67,1212,1213],{"class":69,"style":70},[67,1214,207],{"style":77},[57,1216,1219],{"language":59,"filename":1217,"code":1218,"class":62},"src\u002Fgen\u002Fzod\u002FpetSchema.ts","\u002F\u002F excerpt\nimport { myCodec } from 'my-codec\u002Fzod'\n\nexport const petSchema = z.object({\n id: myCodec.uint64(),\n})",[18,1220,1221,93,1227,93,1242,93,1244,93,1263,93,1283],{"class":65},[67,1222,1223],{"class":69,"style":70},[67,1224,1226],{"style":1225},"color:#6a737d;--hls-dark:#6a737d","\u002F\u002F excerpt",[67,1228,1229,1231,1233,1236,1238,1240],{"class":69,"style":70},[67,1230,74],{"style":73},[67,1232,78],{"style":77},[67,1234,1235],{"style":81},"myCodec ",[67,1237,85],{"style":77},[67,1239,88],{"style":73},[67,1241,1168],{"style":91},[67,1243],{"class":69,"style":70},[67,1245,1246,1248,1250,1253,1255,1257,1259,1261],{"class":69,"style":70},[67,1247,218],{"style":73},[67,1249,622],{"style":73},[67,1251,1252],{"style":81},"petSchema ",[67,1254,227],{"style":73},[67,1256,230],{"style":81},[67,1258,233],{"style":73},[67,1260,837],{"style":100},[67,1262,104],{"style":77},[67,1264,1265,1267,1269,1271,1274,1276,1279,1281],{"class":69,"style":70},[67,1266,109],{"style":77},[67,1268,409],{"style":77},[67,1270,114],{"style":73},[67,1272,1273],{"style":81},"myCodec",[67,1275,233],{"style":73},[67,1277,1278],{"style":100},"uint64",[67,1280,425],{"style":77},[67,1282,120],{"style":73},[67,1284,1285],{"class":69,"style":70},[67,1286,207],{"style":77},[11,1288,1289,1290,1293,1294,1296],{},"Leave ",[18,1291,1292],{},"root"," unset on the import to keep the package specifier. With ",[18,1295,1292],{}," set, Kubb rewrites it as a relative file path.",[11,1298,1299,1300,233],{},"For the handler context and how overrides compose with macros, see the ",[23,1301,1303],{"href":1302},"https:\u002F\u002Fkubb.dev\u002Fdocs\u002F5.x\u002Fhow-to\u002Fcustomize#printers","printer guide",{"title":1305,"searchDepth":1306,"depth":1306,"links":1307},"",5,[1308,1310,1311,1312,1318],{"id":36,"depth":1309,"text":37},2,{"id":287,"depth":1309,"text":288},{"id":481,"depth":1309,"text":482},{"id":530,"depth":1309,"text":531,"children":1313},[1314,1316,1317],{"id":549,"depth":1315,"text":550},3,{"id":806,"depth":1315,"text":807},{"id":981,"depth":1315,"text":982},{"id":1020,"depth":1309,"text":1021},"\u002Fextensions\u002Fkubb-labs\u002Fplugin-zod\u002Fguides\u002Fcustomization",1795727687678,"1b64b1eb-29b7-4f90-ad41-6f24721e1669"]