[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:
William Cheng
2023-04-28 14:06:27 +08:00
committed by GitHub
parent f4c041e496
commit 2bd1a15217
32 changed files with 1873 additions and 46 deletions

View File

@@ -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);
}