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

Closed
opened 2026-04-13 09:26:24 -05:00 by GiteaMirror · 0 comments
Owner

Original Pull Request: https://github.com/better-auth/better-auth/pull/5622

State: closed
Merged: Yes


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.
**Original Pull Request:** https://github.com/better-auth/better-auth/pull/5622 **State:** closed **Merged:** Yes --- 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. -->
GiteaMirror added the pull-request label 2026-04-13 09:26:24 -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#14366