metron-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From o...@apache.org
Subject [02/35] metron git commit: METRON-1343 Swagger UI for User Controller needs request method (MohanDV via ottobackwards) closes apache/metron#862
Date Tue, 09 Jan 2018 14:10:11 GMT
METRON-1343 Swagger UI for User Controller needs request method (MohanDV via ottobackwards)
closes apache/metron#862


Project: http://git-wip-us.apache.org/repos/asf/metron/repo
Commit: http://git-wip-us.apache.org/repos/asf/metron/commit/6ca08b9f
Tree: http://git-wip-us.apache.org/repos/asf/metron/tree/6ca08b9f
Diff: http://git-wip-us.apache.org/repos/asf/metron/diff/6ca08b9f

Branch: refs/heads/feature/METRON-1211-extensions-parsers-gradual
Commit: 6ca08b9f598b649d60c6b6468164a374b7f6f555
Parents: 3758768
Author: MohanDV <mohan.dv@gmail.com>
Authored: Wed Dec 13 10:55:04 2017 -0500
Committer: otto <otto@apache.org>
Committed: Wed Dec 13 10:55:04 2017 -0500

----------------------------------------------------------------------
 .../java/org/apache/metron/rest/controller/UserController.java    | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/metron/blob/6ca08b9f/metron-interface/metron-rest/src/main/java/org/apache/metron/rest/controller/UserController.java
----------------------------------------------------------------------
diff --git a/metron-interface/metron-rest/src/main/java/org/apache/metron/rest/controller/UserController.java
b/metron-interface/metron-rest/src/main/java/org/apache/metron/rest/controller/UserController.java
index 594b51f..6bca938 100644
--- a/metron-interface/metron-rest/src/main/java/org/apache/metron/rest/controller/UserController.java
+++ b/metron-interface/metron-rest/src/main/java/org/apache/metron/rest/controller/UserController.java
@@ -20,6 +20,7 @@ package org.apache.metron.rest.controller;
 import io.swagger.annotations.ApiOperation;
 import io.swagger.annotations.ApiResponse;
 import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
 import org.springframework.web.bind.annotation.RestController;
 
 import java.security.Principal;
@@ -29,7 +30,7 @@ public class UserController {
 
   @ApiOperation(value = "Retrieves the current user")
   @ApiResponse(message = "Current user", code = 200)
-    @RequestMapping("/api/v1/user")
+  @RequestMapping(value = "/api/v1/user", method = RequestMethod.GET)
     public String user(Principal user) {
         return user.getName();
     }


Mime
View raw message