Skip to content

Conversation

@nickthegroot
Copy link

@nickthegroot nickthegroot commented Nov 15, 2025

Currently, void and never are failing with the following error:

UnknownZodTypeError {
  message: 'Unknown zod object type, please specify `type` and other OpenAPI props using `schema.openapi`.',
  data: {
    currentSchema: { type: 'never', error: [Function: error] },
    schemaName: undefined
  }
}

This was brought up in #290, although the closure felt a little premature: #290 (comment).

There isn't really anything that we can translate this to in terms of "open api specification"

I'm completely in support of this idea, although would advocate for the library gracefully handling these instead of erroring out. This is what this PR attempts to do. After all, if OpenAPI is meant to express what should be in the request, what shouldn't be in there has no relevance!

AI Disclosure: I used copilot to generate an initial plan and framework, particularly for the tests. All code was subsequently personally reviewed and edited.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant