GFlisch / Arc4u.Guidance.Doc

Other
5 stars 1 forks source link

(bug, Guidance 2022.2.1.11): code generation of the facade client or blazor proxy #152

Closed KrauseT closed 1 year ago

KrauseT commented 1 year ago

Describe the bug After my backend is generated and tested via swagger, i added a blazor frontend project. Then i added a Facade Rest Proxy (contect menu for the blazor project). I created some pages and tried to fill one of the page with content from the backend with using the generated proxy. In the console of the application i got a 404 with following request for the backend:

GET https://localhost:7126/gamestore/gamestore/facade/items

As you can see, there is one too many "gamestore" in the path.

In the facade.sdk project the facadeClient adds one part of this path:

var urlBuilder_ = new System.Text.StringBuilder();
urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/gamestore/facade/items");

But the generated facade proxy also add this part of the path right before:

var client = httpClientFactory.CreateClient("OAuth2");
Proxy = new StoreClient(client)
{
    BaseUrl = $"{tokenSettings.Values["RootServiceUrl"].TrimEnd(new[] {'/'})}/gamestore/"
};

Expected behavior After generating the proxy, i can use this proxy to get my data.

Desktop (please complete the following information):

GFlisch commented 1 year ago

Will be solved vua #124