Fix UUID default value cast exception (swift5) (#16436)

This commit is contained in:
William Cheng
2023-08-29 19:32:01 +08:00
committed by GitHub
parent b14f99df92
commit b1564d8002
117 changed files with 678 additions and 176 deletions

View File

@@ -116,9 +116,10 @@ public class AnotherFakeApiExample {
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
AnotherFakeApi apiInstance = new AnotherFakeApi(defaultClient);
UUID uuidTest = UUID.randomUUID(); // UUID | to test uuid example value
Client body = new Client(); // Client | client model
try {
Client result = apiInstance.call123testSpecialTags(body);
Client result = apiInstance.call123testSpecialTags(uuidTest, body);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AnotherFakeApi#call123testSpecialTags");

View File

@@ -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:

View File

@@ -10,7 +10,7 @@ All URIs are relative to *http://petstore.swagger.io:80/v2*
## call123testSpecialTags
> Client call123testSpecialTags(body)
> Client call123testSpecialTags(uuidTest, body)
To test special tags
@@ -19,6 +19,7 @@ To test special tags and operation ID starting with number
### Example
```java
import java.util.UUID;
// Import classes:
import org.openapitools.client.ApiClient;
import org.openapitools.client.ApiException;
@@ -32,9 +33,10 @@ public class Example {
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
AnotherFakeApi apiInstance = new AnotherFakeApi(defaultClient);
UUID uuidTest = UUID.randomUUID(); // UUID | to test uuid example value
Client body = new Client(); // Client | client model
try {
Client result = apiInstance.call123testSpecialTags(body);
Client result = apiInstance.call123testSpecialTags(uuidTest, body);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AnotherFakeApi#call123testSpecialTags");
@@ -52,6 +54,7 @@ public class Example {
| Name | Type | Description | Notes |
|------------- | ------------- | ------------- | -------------|
| **uuidTest** | **UUID**| to test uuid example value | |
| **body** | [**Client**](Client.md)| client model | |
### Return type

View File

@@ -9,6 +9,7 @@ import org.openapitools.client.Pair;
import javax.ws.rs.core.GenericType;
import org.openapitools.client.model.Client;
import java.util.UUID;
import java.util.ArrayList;
import java.util.HashMap;
@@ -49,6 +50,7 @@ public class AnotherFakeApi {
/**
* 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 fails to make API call
@@ -58,13 +60,14 @@ public class AnotherFakeApi {
<tr><td> 200 </td><td> successful operation </td><td> - </td></tr>
</table>
*/
public Client call123testSpecialTags(Client body) throws ApiException {
return call123testSpecialTagsWithHttpInfo(body).getData();
public Client call123testSpecialTags(UUID uuidTest, Client body) throws ApiException {
return call123testSpecialTagsWithHttpInfo(uuidTest, body).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&lt;Client&gt;
* @throws ApiException if fails to make API call
@@ -74,17 +77,24 @@ public class AnotherFakeApi {
<tr><td> 200 </td><td> successful operation </td><td> - </td></tr>
</table>
*/
public ApiResponse<Client> call123testSpecialTagsWithHttpInfo(Client body) throws ApiException {
public ApiResponse<Client> call123testSpecialTagsWithHttpInfo(UUID uuidTest, Client body) throws ApiException {
// Check required parameters
if (uuidTest == null) {
throw new ApiException(400, "Missing the required parameter 'uuidTest' when calling call123testSpecialTags");
}
if (body == null) {
throw new ApiException(400, "Missing the required parameter 'body' when calling call123testSpecialTags");
}
// Header parameters
Map<String, String> localVarHeaderParams = new LinkedHashMap<>();
localVarHeaderParams.put("uuid_test", apiClient.parameterToString(uuidTest));
String localVarAccept = apiClient.selectHeaderAccept("application/json");
String localVarContentType = apiClient.selectHeaderContentType("application/json");
GenericType<Client> localVarReturnType = new GenericType<Client>() {};
return apiClient.invokeAPI("AnotherFakeApi.call123testSpecialTags", "/another-fake/dummy", "PATCH", new ArrayList<>(), body,
new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType,
localVarHeaderParams, new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType,
null, localVarReturnType, false);
}
}