forked from loafle/openapi-generator-original
update retrofit1,2 samples
This commit is contained in:
parent
a276c51cd8
commit
47d3c3a767
180
samples/client/petstore/java/retrofit/gradlew.bat
vendored
180
samples/client/petstore/java/retrofit/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
|
||||||
|
@ -8,8 +8,8 @@ import retrofit.mime.*;
|
|||||||
|
|
||||||
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;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
@ -27,12 +27,7 @@ public interface FakeApi {
|
|||||||
|
|
||||||
@PATCH("/fake")
|
@PATCH("/fake")
|
||||||
Client testClientModel(
|
Client testClientModel(
|
||||||
|
@retrofit.http.Body Client body
|
||||||
|
|
||||||
|
|
||||||
@retrofit.http.Body Client body
|
|
||||||
|
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -45,12 +40,7 @@ public interface FakeApi {
|
|||||||
|
|
||||||
@PATCH("/fake")
|
@PATCH("/fake")
|
||||||
void testClientModel(
|
void testClientModel(
|
||||||
|
@retrofit.http.Body Client body, Callback<Client> cb
|
||||||
|
|
||||||
|
|
||||||
@retrofit.http.Body Client body
|
|
||||||
|
|
||||||
, Callback<Client> cb
|
|
||||||
);
|
);
|
||||||
/**
|
/**
|
||||||
* Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
* Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||||
@ -76,77 +66,7 @@ public interface FakeApi {
|
|||||||
@retrofit.http.FormUrlEncoded
|
@retrofit.http.FormUrlEncoded
|
||||||
@POST("/fake")
|
@POST("/fake")
|
||||||
Void testEndpointParameters(
|
Void testEndpointParameters(
|
||||||
|
@retrofit.http.Field("number") BigDecimal number, @retrofit.http.Field("double") Double _double, @retrofit.http.Field("pattern_without_delimiter") String patternWithoutDelimiter, @retrofit.http.Field("byte") byte[] _byte, @retrofit.http.Field("integer") Integer integer, @retrofit.http.Field("int32") Integer int32, @retrofit.http.Field("int64") Long int64, @retrofit.http.Field("float") Float _float, @retrofit.http.Field("string") String string, @retrofit.http.Field("binary") byte[] binary, @retrofit.http.Field("date") LocalDate date, @retrofit.http.Field("dateTime") DateTime dateTime, @retrofit.http.Field("password") String password, @retrofit.http.Field("callback") String paramCallback
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@retrofit.http.Field("number") BigDecimal number
|
|
||||||
,
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@retrofit.http.Field("double") Double _double
|
|
||||||
,
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@retrofit.http.Field("pattern_without_delimiter") String patternWithoutDelimiter
|
|
||||||
,
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@retrofit.http.Field("byte") byte[] _byte
|
|
||||||
,
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@retrofit.http.Field("integer") Integer integer
|
|
||||||
,
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@retrofit.http.Field("int32") Integer int32
|
|
||||||
,
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@retrofit.http.Field("int64") Long int64
|
|
||||||
,
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@retrofit.http.Field("float") Float _float
|
|
||||||
,
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@retrofit.http.Field("string") String string
|
|
||||||
,
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@retrofit.http.Field("binary") byte[] binary
|
|
||||||
,
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@retrofit.http.Field("date") LocalDate date
|
|
||||||
,
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@retrofit.http.Field("dateTime") DateTime dateTime
|
|
||||||
,
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@retrofit.http.Field("password") String password
|
|
||||||
,
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@retrofit.http.Field("callback") String paramCallback
|
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -173,77 +93,7 @@ public interface FakeApi {
|
|||||||
@retrofit.http.FormUrlEncoded
|
@retrofit.http.FormUrlEncoded
|
||||||
@POST("/fake")
|
@POST("/fake")
|
||||||
void testEndpointParameters(
|
void testEndpointParameters(
|
||||||
|
@retrofit.http.Field("number") BigDecimal number, @retrofit.http.Field("double") Double _double, @retrofit.http.Field("pattern_without_delimiter") String patternWithoutDelimiter, @retrofit.http.Field("byte") byte[] _byte, @retrofit.http.Field("integer") Integer integer, @retrofit.http.Field("int32") Integer int32, @retrofit.http.Field("int64") Long int64, @retrofit.http.Field("float") Float _float, @retrofit.http.Field("string") String string, @retrofit.http.Field("binary") byte[] binary, @retrofit.http.Field("date") LocalDate date, @retrofit.http.Field("dateTime") DateTime dateTime, @retrofit.http.Field("password") String password, @retrofit.http.Field("callback") String paramCallback, Callback<Void> cb
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@retrofit.http.Field("number") BigDecimal number
|
|
||||||
,
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@retrofit.http.Field("double") Double _double
|
|
||||||
,
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@retrofit.http.Field("pattern_without_delimiter") String patternWithoutDelimiter
|
|
||||||
,
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@retrofit.http.Field("byte") byte[] _byte
|
|
||||||
,
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@retrofit.http.Field("integer") Integer integer
|
|
||||||
,
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@retrofit.http.Field("int32") Integer int32
|
|
||||||
,
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@retrofit.http.Field("int64") Long int64
|
|
||||||
,
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@retrofit.http.Field("float") Float _float
|
|
||||||
,
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@retrofit.http.Field("string") String string
|
|
||||||
,
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@retrofit.http.Field("binary") byte[] binary
|
|
||||||
,
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@retrofit.http.Field("date") LocalDate date
|
|
||||||
,
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@retrofit.http.Field("dateTime") DateTime dateTime
|
|
||||||
,
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@retrofit.http.Field("password") String password
|
|
||||||
,
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@retrofit.http.Field("callback") String paramCallback
|
|
||||||
, Callback<Void> cb
|
|
||||||
);
|
);
|
||||||
/**
|
/**
|
||||||
* To test enum parameters
|
* To test enum parameters
|
||||||
@ -263,47 +113,7 @@ public interface FakeApi {
|
|||||||
@retrofit.http.FormUrlEncoded
|
@retrofit.http.FormUrlEncoded
|
||||||
@GET("/fake")
|
@GET("/fake")
|
||||||
Void testEnumParameters(
|
Void testEnumParameters(
|
||||||
|
@retrofit.http.Field("enum_form_string_array") List<String> enumFormStringArray, @retrofit.http.Field("enum_form_string") String enumFormString, @retrofit.http.Header("enum_header_string_array") List<String> enumHeaderStringArray, @retrofit.http.Header("enum_header_string") String enumHeaderString, @retrofit.http.Query("enum_query_string_array") CSVParams enumQueryStringArray, @retrofit.http.Query("enum_query_string") String enumQueryString, @retrofit.http.Query("enum_query_integer") BigDecimal enumQueryInteger, @retrofit.http.Field("enum_query_double") Double enumQueryDouble
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@retrofit.http.Field("enum_form_string_array") List<String> enumFormStringArray
|
|
||||||
,
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@retrofit.http.Field("enum_form_string") String enumFormString
|
|
||||||
,
|
|
||||||
|
|
||||||
@retrofit.http.Header("enum_header_string_array") List<String> enumHeaderStringArray
|
|
||||||
|
|
||||||
|
|
||||||
,
|
|
||||||
|
|
||||||
@retrofit.http.Header("enum_header_string") String enumHeaderString
|
|
||||||
|
|
||||||
|
|
||||||
, @retrofit.http.Query("enum_query_string_array") CSVParams enumQueryStringArray
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
, @retrofit.http.Query("enum_query_string") String enumQueryString
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
, @retrofit.http.Query("enum_query_integer") BigDecimal enumQueryInteger
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
,
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@retrofit.http.Field("enum_query_double") Double enumQueryDouble
|
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -324,46 +134,6 @@ public interface FakeApi {
|
|||||||
@retrofit.http.FormUrlEncoded
|
@retrofit.http.FormUrlEncoded
|
||||||
@GET("/fake")
|
@GET("/fake")
|
||||||
void testEnumParameters(
|
void testEnumParameters(
|
||||||
|
@retrofit.http.Field("enum_form_string_array") List<String> enumFormStringArray, @retrofit.http.Field("enum_form_string") String enumFormString, @retrofit.http.Header("enum_header_string_array") List<String> enumHeaderStringArray, @retrofit.http.Header("enum_header_string") String enumHeaderString, @retrofit.http.Query("enum_query_string_array") CSVParams enumQueryStringArray, @retrofit.http.Query("enum_query_string") String enumQueryString, @retrofit.http.Query("enum_query_integer") BigDecimal enumQueryInteger, @retrofit.http.Field("enum_query_double") Double enumQueryDouble, Callback<Void> cb
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@retrofit.http.Field("enum_form_string_array") List<String> enumFormStringArray
|
|
||||||
,
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@retrofit.http.Field("enum_form_string") String enumFormString
|
|
||||||
,
|
|
||||||
|
|
||||||
@retrofit.http.Header("enum_header_string_array") List<String> enumHeaderStringArray
|
|
||||||
|
|
||||||
|
|
||||||
,
|
|
||||||
|
|
||||||
@retrofit.http.Header("enum_header_string") String enumHeaderString
|
|
||||||
|
|
||||||
|
|
||||||
, @retrofit.http.Query("enum_query_string_array") CSVParams enumQueryStringArray
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
, @retrofit.http.Query("enum_query_string") String enumQueryString
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
, @retrofit.http.Query("enum_query_integer") BigDecimal enumQueryInteger
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
,
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@retrofit.http.Field("enum_query_double") Double enumQueryDouble
|
|
||||||
, Callback<Void> cb
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -7,8 +7,8 @@ import retrofit.http.*;
|
|||||||
import retrofit.mime.*;
|
import retrofit.mime.*;
|
||||||
|
|
||||||
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;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
@ -26,12 +26,7 @@ public interface PetApi {
|
|||||||
|
|
||||||
@POST("/pet")
|
@POST("/pet")
|
||||||
Void addPet(
|
Void addPet(
|
||||||
|
@retrofit.http.Body Pet body
|
||||||
|
|
||||||
|
|
||||||
@retrofit.http.Body Pet body
|
|
||||||
|
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -44,12 +39,7 @@ public interface PetApi {
|
|||||||
|
|
||||||
@POST("/pet")
|
@POST("/pet")
|
||||||
void addPet(
|
void addPet(
|
||||||
|
@retrofit.http.Body Pet body, Callback<Void> cb
|
||||||
|
|
||||||
|
|
||||||
@retrofit.http.Body Pet body
|
|
||||||
|
|
||||||
, Callback<Void> cb
|
|
||||||
);
|
);
|
||||||
/**
|
/**
|
||||||
* Deletes a pet
|
* Deletes a pet
|
||||||
@ -62,17 +52,7 @@ public interface PetApi {
|
|||||||
|
|
||||||
@DELETE("/pet/{petId}")
|
@DELETE("/pet/{petId}")
|
||||||
Void deletePet(
|
Void deletePet(
|
||||||
|
@retrofit.http.Path("petId") Long petId, @retrofit.http.Header("api_key") String apiKey
|
||||||
@retrofit.http.Path("petId") Long petId
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
,
|
|
||||||
|
|
||||||
@retrofit.http.Header("api_key") String apiKey
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -86,17 +66,7 @@ public interface PetApi {
|
|||||||
|
|
||||||
@DELETE("/pet/{petId}")
|
@DELETE("/pet/{petId}")
|
||||||
void deletePet(
|
void deletePet(
|
||||||
|
@retrofit.http.Path("petId") Long petId, @retrofit.http.Header("api_key") String apiKey, Callback<Void> cb
|
||||||
@retrofit.http.Path("petId") Long petId
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
,
|
|
||||||
|
|
||||||
@retrofit.http.Header("api_key") String apiKey
|
|
||||||
|
|
||||||
|
|
||||||
, Callback<Void> cb
|
|
||||||
);
|
);
|
||||||
/**
|
/**
|
||||||
* Finds Pets by status
|
* Finds Pets by status
|
||||||
@ -109,11 +79,6 @@ public interface PetApi {
|
|||||||
@GET("/pet/findByStatus")
|
@GET("/pet/findByStatus")
|
||||||
List<Pet> findPetsByStatus(
|
List<Pet> findPetsByStatus(
|
||||||
@retrofit.http.Query("status") CSVParams status
|
@retrofit.http.Query("status") CSVParams status
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -126,12 +91,7 @@ public interface PetApi {
|
|||||||
|
|
||||||
@GET("/pet/findByStatus")
|
@GET("/pet/findByStatus")
|
||||||
void findPetsByStatus(
|
void findPetsByStatus(
|
||||||
@retrofit.http.Query("status") CSVParams status
|
@retrofit.http.Query("status") CSVParams status, Callback<List<Pet>> cb
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
, Callback<List<Pet>> cb
|
|
||||||
);
|
);
|
||||||
/**
|
/**
|
||||||
* Finds Pets by tags
|
* Finds Pets by tags
|
||||||
@ -144,11 +104,6 @@ public interface PetApi {
|
|||||||
@GET("/pet/findByTags")
|
@GET("/pet/findByTags")
|
||||||
List<Pet> findPetsByTags(
|
List<Pet> findPetsByTags(
|
||||||
@retrofit.http.Query("tags") CSVParams tags
|
@retrofit.http.Query("tags") CSVParams tags
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -161,12 +116,7 @@ public interface PetApi {
|
|||||||
|
|
||||||
@GET("/pet/findByTags")
|
@GET("/pet/findByTags")
|
||||||
void findPetsByTags(
|
void findPetsByTags(
|
||||||
@retrofit.http.Query("tags") CSVParams tags
|
@retrofit.http.Query("tags") CSVParams tags, Callback<List<Pet>> cb
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
, Callback<List<Pet>> cb
|
|
||||||
);
|
);
|
||||||
/**
|
/**
|
||||||
* Find pet by ID
|
* Find pet by ID
|
||||||
@ -178,12 +128,7 @@ public interface PetApi {
|
|||||||
|
|
||||||
@GET("/pet/{petId}")
|
@GET("/pet/{petId}")
|
||||||
Pet getPetById(
|
Pet getPetById(
|
||||||
|
@retrofit.http.Path("petId") Long petId
|
||||||
@retrofit.http.Path("petId") Long petId
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -196,12 +141,7 @@ public interface PetApi {
|
|||||||
|
|
||||||
@GET("/pet/{petId}")
|
@GET("/pet/{petId}")
|
||||||
void getPetById(
|
void getPetById(
|
||||||
|
@retrofit.http.Path("petId") Long petId, Callback<Pet> cb
|
||||||
@retrofit.http.Path("petId") Long petId
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
, Callback<Pet> cb
|
|
||||||
);
|
);
|
||||||
/**
|
/**
|
||||||
* Update an existing pet
|
* Update an existing pet
|
||||||
@ -213,12 +153,7 @@ public interface PetApi {
|
|||||||
|
|
||||||
@PUT("/pet")
|
@PUT("/pet")
|
||||||
Void updatePet(
|
Void updatePet(
|
||||||
|
@retrofit.http.Body Pet body
|
||||||
|
|
||||||
|
|
||||||
@retrofit.http.Body Pet body
|
|
||||||
|
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -231,12 +166,7 @@ public interface PetApi {
|
|||||||
|
|
||||||
@PUT("/pet")
|
@PUT("/pet")
|
||||||
void updatePet(
|
void updatePet(
|
||||||
|
@retrofit.http.Body Pet body, Callback<Void> cb
|
||||||
|
|
||||||
|
|
||||||
@retrofit.http.Body Pet body
|
|
||||||
|
|
||||||
, Callback<Void> cb
|
|
||||||
);
|
);
|
||||||
/**
|
/**
|
||||||
* Updates a pet in the store with form data
|
* Updates a pet in the store with form data
|
||||||
@ -251,22 +181,7 @@ public interface PetApi {
|
|||||||
@retrofit.http.FormUrlEncoded
|
@retrofit.http.FormUrlEncoded
|
||||||
@POST("/pet/{petId}")
|
@POST("/pet/{petId}")
|
||||||
Void updatePetWithForm(
|
Void updatePetWithForm(
|
||||||
|
@retrofit.http.Path("petId") Long petId, @retrofit.http.Field("name") String name, @retrofit.http.Field("status") String status
|
||||||
@retrofit.http.Path("petId") Long petId
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
,
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@retrofit.http.Field("name") String name
|
|
||||||
,
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@retrofit.http.Field("status") String status
|
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -282,22 +197,7 @@ public interface PetApi {
|
|||||||
@retrofit.http.FormUrlEncoded
|
@retrofit.http.FormUrlEncoded
|
||||||
@POST("/pet/{petId}")
|
@POST("/pet/{petId}")
|
||||||
void updatePetWithForm(
|
void updatePetWithForm(
|
||||||
|
@retrofit.http.Path("petId") Long petId, @retrofit.http.Field("name") String name, @retrofit.http.Field("status") String status, Callback<Void> cb
|
||||||
@retrofit.http.Path("petId") Long petId
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
,
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@retrofit.http.Field("name") String name
|
|
||||||
,
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@retrofit.http.Field("status") String status
|
|
||||||
, Callback<Void> cb
|
|
||||||
);
|
);
|
||||||
/**
|
/**
|
||||||
* uploads an image
|
* uploads an image
|
||||||
@ -312,22 +212,7 @@ public interface PetApi {
|
|||||||
@retrofit.http.Multipart
|
@retrofit.http.Multipart
|
||||||
@POST("/pet/{petId}/uploadImage")
|
@POST("/pet/{petId}/uploadImage")
|
||||||
ModelApiResponse uploadFile(
|
ModelApiResponse uploadFile(
|
||||||
|
@retrofit.http.Path("petId") Long petId, @retrofit.http.Part("additionalMetadata") String additionalMetadata, @retrofit.http.Part("file") TypedFile file
|
||||||
@retrofit.http.Path("petId") Long petId
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
,
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@retrofit.http.Part("additionalMetadata") String additionalMetadata
|
|
||||||
,
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@retrofit.http.Part("file") TypedFile file
|
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -343,21 +228,6 @@ public interface PetApi {
|
|||||||
@retrofit.http.Multipart
|
@retrofit.http.Multipart
|
||||||
@POST("/pet/{petId}/uploadImage")
|
@POST("/pet/{petId}/uploadImage")
|
||||||
void uploadFile(
|
void uploadFile(
|
||||||
|
@retrofit.http.Path("petId") Long petId, @retrofit.http.Part("additionalMetadata") String additionalMetadata, @retrofit.http.Part("file") TypedFile file, Callback<ModelApiResponse> cb
|
||||||
@retrofit.http.Path("petId") Long petId
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
,
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@retrofit.http.Part("additionalMetadata") String additionalMetadata
|
|
||||||
,
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@retrofit.http.Part("file") TypedFile file
|
|
||||||
, Callback<ModelApiResponse> cb
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -24,12 +24,7 @@ public interface StoreApi {
|
|||||||
|
|
||||||
@DELETE("/store/order/{orderId}")
|
@DELETE("/store/order/{orderId}")
|
||||||
Void deleteOrder(
|
Void deleteOrder(
|
||||||
|
@retrofit.http.Path("orderId") String orderId
|
||||||
@retrofit.http.Path("orderId") String orderId
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -42,12 +37,7 @@ public interface StoreApi {
|
|||||||
|
|
||||||
@DELETE("/store/order/{orderId}")
|
@DELETE("/store/order/{orderId}")
|
||||||
void deleteOrder(
|
void deleteOrder(
|
||||||
|
@retrofit.http.Path("orderId") String orderId, Callback<Void> cb
|
||||||
@retrofit.http.Path("orderId") String orderId
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
, Callback<Void> cb
|
|
||||||
);
|
);
|
||||||
/**
|
/**
|
||||||
* Returns pet inventories by status
|
* Returns pet inventories by status
|
||||||
@ -81,12 +71,7 @@ public interface StoreApi {
|
|||||||
|
|
||||||
@GET("/store/order/{orderId}")
|
@GET("/store/order/{orderId}")
|
||||||
Order getOrderById(
|
Order getOrderById(
|
||||||
|
@retrofit.http.Path("orderId") Long orderId
|
||||||
@retrofit.http.Path("orderId") Long orderId
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -99,12 +84,7 @@ public interface StoreApi {
|
|||||||
|
|
||||||
@GET("/store/order/{orderId}")
|
@GET("/store/order/{orderId}")
|
||||||
void getOrderById(
|
void getOrderById(
|
||||||
|
@retrofit.http.Path("orderId") Long orderId, Callback<Order> cb
|
||||||
@retrofit.http.Path("orderId") Long orderId
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
, Callback<Order> cb
|
|
||||||
);
|
);
|
||||||
/**
|
/**
|
||||||
* Place an order for a pet
|
* Place an order for a pet
|
||||||
@ -116,12 +96,7 @@ public interface StoreApi {
|
|||||||
|
|
||||||
@POST("/store/order")
|
@POST("/store/order")
|
||||||
Order placeOrder(
|
Order placeOrder(
|
||||||
|
@retrofit.http.Body Order body
|
||||||
|
|
||||||
|
|
||||||
@retrofit.http.Body Order body
|
|
||||||
|
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -134,11 +109,6 @@ public interface StoreApi {
|
|||||||
|
|
||||||
@POST("/store/order")
|
@POST("/store/order")
|
||||||
void placeOrder(
|
void placeOrder(
|
||||||
|
@retrofit.http.Body Order body, Callback<Order> cb
|
||||||
|
|
||||||
|
|
||||||
@retrofit.http.Body Order body
|
|
||||||
|
|
||||||
, Callback<Order> cb
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -24,12 +24,7 @@ public interface UserApi {
|
|||||||
|
|
||||||
@POST("/user")
|
@POST("/user")
|
||||||
Void createUser(
|
Void createUser(
|
||||||
|
@retrofit.http.Body User body
|
||||||
|
|
||||||
|
|
||||||
@retrofit.http.Body User body
|
|
||||||
|
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -42,12 +37,7 @@ public interface UserApi {
|
|||||||
|
|
||||||
@POST("/user")
|
@POST("/user")
|
||||||
void createUser(
|
void createUser(
|
||||||
|
@retrofit.http.Body User body, Callback<Void> cb
|
||||||
|
|
||||||
|
|
||||||
@retrofit.http.Body User body
|
|
||||||
|
|
||||||
, Callback<Void> cb
|
|
||||||
);
|
);
|
||||||
/**
|
/**
|
||||||
* Creates list of users with given input array
|
* Creates list of users with given input array
|
||||||
@ -59,12 +49,7 @@ public interface UserApi {
|
|||||||
|
|
||||||
@POST("/user/createWithArray")
|
@POST("/user/createWithArray")
|
||||||
Void createUsersWithArrayInput(
|
Void createUsersWithArrayInput(
|
||||||
|
@retrofit.http.Body List<User> body
|
||||||
|
|
||||||
|
|
||||||
@retrofit.http.Body List<User> body
|
|
||||||
|
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -77,12 +62,7 @@ public interface UserApi {
|
|||||||
|
|
||||||
@POST("/user/createWithArray")
|
@POST("/user/createWithArray")
|
||||||
void createUsersWithArrayInput(
|
void createUsersWithArrayInput(
|
||||||
|
@retrofit.http.Body List<User> body, Callback<Void> cb
|
||||||
|
|
||||||
|
|
||||||
@retrofit.http.Body List<User> body
|
|
||||||
|
|
||||||
, Callback<Void> cb
|
|
||||||
);
|
);
|
||||||
/**
|
/**
|
||||||
* Creates list of users with given input array
|
* Creates list of users with given input array
|
||||||
@ -94,12 +74,7 @@ public interface UserApi {
|
|||||||
|
|
||||||
@POST("/user/createWithList")
|
@POST("/user/createWithList")
|
||||||
Void createUsersWithListInput(
|
Void createUsersWithListInput(
|
||||||
|
@retrofit.http.Body List<User> body
|
||||||
|
|
||||||
|
|
||||||
@retrofit.http.Body List<User> body
|
|
||||||
|
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -112,12 +87,7 @@ public interface UserApi {
|
|||||||
|
|
||||||
@POST("/user/createWithList")
|
@POST("/user/createWithList")
|
||||||
void createUsersWithListInput(
|
void createUsersWithListInput(
|
||||||
|
@retrofit.http.Body List<User> body, Callback<Void> cb
|
||||||
|
|
||||||
|
|
||||||
@retrofit.http.Body List<User> body
|
|
||||||
|
|
||||||
, Callback<Void> cb
|
|
||||||
);
|
);
|
||||||
/**
|
/**
|
||||||
* Delete user
|
* Delete user
|
||||||
@ -129,12 +99,7 @@ public interface UserApi {
|
|||||||
|
|
||||||
@DELETE("/user/{username}")
|
@DELETE("/user/{username}")
|
||||||
Void deleteUser(
|
Void deleteUser(
|
||||||
|
@retrofit.http.Path("username") String username
|
||||||
@retrofit.http.Path("username") String username
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -147,12 +112,7 @@ public interface UserApi {
|
|||||||
|
|
||||||
@DELETE("/user/{username}")
|
@DELETE("/user/{username}")
|
||||||
void deleteUser(
|
void deleteUser(
|
||||||
|
@retrofit.http.Path("username") String username, Callback<Void> cb
|
||||||
@retrofit.http.Path("username") String username
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
, Callback<Void> cb
|
|
||||||
);
|
);
|
||||||
/**
|
/**
|
||||||
* Get user by user name
|
* Get user by user name
|
||||||
@ -164,12 +124,7 @@ public interface UserApi {
|
|||||||
|
|
||||||
@GET("/user/{username}")
|
@GET("/user/{username}")
|
||||||
User getUserByName(
|
User getUserByName(
|
||||||
|
@retrofit.http.Path("username") String username
|
||||||
@retrofit.http.Path("username") String username
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -182,12 +137,7 @@ public interface UserApi {
|
|||||||
|
|
||||||
@GET("/user/{username}")
|
@GET("/user/{username}")
|
||||||
void getUserByName(
|
void getUserByName(
|
||||||
|
@retrofit.http.Path("username") String username, Callback<User> cb
|
||||||
@retrofit.http.Path("username") String username
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
, Callback<User> cb
|
|
||||||
);
|
);
|
||||||
/**
|
/**
|
||||||
* Logs user into the system
|
* Logs user into the system
|
||||||
@ -200,17 +150,7 @@ public interface UserApi {
|
|||||||
|
|
||||||
@GET("/user/login")
|
@GET("/user/login")
|
||||||
String loginUser(
|
String loginUser(
|
||||||
@retrofit.http.Query("username") String username
|
@retrofit.http.Query("username") String username, @retrofit.http.Query("password") String password
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
, @retrofit.http.Query("password") String password
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -224,17 +164,7 @@ public interface UserApi {
|
|||||||
|
|
||||||
@GET("/user/login")
|
@GET("/user/login")
|
||||||
void loginUser(
|
void loginUser(
|
||||||
@retrofit.http.Query("username") String username
|
@retrofit.http.Query("username") String username, @retrofit.http.Query("password") String password, Callback<String> cb
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
, @retrofit.http.Query("password") String password
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
, Callback<String> cb
|
|
||||||
);
|
);
|
||||||
/**
|
/**
|
||||||
* Logs out current logged in user session
|
* Logs out current logged in user session
|
||||||
@ -269,17 +199,7 @@ public interface UserApi {
|
|||||||
|
|
||||||
@PUT("/user/{username}")
|
@PUT("/user/{username}")
|
||||||
Void updateUser(
|
Void updateUser(
|
||||||
|
@retrofit.http.Path("username") String username, @retrofit.http.Body User body
|
||||||
@retrofit.http.Path("username") String username
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
,
|
|
||||||
|
|
||||||
|
|
||||||
@retrofit.http.Body User body
|
|
||||||
|
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -293,16 +213,6 @@ public interface UserApi {
|
|||||||
|
|
||||||
@PUT("/user/{username}")
|
@PUT("/user/{username}")
|
||||||
void updateUser(
|
void updateUser(
|
||||||
|
@retrofit.http.Path("username") String username, @retrofit.http.Body User body, Callback<Void> cb
|
||||||
@retrofit.http.Path("username") String username
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
,
|
|
||||||
|
|
||||||
|
|
||||||
@retrofit.http.Body User body
|
|
||||||
|
|
||||||
, Callback<Void> cb
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
180
samples/client/petstore/java/retrofit2/gradlew.bat
vendored
180
samples/client/petstore/java/retrofit2/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
|
||||||
|
@ -10,8 +10,8 @@ import okhttp3.RequestBody;
|
|||||||
|
|
||||||
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;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
@ -28,12 +28,7 @@ public interface FakeApi {
|
|||||||
|
|
||||||
@PATCH("fake")
|
@PATCH("fake")
|
||||||
Call<Client> testClientModel(
|
Call<Client> testClientModel(
|
||||||
|
@retrofit2.http.Body Client body
|
||||||
|
|
||||||
|
|
||||||
@retrofit2.http.Body Client body
|
|
||||||
|
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -59,77 +54,7 @@ public interface FakeApi {
|
|||||||
@retrofit2.http.FormUrlEncoded
|
@retrofit2.http.FormUrlEncoded
|
||||||
@POST("fake")
|
@POST("fake")
|
||||||
Call<Void> testEndpointParameters(
|
Call<Void> testEndpointParameters(
|
||||||
|
@retrofit2.http.Field("number") BigDecimal number, @retrofit2.http.Field("double") Double _double, @retrofit2.http.Field("pattern_without_delimiter") String patternWithoutDelimiter, @retrofit2.http.Field("byte") byte[] _byte, @retrofit2.http.Field("integer") Integer integer, @retrofit2.http.Field("int32") Integer int32, @retrofit2.http.Field("int64") Long int64, @retrofit2.http.Field("float") Float _float, @retrofit2.http.Field("string") String string, @retrofit2.http.Field("binary") byte[] binary, @retrofit2.http.Field("date") LocalDate date, @retrofit2.http.Field("dateTime") DateTime dateTime, @retrofit2.http.Field("password") String password, @retrofit2.http.Field("callback") String paramCallback
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@retrofit2.http.Field("number") BigDecimal number
|
|
||||||
,
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@retrofit2.http.Field("double") Double _double
|
|
||||||
,
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@retrofit2.http.Field("pattern_without_delimiter") String patternWithoutDelimiter
|
|
||||||
,
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@retrofit2.http.Field("byte") byte[] _byte
|
|
||||||
,
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@retrofit2.http.Field("integer") Integer integer
|
|
||||||
,
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@retrofit2.http.Field("int32") Integer int32
|
|
||||||
,
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@retrofit2.http.Field("int64") Long int64
|
|
||||||
,
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@retrofit2.http.Field("float") Float _float
|
|
||||||
,
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@retrofit2.http.Field("string") String string
|
|
||||||
,
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@retrofit2.http.Field("binary") byte[] binary
|
|
||||||
,
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@retrofit2.http.Field("date") LocalDate date
|
|
||||||
,
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@retrofit2.http.Field("dateTime") DateTime dateTime
|
|
||||||
,
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@retrofit2.http.Field("password") String password
|
|
||||||
,
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@retrofit2.http.Field("callback") String paramCallback
|
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -149,47 +74,7 @@ public interface FakeApi {
|
|||||||
@retrofit2.http.FormUrlEncoded
|
@retrofit2.http.FormUrlEncoded
|
||||||
@GET("fake")
|
@GET("fake")
|
||||||
Call<Void> testEnumParameters(
|
Call<Void> testEnumParameters(
|
||||||
|
@retrofit2.http.Field("enum_form_string_array") List<String> enumFormStringArray, @retrofit2.http.Field("enum_form_string") String enumFormString, @retrofit2.http.Header("enum_header_string_array") List<String> enumHeaderStringArray, @retrofit2.http.Header("enum_header_string") String enumHeaderString, @retrofit2.http.Query("enum_query_string_array") CSVParams enumQueryStringArray, @retrofit2.http.Query("enum_query_string") String enumQueryString, @retrofit2.http.Query("enum_query_integer") BigDecimal enumQueryInteger, @retrofit2.http.Field("enum_query_double") Double enumQueryDouble
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@retrofit2.http.Field("enum_form_string_array") List<String> enumFormStringArray
|
|
||||||
,
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@retrofit2.http.Field("enum_form_string") String enumFormString
|
|
||||||
,
|
|
||||||
|
|
||||||
@retrofit2.http.Header("enum_header_string_array") List<String> enumHeaderStringArray
|
|
||||||
|
|
||||||
|
|
||||||
,
|
|
||||||
|
|
||||||
@retrofit2.http.Header("enum_header_string") String enumHeaderString
|
|
||||||
|
|
||||||
|
|
||||||
, @retrofit2.http.Query("enum_query_string_array") CSVParams enumQueryStringArray
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
, @retrofit2.http.Query("enum_query_string") String enumQueryString
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
, @retrofit2.http.Query("enum_query_integer") BigDecimal enumQueryInteger
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
,
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@retrofit2.http.Field("enum_query_double") Double enumQueryDouble
|
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -9,8 +9,8 @@ import retrofit2.http.*;
|
|||||||
import okhttp3.RequestBody;
|
import okhttp3.RequestBody;
|
||||||
|
|
||||||
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;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
@ -27,12 +27,7 @@ public interface PetApi {
|
|||||||
|
|
||||||
@POST("pet")
|
@POST("pet")
|
||||||
Call<Void> addPet(
|
Call<Void> addPet(
|
||||||
|
@retrofit2.http.Body Pet body
|
||||||
|
|
||||||
|
|
||||||
@retrofit2.http.Body Pet body
|
|
||||||
|
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -45,17 +40,7 @@ public interface PetApi {
|
|||||||
|
|
||||||
@DELETE("pet/{petId}")
|
@DELETE("pet/{petId}")
|
||||||
Call<Void> deletePet(
|
Call<Void> deletePet(
|
||||||
|
@retrofit2.http.Path("petId") Long petId, @retrofit2.http.Header("api_key") String apiKey
|
||||||
@retrofit2.http.Path("petId") Long petId
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
,
|
|
||||||
|
|
||||||
@retrofit2.http.Header("api_key") String apiKey
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -68,11 +53,6 @@ public interface PetApi {
|
|||||||
@GET("pet/findByStatus")
|
@GET("pet/findByStatus")
|
||||||
Call<List<Pet>> findPetsByStatus(
|
Call<List<Pet>> findPetsByStatus(
|
||||||
@retrofit2.http.Query("status") CSVParams status
|
@retrofit2.http.Query("status") CSVParams status
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -85,11 +65,6 @@ public interface PetApi {
|
|||||||
@GET("pet/findByTags")
|
@GET("pet/findByTags")
|
||||||
Call<List<Pet>> findPetsByTags(
|
Call<List<Pet>> findPetsByTags(
|
||||||
@retrofit2.http.Query("tags") CSVParams tags
|
@retrofit2.http.Query("tags") CSVParams tags
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -101,12 +76,7 @@ public interface PetApi {
|
|||||||
|
|
||||||
@GET("pet/{petId}")
|
@GET("pet/{petId}")
|
||||||
Call<Pet> getPetById(
|
Call<Pet> getPetById(
|
||||||
|
@retrofit2.http.Path("petId") Long petId
|
||||||
@retrofit2.http.Path("petId") Long petId
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -118,12 +88,7 @@ public interface PetApi {
|
|||||||
|
|
||||||
@PUT("pet")
|
@PUT("pet")
|
||||||
Call<Void> updatePet(
|
Call<Void> updatePet(
|
||||||
|
@retrofit2.http.Body Pet body
|
||||||
|
|
||||||
|
|
||||||
@retrofit2.http.Body Pet body
|
|
||||||
|
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -138,22 +103,7 @@ public interface PetApi {
|
|||||||
@retrofit2.http.FormUrlEncoded
|
@retrofit2.http.FormUrlEncoded
|
||||||
@POST("pet/{petId}")
|
@POST("pet/{petId}")
|
||||||
Call<Void> updatePetWithForm(
|
Call<Void> updatePetWithForm(
|
||||||
|
@retrofit2.http.Path("petId") Long petId, @retrofit2.http.Field("name") String name, @retrofit2.http.Field("status") String status
|
||||||
@retrofit2.http.Path("petId") Long petId
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
,
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@retrofit2.http.Field("name") String name
|
|
||||||
,
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@retrofit2.http.Field("status") String status
|
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -168,22 +118,7 @@ public interface PetApi {
|
|||||||
@retrofit2.http.Multipart
|
@retrofit2.http.Multipart
|
||||||
@POST("pet/{petId}/uploadImage")
|
@POST("pet/{petId}/uploadImage")
|
||||||
Call<ModelApiResponse> uploadFile(
|
Call<ModelApiResponse> uploadFile(
|
||||||
|
@retrofit2.http.Path("petId") Long petId, @retrofit2.http.Part("additionalMetadata") String additionalMetadata, @retrofit2.http.Part("file\"; filename=\"file") RequestBody file
|
||||||
@retrofit2.http.Path("petId") Long petId
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
,
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@retrofit2.http.Part("additionalMetadata") String additionalMetadata
|
|
||||||
,
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@retrofit2.http.Part("file\"; filename=\"file") RequestBody file
|
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -25,12 +25,7 @@ public interface StoreApi {
|
|||||||
|
|
||||||
@DELETE("store/order/{orderId}")
|
@DELETE("store/order/{orderId}")
|
||||||
Call<Void> deleteOrder(
|
Call<Void> deleteOrder(
|
||||||
|
@retrofit2.http.Path("orderId") String orderId
|
||||||
@retrofit2.http.Path("orderId") String orderId
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -52,12 +47,7 @@ public interface StoreApi {
|
|||||||
|
|
||||||
@GET("store/order/{orderId}")
|
@GET("store/order/{orderId}")
|
||||||
Call<Order> getOrderById(
|
Call<Order> getOrderById(
|
||||||
|
@retrofit2.http.Path("orderId") Long orderId
|
||||||
@retrofit2.http.Path("orderId") Long orderId
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -69,12 +59,7 @@ public interface StoreApi {
|
|||||||
|
|
||||||
@POST("store/order")
|
@POST("store/order")
|
||||||
Call<Order> placeOrder(
|
Call<Order> placeOrder(
|
||||||
|
@retrofit2.http.Body Order body
|
||||||
|
|
||||||
|
|
||||||
@retrofit2.http.Body Order body
|
|
||||||
|
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -25,12 +25,7 @@ public interface UserApi {
|
|||||||
|
|
||||||
@POST("user")
|
@POST("user")
|
||||||
Call<Void> createUser(
|
Call<Void> createUser(
|
||||||
|
@retrofit2.http.Body User body
|
||||||
|
|
||||||
|
|
||||||
@retrofit2.http.Body User body
|
|
||||||
|
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -42,12 +37,7 @@ public interface UserApi {
|
|||||||
|
|
||||||
@POST("user/createWithArray")
|
@POST("user/createWithArray")
|
||||||
Call<Void> createUsersWithArrayInput(
|
Call<Void> createUsersWithArrayInput(
|
||||||
|
@retrofit2.http.Body List<User> body
|
||||||
|
|
||||||
|
|
||||||
@retrofit2.http.Body List<User> body
|
|
||||||
|
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -59,12 +49,7 @@ public interface UserApi {
|
|||||||
|
|
||||||
@POST("user/createWithList")
|
@POST("user/createWithList")
|
||||||
Call<Void> createUsersWithListInput(
|
Call<Void> createUsersWithListInput(
|
||||||
|
@retrofit2.http.Body List<User> body
|
||||||
|
|
||||||
|
|
||||||
@retrofit2.http.Body List<User> body
|
|
||||||
|
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -76,12 +61,7 @@ public interface UserApi {
|
|||||||
|
|
||||||
@DELETE("user/{username}")
|
@DELETE("user/{username}")
|
||||||
Call<Void> deleteUser(
|
Call<Void> deleteUser(
|
||||||
|
@retrofit2.http.Path("username") String username
|
||||||
@retrofit2.http.Path("username") String username
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -93,12 +73,7 @@ public interface UserApi {
|
|||||||
|
|
||||||
@GET("user/{username}")
|
@GET("user/{username}")
|
||||||
Call<User> getUserByName(
|
Call<User> getUserByName(
|
||||||
|
@retrofit2.http.Path("username") String username
|
||||||
@retrofit2.http.Path("username") String username
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -111,17 +86,7 @@ public interface UserApi {
|
|||||||
|
|
||||||
@GET("user/login")
|
@GET("user/login")
|
||||||
Call<String> loginUser(
|
Call<String> loginUser(
|
||||||
@retrofit2.http.Query("username") String username
|
@retrofit2.http.Query("username") String username, @retrofit2.http.Query("password") String password
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
, @retrofit2.http.Query("password") String password
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -144,17 +109,7 @@ public interface UserApi {
|
|||||||
|
|
||||||
@PUT("user/{username}")
|
@PUT("user/{username}")
|
||||||
Call<Void> updateUser(
|
Call<Void> updateUser(
|
||||||
|
@retrofit2.http.Path("username") String username, @retrofit2.http.Body User body
|
||||||
@retrofit2.http.Path("username") String username
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
,
|
|
||||||
|
|
||||||
|
|
||||||
@retrofit2.http.Body User body
|
|
||||||
|
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -54,7 +54,7 @@ No authorization required
|
|||||||
|
|
||||||
<a name="testEndpointParameters"></a>
|
<a name="testEndpointParameters"></a>
|
||||||
# **testEndpointParameters**
|
# **testEndpointParameters**
|
||||||
> Void testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password)
|
> Void 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 {
|
||||||
Void result = apiInstance.testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password);
|
Void result = apiInstance.testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback);
|
||||||
System.out.println(result);
|
System.out.println(result);
|
||||||
} catch (ApiException e) {
|
} catch (ApiException e) {
|
||||||
System.err.println("Exception when calling FakeApi#testEndpointParameters");
|
System.err.println("Exception when calling FakeApi#testEndpointParameters");
|
||||||
@ -116,6 +117,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/retrofit2rx/gradlew.bat
vendored
180
samples/client/petstore/java/retrofit2rx/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
|
||||||
|
@ -10,8 +10,8 @@ import okhttp3.RequestBody;
|
|||||||
|
|
||||||
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;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
@ -28,12 +28,7 @@ public interface FakeApi {
|
|||||||
|
|
||||||
@PATCH("fake")
|
@PATCH("fake")
|
||||||
Observable<Client> testClientModel(
|
Observable<Client> testClientModel(
|
||||||
|
@retrofit2.http.Body Client body
|
||||||
|
|
||||||
|
|
||||||
@retrofit2.http.Body Client body
|
|
||||||
|
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -59,77 +54,7 @@ public interface FakeApi {
|
|||||||
@retrofit2.http.FormUrlEncoded
|
@retrofit2.http.FormUrlEncoded
|
||||||
@POST("fake")
|
@POST("fake")
|
||||||
Observable<Void> testEndpointParameters(
|
Observable<Void> testEndpointParameters(
|
||||||
|
@retrofit2.http.Field("number") BigDecimal number, @retrofit2.http.Field("double") Double _double, @retrofit2.http.Field("pattern_without_delimiter") String patternWithoutDelimiter, @retrofit2.http.Field("byte") byte[] _byte, @retrofit2.http.Field("integer") Integer integer, @retrofit2.http.Field("int32") Integer int32, @retrofit2.http.Field("int64") Long int64, @retrofit2.http.Field("float") Float _float, @retrofit2.http.Field("string") String string, @retrofit2.http.Field("binary") byte[] binary, @retrofit2.http.Field("date") LocalDate date, @retrofit2.http.Field("dateTime") DateTime dateTime, @retrofit2.http.Field("password") String password, @retrofit2.http.Field("callback") String paramCallback
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@retrofit2.http.Field("number") BigDecimal number
|
|
||||||
,
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@retrofit2.http.Field("double") Double _double
|
|
||||||
,
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@retrofit2.http.Field("pattern_without_delimiter") String patternWithoutDelimiter
|
|
||||||
,
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@retrofit2.http.Field("byte") byte[] _byte
|
|
||||||
,
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@retrofit2.http.Field("integer") Integer integer
|
|
||||||
,
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@retrofit2.http.Field("int32") Integer int32
|
|
||||||
,
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@retrofit2.http.Field("int64") Long int64
|
|
||||||
,
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@retrofit2.http.Field("float") Float _float
|
|
||||||
,
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@retrofit2.http.Field("string") String string
|
|
||||||
,
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@retrofit2.http.Field("binary") byte[] binary
|
|
||||||
,
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@retrofit2.http.Field("date") LocalDate date
|
|
||||||
,
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@retrofit2.http.Field("dateTime") DateTime dateTime
|
|
||||||
,
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@retrofit2.http.Field("password") String password
|
|
||||||
,
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@retrofit2.http.Field("callback") String paramCallback
|
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -149,47 +74,7 @@ public interface FakeApi {
|
|||||||
@retrofit2.http.FormUrlEncoded
|
@retrofit2.http.FormUrlEncoded
|
||||||
@GET("fake")
|
@GET("fake")
|
||||||
Observable<Void> testEnumParameters(
|
Observable<Void> testEnumParameters(
|
||||||
|
@retrofit2.http.Field("enum_form_string_array") List<String> enumFormStringArray, @retrofit2.http.Field("enum_form_string") String enumFormString, @retrofit2.http.Header("enum_header_string_array") List<String> enumHeaderStringArray, @retrofit2.http.Header("enum_header_string") String enumHeaderString, @retrofit2.http.Query("enum_query_string_array") CSVParams enumQueryStringArray, @retrofit2.http.Query("enum_query_string") String enumQueryString, @retrofit2.http.Query("enum_query_integer") BigDecimal enumQueryInteger, @retrofit2.http.Field("enum_query_double") Double enumQueryDouble
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@retrofit2.http.Field("enum_form_string_array") List<String> enumFormStringArray
|
|
||||||
,
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@retrofit2.http.Field("enum_form_string") String enumFormString
|
|
||||||
,
|
|
||||||
|
|
||||||
@retrofit2.http.Header("enum_header_string_array") List<String> enumHeaderStringArray
|
|
||||||
|
|
||||||
|
|
||||||
,
|
|
||||||
|
|
||||||
@retrofit2.http.Header("enum_header_string") String enumHeaderString
|
|
||||||
|
|
||||||
|
|
||||||
, @retrofit2.http.Query("enum_query_string_array") CSVParams enumQueryStringArray
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
, @retrofit2.http.Query("enum_query_string") String enumQueryString
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
, @retrofit2.http.Query("enum_query_integer") BigDecimal enumQueryInteger
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
,
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@retrofit2.http.Field("enum_query_double") Double enumQueryDouble
|
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -9,8 +9,8 @@ import retrofit2.http.*;
|
|||||||
import okhttp3.RequestBody;
|
import okhttp3.RequestBody;
|
||||||
|
|
||||||
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;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
@ -27,12 +27,7 @@ public interface PetApi {
|
|||||||
|
|
||||||
@POST("pet")
|
@POST("pet")
|
||||||
Observable<Void> addPet(
|
Observable<Void> addPet(
|
||||||
|
@retrofit2.http.Body Pet body
|
||||||
|
|
||||||
|
|
||||||
@retrofit2.http.Body Pet body
|
|
||||||
|
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -45,17 +40,7 @@ public interface PetApi {
|
|||||||
|
|
||||||
@DELETE("pet/{petId}")
|
@DELETE("pet/{petId}")
|
||||||
Observable<Void> deletePet(
|
Observable<Void> deletePet(
|
||||||
|
@retrofit2.http.Path("petId") Long petId, @retrofit2.http.Header("api_key") String apiKey
|
||||||
@retrofit2.http.Path("petId") Long petId
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
,
|
|
||||||
|
|
||||||
@retrofit2.http.Header("api_key") String apiKey
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -68,11 +53,6 @@ public interface PetApi {
|
|||||||
@GET("pet/findByStatus")
|
@GET("pet/findByStatus")
|
||||||
Observable<List<Pet>> findPetsByStatus(
|
Observable<List<Pet>> findPetsByStatus(
|
||||||
@retrofit2.http.Query("status") CSVParams status
|
@retrofit2.http.Query("status") CSVParams status
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -85,11 +65,6 @@ public interface PetApi {
|
|||||||
@GET("pet/findByTags")
|
@GET("pet/findByTags")
|
||||||
Observable<List<Pet>> findPetsByTags(
|
Observable<List<Pet>> findPetsByTags(
|
||||||
@retrofit2.http.Query("tags") CSVParams tags
|
@retrofit2.http.Query("tags") CSVParams tags
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -101,12 +76,7 @@ public interface PetApi {
|
|||||||
|
|
||||||
@GET("pet/{petId}")
|
@GET("pet/{petId}")
|
||||||
Observable<Pet> getPetById(
|
Observable<Pet> getPetById(
|
||||||
|
@retrofit2.http.Path("petId") Long petId
|
||||||
@retrofit2.http.Path("petId") Long petId
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -118,12 +88,7 @@ public interface PetApi {
|
|||||||
|
|
||||||
@PUT("pet")
|
@PUT("pet")
|
||||||
Observable<Void> updatePet(
|
Observable<Void> updatePet(
|
||||||
|
@retrofit2.http.Body Pet body
|
||||||
|
|
||||||
|
|
||||||
@retrofit2.http.Body Pet body
|
|
||||||
|
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -138,22 +103,7 @@ public interface PetApi {
|
|||||||
@retrofit2.http.FormUrlEncoded
|
@retrofit2.http.FormUrlEncoded
|
||||||
@POST("pet/{petId}")
|
@POST("pet/{petId}")
|
||||||
Observable<Void> updatePetWithForm(
|
Observable<Void> updatePetWithForm(
|
||||||
|
@retrofit2.http.Path("petId") Long petId, @retrofit2.http.Field("name") String name, @retrofit2.http.Field("status") String status
|
||||||
@retrofit2.http.Path("petId") Long petId
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
,
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@retrofit2.http.Field("name") String name
|
|
||||||
,
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@retrofit2.http.Field("status") String status
|
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -168,22 +118,7 @@ public interface PetApi {
|
|||||||
@retrofit2.http.Multipart
|
@retrofit2.http.Multipart
|
||||||
@POST("pet/{petId}/uploadImage")
|
@POST("pet/{petId}/uploadImage")
|
||||||
Observable<ModelApiResponse> uploadFile(
|
Observable<ModelApiResponse> uploadFile(
|
||||||
|
@retrofit2.http.Path("petId") Long petId, @retrofit2.http.Part("additionalMetadata") String additionalMetadata, @retrofit2.http.Part("file\"; filename=\"file") RequestBody file
|
||||||
@retrofit2.http.Path("petId") Long petId
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
,
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@retrofit2.http.Part("additionalMetadata") String additionalMetadata
|
|
||||||
,
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@retrofit2.http.Part("file\"; filename=\"file") RequestBody file
|
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -25,12 +25,7 @@ public interface StoreApi {
|
|||||||
|
|
||||||
@DELETE("store/order/{orderId}")
|
@DELETE("store/order/{orderId}")
|
||||||
Observable<Void> deleteOrder(
|
Observable<Void> deleteOrder(
|
||||||
|
@retrofit2.http.Path("orderId") String orderId
|
||||||
@retrofit2.http.Path("orderId") String orderId
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -52,12 +47,7 @@ public interface StoreApi {
|
|||||||
|
|
||||||
@GET("store/order/{orderId}")
|
@GET("store/order/{orderId}")
|
||||||
Observable<Order> getOrderById(
|
Observable<Order> getOrderById(
|
||||||
|
@retrofit2.http.Path("orderId") Long orderId
|
||||||
@retrofit2.http.Path("orderId") Long orderId
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -69,12 +59,7 @@ public interface StoreApi {
|
|||||||
|
|
||||||
@POST("store/order")
|
@POST("store/order")
|
||||||
Observable<Order> placeOrder(
|
Observable<Order> placeOrder(
|
||||||
|
@retrofit2.http.Body Order body
|
||||||
|
|
||||||
|
|
||||||
@retrofit2.http.Body Order body
|
|
||||||
|
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -25,12 +25,7 @@ public interface UserApi {
|
|||||||
|
|
||||||
@POST("user")
|
@POST("user")
|
||||||
Observable<Void> createUser(
|
Observable<Void> createUser(
|
||||||
|
@retrofit2.http.Body User body
|
||||||
|
|
||||||
|
|
||||||
@retrofit2.http.Body User body
|
|
||||||
|
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -42,12 +37,7 @@ public interface UserApi {
|
|||||||
|
|
||||||
@POST("user/createWithArray")
|
@POST("user/createWithArray")
|
||||||
Observable<Void> createUsersWithArrayInput(
|
Observable<Void> createUsersWithArrayInput(
|
||||||
|
@retrofit2.http.Body List<User> body
|
||||||
|
|
||||||
|
|
||||||
@retrofit2.http.Body List<User> body
|
|
||||||
|
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -59,12 +49,7 @@ public interface UserApi {
|
|||||||
|
|
||||||
@POST("user/createWithList")
|
@POST("user/createWithList")
|
||||||
Observable<Void> createUsersWithListInput(
|
Observable<Void> createUsersWithListInput(
|
||||||
|
@retrofit2.http.Body List<User> body
|
||||||
|
|
||||||
|
|
||||||
@retrofit2.http.Body List<User> body
|
|
||||||
|
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -76,12 +61,7 @@ public interface UserApi {
|
|||||||
|
|
||||||
@DELETE("user/{username}")
|
@DELETE("user/{username}")
|
||||||
Observable<Void> deleteUser(
|
Observable<Void> deleteUser(
|
||||||
|
@retrofit2.http.Path("username") String username
|
||||||
@retrofit2.http.Path("username") String username
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -93,12 +73,7 @@ public interface UserApi {
|
|||||||
|
|
||||||
@GET("user/{username}")
|
@GET("user/{username}")
|
||||||
Observable<User> getUserByName(
|
Observable<User> getUserByName(
|
||||||
|
@retrofit2.http.Path("username") String username
|
||||||
@retrofit2.http.Path("username") String username
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -111,17 +86,7 @@ public interface UserApi {
|
|||||||
|
|
||||||
@GET("user/login")
|
@GET("user/login")
|
||||||
Observable<String> loginUser(
|
Observable<String> loginUser(
|
||||||
@retrofit2.http.Query("username") String username
|
@retrofit2.http.Query("username") String username, @retrofit2.http.Query("password") String password
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
, @retrofit2.http.Query("password") String password
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -144,17 +109,7 @@ public interface UserApi {
|
|||||||
|
|
||||||
@PUT("user/{username}")
|
@PUT("user/{username}")
|
||||||
Observable<Void> updateUser(
|
Observable<Void> updateUser(
|
||||||
|
@retrofit2.http.Path("username") String username, @retrofit2.http.Body User body
|
||||||
@retrofit2.http.Path("username") String username
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
,
|
|
||||||
|
|
||||||
|
|
||||||
@retrofit2.http.Body User body
|
|
||||||
|
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user