=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/dashboard/DashboardItem.java' --- dhis-2/dhis-api/src/main/java/org/hisp/dhis/dashboard/DashboardItem.java 2015-09-15 10:26:47 +0000 +++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/dashboard/DashboardItem.java 2015-10-13 08:48:10 +0000 @@ -108,6 +108,7 @@ // ------------------------------------------------------------------------- @JsonProperty + @JsonView( { DetailedView.class, ExportView.class } ) @JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0 ) public DashboardItemType getType() { === modified file 'dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/SchemaController.java' --- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/SchemaController.java 2015-10-13 08:24:58 +0000 +++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/SchemaController.java 2015-10-13 08:48:10 +0000 @@ -47,6 +47,7 @@ import org.hisp.dhis.webapi.utils.WebMessageUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestMapping; @@ -132,8 +133,8 @@ throw new HttpClientErrorException( HttpStatus.NOT_FOUND, "Type " + type + " does not exist." ); } - @RequestMapping( value = "/{type}", method = { RequestMethod.POST, RequestMethod.PUT } ) - public void validateSchemaJson( @PathVariable String type, HttpServletRequest request, HttpServletResponse response ) throws IOException + @RequestMapping( value = "/{type}", method = { RequestMethod.POST, RequestMethod.PUT }, consumes = { MediaType.APPLICATION_JSON_VALUE, MediaType.APPLICATION_XML_VALUE } ) + public void validateSchema( @PathVariable String type, HttpServletRequest request, HttpServletResponse response ) throws IOException { Schema schema = getSchemaFromType( type );