Merge remote-tracking branch 'origin/master' into 3.4.x

This commit is contained in:
William Cheng
2018-11-15 17:11:01 +08:00
582 changed files with 32825 additions and 962 deletions

View File

@@ -470,7 +470,7 @@ No authorization required
<a name="testGroupParameters"></a>
# **testGroupParameters**
> testGroupParameters(stringGroup, booleanGroup, int64Group)
> testGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group)
Fake endpoint to test group parameters (optional)
@@ -484,11 +484,14 @@ Fake endpoint to test group parameters (optional)
FakeApi apiInstance = new FakeApi();
Integer requiredStringGroup = 56; // Integer | Required String in group parameters
Boolean requiredBooleanGroup = true; // Boolean | Required Boolean in group parameters
Long requiredInt64Group = 56L; // Long | Required Integer in group parameters
Integer stringGroup = 56; // Integer | String in group parameters
Boolean booleanGroup = true; // Boolean | Boolean in group parameters
Long int64Group = 56L; // Long | Integer in group parameters
try {
apiInstance.testGroupParameters(stringGroup, booleanGroup, int64Group);
apiInstance.testGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group);
} catch (ApiException e) {
System.err.println("Exception when calling FakeApi#testGroupParameters");
e.printStackTrace();
@@ -499,6 +502,9 @@ try {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**requiredStringGroup** | **Integer**| Required String in group parameters |
**requiredBooleanGroup** | **Boolean**| Required Boolean in group parameters |
**requiredInt64Group** | **Long**| Required Integer in group parameters |
**stringGroup** | **Integer**| String in group parameters | [optional]
**booleanGroup** | **Boolean**| Boolean in group parameters | [optional]
**int64Group** | **Long**| Integer in group parameters | [optional]

View File

@@ -883,30 +883,65 @@ public class FakeApi {
* Fake endpoint to test group parameters (optional)
* Fake endpoint to test group parameters (optional)
* <p><b>400</b> - Someting wrong
* @param requiredStringGroup Required String in group parameters
* @param requiredBooleanGroup Required Boolean in group parameters
* @param requiredInt64Group Required Integer in group parameters
* @param stringGroup String in group parameters
* @param booleanGroup Boolean in group parameters
* @param int64Group Integer in group parameters
* @throws IOException if an error occurs while attempting to invoke the API
**/
public void testGroupParameters(Integer stringGroup, Boolean booleanGroup, Long int64Group) throws IOException {
testGroupParametersForHttpResponse(stringGroup, booleanGroup, int64Group);
public void testGroupParameters(Integer requiredStringGroup, Boolean requiredBooleanGroup, Long requiredInt64Group, Integer stringGroup, Boolean booleanGroup, Long int64Group) throws IOException {
testGroupParametersForHttpResponse(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group);
}
/**
* Fake endpoint to test group parameters (optional)
* Fake endpoint to test group parameters (optional)
* <p><b>400</b> - Someting wrong
* @param requiredStringGroup Required String in group parameters
* @param requiredBooleanGroup Required Boolean in group parameters
* @param requiredInt64Group Required Integer in group parameters
* @param params Map of query params. A collection will be interpreted as passing in multiple instances of the same query param.
* @throws IOException if an error occurs while attempting to invoke the API
**/
public void testGroupParameters(Map<String, Object> params) throws IOException {
testGroupParametersForHttpResponse(params);
public void testGroupParameters(Integer requiredStringGroup, Boolean requiredBooleanGroup, Long requiredInt64Group, Map<String, Object> params) throws IOException {
testGroupParametersForHttpResponse(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, params);
}
public HttpResponse testGroupParametersForHttpResponse(Integer stringGroup, Boolean booleanGroup, Long int64Group) throws IOException {
public HttpResponse testGroupParametersForHttpResponse(Integer requiredStringGroup, Boolean requiredBooleanGroup, Long requiredInt64Group, Integer stringGroup, Boolean booleanGroup, Long int64Group) throws IOException {
// verify the required parameter 'requiredStringGroup' is set
if (requiredStringGroup == null) {
throw new IllegalArgumentException("Missing the required parameter 'requiredStringGroup' when calling testGroupParameters");
}// verify the required parameter 'requiredBooleanGroup' is set
if (requiredBooleanGroup == null) {
throw new IllegalArgumentException("Missing the required parameter 'requiredBooleanGroup' when calling testGroupParameters");
}// verify the required parameter 'requiredInt64Group' is set
if (requiredInt64Group == null) {
throw new IllegalArgumentException("Missing the required parameter 'requiredInt64Group' when calling testGroupParameters");
}
UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + "/fake");
if (stringGroup != null) {
if (requiredStringGroup != null) {
String key = "required_string_group";
Object value = requiredStringGroup;
if (value instanceof Collection) {
uriBuilder = uriBuilder.queryParam(key, ((Collection) value).toArray());
} else if (value instanceof Object[]) {
uriBuilder = uriBuilder.queryParam(key, (Object[]) value);
} else {
uriBuilder = uriBuilder.queryParam(key, value);
}
} if (requiredInt64Group != null) {
String key = "required_int64_group";
Object value = requiredInt64Group;
if (value instanceof Collection) {
uriBuilder = uriBuilder.queryParam(key, ((Collection) value).toArray());
} else if (value instanceof Object[]) {
uriBuilder = uriBuilder.queryParam(key, (Object[]) value);
} else {
uriBuilder = uriBuilder.queryParam(key, value);
}
} if (stringGroup != null) {
String key = "string_group";
Object value = stringGroup;
if (value instanceof Collection) {
@@ -935,12 +970,25 @@ public class FakeApi {
return apiClient.getHttpRequestFactory().buildRequest(HttpMethods.DELETE, genericUrl, content).execute();
}
public HttpResponse testGroupParametersForHttpResponse(Map<String, Object> params) throws IOException {
public HttpResponse testGroupParametersForHttpResponse(Integer requiredStringGroup, Boolean requiredBooleanGroup, Long requiredInt64Group, Map<String, Object> params) throws IOException {
// verify the required parameter 'requiredStringGroup' is set
if (requiredStringGroup == null) {
throw new IllegalArgumentException("Missing the required parameter 'requiredStringGroup' when calling testGroupParameters");
}// verify the required parameter 'requiredBooleanGroup' is set
if (requiredBooleanGroup == null) {
throw new IllegalArgumentException("Missing the required parameter 'requiredBooleanGroup' when calling testGroupParameters");
}// verify the required parameter 'requiredInt64Group' is set
if (requiredInt64Group == null) {
throw new IllegalArgumentException("Missing the required parameter 'requiredInt64Group' when calling testGroupParameters");
}
UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + "/fake");
// Copy the params argument if present, to allow passing in immutable maps
Map<String, Object> allParams = params == null ? new HashMap<String, Object>() : new HashMap<String, Object>(params);
// Add the required query param 'requiredStringGroup' to the map of query params
allParams.put("requiredStringGroup", requiredStringGroup);
// Add the required query param 'requiredInt64Group' to the map of query params
allParams.put("requiredInt64Group", requiredInt64Group);
for (Map.Entry<String, Object> entry: allParams.entrySet()) {
String key = entry.getKey();

View File

@@ -16,6 +16,7 @@ package org.openapitools.client.api;
import java.math.BigDecimal;
import org.openapitools.client.model.Client;
import java.io.File;
import org.openapitools.client.model.FileSchemaTestClass;
import org.threeten.bp.LocalDate;
import org.threeten.bp.OffsetDateTime;
import org.openapitools.client.model.OuterComposite;
@@ -102,6 +103,22 @@ public class FakeApiTest {
// TODO: test validations
}
/**
*
*
* For this test, the body for this request much reference a schema named &#x60;File&#x60;.
*
* @throws IOException
* if the Api call fails
*/
@Test
public void testBodyWithFileSchemaTest() throws IOException {
FileSchemaTestClass fileSchemaTestClass = null;
api.testBodyWithFileSchema(fileSchemaTestClass);
// TODO: test validations
}
/**
*
*
@@ -187,6 +204,27 @@ public class FakeApiTest {
// TODO: test validations
}
/**
* Fake endpoint to test group parameters (optional)
*
* Fake endpoint to test group parameters (optional)
*
* @throws IOException
* if the Api call fails
*/
@Test
public void testGroupParametersTest() throws IOException {
Integer requiredStringGroup = null;
Boolean requiredBooleanGroup = null;
Long requiredInt64Group = null;
Integer stringGroup = null;
Boolean booleanGroup = null;
Long int64Group = null;
api.testGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group);
// TODO: test validations
}
/**
* test inline additionalProperties
*