mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-12-11 07:32:48 +00:00
Better allOf handling in fromProperty (#15035)
* fix allOf handling in fromProperty * add null check, update samples * update dart generator to handle allof with a single ref
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
| Name | Type | Description | Notes |
|
||||
|------------ | ------------- | ------------- | -------------|
|
||||
|**username** | **String** | | [optional] |
|
||||
|**singleRefType** | [**SingleRefType**](SingleRefType.md) | | [optional] |
|
||||
|**singleRefType** | **SingleRefType** | | [optional] |
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -180,7 +180,12 @@ public class AllOfWithSingleRef {
|
||||
|
||||
// add `SingleRefType` to the URL query string
|
||||
if (getSingleRefType() != null) {
|
||||
joiner.add(getSingleRefType().toUrlQueryString(prefix + "SingleRefType" + suffix));
|
||||
try {
|
||||
joiner.add(String.format("%sSingleRefType%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getSingleRefType()), "UTF-8").replaceAll("\\+", "%20")));
|
||||
} catch (UnsupportedEncodingException e) {
|
||||
// Should never happen, UTF-8 is always supported
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
return joiner.toString();
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
| Name | Type | Description | Notes |
|
||||
|------------ | ------------- | ------------- | -------------|
|
||||
|**username** | **String** | | [optional] |
|
||||
|**singleRefType** | [**SingleRefType**](SingleRefType.md) | | [optional] |
|
||||
|**singleRefType** | **SingleRefType** | | [optional] |
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
| Name | Type | Description | Notes |
|
||||
|------------ | ------------- | ------------- | -------------|
|
||||
|**username** | **String** | | [optional] |
|
||||
|**singleRefType** | [**SingleRefType**](SingleRefType.md) | | [optional] |
|
||||
|**singleRefType** | **SingleRefType** | | [optional] |
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user