Closed SSantiagoDev closed 1 year ago
Hi @SSantiagoDev, Thanks for the issue found. The cade has been reworked in the next version of the Guidance coming soon and the problem will be fixed.
The new version is working with settings registered and retrieve based on IOptionsMonitor
Proxy = new $(facadename)Client(client)
{
BaseUrl = tokenSettings.Values["RootServiceUrl"]
};
}
As you see the BaseUrl is not adding anymore the /core/ as mentioned in your example. I have also removed the .TrimEnd because the proxy code generated does this for us: var urlBuilder = new System.Text.StringBuilder(); urlBuilder.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/core/....");
Description of the bug The BaseUrl generated by the Guidance is incorrect when using 'Add Facade Rest Proxy' in the FrontEnd - Common project
To Reproduce
Expected behavior The BaseUrl should not contain twice the name of the microservice. Should be like:
BaseUrl = $"{tokenSettings.Values["RootServiceUrl"].TrimEnd(new[] { '/' })}/"
Screenshots
Desktop (please complete the following information):