[PR #5401] [MERGED] refactor: streamline duplicated advanced param type definitions for oauth grant types #5190

Closed
opened 2026-03-17 02:39:34 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/hoppscotch/hoppscotch/pull/5401
Author: @anwarulislam
Created: 9/24/2025
Status: Merged
Merged: 9/25/2025
Merged by: @jamesgeorge007

Base: nextHead: refactor/remove-duplicate-zod-schema


📝 Commits (6)

  • 7421871 refactor: update OAuth flow parameter schemas to use shared definitions from hoppscotch-data
  • ec6082c refactor: replace inline parameter schemas with shared OAuth2 schemas for consistency
  • 10ddc75 refactor: unify OAuth2 parameter schemas for consistency across flows
  • a62a606 refactor: remove unused OAuth2 parameter schema and export new advanced parameter definitions
  • b8be13c refactor: update OAuth2 parameter schemas to use shared definitions and improve consistency
  • 3979a13 refactor: preserve optional field criterion

📊 Changes

7 files changed (+52 additions, -49 deletions)

View changed files

📝 packages/hoppscotch-common/src/services/oauth/flows/authCode.ts (+13 -15)
📝 packages/hoppscotch-common/src/services/oauth/flows/clientCredentials.ts (+10 -6)
📝 packages/hoppscotch-common/src/services/oauth/flows/implicit.ts (+12 -10)
📝 packages/hoppscotch-common/src/services/oauth/flows/password.ts (+9 -9)
📝 packages/hoppscotch-common/src/services/oauth/utils.ts (+4 -7)
📝 packages/hoppscotch-data/src/rest/index.ts (+2 -0)
📝 packages/hoppscotch-data/src/rest/v/15/auth.ts (+2 -2)

📄 Description

Closes FE-1004

This pull request refactors the OAuth flow parameter schemas in the service layer to use shared, centralized schemas from @hoppscotch/data. It replaces locally-defined schemas with the imported ones, omitting unnecessary fields and ensuring required arrays for service logic. This change improves maintainability and consistency across the codebase.


🔄 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/hoppscotch/hoppscotch/pull/5401 **Author:** [@anwarulislam](https://github.com/anwarulislam) **Created:** 9/24/2025 **Status:** ✅ Merged **Merged:** 9/25/2025 **Merged by:** [@jamesgeorge007](https://github.com/jamesgeorge007) **Base:** `next` ← **Head:** `refactor/remove-duplicate-zod-schema` --- ### 📝 Commits (6) - [`7421871`](https://github.com/hoppscotch/hoppscotch/commit/74218718ce50d6dac86a35e5dc9288d0eec8f6da) refactor: update OAuth flow parameter schemas to use shared definitions from hoppscotch-data - [`ec6082c`](https://github.com/hoppscotch/hoppscotch/commit/ec6082c2573770972871d2da9ed3c1ffc00dbecf) refactor: replace inline parameter schemas with shared OAuth2 schemas for consistency - [`10ddc75`](https://github.com/hoppscotch/hoppscotch/commit/10ddc75e32cb3df09e93d17295083b6449aab6d9) refactor: unify OAuth2 parameter schemas for consistency across flows - [`a62a606`](https://github.com/hoppscotch/hoppscotch/commit/a62a60670245d84b982350ad76c4560bad5cdf6d) refactor: remove unused OAuth2 parameter schema and export new advanced parameter definitions - [`b8be13c`](https://github.com/hoppscotch/hoppscotch/commit/b8be13c378da5673d3ff10a5aae59140461bae6d) refactor: update OAuth2 parameter schemas to use shared definitions and improve consistency - [`3979a13`](https://github.com/hoppscotch/hoppscotch/commit/3979a13154b914ed27a4b48b75882d151131f3ca) refactor: preserve optional field criterion ### 📊 Changes **7 files changed** (+52 additions, -49 deletions) <details> <summary>View changed files</summary> 📝 `packages/hoppscotch-common/src/services/oauth/flows/authCode.ts` (+13 -15) 📝 `packages/hoppscotch-common/src/services/oauth/flows/clientCredentials.ts` (+10 -6) 📝 `packages/hoppscotch-common/src/services/oauth/flows/implicit.ts` (+12 -10) 📝 `packages/hoppscotch-common/src/services/oauth/flows/password.ts` (+9 -9) 📝 `packages/hoppscotch-common/src/services/oauth/utils.ts` (+4 -7) 📝 `packages/hoppscotch-data/src/rest/index.ts` (+2 -0) 📝 `packages/hoppscotch-data/src/rest/v/15/auth.ts` (+2 -2) </details> ### 📄 Description Closes FE-1004 This pull request refactors the OAuth flow parameter schemas in the service layer to use shared, centralized schemas from `@hoppscotch/data`. It replaces locally-defined schemas with the imported ones, omitting unnecessary fields and ensuring required arrays for service logic. This change improves maintainability and consistency across the codebase. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-17 02:39:34 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/hoppscotch#5190
No description provided.