Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,16 @@ public interface {{classname}} {
{{/allParams}}
* @return Call<{{#returnType}}{{returnType}}{{/returnType}}{{^returnType}}Object{{/returnType}}>
*/
{{#formParams}}{{#-first}}
{{#isMultipart}}@retrofit2.http.Multipart{{/isMultipart}}{{^isMultipart}}@retrofit2.http.FormUrlEncoded{{/isMultipart}}{{/-first}}{{/formParams}}
{{#formParams}}
{{#-first}}
{{#isMultipart}}@retrofit2.http.Multipart{{/isMultipart}}{{^isMultipart}}@retrofit2.http.FormUrlEncoded{{/isMultipart}}
{{/-first}}
{{/formParams}}
{{^formParams}}
{{#prioritizedContentTypes}}
{{#-first}}
@Headers({
"Content-Type:{{mediaType}}"
"Content-Type:{{mediaType}}"
})
{{/-first}}
{{/prioritizedContentTypes}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,8 @@ public interface FakeApi {
* @param body client model (required)
* @return Call<Client>
*/

@Headers({
"Content-Type:application/json"
"Content-Type:application/json"
})
@PATCH("fake")
F.Promise<Response<Client>> testClientModel(
Expand All @@ -57,7 +56,6 @@ F.Promise<Response<Client>> testClientModel(
* @param paramCallback None (optional)
* @return Call&lt;Void&gt;
*/

@retrofit2.http.FormUrlEncoded
@POST("fake")
F.Promise<Response<Void>> testEndpointParameters(
Expand All @@ -77,7 +75,6 @@ F.Promise<Response<Void>> testEndpointParameters(
* @param enumQueryDouble Query parameter enum test (double) (optional)
* @return Call&lt;Void&gt;
*/

@retrofit2.http.FormUrlEncoded
@GET("fake")
F.Promise<Response<Void>> testEnumParameters(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,8 @@ public interface PetApi {
* @param body Pet object that needs to be added to the store (required)
* @return Call&lt;Void&gt;
*/

@Headers({
"Content-Type:application/json"
"Content-Type:application/json"
})
@POST("pet")
F.Promise<Response<Void>> addPet(
Expand All @@ -44,7 +43,6 @@ F.Promise<Response<Void>> addPet(
* @param apiKey (optional)
* @return Call&lt;Void&gt;
*/

@DELETE("pet/{petId}")
F.Promise<Response<Void>> deletePet(
@retrofit2.http.Path("petId") Long petId, @retrofit2.http.Header("api_key") String apiKey
Expand All @@ -56,7 +54,6 @@ F.Promise<Response<Void>> deletePet(
* @param status Status values that need to be considered for filter (required)
* @return Call&lt;List&lt;Pet&gt;&gt;
*/

@GET("pet/findByStatus")
F.Promise<Response<List<Pet>>> findPetsByStatus(
@retrofit2.http.Query("status") CSVParams status
Expand All @@ -68,7 +65,6 @@ F.Promise<Response<List<Pet>>> findPetsByStatus(
* @param tags Tags to filter by (required)
* @return Call&lt;List&lt;Pet&gt;&gt;
*/

@GET("pet/findByTags")
F.Promise<Response<List<Pet>>> findPetsByTags(
@retrofit2.http.Query("tags") CSVParams tags
Expand All @@ -80,7 +76,6 @@ F.Promise<Response<List<Pet>>> findPetsByTags(
* @param petId ID of pet to return (required)
* @return Call&lt;Pet&gt;
*/

@GET("pet/{petId}")
F.Promise<Response<Pet>> getPetById(
@retrofit2.http.Path("petId") Long petId
Expand All @@ -92,9 +87,8 @@ F.Promise<Response<Pet>> getPetById(
* @param body Pet object that needs to be added to the store (required)
* @return Call&lt;Void&gt;
*/

@Headers({
"Content-Type:application/json"
"Content-Type:application/json"
})
@PUT("pet")
F.Promise<Response<Void>> updatePet(
Expand All @@ -109,7 +103,6 @@ F.Promise<Response<Void>> updatePet(
* @param status Updated status of the pet (optional)
* @return Call&lt;Void&gt;
*/

@retrofit2.http.FormUrlEncoded
@POST("pet/{petId}")
F.Promise<Response<Void>> updatePetWithForm(
Expand All @@ -124,7 +117,6 @@ F.Promise<Response<Void>> updatePetWithForm(
* @param file file to upload (optional)
* @return Call&lt;ModelApiResponse&gt;
*/

@retrofit2.http.Multipart
@POST("pet/{petId}/uploadImage")
F.Promise<Response<ModelApiResponse>> uploadFile(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ public interface StoreApi {
* @param orderId ID of the order that needs to be deleted (required)
* @return Call&lt;Void&gt;
*/

@DELETE("store/order/{orderId}")
F.Promise<Response<Void>> deleteOrder(
@retrofit2.http.Path("orderId") String orderId
Expand All @@ -37,7 +36,6 @@ F.Promise<Response<Void>> deleteOrder(
* Returns a map of status codes to quantities
* @return Call&lt;Map&lt;String, Integer&gt;&gt;
*/

@GET("store/inventory")
F.Promise<Response<Map<String, Integer>>> getInventory();

Expand All @@ -48,7 +46,6 @@ F.Promise<Response<Void>> deleteOrder(
* @param orderId ID of pet that needs to be fetched (required)
* @return Call&lt;Order&gt;
*/

@GET("store/order/{orderId}")
F.Promise<Response<Order>> getOrderById(
@retrofit2.http.Path("orderId") Long orderId
Expand All @@ -60,7 +57,6 @@ F.Promise<Response<Order>> getOrderById(
* @param body order placed for purchasing the pet (required)
* @return Call&lt;Order&gt;
*/

@POST("store/order")
F.Promise<Response<Order>> placeOrder(
@retrofit2.http.Body Order body
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ public interface UserApi {
* @param body Created user object (required)
* @return Call&lt;Void&gt;
*/

@POST("user")
F.Promise<Response<Void>> createUser(
@retrofit2.http.Body User body
Expand All @@ -38,7 +37,6 @@ F.Promise<Response<Void>> createUser(
* @param body List of user object (required)
* @return Call&lt;Void&gt;
*/

@POST("user/createWithArray")
F.Promise<Response<Void>> createUsersWithArrayInput(
@retrofit2.http.Body List<User> body
Expand All @@ -50,7 +48,6 @@ F.Promise<Response<Void>> createUsersWithArrayInput(
* @param body List of user object (required)
* @return Call&lt;Void&gt;
*/

@POST("user/createWithList")
F.Promise<Response<Void>> createUsersWithListInput(
@retrofit2.http.Body List<User> body
Expand All @@ -62,7 +59,6 @@ F.Promise<Response<Void>> createUsersWithListInput(
* @param username The name that needs to be deleted (required)
* @return Call&lt;Void&gt;
*/

@DELETE("user/{username}")
F.Promise<Response<Void>> deleteUser(
@retrofit2.http.Path("username") String username
Expand All @@ -74,7 +70,6 @@ F.Promise<Response<Void>> deleteUser(
* @param username The name that needs to be fetched. Use user1 for testing. (required)
* @return Call&lt;User&gt;
*/

@GET("user/{username}")
F.Promise<Response<User>> getUserByName(
@retrofit2.http.Path("username") String username
Expand All @@ -87,7 +82,6 @@ F.Promise<Response<User>> getUserByName(
* @param password The password for login in clear text (required)
* @return Call&lt;String&gt;
*/

@GET("user/login")
F.Promise<Response<String>> loginUser(
@retrofit2.http.Query("username") String username, @retrofit2.http.Query("password") String password
Expand All @@ -98,7 +92,6 @@ F.Promise<Response<String>> loginUser(
*
* @return Call&lt;Void&gt;
*/

@GET("user/logout")
F.Promise<Response<Void>> logoutUser();

Expand All @@ -110,7 +103,6 @@ F.Promise<Response<String>> loginUser(
* @param body Updated user object (required)
* @return Call&lt;Void&gt;
*/

@PUT("user/{username}")
F.Promise<Response<Void>> updateUser(
@retrofit2.http.Path("username") String username, @retrofit2.http.Body User body
Expand Down
Loading