fix: add empty success responses (#1600)

This commit is contained in:
David Nguyen
2025-01-20 19:47:39 +11:00
committed by GitHub
parent 7c1e0f34e8
commit 74bb230247
5 changed files with 43 additions and 16 deletions

View File

@@ -34,6 +34,19 @@ import {
import { ZCreateRecipientSchema } from '../recipient-router/schema';
/**
* Required for empty responses since we currently can't 201 requests for our openapi setup.
*
* Without this it will throw an error in Speakeasy SDK when it tries to parse an empty response.
*/
export const ZSuccessResponseSchema = z.object({
success: z.literal(true),
});
export const ZGenericSuccessResponse = {
success: true,
} satisfies z.infer<typeof ZSuccessResponseSchema>;
export const ZDocumentTitleSchema = z
.string()
.trim()