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

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

@@ -9,7 +9,7 @@ All URIs are relative to *http://petstore.swagger.io:80/v2*
<a id="call123testSpecialTags"></a>
# **call123testSpecialTags**
> Client call123testSpecialTags(body)
> Client call123testSpecialTags(uuidTest, body)
To test special tags
@@ -27,6 +27,7 @@ AnotherFakeApi api = ApiClient.api(ApiClient.Config.apiConfig().withReqSpecSuppl
.setBaseUri("http://petstore.swagger.io:80/v2"))).anotherFake();
api.call123testSpecialTags()
.uuidTestHeader(uuidTest)
.body(body).execute(r -> r.prettyPeek());
```
@@ -34,6 +35,7 @@ api.call123testSpecialTags()
| Name | Type | Description | Notes |
|------------- | ------------- | ------------- | -------------|
| **uuidTest** | **UUID**| to test uuid example value | |
| **body** | [**Client**](Client.md)| client model | |
### Return type

View File

@@ -15,6 +15,7 @@ package org.openapitools.client.api;
import com.google.gson.reflect.TypeToken;
import org.openapitools.client.model.Client;
import java.util.UUID;
import java.util.ArrayList;
import java.util.Arrays;
@@ -79,6 +80,7 @@ public class AnotherFakeApi {
* To test special tags
* To test special tags and operation ID starting with number
*
* @see #uuidTestHeader to test uuid example value (required)
* @see #body client model (required)
* return Client
*/
@@ -127,6 +129,17 @@ public class AnotherFakeApi {
return this;
}
public static final String UUID_TEST_HEADER = "uuid_test";
/**
* @param uuidTest (UUID) to test uuid example value (required)
* @return operation
*/
public Call123testSpecialTagsOper uuidTestHeader(String uuidTest) {
reqSpec.addHeader(UUID_TEST_HEADER, uuidTest);
return this;
}
/**
* Customize request specification
* @param reqSpecCustomizer consumer to modify the RequestSpecBuilder