From 77c1e74eba0524fae75020501e482ee759ae4fac Mon Sep 17 00:00:00 2001 From: aneeshafedo Date: Tue, 11 Jul 2023 18:23:14 +0530 Subject: [PATCH] Rename CLI class --- .../{OpenApiCmd.java => TestOpenApiCmd.java} | 14 ++++--- .../services/io.ballerina.cli.BLauncherCmd | 2 +- .../BallerinaCodeGeneratorLicenseTests.java | 10 ++--- .../openapi/cmd/BallerinaToOASTests.java | 16 ++++---- .../ballerina/openapi/cmd/OpenAPICmdTest.java | 38 +++++++++---------- .../openapi/cmd/OpenAPICommandTest.java | 2 +- tool-openapi/Ballerina.toml | 4 +- 7 files changed, 44 insertions(+), 42 deletions(-) rename openapi-cli/src/main/java/io/ballerina/openapi/cmd/{OpenApiCmd.java => TestOpenApiCmd.java} (97%) diff --git a/openapi-cli/src/main/java/io/ballerina/openapi/cmd/OpenApiCmd.java b/openapi-cli/src/main/java/io/ballerina/openapi/cmd/TestOpenApiCmd.java similarity index 97% rename from openapi-cli/src/main/java/io/ballerina/openapi/cmd/OpenApiCmd.java rename to openapi-cli/src/main/java/io/ballerina/openapi/cmd/TestOpenApiCmd.java index bf9a608dd..3c9de21f4 100644 --- a/openapi-cli/src/main/java/io/ballerina/openapi/cmd/OpenApiCmd.java +++ b/openapi-cli/src/main/java/io/ballerina/openapi/cmd/TestOpenApiCmd.java @@ -60,7 +60,7 @@ name = "test_openapi", description = "Generate the Ballerina sources for a given OpenAPI definition and vice versa." ) -public class OpenApiCmd implements BLauncherCmd { +public class TestOpenApiCmd implements BLauncherCmd { private static final String CMD_NAME = "test_openapi"; private PrintStream outStream; private Path executionPath = Paths.get(System.getProperty("user.dir")); @@ -121,17 +121,17 @@ public class OpenApiCmd implements BLauncherCmd { @CommandLine.Parameters private List argList; - public OpenApiCmd() { + public TestOpenApiCmd() { this.outStream = System.err; this.executionPath = Paths.get(System.getProperty("user.dir")); this.exitWhenFinish = true; } - public OpenApiCmd(PrintStream outStream, Path executionDir) { - new OpenApiCmd(outStream, executionDir, true); + public TestOpenApiCmd(PrintStream outStream, Path executionDir) { + new TestOpenApiCmd(outStream, executionDir, true); } - public OpenApiCmd(PrintStream outStream, Path executionDir, boolean exitWhenFinish) { + public TestOpenApiCmd(PrintStream outStream, Path executionDir, boolean exitWhenFinish) { this.outStream = outStream; this.executionPath = executionDir; this.exitWhenFinish = exitWhenFinish; @@ -425,7 +425,9 @@ public String getName() { @Override public void printLongDesc(StringBuilder out) { - InputStream inputStream = ClassLoader.getSystemResourceAsStream("ballerina-openapi.help"); + Class clazz = TestOpenApiCmd.class; + ClassLoader classLoader = clazz.getClassLoader(); + InputStream inputStream = classLoader.getSystemResourceAsStream("ballerina-openapi.help"); try (InputStreamReader inputStreamREader = new InputStreamReader(inputStream, StandardCharsets.UTF_8); BufferedReader br = new BufferedReader(inputStreamREader)) { String content = br.readLine(); diff --git a/openapi-cli/src/main/resources/META-INF/services/io.ballerina.cli.BLauncherCmd b/openapi-cli/src/main/resources/META-INF/services/io.ballerina.cli.BLauncherCmd index 0a90b2b88..07cc9f89d 100644 --- a/openapi-cli/src/main/resources/META-INF/services/io.ballerina.cli.BLauncherCmd +++ b/openapi-cli/src/main/resources/META-INF/services/io.ballerina.cli.BLauncherCmd @@ -1 +1 @@ -io.ballerina.openapi.cmd.OpenApiCmd \ No newline at end of file +io.ballerina.openapi.cmd.TestOpenApiCmd \ No newline at end of file diff --git a/openapi-cli/src/test/java/io/ballerina/openapi/cmd/BallerinaCodeGeneratorLicenseTests.java b/openapi-cli/src/test/java/io/ballerina/openapi/cmd/BallerinaCodeGeneratorLicenseTests.java index 79db8e848..1d40c7da9 100644 --- a/openapi-cli/src/test/java/io/ballerina/openapi/cmd/BallerinaCodeGeneratorLicenseTests.java +++ b/openapi-cli/src/test/java/io/ballerina/openapi/cmd/BallerinaCodeGeneratorLicenseTests.java @@ -48,7 +48,7 @@ public void setupBallerinaProject() throws IOException { public void testClientGeneration() throws IOException { Path petstoreYaml = resourceDir.resolve(Paths.get("petstore.yaml")); String[] args = {"--input", petstoreYaml.toString(), "-o", this.tmpDir.toString(), "--mode", "client"}; - OpenApiCmd cmd = new OpenApiCmd(printStream, tmpDir, false); + TestOpenApiCmd cmd = new TestOpenApiCmd(printStream, tmpDir, false); new CommandLine(cmd).parseArgs(args); cmd.execute(); @@ -72,7 +72,7 @@ public void testClientGeneration() throws IOException { public void testServiceTypeGeneration() throws IOException { Path petstoreYaml = resourceDir.resolve(Paths.get("petstore.yaml")); String[] args = {"--input", petstoreYaml.toString(), "-o", this.tmpDir.toString(), "--with-service-type"}; - OpenApiCmd cmd = new OpenApiCmd(printStream, tmpDir, false); + TestOpenApiCmd cmd = new TestOpenApiCmd(printStream, tmpDir, false); new CommandLine(cmd).parseArgs(args); cmd.execute(); @@ -99,7 +99,7 @@ public void testServiceGeneration() throws IOException { Path petstoreYaml = resourceDir.resolve(Paths.get("petstore.yaml")); String[] args = {"--input", petstoreYaml.toString(), "-o", this.tmpDir.toString(), "--with-service-type", "--mode", "service"}; - OpenApiCmd cmd = new OpenApiCmd(printStream, tmpDir, false); + TestOpenApiCmd cmd = new TestOpenApiCmd(printStream, tmpDir, false); new CommandLine(cmd).parseArgs(args); cmd.execute(); @@ -123,7 +123,7 @@ public void testServiceGeneration() throws IOException { public void testBothClientServiceGeneration() throws IOException { Path petstoreYaml = resourceDir.resolve(Paths.get("petstore.yaml")); String[] args = {"--input", petstoreYaml.toString(), "-o", this.tmpDir.toString()}; - OpenApiCmd cmd = new OpenApiCmd(printStream, tmpDir, false); + TestOpenApiCmd cmd = new TestOpenApiCmd(printStream, tmpDir, false); new CommandLine(cmd).parseArgs(args); cmd.execute(); @@ -151,7 +151,7 @@ public void testUserGivenLicenseHeader() throws IOException { Path licenseHeader = resourceDir.resolve(Paths.get("expected_gen/licenses/license.txt")); String[] args = {"--input", petstoreYaml.toString(), "-o", this.tmpDir.toString(), "--license", licenseHeader.toString(), "--with-service-type"}; - OpenApiCmd cmd = new OpenApiCmd(printStream, tmpDir, false); + TestOpenApiCmd cmd = new TestOpenApiCmd(printStream, tmpDir, false); new CommandLine(cmd).parseArgs(args); cmd.execute(); if (Files.exists(this.tmpDir.resolve("client.bal")) && diff --git a/openapi-cli/src/test/java/io/ballerina/openapi/cmd/BallerinaToOASTests.java b/openapi-cli/src/test/java/io/ballerina/openapi/cmd/BallerinaToOASTests.java index 561583348..9148db62d 100644 --- a/openapi-cli/src/test/java/io/ballerina/openapi/cmd/BallerinaToOASTests.java +++ b/openapi-cli/src/test/java/io/ballerina/openapi/cmd/BallerinaToOASTests.java @@ -49,7 +49,7 @@ public void setupBallerinaProject() throws IOException { public void testBallerinaToOpenAPIGeneration() { Path filePath = resourceDir.resolve(Paths.get("cmd/ballerina-to-openapi/ballerina-file.bal")); String[] args = {"--input", filePath.toString(), "-o", this.tmpDir.toString()}; - OpenApiCmd cmd = new OpenApiCmd(printStream, tmpDir, false); + TestOpenApiCmd cmd = new TestOpenApiCmd(printStream, tmpDir, false); new CommandLine(cmd).parseArgs(args); String output = ""; @@ -65,7 +65,7 @@ public void testBallerinaToOpenAPIGeneration() { public void testDefaultMethod() { Path filePath = resourceDir.resolve(Paths.get("cmd/ballerina-to-openapi/default_method.bal")); String[] args = {"--input", filePath.toString(), "-o", this.tmpDir.toString()}; - OpenApiCmd cmd = new OpenApiCmd(printStream, tmpDir, false); + TestOpenApiCmd cmd = new TestOpenApiCmd(printStream, tmpDir, false); new CommandLine(cmd).parseArgs(args); String output = ""; @@ -85,7 +85,7 @@ public void testDefaultMethod() { public void testDefaultMethod02() { Path filePath = resourceDir.resolve(Paths.get("cmd/ballerina-to-openapi/default_method_02.bal")); String[] args = {"--input", filePath.toString(), "-o", this.tmpDir.toString()}; - OpenApiCmd cmd = new OpenApiCmd(printStream, tmpDir, false); + TestOpenApiCmd cmd = new TestOpenApiCmd(printStream, tmpDir, false); new CommandLine(cmd).parseArgs(args); String output = ""; @@ -104,7 +104,7 @@ public void testDefaultMethod02() { public void testHttpResponse() { Path filePath = resourceDir.resolve(Paths.get("cmd/ballerina-to-openapi/http_response.bal")); String[] args = {"--input", filePath.toString(), "-o", this.tmpDir.toString()}; - OpenApiCmd cmd = new OpenApiCmd(printStream, tmpDir, false); + TestOpenApiCmd cmd = new TestOpenApiCmd(printStream, tmpDir, false); new CommandLine(cmd).parseArgs(args); String output = ""; @@ -128,7 +128,7 @@ public void testHttpResponse() { public void testHttpRequest() { Path filePath = resourceDir.resolve(Paths.get("cmd/ballerina-to-openapi/http_request.bal")); String[] args = {"--input", filePath.toString(), "-o", this.tmpDir.toString()}; - OpenApiCmd cmd = new OpenApiCmd(printStream, tmpDir, false); + TestOpenApiCmd cmd = new TestOpenApiCmd(printStream, tmpDir, false); new CommandLine(cmd).parseArgs(args); String output = ""; @@ -146,7 +146,7 @@ public void testHttpRequest() { public void openapiAnnotationWithContract() { Path filePath = resourceDir.resolve(Paths.get("cmd/ballerina-to-openapi/project_1/service.bal")); String[] args = {"--input", filePath.toString(), "-o", this.tmpDir.toString()}; - OpenApiCmd cmd = new OpenApiCmd(printStream, tmpDir, false); + TestOpenApiCmd cmd = new TestOpenApiCmd(printStream, tmpDir, false); new CommandLine(cmd).parseArgs(args); String output = ""; @@ -170,7 +170,7 @@ public void openapiAnnotationWithContract() { public void openapiAnnotationWithOutContract() { Path filePath = resourceDir.resolve(Paths.get("cmd/ballerina-to-openapi/project_2/service.bal")); String[] args = {"--input", filePath.toString(), "-o", this.tmpDir.toString()}; - OpenApiCmd cmd = new OpenApiCmd(printStream, tmpDir, false); + TestOpenApiCmd cmd = new TestOpenApiCmd(printStream, tmpDir, false); new CommandLine(cmd).parseArgs(args); String output = ""; @@ -193,7 +193,7 @@ public void openapiAnnotationWithOutContract() { public void openapiAnnotationWithoutFields() { Path filePath = resourceDir.resolve(Paths.get("cmd/ballerina-to-openapi/project_3/service.bal")); String[] args = {"--input", filePath.toString(), "-o", this.tmpDir.toString()}; - OpenApiCmd cmd = new OpenApiCmd(printStream, tmpDir, false); + TestOpenApiCmd cmd = new TestOpenApiCmd(printStream, tmpDir, false); new CommandLine(cmd).parseArgs(args); String output = ""; diff --git a/openapi-cli/src/test/java/io/ballerina/openapi/cmd/OpenAPICmdTest.java b/openapi-cli/src/test/java/io/ballerina/openapi/cmd/OpenAPICmdTest.java index 728c4f8f4..ef6aaaf4a 100644 --- a/openapi-cli/src/test/java/io/ballerina/openapi/cmd/OpenAPICmdTest.java +++ b/openapi-cli/src/test/java/io/ballerina/openapi/cmd/OpenAPICmdTest.java @@ -52,7 +52,7 @@ public void setupBallerinaProject() throws IOException { @Test(description = "Test openapi command with help flag") public void testOpenAPICmdHelp() throws IOException { String[] args = {"-h"}; - OpenApiCmd openApiCommand = new OpenApiCmd(printStream, tmpDir, false); + TestOpenApiCmd openApiCommand = new TestOpenApiCmd(printStream, tmpDir, false); new CommandLine(openApiCommand).parseArgs(args); openApiCommand.execute(); String output = readOutput(true); @@ -63,7 +63,7 @@ public void testOpenAPICmdHelp() throws IOException { @Test(description = "Test openapi command with help flag") public void testOpenAPICmdHelpWithBalTools() throws IOException { String[] args = {"help", "openapi"}; - OpenApiCmd openApiCommand = new OpenApiCmd(printStream, tmpDir, false); + TestOpenApiCmd openApiCommand = new TestOpenApiCmd(printStream, tmpDir, false); new CommandLine(openApiCommand).parseArgs(args); openApiCommand.execute(); String output = readOutput(true); @@ -73,7 +73,7 @@ public void testOpenAPICmdHelpWithBalTools() throws IOException { @Test(description = "Test openapi command without help flag") public void testOpenAPICmdHelpWithoutFlag() throws IOException { - OpenApiCmd openApiCommand = new OpenApiCmd(printStream, tmpDir, false); + TestOpenApiCmd openApiCommand = new TestOpenApiCmd(printStream, tmpDir, false); new CommandLine(openApiCommand); openApiCommand.execute(); String output = readOutput(true); @@ -84,7 +84,7 @@ public void testOpenAPICmdHelpWithoutFlag() throws IOException { @Test(description = "Test openapi gen-service without openapi contract file") public void testWithoutOpenApiContract() throws IOException { String[] args = {"--input"}; - OpenApiCmd cmd = new OpenApiCmd(printStream, tmpDir, false); + TestOpenApiCmd cmd = new TestOpenApiCmd(printStream, tmpDir, false); new CommandLine(cmd).parseArgs(args); cmd.execute(); String output = readOutput(true); @@ -95,7 +95,7 @@ public void testWithoutOpenApiContract() throws IOException { public void testSuccessfulServiceGeneration() throws IOException { Path petstoreYaml = resourceDir.resolve(Paths.get("petstore.yaml")); String[] args = {"--input", petstoreYaml.toString(), "-o", this.tmpDir.toString()}; - OpenApiCmd cmd = new OpenApiCmd(printStream, tmpDir, false); + TestOpenApiCmd cmd = new TestOpenApiCmd(printStream, tmpDir, false); new CommandLine(cmd).parseArgs(args); cmd.execute(); Path expectedSchemaFile = resourceDir.resolve(Paths.get("expected_gen", "petstore_schema.bal")); @@ -135,7 +135,7 @@ public void testSuccessfulServiceGeneration() throws IOException { public void testSuccessfulTypeBalGeneration() throws IOException { Path petstoreYaml = resourceDir.resolve(Paths.get("petstore_type.yaml")); String[] args = {"--input", petstoreYaml.toString(), "-o", this.tmpDir.toString()}; - OpenApiCmd cmd = new OpenApiCmd(printStream, tmpDir, false); + TestOpenApiCmd cmd = new TestOpenApiCmd(printStream, tmpDir, false); new CommandLine(cmd).parseArgs(args); cmd.execute(); Path expectedSchemaFile = resourceDir.resolve(Paths.get("expected_gen", "petstore_schema_type.bal")); @@ -174,7 +174,7 @@ public void testForRemovedUnusedConstraintImport() throws IOException { Path petstoreYaml = resourceDir.resolve(Paths.get("non_constraint_import.yaml")); String[] args = {"--input", petstoreYaml.toString(), "--mode", "client", "--tags", "pets", "-o", this.tmpDir.toString()}; - OpenApiCmd cmd = new OpenApiCmd(printStream, tmpDir, false); + TestOpenApiCmd cmd = new TestOpenApiCmd(printStream, tmpDir, false); new CommandLine(cmd).parseArgs(args); cmd.execute(); Path expectedSchemaFile = resourceDir.resolve(Paths.get("expected_gen", @@ -209,7 +209,7 @@ public void testWithConstraintImport() throws IOException { Path petstoreYaml = resourceDir.resolve(Paths.get("constraint_import.yaml")); String[] args = {"--input", petstoreYaml.toString(), "--mode", "client", "--tags", "pets", "-o", this.tmpDir.toString()}; - OpenApiCmd cmd = new OpenApiCmd(printStream, tmpDir, false); + TestOpenApiCmd cmd = new TestOpenApiCmd(printStream, tmpDir, false); new CommandLine(cmd).parseArgs(args); cmd.execute(); Path expectedSchemaFile = resourceDir.resolve(Paths.get("expected_gen", @@ -245,7 +245,7 @@ public void testGenerationWithLicenseHeaders() throws IOException { Path licenseHeader = resourceDir.resolve(Paths.get("license.txt")); String[] args = {"--input", petstoreYaml.toString(), "-o", this.tmpDir.toString(), "--license", licenseHeader.toString()}; - OpenApiCmd cmd = new OpenApiCmd(printStream, tmpDir, false); + TestOpenApiCmd cmd = new TestOpenApiCmd(printStream, tmpDir, false); new CommandLine(cmd).parseArgs(args); cmd.execute(); Path expectedSchemaFile = resourceDir.resolve(Paths.get("expected_gen", @@ -287,7 +287,7 @@ public void testGenerationWithLicenseHeadersWithOneNewLine() throws IOException Path licenseHeader = resourceDir.resolve(Paths.get("license_with_new_line.txt")); String[] args = {"--input", petstoreYaml.toString(), "-o", this.tmpDir.toString(), "--license", licenseHeader.toString()}; - OpenApiCmd cmd = new OpenApiCmd(printStream, tmpDir, false); + TestOpenApiCmd cmd = new TestOpenApiCmd(printStream, tmpDir, false); new CommandLine(cmd).parseArgs(args); cmd.execute(); Path expectedSchemaFile = resourceDir.resolve(Paths.get("expected_gen", @@ -328,7 +328,7 @@ public void testConnectorGenerationFilteringByTags() throws IOException { Path petstoreYaml = resourceDir.resolve(Paths.get("petstore_tags.yaml")); String[] args = {"--input", petstoreYaml.toString(), "-o", this.tmpDir.toString(), "--tags", "pets,dogs", "--mode", "client", "--client-methods", "remote"}; - OpenApiCmd cmd = new OpenApiCmd(printStream, tmpDir, false); + TestOpenApiCmd cmd = new TestOpenApiCmd(printStream, tmpDir, false); new CommandLine(cmd).parseArgs(args); cmd.execute(); Path expectedClientFile = resourceDir.resolve(Paths.get("expected_gen", @@ -370,7 +370,7 @@ public void testGenerationOfTestSuiteWithLicenseHeaders() throws IOException { Path licenseHeader = resourceDir.resolve(Paths.get("license.txt")); String[] args = {"--input", petstoreYaml.toString(), "-o", this.tmpDir.toString(), "--license", licenseHeader.toString(), "--with-tests"}; - OpenApiCmd cmd = new OpenApiCmd(printStream, tmpDir, false); + TestOpenApiCmd cmd = new TestOpenApiCmd(printStream, tmpDir, false); new CommandLine(cmd).parseArgs(args); cmd.execute(); Path expectedConfigFilePath = resourceDir.resolve(Paths.get("expected_gen", @@ -414,7 +414,7 @@ public void testInvalidPrefixFile() throws IOException, BallerinaOpenApiExceptio Path licenseHeader = resourceDir.resolve(Paths.get("licence.txt")); String[] args = {"--input", petstoreYaml.toString(), "-o", this.tmpDir.toString(), "--license", licenseHeader.toString()}; - OpenApiCmd cmd = new OpenApiCmd(printStream, tmpDir, false); + TestOpenApiCmd cmd = new TestOpenApiCmd(printStream, tmpDir, false); new CommandLine(cmd).parseArgs(args); cmd.execute(); String output = readOutput(true); @@ -427,7 +427,7 @@ public void testClientGenerationWithoutIncludeTestFilesOption() throws IOExcepti Path licenseHeader = resourceDir.resolve(Paths.get("license.txt")); String[] args = {"--input", petstoreYaml.toString(), "-o", this.tmpDir.toString(), "--license", licenseHeader.toString()}; - OpenApiCmd cmd = new OpenApiCmd(printStream, tmpDir, false); + TestOpenApiCmd cmd = new TestOpenApiCmd(printStream, tmpDir, false); new CommandLine(cmd).parseArgs(args); cmd.execute(); Path expectedConfigFilePath = resourceDir.resolve(Paths.get("expected_gen", @@ -455,7 +455,7 @@ public void testClientGenerationWithoutIncludeTestFilesOption() throws IOExcepti public void testSuccessfulServiceGenerationForYML() throws IOException { Path petstoreYaml = resourceDir.resolve(Paths.get("petstore.yml")); String[] args = {"--input", petstoreYaml.toString(), "-o", this.tmpDir.toString()}; - OpenApiCmd cmd = new OpenApiCmd(printStream, tmpDir, false); + TestOpenApiCmd cmd = new TestOpenApiCmd(printStream, tmpDir, false); new CommandLine(cmd).parseArgs(args); try { cmd.execute(); @@ -498,7 +498,7 @@ public void testServiceTypeGeneration() throws IOException { Path projectDir = resourceDir.resolve("expected_gen").resolve("ballerina_project"); Path petstoreYaml = resourceDir.resolve(Paths.get("petstore.yaml")); String[] args = {"--input", petstoreYaml.toString(), "-o", projectDir.toString(), "--with-service-type"}; - OpenApiCmd cmd = new OpenApiCmd(printStream, tmpDir, false); + TestOpenApiCmd cmd = new TestOpenApiCmd(printStream, tmpDir, false); new CommandLine(cmd).parseArgs(args); cmd.execute(); Path expectedServiceTypeFile = resourceDir.resolve(Paths.get("expected_gen", "pestore_service_type.bal")); @@ -533,7 +533,7 @@ public void testServiceGenerationWithoutDataBinding() throws IOException { Path projectDir = resourceDir.resolve("expected_gen").resolve("ballerina_project"); Path petstoreYaml = resourceDir.resolve(Paths.get("petstore.yaml")); String[] args = {"--input", petstoreYaml.toString(), "-o", projectDir.toString(), "--without-data-binding"}; - OpenApiCmd cmd = new OpenApiCmd(printStream, tmpDir, false); + TestOpenApiCmd cmd = new TestOpenApiCmd(printStream, tmpDir, false); new CommandLine(cmd).parseArgs(args); cmd.execute(); Path expectedService = resourceDir.resolve(Paths.get("expected_gen", "generic_service_petstore.bal")); @@ -577,7 +577,7 @@ public void testServiceGenerationWithoutDataBinding() throws IOException { public void testForYamlContractWithoutOperationID() throws IOException { Path yamlContract = resourceDir.resolve(Paths.get("without_operationID.yaml")); String[] args = {"--input", yamlContract.toString(), "-o", this.tmpDir.toString(), "--mode", "service"}; - OpenApiCmd cmd = new OpenApiCmd(printStream, tmpDir, false); + TestOpenApiCmd cmd = new TestOpenApiCmd(printStream, tmpDir, false); new CommandLine(cmd).parseArgs(args); cmd.execute(); if (Files.exists(this.tmpDir.resolve("without_operationid_service.bal"))) { @@ -634,7 +634,7 @@ private void deleteGeneratedFiles(boolean isConfigGenerated, Path folderPath, bo @Test(description = "getRelative path") public void getRelativePath() { - OpenApiCmd cmd = new OpenApiCmd(); + TestOpenApiCmd cmd = new TestOpenApiCmd(); File resource01 = new File("dir1/test.txt"); String target01 = "dir1/dir2"; File resource02 = new File("dir1/dir2/dir3/test.txt"); diff --git a/openapi-cli/src/test/java/io/ballerina/openapi/cmd/OpenAPICommandTest.java b/openapi-cli/src/test/java/io/ballerina/openapi/cmd/OpenAPICommandTest.java index 35410dfbb..f4ce4f086 100644 --- a/openapi-cli/src/test/java/io/ballerina/openapi/cmd/OpenAPICommandTest.java +++ b/openapi-cli/src/test/java/io/ballerina/openapi/cmd/OpenAPICommandTest.java @@ -77,7 +77,7 @@ public Path getExecuteCommand(String yamlFile, String serviceName) { Path yamlPath = resourceDir.resolve(Paths.get(yamlFile)); String[] args = {"--input", yamlPath.toString(), "--service-name", serviceName, "-o", this.tmpDir.toString(), "--mode", "service"}; - OpenApiCmd cmd = new OpenApiCmd(printStream, this.tmpDir); + TestOpenApiCmd cmd = new TestOpenApiCmd(printStream, this.tmpDir); new CommandLine(cmd).parseArgs(args); String output = ""; try { diff --git a/tool-openapi/Ballerina.toml b/tool-openapi/Ballerina.toml index 61e448be6..92a69231c 100644 --- a/tool-openapi/Ballerina.toml +++ b/tool-openapi/Ballerina.toml @@ -1,5 +1,5 @@ [package] org = "aneeshafernando" name = "test_tool_1" -version = "0.1.0" -distribution = "2201.6.0" +version = "0.3.0" +distribution = "2201.7.0"