Return type of the api is not typecasted
noisytempo opened this issue · 3 comments
noisytempo commented
@DeleteReq(path: "products/:id")
Future<void> deleteProduct(@PathParam() int id);
The above doesn't work, since I know that this api does not return anything.
The code which works is below:
@DeleteReq(path: "products/:id")
Future<String> deleteProduct(@PathParam() int id);
jaumard commented
What's the problem here exactly ? You may know the api doesn't return anything but you also may don't care about so void
make sens.
It's not the responsibility of jaguar to be sure you put your definition correctly. If you want that use an openapi definition and generate your jaguar definition from it.
tejainece commented
Why doesn't this work? It should work.
@DeleteReq(path: "products/:id")
Future<void> deleteProduct(@PathParam() int id);
I will test it and fix it if it does not work. What error do you get?
tejainece commented
@noisytempo Can you please more info.