diff --git a/modules/swagger-generator/src/main/java/io/swagger/generator/Bootstrap.java b/modules/swagger-generator/src/main/java/io/swagger/generator/Bootstrap.java index c0af8dc56c9..a48a21355fc 100644 --- a/modules/swagger-generator/src/main/java/io/swagger/generator/Bootstrap.java +++ b/modules/swagger-generator/src/main/java/io/swagger/generator/Bootstrap.java @@ -1,17 +1,15 @@ /** * Copyright 2016 SmartBear Software *
- * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at *
* http://www.apache.org/licenses/LICENSE-2.0 *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
*/
package io.swagger.generator;
@@ -32,13 +30,13 @@ public class Bootstrap extends HttpServlet {
DynamicSwaggerConfig bc = new DynamicSwaggerConfig();
bc.setBasePath("/api");
bc.setTitle("Swagger Generator");
- bc.setDescription("This is an online swagger codegen server. You can find out more " +
- "at https://github.com/swagger-api/swagger-codegen or on [irc.freenode.net, #swagger](http://swagger.io/irc/).");
+ bc.setDescription("This is an online swagger codegen server. You can find out more "
+ + "at https://github.com/swagger-api/swagger-codegen or on [irc.freenode.net, #swagger](http://swagger.io/irc/).");
bc.setTermsOfServiceUrl("http://swagger.io/terms/");
bc.setContact("apiteam@swagger.io");
bc.setLicense("Apache 2.0");
InputStream stream = getClass().getResourceAsStream("/version.prop");
- if(stream == null) {
+ if (stream == null) {
bc.setVersion("0.0.0");
} else {
try {
diff --git a/modules/swagger-generator/src/main/java/io/swagger/generator/DynamicSwaggerConfig.java b/modules/swagger-generator/src/main/java/io/swagger/generator/DynamicSwaggerConfig.java
index cc768bc6d10..35d143d4b7e 100644
--- a/modules/swagger-generator/src/main/java/io/swagger/generator/DynamicSwaggerConfig.java
+++ b/modules/swagger-generator/src/main/java/io/swagger/generator/DynamicSwaggerConfig.java
@@ -21,7 +21,8 @@ public class DynamicSwaggerConfig extends BeanConfig {
static {
List
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
*/
package io.swagger.generator.exception;
@@ -25,8 +23,7 @@ public class ApiException extends Exception {
this.code = code;
}
- public int getCode()
- {
+ public int getCode() {
return code;
}
}
diff --git a/modules/swagger-generator/src/main/java/io/swagger/generator/exception/BadRequestException.java b/modules/swagger-generator/src/main/java/io/swagger/generator/exception/BadRequestException.java
index 2adf97b8bf4..6fa19c94c64 100644
--- a/modules/swagger-generator/src/main/java/io/swagger/generator/exception/BadRequestException.java
+++ b/modules/swagger-generator/src/main/java/io/swagger/generator/exception/BadRequestException.java
@@ -1,17 +1,15 @@
/**
* Copyright 2016 SmartBear Software
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
*/
package io.swagger.generator.exception;
diff --git a/modules/swagger-generator/src/main/java/io/swagger/generator/exception/NotFoundException.java b/modules/swagger-generator/src/main/java/io/swagger/generator/exception/NotFoundException.java
index d3747be7d9a..f41d1402a48 100644
--- a/modules/swagger-generator/src/main/java/io/swagger/generator/exception/NotFoundException.java
+++ b/modules/swagger-generator/src/main/java/io/swagger/generator/exception/NotFoundException.java
@@ -1,17 +1,15 @@
/**
* Copyright 2016 SmartBear Software
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
*/
package io.swagger.generator.exception;
diff --git a/modules/swagger-generator/src/main/java/io/swagger/generator/model/ApiResponse.java b/modules/swagger-generator/src/main/java/io/swagger/generator/model/ApiResponse.java
index 424b9dd2b0a..28d4bdc0b1a 100644
--- a/modules/swagger-generator/src/main/java/io/swagger/generator/model/ApiResponse.java
+++ b/modules/swagger-generator/src/main/java/io/swagger/generator/model/ApiResponse.java
@@ -1,17 +1,15 @@
/**
* Copyright 2016 SmartBear Software
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
*/
package io.swagger.generator.model;
@@ -30,8 +28,7 @@ public class ApiResponse {
String type;
String message;
- public ApiResponse() {
- }
+ public ApiResponse() {}
public ApiResponse(int code, String message) {
this.code = code;
diff --git a/modules/swagger-generator/src/main/java/io/swagger/generator/model/Generated.java b/modules/swagger-generator/src/main/java/io/swagger/generator/model/Generated.java
index f48be6a77da..b1d68a5da17 100644
--- a/modules/swagger-generator/src/main/java/io/swagger/generator/model/Generated.java
+++ b/modules/swagger-generator/src/main/java/io/swagger/generator/model/Generated.java
@@ -1,17 +1,15 @@
/**
* Copyright 2016 SmartBear Software
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
*/
package io.swagger.generator.model;
diff --git a/modules/swagger-generator/src/main/java/io/swagger/generator/model/GeneratorInput.java b/modules/swagger-generator/src/main/java/io/swagger/generator/model/GeneratorInput.java
index fabde1e3104..439c730c8bd 100644
--- a/modules/swagger-generator/src/main/java/io/swagger/generator/model/GeneratorInput.java
+++ b/modules/swagger-generator/src/main/java/io/swagger/generator/model/GeneratorInput.java
@@ -57,4 +57,4 @@ public class GeneratorInput {
public void setSecurityDefinition(SecuritySchemeDefinition auth) {
this.auth = auth;
}
-}
\ No newline at end of file
+}
diff --git a/modules/swagger-generator/src/main/java/io/swagger/generator/model/InputOption.java b/modules/swagger-generator/src/main/java/io/swagger/generator/model/InputOption.java
index 33df1bc5071..371f21a9a8c 100644
--- a/modules/swagger-generator/src/main/java/io/swagger/generator/model/InputOption.java
+++ b/modules/swagger-generator/src/main/java/io/swagger/generator/model/InputOption.java
@@ -1,17 +1,15 @@
/**
* Copyright 2016 SmartBear Software
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
*/
package io.swagger.generator.model;
@@ -22,8 +20,7 @@ public class InputOption {
private Boolean required;
private String defaultValue;
- public InputOption() {
- }
+ public InputOption() {}
public InputOption(String name, String description, String defaultValue, Boolean required) {
this.name = name;
diff --git a/modules/swagger-generator/src/main/java/io/swagger/generator/model/ResponseCode.java b/modules/swagger-generator/src/main/java/io/swagger/generator/model/ResponseCode.java
index 0fcc5312dac..37f20c9c04c 100644
--- a/modules/swagger-generator/src/main/java/io/swagger/generator/model/ResponseCode.java
+++ b/modules/swagger-generator/src/main/java/io/swagger/generator/model/ResponseCode.java
@@ -6,15 +6,15 @@ public class ResponseCode {
private String code;
private String link;
- public ResponseCode() {
- }
+ public ResponseCode() {}
public ResponseCode(String code, String link) {
setCode(code);
setLink(link);
}
- @ApiModelProperty(value = "File download code", example = "d40029be-eda6-4d62-b1ef-d05e2e91a72a")
+ @ApiModelProperty(value = "File download code",
+ example = "d40029be-eda6-4d62-b1ef-d05e2e91a72a")
public String getCode() {
return code;
}
@@ -23,7 +23,9 @@ public class ResponseCode {
this.code = code;
}
- @ApiModelProperty(value = "URL for fetching the generated client", example = "http://generator.swagger.io:80/api/gen/download/d40029be-eda6-4d62-b1ef-d05e2e91a72a")
+ @ApiModelProperty(
+ value = "URL for fetching the generated client",
+ example = "http://generator.swagger.io:80/api/gen/download/d40029be-eda6-4d62-b1ef-d05e2e91a72a")
public String getLink() {
return link;
}
@@ -31,4 +33,4 @@ public class ResponseCode {
public void setLink(String link) {
this.link = link;
}
-}
\ No newline at end of file
+}
diff --git a/modules/swagger-generator/src/main/java/io/swagger/generator/online/Generator.java b/modules/swagger-generator/src/main/java/io/swagger/generator/online/Generator.java
index fecd5706361..2435a3170ca 100644
--- a/modules/swagger-generator/src/main/java/io/swagger/generator/online/Generator.java
+++ b/modules/swagger-generator/src/main/java/io/swagger/generator/online/Generator.java
@@ -28,7 +28,8 @@ public class Generator {
try {
config = CodegenConfigLoader.forName(language);
} catch (Exception e) {
- throw new BadRequestException(String.format("Unsupported target %s supplied. %s", language, e));
+ throw new BadRequestException(String.format("Unsupported target %s supplied. %s",
+ language, e));
}
Map
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
*/
package io.swagger.generator.util;
@@ -26,8 +24,8 @@ import java.io.IOException;
public class ApiOriginFilter implements javax.servlet.Filter {
@Override
- public void doFilter(ServletRequest request, ServletResponse response,
- FilterChain chain) throws IOException, ServletException {
+ public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain)
+ throws IOException, ServletException {
HttpServletResponse res = (HttpServletResponse) response;
res.addHeader("Access-Control-Allow-Origin", "*");
res.addHeader("Access-Control-Allow-Methods", "GET, POST, DELETE, PUT");
@@ -36,10 +34,8 @@ public class ApiOriginFilter implements javax.servlet.Filter {
}
@Override
- public void destroy() {
- }
+ public void destroy() {}
@Override
- public void init(FilterConfig filterConfig) throws ServletException {
- }
-}
\ No newline at end of file
+ public void init(FilterConfig filterConfig) throws ServletException {}
+}
diff --git a/modules/swagger-generator/src/main/java/io/swagger/generator/util/JacksonJsonProvider.java b/modules/swagger-generator/src/main/java/io/swagger/generator/util/JacksonJsonProvider.java
index 713ee2455c4..c26f11aa6d2 100644
--- a/modules/swagger-generator/src/main/java/io/swagger/generator/util/JacksonJsonProvider.java
+++ b/modules/swagger-generator/src/main/java/io/swagger/generator/util/JacksonJsonProvider.java
@@ -17,4 +17,4 @@ public class JacksonJsonProvider extends JacksonJaxbJsonProvider {
public JacksonJsonProvider() {
super.setMapper(commonMapper);
}
-}
\ No newline at end of file
+}
diff --git a/modules/swagger-generator/src/main/java/io/swagger/generator/util/ValidationException.java b/modules/swagger-generator/src/main/java/io/swagger/generator/util/ValidationException.java
index 631541f6c01..99eb397e996 100644
--- a/modules/swagger-generator/src/main/java/io/swagger/generator/util/ValidationException.java
+++ b/modules/swagger-generator/src/main/java/io/swagger/generator/util/ValidationException.java
@@ -25,4 +25,4 @@ public class ValidationException extends Exception {
public void setMessage(String msg) {
this.msg = msg;
}
-}
\ No newline at end of file
+}
diff --git a/modules/swagger-generator/src/main/java/io/swagger/generator/util/ValidationMessage.java b/modules/swagger-generator/src/main/java/io/swagger/generator/util/ValidationMessage.java
index 9e0218e3809..40b26562501 100644
--- a/modules/swagger-generator/src/main/java/io/swagger/generator/util/ValidationMessage.java
+++ b/modules/swagger-generator/src/main/java/io/swagger/generator/util/ValidationMessage.java
@@ -26,4 +26,4 @@ public class ValidationMessage {
public void setSeverity(String severity) {
this.severity = severity;
}
-}
\ No newline at end of file
+}
diff --git a/modules/swagger-generator/src/main/java/io/swagger/generator/util/ZipUtil.java b/modules/swagger-generator/src/main/java/io/swagger/generator/util/ZipUtil.java
index 88b4cbf6c8a..80c1872b999 100644
--- a/modules/swagger-generator/src/main/java/io/swagger/generator/util/ZipUtil.java
+++ b/modules/swagger-generator/src/main/java/io/swagger/generator/util/ZipUtil.java
@@ -1,17 +1,15 @@
/**
* Copyright 2016 SmartBear Software
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
*/
package io.swagger.generator.util;
@@ -27,8 +25,9 @@ import java.util.zip.ZipEntry;
import java.util.zip.ZipOutputStream;
/**
- * This utility compresses a list of files to standard ZIP format file.
- * It is able to compresses all sub files and sub directories, recursively.
+ * This utility compresses a list of files to standard ZIP format file. It is able to compresses all
+ * sub files and sub directories, recursively.
+ *
* @author Ha Minh Nam
*
*/
@@ -40,6 +39,7 @@ public class ZipUtil {
/**
* Compresses a collection of files to a destination zip file.
+ *
* @param listFiles A collection of files and directories
* @param destZipFile The path of the destination zip file
* @throws FileNotFoundException if file not found
@@ -64,14 +64,15 @@ public class ZipUtil {
/**
* Adds a directory to the current zip output stream.
- * @param folder the directory to be added
+ *
+ * @param folder the directory to be added
* @param parentFolder the path of parent directory
* @param zos the current zip output stream
* @throws FileNotFoundException if file not found
* @throws IOException if IO exception occurs
*/
- private void addFolderToZip(File folder, String parentFolder,
- ZipOutputStream zos) throws FileNotFoundException, IOException {
+ private void addFolderToZip(File folder, String parentFolder, ZipOutputStream zos)
+ throws FileNotFoundException, IOException {
for (File file : folder.listFiles()) {
if (file.isDirectory()) {
addFolderToZip(file, parentFolder + "/" + file.getName(), zos);
@@ -80,8 +81,7 @@ public class ZipUtil {
zos.putNextEntry(new ZipEntry(parentFolder + "/" + file.getName()));
- BufferedInputStream bis = new BufferedInputStream(
- new FileInputStream(file));
+ BufferedInputStream bis = new BufferedInputStream(new FileInputStream(file));
long bytesRead = 0;
byte[] bytesIn = new byte[BUFFER_SIZE];
@@ -99,17 +99,17 @@ public class ZipUtil {
/**
* Adds a file to the current zip output stream.
+ *
* @param file the file to be added
* @param zos the current zip output stream
* @throws FileNotFoundException if file not found
* @throws IOException if IO exception occurs
*/
- private static void addFileToZip(File file, ZipOutputStream zos)
- throws FileNotFoundException, IOException {
+ private static void addFileToZip(File file, ZipOutputStream zos) throws FileNotFoundException,
+ IOException {
zos.putNextEntry(new ZipEntry(file.getName()));
- BufferedInputStream bis = new BufferedInputStream(new FileInputStream(
- file));
+ BufferedInputStream bis = new BufferedInputStream(new FileInputStream(file));
byte[] bytesIn = new byte[BUFFER_SIZE];
int read = 0;
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 900f659848f..c24307ea4fd 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
@@ -32,32 +32,35 @@ public class OnlineGeneratorOptionsTest {
@DataProvider(name = OPTIONS_PROVIDER)
private static Object[][] listOptions() {
- return new Object[][]{{new AkkaScalaClientOptionsProvider()}, {new AndroidClientOptionsProvider()},
- {new AsyncScalaClientOptionsProvider()}, {new CSharpClientOptionsProvider()},
- {new CsharpDotNet2ClientOptionsProvider()}, {new DartClientOptionsProvider()},
- {new FlashClienOptionsProvider()}, {new JavaInflectorServerOptionsProvider()},
+ return new Object[][] {
+ {new AkkaScalaClientOptionsProvider()},
+ {new AndroidClientOptionsProvider()},
+ {new AsyncScalaClientOptionsProvider()},
+ {new CSharpClientOptionsProvider()},
+ {new CsharpDotNet2ClientOptionsProvider()},
+ {new DartClientOptionsProvider()},
+ {new FlashClienOptionsProvider()},
+ {new JavaInflectorServerOptionsProvider()},
{
new JavaOptionsProvider(),
- new JavaOptionsProvider(ImmutableMap.of(CodegenConstants.LIBRARY, JavaClientCodegen.RETROFIT_2)
- ),
- new JavaOptionsProvider(ImmutableMap.of(
- CodegenConstants.LIBRARY, JavaClientCodegen.RETROFIT_2,
- JavaClientCodegen.USE_RX_JAVA, "true")
- )
- },
- {new JaxRSServerOptionsProvider()},
- {new NodeJSServerOptionsProvider()}, {new ObjcClientOptionsProvider()},
- {new PerlClientOptionsProvider()}, {new PhpClientOptionsProvider()},
- {new PythonClientOptionsProvider()}, {new Qt5CPPOptionsProvider()},
- {new RubyClientOptionsProvider()}, {new ScalaClientOptionsProvider()},
- {new ScalatraServerOptionsProvider()}, {new SilexServerOptionsProvider()},
- {new SinatraServerOptionsProvider()}, {new SlimFrameworkServerOptionsProvider()},
- {new SpringOptionsProvider()}, {new StaticDocOptionsProvider()},
- {new StaticHtmlOptionsProvider()}, {new SwaggerOptionsProvider()},
- {new SwaggerYamlOptionsProvider()}, {new SwiftOptionsProvider()},
- {new TizenClientOptionsProvider()}, {new TypeScriptAngularClientOptionsProvider()},
- {new TypeScriptNodeClientOptionsProvider()}, {new LumenServerOptionsProvider()}
- };
+ new JavaOptionsProvider(ImmutableMap.of(CodegenConstants.LIBRARY,
+ JavaClientCodegen.RETROFIT_2)),
+ new JavaOptionsProvider(
+ ImmutableMap.of(CodegenConstants.LIBRARY,
+ JavaClientCodegen.RETROFIT_2,
+ JavaClientCodegen.USE_RX_JAVA, "true"))},
+ {new JaxRSServerOptionsProvider()}, {new NodeJSServerOptionsProvider()},
+ {new ObjcClientOptionsProvider()}, {new PerlClientOptionsProvider()},
+ {new PhpClientOptionsProvider()}, {new PythonClientOptionsProvider()},
+ {new Qt5CPPOptionsProvider()}, {new RubyClientOptionsProvider()},
+ {new ScalaClientOptionsProvider()}, {new ScalatraServerOptionsProvider()},
+ {new SilexServerOptionsProvider()}, {new SinatraServerOptionsProvider()},
+ {new SlimFrameworkServerOptionsProvider()}, {new SpringOptionsProvider()},
+ {new StaticDocOptionsProvider()}, {new StaticHtmlOptionsProvider()},
+ {new SwaggerOptionsProvider()}, {new SwaggerYamlOptionsProvider()},
+ {new SwiftOptionsProvider()}, {new TizenClientOptionsProvider()},
+ {new TypeScriptAngularClientOptionsProvider()},
+ {new TypeScriptNodeClientOptionsProvider()}, {new LumenServerOptionsProvider()}};
}
@Test(dataProvider = OPTIONS_PROVIDER)
@@ -83,15 +86,15 @@ public class OnlineGeneratorOptionsTest {
outputFilename = Generator.generateClient(provider.getLanguage(), input);
}
final File dir = new File(new File(outputFilename).getParent());
-
+
try {
FileUtils.deleteDirectory(dir);
} catch (Exception e) { // directory can't be deleted for some reasons
e.printStackTrace();
}
for (InvocationCounter option : options.values()) {
- assertNotEquals(option.getCounter(), 0, String.format("Option \"%s\" wasn't processed.",
- option.getValue()));
+ assertNotEquals(option.getCounter(), 0,
+ String.format("Option \"%s\" wasn't processed.", option.getValue()));
}
}
@@ -135,24 +138,27 @@ public class OnlineGeneratorOptionsTest {
public static void getOptionsTest(OptionsProvider provider) throws ApiException {
final Map