Conflict of same variable in collection and environment scopes

Thanks Mike, the workaround you suggested works for me. Here’s the pre-request script:

pm.request.url.update(`${pm.environment.get('baseUrl')}${pm.collectionVariables.get('baseUrl')}${pm.request.url.getPath()}`)

Btw, here’s the OpenAPI specification: https://ea1.aconex.com/api/package-management/docs/openapi/package-management-api-v1.yaml. After imported, a collection variable baseUrl=/api/package-management is created.

I’ll raise a feature request later.

Cheers.

1 Like