Espen Tjonneland created CAMEL-7941:
---------------------------------------

             Summary: 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)

Reply via email to