Skip to content
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

If endpoint has a record field in the output type OpenAPI fails to start #92

Closed
kirdk opened this issue Aug 7, 2021 · 3 comments · Fixed by #93
Closed

If endpoint has a record field in the output type OpenAPI fails to start #92

kirdk opened this issue Aug 7, 2021 · 3 comments · Fixed by #93
Labels
bug Something isn't working

Comments

@kirdk
Copy link

kirdk commented Aug 7, 2021

If I'm trying to create an endpoint with an output that contains a field with type z.record() or z.any(), the OpenAPI builder fails with the message:

error: Cannot convert undefined or null to object
error: TypeError: Cannot convert undefined or null to object
@RobinTail
Copy link
Owner

Thank you @kirdk .

z.record() — confirmed, this will be fixed.
z.any() — should throw another error: Zod type ZodAny is unsupported. Did not yet figure out how to describe any in Swagger.

@RobinTail
Copy link
Owner

Both issues fixed in v2.1.1, @kirdk

@kirdk
Copy link
Author

kirdk commented Aug 8, 2021

Both issues fixed in v2.1.1, @kirdk

Thank you @RobinTail

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants