Support non-collection routes in ApiApplication

Currently, we assume all routes are either collection routes or the `/health/` route.
Can we get a docstring and some comments for this function?