test_class.file: misc/openapi-ballerina/modules/openapi-to-ballerina-generator/src/test/java/org/ballerinalang/openapi/cmd/OpenAPIGenClientCmdTest.java
test_class.identifier: OpenAPIGenClientCmdTest
test_class.superclass: extends OpenAPICommandTest
test_case.body: @Test(description = "Test openapi gen client command with help flag",  enabled = false)
      public void testOpenAPIGenClientCmdHelp() throws IOException {
          String[] args = {"-h"};
          OpenApiGenClientCmd openApiGenClientCmd = new OpenApiGenClientCmd(printStream, this.tmpDir.toString());
          new CommandLine(openApiGenClientCmd).parseArgs(args);
          openApiGenClientCmd.execute();
  
          String output = readOutput(true);
          Assert.assertTrue(output.contains("ballerina-openapi-gen-client - Generate a mock Ballerina client\n" +
                                            "       for a given OpenAPI contract"));
      }
test_case.class_method_signature: OpenAPIGenClientCmdTest.testOpenAPIGenClientCmdHelp()
test_case.full_signature: @Test(description = "Test openapi gen client command with help flag", enabled = false) public void testOpenAPIGenClientCmdHelp()
test_case.identifier: testOpenAPIGenClientCmdHelp
test_case.invocations: toString parseArgs execute readOutput assertTrue contains
test_case.modifiers: @Test(description = "Test openapi gen client command with help flag", enabled = false) public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testOpenAPIGenClientCmdHelp()
focal_class.declarator: CMD_NAME = "openapi-gen-client"
focal_class.modifier: private static final
focal_class.original_string: private static final String CMD_NAME = "openapi-gen-client";
focal_class.type: String
focal_class.var_name: CMD_NAME
focal_class.declarator: outStream = System.err
focal_class.modifier: private
focal_class.original_string: private PrintStream outStream = System.err;
focal_class.type: PrintStream
focal_class.var_name: outStream
focal_class.declarator: executionPath = System.getProperty("user.dir")
focal_class.modifier: private
focal_class.original_string: private String executionPath = System.getProperty("user.dir");
focal_class.type: String
focal_class.var_name: executionPath
focal_class.declarator: moduleArgs
focal_class.modifier: @CommandLine.Parameters(index = "0", split = ":")
      private
focal_class.original_string: @CommandLine.Parameters(index = "0", split = ":")
      private List<String> moduleArgs;
focal_class.type: List<String>
focal_class.var_name: moduleArgs
focal_class.declarator: argList
focal_class.modifier: @CommandLine.Parameters(index = "1..*")
      private
focal_class.original_string: @CommandLine.Parameters(index = "1..*")
      private List<String> argList;
focal_class.type: List<String>
focal_class.var_name: argList
focal_class.declarator: output = ""
focal_class.modifier: @CommandLine.Option(names = {"-o", "--output"}, description = "where to write the generated " +
              "files (current dir by default)")
      private
focal_class.original_string: @CommandLine.Option(names = {"-o", "--output"}, description = "where to write the generated " +
              "files (current dir by default)")
      private String output = "";
focal_class.type: String
focal_class.var_name: output
focal_class.declarator: helpFlag
focal_class.modifier: @CommandLine.Option(names = {"-h", "--help"}, hidden = true)
      private
focal_class.original_string: @CommandLine.Option(names = {"-h", "--help"}, hidden = true)
      private boolean helpFlag;
focal_class.type: boolean
focal_class.var_name: helpFlag
focal_class.declarator: tags
focal_class.modifier: @CommandLine.Option(names = {"--tags"}, description = "Tag that need to write service")
      private
focal_class.original_string: @CommandLine.Option(names = {"--tags"}, description = "Tag that need to write service")
      private List<String> tags;
focal_class.type: List<String>
focal_class.var_name: tags
focal_class.declarator: operations
focal_class.modifier: @CommandLine.Option(names = {"--operations"}, description = "Operations that need to write service")
      private
focal_class.original_string: @CommandLine.Option(names = {"--operations"}, description = "Operations that need to write service")
      private List<String> operations;
focal_class.type: List<String>
focal_class.var_name: operations
focal_class.declarator: generatedServiceName
focal_class.modifier: @CommandLine.Option(names = {"--service-name"}, description = "Service name for generated files")
      private
focal_class.original_string: @CommandLine.Option(names = {"--service-name"}, description = "Service name for generated files")
      private String generatedServiceName;
focal_class.type: String
focal_class.var_name: generatedServiceName
focal_class.file: misc/openapi-ballerina/modules/openapi-to-ballerina-generator/src/main/java/org/ballerinalang/openapi/cmd/OpenApiGenClientCmd.java
focal_class.identifier: OpenApiGenClientCmd
focal_class.interfaces: implements BLauncherCmd
focal_class.class_method_signature: OpenApiGenClientCmd.OpenApiGenClientCmd()
focal_class.full_signature: public  OpenApiGenClientCmd()
focal_class.identifier: OpenApiGenClientCmd
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.signature:  OpenApiGenClientCmd()
focal_class.class_method_signature: OpenApiGenClientCmd.OpenApiGenClientCmd(PrintStream outStream, String executionPath)
focal_class.full_signature: public  OpenApiGenClientCmd(PrintStream outStream, String executionPath)
focal_class.identifier: OpenApiGenClientCmd
focal_class.modifiers: public
focal_class.parameters: (PrintStream outStream, String executionPath)
focal_class.signature:  OpenApiGenClientCmd(PrintStream outStream, String executionPath)
focal_class.class_method_signature: OpenApiGenClientCmd.execute()
focal_class.full_signature: @Override public void execute()
focal_class.identifier: execute
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void execute()
focal_class.class_method_signature: OpenApiGenClientCmd.getName()
focal_class.full_signature: @Override public String getName()
focal_class.identifier: getName
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getName()
focal_class.class_method_signature: OpenApiGenClientCmd.printLongDesc(StringBuilder out)
focal_class.full_signature: @Override public void printLongDesc(StringBuilder out)
focal_class.identifier: printLongDesc
focal_class.modifiers: @Override public
focal_class.parameters: (StringBuilder out)
focal_class.return: void
focal_class.signature: void printLongDesc(StringBuilder out)
focal_class.class_method_signature: OpenApiGenClientCmd.printUsage(StringBuilder out)
focal_class.full_signature: @Override public void printUsage(StringBuilder out)
focal_class.identifier: printUsage
focal_class.modifiers: @Override public
focal_class.parameters: (StringBuilder out)
focal_class.return: void
focal_class.signature: void printUsage(StringBuilder out)
focal_class.class_method_signature: OpenApiGenClientCmd.setParentCmdParser(CommandLine parentCmdParser)
focal_class.full_signature: @Override public void setParentCmdParser(CommandLine parentCmdParser)
focal_class.identifier: setParentCmdParser
focal_class.modifiers: @Override public
focal_class.parameters: (CommandLine parentCmdParser)
focal_class.return: void
focal_class.signature: void setParentCmdParser(CommandLine parentCmdParser)
focal_method.body: @Override
      public void execute() {
          List<String> tag = new ArrayList<>();
          List<String> operation = new ArrayList<>();
          tag.add("pet");
          operation.add("operation");
          Filter filter = new Filter(tag, operation);
  
          //User notification of using an experimental tool
          outStream.println(OpenApiMesseges.EXPERIMENTAL_FEATURE);
  
          CodeGenerator generator = new CodeGenerator();
  
          //Help flag check
          if (helpFlag) {
              String commandUsageInfo = BLauncherCmd.getCommandUsageInfo(getName());
              outStream.println(commandUsageInfo);
              return;
          }
  
          if (moduleArgs == null) {
              throw LauncherUtils.createLauncherException(OpenApiMesseges.CLIENT_MANDATORY);
          }
  
          //Check if relevant arguments are present
          if (argList == null) {
              throw LauncherUtils.createLauncherException(OpenApiMesseges.OPENAPI_FILE_MANDATORY);
          }
  
          if (moduleArgs.size() >= 2) {
              generator.setSrcPackage(moduleArgs.get(0));
          }
  
          try {
              generator.generateClient(executionPath, argList.get(0), moduleArgs.get(1), output, filter);
          } catch (IOException | BallerinaOpenApiException e) {
              if (e.getLocalizedMessage() != null) {
                  throw LauncherUtils.createLauncherException(e.getLocalizedMessage());
              } else {
                  throw LauncherUtils.createLauncherException(OpenApiMesseges.OPENAPI_CLIENT_EXCEPTION);
              }
  
          }
      }
focal_method.class_method_signature: OpenApiGenClientCmd.execute()
focal_method.full_signature: @Override public void execute()
focal_method.identifier: execute
focal_method.invocations: add add println getCommandUsageInfo getName println createLauncherException createLauncherException size setSrcPackage get generateClient get get getLocalizedMessage createLauncherException getLocalizedMessage createLauncherException
focal_method.modifiers: @Override public
focal_method.parameters: ()
focal_method.return: void
focal_method.signature: void execute()