We’ve started re-writing our products backend APIs with ServiceStack - the old API was NancyFX.
My first task was to setup integration tests (for using both the old Refit interfaces as they were to ensure backwards compatibility, and the new JsonServiceClient impls).
I’ve hit one major snag that I’m unable to solve: The old system used snake case.
So when I do this:
JsConfig.TextCase = TextCase.SnakeCase;
I can authenticate and make API calls with the Refit APIs fine, but the JsonServiceClient calls fail with ‘User Name’ should not be null.
When I don’t set SnakeCase - the JsonServiceClient works fine but the old Refit APIs fail.
Is there a recommended path forward here? I’m trying my hardest not to modify the old clients serialization and the old APIs serialization.
In one set of tests, I use refit interfaces to call the API (these work with TextCase.SnakeCase). In the other set of tests I am using JsonServiceClient (these don’t work - properties are null)