[PR #4908] [MERGED] fix(common): handle missing host and basePath in OpenAPI URL parsing #4981

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

📋 Pull Request Information

Original PR: https://github.com/hoppscotch/hoppscotch/pull/4908
Author: @anwarulislam
Created: 3/18/2025
Status: Merged
Merged: 3/19/2025
Merged by: @jamesgeorge007

Base: patchHead: fix/missing-openapi-baseurl


📝 Commits (2)

  • ecc4083 fix(common): handle missing host and basePath in OpenAPI URL parsing
  • 9f307f7 chore: cleanup

📊 Changes

1 file changed (+3 additions, -1 deletions)

View changed files

📝 packages/hoppscotch-common/src/helpers/import-export/import/openapi.ts (+3 -1)

📄 Description

Closes HFE-783 #4852

This PR addresses the issue where importing the Open API results in requests being generated with an undefined base path, specifically creating requests like undefined/api/v2/list instead of the correct <>/api/v2/list.


🔄 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/4908 **Author:** [@anwarulislam](https://github.com/anwarulislam) **Created:** 3/18/2025 **Status:** ✅ Merged **Merged:** 3/19/2025 **Merged by:** [@jamesgeorge007](https://github.com/jamesgeorge007) **Base:** `patch` ← **Head:** `fix/missing-openapi-baseurl` --- ### 📝 Commits (2) - [`ecc4083`](https://github.com/hoppscotch/hoppscotch/commit/ecc40836fca74fed3d07a271ff1746de22574647) fix(common): handle missing host and basePath in OpenAPI URL parsing - [`9f307f7`](https://github.com/hoppscotch/hoppscotch/commit/9f307f79f1e7d1484b6adaca0f6564c328f21724) chore: cleanup ### 📊 Changes **1 file changed** (+3 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `packages/hoppscotch-common/src/helpers/import-export/import/openapi.ts` (+3 -1) </details> ### 📄 Description Closes HFE-783 #4852 This PR addresses the issue where importing the Open API results in requests being generated with an undefined base path, specifically creating requests like undefined/api/v2/list instead of the correct <<baseUrl>>/api/v2/list. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-17 02:28:23 +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#4981
No description provided.