You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Michael Prankl (Jira)" <ji...@apache.org> on 2020/12/03 15:35:00 UTC
[jira] [Created] (CAMEL-15919) Response message definition does not
correctly handle java.io.File as response model
Michael Prankl created CAMEL-15919:
--------------------------------------
Summary: Response message definition does not correctly handle java.io.File as response model
Key: CAMEL-15919
URL: https://issues.apache.org/jira/browse/CAMEL-15919
Project: Camel
Issue Type: Bug
Components: camel-swagger-java
Affects Versions: 3.6.0
Reporter: Michael Prankl
Currently, specifying "java.io.File" class as response model (for example when the API returns a binary document, aka "Download") in RestOperationResponseMsgDefinition produces an incorrect swagger definition:
{noformat}
"responses" : {
"200" : {
"description" : "Created PDF file",
"schema" : {
"type" : "string",
"format" : "java.io.File"
},
},
// ....
}
{noformat}
The correct way to handle this according to Swagger docs v2 (https://swagger.io/docs/specification/2-0/describing-responses/) is:
{noformat}
"responses" : {
"200" : {
"description" : "Created PDF file",
"schema" : {
"type" : "file"
},
},
// ....
}
{noformat}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)