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

@@ -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");

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

View File

@@ -2,6 +2,7 @@ package org.openapitools.client.api;
import org.openapitools.client.ApiClient;
import org.openapitools.client.model.Client;
import java.util.UUID;
import io.vertx.core.AsyncResult;
import io.vertx.core.Handler;
import io.vertx.core.json.JsonObject;
@@ -10,8 +11,8 @@ import java.util.*;
public interface AnotherFakeApi {
void call123testSpecialTags(Client body, Handler<AsyncResult<Client>> handler);
void call123testSpecialTags(UUID uuidTest, Client body, Handler<AsyncResult<Client>> handler);
void call123testSpecialTags(Client body, ApiClient.AuthInfo authInfo, Handler<AsyncResult<Client>> handler);
void call123testSpecialTags(UUID uuidTest, Client body, ApiClient.AuthInfo authInfo, Handler<AsyncResult<Client>> handler);
}

View File

@@ -1,6 +1,7 @@
package org.openapitools.client.api;
import org.openapitools.client.model.Client;
import java.util.UUID;
import io.vertx.core.AsyncResult;
import io.vertx.core.Handler;
@@ -43,23 +44,31 @@ public class AnotherFakeApiImpl implements 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)
* @param resultHandler Asynchronous result handler
*/
public void call123testSpecialTags(Client body, Handler<AsyncResult<Client>> resultHandler) {
call123testSpecialTags(body, null, resultHandler);
public void call123testSpecialTags(UUID uuidTest, Client body, Handler<AsyncResult<Client>> resultHandler) {
call123testSpecialTags(uuidTest, body, null, resultHandler);
}
/**
* 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)
* @param authInfo per call authentication override.
* @param resultHandler Asynchronous result handler
*/
public void call123testSpecialTags(Client body, ApiClient.AuthInfo authInfo, Handler<AsyncResult<Client>> resultHandler) {
public void call123testSpecialTags(UUID uuidTest, Client body, ApiClient.AuthInfo authInfo, Handler<AsyncResult<Client>> resultHandler) {
Object localVarBody = body;
// verify the required parameter 'uuidTest' is set
if (uuidTest == null) {
resultHandler.handle(ApiException.fail(400, "Missing the required parameter 'uuidTest' when calling call123testSpecialTags"));
return;
}
// verify the required parameter 'body' is set
if (body == null) {
resultHandler.handle(ApiException.fail(400, "Missing the required parameter 'body' when calling call123testSpecialTags"));
@@ -74,7 +83,9 @@ public class AnotherFakeApiImpl implements AnotherFakeApi {
// header params
MultiMap localVarHeaderParams = MultiMap.caseInsensitiveMultiMap();
if (uuidTest != null)
localVarHeaderParams.add("uuid_test", apiClient.parameterToString(uuidTest));
// cookie params
MultiMap localVarCookieParams = MultiMap.caseInsensitiveMultiMap();

View File

@@ -1,6 +1,7 @@
package org.openapitools.client.api.rxjava;
import org.openapitools.client.model.Client;
import java.util.UUID;
import org.openapitools.client.ApiClient;
import java.util.*;
@@ -25,46 +26,50 @@ 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)
* @param resultHandler Asynchronous result handler
*/
public void call123testSpecialTags(Client body, Handler<AsyncResult<Client>> resultHandler) {
delegate.call123testSpecialTags(body, resultHandler);
public void call123testSpecialTags(UUID uuidTest, Client body, Handler<AsyncResult<Client>> resultHandler) {
delegate.call123testSpecialTags(uuidTest, body, resultHandler);
}
/**
* 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)
* @param authInfo call specific auth overrides
* @param resultHandler Asynchronous result handler
*/
public void call123testSpecialTags(Client body, ApiClient.AuthInfo authInfo, Handler<AsyncResult<Client>> resultHandler) {
delegate.call123testSpecialTags(body, authInfo, resultHandler);
public void call123testSpecialTags(UUID uuidTest, Client body, ApiClient.AuthInfo authInfo, Handler<AsyncResult<Client>> resultHandler) {
delegate.call123testSpecialTags(uuidTest, body, authInfo, resultHandler);
}
/**
* 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 Asynchronous result handler (RxJava Single)
*/
public Single<Client> rxCall123testSpecialTags(Client body) {
public Single<Client> rxCall123testSpecialTags(UUID uuidTest, Client body) {
return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut ->
delegate.call123testSpecialTags(body, fut)
delegate.call123testSpecialTags(uuidTest, body, fut)
));
}
/**
* 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)
* @param authInfo call specific auth overrides
* @return Asynchronous result handler (RxJava Single)
*/
public Single<Client> rxCall123testSpecialTags(Client body, ApiClient.AuthInfo authInfo) {
public Single<Client> rxCall123testSpecialTags(UUID uuidTest, Client body, ApiClient.AuthInfo authInfo) {
return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut ->
delegate.call123testSpecialTags(body, authInfo, fut)
delegate.call123testSpecialTags(uuidTest, body, authInfo, fut)
));
}