Restore subpath in API route generation