one way to avoid generating apiroutes each time