forked from loafle/openapi-generator-original
Merge pull request #3900 from wing328/escape_callback
[Java][Python] Escape callback parameter for java(okhttp) and python
This commit is contained in:
commit
3d231e4e4b
@ -377,6 +377,11 @@ public abstract class AbstractJavaCodegen extends DefaultCodegen implements Code
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toParamName(String name) {
|
public String toParamName(String name) {
|
||||||
|
// to avoid conflicts with 'callback' parameter for async call
|
||||||
|
if ("callback".equals(name)) {
|
||||||
|
return "paramCallback";
|
||||||
|
}
|
||||||
|
|
||||||
// should be the same as variable name
|
// should be the same as variable name
|
||||||
return toVarName(name);
|
return toVarName(name);
|
||||||
}
|
}
|
||||||
|
@ -349,6 +349,11 @@ public class PythonClientCodegen extends DefaultCodegen implements CodegenConfig
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toParamName(String name) {
|
public String toParamName(String name) {
|
||||||
|
// to avoid conflicts with 'callback' parameter for async call
|
||||||
|
if ("callback".equals(name)) {
|
||||||
|
return "param_callback";
|
||||||
|
}
|
||||||
|
|
||||||
// should be the same as variable name
|
// should be the same as variable name
|
||||||
return toVarName(name);
|
return toVarName(name);
|
||||||
}
|
}
|
||||||
|
@ -771,6 +771,10 @@ paths:
|
|||||||
minLength: 10
|
minLength: 10
|
||||||
in: formData
|
in: formData
|
||||||
description: None
|
description: None
|
||||||
|
- name: callback
|
||||||
|
type: string
|
||||||
|
in: formData
|
||||||
|
description: None
|
||||||
responses:
|
responses:
|
||||||
'400':
|
'400':
|
||||||
description: Invalid username supplied
|
description: Invalid username supplied
|
||||||
|
180
samples/client/petstore/java/jersey1/gradlew.bat
vendored
180
samples/client/petstore/java/jersey1/gradlew.bat
vendored
@ -1,90 +1,90 @@
|
|||||||
@if "%DEBUG%" == "" @echo off
|
@if "%DEBUG%" == "" @echo off
|
||||||
@rem ##########################################################################
|
@rem ##########################################################################
|
||||||
@rem
|
@rem
|
||||||
@rem Gradle startup script for Windows
|
@rem Gradle startup script for Windows
|
||||||
@rem
|
@rem
|
||||||
@rem ##########################################################################
|
@rem ##########################################################################
|
||||||
|
|
||||||
@rem Set local scope for the variables with windows NT shell
|
@rem Set local scope for the variables with windows NT shell
|
||||||
if "%OS%"=="Windows_NT" setlocal
|
if "%OS%"=="Windows_NT" setlocal
|
||||||
|
|
||||||
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||||
set DEFAULT_JVM_OPTS=
|
set DEFAULT_JVM_OPTS=
|
||||||
|
|
||||||
set DIRNAME=%~dp0
|
set DIRNAME=%~dp0
|
||||||
if "%DIRNAME%" == "" set DIRNAME=.
|
if "%DIRNAME%" == "" set DIRNAME=.
|
||||||
set APP_BASE_NAME=%~n0
|
set APP_BASE_NAME=%~n0
|
||||||
set APP_HOME=%DIRNAME%
|
set APP_HOME=%DIRNAME%
|
||||||
|
|
||||||
@rem Find java.exe
|
@rem Find java.exe
|
||||||
if defined JAVA_HOME goto findJavaFromJavaHome
|
if defined JAVA_HOME goto findJavaFromJavaHome
|
||||||
|
|
||||||
set JAVA_EXE=java.exe
|
set JAVA_EXE=java.exe
|
||||||
%JAVA_EXE% -version >NUL 2>&1
|
%JAVA_EXE% -version >NUL 2>&1
|
||||||
if "%ERRORLEVEL%" == "0" goto init
|
if "%ERRORLEVEL%" == "0" goto init
|
||||||
|
|
||||||
echo.
|
echo.
|
||||||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||||
echo.
|
echo.
|
||||||
echo Please set the JAVA_HOME variable in your environment to match the
|
echo Please set the JAVA_HOME variable in your environment to match the
|
||||||
echo location of your Java installation.
|
echo location of your Java installation.
|
||||||
|
|
||||||
goto fail
|
goto fail
|
||||||
|
|
||||||
:findJavaFromJavaHome
|
:findJavaFromJavaHome
|
||||||
set JAVA_HOME=%JAVA_HOME:"=%
|
set JAVA_HOME=%JAVA_HOME:"=%
|
||||||
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
||||||
|
|
||||||
if exist "%JAVA_EXE%" goto init
|
if exist "%JAVA_EXE%" goto init
|
||||||
|
|
||||||
echo.
|
echo.
|
||||||
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
|
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
|
||||||
echo.
|
echo.
|
||||||
echo Please set the JAVA_HOME variable in your environment to match the
|
echo Please set the JAVA_HOME variable in your environment to match the
|
||||||
echo location of your Java installation.
|
echo location of your Java installation.
|
||||||
|
|
||||||
goto fail
|
goto fail
|
||||||
|
|
||||||
:init
|
:init
|
||||||
@rem Get command-line arguments, handling Windows variants
|
@rem Get command-line arguments, handling Windows variants
|
||||||
|
|
||||||
if not "%OS%" == "Windows_NT" goto win9xME_args
|
if not "%OS%" == "Windows_NT" goto win9xME_args
|
||||||
if "%@eval[2+2]" == "4" goto 4NT_args
|
if "%@eval[2+2]" == "4" goto 4NT_args
|
||||||
|
|
||||||
:win9xME_args
|
:win9xME_args
|
||||||
@rem Slurp the command line arguments.
|
@rem Slurp the command line arguments.
|
||||||
set CMD_LINE_ARGS=
|
set CMD_LINE_ARGS=
|
||||||
set _SKIP=2
|
set _SKIP=2
|
||||||
|
|
||||||
:win9xME_args_slurp
|
:win9xME_args_slurp
|
||||||
if "x%~1" == "x" goto execute
|
if "x%~1" == "x" goto execute
|
||||||
|
|
||||||
set CMD_LINE_ARGS=%*
|
set CMD_LINE_ARGS=%*
|
||||||
goto execute
|
goto execute
|
||||||
|
|
||||||
:4NT_args
|
:4NT_args
|
||||||
@rem Get arguments from the 4NT Shell from JP Software
|
@rem Get arguments from the 4NT Shell from JP Software
|
||||||
set CMD_LINE_ARGS=%$
|
set CMD_LINE_ARGS=%$
|
||||||
|
|
||||||
:execute
|
:execute
|
||||||
@rem Setup the command line
|
@rem Setup the command line
|
||||||
|
|
||||||
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
||||||
|
|
||||||
@rem Execute Gradle
|
@rem Execute Gradle
|
||||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
|
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
|
||||||
|
|
||||||
:end
|
:end
|
||||||
@rem End local scope for the variables with windows NT shell
|
@rem End local scope for the variables with windows NT shell
|
||||||
if "%ERRORLEVEL%"=="0" goto mainEnd
|
if "%ERRORLEVEL%"=="0" goto mainEnd
|
||||||
|
|
||||||
:fail
|
:fail
|
||||||
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
||||||
rem the _cmd.exe /c_ return code!
|
rem the _cmd.exe /c_ return code!
|
||||||
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
|
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
|
||||||
exit /b 1
|
exit /b 1
|
||||||
|
|
||||||
:mainEnd
|
:mainEnd
|
||||||
if "%OS%"=="Windows_NT" endlocal
|
if "%OS%"=="Windows_NT" endlocal
|
||||||
|
|
||||||
:omega
|
:omega
|
||||||
|
@ -34,8 +34,8 @@ import io.swagger.client.Pair;
|
|||||||
|
|
||||||
import io.swagger.client.model.Client;
|
import io.swagger.client.model.Client;
|
||||||
import org.joda.time.LocalDate;
|
import org.joda.time.LocalDate;
|
||||||
import java.math.BigDecimal;
|
|
||||||
import org.joda.time.DateTime;
|
import org.joda.time.DateTime;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
@ -33,8 +33,8 @@ import io.swagger.client.model.*;
|
|||||||
import io.swagger.client.Pair;
|
import io.swagger.client.Pair;
|
||||||
|
|
||||||
import io.swagger.client.model.Pet;
|
import io.swagger.client.model.Pet;
|
||||||
import io.swagger.client.model.ModelApiResponse;
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
import io.swagger.client.model.ModelApiResponse;
|
||||||
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
@ -54,7 +54,7 @@ No authorization required
|
|||||||
|
|
||||||
<a name="testEndpointParameters"></a>
|
<a name="testEndpointParameters"></a>
|
||||||
# **testEndpointParameters**
|
# **testEndpointParameters**
|
||||||
> testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password)
|
> testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback)
|
||||||
|
|
||||||
Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||||
|
|
||||||
@ -90,8 +90,9 @@ byte[] binary = B; // byte[] | None
|
|||||||
LocalDate date = new LocalDate(); // LocalDate | None
|
LocalDate date = new LocalDate(); // LocalDate | None
|
||||||
DateTime dateTime = new DateTime(); // DateTime | None
|
DateTime dateTime = new DateTime(); // DateTime | None
|
||||||
String password = "password_example"; // String | None
|
String password = "password_example"; // String | None
|
||||||
|
String paramCallback = "paramCallback_example"; // String | None
|
||||||
try {
|
try {
|
||||||
apiInstance.testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password);
|
apiInstance.testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback);
|
||||||
} catch (ApiException e) {
|
} catch (ApiException e) {
|
||||||
System.err.println("Exception when calling FakeApi#testEndpointParameters");
|
System.err.println("Exception when calling FakeApi#testEndpointParameters");
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
@ -115,6 +116,7 @@ Name | Type | Description | Notes
|
|||||||
**date** | **LocalDate**| None | [optional]
|
**date** | **LocalDate**| None | [optional]
|
||||||
**dateTime** | **DateTime**| None | [optional]
|
**dateTime** | **DateTime**| None | [optional]
|
||||||
**password** | **String**| None | [optional]
|
**password** | **String**| None | [optional]
|
||||||
|
**paramCallback** | **String**| None | [optional]
|
||||||
|
|
||||||
### Return type
|
### Return type
|
||||||
|
|
||||||
|
180
samples/client/petstore/java/okhttp-gson/gradlew.bat
vendored
180
samples/client/petstore/java/okhttp-gson/gradlew.bat
vendored
@ -1,90 +1,90 @@
|
|||||||
@if "%DEBUG%" == "" @echo off
|
@if "%DEBUG%" == "" @echo off
|
||||||
@rem ##########################################################################
|
@rem ##########################################################################
|
||||||
@rem
|
@rem
|
||||||
@rem Gradle startup script for Windows
|
@rem Gradle startup script for Windows
|
||||||
@rem
|
@rem
|
||||||
@rem ##########################################################################
|
@rem ##########################################################################
|
||||||
|
|
||||||
@rem Set local scope for the variables with windows NT shell
|
@rem Set local scope for the variables with windows NT shell
|
||||||
if "%OS%"=="Windows_NT" setlocal
|
if "%OS%"=="Windows_NT" setlocal
|
||||||
|
|
||||||
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||||
set DEFAULT_JVM_OPTS=
|
set DEFAULT_JVM_OPTS=
|
||||||
|
|
||||||
set DIRNAME=%~dp0
|
set DIRNAME=%~dp0
|
||||||
if "%DIRNAME%" == "" set DIRNAME=.
|
if "%DIRNAME%" == "" set DIRNAME=.
|
||||||
set APP_BASE_NAME=%~n0
|
set APP_BASE_NAME=%~n0
|
||||||
set APP_HOME=%DIRNAME%
|
set APP_HOME=%DIRNAME%
|
||||||
|
|
||||||
@rem Find java.exe
|
@rem Find java.exe
|
||||||
if defined JAVA_HOME goto findJavaFromJavaHome
|
if defined JAVA_HOME goto findJavaFromJavaHome
|
||||||
|
|
||||||
set JAVA_EXE=java.exe
|
set JAVA_EXE=java.exe
|
||||||
%JAVA_EXE% -version >NUL 2>&1
|
%JAVA_EXE% -version >NUL 2>&1
|
||||||
if "%ERRORLEVEL%" == "0" goto init
|
if "%ERRORLEVEL%" == "0" goto init
|
||||||
|
|
||||||
echo.
|
echo.
|
||||||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||||
echo.
|
echo.
|
||||||
echo Please set the JAVA_HOME variable in your environment to match the
|
echo Please set the JAVA_HOME variable in your environment to match the
|
||||||
echo location of your Java installation.
|
echo location of your Java installation.
|
||||||
|
|
||||||
goto fail
|
goto fail
|
||||||
|
|
||||||
:findJavaFromJavaHome
|
:findJavaFromJavaHome
|
||||||
set JAVA_HOME=%JAVA_HOME:"=%
|
set JAVA_HOME=%JAVA_HOME:"=%
|
||||||
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
||||||
|
|
||||||
if exist "%JAVA_EXE%" goto init
|
if exist "%JAVA_EXE%" goto init
|
||||||
|
|
||||||
echo.
|
echo.
|
||||||
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
|
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
|
||||||
echo.
|
echo.
|
||||||
echo Please set the JAVA_HOME variable in your environment to match the
|
echo Please set the JAVA_HOME variable in your environment to match the
|
||||||
echo location of your Java installation.
|
echo location of your Java installation.
|
||||||
|
|
||||||
goto fail
|
goto fail
|
||||||
|
|
||||||
:init
|
:init
|
||||||
@rem Get command-line arguments, handling Windows variants
|
@rem Get command-line arguments, handling Windows variants
|
||||||
|
|
||||||
if not "%OS%" == "Windows_NT" goto win9xME_args
|
if not "%OS%" == "Windows_NT" goto win9xME_args
|
||||||
if "%@eval[2+2]" == "4" goto 4NT_args
|
if "%@eval[2+2]" == "4" goto 4NT_args
|
||||||
|
|
||||||
:win9xME_args
|
:win9xME_args
|
||||||
@rem Slurp the command line arguments.
|
@rem Slurp the command line arguments.
|
||||||
set CMD_LINE_ARGS=
|
set CMD_LINE_ARGS=
|
||||||
set _SKIP=2
|
set _SKIP=2
|
||||||
|
|
||||||
:win9xME_args_slurp
|
:win9xME_args_slurp
|
||||||
if "x%~1" == "x" goto execute
|
if "x%~1" == "x" goto execute
|
||||||
|
|
||||||
set CMD_LINE_ARGS=%*
|
set CMD_LINE_ARGS=%*
|
||||||
goto execute
|
goto execute
|
||||||
|
|
||||||
:4NT_args
|
:4NT_args
|
||||||
@rem Get arguments from the 4NT Shell from JP Software
|
@rem Get arguments from the 4NT Shell from JP Software
|
||||||
set CMD_LINE_ARGS=%$
|
set CMD_LINE_ARGS=%$
|
||||||
|
|
||||||
:execute
|
:execute
|
||||||
@rem Setup the command line
|
@rem Setup the command line
|
||||||
|
|
||||||
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
||||||
|
|
||||||
@rem Execute Gradle
|
@rem Execute Gradle
|
||||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
|
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
|
||||||
|
|
||||||
:end
|
:end
|
||||||
@rem End local scope for the variables with windows NT shell
|
@rem End local scope for the variables with windows NT shell
|
||||||
if "%ERRORLEVEL%"=="0" goto mainEnd
|
if "%ERRORLEVEL%"=="0" goto mainEnd
|
||||||
|
|
||||||
:fail
|
:fail
|
||||||
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
||||||
rem the _cmd.exe /c_ return code!
|
rem the _cmd.exe /c_ return code!
|
||||||
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
|
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
|
||||||
exit /b 1
|
exit /b 1
|
||||||
|
|
||||||
:mainEnd
|
:mainEnd
|
||||||
if "%OS%"=="Windows_NT" endlocal
|
if "%OS%"=="Windows_NT" endlocal
|
||||||
|
|
||||||
:omega
|
:omega
|
||||||
|
@ -40,8 +40,8 @@ import java.io.IOException;
|
|||||||
|
|
||||||
import io.swagger.client.model.Client;
|
import io.swagger.client.model.Client;
|
||||||
import org.joda.time.LocalDate;
|
import org.joda.time.LocalDate;
|
||||||
import java.math.BigDecimal;
|
|
||||||
import org.joda.time.DateTime;
|
import org.joda.time.DateTime;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
import java.lang.reflect.Type;
|
import java.lang.reflect.Type;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
@ -175,7 +175,7 @@ public class FakeApi {
|
|||||||
return call;
|
return call;
|
||||||
}
|
}
|
||||||
/* Build call for testEndpointParameters */
|
/* Build call for testEndpointParameters */
|
||||||
private com.squareup.okhttp.Call testEndpointParametersCall(BigDecimal number, Double _double, String patternWithoutDelimiter, byte[] _byte, Integer integer, Integer int32, Long int64, Float _float, String string, byte[] binary, LocalDate date, DateTime dateTime, String password, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
|
private com.squareup.okhttp.Call testEndpointParametersCall(BigDecimal number, Double _double, String patternWithoutDelimiter, byte[] _byte, Integer integer, Integer int32, Long int64, Float _float, String string, byte[] binary, LocalDate date, DateTime dateTime, String password, String paramCallback, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
|
||||||
Object localVarPostBody = null;
|
Object localVarPostBody = null;
|
||||||
|
|
||||||
// verify the required parameter 'number' is set
|
// verify the required parameter 'number' is set
|
||||||
@ -233,6 +233,8 @@ public class FakeApi {
|
|||||||
localVarFormParams.put("dateTime", dateTime);
|
localVarFormParams.put("dateTime", dateTime);
|
||||||
if (password != null)
|
if (password != null)
|
||||||
localVarFormParams.put("password", password);
|
localVarFormParams.put("password", password);
|
||||||
|
if (paramCallback != null)
|
||||||
|
localVarFormParams.put("callback", paramCallback);
|
||||||
|
|
||||||
final String[] localVarAccepts = {
|
final String[] localVarAccepts = {
|
||||||
"application/xml; charset=utf-8", "application/json; charset=utf-8"
|
"application/xml; charset=utf-8", "application/json; charset=utf-8"
|
||||||
@ -278,10 +280,11 @@ public class FakeApi {
|
|||||||
* @param date None (optional)
|
* @param date None (optional)
|
||||||
* @param dateTime None (optional)
|
* @param dateTime None (optional)
|
||||||
* @param password None (optional)
|
* @param password None (optional)
|
||||||
|
* @param paramCallback None (optional)
|
||||||
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
|
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
|
||||||
*/
|
*/
|
||||||
public void testEndpointParameters(BigDecimal number, Double _double, String patternWithoutDelimiter, byte[] _byte, Integer integer, Integer int32, Long int64, Float _float, String string, byte[] binary, LocalDate date, DateTime dateTime, String password) throws ApiException {
|
public void testEndpointParameters(BigDecimal number, Double _double, String patternWithoutDelimiter, byte[] _byte, Integer integer, Integer int32, Long int64, Float _float, String string, byte[] binary, LocalDate date, DateTime dateTime, String password, String paramCallback) throws ApiException {
|
||||||
testEndpointParametersWithHttpInfo(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password);
|
testEndpointParametersWithHttpInfo(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -300,11 +303,12 @@ public class FakeApi {
|
|||||||
* @param date None (optional)
|
* @param date None (optional)
|
||||||
* @param dateTime None (optional)
|
* @param dateTime None (optional)
|
||||||
* @param password None (optional)
|
* @param password None (optional)
|
||||||
|
* @param paramCallback None (optional)
|
||||||
* @return ApiResponse<Void>
|
* @return ApiResponse<Void>
|
||||||
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
|
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
|
||||||
*/
|
*/
|
||||||
public ApiResponse<Void> testEndpointParametersWithHttpInfo(BigDecimal number, Double _double, String patternWithoutDelimiter, byte[] _byte, Integer integer, Integer int32, Long int64, Float _float, String string, byte[] binary, LocalDate date, DateTime dateTime, String password) throws ApiException {
|
public ApiResponse<Void> testEndpointParametersWithHttpInfo(BigDecimal number, Double _double, String patternWithoutDelimiter, byte[] _byte, Integer integer, Integer int32, Long int64, Float _float, String string, byte[] binary, LocalDate date, DateTime dateTime, String password, String paramCallback) throws ApiException {
|
||||||
com.squareup.okhttp.Call call = testEndpointParametersCall(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, null, null);
|
com.squareup.okhttp.Call call = testEndpointParametersCall(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback, null, null);
|
||||||
return apiClient.execute(call);
|
return apiClient.execute(call);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -324,11 +328,12 @@ public class FakeApi {
|
|||||||
* @param date None (optional)
|
* @param date None (optional)
|
||||||
* @param dateTime None (optional)
|
* @param dateTime None (optional)
|
||||||
* @param password None (optional)
|
* @param password None (optional)
|
||||||
|
* @param paramCallback None (optional)
|
||||||
* @param callback The callback to be executed when the API call finishes
|
* @param callback The callback to be executed when the API call finishes
|
||||||
* @return The request call
|
* @return The request call
|
||||||
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
|
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
|
||||||
*/
|
*/
|
||||||
public com.squareup.okhttp.Call testEndpointParametersAsync(BigDecimal number, Double _double, String patternWithoutDelimiter, byte[] _byte, Integer integer, Integer int32, Long int64, Float _float, String string, byte[] binary, LocalDate date, DateTime dateTime, String password, final ApiCallback<Void> callback) throws ApiException {
|
public com.squareup.okhttp.Call testEndpointParametersAsync(BigDecimal number, Double _double, String patternWithoutDelimiter, byte[] _byte, Integer integer, Integer int32, Long int64, Float _float, String string, byte[] binary, LocalDate date, DateTime dateTime, String password, String paramCallback, final ApiCallback<Void> callback) throws ApiException {
|
||||||
|
|
||||||
ProgressResponseBody.ProgressListener progressListener = null;
|
ProgressResponseBody.ProgressListener progressListener = null;
|
||||||
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
|
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
|
||||||
@ -349,7 +354,7 @@ public class FakeApi {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
com.squareup.okhttp.Call call = testEndpointParametersCall(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, progressListener, progressRequestListener);
|
com.squareup.okhttp.Call call = testEndpointParametersCall(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback, progressListener, progressRequestListener);
|
||||||
apiClient.executeAsync(call, callback);
|
apiClient.executeAsync(call, callback);
|
||||||
return call;
|
return call;
|
||||||
}
|
}
|
||||||
|
@ -39,8 +39,8 @@ import com.google.gson.reflect.TypeToken;
|
|||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
||||||
import io.swagger.client.model.Pet;
|
import io.swagger.client.model.Pet;
|
||||||
import io.swagger.client.model.ModelApiResponse;
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
import io.swagger.client.model.ModelApiResponse;
|
||||||
|
|
||||||
import java.lang.reflect.Type;
|
import java.lang.reflect.Type;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
@ -56,7 +56,7 @@ No authorization required
|
|||||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||||
|
|
||||||
# **test_endpoint_parameters**
|
# **test_endpoint_parameters**
|
||||||
> test_endpoint_parameters(number, double, pattern_without_delimiter, byte, integer=integer, int32=int32, int64=int64, float=float, string=string, binary=binary, date=date, date_time=date_time, password=password)
|
> test_endpoint_parameters(number, double, pattern_without_delimiter, byte, integer=integer, int32=int32, int64=int64, float=float, string=string, binary=binary, date=date, date_time=date_time, password=password, param_callback=param_callback)
|
||||||
|
|
||||||
Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||||
|
|
||||||
@ -89,10 +89,11 @@ binary = 'B' # str | None (optional)
|
|||||||
date = '2013-10-20' # date | None (optional)
|
date = '2013-10-20' # date | None (optional)
|
||||||
date_time = '2013-10-20T19:20:30+01:00' # datetime | None (optional)
|
date_time = '2013-10-20T19:20:30+01:00' # datetime | None (optional)
|
||||||
password = 'password_example' # str | None (optional)
|
password = 'password_example' # str | None (optional)
|
||||||
|
param_callback = 'param_callback_example' # str | None (optional)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
# Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
# Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||||
api_instance.test_endpoint_parameters(number, double, pattern_without_delimiter, byte, integer=integer, int32=int32, int64=int64, float=float, string=string, binary=binary, date=date, date_time=date_time, password=password)
|
api_instance.test_endpoint_parameters(number, double, pattern_without_delimiter, byte, integer=integer, int32=int32, int64=int64, float=float, string=string, binary=binary, date=date, date_time=date_time, password=password, param_callback=param_callback)
|
||||||
except ApiException as e:
|
except ApiException as e:
|
||||||
print("Exception when calling FakeApi->test_endpoint_parameters: %s\n" % e)
|
print("Exception when calling FakeApi->test_endpoint_parameters: %s\n" % e)
|
||||||
```
|
```
|
||||||
@ -114,6 +115,7 @@ Name | Type | Description | Notes
|
|||||||
**date** | **date**| None | [optional]
|
**date** | **date**| None | [optional]
|
||||||
**date_time** | **datetime**| None | [optional]
|
**date_time** | **datetime**| None | [optional]
|
||||||
**password** | **str**| None | [optional]
|
**password** | **str**| None | [optional]
|
||||||
|
**param_callback** | **str**| None | [optional]
|
||||||
|
|
||||||
### Return type
|
### Return type
|
||||||
|
|
||||||
|
@ -187,6 +187,7 @@ class FakeApi(object):
|
|||||||
:param date date: None
|
:param date date: None
|
||||||
:param datetime date_time: None
|
:param datetime date_time: None
|
||||||
:param str password: None
|
:param str password: None
|
||||||
|
:param str param_callback: None
|
||||||
:return: None
|
:return: None
|
||||||
If the method is called asynchronously,
|
If the method is called asynchronously,
|
||||||
returns the request thread.
|
returns the request thread.
|
||||||
@ -226,12 +227,13 @@ class FakeApi(object):
|
|||||||
:param date date: None
|
:param date date: None
|
||||||
:param datetime date_time: None
|
:param datetime date_time: None
|
||||||
:param str password: None
|
:param str password: None
|
||||||
|
:param str param_callback: None
|
||||||
:return: None
|
:return: None
|
||||||
If the method is called asynchronously,
|
If the method is called asynchronously,
|
||||||
returns the request thread.
|
returns the request thread.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
all_params = ['number', 'double', 'pattern_without_delimiter', 'byte', 'integer', 'int32', 'int64', 'float', 'string', 'binary', 'date', 'date_time', 'password']
|
all_params = ['number', 'double', 'pattern_without_delimiter', 'byte', 'integer', 'int32', 'int64', 'float', 'string', 'binary', 'date', 'date_time', 'password', 'param_callback']
|
||||||
all_params.append('callback')
|
all_params.append('callback')
|
||||||
all_params.append('_return_http_data_only')
|
all_params.append('_return_http_data_only')
|
||||||
|
|
||||||
@ -321,6 +323,8 @@ class FakeApi(object):
|
|||||||
form_params.append(('dateTime', params['date_time']))
|
form_params.append(('dateTime', params['date_time']))
|
||||||
if 'password' in params:
|
if 'password' in params:
|
||||||
form_params.append(('password', params['password']))
|
form_params.append(('password', params['password']))
|
||||||
|
if 'param_callback' in params:
|
||||||
|
form_params.append(('callback', params['param_callback']))
|
||||||
|
|
||||||
body_params = None
|
body_params = None
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user