[PR #8567] [CLOSED] fix: resolve duplicate operationId in admin plugin endpoints #24967

Closed
opened 2026-04-15 22:39:37 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/8567
Author: @Sigmabrogz
Created: 3/12/2026
Status: Closed

Base: mainHead: fix/duplicate-operationid-admin-endpoints


📝 Commits (10+)

  • 62a8f16 ci: continue on error
  • 35ab204 docs(expo): update Metro config for Expo SDK 53+ (#8220)
  • 973c5f8 docs: fix release og path
  • 478e9fe docs: fix release image
  • 551d607 docs: use full URL for 1.5 release og image
  • 7eb9022 docs: extract api-key plugin to separate package and update related schema and client SDK references
  • 5451e15 docs: fix sidebar contents from old (#8221)
  • 40ad3fa docs: update 1.5 release notes for api-keys (#8222)
  • 0584e61 docs: re-add razorpay and payu community plugins (#8224)
  • f944e39 docs: fix features component (#8225)

📊 Changes

372 files changed (+41801 additions, -10923 deletions)

View changed files

.claude/agents/cherry-pick-release.md (+184 -0)
📝 .cspell/auth-terms.txt (+1 -0)
📝 .cspell/custom-words.txt (+3 -1)
📝 .cspell/names.txt (+2 -0)
📝 .cspell/tech-terms.txt (+5 -2)
📝 .cspell/third-party.txt (+3 -0)
.github/workflows/demo.yml (+56 -0)
.github/workflows/npm-dist-tag.yml (+35 -0)
📝 .github/workflows/release.yml (+1 -0)
📝 .gitignore (+1 -0)
📝 .remarkignore (+1 -0)
📝 CLAUDE.md (+13 -2)
📝 CONTRIBUTING.md (+1 -1)
📝 biome.json (+2 -1)
📝 demo/electron/package.json (+10 -10)
demo/electron/pnpm-lock.yaml (+4736 -0)
demo/electron/pnpm-workspace.yaml (+4 -0)
📝 demo/expo/app.config.ts (+0 -4)
📝 demo/expo/metro.config.js (+1 -5)
📝 demo/expo/package.json (+24 -23)

...and 80 more files

📄 Description

Summary

Fixes duplicate operationId values in the OpenAPI schema that cause code generation tools (like Orval) to produce TypeScript errors (TS2300: Duplicate identifier).

Changes:

  • listUserSessionsadminListUserSessions (for /admin/list-user-sessions)
  • updateUseradminUpdateUser (for /admin/update-user)

Problem

The admin plugin endpoints shared the same operationId as core endpoints:

Endpoint Old operationId New operationId
/admin/list-user-sessions (POST) listUserSessions adminListUserSessions
/admin/update-user (POST) updateUser adminUpdateUser

This violated the OpenAPI 3.0 spec which requires unique operationIds across all operations.

Test Plan

  • Generate OpenAPI schema with admin plugin enabled
  • Verify no duplicate operationIds exist
  • Run Orval or similar code generator to confirm no TS2300 errors

Fixes #8558


This PR was created with AI assistance. The fix follows the same pattern established in PR #6203.

Made with Cursor


Summary by cubic

Fixes duplicate operationId values in the OpenAPI schema for admin plugin endpoints to prevent codegen collisions (e.g., TS2300: Duplicate identifier) in tools like orval. Ensures each operation has a unique operationId per OpenAPI 3.0.

  • Bug Fixes
    • /admin/list-user-sessions (POST): operationId listUserSessionsadminListUserSessions
    • /admin/update-user (POST): operationId updateUseradminUpdateUser

Written for commit bbaa588e85. Summary will update on new commits.


🔄 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/8567 **Author:** [@Sigmabrogz](https://github.com/Sigmabrogz) **Created:** 3/12/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix/duplicate-operationid-admin-endpoints` --- ### 📝 Commits (10+) - [`62a8f16`](https://github.com/better-auth/better-auth/commit/62a8f165380816424439c24df4c7813adb6c64d7) ci: continue on error - [`35ab204`](https://github.com/better-auth/better-auth/commit/35ab20440093fbee397b57f3da96a434fd3dcedc) docs(expo): update Metro config for Expo SDK 53+ (#8220) - [`973c5f8`](https://github.com/better-auth/better-auth/commit/973c5f8127d515f2d6921ec0d52e097038c517c4) docs: fix release og path - [`478e9fe`](https://github.com/better-auth/better-auth/commit/478e9fe24eb4eb1417e06792497ded1ff2976c81) docs: fix release image - [`551d607`](https://github.com/better-auth/better-auth/commit/551d607bfc13c0b7c93d3487b56b79ac326d6490) docs: use full URL for 1.5 release og image - [`7eb9022`](https://github.com/better-auth/better-auth/commit/7eb9022634b06f369d3f0b208d678cf6d17d94d5) docs: extract api-key plugin to separate package and update related schema and client SDK references - [`5451e15`](https://github.com/better-auth/better-auth/commit/5451e1575b86013a23a9fef20725e44973cd80bc) docs: fix sidebar contents from old (#8221) - [`40ad3fa`](https://github.com/better-auth/better-auth/commit/40ad3fa3c1c22275aeab2ff743b2ac0757ce0cd0) docs: update 1.5 release notes for api-keys (#8222) - [`0584e61`](https://github.com/better-auth/better-auth/commit/0584e61cc5fe47c06e59b02c57faca34d4d5c0a3) docs: re-add razorpay and payu community plugins (#8224) - [`f944e39`](https://github.com/better-auth/better-auth/commit/f944e39d6077701af7af9275faf78d98958fba14) docs: fix features component (#8225) ### 📊 Changes **372 files changed** (+41801 additions, -10923 deletions) <details> <summary>View changed files</summary> ➕ `.claude/agents/cherry-pick-release.md` (+184 -0) 📝 `.cspell/auth-terms.txt` (+1 -0) 📝 `.cspell/custom-words.txt` (+3 -1) 📝 `.cspell/names.txt` (+2 -0) 📝 `.cspell/tech-terms.txt` (+5 -2) 📝 `.cspell/third-party.txt` (+3 -0) ➕ `.github/workflows/demo.yml` (+56 -0) ➕ `.github/workflows/npm-dist-tag.yml` (+35 -0) 📝 `.github/workflows/release.yml` (+1 -0) 📝 `.gitignore` (+1 -0) 📝 `.remarkignore` (+1 -0) 📝 `CLAUDE.md` (+13 -2) 📝 `CONTRIBUTING.md` (+1 -1) 📝 `biome.json` (+2 -1) 📝 `demo/electron/package.json` (+10 -10) ➕ `demo/electron/pnpm-lock.yaml` (+4736 -0) ➕ `demo/electron/pnpm-workspace.yaml` (+4 -0) 📝 `demo/expo/app.config.ts` (+0 -4) 📝 `demo/expo/metro.config.js` (+1 -5) 📝 `demo/expo/package.json` (+24 -23) _...and 80 more files_ </details> ### 📄 Description ## Summary Fixes duplicate `operationId` values in the OpenAPI schema that cause code generation tools (like Orval) to produce TypeScript errors (`TS2300: Duplicate identifier`). **Changes:** - `listUserSessions` → `adminListUserSessions` (for `/admin/list-user-sessions`) - `updateUser` → `adminUpdateUser` (for `/admin/update-user`) ## Problem The admin plugin endpoints shared the same `operationId` as core endpoints: | Endpoint | Old operationId | New operationId | |----------|-----------------|-----------------| | `/admin/list-user-sessions` (POST) | `listUserSessions` | `adminListUserSessions` | | `/admin/update-user` (POST) | `updateUser` | `adminUpdateUser` | This violated the [OpenAPI 3.0 spec](https://swagger.io/docs/specification/v3_0/paths-and-operations/#operationid) which requires unique operationIds across all operations. ## Test Plan - [ ] Generate OpenAPI schema with admin plugin enabled - [ ] Verify no duplicate operationIds exist - [ ] Run Orval or similar code generator to confirm no TS2300 errors Fixes #8558 --- *This PR was created with AI assistance. The fix follows the same pattern established in PR #6203.* Made with [Cursor](https://cursor.com) <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Fixes duplicate `operationId` values in the OpenAPI schema for admin plugin endpoints to prevent codegen collisions (e.g., `TS2300: Duplicate identifier`) in tools like `orval`. Ensures each operation has a unique `operationId` per OpenAPI 3.0. - **Bug Fixes** - `/admin/list-user-sessions` (POST): `operationId` `listUserSessions` → `adminListUserSessions` - `/admin/update-user` (POST): `operationId` `updateUser` → `adminUpdateUser` <sup>Written for commit bbaa588e85eaa924cea1cc4d818b47ea924bc091. Summary will update on new commits.</sup> <!-- 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 22:39:37 -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#24967