[PR #4075] [CLOSED] Add Response examples to a request #4651

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

📋 Pull Request Information

Original PR: https://github.com/hoppscotch/hoppscotch/pull/4075
Author: @codeasashu
Created: 5/19/2024
Status: Closed

Base: mainHead: response-examples


📝 Commits (7)

  • b06234a feat: save responses to request
  • a1f8b3f feat: editing capability in examples
  • 1b5c083 fix: active tab response edit bug
  • caba376 feat: import postman examples
  • 786db3e fix: rename req to request in responses schema
  • 767ac08 fix: test script bug
  • 63fe3f8 feat: mock api in backend

📊 Changes

33 files changed (+2302 additions, -29 deletions)

View changed files

📝 packages/hoppscotch-backend/package.json (+3 -0)
📝 packages/hoppscotch-backend/src/app.module.ts (+2 -0)
packages/hoppscotch-backend/src/mock/fixtures/petstore.yaml (+931 -0)
packages/hoppscotch-backend/src/mock/mock.controller.ts (+13 -0)
packages/hoppscotch-backend/src/mock/mock.module.ts (+10 -0)
packages/hoppscotch-backend/src/mock/mock.service.ts (+98 -0)
📝 packages/hoppscotch-common/locales/en.json (+6 -2)
📝 packages/hoppscotch-common/src/components.d.ts (+2 -0)
packages/hoppscotch-common/src/components/collections/EditResponse.vue (+78 -0)
packages/hoppscotch-common/src/components/collections/Example.vue (+103 -0)
📝 packages/hoppscotch-common/src/components/collections/MyCollections.vue (+70 -0)
📝 packages/hoppscotch-common/src/components/collections/Request.vue (+25 -0)
📝 packages/hoppscotch-common/src/components/collections/SaveRequest.vue (+1 -0)
📝 packages/hoppscotch-common/src/components/collections/index.vue (+212 -0)
📝 packages/hoppscotch-common/src/components/http/TabHead.vue (+10 -3)
📝 packages/hoppscotch-common/src/components/lenses/ResponseBodyRenderer.vue (+8 -0)
📝 packages/hoppscotch-common/src/components/lenses/renderers/JSONLensRenderer.vue (+20 -1)
📝 packages/hoppscotch-common/src/composables/codemirror.ts (+6 -1)
📝 packages/hoppscotch-common/src/composables/lens-actions.ts (+32 -1)
📝 packages/hoppscotch-common/src/helpers/import-export/import/postman.ts (+86 -3)

...and 13 more files

📄 Description

Closes #1875

Description

Since 1894 has gone stale, I've decided to revamp the feature once again. My main motivations are:

  1. Save common useful responses to a request
  2. This is a prerequisite to support openapi export (#3821)
  3. Ability to edit and share responses along with request, provides more fulfilling API experiences
  • Save responses of request
  • Rename, delete and edit saved responses
  • Import responses from postman collection
  • Import responses from openapi
  • Export responses

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

🔄 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/4075 **Author:** [@codeasashu](https://github.com/codeasashu) **Created:** 5/19/2024 **Status:** ❌ Closed **Base:** `main` ← **Head:** `response-examples` --- ### 📝 Commits (7) - [`b06234a`](https://github.com/hoppscotch/hoppscotch/commit/b06234a2b0e71e1f50efc3880ee21a6f661738bc) feat: save responses to request - [`a1f8b3f`](https://github.com/hoppscotch/hoppscotch/commit/a1f8b3f223f711f82229e55a4dd5091efe171305) feat: editing capability in examples - [`1b5c083`](https://github.com/hoppscotch/hoppscotch/commit/1b5c083c65bac4515c8b14126f3d93aaf16de2c1) fix: active tab response edit bug - [`caba376`](https://github.com/hoppscotch/hoppscotch/commit/caba3763e0419e45abf7ba2cebc4253b518fe928) feat: import postman examples - [`786db3e`](https://github.com/hoppscotch/hoppscotch/commit/786db3eddde2708012693e4abbcdbd7b50998074) fix: rename req to request in responses schema - [`767ac08`](https://github.com/hoppscotch/hoppscotch/commit/767ac08923a060f6d1111d7d723edfe1bc3a3a75) fix: test script bug - [`63fe3f8`](https://github.com/hoppscotch/hoppscotch/commit/63fe3f8af28c6f2595507b3cab907f032bc3b1d1) feat: mock api in backend ### 📊 Changes **33 files changed** (+2302 additions, -29 deletions) <details> <summary>View changed files</summary> 📝 `packages/hoppscotch-backend/package.json` (+3 -0) 📝 `packages/hoppscotch-backend/src/app.module.ts` (+2 -0) ➕ `packages/hoppscotch-backend/src/mock/fixtures/petstore.yaml` (+931 -0) ➕ `packages/hoppscotch-backend/src/mock/mock.controller.ts` (+13 -0) ➕ `packages/hoppscotch-backend/src/mock/mock.module.ts` (+10 -0) ➕ `packages/hoppscotch-backend/src/mock/mock.service.ts` (+98 -0) 📝 `packages/hoppscotch-common/locales/en.json` (+6 -2) 📝 `packages/hoppscotch-common/src/components.d.ts` (+2 -0) ➕ `packages/hoppscotch-common/src/components/collections/EditResponse.vue` (+78 -0) ➕ `packages/hoppscotch-common/src/components/collections/Example.vue` (+103 -0) 📝 `packages/hoppscotch-common/src/components/collections/MyCollections.vue` (+70 -0) 📝 `packages/hoppscotch-common/src/components/collections/Request.vue` (+25 -0) 📝 `packages/hoppscotch-common/src/components/collections/SaveRequest.vue` (+1 -0) 📝 `packages/hoppscotch-common/src/components/collections/index.vue` (+212 -0) 📝 `packages/hoppscotch-common/src/components/http/TabHead.vue` (+10 -3) 📝 `packages/hoppscotch-common/src/components/lenses/ResponseBodyRenderer.vue` (+8 -0) 📝 `packages/hoppscotch-common/src/components/lenses/renderers/JSONLensRenderer.vue` (+20 -1) 📝 `packages/hoppscotch-common/src/composables/codemirror.ts` (+6 -1) 📝 `packages/hoppscotch-common/src/composables/lens-actions.ts` (+32 -1) 📝 `packages/hoppscotch-common/src/helpers/import-export/import/postman.ts` (+86 -3) _...and 13 more files_ </details> ### 📄 Description Closes #1875 ### Description Since [1894](https://github.com/hoppscotch/hoppscotch/pull/1894) has gone stale, I've decided to revamp the feature once again. My main motivations are: 1. Save common useful responses to a request 2. This is a prerequisite to support openapi export (#3821) 3. Ability to edit and share responses along with request, provides more fulfilling API experiences - [x] Save responses of request - [x] Rename, delete and edit saved responses - [x] Import responses from postman collection - [ ] Import responses from openapi - [x] Export responses ### Checks - [x] My pull request adheres to the code style of this project - [x] My code requires changes to the documentation - [ ] I have updated the documentation as required - [ ] All the tests have passed --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-17 02:10:12 +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#4651
No description provided.