From 6b055adfa4a75780f25fad41149eca0a26b5a765 Mon Sep 17 00:00:00 2001 From: Madalin Ilie Date: Thu, 5 May 2022 21:03:44 +0300 Subject: [PATCH] Allow run command to use ignore arguments in order to filter final results --- src/main/java/com/endava/cats/command/CatsCommand.java | 2 +- src/main/java/com/endava/cats/command/RunCommand.java | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/endava/cats/command/CatsCommand.java b/src/main/java/com/endava/cats/command/CatsCommand.java index 54ab8d566..ceaf305e1 100644 --- a/src/main/java/com/endava/cats/command/CatsCommand.java +++ b/src/main/java/com/endava/cats/command/CatsCommand.java @@ -46,7 +46,7 @@ versionProvider = VersionProvider.class, commandListHeading = "%n@|bold,underline Commands:|@%n", defaultValueProvider = CommandLine.PropertiesDefaultProvider.class, -// resourceBundle = "version", + resourceBundle = "version", subcommands = { AutoComplete.GenerateCompletion.class, CommandLine.HelpCommand.class, diff --git a/src/main/java/com/endava/cats/command/RunCommand.java b/src/main/java/com/endava/cats/command/RunCommand.java index 054666d99..9bfc66aec 100644 --- a/src/main/java/com/endava/cats/command/RunCommand.java +++ b/src/main/java/com/endava/cats/command/RunCommand.java @@ -2,6 +2,7 @@ import com.endava.cats.args.ApiArguments; import com.endava.cats.args.AuthArguments; +import com.endava.cats.args.IgnoreArguments; import com.endava.cats.args.ReportingArguments; import com.endava.cats.dsl.CatsDSLWords; import com.endava.cats.util.VersionProvider; @@ -69,6 +70,10 @@ public class RunCommand implements Runnable { description = "A custom mime type if the OpenAPI spec uses content type negotiation versioning. Default: @|bold,underline ${DEFAULT-VALUE}|@") private String contentType = "application/json"; + @Inject + @CommandLine.ArgGroup(heading = "%n@|bold,underline Ignore Options:|@%n", exclusive = false) + IgnoreArguments ignoreArguments; + @CommandLine.ParentCommand private CatsCommand catsCommand;