Http requests - using multiple http-client.private.env.json files in different directories

I have a single project, and within it I want to test multiple APIs.  Some of these are defined within the project, and some are 3rd party.  So roughly speaking I have:

tests
    api1
        http-client-private.env.json
        ....some .http files
    api2
        http-client-private.env.json
        ....some .http files
   ...etc...

However, when I try to run the http scripts in api1, I see environments defined for both api1 and api2.  This means I need to carefully choose which environment to select, as some in the list won't apply, and I choose the wrong one it errors.  (Actually the lists are 100% mutually exclusive)

Worse than this, if I define the same host names in both files, then I just get an error.  Yes I could name "local" to be "local-api1" and "dev" to be "dev-api1", etc etc but it compounds the first problem.

Is this a bug or by design ??  It would make more sense to me if settings cascaded down from parent directories, but in sibling or unrelated directories they were independent.

I'm using PyCharm, but I'm reasonably sure I've seen it in other IDEs, so posted it in intellij as I think it's a core issue rather than IDE specific.

Please sign in to leave a comment.