From ea3d48620e49b273ed9cba3f6f84308138a18bda Mon Sep 17 00:00:00 2001
From: Andrei Piankouski <andrei_piankouski@epam.com>
Date: Thu, 27 Jun 2024 16:06:24 +0300
Subject: [PATCH 1/2] EPMRPP-90681 || Impossible to execute requests in "API"
 page

---
 .../core/configs/SpringDocConfiguration.java             | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/src/main/java/com/epam/ta/reportportal/core/configs/SpringDocConfiguration.java b/src/main/java/com/epam/ta/reportportal/core/configs/SpringDocConfiguration.java
index 8670ee3b0d..e71fc6080b 100644
--- a/src/main/java/com/epam/ta/reportportal/core/configs/SpringDocConfiguration.java
+++ b/src/main/java/com/epam/ta/reportportal/core/configs/SpringDocConfiguration.java
@@ -89,6 +89,7 @@ public class SpringDocConfiguration {
         ReportPortalUser.class, UserRole.class);
   }
 
+
   private static final Set<String> hiddenParams = ImmutableSet.<String>builder()
       .add(CRITERIA_PROJECT_ATTRIBUTE_NAME).build();
 
@@ -102,12 +103,12 @@ public class SpringDocConfiguration {
   @Autowired
   private ServletContext servletContext;
 
-  @Value("${spring.application.name}")
-  private String applicationName;
-
   @Value("${info.build.version}")
   private String buildVersion;
 
+  @Value("${server.servlet.context-path:/api}")
+  private String pathValue;
+
   @Bean
   public OpenAPI openAPI() {
     final String securitySchemeName = "bearerAuth";
@@ -132,7 +133,7 @@ public OpenAPI openAPI() {
                         .bearerFormat("JWT")
                 )
         )
-        .addServersItem(new Server().url("/" + applicationName));
+        .addServersItem(new Server().url("/" + pathValue));
   }
 
   /**

From a7b98b833b090211d1ae05f05c794b43c7cda5a9 Mon Sep 17 00:00:00 2001
From: Andrei Piankouski <andrei_piankouski@epam.com>
Date: Thu, 27 Jun 2024 16:23:42 +0300
Subject: [PATCH 2/2] EPMRPP-90681 || Impossible to execute requests in "API"
 page

---
 .../ta/reportportal/core/configs/SpringDocConfiguration.java    | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/main/java/com/epam/ta/reportportal/core/configs/SpringDocConfiguration.java b/src/main/java/com/epam/ta/reportportal/core/configs/SpringDocConfiguration.java
index e71fc6080b..949cdc0a8f 100644
--- a/src/main/java/com/epam/ta/reportportal/core/configs/SpringDocConfiguration.java
+++ b/src/main/java/com/epam/ta/reportportal/core/configs/SpringDocConfiguration.java
@@ -133,7 +133,7 @@ public OpenAPI openAPI() {
                         .bearerFormat("JWT")
                 )
         )
-        .addServersItem(new Server().url("/" + pathValue));
+        .addServersItem(new Server().url(pathValue));
   }
 
   /**