update samples

This commit is contained in:
William Cheng 2020-08-31 23:17:55 +08:00
parent 14a500c6fe
commit 19c5ed783a
2 changed files with 6 additions and 3 deletions

View File

@ -28,6 +28,7 @@ import io.vertx.ext.web.client.HttpResponse;
import io.vertx.ext.web.client.WebClient;
import io.vertx.ext.web.client.WebClientOptions;
import java.time.OffsetDateTime;
import java.text.DateFormat;
import java.util.*;
import java.util.function.Consumer;
@ -37,7 +38,7 @@ import java.util.regex.Pattern;
import static java.util.stream.Collectors.toMap;
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class ApiClient {
public class ApiClient extends JavaTimeFormatter {
private static final Pattern CONTENT_DISPOSITION_PATTERN = Pattern.compile("filename=['\"]?([^'\"\\s]+)['\"]?");
private static final OpenOptions FILE_DOWNLOAD_OPTIONS = new OpenOptions().setCreate(true).setTruncateExisting(true);
@ -284,6 +285,8 @@ public class ApiClient {
return "";
} else if (param instanceof Date) {
return formatDate((Date) param);
} else if (param instanceof OffsetDateTime) {
return formatOffsetDateTime((OffsetDateTime) param);
} else if (param instanceof Collection) {
StringBuilder b = new StringBuilder();
for (Object o : (Collection) param) {

View File

@ -9,7 +9,7 @@
<java.version>1.7</java.version>
<maven.compiler.source>${java.version}</maven.compiler.source>
<maven.compiler.target>${java.version}</maven.compiler.target>
<springfox-version>2.8.0</springfox-version>
<springfox-version>2.9.2</springfox-version>
</properties>
<parent>
<groupId>org.springframework.boot</groupId>
@ -51,7 +51,7 @@
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>2.2.11</version>
<version>2.3.1</version>
</dependency>
<dependency>
<groupId>com.github.joschi.jackson</groupId>