Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(generate-code): fixing generate code issue where headers from collections are not being reflected #1246

Closed

Conversation

DivyMohan14
Copy link
Contributor

@DivyMohan14 DivyMohan14 commented Dec 19, 2023

# Description

This PR fixes the generate code issue where headers from collections are not being reflected upon generating code
Fixes: #1245

Contribution Checklist:

  • The pull request only addresses one issue or adds one feature.
  • The pull request does not introduce any breaking changes
  • I have added screenshots or gifs to help explain the change if applicable.
  • I have read the contribution guidelines.
  • Create an issue and link to the pull request.

Issue Video:

bruno_issue.mov

Resolution Video:

bruno_issue_solution.mov

@DivyMohan14
Copy link
Contributor Author

@helloanoop can you please check this when you get time, will this be the correct way to go about this ?

Copy link
Member

@Its-treason Its-treason left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey, I just looked over your merge request, and it's not quite right.

You are using the headers from item.requestSent.headers but this is only set after sending a request.

The collection headers are stored in collection.root.request.headers and can be merged with the normal request headers. I added some code suggestion, with my idea.

@DivyMohan14
Copy link
Contributor Author

@Its-treason thanks for the review. The only reason I wanted to stick with items was to make sure any new additions do not cause this piece to break again. But given that we only have collections for now, I think this is a good idea.
Thanks and please re-review

Copy link
Member

@Its-treason Its-treason left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So I just saw this PR has been merged: #1316 that does the same thing as this PR.

So This PR might be obsolete, sorry I put you through the hassle of making review changes, I should have seen the other PR earlier

@sanjai0py
Copy link
Member

Closing this pull request as another one fixing the bug had already been merged. Thank you for taking the time to address the issue!!

@sanjai0py sanjai0py closed this Jul 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug] Headers set at collection level not reflected in generated code snippet
3 participants