[PR #5622] [MERGED] fix(email-otp): fix openapi schema for /email-otp/verify-email endpoint #23020

Closed
opened 2026-04-15 21:25:41 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/5622
Author: @jonathansamines
Created: 10/27/2025
Status: Merged
Merged: 10/27/2025
Merged by: @himself65

Base: canaryHead: fix/email-otp-openapi-schema


📝 Commits (1)

  • da9e326 fix(email-otp): fix openapi schema for /email-otp/verify-email endpoint

📊 Changes

1 file changed (+1 additions, -1 deletions)

View changed files

📝 packages/better-auth/src/plugins/email-otp/index.ts (+1 -1)

📄 Description

Fixes /email-otp/verify-email endpoint schema by moving the required property as a sibling of properties instead of it being a child.

Before:
Screenshot 2025-10-27 at 11 54 15 AM

After
Screenshot 2025-10-27 at 11 59 07 AM

Solves https://github.com/better-auth/better-auth/issues/5607


Summary by cubic

Fixed the OpenAPI schema for /email-otp/verify-email by placing required alongside properties in the 200 response object. This restores valid schema parsing and codegen compatibility.

  • Bug Fixes
    • Moved required: ["status", "token", "user"] to be a sibling of properties to comply with OpenAPI.

🔄 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/better-auth/better-auth/pull/5622 **Author:** [@jonathansamines](https://github.com/jonathansamines) **Created:** 10/27/2025 **Status:** ✅ Merged **Merged:** 10/27/2025 **Merged by:** [@himself65](https://github.com/himself65) **Base:** `canary` ← **Head:** `fix/email-otp-openapi-schema` --- ### 📝 Commits (1) - [`da9e326`](https://github.com/better-auth/better-auth/commit/da9e326e2d8ebdef4b612effe0714dee10921921) fix(email-otp): fix openapi schema for /email-otp/verify-email endpoint ### 📊 Changes **1 file changed** (+1 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `packages/better-auth/src/plugins/email-otp/index.ts` (+1 -1) </details> ### 📄 Description Fixes `/email-otp/verify-email` endpoint schema by moving the `required` property as a sibling of `properties` instead of it being a child. **Before**: <img width="791" height="655" alt="Screenshot 2025-10-27 at 11 54 15 AM" src="https://github.com/user-attachments/assets/2ecddcb1-86da-4561-a2d6-7d966cf05aa4" /> **After** <img width="798" height="627" alt="Screenshot 2025-10-27 at 11 59 07 AM" src="https://github.com/user-attachments/assets/f73bb2b1-4545-4360-82d9-5e1a4a33d977" /> Solves https://github.com/better-auth/better-auth/issues/5607 <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Fixed the OpenAPI schema for /email-otp/verify-email by placing required alongside properties in the 200 response object. This restores valid schema parsing and codegen compatibility. - **Bug Fixes** - Moved required: ["status", "token", "user"] to be a sibling of properties to comply with OpenAPI. <!-- End of auto-generated description by cubic. --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-15 21:25:41 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#23020