[Java] Use Fully Qualified Name for java.util.Locale in Generated Classes (#22342)

* Remove Imports of `Locale` from all `model.mustache`-files

Signed-off-by: Chrimle <28791817+Chrimle@users.noreply.github.com>

* Remove Imports of `Locale` from all `modelEnum.mustache`-files

Signed-off-by: Chrimle <28791817+Chrimle@users.noreply.github.com>

* Remove Imports of `Locale` from all `oneof_model.mustache`-files

Signed-off-by: Chrimle <28791817+Chrimle@users.noreply.github.com>

* Remove Imports of `Locale` from all `api.mustache`-files

Signed-off-by: Chrimle <28791817+Chrimle@users.noreply.github.com>

* Remove Imports of `Locale` from all `anyof_model.mustache`-files

Signed-off-by: Chrimle <28791817+Chrimle@users.noreply.github.com>

* Remove Imports of `Locale` from all `pojo.mustache`-files

Signed-off-by: Chrimle <28791817+Chrimle@users.noreply.github.com>

* Remove Imports of `Locale` from all `ApiClient.mustache`-files

Signed-off-by: Chrimle <28791817+Chrimle@users.noreply.github.com>

* Remove Imports of `Locale` from all `ApiKeyAuth.mustache`-files

Signed-off-by: Chrimle <28791817+Chrimle@users.noreply.github.com>

* Remove Imports of `Locale` from all `JSON.mustache`-files

Signed-off-by: Chrimle <28791817+Chrimle@users.noreply.github.com>

* Remove Imports of `Locale` from all `HttpSignatureAuth.mustache`-files

Signed-off-by: Chrimle <28791817+Chrimle@users.noreply.github.com>

* Remove Imports of `Locale` from all `Play24CallFactory.mustache`-files

Signed-off-by: Chrimle <28791817+Chrimle@users.noreply.github.com>

* Remove Imports of `Locale` from all `Play25CallFactory.mustache`-files

Signed-off-by: Chrimle <28791817+Chrimle@users.noreply.github.com>

* Remove Imports of `Locale` from all `Play26CallFactory.mustache`-files

Signed-off-by: Chrimle <28791817+Chrimle@users.noreply.github.com>

* Remove Imports of `Locale` from all `apiException.mustache`-files

Signed-off-by: Chrimle <28791817+Chrimle@users.noreply.github.com>

* Remove Imports of `Locale` from all `clientConfiguration.mustache`-files

Signed-off-by: Chrimle <28791817+Chrimle@users.noreply.github.com>

* Remove Imports of `Locale` from all `RequestFactory.mustache`-files

Signed-off-by: Chrimle <28791817+Chrimle@users.noreply.github.com>

* Remove Imports of `Locale` from all `httpLoggingFilter.mustache`-files

Signed-off-by: Chrimle <28791817+Chrimle@users.noreply.github.com>

* Remove Imports of `Locale` from all `securityApiUtils.mustache`-files

Signed-off-by: Chrimle <28791817+Chrimle@users.noreply.github.com>

* Remove Imports of `Locale` from all `validatorUtils.mustache`-files

Signed-off-by: Chrimle <28791817+Chrimle@users.noreply.github.com>

* Use `Locale`-class Via Fully Qualified Name

Signed-off-by: Chrimle <28791817+Chrimle@users.noreply.github.com>

* Update Generated 'sample'-files

Signed-off-by: Chrimle <28791817+Chrimle@users.noreply.github.com>

* Revert Changes

* Inline `Locale` Imports

Signed-off-by: Chrimle <28791817+Chrimle@users.noreply.github.com>

* Update Generated 'source' Files

Signed-off-by: Chrimle <28791817+Chrimle@users.noreply.github.com>

* Update `kotlin-spring/model.mustache`

Signed-off-by: Chrimle <28791817+Chrimle@users.noreply.github.com>

* Update Generated 'sample' Files

Signed-off-by: Chrimle <28791817+Chrimle@users.noreply.github.com>

* Update Generated 'sample' Files

Signed-off-by: Chrimle <28791817+Chrimle@users.noreply.github.com>

* Update Generated 'java-feign-hc5' Sample Files

Signed-off-by: Chrimle <28791817+Chrimle@users.noreply.github.com>

* Update Generated Sample Files

Signed-off-by: Chrimle <28791817+Chrimle@users.noreply.github.com>

* Update Generated Kotlin Sample Files

Signed-off-by: Chrimle <28791817+Chrimle@users.noreply.github.com>

---------

Signed-off-by: Chrimle <28791817+Chrimle@users.noreply.github.com>
This commit is contained in:
Christopher Molin
2025-12-17 08:15:32 +01:00
committed by GitHub
parent e1edb9e645
commit 149fdcb61f
2627 changed files with 2442 additions and 5489 deletions

View File

@@ -56,7 +56,6 @@ import java.util.ArrayList;
import java.util.Date;
import java.util.function.Supplier;
import java.util.TimeZone;
import java.util.Locale;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -847,7 +846,7 @@ public class ApiClient extends JavaTimeFormatter {
if (serverIndex != null) {
if (serverIndex < 0 || serverIndex >= servers.size()) {
throw new ArrayIndexOutOfBoundsException(String.format(
Locale.ROOT,
java.util.Locale.ROOT,
"Invalid index %d when selecting the host settings. Must be less than %d", serverIndex, servers.size()
));
}

View File

@@ -26,7 +26,6 @@ import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.StringJoiner;

View File

@@ -30,7 +30,6 @@ import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.StringJoiner;

View File

@@ -27,7 +27,6 @@ import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.StringJoiner;

View File

@@ -27,7 +27,6 @@ import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.StringJoiner;

View File

@@ -27,7 +27,6 @@ import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.StringJoiner;

View File

@@ -33,7 +33,6 @@ import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.StringJoiner;

View File

@@ -15,7 +15,6 @@ package org.openapitools.client.model;
import java.util.Objects;
import java.util.Arrays;
import java.util.Locale;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
@@ -171,7 +170,7 @@ public class Bird {
// add `size` to the URL query string
if (getSize() != null) {
try {
joiner.add(String.format(Locale.ROOT, "%ssize%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getSize()), "UTF-8").replaceAll("\\+", "%20")));
joiner.add(String.format(java.util.Locale.ROOT, "%ssize%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getSize()), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
@@ -181,7 +180,7 @@ public class Bird {
// add `color` to the URL query string
if (getColor() != null) {
try {
joiner.add(String.format(Locale.ROOT, "%scolor%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getColor()), "UTF-8").replaceAll("\\+", "%20")));
joiner.add(String.format(java.util.Locale.ROOT, "%scolor%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getColor()), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);

View File

@@ -15,7 +15,6 @@ package org.openapitools.client.model;
import java.util.Objects;
import java.util.Arrays;
import java.util.Locale;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
@@ -171,7 +170,7 @@ public class Category {
// add `id` to the URL query string
if (getId() != null) {
try {
joiner.add(String.format(Locale.ROOT, "%sid%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getId()), "UTF-8").replaceAll("\\+", "%20")));
joiner.add(String.format(java.util.Locale.ROOT, "%sid%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getId()), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
@@ -181,7 +180,7 @@ public class Category {
// add `name` to the URL query string
if (getName() != null) {
try {
joiner.add(String.format(Locale.ROOT, "%sname%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getName()), "UTF-8").replaceAll("\\+", "%20")));
joiner.add(String.format(java.util.Locale.ROOT, "%sname%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getName()), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);

View File

@@ -15,7 +15,6 @@ package org.openapitools.client.model;
import java.util.Objects;
import java.util.Arrays;
import java.util.Locale;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
@@ -223,7 +222,7 @@ public class DataQuery extends Query {
// add `id` to the URL query string
if (getId() != null) {
try {
joiner.add(String.format(Locale.ROOT, "%sid%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getId()), "UTF-8").replaceAll("\\+", "%20")));
joiner.add(String.format(java.util.Locale.ROOT, "%sid%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getId()), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
@@ -234,8 +233,8 @@ public class DataQuery extends Query {
if (getOutcomes() != null) {
for (int i = 0; i < getOutcomes().size(); i++) {
try {
joiner.add(String.format(Locale.ROOT, "%soutcomes%s%s=%s", prefix, suffix,
"".equals(suffix) ? "" : String.format(Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix),
joiner.add(String.format(java.util.Locale.ROOT, "%soutcomes%s%s=%s", prefix, suffix,
"".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix),
URLEncoder.encode(String.valueOf(getOutcomes().get(i)), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
@@ -247,7 +246,7 @@ public class DataQuery extends Query {
// add `suffix` to the URL query string
if (getSuffix() != null) {
try {
joiner.add(String.format(Locale.ROOT, "%ssuffix%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getSuffix()), "UTF-8").replaceAll("\\+", "%20")));
joiner.add(String.format(java.util.Locale.ROOT, "%ssuffix%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getSuffix()), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
@@ -257,7 +256,7 @@ public class DataQuery extends Query {
// add `text` to the URL query string
if (getText() != null) {
try {
joiner.add(String.format(Locale.ROOT, "%stext%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getText()), "UTF-8").replaceAll("\\+", "%20")));
joiner.add(String.format(java.util.Locale.ROOT, "%stext%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getText()), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
@@ -267,7 +266,7 @@ public class DataQuery extends Query {
// add `date` to the URL query string
if (getDate() != null) {
try {
joiner.add(String.format(Locale.ROOT, "%sdate%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDate()), "UTF-8").replaceAll("\\+", "%20")));
joiner.add(String.format(java.util.Locale.ROOT, "%sdate%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDate()), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);

View File

@@ -15,7 +15,6 @@ package org.openapitools.client.model;
import java.util.Objects;
import java.util.Arrays;
import java.util.Locale;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
@@ -509,8 +508,8 @@ public class DefaultValue {
for (int i = 0; i < getArrayStringEnumRefDefault().size(); i++) {
if (getArrayStringEnumRefDefault().get(i) != null) {
try {
joiner.add(String.format(Locale.ROOT, "%sarray_string_enum_ref_default%s%s=%s", prefix, suffix,
"".equals(suffix) ? "" : String.format(Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix),
joiner.add(String.format(java.util.Locale.ROOT, "%sarray_string_enum_ref_default%s%s=%s", prefix, suffix,
"".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix),
URLEncoder.encode(String.valueOf(getArrayStringEnumRefDefault().get(i)), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
@@ -524,8 +523,8 @@ public class DefaultValue {
if (getArrayStringEnumDefault() != null) {
for (int i = 0; i < getArrayStringEnumDefault().size(); i++) {
try {
joiner.add(String.format(Locale.ROOT, "%sarray_string_enum_default%s%s=%s", prefix, suffix,
"".equals(suffix) ? "" : String.format(Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix),
joiner.add(String.format(java.util.Locale.ROOT, "%sarray_string_enum_default%s%s=%s", prefix, suffix,
"".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix),
URLEncoder.encode(String.valueOf(getArrayStringEnumDefault().get(i)), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
@@ -538,8 +537,8 @@ public class DefaultValue {
if (getArrayStringDefault() != null) {
for (int i = 0; i < getArrayStringDefault().size(); i++) {
try {
joiner.add(String.format(Locale.ROOT, "%sarray_string_default%s%s=%s", prefix, suffix,
"".equals(suffix) ? "" : String.format(Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix),
joiner.add(String.format(java.util.Locale.ROOT, "%sarray_string_default%s%s=%s", prefix, suffix,
"".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix),
URLEncoder.encode(String.valueOf(getArrayStringDefault().get(i)), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
@@ -552,8 +551,8 @@ public class DefaultValue {
if (getArrayIntegerDefault() != null) {
for (int i = 0; i < getArrayIntegerDefault().size(); i++) {
try {
joiner.add(String.format(Locale.ROOT, "%sarray_integer_default%s%s=%s", prefix, suffix,
"".equals(suffix) ? "" : String.format(Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix),
joiner.add(String.format(java.util.Locale.ROOT, "%sarray_integer_default%s%s=%s", prefix, suffix,
"".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix),
URLEncoder.encode(String.valueOf(getArrayIntegerDefault().get(i)), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
@@ -566,8 +565,8 @@ public class DefaultValue {
if (getArrayString() != null) {
for (int i = 0; i < getArrayString().size(); i++) {
try {
joiner.add(String.format(Locale.ROOT, "%sarray_string%s%s=%s", prefix, suffix,
"".equals(suffix) ? "" : String.format(Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix),
joiner.add(String.format(java.util.Locale.ROOT, "%sarray_string%s%s=%s", prefix, suffix,
"".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix),
URLEncoder.encode(String.valueOf(getArrayString().get(i)), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
@@ -580,8 +579,8 @@ public class DefaultValue {
if (getArrayStringNullable() != null) {
for (int i = 0; i < getArrayStringNullable().size(); i++) {
try {
joiner.add(String.format(Locale.ROOT, "%sarray_string_nullable%s%s=%s", prefix, suffix,
"".equals(suffix) ? "" : String.format(Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix),
joiner.add(String.format(java.util.Locale.ROOT, "%sarray_string_nullable%s%s=%s", prefix, suffix,
"".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix),
URLEncoder.encode(String.valueOf(getArrayStringNullable().get(i)), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
@@ -594,8 +593,8 @@ public class DefaultValue {
if (getArrayStringExtensionNullable() != null) {
for (int i = 0; i < getArrayStringExtensionNullable().size(); i++) {
try {
joiner.add(String.format(Locale.ROOT, "%sarray_string_extension_nullable%s%s=%s", prefix, suffix,
"".equals(suffix) ? "" : String.format(Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix),
joiner.add(String.format(java.util.Locale.ROOT, "%sarray_string_extension_nullable%s%s=%s", prefix, suffix,
"".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix),
URLEncoder.encode(String.valueOf(getArrayStringExtensionNullable().get(i)), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
@@ -607,7 +606,7 @@ public class DefaultValue {
// add `string_nullable` to the URL query string
if (getStringNullable() != null) {
try {
joiner.add(String.format(Locale.ROOT, "%sstring_nullable%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getStringNullable()), "UTF-8").replaceAll("\\+", "%20")));
joiner.add(String.format(java.util.Locale.ROOT, "%sstring_nullable%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getStringNullable()), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);

View File

@@ -15,7 +15,6 @@ package org.openapitools.client.model;
import java.util.Objects;
import java.util.Arrays;
import java.util.Locale;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
@@ -206,7 +205,7 @@ public class NumberPropertiesOnly {
// add `number` to the URL query string
if (getNumber() != null) {
try {
joiner.add(String.format(Locale.ROOT, "%snumber%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getNumber()), "UTF-8").replaceAll("\\+", "%20")));
joiner.add(String.format(java.util.Locale.ROOT, "%snumber%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getNumber()), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
@@ -216,7 +215,7 @@ public class NumberPropertiesOnly {
// add `float` to the URL query string
if (getFloat() != null) {
try {
joiner.add(String.format(Locale.ROOT, "%sfloat%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getFloat()), "UTF-8").replaceAll("\\+", "%20")));
joiner.add(String.format(java.util.Locale.ROOT, "%sfloat%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getFloat()), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
@@ -226,7 +225,7 @@ public class NumberPropertiesOnly {
// add `double` to the URL query string
if (getDouble() != null) {
try {
joiner.add(String.format(Locale.ROOT, "%sdouble%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDouble()), "UTF-8").replaceAll("\\+", "%20")));
joiner.add(String.format(java.util.Locale.ROOT, "%sdouble%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDouble()), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);

View File

@@ -15,7 +15,6 @@ package org.openapitools.client.model;
import java.util.Objects;
import java.util.Arrays;
import java.util.Locale;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
@@ -357,7 +356,7 @@ public class Pet {
// add `id` to the URL query string
if (getId() != null) {
try {
joiner.add(String.format(Locale.ROOT, "%sid%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getId()), "UTF-8").replaceAll("\\+", "%20")));
joiner.add(String.format(java.util.Locale.ROOT, "%sid%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getId()), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
@@ -367,7 +366,7 @@ public class Pet {
// add `name` to the URL query string
if (getName() != null) {
try {
joiner.add(String.format(Locale.ROOT, "%sname%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getName()), "UTF-8").replaceAll("\\+", "%20")));
joiner.add(String.format(java.util.Locale.ROOT, "%sname%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getName()), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
@@ -383,8 +382,8 @@ public class Pet {
if (getPhotoUrls() != null) {
for (int i = 0; i < getPhotoUrls().size(); i++) {
try {
joiner.add(String.format(Locale.ROOT, "%sphotoUrls%s%s=%s", prefix, suffix,
"".equals(suffix) ? "" : String.format(Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix),
joiner.add(String.format(java.util.Locale.ROOT, "%sphotoUrls%s%s=%s", prefix, suffix,
"".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix),
URLEncoder.encode(String.valueOf(getPhotoUrls().get(i)), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
@@ -397,8 +396,8 @@ public class Pet {
if (getTags() != null) {
for (int i = 0; i < getTags().size(); i++) {
if (getTags().get(i) != null) {
joiner.add(getTags().get(i).toUrlQueryString(String.format(Locale.ROOT, "%stags%s%s", prefix, suffix,
"".equals(suffix) ? "" : String.format(Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix))));
joiner.add(getTags().get(i).toUrlQueryString(String.format(java.util.Locale.ROOT, "%stags%s%s", prefix, suffix,
"".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix))));
}
}
}
@@ -406,7 +405,7 @@ public class Pet {
// add `status` to the URL query string
if (getStatus() != null) {
try {
joiner.add(String.format(Locale.ROOT, "%sstatus%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getStatus()), "UTF-8").replaceAll("\\+", "%20")));
joiner.add(String.format(java.util.Locale.ROOT, "%sstatus%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getStatus()), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);

View File

@@ -15,7 +15,6 @@ package org.openapitools.client.model;
import java.util.Objects;
import java.util.Arrays;
import java.util.Locale;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
@@ -219,7 +218,7 @@ public class Query {
// add `id` to the URL query string
if (getId() != null) {
try {
joiner.add(String.format(Locale.ROOT, "%sid%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getId()), "UTF-8").replaceAll("\\+", "%20")));
joiner.add(String.format(java.util.Locale.ROOT, "%sid%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getId()), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
@@ -230,8 +229,8 @@ public class Query {
if (getOutcomes() != null) {
for (int i = 0; i < getOutcomes().size(); i++) {
try {
joiner.add(String.format(Locale.ROOT, "%soutcomes%s%s=%s", prefix, suffix,
"".equals(suffix) ? "" : String.format(Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix),
joiner.add(String.format(java.util.Locale.ROOT, "%soutcomes%s%s=%s", prefix, suffix,
"".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix),
URLEncoder.encode(String.valueOf(getOutcomes().get(i)), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported

View File

@@ -15,7 +15,6 @@ package org.openapitools.client.model;
import java.util.Objects;
import java.util.Arrays;
import java.util.Locale;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.annotation.JsonTypeName;
import java.io.UnsupportedEncodingException;
@@ -24,7 +23,6 @@ import java.util.StringJoiner;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import java.util.Locale;
/**
* Gets or Sets StringEnumRef
@@ -74,7 +72,7 @@ public enum StringEnumRef {
prefix = "";
}
return String.format(Locale.ROOT, "%s=%s", prefix, this.toString());
return String.format(java.util.Locale.ROOT, "%s=%s", prefix, this.toString());
}
}

View File

@@ -15,7 +15,6 @@ package org.openapitools.client.model;
import java.util.Objects;
import java.util.Arrays;
import java.util.Locale;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
@@ -171,7 +170,7 @@ public class Tag {
// add `id` to the URL query string
if (getId() != null) {
try {
joiner.add(String.format(Locale.ROOT, "%sid%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getId()), "UTF-8").replaceAll("\\+", "%20")));
joiner.add(String.format(java.util.Locale.ROOT, "%sid%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getId()), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
@@ -181,7 +180,7 @@ public class Tag {
// add `name` to the URL query string
if (getName() != null) {
try {
joiner.add(String.format(Locale.ROOT, "%sname%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getName()), "UTF-8").replaceAll("\\+", "%20")));
joiner.add(String.format(java.util.Locale.ROOT, "%sname%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getName()), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);

View File

@@ -15,7 +15,6 @@ package org.openapitools.client.model;
import java.util.Objects;
import java.util.Arrays;
import java.util.Locale;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
@@ -140,7 +139,7 @@ public class TestFormObjectMultipartRequestMarker {
// add `name` to the URL query string
if (getName() != null) {
try {
joiner.add(String.format(Locale.ROOT, "%sname%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getName()), "UTF-8").replaceAll("\\+", "%20")));
joiner.add(String.format(java.util.Locale.ROOT, "%sname%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getName()), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);

View File

@@ -15,7 +15,6 @@ package org.openapitools.client.model;
import java.util.Objects;
import java.util.Arrays;
import java.util.Locale;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
@@ -236,7 +235,7 @@ public class TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter
// add `size` to the URL query string
if (getSize() != null) {
try {
joiner.add(String.format(Locale.ROOT, "%ssize%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getSize()), "UTF-8").replaceAll("\\+", "%20")));
joiner.add(String.format(java.util.Locale.ROOT, "%ssize%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getSize()), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
@@ -246,7 +245,7 @@ public class TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter
// add `color` to the URL query string
if (getColor() != null) {
try {
joiner.add(String.format(Locale.ROOT, "%scolor%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getColor()), "UTF-8").replaceAll("\\+", "%20")));
joiner.add(String.format(java.util.Locale.ROOT, "%scolor%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getColor()), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
@@ -256,7 +255,7 @@ public class TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter
// add `id` to the URL query string
if (getId() != null) {
try {
joiner.add(String.format(Locale.ROOT, "%sid%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getId()), "UTF-8").replaceAll("\\+", "%20")));
joiner.add(String.format(java.util.Locale.ROOT, "%sid%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getId()), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
@@ -266,7 +265,7 @@ public class TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter
// add `name` to the URL query string
if (getName() != null) {
try {
joiner.add(String.format(Locale.ROOT, "%sname%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getName()), "UTF-8").replaceAll("\\+", "%20")));
joiner.add(String.format(java.util.Locale.ROOT, "%sname%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getName()), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);

View File

@@ -15,7 +15,6 @@ package org.openapitools.client.model;
import java.util.Objects;
import java.util.Arrays;
import java.util.Locale;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
@@ -152,8 +151,8 @@ public class TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter {
if (getValues() != null) {
for (int i = 0; i < getValues().size(); i++) {
try {
joiner.add(String.format(Locale.ROOT, "%svalues%s%s=%s", prefix, suffix,
"".equals(suffix) ? "" : String.format(Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix),
joiner.add(String.format(java.util.Locale.ROOT, "%svalues%s%s=%s", prefix, suffix,
"".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix),
URLEncoder.encode(String.valueOf(getValues().get(i)), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported