You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by qwertywx <qw...@hotmail.com> on 2017/02/10 11:29:44 UTC

Camel Rest DSL is not recognizing JsonProperty access

I am using Camel Rest DSL to build my rest service but it seems that , it
does not recognize JsonProperty annotation.

I have a propery like:

class Test {

    private int id;

    @JsonProperty(access = Access.READ_ONLY)
    private String text;
}
and the rest definition is:

<rests xmlns="http://camel.apache.org/schema/spring">
    <rest consumes="application/json" produces="application/json"
path="/api/v1">
        <post bindingMode="json" type="Test" uri="/path">
            <route>
                .....
            </route>
        </post>
    </rest>
</rests>
When I call it with :

{
    "id":2,
    "text":"asd"
}
Text field is also getting initialized.

What am I missing?





--
View this message in context: http://camel.465427.n5.nabble.com/Camel-Rest-DSL-is-not-recognizing-JsonProperty-access-tp5793758.html
Sent from the Camel Development mailing list archive at Nabble.com.