-
Notifications
You must be signed in to change notification settings - Fork 94
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[zod-openapi] - OpenAPI 3.0: the usage of nullish and nullable result in "type" null #211
Comments
I did an additional test with Here's that same schema I mentioned with
What I think is happening, is that Update
|
@RobbyUitbeijerse There is my result from generation 3.1 spec
Zod
|
Saw the same today as well:
|
any update on fixing this? Is this also only for this verion? |
Bump |
Howdy! I'm not too familiar with the inner workings of these libraries, our stack only had |
Hi there!
Our team started using the latest version of the packages after the merger of #206 (thanks for that!)
We noticed a small issue (but quite consequential) when it comes to nullable properties. I'll try to explain what we're facing in an example, but also dropped a full diff of our spec after migrating to
@anatine/zod-openapi
. I'm currently assuming it's an issue only when usingpatchNestjsSwagger
with3.0
.Here's a schema:
This schema results in the following OpenAPI output:
While we are actually expecting it to be:
It happens for all sorts of schema: arrays, booleans, strings - below you will find a link to our OpenAPI spec after migrating to
@anatine/zod-openapi
(left is
nestjs-zod
, right is@anatine/zod-openapi
)https://www.diffchecker.com/Zg4nfCdt/
The text was updated successfully, but these errors were encountered: