postman-code-generators icon indicating copy to clipboard operation
postman-code-generators copied to clipboard

Collection Level Headers Not Shown on Examples

Open rd67 opened this issue 5 years ago • 3 comments

Describe the bug If some headers like: Authorization are defined at collection level(Project Folder) then in the examples at right hand side these headers are missing.

Expected code snippet and corresponding request These headers should be shown in all API's, it confuses a developer because the developer would expect the code to run when copied from example and tried on local device. Such as curl request etc.

rd67 avatar Oct 14 '20 17:10 rd67

@rd67 Could you tell me the steps to reproduce this problem.

karmanya007 avatar Oct 24 '20 09:10 karmanya007

@karmanya007 Ran into this issue as well. Here are the steps:

  1. I created an empty collection "Test"
  2. I added a top-level request to this collection (no folders) with auth being inherited
  3. I edited the "Test" collection Authorization to use Basic auth with username=test

This is what I saw on the generated docs:

image

No authorization included in the curl request example despite it being inherited. When these docs were opened in postman, the resulting code was correct.

goodpaul6 avatar Oct 24 '20 23:10 goodpaul6

@karmanya007 Can you please provide any update on this issue?

rd67 avatar Jan 07 '21 23:01 rd67