You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think I fixed the 1st issue (TS type reference sometimes would output strings) that you described, there still seems to be a problem with .lazy in your case, I haven't dug deeper, feel free to do so from here
Im using https://activitybff.dev.alineadigital.dk/swagger/v1/swagger.json
pnpx openapi-zod-client 'https://activitybff.dev.alineadigital.dk/swagger/v1/swagger.json' -o './src/schemas/activitybff.ts' --base-url https://activitybff.dev.alineadigital.dk --export-schemas
It creates
the type:
How am i supposed to use that? The two dont match and its using z.lazy that means it thinks it can be undefined which it cant.
Typescript thinks sections are array of strings with specific names. That is wrong. Its array of different objects.
Is there a trick to get it to be accurate?
The text was updated successfully, but these errors were encountered: