diff --git a/.github/workflows/maven-master-pulls.yml b/.github/workflows/maven-master-pulls.yml
new file mode 100644
index 000000000000..cffe971e3203
--- /dev/null
+++ b/.github/workflows/maven-master-pulls.yml
@@ -0,0 +1,29 @@
+name: PR build - master
+
+on:
+ pull_request:
+ branches: [ "master" ]
+
+jobs:
+ build:
+
+ runs-on: ubuntu-latest
+ strategy:
+ matrix:
+ java: [ 11 ]
+
+ steps:
+ - uses: actions/checkout@v2
+ - name: Set up Java
+ uses: actions/setup-java@v1
+ with:
+ java-version: ${{ matrix.java }}
+ - name: Cache local Maven repository
+ uses: actions/cache@v2
+ with:
+ path: ~/.m2/repository
+ key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
+ restore-keys: |
+ ${{ runner.os }}-maven-
+ - name: Build with Maven
+ run: mvn -B -U verify --file pom.xml
diff --git a/.github/workflows/maven-master.yml b/.github/workflows/maven-master.yml
new file mode 100644
index 000000000000..097d7826a5ba
--- /dev/null
+++ b/.github/workflows/maven-master.yml
@@ -0,0 +1,70 @@
+name: PR build - master
+
+on:
+ push:
+ branches: [ "master" ]
+
+jobs:
+ build:
+
+ runs-on: ubuntu-latest
+ strategy:
+ matrix:
+ java: [ 11 ]
+
+ steps:
+ - uses: actions/checkout@v2
+ - name: Set up Java
+ uses: actions/setup-java@v1
+ with:
+ java-version: ${{ matrix.java }}
+ - name: Cache local Maven repository
+ uses: actions/cache@v2
+ with:
+ path: ~/.m2/repository
+ key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
+ restore-keys: |
+ ${{ runner.os }}-maven-
+ - name: Docker Login
+ run: |
+ docker login --username=${{ secrets.DOCKERHUB_SB_USERNAME }} --password=${{ secrets.DOCKERHUB_SB_PASSWORD }}
+ set -e
+ - uses: s4u/maven-settings-action@v2.8.0
+ name: setup maven settings.xml
+ with:
+ servers: |
+ [{
+ "id": "sonatype-nexus-staging",
+ "username": "${{ secrets.OSSRH_USERNAME }}",
+ "password": "${{ secrets.OSSRH_TOKEN }}"
+ },
+ {
+ "id": "sonatype-nexus-snapshots",
+ "username": "${{ secrets.OSSRH_USERNAME }}",
+ "password": "${{ secrets.OSSRH_TOKEN }}"
+ }]
+ - name: Build with Maven
+ run: |
+ export MY_POM_VERSION=`mvn -q -Dexec.executable="echo" -Dexec.args='${projects.version}' --non-recursive org.codehaus.mojo:exec-maven-plugin:1.3.1:exec`
+ echo "POM VERSION" ${MY_POM_VERSION}
+ if [[ ! $MY_POM_VERSION =~ ^.*SNAPSHOT$ ]];
+ then
+ - name: Build with Maven
+ run: mvn -B -U verify --file pom.xml
+ - name: Deploy Maven Snapshot
+ if: ${{ matrix.java == 11 }}
+ run: |
+ export MY_POM_VERSION=`mvn -q -Dexec.executable="echo" -Dexec.args='${projects.version}' --non-recursive org.codehaus.mojo:exec-maven-plugin:1.3.1:exec`
+ echo "POM VERSION" ${MY_POM_VERSION}
+ if [[ ! $MY_POM_VERSION =~ ^.*SNAPSHOT$ ]];
+ then
+ ./mvnw clean deploy -U --settings $HOME/.m2/settings.xml
+ docker build --rm=false -t $DOCKER_GENERATOR_IMAGE_NAME:unstable ./modules/swagger-generator
+ docker tag $DOCKER_GENERATOR_IMAGE_NAME:unstable
+ docker push $DOCKER_GENERATOR_IMAGE_NAME:unstable
+ docker build --rm=false -t $DOCKER_CODEGEN_CLI_IMAGE_NAME:unstable ./modules/swagger-codegen-cli
+ docker tag $DOCKER_CODEGEN_CLI_IMAGE_NAME:unstable
+ docker push $DOCKER_CODEGEN_CLI_IMAGE_NAME:unstable
+ else
+ echo "not deploying release nor building and pushing release docker image: " ${MY_POM_VERSION}
+ fi
diff --git a/.github/workflows/test-generation-v2.yml b/.github/workflows/test-generation-v2.yml
index 2da934f9ac78..f43341e58014 100644
--- a/.github/workflows/test-generation-v2.yml
+++ b/.github/workflows/test-generation-v2.yml
@@ -20,7 +20,7 @@ jobs:
strategy:
matrix:
- java: [ 8 ]
+ java: [ 11 ]
steps:
- uses: actions/checkout@v2
@@ -54,7 +54,7 @@ jobs:
strategy:
matrix:
- java: [ 8 ]
+ java: [ 11 ]
outputs:
@@ -114,7 +114,7 @@ jobs:
###############################################
matrix:
ruby: ['2.2']
- java: [ 8 ]
+ java: [ 11 ]
###############################################
##### END DYNAMIC: Dependent on build environment
###############################################
@@ -183,7 +183,7 @@ jobs:
strategy:
matrix:
- java: [ 8 ]
+ java: [ 11 ]
outputs:
@@ -243,7 +243,7 @@ jobs:
###############################################
matrix:
node-version: [12.x]
- java: [ 8 ]
+ java: [ 11 ]
###############################################
##### END DYNAMIC: Dependent on build environment
###############################################
@@ -309,7 +309,7 @@ jobs:
strategy:
matrix:
- java: [ 8 ]
+ java: [ 11 ]
outputs:
@@ -369,7 +369,7 @@ jobs:
###############################################
matrix:
node-version: [12.x]
- java: [ 8 ]
+ java: [ 11 ]
###############################################
##### END DYNAMIC: Dependent on build environment
###############################################
diff --git a/appveyor.yml b/appveyor.yml
index adb8a60d643f..8e5b2113a0a8 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -1,7 +1,6 @@
# for CI with appveyor.yml
# Ref: http://www.yegor256.com/2015/01/10/windows-appveyor-maven.html
version: '{branch}-{build}'
-os: Windows Server 2012
skip_branch_with_pr: true
hosts:
petstore.swagger.io: 127.0.0.1
@@ -10,19 +9,17 @@ install:
Add-Type -AssemblyName System.IO.Compression.FileSystem
if (!(Test-Path -Path "C:\maven" )) {
(new-object System.Net.WebClient).DownloadFile(
- 'https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.5.4/apache-maven-3.5.4-bin.zip',
+ 'https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.2/apache-maven-3.6.2-bin.zip',
'C:\maven-bin.zip'
)
[System.IO.Compression.ZipFile]::ExtractToDirectory("C:\maven-bin.zip", "C:\maven")
}
- - cmd: SET PATH=C:\maven\apache-maven-3.5.4\bin;%JAVA_HOME%\bin;%PATH%
- - cmd: SET MAVEN_OPTS=-XX:MaxPermSize=2g -Xmx4g
- - cmd: SET JAVA_OPTS=-XX:MaxPermSize=2g -Xmx4g
- - cmd: SET M2_HOME=C:\maven\apache-maven-3.5.4
+ - cmd: SET JAVA_HOME="C:\Program Files\Java\jdk11"
+ - cmd: SET PATH="C:\Program Files\Java\jdk11\bin";%PATH%
- cmd: dir/w
# - cmd: RMDIR "C:\projects\swagger-codegen\swagger-samples" /S /Q
- git clone https://github.com/wing328/swagger-samples
- - ps: Start-Process -FilePath 'C:\maven\apache-maven-3.5.4\bin\mvn' -ArgumentList 'jetty:run' -WorkingDirectory "$env:appveyor_build_folder\swagger-samples\java\java-jersey-jaxrs-ci"
+ - ps: Start-Process "C:\Program Files (x86)\Apache\Maven\bin\mvn.cmd" -ArgumentList 'jetty:run' -WorkingDirectory "$env:appveyor_build_folder\swagger-samples\java\java-jersey-jaxrs-ci"
build_script:
# build C# API client
- nuget restore samples\client\petstore\csharp\SwaggerClient\IO.Swagger.sln
@@ -34,6 +31,10 @@ build_script:
- nuget restore samples\client\petstore\csharp\SwaggerClientNetStandard\IO.Swagger.sln
- msbuild samples\client\petstore\csharp\SwaggerClientNetStandard\IO.Swagger.sln /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
# install swagger codegen locally
+ - echo %JAVA_HOME%
+ - eco %PATH%
+ - set
+ - mvn --version
- mvn clean install --batch-mode
test_script:
# test c# API client
diff --git a/modules/swagger-codegen-cli/pom.xml b/modules/swagger-codegen-cli/pom.xml
index e2544d1bc569..184658383b0a 100644
--- a/modules/swagger-codegen-cli/pom.xml
+++ b/modules/swagger-codegen-cli/pom.xml
@@ -98,13 +98,17 @@
org.testng
testng
-
test
org.jmockit
jmockit
-
+ test
+
+
+ junit
+ junit
+ ${junit-version}
test
diff --git a/modules/swagger-codegen-cli/src/test/java/io/swagger/codegen/cmd/GenerateTest.java b/modules/swagger-codegen-cli/src/test/java/io/swagger/codegen/cmd/GenerateTest.java
index 55e87052df33..45ec50e1413b 100644
--- a/modules/swagger-codegen-cli/src/test/java/io/swagger/codegen/cmd/GenerateTest.java
+++ b/modules/swagger-codegen-cli/src/test/java/io/swagger/codegen/cmd/GenerateTest.java
@@ -509,10 +509,6 @@ private void setupAndRunTest(String specFlag, final String spec, String langFlag
new Expectations() {
{
CodegenConfigurator.fromFile(anyString);
- result = null;
-
- new CodegenConfigurator();
- times = 1;
result = configurator;
}
};
@@ -522,19 +518,15 @@ private void setupAndRunTest(String specFlag, final String spec, String langFlag
{
configurator.toClientOptInput();
- times = 1;
result = clientOptInput;
+ minTimes = 1;
- new DefaultGenerator();
- times = 1;
- result = generator;
+ DefaultGenerator g = new DefaultGenerator();
- generator.opts(clientOptInput);
- times = 1;
- result = generator;
+ g.opts(clientOptInput);
+ result = g;
- generator.generate();
- times = 1;
+ g.generate();
}
};
diff --git a/modules/swagger-codegen/pom.xml b/modules/swagger-codegen/pom.xml
index fdaafd199525..a373fe4bb090 100644
--- a/modules/swagger-codegen/pom.xml
+++ b/modules/swagger-codegen/pom.xml
@@ -265,7 +265,6 @@
org.testng
testng
-
test
@@ -294,10 +293,15 @@
org.mockito
mockito-core
- 2.8.47
+ ${mockito-version}
+ test
+
+
+ junit
+ junit
+ ${junit-version}
test
-
diff --git a/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/SpringCodegen.java b/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/SpringCodegen.java
index c42bc300f254..bee47cbbafbb 100644
--- a/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/SpringCodegen.java
+++ b/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/SpringCodegen.java
@@ -85,7 +85,6 @@ public SpringCodegen() {
cliOptions.add(CliOption.newBoolean(INTERFACE_ONLY, "Whether to generate only API interface stubs without the server files."));
cliOptions.add(CliOption.newBoolean(DELEGATE_PATTERN, "Whether to generate the server files using the delegate pattern"));
cliOptions.add(CliOption.newBoolean(SINGLE_CONTENT_TYPES, "Whether to select only one produces/consumes content-type by operation."));
- cliOptions.add(CliOption.newBoolean(JAVA_8, "use java8 features like the new date library"));
cliOptions.add(CliOption.newBoolean(ASYNC, "use async Callable controllers"));
cliOptions.add(new CliOption(RESPONSE_WRAPPER, "wrap the responses in given type (Future,Callable,CompletableFuture,ListenableFuture,DeferredResult,HystrixCommand,RxObservable,RxSingle or fully qualified type)"));
cliOptions.add(CliOption.newBoolean(USE_TAGS, "use tags for creating interface and controller classnames"));
diff --git a/modules/swagger-codegen/src/test/java/io/swagger/codegen/AbstractIntegrationTest.java b/modules/swagger-codegen/src/test/java/io/swagger/codegen/AbstractIntegrationTest.java
index 846ef4446bd6..690bbd17c3d1 100644
--- a/modules/swagger-codegen/src/test/java/io/swagger/codegen/AbstractIntegrationTest.java
+++ b/modules/swagger-codegen/src/test/java/io/swagger/codegen/AbstractIntegrationTest.java
@@ -36,7 +36,7 @@ public void generatesCorrectDirectoryStructure() throws IOException {
IntegrationTestPathsConfig integrationTestPathsConfig = getIntegrationTestPathsConfig();
- String specContent = Files.readFile(integrationTestPathsConfig.getSpecPath().toFile());
+ String specContent = Files.readFile(java.nio.file.Files.newInputStream(integrationTestPathsConfig.getSpecPath()));
Swagger swagger = new SwaggerParser().parse(specContent);
CodegenConfig codegenConfig = getCodegenConfig();
diff --git a/modules/swagger-codegen/src/test/java/io/swagger/codegen/config/CodegenConfiguratorTest.java b/modules/swagger-codegen/src/test/java/io/swagger/codegen/config/CodegenConfiguratorTest.java
index 7f17213adb75..d6e38f4cbdf5 100644
--- a/modules/swagger-codegen/src/test/java/io/swagger/codegen/config/CodegenConfiguratorTest.java
+++ b/modules/swagger-codegen/src/test/java/io/swagger/codegen/config/CodegenConfiguratorTest.java
@@ -14,12 +14,12 @@
import mockit.FullVerifications;
import mockit.Injectable;
import mockit.Mocked;
-import mockit.StrictExpectations;
import mockit.Tested;
import org.apache.commons.lang3.SerializationUtils;
import org.testng.annotations.Test;
import java.nio.file.Paths;
+import java.util.ArrayList;
import java.util.List;
import java.util.Map;
@@ -42,35 +42,22 @@ public class CodegenConfiguratorTest {
@Mocked
CodegenConfigLoader codegenConfigLoader;
- @Injectable
List authorizationValues;
- @Mocked
- ParseOptions options;
+ @Injectable
+ AuthorizationValue auth1;
+ @Injectable
+ AuthorizationValue auth2;
+ public CodegenConfiguratorTest() {
+ authorizationValues = new ArrayList<>();
+ authorizationValues.add(auth1);
+ authorizationValues.add(auth2);
+ }
@Tested
CodegenConfigurator configurator;
@SuppressWarnings("unused")
- @Test
- public void testVerbose() throws Exception {
-
- configurator.setVerbose(true);
-
- new StrictExpectations(System.class) {{
- System.setProperty("debugSwagger", "");
- times = 1;
- System.setProperty("debugModels", "");
- times = 1;
- System.setProperty("debugOperations", "");
- times = 1;
- System.setProperty("debugSupportingFiles", "");
- times = 1;
- }};
-
- setupAndRunGenericTest(configurator);
- }
-
@Test
public void testTemplateDir() throws Exception {
@@ -83,22 +70,6 @@ public void testTemplateDir() throws Exception {
}
@SuppressWarnings("unused")
- @Test
- public void testSystemProperties() throws Exception {
-
- configurator.addSystemProperty("hello", "world")
- .addSystemProperty("foo", "bar");
-
- new Expectations(System.class) {{
- System.setProperty("hello", "world");
- times = 1;
- System.setProperty("foo", "bar");
- times = 1;
- }};
-
- setupAndRunGenericTest(configurator);
- }
-
@Test
public void testSkipOverwrite() throws Exception {
CodegenConfigurator configurator1 = new CodegenConfigurator();
@@ -344,25 +315,21 @@ private static String toAbsolutePathDir(String outputDir) {
@SuppressWarnings("unused")
private void setupStandardExpectations(final String spec, final String languageName, final String auth, final CodegenConfig config) {
- new StrictExpectations() {{
+ ParseOptions options = new ParseOptions();
+ options.setResolve(true);
+ options.setFlatten(true);
+
+ new Expectations() {{
CodegenConfigLoader.forName(languageName);
times = 1;
result = config;
AuthParser.parse(auth); times=1; result = authorizationValues;
- new ParseOptions();
- times = 1;
- result = options;
- options.setResolve(true);
- options.setFlatten(true);
+ SwaggerParser p = new SwaggerParser();
+ minTimes = 1;
- new SwaggerParser();
- times = 1;
- result = parser;
-
- parser.read(spec, authorizationValues, options);
- times = 1;
+ p.read((String) any, (List) any, (ParseOptions) any);
result = swagger;
}};
diff --git a/modules/swagger-codegen/src/test/java/io/swagger/codegen/csharp/CSharpClientOptionsTest.java b/modules/swagger-codegen/src/test/java/io/swagger/codegen/csharp/CSharpClientOptionsTest.java
index 2d2861d04751..acf86c7a0e23 100644
--- a/modules/swagger-codegen/src/test/java/io/swagger/codegen/csharp/CSharpClientOptionsTest.java
+++ b/modules/swagger-codegen/src/test/java/io/swagger/codegen/csharp/CSharpClientOptionsTest.java
@@ -58,7 +58,7 @@ protected void setExpectations() {
times = 1;
clientCodegen.setNetCoreProjectFileFlag(false);
times = 1;
- clientCodegen.setModelPropertyNaming(CSharpClientOptionsProvider.MODEL_PROPERTY_NAMING);
+ clientCodegen.setModelPropertyNaming("original");
times = 1;
clientCodegen.setValidatable(true);
times = 1;
diff --git a/modules/swagger-codegen/src/test/java/io/swagger/codegen/lagomScalaApi/LagomScalaApiOptionsTest.java b/modules/swagger-codegen/src/test/java/io/swagger/codegen/lagomScalaApi/LagomScalaApiOptionsTest.java
index a4e7ac1dd1d5..25e0cfc3d858 100644
--- a/modules/swagger-codegen/src/test/java/io/swagger/codegen/lagomScalaApi/LagomScalaApiOptionsTest.java
+++ b/modules/swagger-codegen/src/test/java/io/swagger/codegen/lagomScalaApi/LagomScalaApiOptionsTest.java
@@ -32,7 +32,7 @@ protected void setExpectations() {
clientCodegen.setSortParamsByRequiredFlag(
Boolean.valueOf(ScalaClientOptionsProvider.SORT_PARAMS_VALUE));
times = 1;
- clientCodegen.setModelPropertyNaming(ScalaClientOptionsProvider.MODEL_PROPERTY_NAMING);
+ clientCodegen.setModelPropertyNaming("original");
times = 1;
clientCodegen.setSourceFolder(ScalaClientOptionsProvider.SOURCE_FOLDER_VALUE);
times = 1;
diff --git a/modules/swagger-codegen/src/test/java/io/swagger/codegen/languages/AbstractScalaCodegenTest.java b/modules/swagger-codegen/src/test/java/io/swagger/codegen/languages/AbstractScalaCodegenTest.java
index e29b9fd09c2b..3b6c8204b921 100644
--- a/modules/swagger-codegen/src/test/java/io/swagger/codegen/languages/AbstractScalaCodegenTest.java
+++ b/modules/swagger-codegen/src/test/java/io/swagger/codegen/languages/AbstractScalaCodegenTest.java
@@ -71,11 +71,4 @@ public void shouldStripPackageName() {
Assert.assertEquals(result, "WebsiteBodyModel");
}
-
- private class FakeScalaCodeGen extends AbstractScalaCodegen {
- public FakeScalaCodeGen() {
- super();
- this.reservedWords.add("reservedword");
- }
- }
-}
\ No newline at end of file
+}
diff --git a/modules/swagger-codegen/src/test/java/io/swagger/codegen/languages/FakeScalaCodeGen.java b/modules/swagger-codegen/src/test/java/io/swagger/codegen/languages/FakeScalaCodeGen.java
new file mode 100644
index 000000000000..104d6b6aac4e
--- /dev/null
+++ b/modules/swagger-codegen/src/test/java/io/swagger/codegen/languages/FakeScalaCodeGen.java
@@ -0,0 +1,26 @@
+package io.swagger.codegen.languages;
+
+import io.swagger.codegen.CodegenConfig;
+import io.swagger.codegen.CodegenType;
+
+public class FakeScalaCodeGen extends AbstractScalaCodegen implements CodegenConfig{
+ public FakeScalaCodeGen() {
+ super();
+ this.reservedWords.add("reservedword");
+ }
+
+ @Override
+ public CodegenType getTag() {
+ return CodegenType.CLIENT;
+ }
+
+ @Override
+ public String getName() {
+ return "io.swagger.codegen.languages.FakeScalaCodeGen";
+ }
+
+ @Override
+ public String getHelp() {
+ return "help";
+ }
+}
diff --git a/modules/swagger-codegen/src/test/java/io/swagger/codegen/options/CSharpClientOptionsProvider.java b/modules/swagger-codegen/src/test/java/io/swagger/codegen/options/CSharpClientOptionsProvider.java
index 8df7488e051c..2517f2f69d16 100644
--- a/modules/swagger-codegen/src/test/java/io/swagger/codegen/options/CSharpClientOptionsProvider.java
+++ b/modules/swagger-codegen/src/test/java/io/swagger/codegen/options/CSharpClientOptionsProvider.java
@@ -41,7 +41,7 @@ public Map createOptions() {
.put(CodegenConstants.INTERFACE_PREFIX, "X")
.put(CodegenConstants.ALLOW_UNICODE_IDENTIFIERS, ALLOW_UNICODE_IDENTIFIERS_VALUE)
.put(CodegenConstants.NETCORE_PROJECT_FILE, "false")
- .put(CodegenConstants.MODEL_PROPERTY_NAMING, MODEL_PROPERTY_NAMING)
+ .put(CodegenConstants.MODEL_PROPERTY_NAMING, "original")
.put(CodegenConstants.VALIDATABLE, "true")
.build();
}
diff --git a/modules/swagger-codegen/src/test/java/io/swagger/codegen/options/CsharpDotNet2ClientOptionsProvider.java b/modules/swagger-codegen/src/test/java/io/swagger/codegen/options/CsharpDotNet2ClientOptionsProvider.java
index cbbd7b2f093c..e71d397baf84 100644
--- a/modules/swagger-codegen/src/test/java/io/swagger/codegen/options/CsharpDotNet2ClientOptionsProvider.java
+++ b/modules/swagger-codegen/src/test/java/io/swagger/codegen/options/CsharpDotNet2ClientOptionsProvider.java
@@ -14,7 +14,7 @@ public class CsharpDotNet2ClientOptionsProvider implements OptionsProvider {
@Override
public String getLanguage() {
- return "CsharpDotNet2";
+ return "csharp-dotnet2";
}
@Override
diff --git a/modules/swagger-codegen/src/test/java/io/swagger/codegen/options/JavaOptionsProvider.java b/modules/swagger-codegen/src/test/java/io/swagger/codegen/options/JavaOptionsProvider.java
index 96a6baceab76..53bf3cef7b5f 100644
--- a/modules/swagger-codegen/src/test/java/io/swagger/codegen/options/JavaOptionsProvider.java
+++ b/modules/swagger-codegen/src/test/java/io/swagger/codegen/options/JavaOptionsProvider.java
@@ -87,10 +87,14 @@ public JavaOptionsProvider() {
* Use the default options, but override the ones found in additionalOptions.
*/
public JavaOptionsProvider(Map additionalOptions) {
- options = new ImmutableMap.Builder()
- .putAll(options)
- .putAll(additionalOptions)
- .build();
+
+ ImmutableMap.Builder b = new ImmutableMap.Builder();
+ if (options != null) {
+ b = b.putAll(options);
+ }
+ options = b
+ .putAll(additionalOptions)
+ .build();
}
@Override
diff --git a/modules/swagger-codegen/src/test/java/io/swagger/codegen/options/ScalaClientOptionsProvider.java b/modules/swagger-codegen/src/test/java/io/swagger/codegen/options/ScalaClientOptionsProvider.java
index 468ce1ae8f72..62ed2f1ff375 100644
--- a/modules/swagger-codegen/src/test/java/io/swagger/codegen/options/ScalaClientOptionsProvider.java
+++ b/modules/swagger-codegen/src/test/java/io/swagger/codegen/options/ScalaClientOptionsProvider.java
@@ -28,7 +28,7 @@ public Map createOptions() {
.put(CodegenConstants.API_PACKAGE, API_PACKAGE_VALUE)
.put(CodegenConstants.SORT_PARAMS_BY_REQUIRED_FLAG, SORT_PARAMS_VALUE)
.put(CodegenConstants.ENSURE_UNIQUE_PARAMS, ENSURE_UNIQUE_PARAMS_VALUE)
- .put(CodegenConstants.MODEL_PROPERTY_NAMING, MODEL_PROPERTY_NAMING)
+ .put(CodegenConstants.MODEL_PROPERTY_NAMING, "original")
.put(CodegenConstants.SOURCE_FOLDER, SOURCE_FOLDER_VALUE)
.put(CodegenConstants.ALLOW_UNICODE_IDENTIFIERS, ALLOW_UNICODE_IDENTIFIERS_VALUE)
.build();
diff --git a/modules/swagger-codegen/src/test/java/io/swagger/codegen/options/SilexServerOptionsProvider.java b/modules/swagger-codegen/src/test/java/io/swagger/codegen/options/SilexServerOptionsProvider.java
index 3b859985d6cb..cc9aef9dc765 100644
--- a/modules/swagger-codegen/src/test/java/io/swagger/codegen/options/SilexServerOptionsProvider.java
+++ b/modules/swagger-codegen/src/test/java/io/swagger/codegen/options/SilexServerOptionsProvider.java
@@ -13,7 +13,7 @@ public class SilexServerOptionsProvider implements OptionsProvider {
@Override
public String getLanguage() {
- return "silex-PHP";
+ return "php-silex";
}
@Override
diff --git a/modules/swagger-codegen/src/test/java/io/swagger/codegen/options/SpringOptionsProvider.java b/modules/swagger-codegen/src/test/java/io/swagger/codegen/options/SpringOptionsProvider.java
index 6f64aa5036eb..c154872b776d 100644
--- a/modules/swagger-codegen/src/test/java/io/swagger/codegen/options/SpringOptionsProvider.java
+++ b/modules/swagger-codegen/src/test/java/io/swagger/codegen/options/SpringOptionsProvider.java
@@ -44,7 +44,6 @@ public Map createOptions() {
options.put(SpringCodegen.INTERFACE_ONLY, INTERFACE_ONLY);
options.put(SpringCodegen.DELEGATE_PATTERN, DELEGATE_PATTERN);
options.put(SpringCodegen.SINGLE_CONTENT_TYPES, SINGLE_CONTENT_TYPES);
- options.put(SpringCodegen.JAVA_8, JAVA_8);
options.put(SpringCodegen.ASYNC, ASYNC);
options.put(SpringCodegen.RESPONSE_WRAPPER, RESPONSE_WRAPPER);
options.put(SpringCodegen.USE_TAGS, USE_TAGS);
diff --git a/modules/swagger-codegen/src/test/java/io/swagger/codegen/scala/ScalaClientOptionsTest.java b/modules/swagger-codegen/src/test/java/io/swagger/codegen/scala/ScalaClientOptionsTest.java
index d03cfee7ee7b..8ba84a1b8345 100644
--- a/modules/swagger-codegen/src/test/java/io/swagger/codegen/scala/ScalaClientOptionsTest.java
+++ b/modules/swagger-codegen/src/test/java/io/swagger/codegen/scala/ScalaClientOptionsTest.java
@@ -32,7 +32,7 @@ protected void setExpectations() {
times = 1;
clientCodegen.setSortParamsByRequiredFlag(Boolean.valueOf(ScalaClientOptionsProvider.SORT_PARAMS_VALUE));
times = 1;
- clientCodegen.setModelPropertyNaming(ScalaClientOptionsProvider.MODEL_PROPERTY_NAMING);
+ clientCodegen.setModelPropertyNaming("original");
times = 1;
clientCodegen.setSourceFolder(ScalaClientOptionsProvider.SOURCE_FOLDER_VALUE);
times = 1;
diff --git a/modules/swagger-generator/pom.xml b/modules/swagger-generator/pom.xml
index dd716f73c7ca..09642eed98ad 100644
--- a/modules/swagger-generator/pom.xml
+++ b/modules/swagger-generator/pom.xml
@@ -304,14 +304,26 @@
+
+ com.fasterxml.jackson.jaxrs
+ jackson-jaxrs-json-provider
+ ${jackson-version}
+
org.testng
testng
+ test
- com.fasterxml.jackson.jaxrs
- jackson-jaxrs-json-provider
- ${jackson-version}
+ org.jmockit
+ jmockit
+ test
+
+
+ junit
+ junit
+ ${junit-version}
+ test
diff --git a/modules/swagger-generator/src/test/java/io/swagger/generator/online/OnlineGeneratorOptionsTest.java b/modules/swagger-generator/src/test/java/io/swagger/generator/online/OnlineGeneratorOptionsTest.java
index c24307ea4fdb..17b4fa5c55c6 100644
--- a/modules/swagger-generator/src/test/java/io/swagger/generator/online/OnlineGeneratorOptionsTest.java
+++ b/modules/swagger-generator/src/test/java/io/swagger/generator/online/OnlineGeneratorOptionsTest.java
@@ -35,16 +35,15 @@ private static Object[][] listOptions() {
return new Object[][] {
{new AkkaScalaClientOptionsProvider()},
{new AndroidClientOptionsProvider()},
- {new AsyncScalaClientOptionsProvider()},
{new CSharpClientOptionsProvider()},
{new CsharpDotNet2ClientOptionsProvider()},
{new DartClientOptionsProvider()},
{new FlashClienOptionsProvider()},
{new JavaInflectorServerOptionsProvider()},
{
- new JavaOptionsProvider(),
+ new JavaOptionsProvider()},{
new JavaOptionsProvider(ImmutableMap.of(CodegenConstants.LIBRARY,
- JavaClientCodegen.RETROFIT_2)),
+ JavaClientCodegen.RETROFIT_2))},{
new JavaOptionsProvider(
ImmutableMap.of(CodegenConstants.LIBRARY,
JavaClientCodegen.RETROFIT_2,
diff --git a/pom.xml b/pom.xml
index 0b4fa1942723..58aa71a9d715 100644
--- a/pom.xml
+++ b/pom.xml
@@ -52,17 +52,17 @@
org.jvnet.wagon-svn
wagon-svn
- 1.8
+ 1.12
org.apache.maven.wagon
wagon-ssh-external
- 1.0-alpha-6
+ 3.5.2
org.apache.maven.wagon
wagon-webdav
- 1.0-beta-1
+ 1.0-beta-2
install
@@ -83,9 +83,6 @@
-->
- 1.8
- 1.8
- 1.8
LF
@@ -125,7 +122,7 @@
${surefire-version}
none:none
- -XX:+StartAttachListener
+ -javaagent:"${settings.localRepository}"/org/jmockit/jmockit/${jmockit-version}/jmockit-${jmockit-version}.jar --add-opens java.base/java.lang=ALL-UNNAMED -Djdk.attach.allowAttachSelf
@@ -157,16 +154,12 @@
maven-compiler-plugin
- 3.6.1
-
-
- 1.8
-
+ 3.10.1
org.apache.maven.plugins
maven-jar-plugin
- 3.0.2
+ 3.3.0
@@ -181,7 +174,7 @@
org.apache.maven.plugins
maven-site-plugin
- 3.5.1
+ 3.12.0
org.apache.maven.plugins
@@ -192,7 +185,7 @@
org.apache.maven.plugins
maven-javadoc-plugin
- 2.10.4
+ 3.5.0
true
@@ -213,7 +206,7 @@
org.apache.maven.plugins
maven-source-plugin
- 3.0.1
+ 3.2.1
attach-sources
@@ -227,7 +220,7 @@
org.apache.maven.plugins
maven-enforcer-plugin
- 1.4.1
+ 3.2.1
enforce-versions
@@ -301,6 +294,7 @@
org.codehaus.mojo
build-helper-maven-plugin
+ 3.3.0
add-source
@@ -332,6 +326,7 @@
org.apache.maven.plugins
maven-gpg-plugin
+ 3.0.1
sign-artifacts
@@ -920,7 +915,7 @@
org.apache.maven.plugins
maven-jxr-plugin
- 2.5
+ 3.3.0
true
@@ -928,7 +923,7 @@
org.apache.maven.plugins
maven-project-info-reports-plugin
- 2.9
+ 3.4.2
@@ -964,6 +959,12 @@
${jmockit-version}
test
+
+ org.mockito
+ mockito-core
+ ${mockito-version}
+ test
+
@@ -976,23 +977,25 @@
- 1.0.64
+ 8
+ 1.0.65
2.11.1
3.3.0
- 1.6.9
+ 1.6.10
2.11.0
1.5.0
- 4.13.1
- 2.14.0
+ 4.13.2
+ 2.14.2
1.0.0
3.12.0
- 1.7.35
+ 1.7.36
3.2.1
- 1.12
- 6.9.6
- 2.19.1
- 1.25
- 0.9.11
- 1.33
+ 1.15
+ 7.7.1
+ 3.0.0
+ 1.49
+ 5.2.0
+ 0.10.2
+ 2.0
diff --git a/pom.xml.jenkins b/pom.xml.jenkins
index 726b8719c4f0..cc119bfc93a7 100644
--- a/pom.xml.jenkins
+++ b/pom.xml.jenkins
@@ -52,17 +52,17 @@
org.jvnet.wagon-svn
wagon-svn
- 1.8
+ 1.12
org.apache.maven.wagon
wagon-ssh-external
- 1.0-alpha-6
+ 3.5.2
org.apache.maven.wagon
wagon-webdav
- 1.0-beta-1
+ 1.0-beta-2
install
@@ -157,7 +157,7 @@
maven-compiler-plugin
- 3.6.1
+ 3.10.1
1.8
@@ -166,7 +166,7 @@
org.apache.maven.plugins
maven-jar-plugin
- 3.0.2
+ 3.3.0
@@ -181,7 +181,7 @@
org.apache.maven.plugins
maven-site-plugin
- 3.5.1
+ 3.12.0
org.apache.maven.plugins
@@ -192,7 +192,7 @@
org.apache.maven.plugins
maven-javadoc-plugin
- 2.10.4
+ 3.5.0
true
@@ -213,7 +213,7 @@
org.apache.maven.plugins
maven-source-plugin
- 3.0.1
+ 3.2.1
attach-sources
@@ -227,7 +227,7 @@
org.apache.maven.plugins
maven-enforcer-plugin
- 1.4.1
+ 3.2.1
enforce-versions
@@ -279,6 +279,7 @@
org.codehaus.mojo
build-helper-maven-plugin
+ 3.3.0
add-source
@@ -310,6 +311,7 @@
org.apache.maven.plugins
maven-gpg-plugin
+ 3.0.1
sign-artifacts
@@ -936,7 +938,7 @@
org.apache.maven.plugins
maven-jxr-plugin
- 2.5
+ 3.3.0
true
@@ -944,7 +946,7 @@
org.apache.maven.plugins
maven-project-info-reports-plugin
- 2.9
+ 3.4.2
@@ -980,6 +982,12 @@
${jmockit-version}
test
+
+ org.mockito
+ mockito-core
+ ${mockito-version}
+ test
+
@@ -992,23 +1000,24 @@
- 1.0.64
+ 1.0.65
2.11.1
3.3.0
- 1.6.9
+ 1.6.10
2.11.0
1.5.0
- 4.13.1
- 2.14.0
+ 4.13.2
+ 2.14.2
1.0.0
3.12.0
- 1.7.35
+ 1.7.36
3.2.1
- 1.12
- 6.9.6
- 2.19.1
- 1.25
- 0.9.11
- 1.33
+ 1.15
+ 7.7.1
+ 3.0.0
+ 1.49
+ 5.2.0
+ 0.10.2
+ 2.0