Reputation: 1383
I am using refitter to generate the type safe api. But refitter generates all the DTOs by itself, but I wannt to use an already exsisting nuget package.
I tried with :
refitter swagger.json --skip-validation --additional-namespace "nuget.namespace.for.dtos"
But this obviously does not work. Than I tried manually to substitute the automatic generated types with the real types from the API. The application compiles, but no breakpoint is hit after the first request using the refit client:
Exception triggered: "Refit.ApiException" in Refit.dll
Exception triggered: "Refit.ApiException" in System.Private.CoreLib.dll
REMARK: The input parameters seem to work, but the output does not. Lets assume the refit specification looks like this:
Task<IInterface<MyExistingDTO>> SomethingToPOST([Body] MyPostDTO body);
The sending of MyPostDTO seems to work. But the conversion of the response to IInterface does not.
So my questions are:
Upvotes: 0
Views: 51