fixed swagger urls

This commit is contained in:
Michele Artini 2022-08-26 09:39:45 +02:00
parent 2db58b9e04
commit 5aa2f013d4
9 changed files with 12 additions and 12 deletions

View File

@ -11,7 +11,7 @@ public class HomeController extends AbstractDnetController {
"/doc", "/swagger"
})
public String apiDoc() {
return "redirect:swagger-ui/";
return "redirect:swagger-ui/index.html";
}
}

View File

@ -8,6 +8,6 @@ public class ApiDocController {
@GetMapping({ "/apidoc", "/api-doc", "/doc", "/swagger" })
public String apiDoc() {
return "redirect:swagger-ui/";
return "redirect:swagger-ui/index.html";
}
}

View File

@ -27,7 +27,7 @@
<a class="nav-link dropdown-toggle" href="javascript:void(0)" data-toggle="dropdown">Tools <span class="caret"></span></a>
<div class="dropdown-menu dropdown-menu-right">
<a class="dropdown-item" href="{{t.url}}" target="_blank" ng-repeat="t in tools">{{t.name}}</a>
<a class="dropdown-item" href="/swagger-ui/" target="_blank">API documentation</a>
<a class="dropdown-item" href="/apidoc" target="_blank">API documentation</a>
</div>
</li>
</ul>

View File

@ -8,6 +8,6 @@ public class ApiDocController {
@GetMapping({ "/apidoc", "/api-doc", "/doc", "/swagger" })
public String apiDoc() {
return "redirect:swagger-ui/";
return "redirect:swagger-ui/index.html";
}
}

View File

@ -2,6 +2,6 @@
<html>
<head>
<title>OpenAIRE Broker Public API</title>
<meta http-equiv="refresh" content="2; url = ./swagger" />
<meta http-equiv="refresh" content="2; url = ./apidoc" />
</head>
</html>

View File

@ -11,6 +11,6 @@ public class SwaggerController {
"/apidoc", "/api-doc", "/doc", "/swagger"
}, method = RequestMethod.GET)
public String apiDoc() {
return "redirect:swagger-ui/";
return "redirect:swagger-ui/index.html";
}
}

View File

@ -20,7 +20,7 @@
<h1>Metadata Store Manager</h1>
<hr />
<a href="./swagger-ui/" target="_blank">API documentation</a>
<a href="./apidoc" target="_blank">API documentation</a>
<hr />
<a href="javascript:void(0)" data-toggle="modal" data-target="#newMdstoreModal">create a new mdstore</a>
<hr />

View File

@ -81,10 +81,10 @@ public class HomeController extends AbstractDnetController {
}
@GetMapping({
"/doc", "/swagger"
"apidoc", "api-doc", "/doc", "/swagger"
})
public String apiDoc() {
return "redirect:swagger-ui/";
return "redirect:swagger-ui/index.html";
}
}

View File

@ -12,14 +12,14 @@ public class HomeController extends AbstractDnetController {
"/doc", "/swagger"
})
public String apiDoc() {
return "redirect:swagger-ui/";
return "redirect:swagger-ui/index.html";
}
@GetMapping({
"/v1/ui"
})
public String v1Doc() {
return "redirect:/swagger-ui/?urls.primaryName=Scholexplorer%20API%20V1.0";
return "redirect:/swagger-ui/index.html?urls.primaryName=Scholexplorer%20API%20V1.0";
}
@ -27,7 +27,7 @@ public class HomeController extends AbstractDnetController {
"/v2/ui"
})
public String v2Doc() {
return "redirect:/swagger-ui/?urls.primaryName=Scholexplorer%20API%20V2.0";
return "redirect:/swagger-ui/index.html?urls.primaryName=Scholexplorer%20API%20V2.0";
}