[Java][Client] Fix #12556 Support primitives and arrays in oneOf (#13897)

* [Java][Client] Fix #12556 Support primitives and arrays in oneOf

* Regenerate petstore samples

* Regenerate petstore test samples

* Treat 'BigDecimal' as primtive datatype

* Fix integration tests
This commit is contained in:
karzang
2023-06-29 10:46:55 +02:00
committed by GitHub
parent b2280e23f7
commit e9d98666a1
282 changed files with 4701 additions and 2670 deletions

View File

@@ -396,7 +396,7 @@ public class Example {
### Return type
[**BigDecimal**](BigDecimal.md)
**BigDecimal**
### Authorization

View File

@@ -148,15 +148,13 @@ public class ArrayOfArrayOfNumberOnly {
// add `ArrayArrayNumber` to the URL query string
if (getArrayArrayNumber() != null) {
for (int i = 0; i < getArrayArrayNumber().size(); i++) {
if (getArrayArrayNumber().get(i) != null) {
try {
joiner.add(String.format("%sArrayArrayNumber%s%s=%s", prefix, suffix,
"".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix),
URLEncoder.encode(String.valueOf(getArrayArrayNumber().get(i)), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
}
try {
joiner.add(String.format("%sArrayArrayNumber%s%s=%s", prefix, suffix,
"".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix),
URLEncoder.encode(String.valueOf(getArrayArrayNumber().get(i)), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
}
}
}

View File

@@ -148,15 +148,13 @@ public class ArrayOfNumberOnly {
// add `ArrayNumber` to the URL query string
if (getArrayNumber() != null) {
for (int i = 0; i < getArrayNumber().size(); i++) {
if (getArrayNumber().get(i) != null) {
try {
joiner.add(String.format("%sArrayNumber%s%s=%s", prefix, suffix,
"".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix),
URLEncoder.encode(String.valueOf(getArrayNumber().get(i)), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
}
try {
joiner.add(String.format("%sArrayNumber%s%s=%s", prefix, suffix,
"".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix),
URLEncoder.encode(String.valueOf(getArrayNumber().get(i)), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
}
}
}