[GH-ISSUE #2684] open-api. allow for merge only #9301

Closed
opened 2026-04-13 04:43:44 -05:00 by GiteaMirror · 3 comments
Owner

Originally created by @RWOverdijk on GitHub (May 17, 2025).
Original GitHub issue: https://github.com/better-auth/better-auth/issues/2684

Is this suited for github?

  • Yes, this is suited for github

Is your feature request related to a problem? Please describe.

I want to preface this by saying that I might be missing some obvious way of achieving what I want already. I tried, but I haven't been able to get it quite right without manual merging.

I already have a setup for the openapi docs of my api. I want to be able to just add the better-auth schemas to that existing doc, without any of the other features (scalar and serving the doc's json).

Describe the solution you'd like

Perhaps a way to extend an existing schema without hosting the docs ui. A very minimal merge-only function would make this very easy to use in any setup. In my case, for example, I am currently using hono-openapi where I get the document in object notation.

Describe alternatives you've considered

I have considered writing the schema myself, or copy/pasting the one from the plugin but that's not ideal.

Additional context

No response

Originally created by @RWOverdijk on GitHub (May 17, 2025). Original GitHub issue: https://github.com/better-auth/better-auth/issues/2684 ### Is this suited for github? - [x] Yes, this is suited for github ### Is your feature request related to a problem? Please describe. I want to preface this by saying that I might be missing some obvious way of achieving what I want already. I tried, but I haven't been able to get it quite right without manual merging. I already have a setup for the openapi docs of my api. I want to be able to just add the better-auth schemas to that existing doc, without any of the other features (scalar and serving the doc's json). ### Describe the solution you'd like Perhaps a way to extend an existing schema without hosting the docs ui. A very minimal merge-only function would make this very easy to use in any setup. In my case, for example, I am currently using hono-openapi where I get the document in object notation. ### Describe alternatives you've considered I have considered writing the schema myself, or copy/pasting the one from the plugin but that's not ideal. ### Additional context _No response_
GiteaMirror added the locked label 2026-04-13 04:43:44 -05:00
Author
Owner

@Kinfe123 commented on GitHub (Jun 8, 2025):

You can fetch the Better Auth OpenAPI schema directly by calling the auth.api.generateOpenAPISchema() or /api/auth/open-api/generate-schema endpoint. You can start integrating it from here.

<!-- gh-comment-id:2953272312 --> @Kinfe123 commented on GitHub (Jun 8, 2025): You can fetch the Better Auth OpenAPI schema directly by calling the `auth.api.generateOpenAPISchema()` or /api/auth/open-api/generate-schema endpoint. You can start integrating it from here.
Author
Owner

@Kinfe123 commented on GitHub (Jun 11, 2025):

do you get that working ?

<!-- gh-comment-id:2963788026 --> @Kinfe123 commented on GitHub (Jun 11, 2025): do you get that working ?
Author
Owner

@RWOverdijk commented on GitHub (Jun 11, 2025):

I haven't been able to try. But if that's how it should be used I'll just manually merge them. I'm sure it'll be fine 😄

<!-- gh-comment-id:2963868664 --> @RWOverdijk commented on GitHub (Jun 11, 2025): I haven't been able to try. But if that's how it should be used I'll just manually merge them. I'm sure it'll be fine 😄
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#9301