fix(openapi): handle ZodVoid responses as 204 No Content#112
Open
kentwilliam wants to merge 1 commit intomainfrom
Open
fix(openapi): handle ZodVoid responses as 204 No Content#112kentwilliam wants to merge 1 commit intomainfrom
kentwilliam wants to merge 1 commit intomainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
Updates the Stainless OpenAPI spec generator to correctly represent endpoints whose response schema defaults to z.void() by emitting a 204 No Content response instead of attempting to serialize a ZodVoid schema (which crashes GET /api/openapi).
Changes:
- Detect
ZodVoidresponse schemas during OpenAPI generation. - Emit
204 No Contentresponses (no body) forZodVoidendpoints; otherwise keep existing200 application/jsonbehavior.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Member
cjquines
approved these changes
Apr 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This was causing 500s.
Context
This avoids crashes for these endpoints:
DELETE /api/account/device-connections/{connectionId}DELETE /api/orgs/{orgName}/postman-credentialsDELETE /api/orgs/{orgName}/vcs-appDELETE /api/orgs/{orgName}/projects/{projectName}DELETE /api/orgs/{orgName}/pending-projects/{projectName}DELETE /api/orgs/{orgName}/projects/{projectName}/sdk-requestsDELETE /api/orgs/{orgName}/projects/{projectName}/sdks/{language}DELETE /api/docs-sites/{docsSiteId}/domains/{domainId}DELETE /api/users/{userId}/tutorial-modals/{modalType}