Skip to content

Commit 80b6652

Browse files
committed
nit: Update deprecation message for _opendistro/_security/kibanainfo API
Signed-off-by: shikharj05 <8859327+shikharj05@users.noreply.github.com>
1 parent 8803690 commit 80b6652

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/main/java/org/opensearch/security/rest/DashboardsInfoAction.java

+5-3
Original file line numberDiff line numberDiff line change
@@ -51,13 +51,15 @@
5151
import static org.opensearch.rest.RestRequest.Method.GET;
5252
import static org.opensearch.rest.RestRequest.Method.POST;
5353
import static org.opensearch.security.dlic.rest.support.Utils.LEGACY_PLUGIN_ROUTE_PREFIX;
54-
import static org.opensearch.security.dlic.rest.support.Utils.OPENDISTRO_API_DEPRECATION_MESSAGE;
5554
import static org.opensearch.security.dlic.rest.support.Utils.PLUGIN_ROUTE_PREFIX;
5655
import static org.opensearch.security.dlic.rest.support.Utils.addDeprecatedRoutesPrefix;
5756
import static org.opensearch.security.dlic.rest.support.Utils.addRoutesPrefix;
5857

5958
public class DashboardsInfoAction extends BaseRestHandler {
6059

60+
private static final String KIBANAINFO_ROUTE_DEPRECATION_MESSAGE =
61+
"[_opendistro/_security/kibanainfo] is a deprecated endpoint path. Please use _plugins/_security/dashboardsinfo instead.";;
62+
6163
private static final List<Route> routes = ImmutableList.<Route>builder()
6264
.addAll(
6365
addRoutesPrefix(ImmutableList.of(new Route(GET, "/dashboardsinfo"), new Route(POST, "/dashboardsinfo")), PLUGIN_ROUTE_PREFIX)
@@ -68,8 +70,8 @@ public class DashboardsInfoAction extends BaseRestHandler {
6870
.addAll(
6971
addDeprecatedRoutesPrefix(
7072
ImmutableList.of(
71-
new DeprecatedRoute(GET, "/kibanainfo", OPENDISTRO_API_DEPRECATION_MESSAGE),
72-
new DeprecatedRoute(POST, "/kibanainfo", OPENDISTRO_API_DEPRECATION_MESSAGE)
73+
new DeprecatedRoute(GET, "/kibanainfo", KIBANAINFO_ROUTE_DEPRECATION_MESSAGE),
74+
new DeprecatedRoute(POST, "/kibanainfo", KIBANAINFO_ROUTE_DEPRECATION_MESSAGE)
7375
),
7476
LEGACY_PLUGIN_ROUTE_PREFIX
7577
)

0 commit comments

Comments
 (0)