Jaguar-dart / client

Contains various packages for client side
46 stars 22 forks source link

Return type of the api is not typecasted #46

Open noisytempo opened 5 years ago

noisytempo commented 5 years ago
  @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 5 years ago

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 5 years ago

@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?

tejainece commented 5 years ago

@noisytempo Can you please more info.