diff --git a/clients/vulnerable-code/src/main/kotlin/VulnerableCodeService.kt b/clients/vulnerable-code/src/main/kotlin/VulnerableCodeService.kt index 479af9ca94f98..bfa55bc9dd848 100644 --- a/clients/vulnerable-code/src/main/kotlin/VulnerableCodeService.kt +++ b/clients/vulnerable-code/src/main/kotlin/VulnerableCodeService.kt @@ -38,7 +38,10 @@ import retrofit2.http.POST */ interface VulnerableCodeService { companion object { - const val PUBLIC_SERVER_URL = "https://public.vulnerablecode.io" + /** + * The URL to version 1 of the API. Version 2 is currently in the works. + */ + const val PUBLIC_SERVER_URL = "https://public.vulnerablecode.io/api/" /** * The JSON (de-)serialization object used by this service. @@ -165,6 +168,6 @@ interface VulnerableCodeService { * Return a list with information about packages including the resolved and unresolved vulnerabilities for these * packages. */ - @POST("api/packages/bulk_search") + @POST("packages/bulk_search") suspend fun getPackageVulnerabilities(@Body packageUrls: PackagesWrapper): List } diff --git a/plugins/advisors/vulnerable-code/src/test/kotlin/VulnerableCodeTest.kt b/plugins/advisors/vulnerable-code/src/test/kotlin/VulnerableCodeTest.kt index e27ccbd881281..67d943a528533 100644 --- a/plugins/advisors/vulnerable-code/src/test/kotlin/VulnerableCodeTest.kt +++ b/plugins/advisors/vulnerable-code/src/test/kotlin/VulnerableCodeTest.kt @@ -332,7 +332,7 @@ private val packagesRequestJson = generatePackagesRequest() */ private fun WireMockServer.stubPackagesRequest(responseFile: String, request: String = packagesRequestJson) { stubFor( - post(urlPathEqualTo("/api/packages/bulk_search")) + post(urlPathEqualTo("/packages/bulk_search")) .withRequestBody( equalToJson(request, /* ignoreArrayOrder = */ true, /* ignoreExtraElements = */ false) )