[PR #3439] [MERGED] feat(open-api): include additional fields #13070

Closed
opened 2026-04-13 08:43:56 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/3439
Author: @Kinfe123
Created: 7/18/2025
Status: Merged
Merged: 7/18/2025
Merged by: @Bekacru

Base: mainHead: feat/open-api-additional-field


📝 Commits (5)

📊 Changes

3 files changed (+74 additions, -16 deletions)

View changed files

📝 packages/better-auth/src/adapters/kysely-adapter/test/state.txt (+1 -1)
📝 packages/better-auth/src/plugins/open-api/generator.ts (+41 -15)
📝 packages/better-auth/src/plugins/open-api/open-api.test.ts (+32 -0)

📄 Description

closes #3263

Summary by cubic

Added support for including additional user fields in the generated OpenAPI schema, with correct types, defaults, and required status.

  • New Features
    • User-defined additionalFields now appear in the OpenAPI User schema with accurate type, default, and required properties.

and tested with the image below by adding a credits additional field.
Screenshot 2025-07-18 at 3 34 49 AM


🔄 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/3439 **Author:** [@Kinfe123](https://github.com/Kinfe123) **Created:** 7/18/2025 **Status:** ✅ Merged **Merged:** 7/18/2025 **Merged by:** [@Bekacru](https://github.com/Bekacru) **Base:** `main` ← **Head:** `feat/open-api-additional-field` --- ### 📝 Commits (5) - [`f241b6f`](https://github.com/better-auth/better-auth/commit/f241b6f8bd2cc8762e7ea8225eeb22cfdb3cbf5c) open api additional field - [`f7c8ad4`](https://github.com/better-auth/better-auth/commit/f7c8ad4ab97e6b42f3831bf80dc46a68bd15d807) lint - [`336c121`](https://github.com/better-auth/better-auth/commit/336c121fde559422da4f615715819f4cfdc4189b) lint - [`b64b672`](https://github.com/better-auth/better-auth/commit/b64b672c29beef76ddd820a9f99c5d9c4c6ff9b8) falsy value - [`b280416`](https://github.com/better-auth/better-auth/commit/b28041609de8493ded178cc2249e51eb20b8d6af) deprecated zodschema with zodtype ### 📊 Changes **3 files changed** (+74 additions, -16 deletions) <details> <summary>View changed files</summary> 📝 `packages/better-auth/src/adapters/kysely-adapter/test/state.txt` (+1 -1) 📝 `packages/better-auth/src/plugins/open-api/generator.ts` (+41 -15) 📝 `packages/better-auth/src/plugins/open-api/open-api.test.ts` (+32 -0) </details> ### 📄 Description closes #3263 <!-- This is an auto-generated description by cubic. --> ## Summary by cubic Added support for including additional user fields in the generated OpenAPI schema, with correct types, defaults, and required status. - **New Features** - User-defined additionalFields now appear in the OpenAPI User schema with accurate type, default, and required properties. <!-- End of auto-generated description by cubic. --> and tested with the image below by adding a `credits` additional field. <img width="625" height="455" alt="Screenshot 2025-07-18 at 3 34 49 AM" src="https://github.com/user-attachments/assets/67f408ff-09d4-40d6-947e-fa14e9d058ac" /> --- <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-13 08:43:56 -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#13070