camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Claus Ibsen (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (CAMEL-7941) Expose private variables as JSON for camel-swagger
Date Thu, 09 Jul 2015 11:26:04 GMT

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

Claus Ibsen resolved CAMEL-7941.
--------------------------------
    Resolution: Not A Problem

> Expose private variables as JSON for camel-swagger
> --------------------------------------------------
>
>                 Key: CAMEL-7941
>                 URL: https://issues.apache.org/jira/browse/CAMEL-7941
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-swagger
>    Affects Versions: 2.14.0
>            Reporter: Espen Tjonneland
>            Priority: Minor
>
> Consider the following class:
> @ApiModel(value = "MyDTO ", description = "My data transporter") 
> public class MyDTO { 
>     @ApiModelProperty(value = "This is a private field") 
>     private String myPrivateField; 
> } 
> Swagger will not document the class as JSON. I am unsure if this is happening in camel-core,
or if this is a problem with Swagger. However, the behavior is inconsistent with e.g. Gson,
which handles private fields just fine. Instead it relies on annotations for how the class
variables should be exposed. 
> Would it be possible to have this variable exposed by default even though it is private,
and instead rely on annotations for deciding how to expose the variables (like Gson does).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message