How to document params which are defined in Globals?

I have one parameter which needs to be passed to every API call. It is a complex JSON object which I have defined as global variable.

In the Global param definitions I miss a field ‘description’ which goes to the documentation.

Here is a sample how I use it:

In bulk edit:

In globals definition:
requestmetadto {CallingRequestId:{{$guid}},Source:“PostmanApiTestCall”,CallingUserId:“postman”,CallingUserEmail:“”,CallingUserIp:{{$randomIP}},clientType:“Postman”}

I like to describe each of the fields in my documentation. Currently in the documentation all variables show up in curly braces as shown in the screenshot

Is there a way to make this consumer friendlier for the users of the documentation?

Hi @tbednarz! If you use either collection variables or environment variables (where the environment is published with your docs) the values will actually resolve in the rendered documentation - bit more info in our docs.

If your variable is a parameter to the request (e.g. a query or path parameter) you should be able to add a description to the parameter itself, but this doesn’t apply to e.g. portions of the base url. I don’t believe we have the ability to add descriptions to variables in published docs, so currently I think you’d need to include that info in the request description itself - it may be worth seeing if any of the existing issues on our support repo cover your use case and if not add a new one. Hope that helps!

1 Like