=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/Property.java' --- dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/Property.java 2015-04-24 06:42:41 +0000 +++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/Property.java 2015-04-24 06:48:37 +0000 @@ -232,6 +232,11 @@ */ private String href; + /** + * Used by linkService to link to the API endpoint containing this type. + */ + private String apiEndpoint; + public Property() { } @@ -656,6 +661,18 @@ this.href = href; } + @JsonProperty + @JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0 ) + public String getApiEndpoint() + { + return apiEndpoint; + } + + public void setApiEndpoint( String apiEndpoint ) + { + this.apiEndpoint = apiEndpoint; + } + public String key() { return isCollection() ? collectionName : name; === modified file 'dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/service/DefaultLinkService.java' --- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/service/DefaultLinkService.java 2015-04-24 06:42:41 +0000 +++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/service/DefaultLinkService.java 2015-04-24 06:48:37 +0000 @@ -150,6 +150,11 @@ if ( property.is( PropertyType.REFERENCE ) ) { property.setHref( hrefBase + "/schemas/" + klassSchema.getSingular() ); + + if ( klassSchema.haveApiEndpoint() ) + { + property.setApiEndpoint( hrefBase + klassSchema.getApiEndpoint() ); + } } } }