forked from loafle/openapi-generator-original
Fix UUID default value cast exception (swift5) (#16436)
This commit is contained in:
@@ -31,6 +31,7 @@ import java.io.IOException;
|
||||
|
||||
|
||||
import org.openapitools.client.model.Client;
|
||||
import java.util.UUID;
|
||||
|
||||
import java.lang.reflect.Type;
|
||||
import java.util.ArrayList;
|
||||
@@ -77,6 +78,7 @@ public class AnotherFakeApi {
|
||||
|
||||
/**
|
||||
* Build call for call123testSpecialTags
|
||||
* @param uuidTest to test uuid example value (required)
|
||||
* @param body client model (required)
|
||||
* @param _callback Callback for upload/download progress
|
||||
* @return Call to execute
|
||||
@@ -87,7 +89,7 @@ public class AnotherFakeApi {
|
||||
<tr><td> 200 </td><td> successful operation </td><td> - </td></tr>
|
||||
</table>
|
||||
*/
|
||||
public okhttp3.Call call123testSpecialTagsCall(Client body, final ApiCallback _callback) throws ApiException {
|
||||
public okhttp3.Call call123testSpecialTagsCall(UUID uuidTest, Client body, final ApiCallback _callback) throws ApiException {
|
||||
String basePath = null;
|
||||
// Operation Servers
|
||||
String[] localBasePaths = new String[] { };
|
||||
@@ -111,6 +113,7 @@ public class AnotherFakeApi {
|
||||
Operation operation = apiOperation.getOperation();
|
||||
String localVarPath = apiOperation.getPath();
|
||||
Map<String, Object> paramMap = new HashMap<>();
|
||||
paramMap.put("uuid_test", uuidTest);
|
||||
|
||||
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
||||
List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
|
||||
@@ -141,19 +144,25 @@ public class AnotherFakeApi {
|
||||
}
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
private okhttp3.Call call123testSpecialTagsValidateBeforeCall(Client body, final ApiCallback _callback) throws ApiException {
|
||||
private okhttp3.Call call123testSpecialTagsValidateBeforeCall(UUID uuidTest, Client body, final ApiCallback _callback) throws ApiException {
|
||||
// verify the required parameter 'uuidTest' is set
|
||||
if (uuidTest == null) {
|
||||
throw new ApiException("Missing the required parameter 'uuidTest' when calling call123testSpecialTags(Async)");
|
||||
}
|
||||
|
||||
// verify the required parameter 'body' is set
|
||||
if (body == null) {
|
||||
throw new ApiException("Missing the required parameter 'body' when calling call123testSpecialTags(Async)");
|
||||
}
|
||||
|
||||
return call123testSpecialTagsCall(body, _callback);
|
||||
return call123testSpecialTagsCall(uuidTest, body, _callback);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* To test special tags
|
||||
* To test special tags and operation ID starting with number
|
||||
* @param uuidTest to test uuid example value (required)
|
||||
* @param body client model (required)
|
||||
* @return Client
|
||||
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
|
||||
@@ -163,14 +172,15 @@ public class AnotherFakeApi {
|
||||
<tr><td> 200 </td><td> successful operation </td><td> - </td></tr>
|
||||
</table>
|
||||
*/
|
||||
public Client call123testSpecialTags(Client body) throws ApiException {
|
||||
ApiResponse<Client> localVarResp = call123testSpecialTagsWithHttpInfo(body);
|
||||
public Client call123testSpecialTags(UUID uuidTest, Client body) throws ApiException {
|
||||
ApiResponse<Client> localVarResp = call123testSpecialTagsWithHttpInfo(uuidTest, body);
|
||||
return localVarResp.getData();
|
||||
}
|
||||
|
||||
/**
|
||||
* To test special tags
|
||||
* To test special tags and operation ID starting with number
|
||||
* @param uuidTest to test uuid example value (required)
|
||||
* @param body client model (required)
|
||||
* @return ApiResponse<Client>
|
||||
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
|
||||
@@ -180,8 +190,8 @@ public class AnotherFakeApi {
|
||||
<tr><td> 200 </td><td> successful operation </td><td> - </td></tr>
|
||||
</table>
|
||||
*/
|
||||
public ApiResponse<Client> call123testSpecialTagsWithHttpInfo(Client body) throws ApiException {
|
||||
okhttp3.Call localVarCall = call123testSpecialTagsValidateBeforeCall(body, null);
|
||||
public ApiResponse<Client> call123testSpecialTagsWithHttpInfo(UUID uuidTest, Client body) throws ApiException {
|
||||
okhttp3.Call localVarCall = call123testSpecialTagsValidateBeforeCall(uuidTest, body, null);
|
||||
Type localVarReturnType = new TypeToken<Client>(){}.getType();
|
||||
return localVarApiClient.execute(localVarCall, localVarReturnType);
|
||||
}
|
||||
@@ -189,6 +199,7 @@ public class AnotherFakeApi {
|
||||
/**
|
||||
* To test special tags (asynchronously)
|
||||
* To test special tags and operation ID starting with number
|
||||
* @param uuidTest to test uuid example value (required)
|
||||
* @param body client model (required)
|
||||
* @param _callback The callback to be executed when the API call finishes
|
||||
* @return The request call
|
||||
@@ -199,9 +210,9 @@ public class AnotherFakeApi {
|
||||
<tr><td> 200 </td><td> successful operation </td><td> - </td></tr>
|
||||
</table>
|
||||
*/
|
||||
public okhttp3.Call call123testSpecialTagsAsync(Client body, final ApiCallback<Client> _callback) throws ApiException {
|
||||
public okhttp3.Call call123testSpecialTagsAsync(UUID uuidTest, Client body, final ApiCallback<Client> _callback) throws ApiException {
|
||||
|
||||
okhttp3.Call localVarCall = call123testSpecialTagsValidateBeforeCall(body, _callback);
|
||||
okhttp3.Call localVarCall = call123testSpecialTagsValidateBeforeCall(uuidTest, body, _callback);
|
||||
Type localVarReturnType = new TypeToken<Client>(){}.getType();
|
||||
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
|
||||
return localVarCall;
|
||||
|
||||
@@ -1013,6 +1013,14 @@ paths:
|
||||
patch:
|
||||
description: To test special tags and operation ID starting with number
|
||||
operationId: 123_test_@#$%_special_tags
|
||||
parameters:
|
||||
- description: to test uuid example value
|
||||
in: header
|
||||
name: uuid_test
|
||||
required: true
|
||||
schema:
|
||||
format: uuid
|
||||
type: string
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
|
||||
Reference in New Issue
Block a user