forked from loafle/openapi-generator-original
curse you github desktop client for not refreshing when i want you to
This commit is contained in:
parent
810bf58c3a
commit
a59c128f90
@ -9,6 +9,8 @@ import java.net.URLEncoder;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import static org.apache.commons.lang3.StringUtils.isNotEmpty;
|
||||
|
||||
public class ClientOptInput {
|
||||
private CodegenConfig config;
|
||||
private ClientOpts opts;
|
||||
@ -30,6 +32,11 @@ public class ClientOptInput {
|
||||
return this;
|
||||
}
|
||||
|
||||
public ClientOptInput auth(String urlEncodedAuthString) {
|
||||
this.setAuth(urlEncodedAuthString);
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getAuth() {
|
||||
if (auths != null) {
|
||||
StringBuilder b = new StringBuilder();
|
||||
@ -54,7 +61,7 @@ public class ClientOptInput {
|
||||
|
||||
public void setAuth(String urlEncodedAuthString) {
|
||||
List<AuthorizationValue> auths = new ArrayList<AuthorizationValue>();
|
||||
if (urlEncodedAuthString != null && !"".equals(urlEncodedAuthString)) {
|
||||
if (isNotEmpty(urlEncodedAuthString)) {
|
||||
String[] parts = urlEncodedAuthString.split(",");
|
||||
for (String part : parts) {
|
||||
String[] kvPair = part.split(":");
|
||||
|
@ -33,4 +33,5 @@ public class CodegenConstants {
|
||||
|
||||
public static final String SERIALIZABLE_MODEL = "serializableModel";
|
||||
public static final String SERIALIZABLE_MODEL_DESC = "boolean - toggle \"implements Serializable\" for generated models";
|
||||
public static final String LIBRARY = "library";
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user