[PR #2503] [MERGED] fix: simplify openapi field schemas to fix SDK generation #2349

Closed
opened 2026-02-26 20:33:29 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/documenso/documenso/pull/2503
Author: @Mythie
Created: 2/16/2026
Status: Merged
Merged: 2/18/2026
Merged by: @Mythie

Base: mainHead: fix/simplify-openapi-field-schemas


📝 Commits (2)

  • a6b9643 fix: simplify openapi field schemas to fix SDK generation
  • 230be1d fix: loosen update type to match original

📊 Changes

2 files changed (+18 additions, -19 deletions)

View changed files

📝 packages/trpc/server/envelope-router/envelope-fields/create-envelope-fields.types.ts (+6 -5)
📝 packages/trpc/server/envelope-router/envelope-fields/update-envelope-fields.types.ts (+12 -14)

📄 Description

Summary

  • Restructure Zod union schemas for envelope fields to produce simpler OpenAPI JSON output that no longer breaks SDK generators
  • Flatten create field schema from base.and(union([a, b])) to union([base.and(a), base.and(b)]) for cleaner discriminated output
  • Refactor update field schema to reuse ZCoordinatePositionSchema directly instead of duplicating individual position field definitions

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/documenso/documenso/pull/2503 **Author:** [@Mythie](https://github.com/Mythie) **Created:** 2/16/2026 **Status:** ✅ Merged **Merged:** 2/18/2026 **Merged by:** [@Mythie](https://github.com/Mythie) **Base:** `main` ← **Head:** `fix/simplify-openapi-field-schemas` --- ### 📝 Commits (2) - [`a6b9643`](https://github.com/documenso/documenso/commit/a6b9643488f993eeda575dd9275b347797b46904) fix: simplify openapi field schemas to fix SDK generation - [`230be1d`](https://github.com/documenso/documenso/commit/230be1da6364d9ccfd995ed96853b92f7d185430) fix: loosen update type to match original ### 📊 Changes **2 files changed** (+18 additions, -19 deletions) <details> <summary>View changed files</summary> 📝 `packages/trpc/server/envelope-router/envelope-fields/create-envelope-fields.types.ts` (+6 -5) 📝 `packages/trpc/server/envelope-router/envelope-fields/update-envelope-fields.types.ts` (+12 -14) </details> ### 📄 Description ## Summary - Restructure Zod union schemas for envelope fields to produce simpler OpenAPI JSON output that no longer breaks SDK generators - Flatten create field schema from `base.and(union([a, b]))` to `union([base.and(a), base.and(b)])` for cleaner discriminated output - Refactor update field schema to reuse `ZCoordinatePositionSchema` directly instead of duplicating individual position field definitions --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-26 20:33:29 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/documenso#2349
No description provided.