[PR #4482] [MERGED] fix: inherited headers and auth included in code generation #4822

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

📋 Pull Request Information

Original PR: https://github.com/hoppscotch/hoppscotch/pull/4482
Author: @Loznerol
Created: 10/26/2024
Status: Merged
Merged: 12/18/2024
Merged by: @jamesgeorge007

Base: nextHead: main


📝 Commits (4)

  • 3443fff fix: inherited headers included in code generation
  • b0baedd fix: update inherited header code gen flow and add inherited auth flow
  • e86c5c4 chore: update the document
  • 8335ab2 chore: cleanup

📊 Changes

1 file changed (+60 additions, -13 deletions)

View changed files

📝 packages/hoppscotch-common/src/components/http/Codegen.vue (+60 -13)

📄 Description

Closes HFE-670 #4286

Fixes inherited headers and auth of parent collections not being shown in codegen.

Example before (header and auth not shown in generated code):
image

After (inherited header and auth shown in generated code):
image

What's changed

  • Added the array of inherited headers found in the inherited properties of the current document to the generateCode() method.
  • The auth is fetched from the document and populated accordingly.

🔄 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/4482 **Author:** [@Loznerol](https://github.com/Loznerol) **Created:** 10/26/2024 **Status:** ✅ Merged **Merged:** 12/18/2024 **Merged by:** [@jamesgeorge007](https://github.com/jamesgeorge007) **Base:** `next` ← **Head:** `main` --- ### 📝 Commits (4) - [`3443fff`](https://github.com/hoppscotch/hoppscotch/commit/3443fff7e2f77305745a26465ca8ab6580c51642) fix: inherited headers included in code generation - [`b0baedd`](https://github.com/hoppscotch/hoppscotch/commit/b0baeddb448476ca086c16e6121041e3a965209f) fix: update inherited header code gen flow and add inherited auth flow - [`e86c5c4`](https://github.com/hoppscotch/hoppscotch/commit/e86c5c46cf15b3addd3af1736a8ea6982402856f) chore: update the document - [`8335ab2`](https://github.com/hoppscotch/hoppscotch/commit/8335ab2fe97b9a5b1ea5bba41de919b59de2cb2d) chore: cleanup ### 📊 Changes **1 file changed** (+60 additions, -13 deletions) <details> <summary>View changed files</summary> 📝 `packages/hoppscotch-common/src/components/http/Codegen.vue` (+60 -13) </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 HFE-670 #4286 <!-- Add an introduction into what this PR tries to solve in a couple of sentences --> Fixes inherited headers and auth of parent collections not being shown in codegen. Example before (header and auth not shown in generated code): ![image](https://github.com/user-attachments/assets/780f02c7-2516-467d-8dcf-b492f30b2541) After (inherited header and auth shown in generated code): ![image](https://github.com/user-attachments/assets/a43819be-127e-49e8-b1ca-5c957230a4fa) ### What's changed - Added the array of inherited headers found in the inherited properties of the current document to the generateCode() method. - The auth is fetched from the document and populated accordingly. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-17 02:19:30 +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#4822
No description provided.