-
Notifications
You must be signed in to change notification settings - Fork 276
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Last minute Airbyte API cutover fixes (#11552)
- Loading branch information
1 parent
b57aeeb
commit 2eab3ad
Showing
2 changed files
with
18 additions
and
1 deletion.
There are no files selected for viewing
4 changes: 3 additions & 1 deletion
4
airbyte-server/src/main/kotlin/io/airbyte/server/apis/publicapi/helpers/PathHelper.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
package io.airbyte.server.apis.publicapi.helpers | ||
|
||
import io.airbyte.server.apis.publicapi.constants.ROOT_PATH | ||
|
||
fun removePublicApiPathPrefix(path: String): String { | ||
return path.removePrefix("/public/api") | ||
return path.removePrefix(ROOT_PATH) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package helpers | ||
|
||
import io.airbyte.server.apis.publicapi.helpers.removePublicApiPathPrefix | ||
import org.junit.jupiter.api.Assertions.assertEquals | ||
import org.junit.jupiter.api.Test | ||
|
||
class PathHelperTest { | ||
@Test | ||
fun testRemovePublicApiPathPrefix() { | ||
assertEquals( | ||
"/v1/health", | ||
removePublicApiPathPrefix("/api/public/v1/health"), | ||
) | ||
} | ||
} |