Jaguar-dart / client

Contains various packages for client side

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Return type of the api is not typecasted

noisytempo opened this issue · comments

  @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);

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.

@noisytempo

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?

@noisytempo Can you please more info.