1111 * Handles common options (path, model-id, api-key, alias, output) and output formatting.
1212 */
1313public abstract class BaseCommand implements Callable <Integer > {
14- @ CommandLine .Option (names = { "-k" , "--api-key" }, description = "Mindee V2 API key." )
14+ @ CommandLine .Option (
15+ names = { "-k" , "--api-key" },
16+ description = "Mindee V2 API key." ,
17+ defaultValue = ""
18+ )
1519 protected String apiKey ;
1620
1721 /** Output format for the command. */
@@ -24,8 +28,8 @@ public enum OutputType {
2428 @ CommandLine .Option (
2529 names = { "-o" , "--output" },
2630 description = "Specify how to output the data.\n "
27- + "- summary: a basic summary (default)\n "
28- + "- full: detail extraction results, including options \n "
31+ + "- summary: basic formatted response (default)\n "
32+ + "- full: complete formatted response \n "
2933 + "- raw: full JSON object" ,
3034 defaultValue = "summary"
3135 )
@@ -38,7 +42,7 @@ public enum OutputType {
3842 * @param response the response
3943 * @return the summary string
4044 */
41- protected abstract String getSummary (CommonResponse response );
45+ protected abstract String getSummaryOutput (CommonResponse response );
4246
4347 /**
4448 * Returns the full string for the given response.
@@ -62,7 +66,7 @@ protected void printOutput(CommonResponse response) throws Exception {
6266 System .out .println (mapper .writeValueAsString (jsonNode ));
6367 break ;
6468 default :
65- System .out .println (getSummary (response ));
69+ System .out .println (getSummaryOutput (response ));
6670 break ;
6771 }
6872 }
0 commit comments