You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be nice if you could pass the case (i.e. camelCase, snake_case etc.) of the api as a parameter, or even better if WebAnchor could recognize it automatically.
The text was updated successfully, but these errors were encountered:
The default serializer is the JSON.NET JsonSerializer which has a ContractResolver-property that can be used to change how json is serialized (like the CamelCasePropertyNamesContractResolver). So this can be applied for web anchor like this:
var myApi = Api.For<ITestApi>(host, new ApiSettings
{
ContentSerializer = new ContentSerializer(new JsonSerializer
{
ContractResolver = new CamelCasePropertyNamesContractResolver()
})
});
Maybe we should be clearer on where to modify serialization. The name ContentSerializer does really reveal wheather it is used for Request content serialization or Reponse content serialization...
Also changing reponse serialization is little bit harder to get to in order to change it (if you don't know where to look), but that's easily solved by documentation
It would be nice if you could pass the case (i.e. camelCase, snake_case etc.) of the api as a parameter, or even better if WebAnchor could recognize it automatically.
The text was updated successfully, but these errors were encountered: