mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-12-19 00:27:07 +00:00
Fix UUID default value cast exception (swift5) (#16436)
This commit is contained in:
@@ -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:
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user