forked from loafle/openapi-generator-original
Retrofit: fix form field naming by using baseName
This commit is contained in:
parent
e879268043
commit
a134b5ca76
@ -1 +1 @@
|
|||||||
{{#isFormParam}}{{#notFile}}{{#isMultipart}}@Part{{/isMultipart}}{{^isMultipart}}@Field{{/isMultipart}}("{{paramName}}") {{{dataType}}} {{paramName}}{{/notFile}}{{#isFile}}{{#isMultipart}}@Part{{/isMultipart}}{{^isMultipart}}@Field{{/isMultipart}}("{{paramName}}") TypedFile {{paramName}}{{/isFile}}{{/isFormParam}}
|
{{#isFormParam}}{{#notFile}}{{#isMultipart}}@Part{{/isMultipart}}{{^isMultipart}}@Field{{/isMultipart}}("{{baseName}}") {{{dataType}}} {{paramName}}{{/notFile}}{{#isFile}}{{#isMultipart}}@Part{{/isMultipart}}{{^isMultipart}}@Field{{/isMultipart}}("{{baseName}}") TypedFile {{paramName}}{{/isFile}}{{/isFormParam}}
|
@ -89,14 +89,14 @@ public interface PetApi {
|
|||||||
/**
|
/**
|
||||||
* Deletes a pet
|
* Deletes a pet
|
||||||
*
|
*
|
||||||
* @param apiKey
|
|
||||||
* @param petId Pet id to delete
|
* @param petId Pet id to delete
|
||||||
|
* @param apiKey
|
||||||
* @return Void
|
* @return Void
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@DELETE("/pet/{petId}")
|
@DELETE("/pet/{petId}")
|
||||||
Void deletePet(
|
Void deletePet(
|
||||||
@Header("api_key") String apiKey,@Path("petId") Long petId
|
@Path("petId") Long petId, @Header("api_key") String apiKey
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
package io.swagger.client.model;
|
package io.swagger.client.model;
|
||||||
|
|
||||||
import io.swagger.client.model.Category;
|
import io.swagger.client.model.Category;
|
||||||
import java.util.*;
|
|
||||||
import io.swagger.client.model.Tag;
|
import io.swagger.client.model.Tag;
|
||||||
|
import java.util.*;
|
||||||
|
|
||||||
import io.swagger.annotations.*;
|
import io.swagger.annotations.*;
|
||||||
import com.google.gson.annotations.SerializedName;
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
@ -120,7 +120,7 @@ public class PetApiTest {
|
|||||||
api.addPet(pet);
|
api.addPet(pet);
|
||||||
|
|
||||||
Pet fetched = api.getPetById(pet.getId());
|
Pet fetched = api.getPetById(pet.getId());
|
||||||
api.deletePet(null, fetched.getId());
|
api.deletePet(fetched.getId(), null);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
fetched = api.getPetById(fetched.getId());
|
fetched = api.getPetById(fetched.getId());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user