flask/tests
sahilmalhotra1987 9536b1aeef feat(cli): add --json flag to flask routes command
Adds a machine-readable output mode to `flask routes`. When --json is
passed, the route table is emitted as a JSON array instead of the text
table. Each entry has `endpoint`, `methods` (sorted list), and `rule`;
subdomain apps also emit `subdomain`, host-matching apps emit `host`.
HEAD/OPTIONS are filtered unless --all-methods is also passed. Empty
apps produce `[]`. The --sort flag is honoured in JSON mode.

Backwards compatible: the flag is optional and all existing invocations
of `flask routes` are unaffected.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-19 12:14:25 +05:30
..
static add text parameter to config.from_file 2023-02-23 11:10:21 -08:00
templates add pre-commit config for flake8 2019-06-01 09:13:46 -04:00
test_apps use ruff linter and formatter 2023-11-15 12:14:37 -08:00
type_check enable secret key rotation 2024-11-08 08:09:01 -08:00
conftest.py merge app and request context 2025-09-19 16:43:53 -07:00
test_appctx.py all teardown callbacks are called despite errors 2026-02-19 19:41:50 -08:00
test_async.py remove previously deprecated code 2023-02-23 08:35:16 -08:00
test_basic.py all teardown callbacks are called despite errors 2026-02-19 19:41:50 -08:00
test_blueprints.py all teardown callbacks are called despite errors 2026-02-19 19:41:50 -08:00
test_cli.py feat(cli): add --json flag to flask routes command 2026-04-19 12:14:25 +05:30
test_config.py use tmp_path instead of tmpdir 2023-05-02 10:38:27 -07:00
test_converters.py converters have access to session 2021-05-14 08:11:09 -07:00
test_helpers.py all teardown callbacks are called despite errors 2026-02-19 19:41:50 -08:00
test_instance_config.py remove tests about deprecated pkgutil.get_loader 2025-03-29 15:42:58 -07:00
test_json.py update project files (#5457) 2024-04-07 10:24:40 -07:00
test_json_tag.py deprecate markupsafe exports 2023-02-23 08:55:01 -08:00
test_logging.py remove unused module docstrings 2020-04-04 12:28:08 -07:00
test_regression.py update tests for relative redirects 2022-03-25 11:48:26 -07:00
test_reqctx.py Merge branch 'stable' 2026-04-05 12:32:14 -07:00
test_request.py configure and check trusted_hosts 2024-11-12 21:01:55 -08:00
test_session_interface.py merge app and request context 2025-09-19 16:43:53 -07:00
test_signals.py use ruff linter and formatter 2023-11-15 12:14:37 -08:00
test_subclassing.py pass context through dispatch methods 2025-09-19 17:33:30 -07:00
test_templating.py use template_filter without parens 2025-08-19 12:33:21 -07:00
test_testing.py all teardown callbacks are called despite errors 2026-02-19 19:41:50 -08:00
test_user_error_handler.py refactor error checks in register_error_handler 2022-05-03 11:52:11 -06:00
test_views.py fix provide_automatic_options override 2026-02-12 13:03:03 -08:00