[{"data":1,"prerenderedAt":3142,"buildId":3143},["ShallowReactive",2],{"page:\u002Fdocs\u002F5.x\u002Fhow-to\u002Fcustomize":3},{"id":4,"title":5,"body":6,"description":3126,"extension":3127,"frontmatter":3128,"heading":5,"meta":3133,"navigation":3135,"order":3119,"path":3136,"seo":3137,"sitemap":3138,"source":3139,"stem":3140,"__hash__":3141},"docs\u002Fdocs\u002F5.x\u002Fhow-to\u002Fcustomize.md","Customize generated code",{"type":7,"value":8,"toc":3111},"minimark",[9,13,98,101,105,122,127,133,229,243,915,938,941,952,1017,1026,1425,1430,1460,1771,1784,1787,1790,1794,1805,1814,2393,2397,2406,2591,2595,2608,2681,2688,3071,3075,3084,3087],[10,11,12],"p",{},"You change what a plugin generates with one of these options, without forking it:",[14,15,16,32],"table",{},[17,18,19],"thead",{},[20,21,22,26,29],"tr",{},[23,24,25],"th",{},"You want to change",[23,27,28],{},"Use",[23,30,31],{},"Applies to",[33,34,35,54,70],"tbody",{},[20,36,37,41,51],{},[38,39,40],"td",{},"What a type, function, or file is called, or where a file lands",[38,42,43],{},[44,45,47],"a",{"href":46},"#resolvers",[48,49,50],"code",{},"resolver",[38,52,53],{},"The plugin you set it on",[20,55,56,59,67],{},[38,57,58],{},"The schema itself, such as a field type, a name, or metadata",[38,60,61],{},[44,62,64],{"href":63},"#macros",[48,65,66],{},"macros",[38,68,69],{},"Every plugin you pass the macro to",[20,71,72,78,86],{},[38,73,74,75],{},"The code printed for one schema type, such as ",[48,76,77],{},"date",[38,79,80],{},[44,81,83],{"href":82},"#printers",[48,84,85],{},"printer.nodes",[38,87,88,91,92,91,95],{},[48,89,90],{},"@kubb\u002Fplugin-ts",", ",[48,93,94],{},"@kubb\u002Fplugin-zod",[48,96,97],{},"@kubb\u002Fplugin-faker",[10,99,100],{},"Macros run before the resolver, so when a macro changes a name, the generated names, paths, and files follow:",[102,103],"mermaid",{"svg":104},"\u003Csvg xmlns=\"http:\u002F\u002Fwww.w3.org\u002F2000\u002Fsvg\" class=\"pele pele-flowchart\" viewBox=\"0 0 767 170\" width=\"767\" height=\"170\" style=\"--_bg:var(--pele-bg,#fff);--_fg:var(--pele-fg,#1f1f1f);--_m:var(--pele-muted,#6e6e6e);--_l:var(--pele-line,#1f1f1f);--_s:var(--pele-surface,#f3f3f3);--_a:var(--pele-surface-alt,#e6e6e6);--_b:var(--pele-border,#8a8a8a);--_c:var(--pele-accent,#5b7bd5);color:var(--_fg);--_r:var(--pele-radius,4px);--_fm:var(--pele-font-mono,monospace);font:16px sans-serif;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;font-family:var(--pele-font,sans-serif)\" fill=\"var(--_fg)\" role=\"graphics-document document\" aria-roledescription=\"flowchart\">\u003Cg class=\"pele-edges\" fill=\"none\" stroke=\"var(--_l)\" stroke-linecap=\"round\">\u003Cg class=\"pele-edge\" data-id=\"L_A_M_0\">\u003Cpath d=\"M75.12,80.5L116.12,80.5\"\u002F>\u003Cpath class=\"pele-marker\" d=\"M123.12,80.5L115.12,83.86L115.12,77.14Z\" fill=\"var(--_l)\" stroke=\"none\"\u002F>\u003C\u002Fg>\u003Cg class=\"pele-edge\" data-id=\"L_M_G_0\">\u003Cpath d=\"M211.57,80.5L252.57,80.5\"\u002F>\u003Cpath class=\"pele-marker\" d=\"M259.57,80.5L251.57,83.86L251.57,77.14Z\" fill=\"var(--_l)\" stroke=\"none\"\u002F>\u003C\u002Fg>\u003Cg class=\"pele-edge\" data-id=\"L_G_R_0\">\u003Cpath d=\"M362.26,72.5C379.76,72.5 379.76,32 397.26,32L403.26,32\"\u002F>\u003Cpath class=\"pele-marker\" d=\"M410.26,32L402.26,35.36L402.26,28.64Z\" fill=\"var(--_l)\" stroke=\"none\"\u002F>\u003C\u002Fg>\u003Cg class=\"pele-edge\" data-id=\"L_G_P_0\">\u003Cpath d=\"M362.26,88.5C383.76,88.5 383.76,129 405.26,129L411.26,129\"\u002F>\u003Cpath class=\"pele-marker\" d=\"M418.26,129L410.26,132.36L410.26,125.64Z\" fill=\"var(--_l)\" stroke=\"none\"\u002F>\u003C\u002Fg>\u003Cg class=\"pele-edge\" data-id=\"L_R_F_0\">\u003Cpath d=\"M641.01,32C658.51,32 658.51,72.5 676.01,72.5L682.01,72.5\"\u002F>\u003Cpath class=\"pele-marker\" d=\"M689.01,72.5L681.01,75.86L681.01,69.14Z\" fill=\"var(--_l)\" stroke=\"none\"\u002F>\u003C\u002Fg>\u003Cg class=\"pele-edge\" data-id=\"L_P_F_0\">\u003Cpath d=\"M633,129C654.5,129 654.5,88.5 676.01,88.5L682.01,88.5\"\u002F>\u003Cpath class=\"pele-marker\" d=\"M689.01,88.5L681.01,91.86L681.01,85.14Z\" fill=\"var(--_l)\" stroke=\"none\"\u002F>\u003C\u002Fg>\u003C\u002Fg>\u003Cg class=\"pele-nodes\">\u003Cg class=\"pele-node pele-shape-rect\" data-id=\"A\" transform=\"translate(41.56,80.5)\">\u003Crect x=\"-33.56\" y=\"-24\" width=\"67.12\" height=\"48\" fill=\"var(--_s)\" stroke=\"var(--_b)\" style=\"rx:var(--_r)\"\u002F>\u003Ctext class=\"pele-label\" x=\"0\" y=\"5.6\" text-anchor=\"middle\">AST\u003C\u002Ftext>\u003C\u002Fg>\u003Cg class=\"pele-node pele-shape-rect\" data-id=\"M\" transform=\"translate(167.34,80.5)\">\u003Crect x=\"-44.22\" y=\"-24\" width=\"88.45\" height=\"48\" fill=\"var(--_s)\" stroke=\"var(--_b)\" style=\"rx:var(--_r)\"\u002F>\u003Ctext class=\"pele-label\" x=\"0\" y=\"5.6\" text-anchor=\"middle\">Macros\u003C\u002Ftext>\u003C\u002Fg>\u003Cg class=\"pele-node pele-shape-rect\" data-id=\"G\" transform=\"translate(310.91,80.5)\">\u003Crect x=\"-51.34\" y=\"-24\" width=\"102.69\" height=\"48\" fill=\"var(--_s)\" stroke=\"var(--_b)\" style=\"rx:var(--_r)\"\u002F>\u003Ctext class=\"pele-label\" x=\"0\" y=\"5.6\" text-anchor=\"middle\">Template\u003C\u002Ftext>\u003C\u002Fg>\u003Cg class=\"pele-node pele-shape-rect\" data-id=\"R\" transform=\"translate(525.63,32)\">\u003Crect x=\"-115.38\" y=\"-24\" width=\"230.75\" height=\"48\" fill=\"var(--_s)\" stroke=\"var(--_b)\" style=\"rx:var(--_r)\"\u002F>\u003Ctext class=\"pele-label\" x=\"0\" y=\"5.6\" text-anchor=\"middle\">Resolver: names and paths\u003C\u002Ftext>\u003C\u002Fg>\u003Cg class=\"pele-node pele-shape-rect\" data-id=\"P\" transform=\"translate(525.63,129)\">\u003Crect x=\"-107.37\" y=\"-33\" width=\"214.74\" height=\"66\" fill=\"var(--_s)\" stroke=\"var(--_b)\" style=\"rx:var(--_r)\"\u002F>\u003Ctext class=\"pele-label\" text-anchor=\"middle\" xml:space=\"preserve\">\u003Ctspan x=\"0\" y=\"-4.9\">Printer: code per schema\u003C\u002Ftspan>\u003Ctspan x=\"0\" y=\"16.1\">type\u003C\u002Ftspan>\u003C\u002Ftext>\u003C\u002Fg>\u003Cg class=\"pele-node pele-shape-rect\" data-id=\"F\" transform=\"translate(723.9,80.5)\">\u003Crect x=\"-34.89\" y=\"-24\" width=\"69.78\" height=\"48\" fill=\"var(--_s)\" stroke=\"var(--_b)\" style=\"rx:var(--_r)\"\u002F>\u003Ctext class=\"pele-label\" x=\"0\" y=\"5.6\" text-anchor=\"middle\">Files\u003C\u002Ftext>\u003C\u002Fg>\u003C\u002Fg>\u003C\u002Fsvg>",[106,107,109,110,113,114,117,118,121],"blockquote",{"as":108},"tip","An override gets its context as ",[48,111,112],{},"this"," and as its second argument. In an arrow function, read it from the second argument, such as ",[48,115,116],{},"(node, ctx) => ctx!.base(node)",". The second argument is typed as optional, so assert it with ",[48,119,120],{},"!",".",[123,124,126],"h2",{"id":125},"resolvers","Resolvers",[10,128,129,130,132],{},"A resolver names every symbol and file a plugin writes. Pass only the methods you replace to the plugin's ",[48,131,50],{}," option. The rest keep their defaults.",[14,134,135,148],{},[17,136,137],{},[20,138,139,142,145],{},[23,140,141],{},"Method",[23,143,144],{},"Builds",[23,146,147],{},"Plugin",[33,149,150,163,175,187,208],{},[20,151,152,157,160],{},[38,153,154],{},[48,155,156],{},"name(name)",[38,158,159],{},"Every identifier",[38,161,162],{},"All",[20,164,165,170,173],{},[38,166,167],{},[48,168,169],{},"file.baseName({ name, extname })",[38,171,172],{},"A file name, extension included",[38,174,162],{},[20,176,177,182,185],{},[38,178,179],{},[48,180,181],{},"file.path({ baseName, output })",[38,183,184],{},"The full file path",[38,186,162],{},[20,188,189,194,200],{},[38,190,191],{},[48,192,193],{},"query.keyName(node)",[38,195,196,197],{},"A query key, such as ",[48,198,199],{},"getPetByIdQueryKey",[38,201,202,91,205],{},[48,203,204],{},"@kubb\u002Fplugin-react-query",[48,206,207],{},"@kubb\u002Fplugin-vue-query",[20,209,210,215,221],{},[38,211,212],{},[48,213,214],{},"response.status(node, statusCode)",[38,216,217,218],{},"A response name, such as ",[48,219,220],{},"GetPetByIdStatus200",[38,222,223,91,225,91,227],{},[48,224,90],{},[48,226,94],{},[48,228,97],{},[10,230,231,232,236,237,242],{},"Each plugin's options page lists its own namespaces. ",[44,233,235],{"href":234},"\u002Fdocs\u002F5.x\u002Freference\u002Fkit\u002Fresolvers#resolver-overrides","Resolver overrides"," has the signatures. ",[44,238,240],{"href":239},"\u002Fdocs\u002F5.x\u002Freference\u002Fplugin-options#resolver",[48,241,50],{}," lists the shared members.",[244,245,246,392,526,640,773],"code-group",{},[247,248,253],"pre",{"language":249,"filename":250,"code":251,"class":252},"typescript","Prefix names","import { pluginTs, resolverTs } from '@kubb\u002Fplugin-ts'\n\npluginTs({\n resolver: {\n \u002F\u002F Calls the preset to keep PascalCase: Pet becomes ApiPet\n name(name) {\n return `Api${resolverTs.name(name)}`\n },\n },\n})","highlights",[48,254,256,288,289,288,291,288,299,288,312,288,321,288,336,288,370,288,379,288,387],{"class":255},"language-typescript",[257,258,261,265,269,273,275,278,281,284],"span",{"class":259,"style":260},"line","display: inline",[257,262,264],{"style":263},"color:#d73a49;--hls-dark:#f97583","import ",[257,266,268],{"style":267},"color:#005cc5;--hls-dark:#79b8ff","{ ",[257,270,272],{"style":271},"color:#24292e;--hls-dark:#e1e4e8","pluginTs",[257,274,91],{"style":263},[257,276,277],{"style":271},"resolverTs ",[257,279,280],{"style":267},"} ",[257,282,283],{"style":263},"from ",[257,285,287],{"style":286},"color:#032f62;--hls-dark:#9ecbff","'@kubb\u002Fplugin-ts'","\n",[257,290],{"class":259,"style":260},[257,292,293,296],{"class":259,"style":260},[257,294,272],{"style":295},"color:#6f42c1;--hls-dark:#b392f0",[257,297,298],{"style":267},"({",[257,300,301,304,306,309],{"class":259,"style":260},[257,302,303],{"style":267}," ",[257,305,50],{"style":267},[257,307,308],{"style":263},": ",[257,310,311],{"style":267},"{",[257,313,314,317],{"class":259,"style":260},[257,315,316],{"style":267}," ",[257,318,320],{"style":319},"color:#6a737d;--hls-dark:#6a737d","\u002F\u002F Calls the preset to keep PascalCase: Pet becomes ApiPet",[257,322,323,325,328,331,333],{"class":259,"style":260},[257,324,316],{"style":319},[257,326,327],{"style":295},"name",[257,329,330],{"style":267},"(",[257,332,327],{"style":271},[257,334,335],{"style":267},") {",[257,337,338,341,344,347,350,353,355,357,359,361,364,367],{"class":259,"style":260},[257,339,340],{"style":267}," ",[257,342,343],{"style":263},"return ",[257,345,346],{"style":286},"`Api",[257,348,349],{"style":271},"${",[257,351,352],{"style":271},"resolverTs",[257,354,121],{"style":263},[257,356,327],{"style":295},[257,358,330],{"style":267},[257,360,327],{"style":271},[257,362,363],{"style":267},")",[257,365,366],{"style":271},"}",[257,368,369],{"style":286},"`",[257,371,372,374,376],{"class":259,"style":260},[257,373,316],{"style":286},[257,375,366],{"style":267},[257,377,378],{"style":263},",",[257,380,381,383,385],{"class":259,"style":260},[257,382,303],{"style":263},[257,384,366],{"style":267},[257,386,378],{"style":263},[257,388,389],{"class":259,"style":260},[257,390,391],{"style":267},"})",[247,393,396],{"language":249,"filename":394,"code":395,"class":252},"Rename files","import { pluginFaker } from '@kubb\u002Fplugin-faker'\n\npluginFaker({\n resolver: {\n file: {\n \u002F\u002F Pet.mock.ts instead of the default createPet.ts\n baseName({ name, extname }) {\n return `${name}.mock${extname}`\n },\n },\n },\n})",[48,397,398,288,414,288,416,288,423,288,433,288,444,288,451,288,471,288,498,288,506,288,514,288,522],{"class":255},[257,399,400,402,404,407,409,411],{"class":259,"style":260},[257,401,264],{"style":263},[257,403,268],{"style":267},[257,405,406],{"style":271},"pluginFaker ",[257,408,280],{"style":267},[257,410,283],{"style":263},[257,412,413],{"style":286},"'@kubb\u002Fplugin-faker'",[257,415],{"class":259,"style":260},[257,417,418,421],{"class":259,"style":260},[257,419,420],{"style":295},"pluginFaker",[257,422,298],{"style":267},[257,424,425,427,429,431],{"class":259,"style":260},[257,426,303],{"style":267},[257,428,50],{"style":267},[257,430,308],{"style":263},[257,432,311],{"style":267},[257,434,435,437,440,442],{"class":259,"style":260},[257,436,316],{"style":267},[257,438,439],{"style":267},"file",[257,441,308],{"style":263},[257,443,311],{"style":267},[257,445,446,448],{"class":259,"style":260},[257,447,340],{"style":267},[257,449,450],{"style":319},"\u002F\u002F Pet.mock.ts instead of the default createPet.ts",[257,452,453,455,458,461,463,465,468],{"class":259,"style":260},[257,454,340],{"style":319},[257,456,457],{"style":295},"baseName",[257,459,460],{"style":267},"({ ",[257,462,327],{"style":271},[257,464,91],{"style":263},[257,466,467],{"style":271},"extname ",[257,469,470],{"style":267},"}) {",[257,472,473,476,478,480,482,484,486,489,491,494,496],{"class":259,"style":260},[257,474,475],{"style":267}," ",[257,477,343],{"style":263},[257,479,369],{"style":286},[257,481,349],{"style":271},[257,483,327],{"style":271},[257,485,366],{"style":271},[257,487,488],{"style":286},".mock",[257,490,349],{"style":271},[257,492,493],{"style":271},"extname",[257,495,366],{"style":271},[257,497,369],{"style":286},[257,499,500,502,504],{"class":259,"style":260},[257,501,340],{"style":286},[257,503,366],{"style":267},[257,505,378],{"style":263},[257,507,508,510,512],{"class":259,"style":260},[257,509,316],{"style":263},[257,511,366],{"style":267},[257,513,378],{"style":263},[257,515,516,518,520],{"class":259,"style":260},[257,517,303],{"style":263},[257,519,366],{"style":267},[257,521,378],{"style":263},[257,523,524],{"class":259,"style":260},[257,525,391],{"style":267},[247,527,530],{"language":249,"filename":528,"code":529,"class":252},"Move files","import { pluginFaker } from '@kubb\u002Fplugin-faker'\n\npluginFaker({\n resolver: {\n file: {\n \u002F\u002F src\u002Fgen\u002Ffixtures\u002F instead of src\u002Fgen\u002Fmocks\u002F\n path({ baseName }) {\n return `fixtures\u002F${baseName}`\n },\n },\n },\n})",[48,531,532,288,546,288,548,288,554,288,564,288,574,288,581,288,595,288,612,288,620,288,628,288,636],{"class":255},[257,533,534,536,538,540,542,544],{"class":259,"style":260},[257,535,264],{"style":263},[257,537,268],{"style":267},[257,539,406],{"style":271},[257,541,280],{"style":267},[257,543,283],{"style":263},[257,545,413],{"style":286},[257,547],{"class":259,"style":260},[257,549,550,552],{"class":259,"style":260},[257,551,420],{"style":295},[257,553,298],{"style":267},[257,555,556,558,560,562],{"class":259,"style":260},[257,557,303],{"style":267},[257,559,50],{"style":267},[257,561,308],{"style":263},[257,563,311],{"style":267},[257,565,566,568,570,572],{"class":259,"style":260},[257,567,316],{"style":267},[257,569,439],{"style":267},[257,571,308],{"style":263},[257,573,311],{"style":267},[257,575,576,578],{"class":259,"style":260},[257,577,340],{"style":267},[257,579,580],{"style":319},"\u002F\u002F src\u002Fgen\u002Ffixtures\u002F instead of src\u002Fgen\u002Fmocks\u002F",[257,582,583,585,588,590,593],{"class":259,"style":260},[257,584,340],{"style":319},[257,586,587],{"style":295},"path",[257,589,460],{"style":267},[257,591,592],{"style":271},"baseName ",[257,594,470],{"style":267},[257,596,597,599,601,604,606,608,610],{"class":259,"style":260},[257,598,475],{"style":267},[257,600,343],{"style":263},[257,602,603],{"style":286},"`fixtures\u002F",[257,605,349],{"style":271},[257,607,457],{"style":271},[257,609,366],{"style":271},[257,611,369],{"style":286},[257,613,614,616,618],{"class":259,"style":260},[257,615,340],{"style":286},[257,617,366],{"style":267},[257,619,378],{"style":263},[257,621,622,624,626],{"class":259,"style":260},[257,623,316],{"style":263},[257,625,366],{"style":267},[257,627,378],{"style":263},[257,629,630,632,634],{"class":259,"style":260},[257,631,303],{"style":263},[257,633,366],{"style":267},[257,635,378],{"style":263},[257,637,638],{"class":259,"style":260},[257,639,391],{"style":267},[247,641,644],{"language":249,"filename":642,"code":643,"class":252},"Query keys","import { pluginReactQuery } from '@kubb\u002Fplugin-react-query'\n\npluginReactQuery({\n resolver: {\n query: {\n \u002F\u002F this.name keeps the active naming rule: getPetByIdKey\n keyName(node) {\n return `${this.name(node.operationId)}Key`\n },\n },\n },\n})",[48,645,646,288,662,288,664,288,671,288,681,288,692,288,699,288,713,288,745,288,753,288,761,288,769],{"class":255},[257,647,648,650,652,655,657,659],{"class":259,"style":260},[257,649,264],{"style":263},[257,651,268],{"style":267},[257,653,654],{"style":271},"pluginReactQuery ",[257,656,280],{"style":267},[257,658,283],{"style":263},[257,660,661],{"style":286},"'@kubb\u002Fplugin-react-query'",[257,663],{"class":259,"style":260},[257,665,666,669],{"class":259,"style":260},[257,667,668],{"style":295},"pluginReactQuery",[257,670,298],{"style":267},[257,672,673,675,677,679],{"class":259,"style":260},[257,674,303],{"style":267},[257,676,50],{"style":267},[257,678,308],{"style":263},[257,680,311],{"style":267},[257,682,683,685,688,690],{"class":259,"style":260},[257,684,316],{"style":267},[257,686,687],{"style":267},"query",[257,689,308],{"style":263},[257,691,311],{"style":267},[257,693,694,696],{"class":259,"style":260},[257,695,340],{"style":267},[257,697,698],{"style":319},"\u002F\u002F this.name keeps the active naming rule: getPetByIdKey",[257,700,701,703,706,708,711],{"class":259,"style":260},[257,702,340],{"style":319},[257,704,705],{"style":295},"keyName",[257,707,330],{"style":267},[257,709,710],{"style":271},"node",[257,712,335],{"style":267},[257,714,715,717,719,721,723,725,727,729,731,733,735,738,740,742],{"class":259,"style":260},[257,716,475],{"style":267},[257,718,343],{"style":263},[257,720,369],{"style":286},[257,722,349],{"style":271},[257,724,112],{"style":271},[257,726,121],{"style":263},[257,728,327],{"style":295},[257,730,330],{"style":267},[257,732,710],{"style":271},[257,734,121],{"style":263},[257,736,737],{"style":267},"operationId",[257,739,363],{"style":267},[257,741,366],{"style":271},[257,743,744],{"style":286},"Key`",[257,746,747,749,751],{"class":259,"style":260},[257,748,340],{"style":286},[257,750,366],{"style":267},[257,752,378],{"style":263},[257,754,755,757,759],{"class":259,"style":260},[257,756,316],{"style":263},[257,758,366],{"style":267},[257,760,378],{"style":263},[257,762,763,765,767],{"class":259,"style":260},[257,764,303],{"style":263},[257,766,366],{"style":267},[257,768,378],{"style":263},[257,770,771],{"class":259,"style":260},[257,772,391],{"style":267},[247,774,777],{"language":249,"filename":775,"code":776,"class":252},"Response types","import { pluginTs } from '@kubb\u002Fplugin-ts'\n\npluginTs({\n resolver: {\n response: {\n \u002F\u002F GetPetById200Response instead of GetPetByIdStatus200\n status(node, statusCode) {\n return this.name(`${node.operationId} ${statusCode} response`)\n },\n },\n },\n})",[48,778,779,288,794,288,796,288,802,288,812,288,823,288,830,288,848,288,888,288,895,288,903,288,911],{"class":255},[257,780,781,783,785,788,790,792],{"class":259,"style":260},[257,782,264],{"style":263},[257,784,268],{"style":267},[257,786,787],{"style":271},"pluginTs ",[257,789,280],{"style":267},[257,791,283],{"style":263},[257,793,287],{"style":286},[257,795],{"class":259,"style":260},[257,797,798,800],{"class":259,"style":260},[257,799,272],{"style":295},[257,801,298],{"style":267},[257,803,804,806,808,810],{"class":259,"style":260},[257,805,303],{"style":267},[257,807,50],{"style":267},[257,809,308],{"style":263},[257,811,311],{"style":267},[257,813,814,816,819,821],{"class":259,"style":260},[257,815,316],{"style":267},[257,817,818],{"style":267},"response",[257,820,308],{"style":263},[257,822,311],{"style":267},[257,824,825,827],{"class":259,"style":260},[257,826,340],{"style":267},[257,828,829],{"style":319},"\u002F\u002F GetPetById200Response instead of GetPetByIdStatus200",[257,831,832,834,837,839,841,843,846],{"class":259,"style":260},[257,833,340],{"style":319},[257,835,836],{"style":295},"status",[257,838,330],{"style":267},[257,840,710],{"style":271},[257,842,91],{"style":263},[257,844,845],{"style":271},"statusCode",[257,847,335],{"style":267},[257,849,850,852,854,856,858,860,862,864,866,868,870,872,874,877,879,881,883,886],{"class":259,"style":260},[257,851,475],{"style":267},[257,853,343],{"style":263},[257,855,112],{"style":271},[257,857,121],{"style":263},[257,859,327],{"style":295},[257,861,330],{"style":267},[257,863,369],{"style":286},[257,865,349],{"style":271},[257,867,710],{"style":271},[257,869,121],{"style":263},[257,871,737],{"style":267},[257,873,366],{"style":271},[257,875,876],{"style":286}," ",[257,878,349],{"style":271},[257,880,845],{"style":271},[257,882,366],{"style":271},[257,884,885],{"style":286}," response`",[257,887,363],{"style":267},[257,889,890,893],{"class":259,"style":260},[257,891,892],{"style":267}," }",[257,894,378],{"style":263},[257,896,897,899,901],{"class":259,"style":260},[257,898,316],{"style":263},[257,900,366],{"style":267},[257,902,378],{"style":263},[257,904,905,907,909],{"class":259,"style":260},[257,906,303],{"style":263},[257,908,366],{"style":267},[257,910,378],{"style":263},[257,912,913],{"class":259,"style":260},[257,914,391],{"style":267},[106,916,918,919,922,923,926,927,930,931,933,934,937],{"as":917},"warning","",[48,920,921],{},"file.path"," replaces the plugin's ",[48,924,925],{},"output.path"," and ",[48,928,929],{},"group"," layout. The returned path resolves against the root ",[48,932,925],{}," and must stay inside it. Moved files get no ",[48,935,936],{},"index.ts"," barrel.",[123,939,940],{"id":66},"Macros",[10,942,943,944,947,948,951],{},"A macro rewrites schema or operation nodes before any template runs. Define one with ",[48,945,946],{},"defineMacro"," from ",[48,949,950],{},"kubb\u002Fkit",":",[14,953,954,964],{},[17,955,956],{},[20,957,958,961],{},[23,959,960],{},"Field",[23,962,963],{},"What it does",[33,965,966,975,994,1004],{},[20,967,968,972],{},[38,969,970],{},[48,971,327],{},[38,973,974],{},"Identifies the macro",[20,976,977,987],{},[38,978,979,980,983,984],{},"A callback per node kind, such as ",[48,981,982],{},"schema"," or ",[48,985,986],{},"operation",[38,988,989,990,993],{},"Returns a replacement node, or ",[48,991,992],{},"undefined"," to keep the node",[20,995,996,1001],{},[38,997,998],{},[48,999,1000],{},"match",[38,1002,1003],{},"Skips nodes the macro does not care about",[20,1005,1006,1011],{},[38,1007,1008],{},[48,1009,1010],{},"enforce: 'pre' | 'post'",[38,1012,1013,1014],{},"Runs the macro before or after macros without ",[48,1015,1016],{},"enforce",[10,1018,1019,1025],{},[44,1020,1022],{"href":1021},"\u002Fdocs\u002F5.x\u002Freference\u002Fkit\u002Fast#macros",[48,1023,1024],{},"ast.macro"," lists every callback.",[244,1027,1028,1260],{},[247,1029,1032],{"language":249,"filename":1030,"code":1031,"class":252},"macroIntegerToString.ts","import { ast, defineMacro } from 'kubb\u002Fkit'\n\nexport const macroIntegerToString = defineMacro({\n name: 'integer-to-string',\n schema(node) {\n if (node.type !== 'integer') return undefined\n \u002F\u002F Copy only fields a string schema has: `min`, `max`, `primitive`, and `format` mean something else on an integer.\n const { name, title, description, nullable, optional, deprecated, readOnly, writeOnly } = node\n return ast.factory.createSchema({ type: 'string', name, title, description, nullable, optional, deprecated, readOnly, writeOnly })\n },\n})",[48,1033,1034,288,1055,288,1057,288,1075,288,1088,288,1100,288,1129,288,1136,288,1187,288,1249,288,1256],{"class":255},[257,1035,1036,1038,1040,1043,1045,1048,1050,1052],{"class":259,"style":260},[257,1037,264],{"style":263},[257,1039,268],{"style":267},[257,1041,1042],{"style":271},"ast",[257,1044,91],{"style":263},[257,1046,1047],{"style":271},"defineMacro ",[257,1049,280],{"style":267},[257,1051,283],{"style":263},[257,1053,1054],{"style":286},"'kubb\u002Fkit'",[257,1056],{"class":259,"style":260},[257,1058,1059,1062,1065,1068,1071,1073],{"class":259,"style":260},[257,1060,1061],{"style":263},"export ",[257,1063,1064],{"style":263},"const ",[257,1066,1067],{"style":271},"macroIntegerToString ",[257,1069,1070],{"style":263},"= ",[257,1072,946],{"style":295},[257,1074,298],{"style":267},[257,1076,1077,1079,1081,1083,1086],{"class":259,"style":260},[257,1078,303],{"style":267},[257,1080,327],{"style":267},[257,1082,308],{"style":263},[257,1084,1085],{"style":286},"'integer-to-string'",[257,1087,378],{"style":263},[257,1089,1090,1092,1094,1096,1098],{"class":259,"style":260},[257,1091,303],{"style":263},[257,1093,982],{"style":295},[257,1095,330],{"style":267},[257,1097,710],{"style":271},[257,1099,335],{"style":267},[257,1101,1102,1104,1107,1109,1111,1113,1116,1119,1122,1125,1127],{"class":259,"style":260},[257,1103,316],{"style":267},[257,1105,1106],{"style":263},"if ",[257,1108,330],{"style":267},[257,1110,710],{"style":271},[257,1112,121],{"style":263},[257,1114,1115],{"style":267},"type ",[257,1117,1118],{"style":263},"!== ",[257,1120,1121],{"style":286},"'integer'",[257,1123,1124],{"style":267},") ",[257,1126,343],{"style":263},[257,1128,992],{"style":267},[257,1130,1131,1133],{"class":259,"style":260},[257,1132,316],{"style":267},[257,1134,1135],{"style":319},"\u002F\u002F Copy only fields a string schema has: `min`, `max`, `primitive`, and `format` mean something else on an integer.",[257,1137,1138,1140,1142,1144,1146,1148,1151,1153,1156,1158,1161,1163,1166,1168,1171,1173,1176,1178,1181,1183,1185],{"class":259,"style":260},[257,1139,316],{"style":319},[257,1141,1064],{"style":263},[257,1143,268],{"style":267},[257,1145,327],{"style":271},[257,1147,91],{"style":263},[257,1149,1150],{"style":271},"title",[257,1152,91],{"style":263},[257,1154,1155],{"style":271},"description",[257,1157,91],{"style":263},[257,1159,1160],{"style":271},"nullable",[257,1162,91],{"style":263},[257,1164,1165],{"style":271},"optional",[257,1167,91],{"style":263},[257,1169,1170],{"style":271},"deprecated",[257,1172,91],{"style":263},[257,1174,1175],{"style":271},"readOnly",[257,1177,91],{"style":263},[257,1179,1180],{"style":271},"writeOnly ",[257,1182,280],{"style":267},[257,1184,1070],{"style":263},[257,1186,710],{"style":271},[257,1188,1189,1191,1193,1195,1197,1200,1202,1205,1207,1210,1212,1215,1217,1219,1221,1223,1225,1227,1229,1231,1233,1235,1237,1239,1241,1243,1245,1247],{"class":259,"style":260},[257,1190,316],{"style":271},[257,1192,343],{"style":263},[257,1194,1042],{"style":271},[257,1196,121],{"style":263},[257,1198,1199],{"style":267},"factory",[257,1201,121],{"style":263},[257,1203,1204],{"style":295},"createSchema",[257,1206,460],{"style":267},[257,1208,1209],{"style":267},"type",[257,1211,308],{"style":263},[257,1213,1214],{"style":286},"'string'",[257,1216,91],{"style":263},[257,1218,327],{"style":271},[257,1220,91],{"style":263},[257,1222,1150],{"style":271},[257,1224,91],{"style":263},[257,1226,1155],{"style":271},[257,1228,91],{"style":263},[257,1230,1160],{"style":271},[257,1232,91],{"style":263},[257,1234,1165],{"style":271},[257,1236,91],{"style":263},[257,1238,1170],{"style":271},[257,1240,91],{"style":263},[257,1242,1175],{"style":271},[257,1244,91],{"style":263},[257,1246,1180],{"style":271},[257,1248,391],{"style":267},[257,1250,1251,1254],{"class":259,"style":260},[257,1252,1253],{"style":267}," }",[257,1255,378],{"style":263},[257,1257,1258],{"class":259,"style":260},[257,1259,391],{"style":267},[247,1261,1264],{"language":249,"filename":1262,"code":1263,"class":252},"macroUntagged.ts","import { defineMacro } from 'kubb\u002Fkit'\n\nexport const macroUntagged = defineMacro({\n name: 'untagged',\n enforce: 'post',\n match: (node) => node.kind === 'Operation',\n operation(node) {\n return node.tags?.length ? undefined : { ...node, tags: ['untagged'] }\n },\n})",[48,1265,1266,288,1280,288,1282,288,1297,288,1310,288,1323,288,1355,288,1367,288,1415,288,1421],{"class":255},[257,1267,1268,1270,1272,1274,1276,1278],{"class":259,"style":260},[257,1269,264],{"style":263},[257,1271,268],{"style":267},[257,1273,1047],{"style":271},[257,1275,280],{"style":267},[257,1277,283],{"style":263},[257,1279,1054],{"style":286},[257,1281],{"class":259,"style":260},[257,1283,1284,1286,1288,1291,1293,1295],{"class":259,"style":260},[257,1285,1061],{"style":263},[257,1287,1064],{"style":263},[257,1289,1290],{"style":271},"macroUntagged ",[257,1292,1070],{"style":263},[257,1294,946],{"style":295},[257,1296,298],{"style":267},[257,1298,1299,1301,1303,1305,1308],{"class":259,"style":260},[257,1300,303],{"style":267},[257,1302,327],{"style":267},[257,1304,308],{"style":263},[257,1306,1307],{"style":286},"'untagged'",[257,1309,378],{"style":263},[257,1311,1312,1314,1316,1318,1321],{"class":259,"style":260},[257,1313,303],{"style":263},[257,1315,1016],{"style":267},[257,1317,308],{"style":263},[257,1319,1320],{"style":286},"'post'",[257,1322,378],{"style":263},[257,1324,1325,1327,1329,1331,1333,1335,1337,1340,1342,1344,1347,1350,1353],{"class":259,"style":260},[257,1326,303],{"style":263},[257,1328,1000],{"style":267},[257,1330,308],{"style":263},[257,1332,330],{"style":267},[257,1334,710],{"style":271},[257,1336,1124],{"style":267},[257,1338,1339],{"style":263},"=> ",[257,1341,710],{"style":271},[257,1343,121],{"style":263},[257,1345,1346],{"style":267},"kind ",[257,1348,1349],{"style":263},"=== ",[257,1351,1352],{"style":286},"'Operation'",[257,1354,378],{"style":263},[257,1356,1357,1359,1361,1363,1365],{"class":259,"style":260},[257,1358,303],{"style":263},[257,1360,986],{"style":295},[257,1362,330],{"style":267},[257,1364,710],{"style":271},[257,1366,335],{"style":267},[257,1368,1369,1371,1373,1375,1377,1380,1383,1386,1389,1392,1394,1396,1399,1401,1403,1405,1407,1410,1412],{"class":259,"style":260},[257,1370,316],{"style":267},[257,1372,343],{"style":263},[257,1374,710],{"style":271},[257,1376,121],{"style":263},[257,1378,1379],{"style":267},"tags",[257,1381,1382],{"style":263},"?.",[257,1384,1385],{"style":267},"length ",[257,1387,1388],{"style":263},"? ",[257,1390,1391],{"style":267},"undefined ",[257,1393,308],{"style":263},[257,1395,268],{"style":267},[257,1397,1398],{"style":263},"...",[257,1400,710],{"style":271},[257,1402,91],{"style":263},[257,1404,1379],{"style":267},[257,1406,308],{"style":263},[257,1408,1409],{"style":267},"[",[257,1411,1307],{"style":286},[257,1413,1414],{"style":267},"] }",[257,1416,1417,1419],{"class":259,"style":260},[257,1418,1253],{"style":267},[257,1420,378],{"style":263},[257,1422,1423],{"class":259,"style":260},[257,1424,391],{"style":267},[1426,1427,1429],"h3",{"id":1428},"register-a-macro","Register a macro",[10,1431,1432,1433,1435,1436,1439,1440,1443,1444,1446,1447,1449,1450,1452,1453,1456,1457,1459],{},"Pass macros through a plugin's ",[48,1434,66],{}," option, or register them in your own plugin's ",[48,1437,1438],{},"setup"," with the ",[48,1441,1442],{},"addMacro"," composable. A plugin passes its own ",[48,1445,66],{}," option to ",[48,1448,1442],{}," too. Within the same ",[48,1451,1016],{}," group, macros run in the order they are added, so the user's macros run after the plugin's. A macro with ",[48,1454,1455],{},"enforce: 'pre'"," still runs before one without ",[48,1458,1016],{},". Macros run per plugin, so they never change the nodes another plugin sees.",[247,1461,1464],{"language":249,"filename":1462,"code":1463,"class":252},"plugin.ts","import { addMacro, ast, defineExtension, defineMacro, type PluginType } from 'kubb\u002Fkit'\n\nconst macroDropDescriptions = defineMacro({\n name: 'drop-descriptions',\n schema(node) {\n return 'description' in node && node.description ? { ...node, description: undefined } : undefined\n },\n})\n\ntype PluginRename = PluginType\u003C'plugin-rename', { macros?: Array\u003Cast.Macro> }>\n\nexport const pluginRename = defineExtension\u003CPluginRename>({\n kind: 'plugin',\n meta: { name: 'plugin-rename' },\n setup(options) {\n addMacro(macroDropDescriptions, ...(options.macros ?? []))\n return options\n },\n})",[48,1465,1466,288,1500,288,1502,288,1515,288,1528,288,1540,288,1587,288,1595,288,1599,288,1601,288,1648,288,1650,288,1672,288,1686,288,1708,288,1721,288,1751,288,1759,288,1767],{"class":255},[257,1467,1468,1470,1472,1474,1476,1478,1480,1483,1485,1487,1489,1491,1494,1496,1498],{"class":259,"style":260},[257,1469,264],{"style":263},[257,1471,268],{"style":267},[257,1473,1442],{"style":271},[257,1475,91],{"style":263},[257,1477,1042],{"style":271},[257,1479,91],{"style":263},[257,1481,1482],{"style":271},"defineExtension",[257,1484,91],{"style":263},[257,1486,946],{"style":271},[257,1488,91],{"style":263},[257,1490,1115],{"style":263},[257,1492,1493],{"style":295},"PluginType ",[257,1495,280],{"style":267},[257,1497,283],{"style":263},[257,1499,1054],{"style":286},[257,1501],{"class":259,"style":260},[257,1503,1504,1506,1509,1511,1513],{"class":259,"style":260},[257,1505,1064],{"style":263},[257,1507,1508],{"style":271},"macroDropDescriptions ",[257,1510,1070],{"style":263},[257,1512,946],{"style":295},[257,1514,298],{"style":267},[257,1516,1517,1519,1521,1523,1526],{"class":259,"style":260},[257,1518,303],{"style":267},[257,1520,327],{"style":267},[257,1522,308],{"style":263},[257,1524,1525],{"style":286},"'drop-descriptions'",[257,1527,378],{"style":263},[257,1529,1530,1532,1534,1536,1538],{"class":259,"style":260},[257,1531,303],{"style":263},[257,1533,982],{"style":295},[257,1535,330],{"style":267},[257,1537,710],{"style":271},[257,1539,335],{"style":267},[257,1541,1542,1544,1546,1549,1552,1555,1558,1560,1562,1565,1567,1569,1571,1573,1575,1577,1579,1581,1583,1585],{"class":259,"style":260},[257,1543,316],{"style":267},[257,1545,343],{"style":263},[257,1547,1548],{"style":286},"'description' ",[257,1550,1551],{"style":263},"in ",[257,1553,1554],{"style":271},"node ",[257,1556,1557],{"style":263},"&& ",[257,1559,710],{"style":271},[257,1561,121],{"style":263},[257,1563,1564],{"style":267},"description ",[257,1566,1388],{"style":263},[257,1568,268],{"style":267},[257,1570,1398],{"style":263},[257,1572,710],{"style":271},[257,1574,91],{"style":263},[257,1576,1155],{"style":267},[257,1578,308],{"style":263},[257,1580,1391],{"style":267},[257,1582,280],{"style":267},[257,1584,308],{"style":263},[257,1586,992],{"style":267},[257,1588,1589,1591,1593],{"class":259,"style":260},[257,1590,303],{"style":267},[257,1592,366],{"style":267},[257,1594,378],{"style":263},[257,1596,1597],{"class":259,"style":260},[257,1598,391],{"style":267},[257,1600],{"class":259,"style":260},[257,1602,1603,1605,1608,1610,1613,1616,1619,1621,1623,1625,1628,1631,1633,1635,1637,1640,1643,1645],{"class":259,"style":260},[257,1604,1115],{"style":263},[257,1606,1607],{"style":295},"PluginRename ",[257,1609,1070],{"style":263},[257,1611,1612],{"style":295},"PluginType",[257,1614,1615],{"style":263},"\u003C",[257,1617,1618],{"style":286},"'plugin-rename'",[257,1620,91],{"style":263},[257,1622,268],{"style":267},[257,1624,66],{"style":267},[257,1626,1627],{"style":271},"?: ",[257,1629,1630],{"style":295},"Array",[257,1632,1615],{"style":263},[257,1634,1042],{"style":271},[257,1636,121],{"style":263},[257,1638,1639],{"style":267},"Macro",[257,1641,1642],{"style":263},"> ",[257,1644,366],{"style":267},[257,1646,1647],{"style":263},">",[257,1649],{"class":259,"style":260},[257,1651,1652,1654,1656,1659,1661,1663,1665,1668,1670],{"class":259,"style":260},[257,1653,1061],{"style":263},[257,1655,1064],{"style":263},[257,1657,1658],{"style":271},"pluginRename ",[257,1660,1070],{"style":263},[257,1662,1482],{"style":271},[257,1664,1615],{"style":263},[257,1666,1667],{"style":295},"PluginRename",[257,1669,1647],{"style":263},[257,1671,298],{"style":267},[257,1673,1674,1676,1679,1681,1684],{"class":259,"style":260},[257,1675,303],{"style":267},[257,1677,1678],{"style":267},"kind",[257,1680,308],{"style":263},[257,1682,1683],{"style":286},"'plugin'",[257,1685,378],{"style":263},[257,1687,1688,1690,1693,1695,1697,1699,1701,1704,1706],{"class":259,"style":260},[257,1689,303],{"style":263},[257,1691,1692],{"style":267},"meta",[257,1694,308],{"style":263},[257,1696,268],{"style":267},[257,1698,327],{"style":267},[257,1700,308],{"style":263},[257,1702,1703],{"style":286},"'plugin-rename' ",[257,1705,366],{"style":267},[257,1707,378],{"style":263},[257,1709,1710,1712,1714,1716,1719],{"class":259,"style":260},[257,1711,303],{"style":263},[257,1713,1438],{"style":295},[257,1715,330],{"style":267},[257,1717,1718],{"style":271},"options",[257,1720,335],{"style":267},[257,1722,1723,1725,1727,1729,1732,1734,1736,1738,1740,1742,1745,1748],{"class":259,"style":260},[257,1724,316],{"style":267},[257,1726,1442],{"style":295},[257,1728,330],{"style":267},[257,1730,1731],{"style":271},"macroDropDescriptions",[257,1733,91],{"style":263},[257,1735,1398],{"style":263},[257,1737,330],{"style":267},[257,1739,1718],{"style":271},[257,1741,121],{"style":263},[257,1743,1744],{"style":267},"macros ",[257,1746,1747],{"style":263},"?? ",[257,1749,1750],{"style":267},"[]))",[257,1752,1753,1755,1757],{"class":259,"style":260},[257,1754,316],{"style":267},[257,1756,343],{"style":263},[257,1758,1718],{"style":271},[257,1760,1761,1763,1765],{"class":259,"style":260},[257,1762,303],{"style":271},[257,1764,366],{"style":267},[257,1766,378],{"style":263},[257,1768,1769],{"class":259,"style":260},[257,1770,391],{"style":267},[10,1772,1773,1774,926,1777,1779,1780,1783],{},"The diagram applies ",[48,1775,1776],{},"macroIntegerToString",[48,1778,1731],{}," to a ",[48,1781,1782],{},"Pet"," node. Hover a line to see which macro changed it.",[1785,1786],"flow-diagram",{"preset":66},[106,1788,1789],{"as":108},"Keep macros pure. Return a new node instead of mutating the input, because every plugin shares the same AST nodes.",[1426,1791,1793],{"id":1792},"rename-a-schema","Rename a schema",[106,1795,1796,1797,1800,1801,1804],{"as":917},"Renaming only the declaration leaves every ",[48,1798,1799],{},"$ref"," on the old name, so imports point at a file the plugin no longer writes. Rename the declaration and set ",[48,1802,1803],{},"targetName"," on every ref in one macro, and register it on every plugin that reads the schema.",[10,1806,1807,1810,1811,1813],{},[48,1808,1809],{},"macroRenameSchema"," does both. Pass one shared ",[48,1812,66],{}," array to each plugin:",[244,1815,1816,2204],{},[247,1817,1820],{"language":249,"filename":1818,"code":1819,"class":252},"macroRenameSchema.ts","import { ast, defineMacro } from 'kubb\u002Fkit'\n\nexport function macroRenameSchema({ from, to }: { from: string; to: string }) {\n return defineMacro({\n name: 'rename-schema',\n schema(node) {\n const refNode = ast.schema.narrow(node, 'ref')\n\n if (!refNode) {\n return node.name === from ? { ...node, name: to } : undefined\n }\n\n \u002F\u002F A ref node can be the renamed schema's own declaration, a pointer to it, or both at once.\n const renamesDeclaration = refNode.name === from\n const renamesTarget = ast.ref.getName(refNode) === from\n if (!renamesDeclaration && !renamesTarget) return undefined\n\n return {\n ...refNode,\n ...(renamesDeclaration ? { name: to } : {}),\n ...(renamesTarget ? { targetName: to } : {}),\n }\n },\n })\n}",[48,1821,1822,288,1840,288,1842,288,1887,288,1897,288,1910,288,1922,288,1955,288,1957,288,1972,288,2011,288,2017,288,2019,288,2026,288,2047,288,2080,288,2104,288,2106,288,2114,288,2124,288,2153,288,2181,288,2187,288,2194,288,2200],{"class":255},[257,1823,1824,1826,1828,1830,1832,1834,1836,1838],{"class":259,"style":260},[257,1825,264],{"style":263},[257,1827,268],{"style":267},[257,1829,1042],{"style":271},[257,1831,91],{"style":263},[257,1833,1047],{"style":271},[257,1835,280],{"style":267},[257,1837,283],{"style":263},[257,1839,1054],{"style":286},[257,1841],{"class":259,"style":260},[257,1843,1844,1846,1849,1851,1853,1856,1858,1861,1863,1865,1867,1869,1871,1874,1877,1880,1882,1885],{"class":259,"style":260},[257,1845,1061],{"style":263},[257,1847,1848],{"style":263},"function ",[257,1850,1809],{"style":295},[257,1852,460],{"style":267},[257,1854,1855],{"style":271},"from",[257,1857,91],{"style":263},[257,1859,1860],{"style":271},"to ",[257,1862,366],{"style":267},[257,1864,308],{"style":263},[257,1866,268],{"style":267},[257,1868,1855],{"style":267},[257,1870,308],{"style":271},[257,1872,1873],{"style":295},"string",[257,1875,1876],{"style":263},"; ",[257,1878,1879],{"style":267},"to",[257,1881,308],{"style":271},[257,1883,1884],{"style":295},"string ",[257,1886,470],{"style":267},[257,1888,1889,1891,1893,1895],{"class":259,"style":260},[257,1890,303],{"style":267},[257,1892,343],{"style":263},[257,1894,946],{"style":295},[257,1896,298],{"style":267},[257,1898,1899,1901,1903,1905,1908],{"class":259,"style":260},[257,1900,316],{"style":267},[257,1902,327],{"style":267},[257,1904,308],{"style":263},[257,1906,1907],{"style":286},"'rename-schema'",[257,1909,378],{"style":263},[257,1911,1912,1914,1916,1918,1920],{"class":259,"style":260},[257,1913,316],{"style":263},[257,1915,982],{"style":295},[257,1917,330],{"style":267},[257,1919,710],{"style":271},[257,1921,335],{"style":267},[257,1923,1924,1926,1928,1931,1933,1935,1937,1939,1941,1944,1946,1948,1950,1953],{"class":259,"style":260},[257,1925,340],{"style":267},[257,1927,1064],{"style":263},[257,1929,1930],{"style":271},"refNode ",[257,1932,1070],{"style":263},[257,1934,1042],{"style":271},[257,1936,121],{"style":263},[257,1938,982],{"style":267},[257,1940,121],{"style":263},[257,1942,1943],{"style":295},"narrow",[257,1945,330],{"style":267},[257,1947,710],{"style":271},[257,1949,91],{"style":263},[257,1951,1952],{"style":286},"'ref'",[257,1954,363],{"style":267},[257,1956],{"class":259,"style":260},[257,1958,1959,1961,1963,1965,1967,1970],{"class":259,"style":260},[257,1960,340],{"style":267},[257,1962,1106],{"style":263},[257,1964,330],{"style":267},[257,1966,120],{"style":263},[257,1968,1969],{"style":271},"refNode",[257,1971,335],{"style":267},[257,1973,1974,1976,1978,1980,1982,1985,1987,1989,1991,1993,1995,1997,1999,2001,2003,2005,2007,2009],{"class":259,"style":260},[257,1975,475],{"style":267},[257,1977,343],{"style":263},[257,1979,710],{"style":271},[257,1981,121],{"style":263},[257,1983,1984],{"style":267},"name ",[257,1986,1349],{"style":263},[257,1988,283],{"style":271},[257,1990,1388],{"style":263},[257,1992,268],{"style":267},[257,1994,1398],{"style":263},[257,1996,710],{"style":271},[257,1998,91],{"style":263},[257,2000,327],{"style":267},[257,2002,308],{"style":263},[257,2004,1860],{"style":271},[257,2006,280],{"style":267},[257,2008,308],{"style":263},[257,2010,992],{"style":267},[257,2012,2013,2015],{"class":259,"style":260},[257,2014,340],{"style":267},[257,2016,366],{"style":267},[257,2018],{"class":259,"style":260},[257,2020,2021,2023],{"class":259,"style":260},[257,2022,340],{"style":267},[257,2024,2025],{"style":319},"\u002F\u002F A ref node can be the renamed schema's own declaration, a pointer to it, or both at once.",[257,2027,2028,2030,2032,2035,2037,2039,2041,2043,2045],{"class":259,"style":260},[257,2029,340],{"style":319},[257,2031,1064],{"style":263},[257,2033,2034],{"style":271},"renamesDeclaration ",[257,2036,1070],{"style":263},[257,2038,1969],{"style":271},[257,2040,121],{"style":263},[257,2042,1984],{"style":267},[257,2044,1349],{"style":263},[257,2046,1855],{"style":271},[257,2048,2049,2051,2053,2056,2058,2060,2062,2065,2067,2070,2072,2074,2076,2078],{"class":259,"style":260},[257,2050,340],{"style":271},[257,2052,1064],{"style":263},[257,2054,2055],{"style":271},"renamesTarget ",[257,2057,1070],{"style":263},[257,2059,1042],{"style":271},[257,2061,121],{"style":263},[257,2063,2064],{"style":267},"ref",[257,2066,121],{"style":263},[257,2068,2069],{"style":295},"getName",[257,2071,330],{"style":267},[257,2073,1969],{"style":271},[257,2075,1124],{"style":267},[257,2077,1349],{"style":263},[257,2079,1855],{"style":271},[257,2081,2082,2084,2086,2088,2090,2092,2095,2098,2100,2102],{"class":259,"style":260},[257,2083,340],{"style":271},[257,2085,1106],{"style":263},[257,2087,330],{"style":267},[257,2089,120],{"style":263},[257,2091,2034],{"style":271},[257,2093,2094],{"style":263},"&& !",[257,2096,2097],{"style":271},"renamesTarget",[257,2099,1124],{"style":267},[257,2101,343],{"style":263},[257,2103,992],{"style":267},[257,2105],{"class":259,"style":260},[257,2107,2108,2110,2112],{"class":259,"style":260},[257,2109,340],{"style":267},[257,2111,343],{"style":263},[257,2113,311],{"style":267},[257,2115,2116,2118,2120,2122],{"class":259,"style":260},[257,2117,475],{"style":267},[257,2119,1398],{"style":263},[257,2121,1969],{"style":271},[257,2123,378],{"style":263},[257,2125,2126,2128,2130,2132,2134,2136,2138,2140,2142,2144,2146,2148,2151],{"class":259,"style":260},[257,2127,475],{"style":263},[257,2129,1398],{"style":263},[257,2131,330],{"style":267},[257,2133,2034],{"style":271},[257,2135,1388],{"style":263},[257,2137,268],{"style":267},[257,2139,327],{"style":267},[257,2141,308],{"style":263},[257,2143,1860],{"style":271},[257,2145,280],{"style":267},[257,2147,308],{"style":263},[257,2149,2150],{"style":267},"{})",[257,2152,378],{"style":263},[257,2154,2155,2157,2159,2161,2163,2165,2167,2169,2171,2173,2175,2177,2179],{"class":259,"style":260},[257,2156,475],{"style":263},[257,2158,1398],{"style":263},[257,2160,330],{"style":267},[257,2162,2055],{"style":271},[257,2164,1388],{"style":263},[257,2166,268],{"style":267},[257,2168,1803],{"style":267},[257,2170,308],{"style":263},[257,2172,1860],{"style":271},[257,2174,280],{"style":267},[257,2176,308],{"style":263},[257,2178,2150],{"style":267},[257,2180,378],{"style":263},[257,2182,2183,2185],{"class":259,"style":260},[257,2184,340],{"style":263},[257,2186,366],{"style":267},[257,2188,2189,2192],{"class":259,"style":260},[257,2190,2191],{"style":267}," }",[257,2193,378],{"style":263},[257,2195,2196,2198],{"class":259,"style":260},[257,2197,303],{"style":263},[257,2199,391],{"style":267},[257,2201,2202],{"class":259,"style":260},[257,2203,366],{"style":267},[247,2205,2208],{"language":249,"filename":2206,"code":2207,"class":252},"kubb.config.ts","import { defineConfig } from 'kubb\u002Fconfig'\nimport { pluginTs } from '@kubb\u002Fplugin-ts'\nimport { pluginZod } from '@kubb\u002Fplugin-zod'\nimport { macroRenameSchema } from '.\u002FmacroRenameSchema.ts'\n\nconst macros = [macroRenameSchema({ from: 'Order', to: 'StoreOrder' })]\n\nexport default defineConfig({\n input: '.\u002FpetStore.yaml',\n output: { path: '.\u002Fsrc\u002Fgen' },\n plugins: [pluginTs({ macros }), pluginZod({ macros })],\n})",[48,2209,2210,288,2226,288,2240,288,2256,288,2272,288,2274,288,2307,288,2309,288,2321,288,2335,288,2357,288,2389],{"class":255},[257,2211,2212,2214,2216,2219,2221,2223],{"class":259,"style":260},[257,2213,264],{"style":263},[257,2215,268],{"style":267},[257,2217,2218],{"style":271},"defineConfig ",[257,2220,280],{"style":267},[257,2222,283],{"style":263},[257,2224,2225],{"style":286},"'kubb\u002Fconfig'",[257,2227,2228,2230,2232,2234,2236,2238],{"class":259,"style":260},[257,2229,264],{"style":263},[257,2231,268],{"style":267},[257,2233,787],{"style":271},[257,2235,280],{"style":267},[257,2237,283],{"style":263},[257,2239,287],{"style":286},[257,2241,2242,2244,2246,2249,2251,2253],{"class":259,"style":260},[257,2243,264],{"style":263},[257,2245,268],{"style":267},[257,2247,2248],{"style":271},"pluginZod ",[257,2250,280],{"style":267},[257,2252,283],{"style":263},[257,2254,2255],{"style":286},"'@kubb\u002Fplugin-zod'",[257,2257,2258,2260,2262,2265,2267,2269],{"class":259,"style":260},[257,2259,264],{"style":263},[257,2261,268],{"style":267},[257,2263,2264],{"style":271},"macroRenameSchema ",[257,2266,280],{"style":267},[257,2268,283],{"style":263},[257,2270,2271],{"style":286},"'.\u002FmacroRenameSchema.ts'",[257,2273],{"class":259,"style":260},[257,2275,2276,2278,2280,2282,2284,2286,2288,2290,2292,2295,2297,2299,2301,2304],{"class":259,"style":260},[257,2277,1064],{"style":263},[257,2279,1744],{"style":271},[257,2281,1070],{"style":263},[257,2283,1409],{"style":267},[257,2285,1809],{"style":295},[257,2287,460],{"style":267},[257,2289,1855],{"style":267},[257,2291,308],{"style":263},[257,2293,2294],{"style":286},"'Order'",[257,2296,91],{"style":263},[257,2298,1879],{"style":267},[257,2300,308],{"style":263},[257,2302,2303],{"style":286},"'StoreOrder' ",[257,2305,2306],{"style":267},"})]",[257,2308],{"class":259,"style":260},[257,2310,2311,2313,2316,2319],{"class":259,"style":260},[257,2312,1061],{"style":263},[257,2314,2315],{"style":263},"default ",[257,2317,2318],{"style":295},"defineConfig",[257,2320,298],{"style":267},[257,2322,2323,2325,2328,2330,2333],{"class":259,"style":260},[257,2324,303],{"style":267},[257,2326,2327],{"style":267},"input",[257,2329,308],{"style":263},[257,2331,2332],{"style":286},"'.\u002FpetStore.yaml'",[257,2334,378],{"style":263},[257,2336,2337,2339,2342,2344,2346,2348,2350,2353,2355],{"class":259,"style":260},[257,2338,303],{"style":263},[257,2340,2341],{"style":267},"output",[257,2343,308],{"style":263},[257,2345,268],{"style":267},[257,2347,587],{"style":267},[257,2349,308],{"style":263},[257,2351,2352],{"style":286},"'.\u002Fsrc\u002Fgen' ",[257,2354,366],{"style":267},[257,2356,378],{"style":263},[257,2358,2359,2361,2364,2366,2368,2370,2372,2374,2376,2378,2381,2383,2385,2387],{"class":259,"style":260},[257,2360,303],{"style":263},[257,2362,2363],{"style":267},"plugins",[257,2365,308],{"style":263},[257,2367,1409],{"style":267},[257,2369,272],{"style":295},[257,2371,460],{"style":267},[257,2373,1744],{"style":271},[257,2375,391],{"style":267},[257,2377,91],{"style":263},[257,2379,2380],{"style":295},"pluginZod",[257,2382,460],{"style":267},[257,2384,1744],{"style":271},[257,2386,2306],{"style":267},[257,2388,378],{"style":263},[257,2390,2391],{"class":259,"style":260},[257,2392,391],{"style":267},[1426,2394,2396],{"id":2395},"use-the-built-in-macros","Use the built-in macros",[10,2398,2399,2401,2402,2405],{},[48,2400,950],{}," exports ",[44,2403,2404],{"href":1021},"built-in macros"," for common normalizations. Combine them with your own:",[247,2407,2409],{"language":249,"filename":2206,"code":2408,"class":252},"import { defineConfig } from 'kubb\u002Fconfig'\nimport { macroDedupeUnion, macroDiscriminatorEnum } from 'kubb\u002Fkit'\nimport { pluginTs } from '@kubb\u002Fplugin-ts'\n\nexport default defineConfig({\n input: '.\u002FpetStore.yaml',\n output: { path: '.\u002Fsrc\u002Fgen' },\n plugins: [\n pluginTs({\n macros: [macroDedupeUnion, macroDiscriminatorEnum({ propertyName: 'kind', values: ['cat', 'dog'] })],\n }),\n ],\n})",[48,2410,2411,288,2425,288,2445,288,2459,288,2461,288,2471,288,2483,288,2503,288,2513,288,2521,288,2570,288,2578,288,2587],{"class":255},[257,2412,2413,2415,2417,2419,2421,2423],{"class":259,"style":260},[257,2414,264],{"style":263},[257,2416,268],{"style":267},[257,2418,2218],{"style":271},[257,2420,280],{"style":267},[257,2422,283],{"style":263},[257,2424,2225],{"style":286},[257,2426,2427,2429,2431,2434,2436,2439,2441,2443],{"class":259,"style":260},[257,2428,264],{"style":263},[257,2430,268],{"style":267},[257,2432,2433],{"style":271},"macroDedupeUnion",[257,2435,91],{"style":263},[257,2437,2438],{"style":271},"macroDiscriminatorEnum ",[257,2440,280],{"style":267},[257,2442,283],{"style":263},[257,2444,1054],{"style":286},[257,2446,2447,2449,2451,2453,2455,2457],{"class":259,"style":260},[257,2448,264],{"style":263},[257,2450,268],{"style":267},[257,2452,787],{"style":271},[257,2454,280],{"style":267},[257,2456,283],{"style":263},[257,2458,287],{"style":286},[257,2460],{"class":259,"style":260},[257,2462,2463,2465,2467,2469],{"class":259,"style":260},[257,2464,1061],{"style":263},[257,2466,2315],{"style":263},[257,2468,2318],{"style":295},[257,2470,298],{"style":267},[257,2472,2473,2475,2477,2479,2481],{"class":259,"style":260},[257,2474,303],{"style":267},[257,2476,2327],{"style":267},[257,2478,308],{"style":263},[257,2480,2332],{"style":286},[257,2482,378],{"style":263},[257,2484,2485,2487,2489,2491,2493,2495,2497,2499,2501],{"class":259,"style":260},[257,2486,303],{"style":263},[257,2488,2341],{"style":267},[257,2490,308],{"style":263},[257,2492,268],{"style":267},[257,2494,587],{"style":267},[257,2496,308],{"style":263},[257,2498,2352],{"style":286},[257,2500,366],{"style":267},[257,2502,378],{"style":263},[257,2504,2505,2507,2509,2511],{"class":259,"style":260},[257,2506,303],{"style":263},[257,2508,2363],{"style":267},[257,2510,308],{"style":263},[257,2512,1409],{"style":267},[257,2514,2515,2517,2519],{"class":259,"style":260},[257,2516,316],{"style":267},[257,2518,272],{"style":295},[257,2520,298],{"style":267},[257,2522,2523,2525,2527,2529,2531,2533,2535,2538,2540,2543,2545,2548,2550,2553,2555,2557,2560,2562,2565,2568],{"class":259,"style":260},[257,2524,340],{"style":267},[257,2526,66],{"style":267},[257,2528,308],{"style":263},[257,2530,1409],{"style":267},[257,2532,2433],{"style":271},[257,2534,91],{"style":263},[257,2536,2537],{"style":295},"macroDiscriminatorEnum",[257,2539,460],{"style":267},[257,2541,2542],{"style":267},"propertyName",[257,2544,308],{"style":263},[257,2546,2547],{"style":286},"'kind'",[257,2549,91],{"style":263},[257,2551,2552],{"style":267},"values",[257,2554,308],{"style":263},[257,2556,1409],{"style":267},[257,2558,2559],{"style":286},"'cat'",[257,2561,91],{"style":263},[257,2563,2564],{"style":286},"'dog'",[257,2566,2567],{"style":267},"] })]",[257,2569,378],{"style":263},[257,2571,2572,2574,2576],{"class":259,"style":260},[257,2573,316],{"style":263},[257,2575,391],{"style":267},[257,2577,378],{"style":263},[257,2579,2580,2582,2585],{"class":259,"style":260},[257,2581,303],{"style":263},[257,2583,2584],{"style":267},"]",[257,2586,378],{"style":263},[257,2588,2589],{"class":259,"style":260},[257,2590,391],{"style":267},[123,2592,2594],{"id":2593},"printers","Printers",[10,2596,2597,2599,2600,983,2602,2605,2606,121],{},[48,2598,85],{}," replaces the handler that prints one schema type, such as ",[48,2601,77],{},[48,2603,2604],{},"object",". A handler returns code as a string. To change the schema itself, use ",[44,2607,66],{"href":63},[14,2609,2610,2622],{},[17,2611,2612],{},[20,2613,2614,2616,2619],{},[23,2615,147],{},[23,2617,2618],{},"A handler returns",[23,2620,2621],{},"Inside a handler",[33,2623,2624,2639,2665],{},[20,2625,2626,2630,2633],{},[38,2627,2628],{},[48,2629,90],{},[38,2631,2632],{},"A TypeScript type",[38,2634,2635,2638],{},[48,2636,2637],{},"this.transform(node)",": a nested node's printed type",[20,2640,2641,2645,2651],{},[38,2642,2643],{},[48,2644,94],{},[38,2646,2647,2648],{},"A Zod expression, Zod Mini with ",[48,2649,2650],{},"mini: true",[38,2652,2653,2656,2657,2660,2661,121],{},[48,2654,2655],{},"this.base(node)",": the default output. ",[48,2658,2659],{},"this.options.direction",": see ",[44,2662,2664],{"href":2663},"#zod-encode-and-decode","Zod encode and decode",[20,2666,2667,2671,2674],{},[38,2668,2669],{},[48,2670,97],{},[38,2672,2673],{},"A Faker expression",[38,2675,2676,91,2678],{},[48,2677,2637],{},[48,2679,2680],{},"this.options",[10,2682,2683,2687],{},[44,2684,2686],{"href":2685},"\u002Fdocs\u002F5.x\u002Freference\u002Fkit\u002Fast#printer-handlers-and-context","Printer handlers and context"," has the full context.",[244,2689,2690,2793,2970],{},[247,2691,2694],{"language":249,"filename":2692,"code":2693,"class":252},"plugin-ts","import { pluginTs } from '@kubb\u002Fplugin-ts'\n\npluginTs({\n printer: {\n nodes: {\n \u002F\u002F A JavaScript Date instead of string\n date() {\n return 'Date'\n },\n },\n },\n})",[48,2695,2696,288,2710,288,2712,288,2718,288,2729,288,2740,288,2747,288,2756,288,2765,288,2773,288,2781,288,2789],{"class":255},[257,2697,2698,2700,2702,2704,2706,2708],{"class":259,"style":260},[257,2699,264],{"style":263},[257,2701,268],{"style":267},[257,2703,787],{"style":271},[257,2705,280],{"style":267},[257,2707,283],{"style":263},[257,2709,287],{"style":286},[257,2711],{"class":259,"style":260},[257,2713,2714,2716],{"class":259,"style":260},[257,2715,272],{"style":295},[257,2717,298],{"style":267},[257,2719,2720,2722,2725,2727],{"class":259,"style":260},[257,2721,303],{"style":267},[257,2723,2724],{"style":267},"printer",[257,2726,308],{"style":263},[257,2728,311],{"style":267},[257,2730,2731,2733,2736,2738],{"class":259,"style":260},[257,2732,316],{"style":267},[257,2734,2735],{"style":267},"nodes",[257,2737,308],{"style":263},[257,2739,311],{"style":267},[257,2741,2742,2744],{"class":259,"style":260},[257,2743,340],{"style":267},[257,2745,2746],{"style":319},"\u002F\u002F A JavaScript Date instead of string",[257,2748,2749,2751,2753],{"class":259,"style":260},[257,2750,340],{"style":319},[257,2752,77],{"style":295},[257,2754,2755],{"style":267},"() {",[257,2757,2758,2760,2762],{"class":259,"style":260},[257,2759,475],{"style":267},[257,2761,343],{"style":263},[257,2763,2764],{"style":286},"'Date'",[257,2766,2767,2769,2771],{"class":259,"style":260},[257,2768,340],{"style":286},[257,2770,366],{"style":267},[257,2772,378],{"style":263},[257,2774,2775,2777,2779],{"class":259,"style":260},[257,2776,316],{"style":263},[257,2778,366],{"style":267},[257,2780,378],{"style":263},[257,2782,2783,2785,2787],{"class":259,"style":260},[257,2784,303],{"style":263},[257,2786,366],{"style":267},[257,2788,378],{"style":263},[257,2790,2791],{"class":259,"style":260},[257,2792,391],{"style":267},[247,2794,2797],{"language":249,"filename":2795,"code":2796,"class":252},"plugin-zod","import { pluginZod } from '@kubb\u002Fplugin-zod'\n\npluginZod({\n printer: {\n nodes: {\n date() {\n return 'z.iso.date()'\n },\n \u002F\u002F Decorate the default output. Nested nodes still print through the regular handlers.\n object(node) {\n return `${this.base(node)}.openapi(${JSON.stringify({ description: node.description })})`\n },\n },\n },\n})",[48,2798,2799,288,2813,288,2815,288,2821,288,2831,288,2841,288,2849,288,2858,288,2866,288,2873,288,2885,288,2942,288,2950,288,2958,288,2966],{"class":255},[257,2800,2801,2803,2805,2807,2809,2811],{"class":259,"style":260},[257,2802,264],{"style":263},[257,2804,268],{"style":267},[257,2806,2248],{"style":271},[257,2808,280],{"style":267},[257,2810,283],{"style":263},[257,2812,2255],{"style":286},[257,2814],{"class":259,"style":260},[257,2816,2817,2819],{"class":259,"style":260},[257,2818,2380],{"style":295},[257,2820,298],{"style":267},[257,2822,2823,2825,2827,2829],{"class":259,"style":260},[257,2824,303],{"style":267},[257,2826,2724],{"style":267},[257,2828,308],{"style":263},[257,2830,311],{"style":267},[257,2832,2833,2835,2837,2839],{"class":259,"style":260},[257,2834,316],{"style":267},[257,2836,2735],{"style":267},[257,2838,308],{"style":263},[257,2840,311],{"style":267},[257,2842,2843,2845,2847],{"class":259,"style":260},[257,2844,340],{"style":267},[257,2846,77],{"style":295},[257,2848,2755],{"style":267},[257,2850,2851,2853,2855],{"class":259,"style":260},[257,2852,475],{"style":267},[257,2854,343],{"style":263},[257,2856,2857],{"style":286},"'z.iso.date()'",[257,2859,2860,2862,2864],{"class":259,"style":260},[257,2861,340],{"style":286},[257,2863,366],{"style":267},[257,2865,378],{"style":263},[257,2867,2868,2870],{"class":259,"style":260},[257,2869,340],{"style":263},[257,2871,2872],{"style":319},"\u002F\u002F Decorate the default output. Nested nodes still print through the regular handlers.",[257,2874,2875,2877,2879,2881,2883],{"class":259,"style":260},[257,2876,340],{"style":319},[257,2878,2604],{"style":295},[257,2880,330],{"style":267},[257,2882,710],{"style":271},[257,2884,335],{"style":267},[257,2886,2887,2889,2891,2893,2895,2897,2899,2902,2904,2906,2908,2910,2913,2915,2918,2920,2923,2925,2927,2929,2931,2933,2935,2937,2939],{"class":259,"style":260},[257,2888,475],{"style":267},[257,2890,343],{"style":263},[257,2892,369],{"style":286},[257,2894,349],{"style":271},[257,2896,112],{"style":271},[257,2898,121],{"style":263},[257,2900,2901],{"style":295},"base",[257,2903,330],{"style":267},[257,2905,710],{"style":271},[257,2907,363],{"style":267},[257,2909,366],{"style":271},[257,2911,2912],{"style":286},".openapi(",[257,2914,349],{"style":271},[257,2916,2917],{"style":267},"JSON",[257,2919,121],{"style":263},[257,2921,2922],{"style":295},"stringify",[257,2924,460],{"style":267},[257,2926,1155],{"style":267},[257,2928,308],{"style":263},[257,2930,710],{"style":271},[257,2932,121],{"style":263},[257,2934,1564],{"style":267},[257,2936,391],{"style":267},[257,2938,366],{"style":271},[257,2940,2941],{"style":286},")`",[257,2943,2944,2946,2948],{"class":259,"style":260},[257,2945,340],{"style":286},[257,2947,366],{"style":267},[257,2949,378],{"style":263},[257,2951,2952,2954,2956],{"class":259,"style":260},[257,2953,316],{"style":263},[257,2955,366],{"style":267},[257,2957,378],{"style":263},[257,2959,2960,2962,2964],{"class":259,"style":260},[257,2961,303],{"style":263},[257,2963,366],{"style":267},[257,2965,378],{"style":263},[257,2967,2968],{"class":259,"style":260},[257,2969,391],{"style":267},[247,2971,2974],{"language":249,"filename":2972,"code":2973,"class":252},"plugin-faker","import { pluginFaker } from '@kubb\u002Fplugin-faker'\n\npluginFaker({\n printer: {\n nodes: {\n \u002F\u002F Floats where the spec declares integers\n integer() {\n return 'faker.number.float()'\n },\n },\n },\n})",[48,2975,2976,288,2990,288,2992,288,2998,288,3008,288,3018,288,3025,288,3034,288,3043,288,3051,288,3059,288,3067],{"class":255},[257,2977,2978,2980,2982,2984,2986,2988],{"class":259,"style":260},[257,2979,264],{"style":263},[257,2981,268],{"style":267},[257,2983,406],{"style":271},[257,2985,280],{"style":267},[257,2987,283],{"style":263},[257,2989,413],{"style":286},[257,2991],{"class":259,"style":260},[257,2993,2994,2996],{"class":259,"style":260},[257,2995,420],{"style":295},[257,2997,298],{"style":267},[257,2999,3000,3002,3004,3006],{"class":259,"style":260},[257,3001,303],{"style":267},[257,3003,2724],{"style":267},[257,3005,308],{"style":263},[257,3007,311],{"style":267},[257,3009,3010,3012,3014,3016],{"class":259,"style":260},[257,3011,316],{"style":267},[257,3013,2735],{"style":267},[257,3015,308],{"style":263},[257,3017,311],{"style":267},[257,3019,3020,3022],{"class":259,"style":260},[257,3021,340],{"style":267},[257,3023,3024],{"style":319},"\u002F\u002F Floats where the spec declares integers",[257,3026,3027,3029,3032],{"class":259,"style":260},[257,3028,340],{"style":319},[257,3030,3031],{"style":295},"integer",[257,3033,2755],{"style":267},[257,3035,3036,3038,3040],{"class":259,"style":260},[257,3037,475],{"style":267},[257,3039,343],{"style":263},[257,3041,3042],{"style":286},"'faker.number.float()'",[257,3044,3045,3047,3049],{"class":259,"style":260},[257,3046,340],{"style":286},[257,3048,366],{"style":267},[257,3050,378],{"style":263},[257,3052,3053,3055,3057],{"class":259,"style":260},[257,3054,316],{"style":263},[257,3056,366],{"style":267},[257,3058,378],{"style":263},[257,3060,3061,3063,3065],{"class":259,"style":260},[257,3062,303],{"style":263},[257,3064,366],{"style":267},[257,3066,378],{"style":263},[257,3068,3069],{"class":259,"style":260},[257,3070,391],{"style":267},[1426,3072,3074],{"id":3073},"typescript-handlers","TypeScript handlers",[10,3076,3077,3079,3080,3083],{},[48,3078,2637],{}," returns a string, so a handler that passes it to ",[48,3081,3082],{},"ts.factory"," breaks. Build the type as a string.",[1426,3085,2664],{"id":3086},"zod-encode-and-decode",[10,3088,3089,3091,3092,3095,3096,3099,3100,947,3103,3105,3106,3110],{},[48,3090,2659],{}," is ",[48,3093,3094],{},"'decode'"," for response schemas and ",[48,3097,3098],{},"'encode'"," for request bodies and parameters. Type the handlers as ",[48,3101,3102],{},"PrinterZodNodes",[48,3104,94],{}," to read it. ",[44,3107,3109],{"href":3108},"\u002Fextensions\u002Fkubb-labs\u002Fplugin-zod\u002Fguides\u002Fcustomization#encode-custom-types","Encode custom types"," shows a direction-aware handler.",{"title":918,"searchDepth":3112,"depth":3112,"links":3113},5,[3114,3116,3122],{"id":125,"depth":3115,"text":126},2,{"id":66,"depth":3115,"text":940,"children":3117},[3118,3120,3121],{"id":1428,"depth":3119,"text":1429},3,{"id":1792,"depth":3119,"text":1793},{"id":2395,"depth":3119,"text":2396},{"id":2593,"depth":3115,"text":2594,"children":3123},[3124,3125],{"id":3073,"depth":3119,"text":3074},{"id":3086,"depth":3119,"text":2664},"Change what a Kubb plugin generates without forking it: rename symbols and files with a resolver, rewrite schemas with a macro, or swap a printer.","md",{"layout":3129,"title":5,"description":3126,"outline":3130,"order":3119,"navigation":3131},"doc",[3115,3119],{"title":5,"icon":3132},"i-iconoir-magic-wand",{"layout":3129,"outline":3134},[3115,3119],{"title":5,"icon":3132},"\u002Fdocs\u002F5.x\u002Fhow-to\u002Fcustomize",{"title":5,"description":3126},{"loc":3136},"kubb-labs\u002Fkubb\u002Fdocs\u002F5.x\u002Fhow-to\u002Fcustomize.md","docs\u002F5.x\u002Fhow-to\u002Fcustomize","N3dqkUULt7EViqQ0xcb25xNf-pcvglg2tsq1mGwMiFo",1795727672842,"1b64b1eb-29b7-4f90-ad41-6f24721e1669"]