users@jersey.java.net

[Jersey] Is it correct that Jersey does not support declarative hyperlinking in nested resources?

From: McDermott, Chris <Chris.McDermott_at_stratus.com>
Date: Tue, 19 Feb 2013 10:19:28 -0500

It seems if a produce a representation of type Wonkle it has url
attribute in its JSON form. If I produce a Widget, it too has a url
attribute, but its nested Wonkle representation has a url attribute with
a null value.

Am I doing something incorrectly, or is this this just the way the
LinkFilter works?

Thanks!

public class Widget {

    @Ref(resource=WidgetResource.class)

    URI url;

    public URI getUrl() {

        return url;

    }

    public Wonkle getWonkle() {

        return wonkle;

    }

    ...

}

 

public class Wonkle {

    @Ref(resource=WonkleResource.class)

    URI url;

    public URI getUrl() {

        return url;

    }

   ...

}