Improve generated Java examples (#8012)

* Add basic types imports to generated examples

This adds an extension to include basic types imports to generated Java
examples.

* Make some fixes to example generation

* Generate OffsetDatetime correctly

* Create a useful sample for enums, regenerate samples

* Fix BigDecimal as well
This commit is contained in:
Thomas Hervé
2020-11-26 11:14:26 +01:00
committed by GitHub
parent 157ad1ce73
commit 616b44f3b1
23 changed files with 142 additions and 70 deletions

View File

@@ -239,7 +239,7 @@ public class Example {
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
FakeApi apiInstance = new FakeApi(defaultClient);
BigDecimal body = new BigDecimal(); // BigDecimal | Input number as post body
BigDecimal body = new BigDecimal(78); // BigDecimal | Input number as post body
try {
BigDecimal result = apiInstance.fakeOuterNumberSerialize(body);
System.out.println(result);
@@ -568,7 +568,7 @@ public class Example {
http_basic_test.setPassword("YOUR PASSWORD");
FakeApi apiInstance = new FakeApi(defaultClient);
BigDecimal number = new BigDecimal(); // BigDecimal | None
BigDecimal number = new BigDecimal(78); // BigDecimal | None
Double _double = 3.4D; // Double | None
String patternWithoutDelimiter = "patternWithoutDelimiter_example"; // String | None
byte[] _byte = null; // byte[] | None
@@ -579,7 +579,7 @@ public class Example {
String string = "string_example"; // String | None
File binary = new File("/path/to/file"); // File | None
LocalDate date = new LocalDate(); // LocalDate | None
OffsetDateTime dateTime = new OffsetDateTime(); // OffsetDateTime | None
OffsetDateTime dateTime = OffsetDateTime.now(); // OffsetDateTime | None
String password = "password_example"; // String | None
String paramCallback = "paramCallback_example"; // String | None
try {

View File

@@ -239,7 +239,7 @@ public class Example {
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
FakeApi apiInstance = new FakeApi(defaultClient);
BigDecimal body = new BigDecimal(); // BigDecimal | Input number as post body
BigDecimal body = new BigDecimal(78); // BigDecimal | Input number as post body
try {
BigDecimal result = apiInstance.fakeOuterNumberSerialize(body);
System.out.println(result);
@@ -568,7 +568,7 @@ public class Example {
http_basic_test.setPassword("YOUR PASSWORD");
FakeApi apiInstance = new FakeApi(defaultClient);
BigDecimal number = new BigDecimal(); // BigDecimal | None
BigDecimal number = new BigDecimal(78); // BigDecimal | None
Double _double = 3.4D; // Double | None
String patternWithoutDelimiter = "patternWithoutDelimiter_example"; // String | None
byte[] _byte = null; // byte[] | None
@@ -579,7 +579,7 @@ public class Example {
String string = "string_example"; // String | None
File binary = new File("/path/to/file"); // File | None
LocalDate date = new LocalDate(); // LocalDate | None
OffsetDateTime dateTime = new OffsetDateTime(); // OffsetDateTime | None
OffsetDateTime dateTime = OffsetDateTime.now(); // OffsetDateTime | None
String password = "password_example"; // String | None
String paramCallback = "paramCallback_example"; // String | None
try {

View File

@@ -226,6 +226,7 @@ Test serialization of outer number types
### Example
```java
import java.math.BigDecimal;
// Import classes:
import org.openapitools.client.ApiClient;
import org.openapitools.client.ApiException;
@@ -239,7 +240,7 @@ public class Example {
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
FakeApi apiInstance = new FakeApi(defaultClient);
BigDecimal body = new BigDecimal(); // BigDecimal | Input number as post body
BigDecimal body = new BigDecimal(78); // BigDecimal | Input number as post body
try {
BigDecimal result = apiInstance.fakeOuterNumberSerialize(body);
System.out.println(result);
@@ -552,6 +553,10 @@ Fake endpoint for testing various parameters
### Example
```java
import java.io.File;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.OffsetDateTime;
// Import classes:
import org.openapitools.client.ApiClient;
import org.openapitools.client.ApiException;
@@ -571,7 +576,7 @@ public class Example {
http_basic_test.setPassword("YOUR PASSWORD");
FakeApi apiInstance = new FakeApi(defaultClient);
BigDecimal number = new BigDecimal(); // BigDecimal | None
BigDecimal number = new BigDecimal(78); // BigDecimal | None
Double _double = 3.4D; // Double | None
String patternWithoutDelimiter = "patternWithoutDelimiter_example"; // String | None
byte[] _byte = null; // byte[] | None
@@ -582,7 +587,7 @@ public class Example {
String string = "string_example"; // String | None
File binary = new File("/path/to/file"); // File | None
LocalDate date = new LocalDate(); // LocalDate | None
OffsetDateTime dateTime = new OffsetDateTime(); // OffsetDateTime | None
OffsetDateTime dateTime = OffsetDateTime.now(); // OffsetDateTime | None
String password = "password_example"; // String | None
String paramCallback = "paramCallback_example"; // String | None
try {

View File

@@ -520,6 +520,7 @@ uploads an image
### Example
```java
import java.io.File;
// Import classes:
import org.openapitools.client.ApiClient;
import org.openapitools.client.ApiException;
@@ -592,6 +593,7 @@ uploads an image (required)
### Example
```java
import java.io.File;
// Import classes:
import org.openapitools.client.ApiClient;
import org.openapitools.client.ApiException;

View File

@@ -487,7 +487,7 @@ public class Example {
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
FakeApi apiInstance = new FakeApi(defaultClient);
BigDecimal body = new BigDecimal(); // BigDecimal | Input number as post body
BigDecimal body = new BigDecimal(78); // BigDecimal | Input number as post body
try {
CompletableFuture<BigDecimal> result = apiInstance.fakeOuterNumberSerialize(body);
System.out.println(result.get());
@@ -554,7 +554,7 @@ public class Example {
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
FakeApi apiInstance = new FakeApi(defaultClient);
BigDecimal body = new BigDecimal(); // BigDecimal | Input number as post body
BigDecimal body = new BigDecimal(78); // BigDecimal | Input number as post body
try {
CompletableFuture<ApiResponse<BigDecimal>> response = apiInstance.fakeOuterNumberSerializeWithHttpInfo(body);
System.out.println("Status code: " + response.get().getStatusCode());
@@ -1204,7 +1204,7 @@ public class Example {
http_basic_test.setPassword("YOUR PASSWORD");
FakeApi apiInstance = new FakeApi(defaultClient);
BigDecimal number = new BigDecimal(); // BigDecimal | None
BigDecimal number = new BigDecimal(78); // BigDecimal | None
Double _double = 3.4D; // Double | None
String patternWithoutDelimiter = "patternWithoutDelimiter_example"; // String | None
byte[] _byte = null; // byte[] | None
@@ -1215,7 +1215,7 @@ public class Example {
String string = "string_example"; // String | None
File binary = new File("/path/to/file"); // File | None
LocalDate date = new LocalDate(); // LocalDate | None
OffsetDateTime dateTime = new OffsetDateTime(); // OffsetDateTime | None
OffsetDateTime dateTime = OffsetDateTime.now(); // OffsetDateTime | None
String password = "password_example"; // String | None
String paramCallback = "paramCallback_example"; // String | None
try {
@@ -1303,7 +1303,7 @@ public class Example {
http_basic_test.setPassword("YOUR PASSWORD");
FakeApi apiInstance = new FakeApi(defaultClient);
BigDecimal number = new BigDecimal(); // BigDecimal | None
BigDecimal number = new BigDecimal(78); // BigDecimal | None
Double _double = 3.4D; // Double | None
String patternWithoutDelimiter = "patternWithoutDelimiter_example"; // String | None
byte[] _byte = null; // byte[] | None
@@ -1314,7 +1314,7 @@ public class Example {
String string = "string_example"; // String | None
File binary = new File("/path/to/file"); // File | None
LocalDate date = new LocalDate(); // LocalDate | None
OffsetDateTime dateTime = new OffsetDateTime(); // OffsetDateTime | None
OffsetDateTime dateTime = OffsetDateTime.now(); // OffsetDateTime | None
String password = "password_example"; // String | None
String paramCallback = "paramCallback_example"; // String | None
try {

View File

@@ -459,7 +459,7 @@ public class Example {
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
FakeApi apiInstance = new FakeApi(defaultClient);
BigDecimal body = new BigDecimal(); // BigDecimal | Input number as post body
BigDecimal body = new BigDecimal(78); // BigDecimal | Input number as post body
try {
BigDecimal result = apiInstance.fakeOuterNumberSerialize(body);
System.out.println(result);
@@ -525,7 +525,7 @@ public class Example {
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
FakeApi apiInstance = new FakeApi(defaultClient);
BigDecimal body = new BigDecimal(); // BigDecimal | Input number as post body
BigDecimal body = new BigDecimal(78); // BigDecimal | Input number as post body
try {
ApiResponse<BigDecimal> response = apiInstance.fakeOuterNumberSerializeWithHttpInfo(body);
System.out.println("Status code: " + response.getStatusCode());
@@ -1131,7 +1131,7 @@ public class Example {
http_basic_test.setPassword("YOUR PASSWORD");
FakeApi apiInstance = new FakeApi(defaultClient);
BigDecimal number = new BigDecimal(); // BigDecimal | None
BigDecimal number = new BigDecimal(78); // BigDecimal | None
Double _double = 3.4D; // Double | None
String patternWithoutDelimiter = "patternWithoutDelimiter_example"; // String | None
byte[] _byte = null; // byte[] | None
@@ -1142,7 +1142,7 @@ public class Example {
String string = "string_example"; // String | None
File binary = new File("/path/to/file"); // File | None
LocalDate date = new LocalDate(); // LocalDate | None
OffsetDateTime dateTime = new OffsetDateTime(); // OffsetDateTime | None
OffsetDateTime dateTime = OffsetDateTime.now(); // OffsetDateTime | None
String password = "password_example"; // String | None
String paramCallback = "paramCallback_example"; // String | None
try {
@@ -1229,7 +1229,7 @@ public class Example {
http_basic_test.setPassword("YOUR PASSWORD");
FakeApi apiInstance = new FakeApi(defaultClient);
BigDecimal number = new BigDecimal(); // BigDecimal | None
BigDecimal number = new BigDecimal(78); // BigDecimal | None
Double _double = 3.4D; // Double | None
String patternWithoutDelimiter = "patternWithoutDelimiter_example"; // String | None
byte[] _byte = null; // byte[] | None
@@ -1240,7 +1240,7 @@ public class Example {
String string = "string_example"; // String | None
File binary = new File("/path/to/file"); // File | None
LocalDate date = new LocalDate(); // LocalDate | None
OffsetDateTime dateTime = new OffsetDateTime(); // OffsetDateTime | None
OffsetDateTime dateTime = OffsetDateTime.now(); // OffsetDateTime | None
String password = "password_example"; // String | None
String paramCallback = "paramCallback_example"; // String | None
try {

View File

@@ -228,7 +228,7 @@ public class Example {
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
FakeApi apiInstance = new FakeApi(defaultClient);
BigDecimal body = new BigDecimal(); // BigDecimal | Input number as post body
BigDecimal body = new BigDecimal(78); // BigDecimal | Input number as post body
try {
BigDecimal result = apiInstance.fakeOuterNumberSerialize(body);
System.out.println(result);
@@ -542,7 +542,7 @@ public class Example {
http_basic_test.setPassword("YOUR PASSWORD");
FakeApi apiInstance = new FakeApi(defaultClient);
BigDecimal number = new BigDecimal(); // BigDecimal | None
BigDecimal number = new BigDecimal(78); // BigDecimal | None
Double _double = 3.4D; // Double | None
String patternWithoutDelimiter = "patternWithoutDelimiter_example"; // String | None
byte[] _byte = null; // byte[] | None
@@ -553,7 +553,7 @@ public class Example {
String string = "string_example"; // String | None
File binary = new File("/path/to/file"); // File | None
LocalDate date = new LocalDate(); // LocalDate | None
OffsetDateTime dateTime = new OffsetDateTime(); // OffsetDateTime | None
OffsetDateTime dateTime = OffsetDateTime.now(); // OffsetDateTime | None
String password = "password_example"; // String | None
String paramCallback = "paramCallback_example"; // String | None
try {

View File

@@ -228,7 +228,7 @@ public class Example {
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
FakeApi apiInstance = new FakeApi(defaultClient);
BigDecimal body = new BigDecimal(); // BigDecimal | Input number as post body
BigDecimal body = new BigDecimal(78); // BigDecimal | Input number as post body
try {
BigDecimal result = apiInstance.fakeOuterNumberSerialize(body);
System.out.println(result);
@@ -542,7 +542,7 @@ public class Example {
http_basic_test.setPassword("YOUR PASSWORD");
FakeApi apiInstance = new FakeApi(defaultClient);
BigDecimal number = new BigDecimal(); // BigDecimal | None
BigDecimal number = new BigDecimal(78); // BigDecimal | None
Double _double = 3.4D; // Double | None
String patternWithoutDelimiter = "patternWithoutDelimiter_example"; // String | None
byte[] _byte = null; // byte[] | None
@@ -553,7 +553,7 @@ public class Example {
String string = "string_example"; // String | None
File binary = new File("/path/to/file"); // File | None
LocalDate date = new LocalDate(); // LocalDate | None
OffsetDateTime dateTime = new OffsetDateTime(); // OffsetDateTime | None
OffsetDateTime dateTime = OffsetDateTime.now(); // OffsetDateTime | None
String password = "password_example"; // String | None
String paramCallback = "paramCallback_example"; // String | None
try {

View File

@@ -239,7 +239,7 @@ public class Example {
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
FakeApi apiInstance = new FakeApi(defaultClient);
BigDecimal body = new BigDecimal(); // BigDecimal | Input number as post body
BigDecimal body = new BigDecimal(78); // BigDecimal | Input number as post body
try {
BigDecimal result = apiInstance.fakeOuterNumberSerialize(body);
System.out.println(result);
@@ -568,7 +568,7 @@ public class Example {
http_basic_test.setPassword("YOUR PASSWORD");
FakeApi apiInstance = new FakeApi(defaultClient);
BigDecimal number = new BigDecimal(); // BigDecimal | None
BigDecimal number = new BigDecimal(78); // BigDecimal | None
Double _double = 3.4D; // Double | None
String patternWithoutDelimiter = "patternWithoutDelimiter_example"; // String | None
byte[] _byte = null; // byte[] | None
@@ -579,7 +579,7 @@ public class Example {
String string = "string_example"; // String | None
File binary = new File("/path/to/file"); // File | None
LocalDate date = new LocalDate(); // LocalDate | None
OffsetDateTime dateTime = new OffsetDateTime(); // OffsetDateTime | None
OffsetDateTime dateTime = OffsetDateTime.now(); // OffsetDateTime | None
String password = "password_example"; // String | None
String paramCallback = "paramCallback_example"; // String | None
try {

View File

@@ -239,7 +239,7 @@ public class Example {
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
FakeApi apiInstance = new FakeApi(defaultClient);
BigDecimal body = new BigDecimal(); // BigDecimal | Input number as post body
BigDecimal body = new BigDecimal(78); // BigDecimal | Input number as post body
try {
BigDecimal result = apiInstance.fakeOuterNumberSerialize(body);
System.out.println(result);
@@ -568,7 +568,7 @@ public class Example {
http_basic_test.setPassword("YOUR PASSWORD");
FakeApi apiInstance = new FakeApi(defaultClient);
BigDecimal number = new BigDecimal(); // BigDecimal | None
BigDecimal number = new BigDecimal(78); // BigDecimal | None
Double _double = 3.4D; // Double | None
String patternWithoutDelimiter = "patternWithoutDelimiter_example"; // String | None
byte[] _byte = null; // byte[] | None
@@ -579,7 +579,7 @@ public class Example {
String string = "string_example"; // String | None
File binary = new File("/path/to/file"); // File | None
LocalDate date = new LocalDate(); // LocalDate | None
OffsetDateTime dateTime = new OffsetDateTime(); // OffsetDateTime | None
OffsetDateTime dateTime = OffsetDateTime.now(); // OffsetDateTime | None
String password = "password_example"; // String | None
String paramCallback = "paramCallback_example"; // String | None
try {

View File

@@ -239,7 +239,7 @@ public class Example {
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
FakeApi apiInstance = new FakeApi(defaultClient);
BigDecimal body = new BigDecimal(); // BigDecimal | Input number as post body
BigDecimal body = new BigDecimal(78); // BigDecimal | Input number as post body
try {
BigDecimal result = apiInstance.fakeOuterNumberSerialize(body);
System.out.println(result);
@@ -568,7 +568,7 @@ public class Example {
http_basic_test.setPassword("YOUR PASSWORD");
FakeApi apiInstance = new FakeApi(defaultClient);
BigDecimal number = new BigDecimal(); // BigDecimal | None
BigDecimal number = new BigDecimal(78); // BigDecimal | None
Double _double = 3.4D; // Double | None
String patternWithoutDelimiter = "patternWithoutDelimiter_example"; // String | None
byte[] _byte = null; // byte[] | None
@@ -579,7 +579,7 @@ public class Example {
String string = "string_example"; // String | None
File binary = new File("/path/to/file"); // File | None
LocalDate date = new LocalDate(); // LocalDate | None
OffsetDateTime dateTime = new OffsetDateTime(); // OffsetDateTime | None
OffsetDateTime dateTime = OffsetDateTime.now(); // OffsetDateTime | None
String password = "password_example"; // String | None
String paramCallback = "paramCallback_example"; // String | None
try {

View File

@@ -239,7 +239,7 @@ public class Example {
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
FakeApi apiInstance = new FakeApi(defaultClient);
BigDecimal body = new BigDecimal(); // BigDecimal | Input number as post body
BigDecimal body = new BigDecimal(78); // BigDecimal | Input number as post body
try {
BigDecimal result = apiInstance.fakeOuterNumberSerialize(body);
System.out.println(result);
@@ -568,7 +568,7 @@ public class Example {
http_basic_test.setPassword("YOUR PASSWORD");
FakeApi apiInstance = new FakeApi(defaultClient);
BigDecimal number = new BigDecimal(); // BigDecimal | None
BigDecimal number = new BigDecimal(78); // BigDecimal | None
Double _double = 3.4D; // Double | None
String patternWithoutDelimiter = "patternWithoutDelimiter_example"; // String | None
byte[] _byte = null; // byte[] | None
@@ -579,7 +579,7 @@ public class Example {
String string = "string_example"; // String | None
File binary = new File("/path/to/file"); // File | None
LocalDate date = new LocalDate(); // LocalDate | None
OffsetDateTime dateTime = new OffsetDateTime(); // OffsetDateTime | None
OffsetDateTime dateTime = OffsetDateTime.now(); // OffsetDateTime | None
String password = "password_example"; // String | None
String paramCallback = "paramCallback_example"; // String | None
try {

View File

@@ -239,7 +239,7 @@ public class Example {
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
FakeApi apiInstance = new FakeApi(defaultClient);
BigDecimal body = new BigDecimal(); // BigDecimal | Input number as post body
BigDecimal body = new BigDecimal(78); // BigDecimal | Input number as post body
try {
BigDecimal result = apiInstance.fakeOuterNumberSerialize(body);
System.out.println(result);
@@ -568,7 +568,7 @@ public class Example {
http_basic_test.setPassword("YOUR PASSWORD");
FakeApi apiInstance = new FakeApi(defaultClient);
BigDecimal number = new BigDecimal(); // BigDecimal | None
BigDecimal number = new BigDecimal(78); // BigDecimal | None
Double _double = 3.4D; // Double | None
String patternWithoutDelimiter = "patternWithoutDelimiter_example"; // String | None
byte[] _byte = null; // byte[] | None
@@ -579,7 +579,7 @@ public class Example {
String string = "string_example"; // String | None
File binary = new File("/path/to/file"); // File | None
LocalDate date = new LocalDate(); // LocalDate | None
OffsetDateTime dateTime = new OffsetDateTime(); // OffsetDateTime | None
OffsetDateTime dateTime = OffsetDateTime.now(); // OffsetDateTime | None
String password = "password_example"; // String | None
String paramCallback = "paramCallback_example"; // String | None
try {

View File

@@ -239,7 +239,7 @@ public class Example {
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
FakeApi apiInstance = new FakeApi(defaultClient);
BigDecimal body = new BigDecimal(); // BigDecimal | Input number as post body
BigDecimal body = new BigDecimal(78); // BigDecimal | Input number as post body
try {
BigDecimal result = apiInstance.fakeOuterNumberSerialize(body);
System.out.println(result);
@@ -568,7 +568,7 @@ public class Example {
http_basic_test.setPassword("YOUR PASSWORD");
FakeApi apiInstance = new FakeApi(defaultClient);
BigDecimal number = new BigDecimal(); // BigDecimal | None
BigDecimal number = new BigDecimal(78); // BigDecimal | None
Double _double = 3.4D; // Double | None
String patternWithoutDelimiter = "patternWithoutDelimiter_example"; // String | None
byte[] _byte = null; // byte[] | None
@@ -579,7 +579,7 @@ public class Example {
String string = "string_example"; // String | None
File binary = new File("/path/to/file"); // File | None
LocalDate date = new LocalDate(); // LocalDate | None
OffsetDateTime dateTime = new OffsetDateTime(); // OffsetDateTime | None
OffsetDateTime dateTime = OffsetDateTime.now(); // OffsetDateTime | None
String password = "password_example"; // String | None
String paramCallback = "paramCallback_example"; // String | None
try {

View File

@@ -239,7 +239,7 @@ public class Example {
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
FakeApi apiInstance = new FakeApi(defaultClient);
BigDecimal body = new BigDecimal(); // BigDecimal | Input number as post body
BigDecimal body = new BigDecimal(78); // BigDecimal | Input number as post body
try {
BigDecimal result = apiInstance.fakeOuterNumberSerialize(body);
System.out.println(result);
@@ -568,7 +568,7 @@ public class Example {
http_basic_test.setPassword("YOUR PASSWORD");
FakeApi apiInstance = new FakeApi(defaultClient);
BigDecimal number = new BigDecimal(); // BigDecimal | None
BigDecimal number = new BigDecimal(78); // BigDecimal | None
Double _double = 3.4D; // Double | None
String patternWithoutDelimiter = "patternWithoutDelimiter_example"; // String | None
byte[] _byte = null; // byte[] | None
@@ -579,7 +579,7 @@ public class Example {
String string = "string_example"; // String | None
File binary = new File("/path/to/file"); // File | None
LocalDate date = new LocalDate(); // LocalDate | None
OffsetDateTime dateTime = new OffsetDateTime(); // OffsetDateTime | None
OffsetDateTime dateTime = OffsetDateTime.now(); // OffsetDateTime | None
String password = "password_example"; // String | None
String paramCallback = "paramCallback_example"; // String | None
try {

View File

@@ -239,7 +239,7 @@ public class Example {
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
FakeApi apiInstance = new FakeApi(defaultClient);
BigDecimal body = new BigDecimal(); // BigDecimal | Input number as post body
BigDecimal body = new BigDecimal(78); // BigDecimal | Input number as post body
try {
BigDecimal result = apiInstance.fakeOuterNumberSerialize(body);
System.out.println(result);
@@ -568,7 +568,7 @@ public class Example {
http_basic_test.setPassword("YOUR PASSWORD");
FakeApi apiInstance = new FakeApi(defaultClient);
BigDecimal number = new BigDecimal(); // BigDecimal | None
BigDecimal number = new BigDecimal(78); // BigDecimal | None
Double _double = 3.4D; // Double | None
String patternWithoutDelimiter = "patternWithoutDelimiter_example"; // String | None
byte[] _byte = null; // byte[] | None
@@ -579,7 +579,7 @@ public class Example {
String string = "string_example"; // String | None
AsyncFile binary = new AsyncFile(); // AsyncFile | None
LocalDate date = new LocalDate(); // LocalDate | None
OffsetDateTime dateTime = new OffsetDateTime(); // OffsetDateTime | None
OffsetDateTime dateTime = OffsetDateTime.now(); // OffsetDateTime | None
String password = "password_example"; // String | None
String paramCallback = "paramCallback_example"; // String | None
try {

View File

@@ -239,7 +239,7 @@ public class Example {
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
FakeApi apiInstance = new FakeApi(defaultClient);
BigDecimal body = new BigDecimal(); // BigDecimal | Input number as post body
BigDecimal body = new BigDecimal(78); // BigDecimal | Input number as post body
try {
BigDecimal result = apiInstance.fakeOuterNumberSerialize(body);
System.out.println(result);
@@ -568,7 +568,7 @@ public class Example {
http_basic_test.setPassword("YOUR PASSWORD");
FakeApi apiInstance = new FakeApi(defaultClient);
BigDecimal number = new BigDecimal(); // BigDecimal | None
BigDecimal number = new BigDecimal(78); // BigDecimal | None
Double _double = 3.4D; // Double | None
String patternWithoutDelimiter = "patternWithoutDelimiter_example"; // String | None
byte[] _byte = null; // byte[] | None
@@ -579,7 +579,7 @@ public class Example {
String string = "string_example"; // String | None
AsyncFile binary = new AsyncFile(); // AsyncFile | None
LocalDate date = new LocalDate(); // LocalDate | None
OffsetDateTime dateTime = new OffsetDateTime(); // OffsetDateTime | None
OffsetDateTime dateTime = OffsetDateTime.now(); // OffsetDateTime | None
String password = "password_example"; // String | None
String paramCallback = "paramCallback_example"; // String | None
try {

View File

@@ -239,7 +239,7 @@ public class Example {
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
FakeApi apiInstance = new FakeApi(defaultClient);
BigDecimal body = new BigDecimal(); // BigDecimal | Input number as post body
BigDecimal body = new BigDecimal(78); // BigDecimal | Input number as post body
try {
BigDecimal result = apiInstance.fakeOuterNumberSerialize(body);
System.out.println(result);
@@ -568,7 +568,7 @@ public class Example {
http_basic_test.setPassword("YOUR PASSWORD");
FakeApi apiInstance = new FakeApi(defaultClient);
BigDecimal number = new BigDecimal(); // BigDecimal | None
BigDecimal number = new BigDecimal(78); // BigDecimal | None
Double _double = 3.4D; // Double | None
String patternWithoutDelimiter = "patternWithoutDelimiter_example"; // String | None
byte[] _byte = null; // byte[] | None
@@ -579,7 +579,7 @@ public class Example {
String string = "string_example"; // String | None
File binary = new File("/path/to/file"); // File | None
LocalDate date = new LocalDate(); // LocalDate | None
OffsetDateTime dateTime = new OffsetDateTime(); // OffsetDateTime | None
OffsetDateTime dateTime = OffsetDateTime.now(); // OffsetDateTime | None
String password = "password_example"; // String | None
String paramCallback = "paramCallback_example"; // String | None
try {