Closed
Description
People tend to make apis with lambdas, why not have the plumbing be automated by a code generator?
People should be able to write:
@Controller("/widgets")
public class WidgetController {
private final HelloComponent hello;
public WidgetController(HelloComponent hello) {
this.hello = hello;
}
@Get("/{id}")
Widget getById(int id) {
return new Widget(id, "you got it"+ hello.hello());
}
record Widget(int id, String name){};
}
And have the lambda (de)serialization and routing code generated.
We're gonna need:
- Some sort of Router Class that'll match the routes
- A Json Interface for (de)serializing the body
- Interfaces for wiring
- support for both API Gateway and ALB
After all of that, we can start generating the code to hook into this.