enkodellc / blazorboilerplate

Blazor Boilerplate / Starter Template with MudBlazor

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

$type and $id appended to all responses

enkodellc opened this issue · comments

commented

@GioviQ have you seen this and have a solution? I don't really want the class exposed to other users of my API.

Breeze/breeze.server.net#49

Even the controllers without Breeze attribute?

commented

Yes, There was a response on the Breeze issue mentioned above that I think we should look into for BB.

Immagine 2022-05-20 203207

It is not true

commented

I think it is related to JsonSerializerSettings, I am testing it out.

https://www.newtonsoft.com/json/help/html/serializetypenamehandling.htm

commented

I found the issue, It is in the middleware. The logic on this line allows the response to not be modified. I believe I was adding controller paths there I should not have been adding.

if (new string[] { "/api/localization", "/api/data", "/api/externalauth" }.Any(e => request.Path.StartsWithSegments(new PathString(e.ToLower()))))

in fact that is the list of paths whose response has not be transformed in an ApiResonse instance.

commented

Yes, I agree. I didn't write that very clear. :)