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

Missing HttpEntity body #15

Open
cloverstd opened this issue Jul 10, 2023 · 0 comments
Open

Missing HttpEntity body #15

cloverstd opened this issue Jul 10, 2023 · 0 comments

Comments

@cloverstd
Copy link
Contributor

@Controller
@RequestMapping("/test")
public class TestController {
    @Data
    @NoArgsConstructor
    @AllArgsConstructor
    public static class Foo {
        private String name;
    }

    @PostMapping("/test")
    public HttpEntity<Foo> test(HttpEntity<Foo> httpEntity) {
        return ResponseEntity.ok(httpEntity.getBody());
    }
}
export const testController = {
  /**
   * test
   */
  async test(settings?: Partial<Settings>) {
    return new NadInvoker<any>(BASE)
      .open('POST', '/test/test', settings)
      .execute();
  },
};
image

The generate code missing actual parameter.

Expect to generate the following code

export const testController = {
  /**
   * test
   */
  async test(httpEntity: {name: string}, settings?: Partial<Settings>) {
    return new NadInvoker<{name: string}>(BASE)
      .open('POST', '/test/test', settings)
      .execute();
  },
};
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

1 participant