forked from loafle/openapi-generator-original
update java petstore samples
This commit is contained in:
parent
17bbb25ce4
commit
d04d280d1b
@ -36,7 +36,7 @@ git_remote=`git remote`
|
||||
if [ "$git_remote" = "" ]; then # git remote not defined
|
||||
|
||||
if [ "$GIT_TOKEN" = "" ]; then
|
||||
echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git crediential in your environment."
|
||||
echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
|
||||
git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git
|
||||
else
|
||||
git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git
|
||||
|
@ -36,7 +36,7 @@ git_remote=`git remote`
|
||||
if [ "$git_remote" = "" ]; then # git remote not defined
|
||||
|
||||
if [ "$GIT_TOKEN" = "" ]; then
|
||||
echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git crediential in your environment."
|
||||
echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
|
||||
git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git
|
||||
else
|
||||
git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git
|
||||
|
@ -36,7 +36,7 @@ git_remote=`git remote`
|
||||
if [ "$git_remote" = "" ]; then # git remote not defined
|
||||
|
||||
if [ "$GIT_TOKEN" = "" ]; then
|
||||
echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git crediential in your environment."
|
||||
echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
|
||||
git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git
|
||||
else
|
||||
git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git
|
||||
|
@ -55,6 +55,7 @@ public class ApiClient {
|
||||
protected String basePath = "http://petstore.swagger.io:80/v2";
|
||||
protected boolean debugging = false;
|
||||
protected int connectionTimeout = 0;
|
||||
private int readTimeout = 0;
|
||||
|
||||
protected Client httpClient;
|
||||
protected JSON json;
|
||||
@ -301,6 +302,27 @@ public class ApiClient {
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* read timeout (in milliseconds).
|
||||
* @return Read timeout
|
||||
*/
|
||||
public int getReadTimeout() {
|
||||
return readTimeout;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the read timeout (in milliseconds).
|
||||
* A value of 0 means no timeout, otherwise values must be between 1 and
|
||||
* {@link Integer#MAX_VALUE}.
|
||||
* @param readTimeout Read timeout in milliseconds
|
||||
* @return API client
|
||||
*/
|
||||
public ApiClient setReadTimeout(int readTimeout) {
|
||||
this.readTimeout = readTimeout;
|
||||
httpClient.property(ClientProperties.READ_TIMEOUT, readTimeout);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the date format used to parse/format date parameters.
|
||||
* @return Date format
|
||||
|
@ -36,7 +36,7 @@ git_remote=`git remote`
|
||||
if [ "$git_remote" = "" ]; then # git remote not defined
|
||||
|
||||
if [ "$GIT_TOKEN" = "" ]; then
|
||||
echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git crediential in your environment."
|
||||
echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
|
||||
git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git
|
||||
else
|
||||
git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git
|
||||
|
@ -56,6 +56,7 @@ public class ApiClient {
|
||||
protected String basePath = "http://petstore.swagger.io:80/v2";
|
||||
protected boolean debugging = false;
|
||||
protected int connectionTimeout = 0;
|
||||
private int readTimeout = 0;
|
||||
|
||||
protected Client httpClient;
|
||||
protected JSON json;
|
||||
@ -302,6 +303,27 @@ public class ApiClient {
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* read timeout (in milliseconds).
|
||||
* @return Read timeout
|
||||
*/
|
||||
public int getReadTimeout() {
|
||||
return readTimeout;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the read timeout (in milliseconds).
|
||||
* A value of 0 means no timeout, otherwise values must be between 1 and
|
||||
* {@link Integer#MAX_VALUE}.
|
||||
* @param readTimeout Read timeout in milliseconds
|
||||
* @return API client
|
||||
*/
|
||||
public ApiClient setReadTimeout(int readTimeout) {
|
||||
this.readTimeout = readTimeout;
|
||||
httpClient.property(ClientProperties.READ_TIMEOUT, readTimeout);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the date format used to parse/format date parameters.
|
||||
* @return Date format
|
||||
|
@ -36,7 +36,7 @@ git_remote=`git remote`
|
||||
if [ "$git_remote" = "" ]; then # git remote not defined
|
||||
|
||||
if [ "$GIT_TOKEN" = "" ]; then
|
||||
echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git crediential in your environment."
|
||||
echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
|
||||
git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git
|
||||
else
|
||||
git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git
|
||||
|
@ -56,6 +56,7 @@ public class ApiClient {
|
||||
protected String basePath = "http://petstore.swagger.io:80/v2";
|
||||
protected boolean debugging = false;
|
||||
protected int connectionTimeout = 0;
|
||||
private int readTimeout = 0;
|
||||
|
||||
protected Client httpClient;
|
||||
protected JSON json;
|
||||
@ -302,6 +303,27 @@ public class ApiClient {
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* read timeout (in milliseconds).
|
||||
* @return Read timeout
|
||||
*/
|
||||
public int getReadTimeout() {
|
||||
return readTimeout;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the read timeout (in milliseconds).
|
||||
* A value of 0 means no timeout, otherwise values must be between 1 and
|
||||
* {@link Integer#MAX_VALUE}.
|
||||
* @param readTimeout Read timeout in milliseconds
|
||||
* @return API client
|
||||
*/
|
||||
public ApiClient setReadTimeout(int readTimeout) {
|
||||
this.readTimeout = readTimeout;
|
||||
httpClient.property(ClientProperties.READ_TIMEOUT, readTimeout);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the date format used to parse/format date parameters.
|
||||
* @return Date format
|
||||
|
@ -36,7 +36,7 @@ git_remote=`git remote`
|
||||
if [ "$git_remote" = "" ]; then # git remote not defined
|
||||
|
||||
if [ "$GIT_TOKEN" = "" ]; then
|
||||
echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git crediential in your environment."
|
||||
echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
|
||||
git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git
|
||||
else
|
||||
git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git
|
||||
|
@ -408,7 +408,7 @@ public class ApiClient {
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the tempoaray folder path (for downloading files)
|
||||
* Set the temporary folder path (for downloading files)
|
||||
*
|
||||
* @param tempFolderPath Temporary folder path
|
||||
* @return ApiClient
|
||||
@ -430,6 +430,7 @@ public class ApiClient {
|
||||
/**
|
||||
* Sets the connect timeout (in milliseconds).
|
||||
* A value of 0 means no timeout, otherwise values must be between 1 and
|
||||
* {@link Integer#MAX_VALUE}.
|
||||
*
|
||||
* @param connectionTimeout connection timeout in milliseconds
|
||||
* @return Api client
|
||||
@ -439,6 +440,50 @@ public class ApiClient {
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get read timeout (in milliseconds).
|
||||
*
|
||||
* @return Timeout in milliseconds
|
||||
*/
|
||||
public int getReadTimeout() {
|
||||
return httpClient.getReadTimeout();
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the read timeout (in milliseconds).
|
||||
* A value of 0 means no timeout, otherwise values must be between 1 and
|
||||
* {@link Integer#MAX_VALUE}.
|
||||
*
|
||||
* @param readTimeout read timeout in milliseconds
|
||||
* @return Api client
|
||||
*/
|
||||
public ApiClient setReadTimeout(int readTimeout) {
|
||||
httpClient.setReadTimeout(readTimeout, TimeUnit.MILLISECONDS);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get write timeout (in milliseconds).
|
||||
*
|
||||
* @return Timeout in milliseconds
|
||||
*/
|
||||
public int getWriteTimeout() {
|
||||
return httpClient.getWriteTimeout();
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the write timeout (in milliseconds).
|
||||
* A value of 0 means no timeout, otherwise values must be between 1 and
|
||||
* {@link Integer#MAX_VALUE}.
|
||||
*
|
||||
* @param writeTimeout connection timeout in milliseconds
|
||||
* @return Api client
|
||||
*/
|
||||
public ApiClient setWriteTimeout(int writeTimeout) {
|
||||
httpClient.setWriteTimeout(writeTimeout, TimeUnit.MILLISECONDS);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Format the given parameter object into string.
|
||||
*
|
||||
|
@ -36,7 +36,7 @@ git_remote=`git remote`
|
||||
if [ "$git_remote" = "" ]; then # git remote not defined
|
||||
|
||||
if [ "$GIT_TOKEN" = "" ]; then
|
||||
echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git crediential in your environment."
|
||||
echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
|
||||
git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git
|
||||
else
|
||||
git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git
|
||||
|
@ -36,7 +36,7 @@ git_remote=`git remote`
|
||||
if [ "$git_remote" = "" ]; then # git remote not defined
|
||||
|
||||
if [ "$GIT_TOKEN" = "" ]; then
|
||||
echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git crediential in your environment."
|
||||
echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
|
||||
git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git
|
||||
else
|
||||
git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git
|
||||
|
@ -36,7 +36,7 @@ git_remote=`git remote`
|
||||
if [ "$git_remote" = "" ]; then # git remote not defined
|
||||
|
||||
if [ "$GIT_TOKEN" = "" ]; then
|
||||
echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git crediential in your environment."
|
||||
echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
|
||||
git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git
|
||||
else
|
||||
git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git
|
||||
|
@ -36,7 +36,7 @@ git_remote=`git remote`
|
||||
if [ "$git_remote" = "" ]; then # git remote not defined
|
||||
|
||||
if [ "$GIT_TOKEN" = "" ]; then
|
||||
echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git crediential in your environment."
|
||||
echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
|
||||
git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git
|
||||
else
|
||||
git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git
|
||||
|
@ -36,7 +36,7 @@ git_remote=`git remote`
|
||||
if [ "$git_remote" = "" ]; then # git remote not defined
|
||||
|
||||
if [ "$GIT_TOKEN" = "" ]; then
|
||||
echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git crediential in your environment."
|
||||
echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
|
||||
git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git
|
||||
else
|
||||
git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git
|
||||
|
@ -36,7 +36,7 @@ git_remote=`git remote`
|
||||
if [ "$git_remote" = "" ]; then # git remote not defined
|
||||
|
||||
if [ "$GIT_TOKEN" = "" ]; then
|
||||
echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git crediential in your environment."
|
||||
echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
|
||||
git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git
|
||||
else
|
||||
git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git
|
||||
|
@ -36,7 +36,7 @@ git_remote=`git remote`
|
||||
if [ "$git_remote" = "" ]; then # git remote not defined
|
||||
|
||||
if [ "$GIT_TOKEN" = "" ]; then
|
||||
echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git crediential in your environment."
|
||||
echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
|
||||
git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git
|
||||
else
|
||||
git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git
|
||||
|
@ -36,7 +36,7 @@ git_remote=`git remote`
|
||||
if [ "$git_remote" = "" ]; then # git remote not defined
|
||||
|
||||
if [ "$GIT_TOKEN" = "" ]; then
|
||||
echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git crediential in your environment."
|
||||
echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
|
||||
git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git
|
||||
else
|
||||
git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git
|
||||
|
@ -36,7 +36,7 @@ git_remote=`git remote`
|
||||
if [ "$git_remote" = "" ]; then # git remote not defined
|
||||
|
||||
if [ "$GIT_TOKEN" = "" ]; then
|
||||
echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git crediential in your environment."
|
||||
echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
|
||||
git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git
|
||||
else
|
||||
git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git
|
||||
|
Loading…
x
Reference in New Issue
Block a user