Refactor all route methods and fix documentation errors to fix API documentation generation.