-
-
Notifications
You must be signed in to change notification settings - Fork 481
feat: Adding new --format option in routes CLI command for JSON format (#4417) #4418
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be better to add a --format option, with json as a choice, as that is more extendable.
|
I agree. But first i'll fix the unpassed tests. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4418 +/- ##
==========================================
- Coverage 97.83% 97.83% -0.01%
==========================================
Files 296 296
Lines 15295 15317 +22
Branches 1713 1718 +5
==========================================
+ Hits 14964 14985 +21
Misses 189 189
- Partials 142 143 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
@MauricioReisdoefer if you want to get this merged, please address the changes I've requested regarding the flag. |
|
Do you want any more changes in this pr? Like, creating a new format already? Because i want to start contributing in other parts after this pr. |
|
Documentation preview will be available shortly at https://litestar-org.github.io/litestar-docs-preview/4418 |
Description
This PR introduces a
--formatoption for thelitestar routesCLI command, allowing routes to be output in a structured JSON format. This is useful for automation, scripts, or integration with external tools.Usage Example
Motivation and Context
Closing issue #4417. This change allows developers to easily consume route information programmatically, improving automation and tooling support.
Also i added new tests to cover this new feature.
Closes