[ 
https://issues.apache.org/jira/browse/CAMEL-15919?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Claus Ibsen resolved CAMEL-15919.
---------------------------------
    Fix Version/s: 3.7.0
       Resolution: Fixed

> 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-openapi-java, camel-swagger-java
>    Affects Versions: 3.6.0
>            Reporter: Michael Prankl
>            Priority: Major
>             Fix For: 3.7.0
>
>
> 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 / OAS2 / 
> OAS3 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}
>  
> camel-openapi-java with OAS2 / OAS3 is also affected.
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to