Skip to content

Commit 901f6bb

Browse files
♻️ change output syntax in CLI (#336)
1 parent c4d2803 commit 901f6bb

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

src/main/java/com/mindee/v2/cli/BaseInferenceCommand.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@ public abstract class BaseInferenceCommand implements Callable<Integer> {
3030

3131
/** Output format for the command. */
3232
public enum OutputType {
33-
Summary,
34-
Full,
35-
Raw
33+
summary,
34+
full,
35+
raw
3636
}
3737

3838
@Option(
@@ -41,7 +41,7 @@ public enum OutputType {
4141
+ "- summary: a basic summary (default)\n"
4242
+ "- full: detail extraction results, including options\n"
4343
+ "- raw: full JSON object",
44-
defaultValue = "Summary"
44+
defaultValue = "summary"
4545
)
4646
protected OutputType output;
4747

@@ -89,10 +89,10 @@ public Integer call() throws Exception {
8989

9090
private void printOutput(CommonResponse response) throws Exception {
9191
switch (output) {
92-
case Full:
92+
case full:
9393
System.out.println(getFullOutput(response));
9494
break;
95-
case Raw:
95+
case raw:
9696
var mapper = new ObjectMapper().enable(SerializationFeature.INDENT_OUTPUT);
9797
var jsonNode = mapper.readTree(response.getRawResponse());
9898
System.out.println(mapper.writeValueAsString(jsonNode));

0 commit comments

Comments
 (0)