Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Postman collection Authorization not present in documentation headers

I have started using Postman to map out my API and also wanted have a quick, easy way to document it and share it.

My API is using JWT for auth and this token needs to be present in each request except login.

In order to keep it DRY I have used Postman collection Authorization as explained on their blog http://blog.getpostman.com/2017/12/13/keep-it-dry-with-collection-and-folder-elements/

Example of how I set up collection authorization type bearer

This header is being used by my API as type "Inherit auth from parent" and this works with no problems during my requests.

But if I choose to view collection in browser this header is not displayed in the request or examples see screenshot.

Collection documentation as viewed in web

Here is the cURL request in Postman: curl -X GET \ https://example.api/v1/auth/user \ -H 'Content-Type: application/json'

Is it possible to display the auth header while using the collection settings or I should add the header myself for each request in order to make sure that this is added in the examples and documentation?

Edit: I've found that if I hover over the Authorization header I get the following message:

This temporary header is generated by Postman and is not saved with your request.

Here is a screenshot from the app with Postman collection temporary headers.

like image 825
icosmin Avatar asked Jun 20 '18 04:06

icosmin


1 Answers

This issue will fix in 2 or 3 mounths.

You can track the issue status in https://github.com/postmanlabs/postman-app-support/projects/40#card-33062423

like image 85
ridvanaltun Avatar answered Oct 02 '22 00:10

ridvanaltun