Fix OpenAPI explorer redirection URL 65/111065/2
authorYaroslav Lastivka <yaroslav.lastivka@pantheon.tech>
Tue, 26 Mar 2024 13:30:09 +0000 (15:30 +0200)
committerIvan Hrasko <ivan.hrasko@pantheon.tech>
Wed, 27 Mar 2024 09:03:45 +0000 (09:03 +0000)
Previously, the redirection path was incorrectly leading to
a non-existent URL, causing the OpenAPI explorer to fail to load.

The redirection path in getApiExplorer method has been updated
to reflect the correct URL structure.

JIRA: NETCONF-1281
Change-Id: I2eec3b841c00de324d59d24267281beb2025ddf0
Signed-off-by: Yaroslav Lastivka <yaroslav.lastivka@pantheon.tech>
restconf/restconf-openapi/src/main/java/org/opendaylight/restconf/openapi/impl/OpenApiServiceImpl.java

index 91cd8204569a39024d12533c4a0c467d3d56eaea..fecd73832deecdb2975fe84f19f513b7b9929fa2 100644 (file)
@@ -83,7 +83,7 @@ public final class OpenApiServiceImpl implements OpenApiService {
      */
     @Override
     public Response getApiExplorer(final UriInfo uriInfo) {
-        return Response.seeOther(uriInfo.getBaseUriBuilder().path("../explorer/index.html").build()).build();
+        return Response.seeOther(uriInfo.getBaseUriBuilder().path("../../explorer/index.html").build()).build();
     }
 
     @Override