forked from loafle/openapi-generator-original
[python-nextgen] Fix binary response (#15076)
* fix binary response in python nextgen client * update samples
This commit is contained in:
@@ -326,6 +326,22 @@ paths:
|
||||
- body
|
||||
x-content-type: application/json
|
||||
x-accepts: text/plain
|
||||
/binary/gif:
|
||||
post:
|
||||
description: Test binary (gif) response body
|
||||
operationId: test/binary/gif
|
||||
responses:
|
||||
"200":
|
||||
content:
|
||||
image/gif:
|
||||
schema:
|
||||
format: binary
|
||||
type: string
|
||||
description: Successful operation
|
||||
summary: Test binary (gif) response body
|
||||
tags:
|
||||
- body
|
||||
x-accepts: image/gif
|
||||
components:
|
||||
requestBodies:
|
||||
Pet:
|
||||
|
||||
@@ -4,6 +4,7 @@ import org.openapitools.client.ApiClient;
|
||||
import org.openapitools.client.EncodingUtils;
|
||||
import org.openapitools.client.model.ApiResponse;
|
||||
|
||||
import java.io.File;
|
||||
import org.openapitools.client.model.Pet;
|
||||
|
||||
import java.util.ArrayList;
|
||||
@@ -16,6 +17,31 @@ import feign.*;
|
||||
public interface BodyApi extends ApiClient.Api {
|
||||
|
||||
|
||||
/**
|
||||
* Test binary (gif) response body
|
||||
* Test binary (gif) response body
|
||||
* @return File
|
||||
*/
|
||||
@RequestLine("POST /binary/gif")
|
||||
@Headers({
|
||||
"Accept: image/gif",
|
||||
})
|
||||
File testBinaryGif();
|
||||
|
||||
/**
|
||||
* Test binary (gif) response body
|
||||
* Similar to <code>testBinaryGif</code> but it also returns the http response headers .
|
||||
* Test binary (gif) response body
|
||||
* @return A ApiResponse that wraps the response boyd and the http headers.
|
||||
*/
|
||||
@RequestLine("POST /binary/gif")
|
||||
@Headers({
|
||||
"Accept: image/gif",
|
||||
})
|
||||
ApiResponse<File> testBinaryGifWithHttpInfo();
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Test body parameter(s)
|
||||
* Test body parameter(s)
|
||||
|
||||
Reference in New Issue
Block a user