forked from loafle/openapi-generator-original
Use builder pattern for requests (#5961)
This commit is contained in:
@@ -58,6 +58,7 @@ Name | Type | Description | Notes
|
||||
|
||||
[**Client**](Client.md)
|
||||
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
@@ -23,7 +23,7 @@ Method | HTTP request | Description
|
||||
|
||||
## createXmlItem
|
||||
|
||||
> createXmlItem(xmlItem)
|
||||
> void createXmlItem(xmlItem)
|
||||
|
||||
creates an XmlItem
|
||||
|
||||
@@ -68,6 +68,7 @@ Name | Type | Description | Notes
|
||||
|
||||
### Return type
|
||||
|
||||
|
||||
null (empty response body)
|
||||
|
||||
### Authorization
|
||||
@@ -135,6 +136,7 @@ Name | Type | Description | Notes
|
||||
|
||||
**Boolean**
|
||||
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
@@ -200,6 +202,7 @@ Name | Type | Description | Notes
|
||||
|
||||
[**OuterComposite**](OuterComposite.md)
|
||||
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
@@ -265,6 +268,7 @@ Name | Type | Description | Notes
|
||||
|
||||
[**BigDecimal**](BigDecimal.md)
|
||||
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
@@ -330,6 +334,7 @@ Name | Type | Description | Notes
|
||||
|
||||
**String**
|
||||
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
@@ -347,7 +352,7 @@ No authorization required
|
||||
|
||||
## testBodyWithFileSchema
|
||||
|
||||
> testBodyWithFileSchema(body)
|
||||
> void testBodyWithFileSchema(body)
|
||||
|
||||
|
||||
|
||||
@@ -392,6 +397,7 @@ Name | Type | Description | Notes
|
||||
|
||||
### Return type
|
||||
|
||||
|
||||
null (empty response body)
|
||||
|
||||
### Authorization
|
||||
@@ -411,7 +417,7 @@ No authorization required
|
||||
|
||||
## testBodyWithQueryParams
|
||||
|
||||
> testBodyWithQueryParams(query, body)
|
||||
> void testBodyWithQueryParams(query, body)
|
||||
|
||||
|
||||
|
||||
@@ -456,6 +462,7 @@ Name | Type | Description | Notes
|
||||
|
||||
### Return type
|
||||
|
||||
|
||||
null (empty response body)
|
||||
|
||||
### Authorization
|
||||
@@ -523,6 +530,7 @@ Name | Type | Description | Notes
|
||||
|
||||
[**Client**](Client.md)
|
||||
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
@@ -540,7 +548,7 @@ No authorization required
|
||||
|
||||
## testEndpointParameters
|
||||
|
||||
> testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback)
|
||||
> void testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback)
|
||||
|
||||
Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||
|
||||
@@ -617,6 +625,7 @@ Name | Type | Description | Notes
|
||||
|
||||
### Return type
|
||||
|
||||
|
||||
null (empty response body)
|
||||
|
||||
### Authorization
|
||||
@@ -637,7 +646,7 @@ null (empty response body)
|
||||
|
||||
## testEnumParameters
|
||||
|
||||
> testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString)
|
||||
> void testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString)
|
||||
|
||||
To test enum parameters
|
||||
|
||||
@@ -696,6 +705,7 @@ Name | Type | Description | Notes
|
||||
|
||||
### Return type
|
||||
|
||||
|
||||
null (empty response body)
|
||||
|
||||
### Authorization
|
||||
@@ -716,7 +726,7 @@ No authorization required
|
||||
|
||||
## testGroupParameters
|
||||
|
||||
> testGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group)
|
||||
> void testGroupParameters(testGroupParametersRequest)
|
||||
|
||||
Fake endpoint to test group parameters (optional)
|
||||
|
||||
@@ -731,6 +741,7 @@ import org.openapitools.client.ApiException;
|
||||
import org.openapitools.client.Configuration;
|
||||
import org.openapitools.client.models.*;
|
||||
import org.openapitools.client.api.FakeApi;
|
||||
import org.openapitools.client.api.FakeApi.*;
|
||||
|
||||
public class Example {
|
||||
public static void main(String[] args) {
|
||||
@@ -745,7 +756,16 @@ public class Example {
|
||||
Boolean booleanGroup = true; // Boolean | Boolean in group parameters
|
||||
Long int64Group = 56L; // Long | Integer in group parameters
|
||||
try {
|
||||
apiInstance.testGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group);
|
||||
|
||||
APItestGroupParametersRequest request = APItestGroupParametersRequest.newBuilder()
|
||||
.requiredStringGroup(requiredStringGroup)
|
||||
.requiredBooleanGroup(requiredBooleanGroup)
|
||||
.requiredInt64Group(requiredInt64Group)
|
||||
.stringGroup(stringGroup)
|
||||
.booleanGroup(booleanGroup)
|
||||
.int64Group(int64Group)
|
||||
.build();
|
||||
apiInstance.testGroupParameters(request);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling FakeApi#testGroupParameters");
|
||||
System.err.println("Status code: " + e.getCode());
|
||||
@@ -759,18 +779,13 @@ public class Example {
|
||||
|
||||
### Parameters
|
||||
|
||||
|
||||
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]
|
||||
| Name | Type | Description | Notes |
|
||||
|------------- | ------------- | ------------- | -------------|
|
||||
| testGroupParametersRequest | [**APItestGroupParametersRequest**](FakeApi.md#APItestGroupParametersRequest)|-|-|
|
||||
|
||||
### Return type
|
||||
|
||||
|
||||
null (empty response body)
|
||||
|
||||
### Authorization
|
||||
@@ -788,9 +803,24 @@ No authorization required
|
||||
| **400** | Someting wrong | - |
|
||||
|
||||
|
||||
<a name="APItestGroupParametersRequest"></a>
|
||||
## APItestGroupParametersRequest
|
||||
### Properties
|
||||
|
||||
| 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]
|
||||
|
||||
|
||||
|
||||
## testInlineAdditionalProperties
|
||||
|
||||
> testInlineAdditionalProperties(param)
|
||||
> void testInlineAdditionalProperties(param)
|
||||
|
||||
test inline additionalProperties
|
||||
|
||||
@@ -833,6 +863,7 @@ Name | Type | Description | Notes
|
||||
|
||||
### Return type
|
||||
|
||||
|
||||
null (empty response body)
|
||||
|
||||
### Authorization
|
||||
@@ -852,7 +883,7 @@ No authorization required
|
||||
|
||||
## testJsonFormData
|
||||
|
||||
> testJsonFormData(param, param2)
|
||||
> void testJsonFormData(param, param2)
|
||||
|
||||
test json serialization of form data
|
||||
|
||||
@@ -897,6 +928,7 @@ Name | Type | Description | Notes
|
||||
|
||||
### Return type
|
||||
|
||||
|
||||
null (empty response body)
|
||||
|
||||
### Authorization
|
||||
@@ -916,7 +948,7 @@ No authorization required
|
||||
|
||||
## testQueryParameterCollectionFormat
|
||||
|
||||
> testQueryParameterCollectionFormat(pipe, ioutil, http, url, context)
|
||||
> void testQueryParameterCollectionFormat(pipe, ioutil, http, url, context)
|
||||
|
||||
|
||||
|
||||
@@ -969,6 +1001,7 @@ Name | Type | Description | Notes
|
||||
|
||||
### Return type
|
||||
|
||||
|
||||
null (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
@@ -65,6 +65,7 @@ Name | Type | Description | Notes
|
||||
|
||||
[**Client**](Client.md)
|
||||
|
||||
|
||||
### Authorization
|
||||
|
||||
[api_key_query](../README.md#api_key_query)
|
||||
|
||||
@@ -18,7 +18,7 @@ Method | HTTP request | Description
|
||||
|
||||
## addPet
|
||||
|
||||
> addPet(body)
|
||||
> void addPet(body)
|
||||
|
||||
Add a new pet to the store
|
||||
|
||||
@@ -66,6 +66,7 @@ Name | Type | Description | Notes
|
||||
|
||||
### Return type
|
||||
|
||||
|
||||
null (empty response body)
|
||||
|
||||
### Authorization
|
||||
@@ -86,7 +87,7 @@ null (empty response body)
|
||||
|
||||
## deletePet
|
||||
|
||||
> deletePet(petId, apiKey)
|
||||
> void deletePet(petId, apiKey)
|
||||
|
||||
Deletes a pet
|
||||
|
||||
@@ -136,6 +137,7 @@ Name | Type | Description | Notes
|
||||
|
||||
### Return type
|
||||
|
||||
|
||||
null (empty response body)
|
||||
|
||||
### Authorization
|
||||
@@ -156,7 +158,7 @@ null (empty response body)
|
||||
|
||||
## findPetsByStatus
|
||||
|
||||
> List<Pet> findPetsByStatus(status)
|
||||
> List<Pet> findPetsByStatus(status)
|
||||
|
||||
Finds Pets by status
|
||||
|
||||
@@ -209,6 +211,7 @@ Name | Type | Description | Notes
|
||||
|
||||
[**List<Pet>**](Pet.md)
|
||||
|
||||
|
||||
### Authorization
|
||||
|
||||
[petstore_auth](../README.md#petstore_auth)
|
||||
@@ -227,7 +230,7 @@ Name | Type | Description | Notes
|
||||
|
||||
## findPetsByTags
|
||||
|
||||
> Set<Pet> findPetsByTags(tags)
|
||||
> Set<Pet> findPetsByTags(tags)
|
||||
|
||||
Finds Pets by tags
|
||||
|
||||
@@ -280,6 +283,7 @@ Name | Type | Description | Notes
|
||||
|
||||
[**Set<Pet>**](Pet.md)
|
||||
|
||||
|
||||
### Authorization
|
||||
|
||||
[petstore_auth](../README.md#petstore_auth)
|
||||
@@ -353,6 +357,7 @@ Name | Type | Description | Notes
|
||||
|
||||
[**Pet**](Pet.md)
|
||||
|
||||
|
||||
### Authorization
|
||||
|
||||
[api_key](../README.md#api_key)
|
||||
@@ -372,7 +377,7 @@ Name | Type | Description | Notes
|
||||
|
||||
## updatePet
|
||||
|
||||
> updatePet(body)
|
||||
> void updatePet(body)
|
||||
|
||||
Update an existing pet
|
||||
|
||||
@@ -420,6 +425,7 @@ Name | Type | Description | Notes
|
||||
|
||||
### Return type
|
||||
|
||||
|
||||
null (empty response body)
|
||||
|
||||
### Authorization
|
||||
@@ -442,7 +448,7 @@ null (empty response body)
|
||||
|
||||
## updatePetWithForm
|
||||
|
||||
> updatePetWithForm(petId, name, status)
|
||||
> void updatePetWithForm(petId, name, status)
|
||||
|
||||
Updates a pet in the store with form data
|
||||
|
||||
@@ -494,6 +500,7 @@ Name | Type | Description | Notes
|
||||
|
||||
### Return type
|
||||
|
||||
|
||||
null (empty response body)
|
||||
|
||||
### Authorization
|
||||
@@ -568,6 +575,7 @@ Name | Type | Description | Notes
|
||||
|
||||
[**ModelApiResponse**](ModelApiResponse.md)
|
||||
|
||||
|
||||
### Authorization
|
||||
|
||||
[petstore_auth](../README.md#petstore_auth)
|
||||
@@ -640,6 +648,7 @@ Name | Type | Description | Notes
|
||||
|
||||
[**ModelApiResponse**](ModelApiResponse.md)
|
||||
|
||||
|
||||
### Authorization
|
||||
|
||||
[petstore_auth](../README.md#petstore_auth)
|
||||
|
||||
@@ -13,7 +13,7 @@ Method | HTTP request | Description
|
||||
|
||||
## deleteOrder
|
||||
|
||||
> deleteOrder(orderId)
|
||||
> void deleteOrder(orderId)
|
||||
|
||||
Delete purchase order by ID
|
||||
|
||||
@@ -58,6 +58,7 @@ Name | Type | Description | Notes
|
||||
|
||||
### Return type
|
||||
|
||||
|
||||
null (empty response body)
|
||||
|
||||
### Authorization
|
||||
@@ -78,7 +79,7 @@ No authorization required
|
||||
|
||||
## getInventory
|
||||
|
||||
> Map<String, Integer> getInventory()
|
||||
> Map<String, Integer> getInventory()
|
||||
|
||||
Returns pet inventories by status
|
||||
|
||||
@@ -129,6 +130,7 @@ This endpoint does not need any parameter.
|
||||
|
||||
**Map<String, Integer>**
|
||||
|
||||
|
||||
### Authorization
|
||||
|
||||
[api_key](../README.md#api_key)
|
||||
@@ -194,6 +196,7 @@ Name | Type | Description | Notes
|
||||
|
||||
[**Order**](Order.md)
|
||||
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
@@ -259,6 +262,7 @@ Name | Type | Description | Notes
|
||||
|
||||
[**Order**](Order.md)
|
||||
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
@@ -17,7 +17,7 @@ Method | HTTP request | Description
|
||||
|
||||
## createUser
|
||||
|
||||
> createUser(body)
|
||||
> void createUser(body)
|
||||
|
||||
Create user
|
||||
|
||||
@@ -62,6 +62,7 @@ Name | Type | Description | Notes
|
||||
|
||||
### Return type
|
||||
|
||||
|
||||
null (empty response body)
|
||||
|
||||
### Authorization
|
||||
@@ -81,7 +82,7 @@ No authorization required
|
||||
|
||||
## createUsersWithArrayInput
|
||||
|
||||
> createUsersWithArrayInput(body)
|
||||
> void createUsersWithArrayInput(body)
|
||||
|
||||
Creates list of users with given input array
|
||||
|
||||
@@ -124,6 +125,7 @@ Name | Type | Description | Notes
|
||||
|
||||
### Return type
|
||||
|
||||
|
||||
null (empty response body)
|
||||
|
||||
### Authorization
|
||||
@@ -143,7 +145,7 @@ No authorization required
|
||||
|
||||
## createUsersWithListInput
|
||||
|
||||
> createUsersWithListInput(body)
|
||||
> void createUsersWithListInput(body)
|
||||
|
||||
Creates list of users with given input array
|
||||
|
||||
@@ -186,6 +188,7 @@ Name | Type | Description | Notes
|
||||
|
||||
### Return type
|
||||
|
||||
|
||||
null (empty response body)
|
||||
|
||||
### Authorization
|
||||
@@ -205,7 +208,7 @@ No authorization required
|
||||
|
||||
## deleteUser
|
||||
|
||||
> deleteUser(username)
|
||||
> void deleteUser(username)
|
||||
|
||||
Delete user
|
||||
|
||||
@@ -250,6 +253,7 @@ Name | Type | Description | Notes
|
||||
|
||||
### Return type
|
||||
|
||||
|
||||
null (empty response body)
|
||||
|
||||
### Authorization
|
||||
@@ -316,6 +320,7 @@ Name | Type | Description | Notes
|
||||
|
||||
[**User**](User.md)
|
||||
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
@@ -383,6 +388,7 @@ Name | Type | Description | Notes
|
||||
|
||||
**String**
|
||||
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
@@ -401,7 +407,7 @@ No authorization required
|
||||
|
||||
## logoutUser
|
||||
|
||||
> logoutUser()
|
||||
> void logoutUser()
|
||||
|
||||
Logs out current logged in user session
|
||||
|
||||
@@ -440,6 +446,7 @@ This endpoint does not need any parameter.
|
||||
|
||||
### Return type
|
||||
|
||||
|
||||
null (empty response body)
|
||||
|
||||
### Authorization
|
||||
@@ -459,7 +466,7 @@ No authorization required
|
||||
|
||||
## updateUser
|
||||
|
||||
> updateUser(username, body)
|
||||
> void updateUser(username, body)
|
||||
|
||||
Updated user
|
||||
|
||||
@@ -506,6 +513,7 @@ Name | Type | Description | Notes
|
||||
|
||||
### Return type
|
||||
|
||||
|
||||
null (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
@@ -44,7 +44,7 @@ public class AnotherFakeApi {
|
||||
private final Consumer<HttpRequest.Builder> memberVarInterceptor;
|
||||
private final Duration memberVarReadTimeout;
|
||||
private final Consumer<HttpResponse<InputStream>> memberVarResponseInterceptor;
|
||||
|
||||
|
||||
public AnotherFakeApi() {
|
||||
this(new ApiClient());
|
||||
}
|
||||
@@ -94,7 +94,7 @@ public class AnotherFakeApi {
|
||||
HttpResponse.BodyHandlers.ofInputStream());
|
||||
if (memberVarResponseInterceptor != null) {
|
||||
memberVarResponseInterceptor.accept(localVarResponse);
|
||||
}
|
||||
}
|
||||
if (localVarResponse.statusCode()/ 100 != 2) {
|
||||
throw new ApiException(localVarResponse.statusCode(),
|
||||
"call123testSpecialTags call received non-success response",
|
||||
|
||||
@@ -52,7 +52,7 @@ public class FakeApi {
|
||||
private final Consumer<HttpRequest.Builder> memberVarInterceptor;
|
||||
private final Duration memberVarReadTimeout;
|
||||
private final Consumer<HttpResponse<InputStream>> memberVarResponseInterceptor;
|
||||
|
||||
|
||||
public FakeApi() {
|
||||
this(new ApiClient());
|
||||
}
|
||||
@@ -101,7 +101,7 @@ public class FakeApi {
|
||||
HttpResponse.BodyHandlers.ofInputStream());
|
||||
if (memberVarResponseInterceptor != null) {
|
||||
memberVarResponseInterceptor.accept(localVarResponse);
|
||||
}
|
||||
}
|
||||
if (localVarResponse.statusCode()/ 100 != 2) {
|
||||
throw new ApiException(localVarResponse.statusCode(),
|
||||
"createXmlItem call received non-success response",
|
||||
@@ -148,7 +148,7 @@ public class FakeApi {
|
||||
HttpResponse.BodyHandlers.ofInputStream());
|
||||
if (memberVarResponseInterceptor != null) {
|
||||
memberVarResponseInterceptor.accept(localVarResponse);
|
||||
}
|
||||
}
|
||||
if (localVarResponse.statusCode()/ 100 != 2) {
|
||||
throw new ApiException(localVarResponse.statusCode(),
|
||||
"fakeOuterBooleanSerialize call received non-success response",
|
||||
@@ -196,7 +196,7 @@ public class FakeApi {
|
||||
HttpResponse.BodyHandlers.ofInputStream());
|
||||
if (memberVarResponseInterceptor != null) {
|
||||
memberVarResponseInterceptor.accept(localVarResponse);
|
||||
}
|
||||
}
|
||||
if (localVarResponse.statusCode()/ 100 != 2) {
|
||||
throw new ApiException(localVarResponse.statusCode(),
|
||||
"fakeOuterCompositeSerialize call received non-success response",
|
||||
@@ -244,7 +244,7 @@ public class FakeApi {
|
||||
HttpResponse.BodyHandlers.ofInputStream());
|
||||
if (memberVarResponseInterceptor != null) {
|
||||
memberVarResponseInterceptor.accept(localVarResponse);
|
||||
}
|
||||
}
|
||||
if (localVarResponse.statusCode()/ 100 != 2) {
|
||||
throw new ApiException(localVarResponse.statusCode(),
|
||||
"fakeOuterNumberSerialize call received non-success response",
|
||||
@@ -292,7 +292,7 @@ public class FakeApi {
|
||||
HttpResponse.BodyHandlers.ofInputStream());
|
||||
if (memberVarResponseInterceptor != null) {
|
||||
memberVarResponseInterceptor.accept(localVarResponse);
|
||||
}
|
||||
}
|
||||
if (localVarResponse.statusCode()/ 100 != 2) {
|
||||
throw new ApiException(localVarResponse.statusCode(),
|
||||
"fakeOuterStringSerialize call received non-success response",
|
||||
@@ -343,7 +343,7 @@ public class FakeApi {
|
||||
HttpResponse.BodyHandlers.ofInputStream());
|
||||
if (memberVarResponseInterceptor != null) {
|
||||
memberVarResponseInterceptor.accept(localVarResponse);
|
||||
}
|
||||
}
|
||||
if (localVarResponse.statusCode()/ 100 != 2) {
|
||||
throw new ApiException(localVarResponse.statusCode(),
|
||||
"testBodyWithFileSchema call received non-success response",
|
||||
@@ -407,7 +407,7 @@ public class FakeApi {
|
||||
HttpResponse.BodyHandlers.ofInputStream());
|
||||
if (memberVarResponseInterceptor != null) {
|
||||
memberVarResponseInterceptor.accept(localVarResponse);
|
||||
}
|
||||
}
|
||||
if (localVarResponse.statusCode()/ 100 != 2) {
|
||||
throw new ApiException(localVarResponse.statusCode(),
|
||||
"testBodyWithQueryParams call received non-success response",
|
||||
@@ -458,7 +458,7 @@ public class FakeApi {
|
||||
HttpResponse.BodyHandlers.ofInputStream());
|
||||
if (memberVarResponseInterceptor != null) {
|
||||
memberVarResponseInterceptor.accept(localVarResponse);
|
||||
}
|
||||
}
|
||||
if (localVarResponse.statusCode()/ 100 != 2) {
|
||||
throw new ApiException(localVarResponse.statusCode(),
|
||||
"testClientModel call received non-success response",
|
||||
@@ -532,7 +532,7 @@ public class FakeApi {
|
||||
HttpResponse.BodyHandlers.ofInputStream());
|
||||
if (memberVarResponseInterceptor != null) {
|
||||
memberVarResponseInterceptor.accept(localVarResponse);
|
||||
}
|
||||
}
|
||||
if (localVarResponse.statusCode()/ 100 != 2) {
|
||||
throw new ApiException(localVarResponse.statusCode(),
|
||||
"testEndpointParameters call received non-success response",
|
||||
@@ -601,7 +601,7 @@ public class FakeApi {
|
||||
HttpResponse.BodyHandlers.ofInputStream());
|
||||
if (memberVarResponseInterceptor != null) {
|
||||
memberVarResponseInterceptor.accept(localVarResponse);
|
||||
}
|
||||
}
|
||||
if (localVarResponse.statusCode()/ 100 != 2) {
|
||||
throw new ApiException(localVarResponse.statusCode(),
|
||||
"testEnumParameters call received non-success response",
|
||||
@@ -616,6 +616,22 @@ public class FakeApi {
|
||||
throw new ApiException(e);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Fake endpoint to test group parameters (optional)
|
||||
* Fake endpoint to test group parameters (optional)
|
||||
* @param testGroupParametersRequest {@link APItestGroupParametersRequest}
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public void testGroupParameters(APItestGroupParametersRequest testGroupParametersRequest) throws ApiException {
|
||||
Integer requiredStringGroup = testGroupParametersRequest.requiredStringGroup();
|
||||
Boolean requiredBooleanGroup = testGroupParametersRequest.requiredBooleanGroup();
|
||||
Long requiredInt64Group = testGroupParametersRequest.requiredInt64Group();
|
||||
Integer stringGroup = testGroupParametersRequest.stringGroup();
|
||||
Boolean booleanGroup = testGroupParametersRequest.booleanGroup();
|
||||
Long int64Group = testGroupParametersRequest.int64Group();
|
||||
testGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group);
|
||||
}
|
||||
|
||||
/**
|
||||
* Fake endpoint to test group parameters (optional)
|
||||
* Fake endpoint to test group parameters (optional)
|
||||
@@ -680,7 +696,7 @@ public class FakeApi {
|
||||
HttpResponse.BodyHandlers.ofInputStream());
|
||||
if (memberVarResponseInterceptor != null) {
|
||||
memberVarResponseInterceptor.accept(localVarResponse);
|
||||
}
|
||||
}
|
||||
if (localVarResponse.statusCode()/ 100 != 2) {
|
||||
throw new ApiException(localVarResponse.statusCode(),
|
||||
"testGroupParameters call received non-success response",
|
||||
@@ -695,6 +711,83 @@ public class FakeApi {
|
||||
throw new ApiException(e);
|
||||
}
|
||||
}
|
||||
|
||||
public static final class APItestGroupParametersRequest {
|
||||
private Integer requiredStringGroup; // Required String in group parameters (required)
|
||||
private Boolean requiredBooleanGroup; // Required Boolean in group parameters (required)
|
||||
private Long requiredInt64Group; // Required Integer in group parameters (required)
|
||||
private Integer stringGroup; // String in group parameters (optional)
|
||||
private Boolean booleanGroup; // Boolean in group parameters (optional)
|
||||
private Long int64Group; // Integer in group parameters (optional)
|
||||
|
||||
private APItestGroupParametersRequest(Builder builder) {
|
||||
this.requiredStringGroup = builder.requiredStringGroup;
|
||||
this.requiredBooleanGroup = builder.requiredBooleanGroup;
|
||||
this.requiredInt64Group = builder.requiredInt64Group;
|
||||
this.stringGroup = builder.stringGroup;
|
||||
this.booleanGroup = builder.booleanGroup;
|
||||
this.int64Group = builder.int64Group;
|
||||
}
|
||||
public Integer requiredStringGroup() {
|
||||
return requiredStringGroup;
|
||||
}
|
||||
public Boolean requiredBooleanGroup() {
|
||||
return requiredBooleanGroup;
|
||||
}
|
||||
public Long requiredInt64Group() {
|
||||
return requiredInt64Group;
|
||||
}
|
||||
public Integer stringGroup() {
|
||||
return stringGroup;
|
||||
}
|
||||
public Boolean booleanGroup() {
|
||||
return booleanGroup;
|
||||
}
|
||||
public Long int64Group() {
|
||||
return int64Group;
|
||||
}
|
||||
public static Builder newBuilder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public static class Builder {
|
||||
private Integer requiredStringGroup;
|
||||
private Boolean requiredBooleanGroup;
|
||||
private Long requiredInt64Group;
|
||||
private Integer stringGroup;
|
||||
private Boolean booleanGroup;
|
||||
private Long int64Group;
|
||||
|
||||
public Builder requiredStringGroup(Integer requiredStringGroup) {
|
||||
this.requiredStringGroup = requiredStringGroup;
|
||||
return this;
|
||||
}
|
||||
public Builder requiredBooleanGroup(Boolean requiredBooleanGroup) {
|
||||
this.requiredBooleanGroup = requiredBooleanGroup;
|
||||
return this;
|
||||
}
|
||||
public Builder requiredInt64Group(Long requiredInt64Group) {
|
||||
this.requiredInt64Group = requiredInt64Group;
|
||||
return this;
|
||||
}
|
||||
public Builder stringGroup(Integer stringGroup) {
|
||||
this.stringGroup = stringGroup;
|
||||
return this;
|
||||
}
|
||||
public Builder booleanGroup(Boolean booleanGroup) {
|
||||
this.booleanGroup = booleanGroup;
|
||||
return this;
|
||||
}
|
||||
public Builder int64Group(Long int64Group) {
|
||||
this.int64Group = int64Group;
|
||||
return this;
|
||||
}
|
||||
public APItestGroupParametersRequest build() {
|
||||
return new APItestGroupParametersRequest(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* test inline additionalProperties
|
||||
*
|
||||
@@ -730,7 +823,7 @@ public class FakeApi {
|
||||
HttpResponse.BodyHandlers.ofInputStream());
|
||||
if (memberVarResponseInterceptor != null) {
|
||||
memberVarResponseInterceptor.accept(localVarResponse);
|
||||
}
|
||||
}
|
||||
if (localVarResponse.statusCode()/ 100 != 2) {
|
||||
throw new ApiException(localVarResponse.statusCode(),
|
||||
"testInlineAdditionalProperties call received non-success response",
|
||||
@@ -783,7 +876,7 @@ public class FakeApi {
|
||||
HttpResponse.BodyHandlers.ofInputStream());
|
||||
if (memberVarResponseInterceptor != null) {
|
||||
memberVarResponseInterceptor.accept(localVarResponse);
|
||||
}
|
||||
}
|
||||
if (localVarResponse.statusCode()/ 100 != 2) {
|
||||
throw new ApiException(localVarResponse.statusCode(),
|
||||
"testJsonFormData call received non-success response",
|
||||
@@ -864,7 +957,7 @@ public class FakeApi {
|
||||
HttpResponse.BodyHandlers.ofInputStream());
|
||||
if (memberVarResponseInterceptor != null) {
|
||||
memberVarResponseInterceptor.accept(localVarResponse);
|
||||
}
|
||||
}
|
||||
if (localVarResponse.statusCode()/ 100 != 2) {
|
||||
throw new ApiException(localVarResponse.statusCode(),
|
||||
"testQueryParameterCollectionFormat call received non-success response",
|
||||
|
||||
@@ -44,7 +44,7 @@ public class FakeClassnameTags123Api {
|
||||
private final Consumer<HttpRequest.Builder> memberVarInterceptor;
|
||||
private final Duration memberVarReadTimeout;
|
||||
private final Consumer<HttpResponse<InputStream>> memberVarResponseInterceptor;
|
||||
|
||||
|
||||
public FakeClassnameTags123Api() {
|
||||
this(new ApiClient());
|
||||
}
|
||||
@@ -94,7 +94,7 @@ public class FakeClassnameTags123Api {
|
||||
HttpResponse.BodyHandlers.ofInputStream());
|
||||
if (memberVarResponseInterceptor != null) {
|
||||
memberVarResponseInterceptor.accept(localVarResponse);
|
||||
}
|
||||
}
|
||||
if (localVarResponse.statusCode()/ 100 != 2) {
|
||||
throw new ApiException(localVarResponse.statusCode(),
|
||||
"testClassname call received non-success response",
|
||||
|
||||
@@ -47,7 +47,7 @@ public class PetApi {
|
||||
private final Consumer<HttpRequest.Builder> memberVarInterceptor;
|
||||
private final Duration memberVarReadTimeout;
|
||||
private final Consumer<HttpResponse<InputStream>> memberVarResponseInterceptor;
|
||||
|
||||
|
||||
public PetApi() {
|
||||
this(new ApiClient());
|
||||
}
|
||||
@@ -96,7 +96,7 @@ public class PetApi {
|
||||
HttpResponse.BodyHandlers.ofInputStream());
|
||||
if (memberVarResponseInterceptor != null) {
|
||||
memberVarResponseInterceptor.accept(localVarResponse);
|
||||
}
|
||||
}
|
||||
if (localVarResponse.statusCode()/ 100 != 2) {
|
||||
throw new ApiException(localVarResponse.statusCode(),
|
||||
"addPet call received non-success response",
|
||||
@@ -149,7 +149,7 @@ public class PetApi {
|
||||
HttpResponse.BodyHandlers.ofInputStream());
|
||||
if (memberVarResponseInterceptor != null) {
|
||||
memberVarResponseInterceptor.accept(localVarResponse);
|
||||
}
|
||||
}
|
||||
if (localVarResponse.statusCode()/ 100 != 2) {
|
||||
throw new ApiException(localVarResponse.statusCode(),
|
||||
"deletePet call received non-success response",
|
||||
@@ -207,7 +207,7 @@ public class PetApi {
|
||||
HttpResponse.BodyHandlers.ofInputStream());
|
||||
if (memberVarResponseInterceptor != null) {
|
||||
memberVarResponseInterceptor.accept(localVarResponse);
|
||||
}
|
||||
}
|
||||
if (localVarResponse.statusCode()/ 100 != 2) {
|
||||
throw new ApiException(localVarResponse.statusCode(),
|
||||
"findPetsByStatus call received non-success response",
|
||||
@@ -268,7 +268,7 @@ public class PetApi {
|
||||
HttpResponse.BodyHandlers.ofInputStream());
|
||||
if (memberVarResponseInterceptor != null) {
|
||||
memberVarResponseInterceptor.accept(localVarResponse);
|
||||
}
|
||||
}
|
||||
if (localVarResponse.statusCode()/ 100 != 2) {
|
||||
throw new ApiException(localVarResponse.statusCode(),
|
||||
"findPetsByTags call received non-success response",
|
||||
@@ -319,7 +319,7 @@ public class PetApi {
|
||||
HttpResponse.BodyHandlers.ofInputStream());
|
||||
if (memberVarResponseInterceptor != null) {
|
||||
memberVarResponseInterceptor.accept(localVarResponse);
|
||||
}
|
||||
}
|
||||
if (localVarResponse.statusCode()/ 100 != 2) {
|
||||
throw new ApiException(localVarResponse.statusCode(),
|
||||
"getPetById call received non-success response",
|
||||
@@ -370,7 +370,7 @@ public class PetApi {
|
||||
HttpResponse.BodyHandlers.ofInputStream());
|
||||
if (memberVarResponseInterceptor != null) {
|
||||
memberVarResponseInterceptor.accept(localVarResponse);
|
||||
}
|
||||
}
|
||||
if (localVarResponse.statusCode()/ 100 != 2) {
|
||||
throw new ApiException(localVarResponse.statusCode(),
|
||||
"updatePet call received non-success response",
|
||||
@@ -421,7 +421,7 @@ public class PetApi {
|
||||
HttpResponse.BodyHandlers.ofInputStream());
|
||||
if (memberVarResponseInterceptor != null) {
|
||||
memberVarResponseInterceptor.accept(localVarResponse);
|
||||
}
|
||||
}
|
||||
if (localVarResponse.statusCode()/ 100 != 2) {
|
||||
throw new ApiException(localVarResponse.statusCode(),
|
||||
"updatePetWithForm call received non-success response",
|
||||
@@ -473,7 +473,7 @@ public class PetApi {
|
||||
HttpResponse.BodyHandlers.ofInputStream());
|
||||
if (memberVarResponseInterceptor != null) {
|
||||
memberVarResponseInterceptor.accept(localVarResponse);
|
||||
}
|
||||
}
|
||||
if (localVarResponse.statusCode()/ 100 != 2) {
|
||||
throw new ApiException(localVarResponse.statusCode(),
|
||||
"uploadFile call received non-success response",
|
||||
@@ -530,7 +530,7 @@ public class PetApi {
|
||||
HttpResponse.BodyHandlers.ofInputStream());
|
||||
if (memberVarResponseInterceptor != null) {
|
||||
memberVarResponseInterceptor.accept(localVarResponse);
|
||||
}
|
||||
}
|
||||
if (localVarResponse.statusCode()/ 100 != 2) {
|
||||
throw new ApiException(localVarResponse.statusCode(),
|
||||
"uploadFileWithRequiredFile call received non-success response",
|
||||
|
||||
@@ -44,7 +44,7 @@ public class StoreApi {
|
||||
private final Consumer<HttpRequest.Builder> memberVarInterceptor;
|
||||
private final Duration memberVarReadTimeout;
|
||||
private final Consumer<HttpResponse<InputStream>> memberVarResponseInterceptor;
|
||||
|
||||
|
||||
public StoreApi() {
|
||||
this(new ApiClient());
|
||||
}
|
||||
@@ -92,7 +92,7 @@ public class StoreApi {
|
||||
HttpResponse.BodyHandlers.ofInputStream());
|
||||
if (memberVarResponseInterceptor != null) {
|
||||
memberVarResponseInterceptor.accept(localVarResponse);
|
||||
}
|
||||
}
|
||||
if (localVarResponse.statusCode()/ 100 != 2) {
|
||||
throw new ApiException(localVarResponse.statusCode(),
|
||||
"deleteOrder call received non-success response",
|
||||
@@ -136,7 +136,7 @@ public class StoreApi {
|
||||
HttpResponse.BodyHandlers.ofInputStream());
|
||||
if (memberVarResponseInterceptor != null) {
|
||||
memberVarResponseInterceptor.accept(localVarResponse);
|
||||
}
|
||||
}
|
||||
if (localVarResponse.statusCode()/ 100 != 2) {
|
||||
throw new ApiException(localVarResponse.statusCode(),
|
||||
"getInventory call received non-success response",
|
||||
@@ -187,7 +187,7 @@ public class StoreApi {
|
||||
HttpResponse.BodyHandlers.ofInputStream());
|
||||
if (memberVarResponseInterceptor != null) {
|
||||
memberVarResponseInterceptor.accept(localVarResponse);
|
||||
}
|
||||
}
|
||||
if (localVarResponse.statusCode()/ 100 != 2) {
|
||||
throw new ApiException(localVarResponse.statusCode(),
|
||||
"getOrderById call received non-success response",
|
||||
@@ -239,7 +239,7 @@ public class StoreApi {
|
||||
HttpResponse.BodyHandlers.ofInputStream());
|
||||
if (memberVarResponseInterceptor != null) {
|
||||
memberVarResponseInterceptor.accept(localVarResponse);
|
||||
}
|
||||
}
|
||||
if (localVarResponse.statusCode()/ 100 != 2) {
|
||||
throw new ApiException(localVarResponse.statusCode(),
|
||||
"placeOrder call received non-success response",
|
||||
|
||||
@@ -44,7 +44,7 @@ public class UserApi {
|
||||
private final Consumer<HttpRequest.Builder> memberVarInterceptor;
|
||||
private final Duration memberVarReadTimeout;
|
||||
private final Consumer<HttpResponse<InputStream>> memberVarResponseInterceptor;
|
||||
|
||||
|
||||
public UserApi() {
|
||||
this(new ApiClient());
|
||||
}
|
||||
@@ -93,7 +93,7 @@ public class UserApi {
|
||||
HttpResponse.BodyHandlers.ofInputStream());
|
||||
if (memberVarResponseInterceptor != null) {
|
||||
memberVarResponseInterceptor.accept(localVarResponse);
|
||||
}
|
||||
}
|
||||
if (localVarResponse.statusCode()/ 100 != 2) {
|
||||
throw new ApiException(localVarResponse.statusCode(),
|
||||
"createUser call received non-success response",
|
||||
@@ -143,7 +143,7 @@ public class UserApi {
|
||||
HttpResponse.BodyHandlers.ofInputStream());
|
||||
if (memberVarResponseInterceptor != null) {
|
||||
memberVarResponseInterceptor.accept(localVarResponse);
|
||||
}
|
||||
}
|
||||
if (localVarResponse.statusCode()/ 100 != 2) {
|
||||
throw new ApiException(localVarResponse.statusCode(),
|
||||
"createUsersWithArrayInput call received non-success response",
|
||||
@@ -193,7 +193,7 @@ public class UserApi {
|
||||
HttpResponse.BodyHandlers.ofInputStream());
|
||||
if (memberVarResponseInterceptor != null) {
|
||||
memberVarResponseInterceptor.accept(localVarResponse);
|
||||
}
|
||||
}
|
||||
if (localVarResponse.statusCode()/ 100 != 2) {
|
||||
throw new ApiException(localVarResponse.statusCode(),
|
||||
"createUsersWithListInput call received non-success response",
|
||||
@@ -242,7 +242,7 @@ public class UserApi {
|
||||
HttpResponse.BodyHandlers.ofInputStream());
|
||||
if (memberVarResponseInterceptor != null) {
|
||||
memberVarResponseInterceptor.accept(localVarResponse);
|
||||
}
|
||||
}
|
||||
if (localVarResponse.statusCode()/ 100 != 2) {
|
||||
throw new ApiException(localVarResponse.statusCode(),
|
||||
"deleteUser call received non-success response",
|
||||
@@ -292,7 +292,7 @@ public class UserApi {
|
||||
HttpResponse.BodyHandlers.ofInputStream());
|
||||
if (memberVarResponseInterceptor != null) {
|
||||
memberVarResponseInterceptor.accept(localVarResponse);
|
||||
}
|
||||
}
|
||||
if (localVarResponse.statusCode()/ 100 != 2) {
|
||||
throw new ApiException(localVarResponse.statusCode(),
|
||||
"getUserByName call received non-success response",
|
||||
@@ -357,7 +357,7 @@ public class UserApi {
|
||||
HttpResponse.BodyHandlers.ofInputStream());
|
||||
if (memberVarResponseInterceptor != null) {
|
||||
memberVarResponseInterceptor.accept(localVarResponse);
|
||||
}
|
||||
}
|
||||
if (localVarResponse.statusCode()/ 100 != 2) {
|
||||
throw new ApiException(localVarResponse.statusCode(),
|
||||
"loginUser call received non-success response",
|
||||
@@ -401,7 +401,7 @@ public class UserApi {
|
||||
HttpResponse.BodyHandlers.ofInputStream());
|
||||
if (memberVarResponseInterceptor != null) {
|
||||
memberVarResponseInterceptor.accept(localVarResponse);
|
||||
}
|
||||
}
|
||||
if (localVarResponse.statusCode()/ 100 != 2) {
|
||||
throw new ApiException(localVarResponse.statusCode(),
|
||||
"logoutUser call received non-success response",
|
||||
@@ -457,7 +457,7 @@ public class UserApi {
|
||||
HttpResponse.BodyHandlers.ofInputStream());
|
||||
if (memberVarResponseInterceptor != null) {
|
||||
memberVarResponseInterceptor.accept(localVarResponse);
|
||||
}
|
||||
}
|
||||
if (localVarResponse.statusCode()/ 100 != 2) {
|
||||
throw new ApiException(localVarResponse.statusCode(),
|
||||
"updateUser call received non-success response",
|
||||
|
||||
@@ -170,9 +170,9 @@ public class FakeApiTest {
|
||||
}
|
||||
|
||||
/**
|
||||
* Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||
* Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||
*
|
||||
* Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||
* Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||
*
|
||||
* @throws ApiException
|
||||
* if the Api call fails
|
||||
@@ -237,7 +237,16 @@ public class FakeApiTest {
|
||||
Integer stringGroup = null;
|
||||
Boolean booleanGroup = null;
|
||||
Long int64Group = null;
|
||||
api.testGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group);
|
||||
|
||||
FakeApi.APItestGroupParametersRequest request = FakeApi.APItestGroupParametersRequest.newBuilder()
|
||||
.requiredStringGroup(requiredStringGroup)
|
||||
.requiredBooleanGroup(requiredBooleanGroup)
|
||||
.requiredInt64Group(requiredInt64Group)
|
||||
.stringGroup(stringGroup)
|
||||
.booleanGroup(booleanGroup)
|
||||
.int64Group(int64Group)
|
||||
.build();
|
||||
api.testGroupParameters(request);
|
||||
|
||||
// TODO: test validations
|
||||
}
|
||||
@@ -275,4 +284,24 @@ public class FakeApiTest {
|
||||
// TODO: test validations
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* To test the collection format in query parameters
|
||||
*
|
||||
* @throws ApiException
|
||||
* if the Api call fails
|
||||
*/
|
||||
@Test
|
||||
public void testQueryParameterCollectionFormatTest() throws ApiException {
|
||||
List<String> pipe = null;
|
||||
List<String> ioutil = null;
|
||||
List<String> http = null;
|
||||
List<String> url = null;
|
||||
List<String> context = null;
|
||||
api.testQueryParameterCollectionFormat(pipe, ioutil, http, url, context);
|
||||
|
||||
// TODO: test validations
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user