package org.synyx.urlaubsverwaltung.restapi;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.servlet.view.RedirectView;


/**
 * @author  Aljona Murygina - murygina@synyx.de
 */
@Controller("restApiBaseController")
@RequestMapping("/api")
public class BaseController {

    private static final String ROOT_URL = "/";
    private static final boolean RELATIVE_CONTEXT = true;

    @RequestMapping(value = ROOT_URL, method = RequestMethod.GET)
    public RedirectView discover() {

        return new RedirectView("/swagger-ui.html", RELATIVE_CONTEXT);
    }
}

@@ -136,22 +136,18 @@
 otation.
-Reques
+Ge
 tMapping
@@ -203,21 +203,22 @@
 RequestM
-ethod
+apping
 ;%0Aimport
@@ -423,56 +423,8 @@
  %7B%0A%0A
-    private static final String ROOT_URL = %22/%22;%0A
     
@@ -483,30 +483,26 @@
 ;%0A%0A    @
-Reques
+Ge
 tMapping
 (value =
@@ -497,54 +497,8 @@
 ping
-(value = ROOT_URL, method = RequestMethod.GET)
 %0A   

allow redirect for "/api" and "/api/"