forked from loafle/openapi-generator-original
Fix UUID default value cast exception (swift5) (#16436)
This commit is contained in:
@@ -91,9 +91,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");
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -32,9 +32,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 +53,7 @@ public class Example {
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
|------------- | ------------- | ------------- | -------------|
|
||||
| **uuidTest** | **UUID**| to test uuid example value | |
|
||||
| **body** | [**Client**](Client.md)| client model | |
|
||||
|
||||
### Return type
|
||||
|
||||
@@ -8,6 +8,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;
|
||||
@@ -37,13 +38,19 @@ 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 a {@code Client}
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public Client call123testSpecialTags(Client body) throws ApiException {
|
||||
public Client call123testSpecialTags(UUID uuidTest, Client body) throws ApiException {
|
||||
Object localVarPostBody = body;
|
||||
|
||||
// verify the required parameter 'uuidTest' is set
|
||||
if (uuidTest == null) {
|
||||
throw new ApiException(400, "Missing the required parameter 'uuidTest' when calling call123testSpecialTags");
|
||||
}
|
||||
|
||||
// verify the required parameter 'body' is set
|
||||
if (body == null) {
|
||||
throw new ApiException(400, "Missing the required parameter 'body' when calling call123testSpecialTags");
|
||||
@@ -59,7 +66,9 @@ public class AnotherFakeApi {
|
||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
||||
|
||||
|
||||
|
||||
if (uuidTest != null)
|
||||
localVarHeaderParams.put("uuid_test", apiClient.parameterToString(uuidTest));
|
||||
|
||||
|
||||
|
||||
final String[] localVarAccepts = {
|
||||
|
||||
Reference in New Issue
Block a user