CarlosOrozco88 / ui5-tools

UI5 Tools for vscode
Apache License 2.0
16 stars 2 forks source link

Multiple Destinations #9

Closed daniel-cabral closed 3 years ago

daniel-cabral commented 3 years ago

Hi Carlos!

Hope you're doing well. I'm using UI5-tools for a while and found a possible feature request. How we can mix 'Gateway' and 'other' proxies using this server?

Example:

{
  "ui5-tools.server.odataProxy": "Gateway",
  "ui5-tools.server.odataUri": "http://192.168.200.24:8000/",
  "ui5-tools.server.odataMountPath": "/unifort_ECC"
}

/* {
  "ui5-tools.server.odataProxy": "Other",
  "ui5-tools.server.odataUri": "https://www.receitaws.com.br/",
  "ui5-tools.server.odataMountPath": "/RECEITAWS"
} */

I have to comment/uncomment to use one or another...is there any way to do this?

Best Regards!

CarlosOrozco88 commented 3 years ago

Hi!

You can do something like this with the 'Other' configuration, also with command ui5-tools.configurator.odataProvider (alt+c alt+o):

{
  "ui5-tools.server.odataProxy": "Other",
  "ui5-tools.server.odataUri": "http://192.168.200.24:8000/,https://www.receitaws.com.br/",
  "ui5-tools.server.odataMountPath": "/unifort_ECC,/RECEITAWS"
}

The authentication in the .env should look like this:

UI5TOOLS_ODATA_USER=user1
UI5TOOLS_ODATA_PASSWORD=pass1
UI5TOOLS_ODATA_USER_2=user2
UI5TOOLS_ODATA_PASSWORD_2=pass2

By the way, if you have configured Gateway proxy, odataMountPath is hardcoded to /sap (in the extension code), so i think odataMountPath should look like this:

  "ui5-tools.server.odataMountPath": "/sap,/RECEITAWS"

I hope it works for you!

daniel-cabral commented 3 years ago

Hi @CarlosOrozco88 !

Solved using the "Other" proxy, no issues with usage and authentication. Thank you so much!