=== modified file 'dhis-2/dhis-web/dhis-web-api-fred/src/main/java/org/hisp/dhis/web/webapi/v1/domain/Facility.java' --- dhis-2/dhis-web/dhis-web-api-fred/src/main/java/org/hisp/dhis/web/webapi/v1/domain/Facility.java 2013-03-07 18:52:55 +0000 +++ dhis-2/dhis-web/dhis-web-api-fred/src/main/java/org/hisp/dhis/web/webapi/v1/domain/Facility.java 2013-03-07 19:03:23 +0000 @@ -27,6 +27,7 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +import org.codehaus.jackson.annotate.JsonPropertyOrder; import org.hibernate.validator.constraints.Length; import org.hisp.dhis.web.webapi.v1.validation.constraint.annotation.ValidProperties; import org.hisp.dhis.web.webapi.v1.validation.group.Update; @@ -41,11 +42,12 @@ /** * @author Morten Olav Hansen */ +@JsonPropertyOrder( value = { "uuid", "name", "active", "href", "createdAt", "updatedAt", "coordinates", "identifiers", "properties" } ) public class Facility { // Internal system identifier - @NotNull(groups = Update.class) - @Length(min = 36, max = 36) + @NotNull( groups = Update.class ) + @Length( min = 36, max = 36 ) private String uuid; // Name of the facility === modified file 'dhis-2/dhis-web/dhis-web-api-fred/src/main/java/org/hisp/dhis/web/webapi/v1/domain/Identifier.java' --- dhis-2/dhis-web/dhis-web-api-fred/src/main/java/org/hisp/dhis/web/webapi/v1/domain/Identifier.java 2013-02-04 18:03:10 +0000 +++ dhis-2/dhis-web/dhis-web-api-fred/src/main/java/org/hisp/dhis/web/webapi/v1/domain/Identifier.java 2013-03-07 19:03:23 +0000 @@ -27,13 +27,18 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +import org.codehaus.jackson.annotate.JsonPropertyOrder; + /** * @author Morten Olav Hansen */ +@JsonPropertyOrder( value = { "agency", "context", "id" } ) public class Identifier { public static final String DHIS2_AGENCY = "DHIS2"; + public static final String DHIS2_CODE_CONTEXT = "DHIS2_CODE"; + public static final String DHIS2_UID_CONTEXT = "DHIS2_UID"; private String id; === modified file 'dhis-2/dhis-web/dhis-web-api-fred/src/main/webapp/WEB-INF/api-fred-velocity/v1/facilities.vm' --- dhis-2/dhis-web/dhis-web-api-fred/src/main/webapp/WEB-INF/api-fred-velocity/v1/facilities.vm 2013-03-07 18:52:55 +0000 +++ dhis-2/dhis-web/dhis-web-api-fred/src/main/webapp/WEB-INF/api-fred-velocity/v1/facilities.vm 2013-03-07 19:03:23 +0000 @@ -8,7 +8,7 @@ #foreach( $facility in $entity.facilities ) { id: "$facility.uuid", - url: "$facility.href", + href: "$facility.href", name: "$esc.escapeEcmaScript($facility.name)", coordinates: "$facility.coordinates" },