[PR #3745] [MERGED] fix: fix unwanted double slashes when importing from openapi #4513

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

📋 Pull Request Information

Original PR: https://github.com/hoppscotch/hoppscotch/pull/3745
Author: @amk-dev
Created: 1/12/2024
Status: Merged
Merged: 1/23/2024
Merged by: @AndrewBastin

Base: release/2023.12.3Head: fix/fix-double-slashes-in-openapi-import


📝 Commits (1)

  • cde4b46 fix: fix unwanted double slashes when importing from openapi

📊 Changes

1 file changed (+12 additions, -6 deletions)

View changed files

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

📄 Description

Closes #3743
Fixes HFE-395

Before

in function convertPathToHoppReqs, when calculating the endpoint, if the value returned from the parseOpenAPIUrl has a trailing slash and replaceOpenApiPathTemplating has a leading slash, it will cause the endpoint to have a double slash in the middle.

After

We handle the above case by removing the extra slash.


🔄 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/3745 **Author:** [@amk-dev](https://github.com/amk-dev) **Created:** 1/12/2024 **Status:** ✅ Merged **Merged:** 1/23/2024 **Merged by:** [@AndrewBastin](https://github.com/AndrewBastin) **Base:** `release/2023.12.3` ← **Head:** `fix/fix-double-slashes-in-openapi-import` --- ### 📝 Commits (1) - [`cde4b46`](https://github.com/hoppscotch/hoppscotch/commit/cde4b46bafbee824eee5f1db037f75eb4ad581f5) fix: fix unwanted double slashes when importing from openapi ### 📊 Changes **1 file changed** (+12 additions, -6 deletions) <details> <summary>View changed files</summary> 📝 `packages/hoppscotch-common/src/helpers/import-export/import/openapi.ts` (+12 -6) </details> ### 📄 Description Closes #3743 Fixes HFE-395 **Before** in function `convertPathToHoppReqs`, when calculating the endpoint, if the value returned from the `parseOpenAPIUrl` has a trailing slash and `replaceOpenApiPathTemplating` has a leading slash, it will cause the endpoint to have a double slash in the middle. **After** We handle the above case by removing the extra slash. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-17 02:02:35 +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#4513
No description provided.