[PR #3948] [CLOSED] feat: console error messages and better names for requests imported from openapi #4611

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

📋 Pull Request Information

Original PR: https://github.com/hoppscotch/hoppscotch/pull/3948
Author: @sawa-ko
Created: 3/29/2024
Status: Closed

Base: mainHead: feat/show-error-message-in-console-openapi-import


📝 Commits (1)

  • d9dae2a feat: console error messages and better names for requests imported from openapi

📊 Changes

3 files changed (+42 additions, -22 deletions)

View changed files

📝 packages/hoppscotch-common/locales/en.json (+1 -1)
📝 packages/hoppscotch-common/locales/es.json (+4 -4)
📝 packages/hoppscotch-common/src/helpers/import-export/import/openapi.ts (+37 -17)

📄 Description

Closes #

Description

This PR shows an error message in console when an error occurs when parsing the OpenAPi file, since actually there is no error message, just a generic message, and it is impossible to know why the import failed (I spent 30 minutes looking for what was wrong with my file lol).

Also, in the requests, we currently try to obtain the name with the following steps:

  1. From its operationId property
  2. From its summary property
  3. Default generic name

Currently, most of the request names always arrive in this 3rd step because usually the schemas that I have found do not define the summary property or things like that, so in this PR we try to extract the name from the URL of the request, so that the name is more understandable and not have folder with requests named as untitled request. Attached is evidence of how it was before and how it is now.

Before
image

Now
image

Checks

  • My pull request adheres to the code style of this project
  • My code requires changes to the documentation
  • I have updated the documentation as required
  • All the tests have passed

Additional Information


🔄 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/3948 **Author:** [@sawa-ko](https://github.com/sawa-ko) **Created:** 3/29/2024 **Status:** ❌ Closed **Base:** `main` ← **Head:** `feat/show-error-message-in-console-openapi-import` --- ### 📝 Commits (1) - [`d9dae2a`](https://github.com/hoppscotch/hoppscotch/commit/d9dae2a7ea2ea5966b08db1f252c2c257f29f178) feat: console error messages and better names for requests imported from openapi ### 📊 Changes **3 files changed** (+42 additions, -22 deletions) <details> <summary>View changed files</summary> 📝 `packages/hoppscotch-common/locales/en.json` (+1 -1) 📝 `packages/hoppscotch-common/locales/es.json` (+4 -4) 📝 `packages/hoppscotch-common/src/helpers/import-export/import/openapi.ts` (+37 -17) </details> ### 📄 Description <!-- Thanks for creating this pull request 🤗 Please make sure that the pull request is limited to one type (docs, feature, etc.) and keep it as small as possible. You can open multiple prs instead of opening a huge one. --> <!-- If this pull request closes an issue, please mention the issue number below --> Closes # <!-- Issue # here --> ### Description <!-- Add a brief description of the pull request --> This PR shows an error message in console when an error occurs when parsing the OpenAPi file, since actually there is no error message, just a generic message, and it is impossible to know why the import failed (I spent 30 minutes looking for what was wrong with my file lol). Also, in the requests, we currently try to obtain the name with the following steps: 1. From its operationId property 2. From its summary property 3. Default generic name Currently, most of the request names always arrive in this 3rd step because usually the schemas that I have found do not define the summary property or things like that, so in this PR we try to extract the name from the URL of the request, so that the name is more understandable and not have folder with requests named as untitled request. Attached is evidence of how it was before and how it is now. > Before ![image](https://github.com/hoppscotch/hoppscotch/assets/56084970/a56cf6c0-6d3f-4794-ac35-1826f4957e9a) > Now ![image](https://github.com/hoppscotch/hoppscotch/assets/56084970/db165b65-69e5-4092-9ee7-851bd95899d0) <!-- You can also choose to add a list of changes and if they have been completed or not by using the markdown to-do list syntax - [ ] Not Completed - [x] Completed --> ### Checks <!-- Make sure your pull request passes the CI checks and do check the following fields as needed - --> - [x] My pull request adheres to the code style of this project - [ ] My code requires changes to the documentation - [ ] I have updated the documentation as required - [x] All the tests have passed ### Additional Information <!-- Any additional information like breaking changes, dependencies added, screenshots, comparisons between new and old behaviour, etc. --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-17 02:08:01 +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#4611
No description provided.