forked from loafle/openapi-generator-original
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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user