forked from loafle/openapi-generator-original
[python-nextgen] fix empty dict in body parameter (#15336)
* add more tests for python-nextgen * update samples * add fix for empty dict body * update samples
This commit is contained in:
@@ -6,6 +6,7 @@ import org.openapitools.client.model.ApiResponse;
|
||||
|
||||
import java.io.File;
|
||||
import org.openapitools.client.model.Pet;
|
||||
import org.openapitools.client.model.Tag;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
@@ -42,6 +43,35 @@ public interface BodyApi extends ApiClient.Api {
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Test free form object
|
||||
* Test free form object
|
||||
* @param body Free form object (optional)
|
||||
* @return String
|
||||
*/
|
||||
@RequestLine("POST /echo/body/FreeFormObject/response_string")
|
||||
@Headers({
|
||||
"Content-Type: application/json",
|
||||
"Accept: text/plain",
|
||||
})
|
||||
String testEchoBodyFreeFormObjectResponseString(Object body);
|
||||
|
||||
/**
|
||||
* Test free form object
|
||||
* Similar to <code>testEchoBodyFreeFormObjectResponseString</code> but it also returns the http response headers .
|
||||
* Test free form object
|
||||
* @param body Free form object (optional)
|
||||
* @return A ApiResponse that wraps the response boyd and the http headers.
|
||||
*/
|
||||
@RequestLine("POST /echo/body/FreeFormObject/response_string")
|
||||
@Headers({
|
||||
"Content-Type: application/json",
|
||||
"Accept: text/plain",
|
||||
})
|
||||
ApiResponse<String> testEchoBodyFreeFormObjectResponseStringWithHttpInfo(Object body);
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Test body parameter(s)
|
||||
* Test body parameter(s)
|
||||
@@ -99,4 +129,33 @@ public interface BodyApi extends ApiClient.Api {
|
||||
ApiResponse<String> testEchoBodyPetResponseStringWithHttpInfo(Pet pet);
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Test empty json (request body)
|
||||
* Test empty json (request body)
|
||||
* @param tag Tag object (optional)
|
||||
* @return String
|
||||
*/
|
||||
@RequestLine("POST /echo/body/Tag/response_string")
|
||||
@Headers({
|
||||
"Content-Type: application/json",
|
||||
"Accept: text/plain",
|
||||
})
|
||||
String testEchoBodyTagResponseString(Tag tag);
|
||||
|
||||
/**
|
||||
* Test empty json (request body)
|
||||
* Similar to <code>testEchoBodyTagResponseString</code> but it also returns the http response headers .
|
||||
* Test empty json (request body)
|
||||
* @param tag Tag object (optional)
|
||||
* @return A ApiResponse that wraps the response boyd and the http headers.
|
||||
*/
|
||||
@RequestLine("POST /echo/body/Tag/response_string")
|
||||
@Headers({
|
||||
"Content-Type: application/json",
|
||||
"Accept: text/plain",
|
||||
})
|
||||
ApiResponse<String> testEchoBodyTagResponseStringWithHttpInfo(Tag tag);
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user