Add full OAuth2 support to jersey2-experimental codegen (#6183)

* Add full Oauth2 support to Jersey client

* Regenerate jersey2-experimental sample

* Regenerate all java clients
This commit is contained in:
Christophe Bornet
2020-05-11 09:18:47 +02:00
committed by GitHub
parent 3de587826a
commit 779b176648
27 changed files with 1158 additions and 200 deletions

View File

@@ -13,6 +13,9 @@
package org.openapitools.client;
import java.util.Collection;
import java.util.Iterator;
public class StringUtil {
/**
@@ -58,4 +61,23 @@ public class StringUtil {
}
return out.toString();
}
/**
* Join a list of strings with the given separator.
*
* @param list The list of strings
* @param separator The separator
* @return the resulting string
*/
public static String join(Collection<String> list, String separator) {
Iterator<String> iterator = list.iterator();
StringBuilder out = new StringBuilder();
if (iterator.hasNext()) {
out.append(iterator.next());
}
while (iterator.hasNext()) {
out.append(separator).append(iterator.next());
}
return out.toString();
}
}