File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import type { $ZodType , JSONSchema } from "zod/v4/core" ;
22import * as R from "ramda" ;
33import { z } from "zod/v4" ;
4+ import { ezBufferBrand } from "./buffer-schema" ;
45import { ezDateInBrand } from "./date-in-schema" ;
56import { ezDateOutBrand } from "./date-out-schema" ;
67import { DeepCheckError } from "./errors" ;
@@ -91,6 +92,7 @@ export const findJsonIncompatible = (
9192 const brand = getBrand ( zodSchema ) ;
9293 const { type } = zodSchema . _zod . def ;
9394 if ( unsupported . includes ( type ) ) return true ;
95+ if ( brand === ezBufferBrand ) return true ;
9496 if ( io === "input" ) {
9597 if ( type === "date" ) return true ;
9698 if ( brand === ezDateOutBrand ) return true ;
Original file line number Diff line number Diff line change @@ -522,7 +522,7 @@ describe("Routing", () => {
522522 [ z . lazy ( ( ) => z . void ( ) ) , ez . raw ( ) ] ,
523523 [ z . promise ( z . any ( ) ) , ez . upload ( ) ] ,
524524 [ z . never ( ) , z . tuple ( [ ez . buffer ( ) ] ) . rest ( z . nan ( ) ) ] ,
525- [ z . nan ( ) . pipe ( z . any ( ) ) , circular ] ,
525+ [ ez . buffer ( ) . pipe ( z . any ( ) ) , circular ] ,
526526 ] ) ( "should warn about JSON incompatible schemas %#" , ( input , output ) => {
527527 const endpoint = new EndpointsFactory ( defaultResultHandler ) . build ( {
528528 input : z . object ( { input } ) ,
You can’t perform that action at this time.
0 commit comments