Add workflow to test java apache client with jdk8 (#14437)

* add workflow to test java apache client with jdk8

* fix url encode issue with jdk8

* update samples

* minor improvements in java native client

* minor fix
This commit is contained in:
William Cheng
2023-01-12 22:12:08 +08:00
committed by GitHub
parent c2c91e2d2e
commit a584f32d68
170 changed files with 1075 additions and 409 deletions

View File

@@ -24,8 +24,8 @@ import java.util.HashMap;
import java.util.Map;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.annotation.JsonTypeName;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
import java.util.StringJoiner;
/**
@@ -167,13 +167,23 @@ public class AdditionalPropertiesClass {
// add `map_property` to the URL query string
if (getMapProperty() != null) {
for (String _key : getMapProperty().keySet()) {
joiner.add(String.format("%s[map_property][%s]=%s", prefix, getMapProperty().get(_key), URLEncoder.encode(String.valueOf(getMapProperty().get(_key)), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
try {
joiner.add(String.format("%s[map_property][%s]=%s", prefix, getMapProperty().get(_key), URLEncoder.encode(String.valueOf(getMapProperty().get(_key)), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
}
}
}
// add `map_of_map_property` to the URL query string
if (getMapOfMapProperty() != null) {
for (String _key : getMapOfMapProperty().keySet()) {
joiner.add(String.format("%s[map_of_map_property][%s]=%s", prefix, getMapOfMapProperty().get(_key), URLEncoder.encode(String.valueOf(getMapOfMapProperty().get(_key)), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
try {
joiner.add(String.format("%s[map_of_map_property][%s]=%s", prefix, getMapOfMapProperty().get(_key), URLEncoder.encode(String.valueOf(getMapOfMapProperty().get(_key)), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
}
}
}
return joiner.toString();

View File

@@ -23,8 +23,8 @@ import com.fasterxml.jackson.annotation.JsonValue;
import org.openapitools.client.model.SingleRefType;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.annotation.JsonTypeName;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
import java.util.StringJoiner;
/**
@@ -149,7 +149,12 @@ public class AllOfWithSingleRef {
StringJoiner joiner = new StringJoiner("&");
// add `username` to the URL query string
if (getUsername() != null) {
joiner.add(String.format("%s[username]=%s", prefix, URLEncoder.encode(String.valueOf(getUsername()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
try {
joiner.add(String.format("%s[username]=%s", prefix, URLEncoder.encode(String.valueOf(getUsername()), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
}
}
// add `SingleRefType` to the URL query string
if (getSingleRefType() != null) {

View File

@@ -27,8 +27,8 @@ import org.openapitools.client.model.Cat;
import org.openapitools.client.model.Dog;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.annotation.JsonTypeName;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
import java.util.StringJoiner;
/**
@@ -163,11 +163,21 @@ public class Animal {
StringJoiner joiner = new StringJoiner("&");
// add `className` to the URL query string
if (getClassName() != null) {
joiner.add(String.format("%s[className]=%s", prefix, URLEncoder.encode(String.valueOf(getClassName()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
try {
joiner.add(String.format("%s[className]=%s", prefix, URLEncoder.encode(String.valueOf(getClassName()), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
}
}
// add `color` to the URL query string
if (getColor() != null) {
joiner.add(String.format("%s[color]=%s", prefix, URLEncoder.encode(String.valueOf(getColor()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
try {
joiner.add(String.format("%s[color]=%s", prefix, URLEncoder.encode(String.valueOf(getColor()), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
}
}
return joiner.toString();
}

View File

@@ -25,8 +25,8 @@ import java.util.ArrayList;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.annotation.JsonTypeName;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
import java.util.StringJoiner;
/**
@@ -129,7 +129,12 @@ public class ArrayOfArrayOfNumberOnly {
if (getArrayArrayNumber() != null) {
for (int i = 0; i < getArrayArrayNumber().size(); i++) {
if (getArrayArrayNumber().get(i) != null) {
joiner.add(String.format("%s[ArrayArrayNumber][%d]=%s", prefix, i, URLEncoder.encode(String.valueOf(getArrayArrayNumber().get(i)), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
try {
joiner.add(String.format("%s[ArrayArrayNumber][%d]=%s", prefix, i, 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

@@ -25,8 +25,8 @@ import java.util.ArrayList;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.annotation.JsonTypeName;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
import java.util.StringJoiner;
/**
@@ -129,7 +129,12 @@ public class ArrayOfNumberOnly {
if (getArrayNumber() != null) {
for (int i = 0; i < getArrayNumber().size(); i++) {
if (getArrayNumber().get(i) != null) {
joiner.add(String.format("%s[ArrayNumber][%d]=%s", prefix, i, URLEncoder.encode(String.valueOf(getArrayNumber().get(i)), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
try {
joiner.add(String.format("%s[ArrayNumber][%d]=%s", prefix, i, 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);
}
}
}
}

View File

@@ -25,8 +25,8 @@ import java.util.List;
import org.openapitools.client.model.ReadOnlyFirst;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.annotation.JsonTypeName;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
import java.util.StringJoiner;
/**
@@ -208,20 +208,35 @@ public class ArrayTest {
// add `array_of_string` to the URL query string
if (getArrayOfString() != null) {
for (int i = 0; i < getArrayOfString().size(); i++) {
joiner.add(String.format("%s[array_of_string][%d]=%s", prefix, i, URLEncoder.encode(String.valueOf(getArrayOfString().get(i)), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
try {
joiner.add(String.format("%s[array_of_string][%d]=%s", prefix, i, URLEncoder.encode(String.valueOf(getArrayOfString().get(i)), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
}
}
}
// add `array_array_of_integer` to the URL query string
if (getArrayArrayOfInteger() != null) {
for (int i = 0; i < getArrayArrayOfInteger().size(); i++) {
joiner.add(String.format("%s[array_array_of_integer][%d]=%s", prefix, i, URLEncoder.encode(String.valueOf(getArrayArrayOfInteger().get(i)), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
try {
joiner.add(String.format("%s[array_array_of_integer][%d]=%s", prefix, i, URLEncoder.encode(String.valueOf(getArrayArrayOfInteger().get(i)), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
}
}
}
// add `array_array_of_model` to the URL query string
if (getArrayArrayOfModel() != null) {
for (int i = 0; i < getArrayArrayOfModel().size(); i++) {
if (getArrayArrayOfModel().get(i) != null) {
joiner.add(String.format("%s[array_array_of_model][%d]=%s", prefix, i, URLEncoder.encode(String.valueOf(getArrayArrayOfModel().get(i)), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
try {
joiner.add(String.format("%s[array_array_of_model][%d]=%s", prefix, i, URLEncoder.encode(String.valueOf(getArrayArrayOfModel().get(i)), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
}
}
}
}

View File

@@ -22,8 +22,8 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
import com.fasterxml.jackson.annotation.JsonValue;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.annotation.JsonTypeName;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
import java.util.StringJoiner;
/**
@@ -276,27 +276,57 @@ public class Capitalization {
StringJoiner joiner = new StringJoiner("&");
// add `smallCamel` to the URL query string
if (getSmallCamel() != null) {
joiner.add(String.format("%s[smallCamel]=%s", prefix, URLEncoder.encode(String.valueOf(getSmallCamel()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
try {
joiner.add(String.format("%s[smallCamel]=%s", prefix, URLEncoder.encode(String.valueOf(getSmallCamel()), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
}
}
// add `CapitalCamel` to the URL query string
if (getCapitalCamel() != null) {
joiner.add(String.format("%s[CapitalCamel]=%s", prefix, URLEncoder.encode(String.valueOf(getCapitalCamel()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
try {
joiner.add(String.format("%s[CapitalCamel]=%s", prefix, URLEncoder.encode(String.valueOf(getCapitalCamel()), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
}
}
// add `small_Snake` to the URL query string
if (getSmallSnake() != null) {
joiner.add(String.format("%s[small_Snake]=%s", prefix, URLEncoder.encode(String.valueOf(getSmallSnake()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
try {
joiner.add(String.format("%s[small_Snake]=%s", prefix, URLEncoder.encode(String.valueOf(getSmallSnake()), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
}
}
// add `Capital_Snake` to the URL query string
if (getCapitalSnake() != null) {
joiner.add(String.format("%s[Capital_Snake]=%s", prefix, URLEncoder.encode(String.valueOf(getCapitalSnake()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
try {
joiner.add(String.format("%s[Capital_Snake]=%s", prefix, URLEncoder.encode(String.valueOf(getCapitalSnake()), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
}
}
// add `SCA_ETH_Flow_Points` to the URL query string
if (getScAETHFlowPoints() != null) {
joiner.add(String.format("%s[SCA_ETH_Flow_Points]=%s", prefix, URLEncoder.encode(String.valueOf(getScAETHFlowPoints()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
try {
joiner.add(String.format("%s[SCA_ETH_Flow_Points]=%s", prefix, URLEncoder.encode(String.valueOf(getScAETHFlowPoints()), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
}
}
// add `ATT_NAME` to the URL query string
if (getATTNAME() != null) {
joiner.add(String.format("%s[ATT_NAME]=%s", prefix, URLEncoder.encode(String.valueOf(getATTNAME()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
try {
joiner.add(String.format("%s[ATT_NAME]=%s", prefix, URLEncoder.encode(String.valueOf(getATTNAME()), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
}
}
return joiner.toString();
}

View File

@@ -26,8 +26,8 @@ import com.fasterxml.jackson.annotation.JsonValue;
import org.openapitools.client.model.Animal;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.annotation.JsonTypeName;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
import java.util.StringJoiner;
/**
@@ -129,15 +129,30 @@ public class Cat extends Animal {
StringJoiner joiner = new StringJoiner("&");
// add `className` to the URL query string
if (getClassName() != null) {
joiner.add(String.format("%s[className]=%s", prefix, URLEncoder.encode(String.valueOf(getClassName()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
try {
joiner.add(String.format("%s[className]=%s", prefix, URLEncoder.encode(String.valueOf(getClassName()), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
}
}
// add `color` to the URL query string
if (getColor() != null) {
joiner.add(String.format("%s[color]=%s", prefix, URLEncoder.encode(String.valueOf(getColor()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
try {
joiner.add(String.format("%s[color]=%s", prefix, URLEncoder.encode(String.valueOf(getColor()), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
}
}
// add `declawed` to the URL query string
if (getDeclawed() != null) {
joiner.add(String.format("%s[declawed]=%s", prefix, URLEncoder.encode(String.valueOf(getDeclawed()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
try {
joiner.add(String.format("%s[declawed]=%s", prefix, URLEncoder.encode(String.valueOf(getDeclawed()), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
}
}
return joiner.toString();
}

View File

@@ -22,8 +22,8 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
import com.fasterxml.jackson.annotation.JsonValue;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.annotation.JsonTypeName;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
import java.util.StringJoiner;
/**
@@ -117,7 +117,12 @@ public class CatAllOf {
StringJoiner joiner = new StringJoiner("&");
// add `declawed` to the URL query string
if (getDeclawed() != null) {
joiner.add(String.format("%s[declawed]=%s", prefix, URLEncoder.encode(String.valueOf(getDeclawed()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
try {
joiner.add(String.format("%s[declawed]=%s", prefix, URLEncoder.encode(String.valueOf(getDeclawed()), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
}
}
return joiner.toString();
}

View File

@@ -22,8 +22,8 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
import com.fasterxml.jackson.annotation.JsonValue;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.annotation.JsonTypeName;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
import java.util.StringJoiner;
/**
@@ -148,11 +148,21 @@ public class Category {
StringJoiner joiner = new StringJoiner("&");
// add `id` to the URL query string
if (getId() != null) {
joiner.add(String.format("%s[id]=%s", prefix, URLEncoder.encode(String.valueOf(getId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
try {
joiner.add(String.format("%s[id]=%s", prefix, URLEncoder.encode(String.valueOf(getId()), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
}
}
// add `name` to the URL query string
if (getName() != null) {
joiner.add(String.format("%s[name]=%s", prefix, URLEncoder.encode(String.valueOf(getName()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
try {
joiner.add(String.format("%s[name]=%s", prefix, URLEncoder.encode(String.valueOf(getName()), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
}
}
return joiner.toString();
}

View File

@@ -22,8 +22,8 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
import com.fasterxml.jackson.annotation.JsonValue;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.annotation.JsonTypeName;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
import java.util.StringJoiner;
/**
@@ -116,7 +116,12 @@ public class ClassModel {
StringJoiner joiner = new StringJoiner("&");
// add `_class` to the URL query string
if (getPropertyClass() != null) {
joiner.add(String.format("%s[_class]=%s", prefix, URLEncoder.encode(String.valueOf(getPropertyClass()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
try {
joiner.add(String.format("%s[_class]=%s", prefix, URLEncoder.encode(String.valueOf(getPropertyClass()), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
}
}
return joiner.toString();
}

View File

@@ -22,8 +22,8 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
import com.fasterxml.jackson.annotation.JsonValue;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.annotation.JsonTypeName;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
import java.util.StringJoiner;
/**
@@ -116,7 +116,12 @@ public class Client {
StringJoiner joiner = new StringJoiner("&");
// add `client` to the URL query string
if (getClient() != null) {
joiner.add(String.format("%s[client]=%s", prefix, URLEncoder.encode(String.valueOf(getClient()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
try {
joiner.add(String.format("%s[client]=%s", prefix, URLEncoder.encode(String.valueOf(getClient()), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
}
}
return joiner.toString();
}

View File

@@ -22,8 +22,8 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
import com.fasterxml.jackson.annotation.JsonValue;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.annotation.JsonTypeName;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
import java.util.StringJoiner;
/**
@@ -118,7 +118,12 @@ public class DeprecatedObject {
StringJoiner joiner = new StringJoiner("&");
// add `name` to the URL query string
if (getName() != null) {
joiner.add(String.format("%s[name]=%s", prefix, URLEncoder.encode(String.valueOf(getName()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
try {
joiner.add(String.format("%s[name]=%s", prefix, URLEncoder.encode(String.valueOf(getName()), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
}
}
return joiner.toString();
}

View File

@@ -26,8 +26,8 @@ import com.fasterxml.jackson.annotation.JsonValue;
import org.openapitools.client.model.Animal;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.annotation.JsonTypeName;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
import java.util.StringJoiner;
/**
@@ -129,15 +129,30 @@ public class Dog extends Animal {
StringJoiner joiner = new StringJoiner("&");
// add `className` to the URL query string
if (getClassName() != null) {
joiner.add(String.format("%s[className]=%s", prefix, URLEncoder.encode(String.valueOf(getClassName()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
try {
joiner.add(String.format("%s[className]=%s", prefix, URLEncoder.encode(String.valueOf(getClassName()), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
}
}
// add `color` to the URL query string
if (getColor() != null) {
joiner.add(String.format("%s[color]=%s", prefix, URLEncoder.encode(String.valueOf(getColor()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
try {
joiner.add(String.format("%s[color]=%s", prefix, URLEncoder.encode(String.valueOf(getColor()), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
}
}
// add `breed` to the URL query string
if (getBreed() != null) {
joiner.add(String.format("%s[breed]=%s", prefix, URLEncoder.encode(String.valueOf(getBreed()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
try {
joiner.add(String.format("%s[breed]=%s", prefix, URLEncoder.encode(String.valueOf(getBreed()), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
}
}
return joiner.toString();
}

View File

@@ -22,8 +22,8 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
import com.fasterxml.jackson.annotation.JsonValue;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.annotation.JsonTypeName;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
import java.util.StringJoiner;
/**
@@ -117,7 +117,12 @@ public class DogAllOf {
StringJoiner joiner = new StringJoiner("&");
// add `breed` to the URL query string
if (getBreed() != null) {
joiner.add(String.format("%s[breed]=%s", prefix, URLEncoder.encode(String.valueOf(getBreed()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
try {
joiner.add(String.format("%s[breed]=%s", prefix, URLEncoder.encode(String.valueOf(getBreed()), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
}
}
return joiner.toString();
}

View File

@@ -24,8 +24,8 @@ import java.util.ArrayList;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.annotation.JsonTypeName;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
import java.util.StringJoiner;
/**
@@ -228,12 +228,22 @@ public class EnumArrays {
StringJoiner joiner = new StringJoiner("&");
// add `just_symbol` to the URL query string
if (getJustSymbol() != null) {
joiner.add(String.format("%s[just_symbol]=%s", prefix, URLEncoder.encode(String.valueOf(getJustSymbol()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
try {
joiner.add(String.format("%s[just_symbol]=%s", prefix, URLEncoder.encode(String.valueOf(getJustSymbol()), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
}
}
// add `array_enum` to the URL query string
if (getArrayEnum() != null) {
for (int i = 0; i < getArrayEnum().size(); i++) {
joiner.add(String.format("%s[array_enum][%d]=%s", prefix, i, URLEncoder.encode(String.valueOf(getArrayEnum().get(i)), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
try {
joiner.add(String.format("%s[array_enum][%d]=%s", prefix, i, URLEncoder.encode(String.valueOf(getArrayEnum().get(i)), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
}
}
}
return joiner.toString();

View File

@@ -17,8 +17,8 @@ import java.util.Objects;
import java.util.Arrays;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.annotation.JsonTypeName;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
import java.util.StringJoiner;
import com.fasterxml.jackson.annotation.JsonCreator;

View File

@@ -30,8 +30,8 @@ import org.openapitools.jackson.nullable.JsonNullable;
import java.util.NoSuchElementException;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.annotation.JsonTypeName;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
import java.util.StringJoiner;
/**
@@ -512,35 +512,75 @@ public class EnumTest {
StringJoiner joiner = new StringJoiner("&");
// add `enum_string` to the URL query string
if (getEnumString() != null) {
joiner.add(String.format("%s[enum_string]=%s", prefix, URLEncoder.encode(String.valueOf(getEnumString()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
try {
joiner.add(String.format("%s[enum_string]=%s", prefix, URLEncoder.encode(String.valueOf(getEnumString()), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
}
}
// add `enum_string_required` to the URL query string
if (getEnumStringRequired() != null) {
joiner.add(String.format("%s[enum_string_required]=%s", prefix, URLEncoder.encode(String.valueOf(getEnumStringRequired()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
try {
joiner.add(String.format("%s[enum_string_required]=%s", prefix, URLEncoder.encode(String.valueOf(getEnumStringRequired()), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
}
}
// add `enum_integer` to the URL query string
if (getEnumInteger() != null) {
joiner.add(String.format("%s[enum_integer]=%s", prefix, URLEncoder.encode(String.valueOf(getEnumInteger()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
try {
joiner.add(String.format("%s[enum_integer]=%s", prefix, URLEncoder.encode(String.valueOf(getEnumInteger()), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
}
}
// add `enum_number` to the URL query string
if (getEnumNumber() != null) {
joiner.add(String.format("%s[enum_number]=%s", prefix, URLEncoder.encode(String.valueOf(getEnumNumber()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
try {
joiner.add(String.format("%s[enum_number]=%s", prefix, URLEncoder.encode(String.valueOf(getEnumNumber()), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
}
}
// add `outerEnum` to the URL query string
if (getOuterEnum() != null) {
joiner.add(String.format("%s[outerEnum]=%s", prefix, URLEncoder.encode(String.valueOf(getOuterEnum()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
try {
joiner.add(String.format("%s[outerEnum]=%s", prefix, URLEncoder.encode(String.valueOf(getOuterEnum()), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
}
}
// add `outerEnumInteger` to the URL query string
if (getOuterEnumInteger() != null) {
joiner.add(String.format("%s[outerEnumInteger]=%s", prefix, URLEncoder.encode(String.valueOf(getOuterEnumInteger()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
try {
joiner.add(String.format("%s[outerEnumInteger]=%s", prefix, URLEncoder.encode(String.valueOf(getOuterEnumInteger()), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
}
}
// add `outerEnumDefaultValue` to the URL query string
if (getOuterEnumDefaultValue() != null) {
joiner.add(String.format("%s[outerEnumDefaultValue]=%s", prefix, URLEncoder.encode(String.valueOf(getOuterEnumDefaultValue()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
try {
joiner.add(String.format("%s[outerEnumDefaultValue]=%s", prefix, URLEncoder.encode(String.valueOf(getOuterEnumDefaultValue()), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
}
}
// add `outerEnumIntegerDefaultValue` to the URL query string
if (getOuterEnumIntegerDefaultValue() != null) {
joiner.add(String.format("%s[outerEnumIntegerDefaultValue]=%s", prefix, URLEncoder.encode(String.valueOf(getOuterEnumIntegerDefaultValue()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
try {
joiner.add(String.format("%s[outerEnumIntegerDefaultValue]=%s", prefix, URLEncoder.encode(String.valueOf(getOuterEnumIntegerDefaultValue()), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
}
}
return joiner.toString();
}

View File

@@ -25,8 +25,8 @@ import java.util.List;
import org.openapitools.client.model.ModelFile;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.annotation.JsonTypeName;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
import java.util.StringJoiner;
/**

View File

@@ -22,8 +22,8 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
import com.fasterxml.jackson.annotation.JsonValue;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.annotation.JsonTypeName;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
import java.util.StringJoiner;
/**
@@ -116,7 +116,12 @@ public class Foo {
StringJoiner joiner = new StringJoiner("&");
// add `bar` to the URL query string
if (getBar() != null) {
joiner.add(String.format("%s[bar]=%s", prefix, URLEncoder.encode(String.valueOf(getBar()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
try {
joiner.add(String.format("%s[bar]=%s", prefix, URLEncoder.encode(String.valueOf(getBar()), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
}
}
return joiner.toString();
}

View File

@@ -23,8 +23,8 @@ import com.fasterxml.jackson.annotation.JsonValue;
import org.openapitools.client.model.Foo;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.annotation.JsonTypeName;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
import java.util.StringJoiner;
/**

View File

@@ -27,8 +27,8 @@ import java.time.OffsetDateTime;
import java.util.UUID;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.annotation.JsonTypeName;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
import java.util.StringJoiner;
/**
@@ -612,67 +612,147 @@ public class FormatTest {
StringJoiner joiner = new StringJoiner("&");
// add `integer` to the URL query string
if (getInteger() != null) {
joiner.add(String.format("%s[integer]=%s", prefix, URLEncoder.encode(String.valueOf(getInteger()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
try {
joiner.add(String.format("%s[integer]=%s", prefix, URLEncoder.encode(String.valueOf(getInteger()), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
}
}
// add `int32` to the URL query string
if (getInt32() != null) {
joiner.add(String.format("%s[int32]=%s", prefix, URLEncoder.encode(String.valueOf(getInt32()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
try {
joiner.add(String.format("%s[int32]=%s", prefix, URLEncoder.encode(String.valueOf(getInt32()), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
}
}
// add `int64` to the URL query string
if (getInt64() != null) {
joiner.add(String.format("%s[int64]=%s", prefix, URLEncoder.encode(String.valueOf(getInt64()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
try {
joiner.add(String.format("%s[int64]=%s", prefix, URLEncoder.encode(String.valueOf(getInt64()), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
}
}
// add `number` to the URL query string
if (getNumber() != null) {
joiner.add(String.format("%s[number]=%s", prefix, URLEncoder.encode(String.valueOf(getNumber()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
try {
joiner.add(String.format("%s[number]=%s", prefix, URLEncoder.encode(String.valueOf(getNumber()), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
}
}
// add `float` to the URL query string
if (getFloat() != null) {
joiner.add(String.format("%s[float]=%s", prefix, URLEncoder.encode(String.valueOf(getFloat()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
try {
joiner.add(String.format("%s[float]=%s", prefix, URLEncoder.encode(String.valueOf(getFloat()), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
}
}
// add `double` to the URL query string
if (getDouble() != null) {
joiner.add(String.format("%s[double]=%s", prefix, URLEncoder.encode(String.valueOf(getDouble()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
try {
joiner.add(String.format("%s[double]=%s", prefix, URLEncoder.encode(String.valueOf(getDouble()), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
}
}
// add `decimal` to the URL query string
if (getDecimal() != null) {
joiner.add(String.format("%s[decimal]=%s", prefix, URLEncoder.encode(String.valueOf(getDecimal()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
try {
joiner.add(String.format("%s[decimal]=%s", prefix, URLEncoder.encode(String.valueOf(getDecimal()), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
}
}
// add `string` to the URL query string
if (getString() != null) {
joiner.add(String.format("%s[string]=%s", prefix, URLEncoder.encode(String.valueOf(getString()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
try {
joiner.add(String.format("%s[string]=%s", prefix, URLEncoder.encode(String.valueOf(getString()), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
}
}
// add `byte` to the URL query string
if (getByte() != null) {
joiner.add(String.format("%s[byte]=%s", prefix, URLEncoder.encode(String.valueOf(getByte()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
try {
joiner.add(String.format("%s[byte]=%s", prefix, URLEncoder.encode(String.valueOf(getByte()), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
}
}
// add `binary` to the URL query string
if (getBinary() != null) {
joiner.add(String.format("%s[binary]=%s", prefix, URLEncoder.encode(String.valueOf(getBinary()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
try {
joiner.add(String.format("%s[binary]=%s", prefix, URLEncoder.encode(String.valueOf(getBinary()), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
}
}
// add `date` to the URL query string
if (getDate() != null) {
joiner.add(String.format("%s[date]=%s", prefix, URLEncoder.encode(String.valueOf(getDate()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
try {
joiner.add(String.format("%s[date]=%s", prefix, URLEncoder.encode(String.valueOf(getDate()), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
}
}
// add `dateTime` to the URL query string
if (getDateTime() != null) {
joiner.add(String.format("%s[dateTime]=%s", prefix, URLEncoder.encode(String.valueOf(getDateTime()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
try {
joiner.add(String.format("%s[dateTime]=%s", prefix, URLEncoder.encode(String.valueOf(getDateTime()), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
}
}
// add `uuid` to the URL query string
if (getUuid() != null) {
joiner.add(String.format("%s[uuid]=%s", prefix, URLEncoder.encode(String.valueOf(getUuid()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
try {
joiner.add(String.format("%s[uuid]=%s", prefix, URLEncoder.encode(String.valueOf(getUuid()), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
}
}
// add `password` to the URL query string
if (getPassword() != null) {
joiner.add(String.format("%s[password]=%s", prefix, URLEncoder.encode(String.valueOf(getPassword()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
try {
joiner.add(String.format("%s[password]=%s", prefix, URLEncoder.encode(String.valueOf(getPassword()), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
}
}
// add `pattern_with_digits` to the URL query string
if (getPatternWithDigits() != null) {
joiner.add(String.format("%s[pattern_with_digits]=%s", prefix, URLEncoder.encode(String.valueOf(getPatternWithDigits()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
try {
joiner.add(String.format("%s[pattern_with_digits]=%s", prefix, URLEncoder.encode(String.valueOf(getPatternWithDigits()), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
}
}
// add `pattern_with_digits_and_delimiter` to the URL query string
if (getPatternWithDigitsAndDelimiter() != null) {
joiner.add(String.format("%s[pattern_with_digits_and_delimiter]=%s", prefix, URLEncoder.encode(String.valueOf(getPatternWithDigitsAndDelimiter()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
try {
joiner.add(String.format("%s[pattern_with_digits_and_delimiter]=%s", prefix, URLEncoder.encode(String.valueOf(getPatternWithDigitsAndDelimiter()), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
}
}
return joiner.toString();
}

View File

@@ -22,8 +22,8 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
import com.fasterxml.jackson.annotation.JsonValue;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.annotation.JsonTypeName;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
import java.util.StringJoiner;
/**
@@ -137,11 +137,21 @@ public class HasOnlyReadOnly {
StringJoiner joiner = new StringJoiner("&");
// add `bar` to the URL query string
if (getBar() != null) {
joiner.add(String.format("%s[bar]=%s", prefix, URLEncoder.encode(String.valueOf(getBar()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
try {
joiner.add(String.format("%s[bar]=%s", prefix, URLEncoder.encode(String.valueOf(getBar()), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
}
}
// add `foo` to the URL query string
if (getFoo() != null) {
joiner.add(String.format("%s[foo]=%s", prefix, URLEncoder.encode(String.valueOf(getFoo()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
try {
joiner.add(String.format("%s[foo]=%s", prefix, URLEncoder.encode(String.valueOf(getFoo()), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
}
}
return joiner.toString();
}

View File

@@ -26,8 +26,8 @@ import org.openapitools.jackson.nullable.JsonNullable;
import java.util.NoSuchElementException;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.annotation.JsonTypeName;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
import java.util.StringJoiner;
/**
@@ -139,7 +139,12 @@ public class HealthCheckResult {
StringJoiner joiner = new StringJoiner("&");
// add `NullableMessage` to the URL query string
if (getNullableMessage() != null) {
joiner.add(String.format("%s[NullableMessage]=%s", prefix, URLEncoder.encode(String.valueOf(getNullableMessage()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
try {
joiner.add(String.format("%s[NullableMessage]=%s", prefix, URLEncoder.encode(String.valueOf(getNullableMessage()), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
}
}
return joiner.toString();
}

View File

@@ -24,8 +24,8 @@ import java.util.HashMap;
import java.util.Map;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.annotation.JsonTypeName;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
import java.util.StringJoiner;
/**
@@ -282,25 +282,45 @@ public class MapTest {
// add `map_map_of_string` to the URL query string
if (getMapMapOfString() != null) {
for (String _key : getMapMapOfString().keySet()) {
joiner.add(String.format("%s[map_map_of_string][%s]=%s", prefix, getMapMapOfString().get(_key), URLEncoder.encode(String.valueOf(getMapMapOfString().get(_key)), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
try {
joiner.add(String.format("%s[map_map_of_string][%s]=%s", prefix, getMapMapOfString().get(_key), URLEncoder.encode(String.valueOf(getMapMapOfString().get(_key)), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
}
}
}
// add `map_of_enum_string` to the URL query string
if (getMapOfEnumString() != null) {
for (String _key : getMapOfEnumString().keySet()) {
joiner.add(String.format("%s[map_of_enum_string][%s]=%s", prefix, getMapOfEnumString().get(_key), URLEncoder.encode(String.valueOf(getMapOfEnumString().get(_key)), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
try {
joiner.add(String.format("%s[map_of_enum_string][%s]=%s", prefix, getMapOfEnumString().get(_key), URLEncoder.encode(String.valueOf(getMapOfEnumString().get(_key)), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
}
}
}
// add `direct_map` to the URL query string
if (getDirectMap() != null) {
for (String _key : getDirectMap().keySet()) {
joiner.add(String.format("%s[direct_map][%s]=%s", prefix, getDirectMap().get(_key), URLEncoder.encode(String.valueOf(getDirectMap().get(_key)), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
try {
joiner.add(String.format("%s[direct_map][%s]=%s", prefix, getDirectMap().get(_key), URLEncoder.encode(String.valueOf(getDirectMap().get(_key)), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
}
}
}
// add `indirect_map` to the URL query string
if (getIndirectMap() != null) {
for (String _key : getIndirectMap().keySet()) {
joiner.add(String.format("%s[indirect_map][%s]=%s", prefix, getIndirectMap().get(_key), URLEncoder.encode(String.valueOf(getIndirectMap().get(_key)), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
try {
joiner.add(String.format("%s[indirect_map][%s]=%s", prefix, getIndirectMap().get(_key), URLEncoder.encode(String.valueOf(getIndirectMap().get(_key)), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
}
}
}
return joiner.toString();

View File

@@ -27,8 +27,8 @@ import java.util.UUID;
import org.openapitools.client.model.Animal;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.annotation.JsonTypeName;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
import java.util.StringJoiner;
/**
@@ -193,11 +193,21 @@ public class MixedPropertiesAndAdditionalPropertiesClass {
StringJoiner joiner = new StringJoiner("&");
// add `uuid` to the URL query string
if (getUuid() != null) {
joiner.add(String.format("%s[uuid]=%s", prefix, URLEncoder.encode(String.valueOf(getUuid()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
try {
joiner.add(String.format("%s[uuid]=%s", prefix, URLEncoder.encode(String.valueOf(getUuid()), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
}
}
// add `dateTime` to the URL query string
if (getDateTime() != null) {
joiner.add(String.format("%s[dateTime]=%s", prefix, URLEncoder.encode(String.valueOf(getDateTime()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
try {
joiner.add(String.format("%s[dateTime]=%s", prefix, URLEncoder.encode(String.valueOf(getDateTime()), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
}
}
// add `map` to the URL query string
if (getMap() != null) {

View File

@@ -22,8 +22,8 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
import com.fasterxml.jackson.annotation.JsonValue;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.annotation.JsonTypeName;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
import java.util.StringJoiner;
/**
@@ -149,11 +149,21 @@ public class Model200Response {
StringJoiner joiner = new StringJoiner("&");
// add `name` to the URL query string
if (getName() != null) {
joiner.add(String.format("%s[name]=%s", prefix, URLEncoder.encode(String.valueOf(getName()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
try {
joiner.add(String.format("%s[name]=%s", prefix, URLEncoder.encode(String.valueOf(getName()), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
}
}
// add `class` to the URL query string
if (getPropertyClass() != null) {
joiner.add(String.format("%s[class]=%s", prefix, URLEncoder.encode(String.valueOf(getPropertyClass()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
try {
joiner.add(String.format("%s[class]=%s", prefix, URLEncoder.encode(String.valueOf(getPropertyClass()), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
}
}
return joiner.toString();
}

View File

@@ -22,8 +22,8 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
import com.fasterxml.jackson.annotation.JsonValue;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.annotation.JsonTypeName;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
import java.util.StringJoiner;
/**
@@ -181,15 +181,30 @@ public class ModelApiResponse {
StringJoiner joiner = new StringJoiner("&");
// add `code` to the URL query string
if (getCode() != null) {
joiner.add(String.format("%s[code]=%s", prefix, URLEncoder.encode(String.valueOf(getCode()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
try {
joiner.add(String.format("%s[code]=%s", prefix, URLEncoder.encode(String.valueOf(getCode()), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
}
}
// add `type` to the URL query string
if (getType() != null) {
joiner.add(String.format("%s[type]=%s", prefix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
try {
joiner.add(String.format("%s[type]=%s", prefix, URLEncoder.encode(String.valueOf(getType()), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
}
}
// add `message` to the URL query string
if (getMessage() != null) {
joiner.add(String.format("%s[message]=%s", prefix, URLEncoder.encode(String.valueOf(getMessage()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
try {
joiner.add(String.format("%s[message]=%s", prefix, URLEncoder.encode(String.valueOf(getMessage()), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
}
}
return joiner.toString();
}

View File

@@ -22,8 +22,8 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
import com.fasterxml.jackson.annotation.JsonValue;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.annotation.JsonTypeName;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
import java.util.StringJoiner;
/**
@@ -117,7 +117,12 @@ public class ModelFile {
StringJoiner joiner = new StringJoiner("&");
// add `sourceURI` to the URL query string
if (getSourceURI() != null) {
joiner.add(String.format("%s[sourceURI]=%s", prefix, URLEncoder.encode(String.valueOf(getSourceURI()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
try {
joiner.add(String.format("%s[sourceURI]=%s", prefix, URLEncoder.encode(String.valueOf(getSourceURI()), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
}
}
return joiner.toString();
}

View File

@@ -22,8 +22,8 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
import com.fasterxml.jackson.annotation.JsonValue;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.annotation.JsonTypeName;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
import java.util.StringJoiner;
/**
@@ -117,7 +117,12 @@ public class ModelList {
StringJoiner joiner = new StringJoiner("&");
// add `123-list` to the URL query string
if (get123list() != null) {
joiner.add(String.format("%s[123-list]=%s", prefix, URLEncoder.encode(String.valueOf(get123list()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
try {
joiner.add(String.format("%s[123-list]=%s", prefix, URLEncoder.encode(String.valueOf(get123list()), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
}
}
return joiner.toString();
}

View File

@@ -22,8 +22,8 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
import com.fasterxml.jackson.annotation.JsonValue;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.annotation.JsonTypeName;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
import java.util.StringJoiner;
/**
@@ -117,7 +117,12 @@ public class ModelReturn {
StringJoiner joiner = new StringJoiner("&");
// add `return` to the URL query string
if (getReturn() != null) {
joiner.add(String.format("%s[return]=%s", prefix, URLEncoder.encode(String.valueOf(getReturn()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
try {
joiner.add(String.format("%s[return]=%s", prefix, URLEncoder.encode(String.valueOf(getReturn()), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
}
}
return joiner.toString();
}

View File

@@ -22,8 +22,8 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
import com.fasterxml.jackson.annotation.JsonValue;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.annotation.JsonTypeName;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
import java.util.StringJoiner;
/**
@@ -200,19 +200,39 @@ public class Name {
StringJoiner joiner = new StringJoiner("&");
// add `name` to the URL query string
if (getName() != null) {
joiner.add(String.format("%s[name]=%s", prefix, URLEncoder.encode(String.valueOf(getName()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
try {
joiner.add(String.format("%s[name]=%s", prefix, URLEncoder.encode(String.valueOf(getName()), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
}
}
// add `snake_case` to the URL query string
if (getSnakeCase() != null) {
joiner.add(String.format("%s[snake_case]=%s", prefix, URLEncoder.encode(String.valueOf(getSnakeCase()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
try {
joiner.add(String.format("%s[snake_case]=%s", prefix, URLEncoder.encode(String.valueOf(getSnakeCase()), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
}
}
// add `property` to the URL query string
if (getProperty() != null) {
joiner.add(String.format("%s[property]=%s", prefix, URLEncoder.encode(String.valueOf(getProperty()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
try {
joiner.add(String.format("%s[property]=%s", prefix, URLEncoder.encode(String.valueOf(getProperty()), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
}
}
// add `123Number` to the URL query string
if (get123number() != null) {
joiner.add(String.format("%s[123Number]=%s", prefix, URLEncoder.encode(String.valueOf(get123number()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
try {
joiner.add(String.format("%s[123Number]=%s", prefix, URLEncoder.encode(String.valueOf(get123number()), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
}
}
return joiner.toString();
}

View File

@@ -33,8 +33,8 @@ import org.openapitools.jackson.nullable.JsonNullable;
import java.util.NoSuchElementException;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.annotation.JsonTypeName;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
import java.util.StringJoiner;
/**
@@ -637,62 +637,122 @@ public class NullableClass extends HashMap<String, Object> {
StringJoiner joiner = new StringJoiner("&");
// add `integer_prop` to the URL query string
if (getIntegerProp() != null) {
joiner.add(String.format("%s[integer_prop]=%s", prefix, URLEncoder.encode(String.valueOf(getIntegerProp()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
try {
joiner.add(String.format("%s[integer_prop]=%s", prefix, URLEncoder.encode(String.valueOf(getIntegerProp()), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
}
}
// add `number_prop` to the URL query string
if (getNumberProp() != null) {
joiner.add(String.format("%s[number_prop]=%s", prefix, URLEncoder.encode(String.valueOf(getNumberProp()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
try {
joiner.add(String.format("%s[number_prop]=%s", prefix, URLEncoder.encode(String.valueOf(getNumberProp()), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
}
}
// add `boolean_prop` to the URL query string
if (getBooleanProp() != null) {
joiner.add(String.format("%s[boolean_prop]=%s", prefix, URLEncoder.encode(String.valueOf(getBooleanProp()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
try {
joiner.add(String.format("%s[boolean_prop]=%s", prefix, URLEncoder.encode(String.valueOf(getBooleanProp()), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
}
}
// add `string_prop` to the URL query string
if (getStringProp() != null) {
joiner.add(String.format("%s[string_prop]=%s", prefix, URLEncoder.encode(String.valueOf(getStringProp()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
try {
joiner.add(String.format("%s[string_prop]=%s", prefix, URLEncoder.encode(String.valueOf(getStringProp()), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
}
}
// add `date_prop` to the URL query string
if (getDateProp() != null) {
joiner.add(String.format("%s[date_prop]=%s", prefix, URLEncoder.encode(String.valueOf(getDateProp()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
try {
joiner.add(String.format("%s[date_prop]=%s", prefix, URLEncoder.encode(String.valueOf(getDateProp()), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
}
}
// add `datetime_prop` to the URL query string
if (getDatetimeProp() != null) {
joiner.add(String.format("%s[datetime_prop]=%s", prefix, URLEncoder.encode(String.valueOf(getDatetimeProp()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
try {
joiner.add(String.format("%s[datetime_prop]=%s", prefix, URLEncoder.encode(String.valueOf(getDatetimeProp()), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
}
}
// add `array_nullable_prop` to the URL query string
if (getArrayNullableProp() != null) {
for (int i = 0; i < getArrayNullableProp().size(); i++) {
joiner.add(String.format("%s[array_nullable_prop][%d]=%s", prefix, i, URLEncoder.encode(String.valueOf(getArrayNullableProp().get(i)), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
try {
joiner.add(String.format("%s[array_nullable_prop][%d]=%s", prefix, i, URLEncoder.encode(String.valueOf(getArrayNullableProp().get(i)), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
}
}
}
// add `array_and_items_nullable_prop` to the URL query string
if (getArrayAndItemsNullableProp() != null) {
for (int i = 0; i < getArrayAndItemsNullableProp().size(); i++) {
joiner.add(String.format("%s[array_and_items_nullable_prop][%d]=%s", prefix, i, URLEncoder.encode(String.valueOf(getArrayAndItemsNullableProp().get(i)), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
try {
joiner.add(String.format("%s[array_and_items_nullable_prop][%d]=%s", prefix, i, URLEncoder.encode(String.valueOf(getArrayAndItemsNullableProp().get(i)), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
}
}
}
// add `array_items_nullable` to the URL query string
if (getArrayItemsNullable() != null) {
for (int i = 0; i < getArrayItemsNullable().size(); i++) {
joiner.add(String.format("%s[array_items_nullable][%d]=%s", prefix, i, URLEncoder.encode(String.valueOf(getArrayItemsNullable().get(i)), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
try {
joiner.add(String.format("%s[array_items_nullable][%d]=%s", prefix, i, URLEncoder.encode(String.valueOf(getArrayItemsNullable().get(i)), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
}
}
}
// add `object_nullable_prop` to the URL query string
if (getObjectNullableProp() != null) {
for (String _key : getObjectNullableProp().keySet()) {
joiner.add(String.format("%s[object_nullable_prop][%s]=%s", prefix, getObjectNullableProp().get(_key), URLEncoder.encode(String.valueOf(getObjectNullableProp().get(_key)), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
try {
joiner.add(String.format("%s[object_nullable_prop][%s]=%s", prefix, getObjectNullableProp().get(_key), URLEncoder.encode(String.valueOf(getObjectNullableProp().get(_key)), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
}
}
}
// add `object_and_items_nullable_prop` to the URL query string
if (getObjectAndItemsNullableProp() != null) {
for (String _key : getObjectAndItemsNullableProp().keySet()) {
joiner.add(String.format("%s[object_and_items_nullable_prop][%s]=%s", prefix, getObjectAndItemsNullableProp().get(_key), URLEncoder.encode(String.valueOf(getObjectAndItemsNullableProp().get(_key)), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
try {
joiner.add(String.format("%s[object_and_items_nullable_prop][%s]=%s", prefix, getObjectAndItemsNullableProp().get(_key), URLEncoder.encode(String.valueOf(getObjectAndItemsNullableProp().get(_key)), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
}
}
}
// add `object_items_nullable` to the URL query string
if (getObjectItemsNullable() != null) {
for (String _key : getObjectItemsNullable().keySet()) {
joiner.add(String.format("%s[object_items_nullable][%s]=%s", prefix, getObjectItemsNullable().get(_key), URLEncoder.encode(String.valueOf(getObjectItemsNullable().get(_key)), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
try {
joiner.add(String.format("%s[object_items_nullable][%s]=%s", prefix, getObjectItemsNullable().get(_key), URLEncoder.encode(String.valueOf(getObjectItemsNullable().get(_key)), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
}
}
}
return joiner.toString();

View File

@@ -23,8 +23,8 @@ import com.fasterxml.jackson.annotation.JsonValue;
import java.math.BigDecimal;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.annotation.JsonTypeName;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
import java.util.StringJoiner;
/**
@@ -117,7 +117,12 @@ public class NumberOnly {
StringJoiner joiner = new StringJoiner("&");
// add `JustNumber` to the URL query string
if (getJustNumber() != null) {
joiner.add(String.format("%s[JustNumber]=%s", prefix, URLEncoder.encode(String.valueOf(getJustNumber()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
try {
joiner.add(String.format("%s[JustNumber]=%s", prefix, URLEncoder.encode(String.valueOf(getJustNumber()), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
}
}
return joiner.toString();
}

View File

@@ -26,8 +26,8 @@ import java.util.List;
import org.openapitools.client.model.DeprecatedObject;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.annotation.JsonTypeName;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
import java.util.StringJoiner;
/**
@@ -230,11 +230,21 @@ public class ObjectWithDeprecatedFields {
StringJoiner joiner = new StringJoiner("&");
// add `uuid` to the URL query string
if (getUuid() != null) {
joiner.add(String.format("%s[uuid]=%s", prefix, URLEncoder.encode(String.valueOf(getUuid()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
try {
joiner.add(String.format("%s[uuid]=%s", prefix, URLEncoder.encode(String.valueOf(getUuid()), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
}
}
// add `id` to the URL query string
if (getId() != null) {
joiner.add(String.format("%s[id]=%s", prefix, URLEncoder.encode(String.valueOf(getId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
try {
joiner.add(String.format("%s[id]=%s", prefix, URLEncoder.encode(String.valueOf(getId()), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
}
}
// add `deprecatedRef` to the URL query string
if (getDeprecatedRef() != null) {
@@ -243,7 +253,12 @@ public class ObjectWithDeprecatedFields {
// add `bars` to the URL query string
if (getBars() != null) {
for (int i = 0; i < getBars().size(); i++) {
joiner.add(String.format("%s[bars][%d]=%s", prefix, i, URLEncoder.encode(String.valueOf(getBars().get(i)), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
try {
joiner.add(String.format("%s[bars][%d]=%s", prefix, i, URLEncoder.encode(String.valueOf(getBars().get(i)), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
}
}
}
return joiner.toString();

View File

@@ -23,8 +23,8 @@ import com.fasterxml.jackson.annotation.JsonValue;
import java.time.OffsetDateTime;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.annotation.JsonTypeName;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
import java.util.StringJoiner;
/**
@@ -314,27 +314,57 @@ public class Order {
StringJoiner joiner = new StringJoiner("&");
// add `id` to the URL query string
if (getId() != null) {
joiner.add(String.format("%s[id]=%s", prefix, URLEncoder.encode(String.valueOf(getId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
try {
joiner.add(String.format("%s[id]=%s", prefix, URLEncoder.encode(String.valueOf(getId()), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
}
}
// add `petId` to the URL query string
if (getPetId() != null) {
joiner.add(String.format("%s[petId]=%s", prefix, URLEncoder.encode(String.valueOf(getPetId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
try {
joiner.add(String.format("%s[petId]=%s", prefix, URLEncoder.encode(String.valueOf(getPetId()), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
}
}
// add `quantity` to the URL query string
if (getQuantity() != null) {
joiner.add(String.format("%s[quantity]=%s", prefix, URLEncoder.encode(String.valueOf(getQuantity()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
try {
joiner.add(String.format("%s[quantity]=%s", prefix, URLEncoder.encode(String.valueOf(getQuantity()), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
}
}
// add `shipDate` to the URL query string
if (getShipDate() != null) {
joiner.add(String.format("%s[shipDate]=%s", prefix, URLEncoder.encode(String.valueOf(getShipDate()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
try {
joiner.add(String.format("%s[shipDate]=%s", prefix, URLEncoder.encode(String.valueOf(getShipDate()), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
}
}
// add `status` to the URL query string
if (getStatus() != null) {
joiner.add(String.format("%s[status]=%s", prefix, URLEncoder.encode(String.valueOf(getStatus()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
try {
joiner.add(String.format("%s[status]=%s", prefix, URLEncoder.encode(String.valueOf(getStatus()), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
}
}
// add `complete` to the URL query string
if (getComplete() != null) {
joiner.add(String.format("%s[complete]=%s", prefix, URLEncoder.encode(String.valueOf(getComplete()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
try {
joiner.add(String.format("%s[complete]=%s", prefix, URLEncoder.encode(String.valueOf(getComplete()), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
}
}
return joiner.toString();
}

View File

@@ -23,8 +23,8 @@ import com.fasterxml.jackson.annotation.JsonValue;
import java.math.BigDecimal;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.annotation.JsonTypeName;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
import java.util.StringJoiner;
/**
@@ -181,15 +181,30 @@ public class OuterComposite {
StringJoiner joiner = new StringJoiner("&");
// add `my_number` to the URL query string
if (getMyNumber() != null) {
joiner.add(String.format("%s[my_number]=%s", prefix, URLEncoder.encode(String.valueOf(getMyNumber()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
try {
joiner.add(String.format("%s[my_number]=%s", prefix, URLEncoder.encode(String.valueOf(getMyNumber()), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
}
}
// add `my_string` to the URL query string
if (getMyString() != null) {
joiner.add(String.format("%s[my_string]=%s", prefix, URLEncoder.encode(String.valueOf(getMyString()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
try {
joiner.add(String.format("%s[my_string]=%s", prefix, URLEncoder.encode(String.valueOf(getMyString()), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
}
}
// add `my_boolean` to the URL query string
if (getMyBoolean() != null) {
joiner.add(String.format("%s[my_boolean]=%s", prefix, URLEncoder.encode(String.valueOf(getMyBoolean()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
try {
joiner.add(String.format("%s[my_boolean]=%s", prefix, URLEncoder.encode(String.valueOf(getMyBoolean()), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
}
}
return joiner.toString();
}

View File

@@ -17,8 +17,8 @@ import java.util.Objects;
import java.util.Arrays;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.annotation.JsonTypeName;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
import java.util.StringJoiner;
import com.fasterxml.jackson.annotation.JsonCreator;

View File

@@ -17,8 +17,8 @@ import java.util.Objects;
import java.util.Arrays;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.annotation.JsonTypeName;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
import java.util.StringJoiner;
import com.fasterxml.jackson.annotation.JsonCreator;

View File

@@ -17,8 +17,8 @@ import java.util.Objects;
import java.util.Arrays;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.annotation.JsonTypeName;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
import java.util.StringJoiner;
import com.fasterxml.jackson.annotation.JsonCreator;

View File

@@ -17,8 +17,8 @@ import java.util.Objects;
import java.util.Arrays;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.annotation.JsonTypeName;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
import java.util.StringJoiner;
import com.fasterxml.jackson.annotation.JsonCreator;

View File

@@ -23,8 +23,8 @@ import com.fasterxml.jackson.annotation.JsonValue;
import org.openapitools.client.model.OuterEnumInteger;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.annotation.JsonTypeName;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
import java.util.StringJoiner;
/**
@@ -117,7 +117,12 @@ public class OuterObjectWithEnumProperty {
StringJoiner joiner = new StringJoiner("&");
// add `value` to the URL query string
if (getValue() != null) {
joiner.add(String.format("%s[value]=%s", prefix, URLEncoder.encode(String.valueOf(getValue()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
try {
joiner.add(String.format("%s[value]=%s", prefix, URLEncoder.encode(String.valueOf(getValue()), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
}
}
return joiner.toString();
}

View File

@@ -29,8 +29,8 @@ import org.openapitools.client.model.Category;
import org.openapitools.client.model.Tag;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.annotation.JsonTypeName;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
import java.util.StringJoiner;
/**
@@ -334,7 +334,12 @@ public class Pet {
StringJoiner joiner = new StringJoiner("&");
// add `id` to the URL query string
if (getId() != null) {
joiner.add(String.format("%s[id]=%s", prefix, URLEncoder.encode(String.valueOf(getId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
try {
joiner.add(String.format("%s[id]=%s", prefix, URLEncoder.encode(String.valueOf(getId()), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
}
}
// add `category` to the URL query string
if (getCategory() != null) {
@@ -342,13 +347,23 @@ public class Pet {
}
// add `name` to the URL query string
if (getName() != null) {
joiner.add(String.format("%s[name]=%s", prefix, URLEncoder.encode(String.valueOf(getName()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
try {
joiner.add(String.format("%s[name]=%s", prefix, URLEncoder.encode(String.valueOf(getName()), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
}
}
// add `photoUrls` to the URL query string
if (getPhotoUrls() != null) {
int i = 0;
for (String _item : getPhotoUrls()) {
joiner.add(String.format("%s[photoUrls][%d]=%s", prefix, i, URLEncoder.encode(String.valueOf(_item), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
try {
joiner.add(String.format("%s[photoUrls][%d]=%s", prefix, i, URLEncoder.encode(String.valueOf(_item), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
}
}
i++;
}
@@ -362,7 +377,12 @@ public class Pet {
}
// add `status` to the URL query string
if (getStatus() != null) {
joiner.add(String.format("%s[status]=%s", prefix, URLEncoder.encode(String.valueOf(getStatus()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
try {
joiner.add(String.format("%s[status]=%s", prefix, URLEncoder.encode(String.valueOf(getStatus()), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
}
}
return joiner.toString();
}

View File

@@ -22,8 +22,8 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
import com.fasterxml.jackson.annotation.JsonValue;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.annotation.JsonTypeName;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
import java.util.StringJoiner;
/**
@@ -145,11 +145,21 @@ public class ReadOnlyFirst {
StringJoiner joiner = new StringJoiner("&");
// add `bar` to the URL query string
if (getBar() != null) {
joiner.add(String.format("%s[bar]=%s", prefix, URLEncoder.encode(String.valueOf(getBar()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
try {
joiner.add(String.format("%s[bar]=%s", prefix, URLEncoder.encode(String.valueOf(getBar()), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
}
}
// add `baz` to the URL query string
if (getBaz() != null) {
joiner.add(String.format("%s[baz]=%s", prefix, URLEncoder.encode(String.valueOf(getBaz()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
try {
joiner.add(String.format("%s[baz]=%s", prefix, URLEncoder.encode(String.valueOf(getBaz()), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
}
}
return joiner.toString();
}

View File

@@ -17,8 +17,8 @@ import java.util.Objects;
import java.util.Arrays;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.annotation.JsonTypeName;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
import java.util.StringJoiner;
import com.fasterxml.jackson.annotation.JsonCreator;

View File

@@ -22,8 +22,8 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
import com.fasterxml.jackson.annotation.JsonValue;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.annotation.JsonTypeName;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
import java.util.StringJoiner;
/**
@@ -117,7 +117,12 @@ public class SpecialModelName {
StringJoiner joiner = new StringJoiner("&");
// add `$special[property.name]` to the URL query string
if (get$SpecialPropertyName() != null) {
joiner.add(String.format("%s[$special[property.name]]=%s", prefix, URLEncoder.encode(String.valueOf(get$SpecialPropertyName()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
try {
joiner.add(String.format("%s[$special[property.name]]=%s", prefix, URLEncoder.encode(String.valueOf(get$SpecialPropertyName()), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
}
}
return joiner.toString();
}

View File

@@ -22,8 +22,8 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
import com.fasterxml.jackson.annotation.JsonValue;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.annotation.JsonTypeName;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
import java.util.StringJoiner;
/**
@@ -148,11 +148,21 @@ public class Tag {
StringJoiner joiner = new StringJoiner("&");
// add `id` to the URL query string
if (getId() != null) {
joiner.add(String.format("%s[id]=%s", prefix, URLEncoder.encode(String.valueOf(getId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
try {
joiner.add(String.format("%s[id]=%s", prefix, URLEncoder.encode(String.valueOf(getId()), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
}
}
// add `name` to the URL query string
if (getName() != null) {
joiner.add(String.format("%s[name]=%s", prefix, URLEncoder.encode(String.valueOf(getName()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
try {
joiner.add(String.format("%s[name]=%s", prefix, URLEncoder.encode(String.valueOf(getName()), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
}
}
return joiner.toString();
}

View File

@@ -22,8 +22,8 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
import com.fasterxml.jackson.annotation.JsonValue;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.annotation.JsonTypeName;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
import java.util.StringJoiner;
/**
@@ -340,35 +340,75 @@ public class User {
StringJoiner joiner = new StringJoiner("&");
// add `id` to the URL query string
if (getId() != null) {
joiner.add(String.format("%s[id]=%s", prefix, URLEncoder.encode(String.valueOf(getId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
try {
joiner.add(String.format("%s[id]=%s", prefix, URLEncoder.encode(String.valueOf(getId()), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
}
}
// add `username` to the URL query string
if (getUsername() != null) {
joiner.add(String.format("%s[username]=%s", prefix, URLEncoder.encode(String.valueOf(getUsername()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
try {
joiner.add(String.format("%s[username]=%s", prefix, URLEncoder.encode(String.valueOf(getUsername()), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
}
}
// add `firstName` to the URL query string
if (getFirstName() != null) {
joiner.add(String.format("%s[firstName]=%s", prefix, URLEncoder.encode(String.valueOf(getFirstName()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
try {
joiner.add(String.format("%s[firstName]=%s", prefix, URLEncoder.encode(String.valueOf(getFirstName()), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
}
}
// add `lastName` to the URL query string
if (getLastName() != null) {
joiner.add(String.format("%s[lastName]=%s", prefix, URLEncoder.encode(String.valueOf(getLastName()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
try {
joiner.add(String.format("%s[lastName]=%s", prefix, URLEncoder.encode(String.valueOf(getLastName()), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
}
}
// add `email` to the URL query string
if (getEmail() != null) {
joiner.add(String.format("%s[email]=%s", prefix, URLEncoder.encode(String.valueOf(getEmail()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
try {
joiner.add(String.format("%s[email]=%s", prefix, URLEncoder.encode(String.valueOf(getEmail()), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
}
}
// add `password` to the URL query string
if (getPassword() != null) {
joiner.add(String.format("%s[password]=%s", prefix, URLEncoder.encode(String.valueOf(getPassword()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
try {
joiner.add(String.format("%s[password]=%s", prefix, URLEncoder.encode(String.valueOf(getPassword()), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
}
}
// add `phone` to the URL query string
if (getPhone() != null) {
joiner.add(String.format("%s[phone]=%s", prefix, URLEncoder.encode(String.valueOf(getPhone()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
try {
joiner.add(String.format("%s[phone]=%s", prefix, URLEncoder.encode(String.valueOf(getPhone()), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
}
}
// add `userStatus` to the URL query string
if (getUserStatus() != null) {
joiner.add(String.format("%s[userStatus]=%s", prefix, URLEncoder.encode(String.valueOf(getUserStatus()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
try {
joiner.add(String.format("%s[userStatus]=%s", prefix, URLEncoder.encode(String.valueOf(getUserStatus()), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
}
}
return joiner.toString();
}