anatine / zod-plugins

Plugins and utilities for Zod
591 stars 84 forks source link

[zod-openapi] Swagger reports Unknown Type: object when using the extendApi command #191

Open kitips49 opened 3 months ago

kitips49 commented 3 months ago

How can I fix the problem? I didn't have any issues before.

image image image image image
kitips49 commented 3 months ago

image I think you should fix it like this. I've tried fixing it and it seems to work.

kerolloz commented 3 months ago

Try to use openAPI version 3.1.0

kitips49 commented 3 months ago

Try to use openAPI version 3.1.0 I wrote code like this, then called function extendApi again, and it worked on NestJS https://playcode.io/1816795

ADobrianskiy commented 3 months ago

Try to use openAPI version 3.1.0

After setting 3.1.0 version following https://github.com/nestjs/swagger/issues/2361#issuecomment-2018406870 comment in my Nestjs application all extendApi metadata is simply cut off. I assume that without https://github.com/anatine/zod-plugins/issues/191#issuecomment-2024614216 adaptation it will not work =(

Any ideas when approximately it will be fixed?

adambrgmn commented 1 month ago

I gave more context in issue #192 about what has happened. And today I also submitted a pr that might fix your issues; #206

armtuk commented 2 days ago

Having the same issue here too.