TypeError: zodSchema.openapi is not a function. (In 'zodSchema.openapi(refId)', 'zodSchema.openapi' is undefined)
at C:\Users\xxxx\Desktop\programs\openapi-builder\node_modules\@asteasolutions\zod-to-openapi\dist\index.cjs:332:26
at register (C:\Users\xxxx\Desktop\programs\openapi-builder\node_modules\@asteasolutions\zod-to-openapi\dist\index.cjs:275:38)
at generateSchemaObject (C:\Users\xxxx\Desktop\programs\openapi-builder\src\utils\index.ts:44:18)
at toJSON (C:\Users\xxxx\Desktop\programs\openapi-builder\src\builders\request_body.ts:89:22)
at toJSON (C:\Users\xxxx\Desktop\programs\openapi-builder\src\builders\path.ts:226:68)
at toJSON (C:\Users\xxxx\Desktop\programs\openapi-builder\src\builders\path.ts:60:88)
at C:\Users\xxxx\Desktop\programs\openapi-builder\src\builders\openapi.ts:171:48
at reduce (1:11)
at toJSON (C:\Users\xxxx\Desktop\programs\openapi-builder\src\builders\openapi.ts:170:35)
at C:\Users\xxxx\Desktop\programs\openapi-builder\src\tests\setup.ts:139:55
I am calling extendZodWithOpenApi(z);
in every file now because I thought it was not loaded in a file. But still no progress. Any Tips?
I am calling
extendZodWithOpenApi(z);
in every file now because I thought it was not loaded in a file. But still no progress. Any Tips?