mirror of
https://github.com/jlengrand/openapi-generator.git
synced 2026-03-10 08:31:23 +00:00
* deserialize enum json response (python) * adapt python samples: adding enum deserialization * add echo test for enum json response deserialization (python) * update samples
This commit is contained in:
@@ -547,6 +547,28 @@ paths:
|
||||
- body
|
||||
x-content-type: application/json
|
||||
x-accepts: text/plain
|
||||
/echo/body/string_enum:
|
||||
post:
|
||||
description: Test string enum response body
|
||||
operationId: test/echo/body/string_enum
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/StringEnumRef'
|
||||
description: String enum
|
||||
responses:
|
||||
"200":
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/StringEnumRef'
|
||||
description: Successful operation
|
||||
summary: Test string enum response body
|
||||
tags:
|
||||
- body
|
||||
x-content-type: application/json
|
||||
x-accepts: application/json
|
||||
/binary/gif:
|
||||
post:
|
||||
description: Test binary (gif) response body
|
||||
|
||||
@@ -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.StringEnumRef;
|
||||
import org.openapitools.client.model.Tag;
|
||||
|
||||
import java.util.ArrayList;
|
||||
@@ -246,6 +247,35 @@ public interface BodyApi extends ApiClient.Api {
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Test string enum response body
|
||||
* Test string enum response body
|
||||
* @param body String enum (optional)
|
||||
* @return StringEnumRef
|
||||
*/
|
||||
@RequestLine("POST /echo/body/string_enum")
|
||||
@Headers({
|
||||
"Content-Type: application/json",
|
||||
"Accept: application/json",
|
||||
})
|
||||
StringEnumRef testEchoBodyStringEnum(String body);
|
||||
|
||||
/**
|
||||
* Test string enum response body
|
||||
* Similar to <code>testEchoBodyStringEnum</code> but it also returns the http response headers .
|
||||
* Test string enum response body
|
||||
* @param body String enum (optional)
|
||||
* @return A ApiResponse that wraps the response boyd and the http headers.
|
||||
*/
|
||||
@RequestLine("POST /echo/body/string_enum")
|
||||
@Headers({
|
||||
"Content-Type: application/json",
|
||||
"Accept: application/json",
|
||||
})
|
||||
ApiResponse<StringEnumRef> testEchoBodyStringEnumWithHttpInfo(String body);
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Test empty json (request body)
|
||||
* Test empty json (request body)
|
||||
|
||||
Reference in New Issue
Block a user