Skip to content
This repository was archived by the owner on Nov 28, 2022. It is now read-only.

Commit a35155c

Browse files
keithchongsghung
authored andcommitted
[82] Update to 4.2.0 to pick up node-express-server generator (#83)
Signed-off-by: Keith Chong <kchong@ca.ibm.com>
1 parent fb67b52 commit a35155c

7 files changed

Lines changed: 10 additions & 12 deletions

File tree

dev/buildAll.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ def artifactsFolder = file(projDir + '/' + project.properties['ant.artifacts.fol
7474
def corelibFolder = file(projDir + project.properties['codewind.core.prereqlib.folder'])
7575
def excludeJson = "json-20090211.jar"
7676
def jsonFile = file(projDir + project.properties['codewind.core.prereqlib.folder'] + '/org.json_1.0.0.v201011060100.jar')
77-
def openApiCliFile = file(projDir + project.properties['codewind.core.prereqlib.folder'] + '/openapi-generator-cli-4.0.1.jar')
77+
def openApiCliFile = file(projDir + project.properties['codewind.core.prereqlib.folder'] + '/openapi-generator-cli-4.2.2.jar')
7878

7979
def filePrefix = "codewind-openapi-eclipse"
8080

@@ -109,7 +109,7 @@ task downloadJson(type: Download) {
109109

110110
task downloadOpenApiCli(type: Download) {
111111
println("Downloading OpenAPI Cli jar")
112-
sourceUrl = 'http://central.maven.org/maven2/org/openapitools/openapi-generator-cli/4.0.1/openapi-generator-cli-4.0.1.jar'
112+
sourceUrl = 'http://central.maven.org/maven2/org/openapitools/openapi-generator-cli/4.2.2/openapi-generator-cli-4.2.2.jar'
113113
target = openApiCliFile
114114
}
115115

dev/org.eclipse.codewind.openapi.core/.classpath

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<classpath>
3-
<classpathentry exported="true" kind="lib" path="lib/openapi-generator-cli-4.0.1.jar"/>
43
<classpathentry exported="true" kind="lib" path="lib/org.json_1.0.0.v201011060100.jar"/>
54
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
65
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>

dev/org.eclipse.codewind.openapi.core/META-INF/MANIFEST.MF

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ Bundle-ActivationPolicy: lazy
1717
Bundle-Vendor: %Bundle-Vendor
1818
Bundle-Localization: plugin
1919
Bundle-ClassPath: .,
20-
lib/openapi-generator-cli-4.0.1.jar,
2120
lib/org.json_1.0.0.v201011060100.jar
2221
Export-Package: org.eclipse.codewind.openapi.core,
2322
org.eclipse.codewind.openapi.core.commands;x-friends:="org.eclipse.codewind.openapi.ui",

dev/org.eclipse.codewind.openapi.core/src/org/eclipse/codewind/openapi/core/IOpenApiConstants.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
public interface IOpenApiConstants {
1616

1717
public static final String OPENAPI_CLI_OVERRIDE_PROPERTY = "org.eclipse.codewind.openapi.cli.jar.path"; //$NON-NLS-1$
18-
public static final String CODEGEN_JAR_401 = "openapi-generator-cli-4.0.1.jar"; //$NON-NLS-1$
18+
public static final String CODEGEN_JAR = "openapi-generator-cli-4.2.2.jar"; //$NON-NLS-1$
1919

2020
public static final String CODEWIND_LANGUAGE = "language"; //$NON-NLS-1$
2121
public static final String CODEWIND_PROJECT_NAME = "name"; //$NON-NLS-1$

dev/org.eclipse.codewind.openapi.test/src/org/eclipse/codewind/openapi/test/server/nodejs/NodeJsServerTest.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public NodeJsServerTest() {
2323
newProjectName = "NodejsServerProject";
2424
targetOutputFolder = "/NodejsServerProject";
2525
language = "Node.js";
26-
generatorType = "nodejs-server";
26+
generatorType = "nodejs-express-server";
2727
sourceDefinition = Constants.PETSTORE_30;
2828
targetDefinitionInProject = "a/b/c/mypetstore.yaml";
2929
}
@@ -39,8 +39,8 @@ protected void verify() {
3939
verifyGeneratedFile("README.md");
4040
verifyGeneratedFile("index.js");
4141
verifyGeneratedFile("api/openapi.yaml");
42-
verifyGeneratedFile("controllers/Pets.js");
43-
verifyGeneratedFile("service/PetsService.js");
44-
verifyGeneratedFile("utils/writer.js");
42+
verifyGeneratedFile("controllers/PetsController.js");
43+
verifyGeneratedFile("services/PetsService.js");
44+
verifyGeneratedFile("utils/openapiRouter.js");
4545
}
4646
}

dev/org.eclipse.codewind.openapi.ui/src/org/eclipse/codewind/openapi/ui/Constants.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ public static enum PROJECT_TYPE { MAVEN, NODEJS, GO, NOT_ASSESSED, UNKNOWN};
9393
"jaxrs-resteasy",
9494
"jaxrs-resteasy-eap",
9595
"spring"},
96-
{"Node.js", "nodejs-server"},
96+
{"Node.js", "nodejs-express-server", "nodejs-server-deprecated"},
9797
{"Python", "python-flask"},
9898
{"Swift", ""},
9999
{"Ada", "ada-server"},

dev/org.eclipse.codewind.openapi.ui/src/org/eclipse/codewind/openapi/ui/commands/AbstractOpenApiGeneratorCommand.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,13 +145,13 @@ protected IStatus commonSetup(IProgressMonitor monitor) {
145145
}
146146

147147
String jarOverride = System.getProperty(IOpenApiConstants.OPENAPI_CLI_OVERRIDE_PROPERTY);
148-
// eg. -Dorg.eclipse.codewind.openapi.cli.jar.path=/Users/foo/openapi/openapi-generator-cli-4.0.0.jar
148+
// eg. -Dorg.eclipse.codewind.openapi.cli.jar.path=/Users/foo/openapi/openapi-generator-cli-x.y.z.jar
149149
// Allow users to override and provide their own codegen jar
150150
if (jarOverride != null && jarOverride.contains("openapi-generator-cli")) {
151151
codegenJar = argSurround + jarOverride + argSurround;
152152
} else {
153153
// else, use as default, the codegen jar that we bundle
154-
codegenJar = argSurround + pluginLocation + "lib/" + IOpenApiConstants.CODEGEN_JAR_401 + argSurround; //$NON-NLS-1$
154+
codegenJar = argSurround + pluginLocation + "lib/" + IOpenApiConstants.CODEGEN_JAR + argSurround; //$NON-NLS-1$
155155
}
156156

157157
if (isWindows) {

0 commit comments

Comments
 (0)