Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Return type of the api is not typecasted #46

Open
noisytempo opened this issue Jan 14, 2019 · 3 comments
Open

Return type of the api is not typecasted #46

noisytempo opened this issue Jan 14, 2019 · 3 comments

Comments

@noisytempo
Copy link

  @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
Copy link
Contributor

jaumard commented Jan 14, 2019

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
Copy link
Member

@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
Copy link
Member

@noisytempo Can you please more info.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants