← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 15511: minor api update

 

------------------------------------------------------------
revno: 15511
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2014-06-02 09:17:31 +0200
message:
  minor api update
modified:
  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/resources/META-INF/dhis/servlet.xml


--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk

Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== 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	2014-05-28 11:02:29 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/SchemaController.java	2014-06-02 07:17:31 +0000
@@ -52,7 +52,7 @@
     @Autowired
     private SchemaService schemaService;
 
-    @RequestMapping( value = "", method = RequestMethod.GET, produces = { "text/html", "*/*" } )
+    @RequestMapping( value = "", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE )
     public void getSchemasJson( HttpServletResponse response ) throws IOException
     {
         Schemas schemas = new Schemas( schemaService.getSchemas() );
@@ -61,7 +61,7 @@
         JacksonUtils.toJson( response.getOutputStream(), schemas );
     }
 
-    @RequestMapping( value = "/{type}", method = RequestMethod.GET, produces = { "text/html", "*/*" } )
+    @RequestMapping( value = "/{type}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE )
     public void getSchemaJson( @PathVariable String type, HttpServletResponse response ) throws IOException
     {
         Schema schema = schemaService.getSchemaBySingularName( type );

=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/resources/META-INF/dhis/servlet.xml'
--- dhis-2/dhis-web/dhis-web-api/src/main/resources/META-INF/dhis/servlet.xml	2014-06-01 13:38:55 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/resources/META-INF/dhis/servlet.xml	2014-06-02 07:17:31 +0000
@@ -79,10 +79,6 @@
         </bean>
 
         <bean class="org.hisp.dhis.webapi.view.JacksonJsonView">
-          <constructor-arg name="contentType" value="text/html" />
-        </bean>
-
-        <bean class="org.hisp.dhis.webapi.view.JacksonJsonView">
           <constructor-arg name="withPadding" value="false" />
           <constructor-arg name="withCompression" value="false" />
         </bean>