Is it right that Jersey does not support a declarative hyperlink in nested resources?

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;
    }

   ...
}

Wonkle type JSON representation has url attribute with corresponding value. However, when Wonkle is used as a nested attribute in a widget type, its url attribute is null.

Am I doing something wrong, or is this how LinkFilter works?

Thank!

+4
source share

All Articles