collectionVariable not shown in path of web documentation

I’m relatively new to Postman, and I noticed a strange issue when looking at my web documentation for a collection. I have a collection with several folders. At the collection level, I’ve defined a variable {{base_url}} in the pre-request script. At the folder level, I’ve defined a collectionVariable {{api_path}} in the pre-request script for the folder. I combine those in each request. For example:

{{base_url}}/{{api_path}}/home

When I send the request, it returns the expected response. Everything is working fine. However, when I view the web documentation, the {{api_path}} variable is not shown. What I see is:

{{base_url}}//home

Am I doing something wrong, or is this a bug?

Thanks!

Hi @shawnh

Welcome to the community :wave:

May I know if you are trying to set the environment variables from the pre-requests scripts of the collection/folder level? If yes, then you will need to select that particular environment while publishing that documentation as mentioned here.

If this is not the case, please elaborate on how these variables are resolved in the URL to help us assist you further.