-
-
Notifications
You must be signed in to change notification settings - Fork 528
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
Referenced nullable object types are not generated as possibly null #2030
Comments
@raphael-verdier if you're able to submit a failing test case to our fork, I might have a look at this for you |
@mrlubos If I have some time I will try to do it but I never looked at the source code |
@raphael-verdier can you try generating your client with our fork? It's possible it may even work, I haven't tested this scenario myself. For failing test case, here's an example. I'd need a schema in |
@raphael-verdier this is fixed in @nicolas-chaulet/openapi-typescript-codegen, give it a try! |
Describe the bug
Referenced nullable objects are not correctly generated as either an object or null.
Considering those two schemas that should result in the same typing:
The generated type for NullableObject is the following, which is wrong:
The generated type for CoreObjectWorkaround is the following, which is correct:
This bug is isolated to referenced object types as I use referenced atomic nullable types that don't have this bug.
The text was updated successfully, but these errors were encountered: