You no longer need to supply a path to verbs (get, post, etc) in the ApiBuilder.

It makes for pretty neat APIs:

  • Java
  • Kotlin
app.routes(() -> {
    path("users", () -> {
        get(UserController::getAllUsers);
        post(UserController::createUser);
        path(":id", () -> {
            get(UserController::getUser);
            patch(UserController::updateUser);
            delete(UserController::deleteUser);
        });
    });
});
app.routes {
    path("users") {
        get(userController::getAllUsers);
        post(userController::createUser);
        path(":id") {
            get(userController::getUser);
            patch(userController::updateUser);
            delete(userController::deleteUser);
        }
    }
}

Some verbs (trace, head, options, connect) were also removed from ApiBuilder.