From ced24e6beab313a87aaf5ce3005a9c7676204aa3 Mon Sep 17 00:00:00 2001 From: Pranav Bhaskaran <67958542+Pranav-b-7@users.noreply.github.com> Date: Tue, 25 Jan 2022 19:22:47 +0530 Subject: [PATCH] added query param supported (#119) --- .../gate/controllers/OpsmxPlatformController.groovy | 6 ++++-- .../gate/services/internal/OpsmxPlatformService.groovy | 4 +++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/gate-web/src/main/groovy/com/netflix/spinnaker/gate/controllers/OpsmxPlatformController.groovy b/gate-web/src/main/groovy/com/netflix/spinnaker/gate/controllers/OpsmxPlatformController.groovy index 22d6d1d58a..8e0ad1c4c1 100644 --- a/gate-web/src/main/groovy/com/netflix/spinnaker/gate/controllers/OpsmxPlatformController.groovy +++ b/gate-web/src/main/groovy/com/netflix/spinnaker/gate/controllers/OpsmxPlatformController.groovy @@ -68,8 +68,10 @@ class OpsmxPlatformController { Object getPlatformResponse1(@PathVariable("version") String version, @PathVariable("type") String type, @RequestParam(value = "datasourceType", required = false) String datasourceType, - @RequestParam(value = "accountName", required = false) String accountName) { - return opsmxPlatformService.getPlatformResponse1(version, type, datasourceType, accountName) + @RequestParam(value = "accountName", required = false) String accountName, + @RequestParam(value = "source", required = false) String source, + @RequestParam(value = "permission", required = false) String permission) { + return opsmxPlatformService.getPlatformResponse1(version, type, datasourceType, accountName, source, permission) } @ApiOperation(value = "Endpoint for platform rest services") diff --git a/gate-web/src/main/groovy/com/netflix/spinnaker/gate/services/internal/OpsmxPlatformService.groovy b/gate-web/src/main/groovy/com/netflix/spinnaker/gate/services/internal/OpsmxPlatformService.groovy index 9024dfe7fc..2a2a3d1066 100644 --- a/gate-web/src/main/groovy/com/netflix/spinnaker/gate/services/internal/OpsmxPlatformService.groovy +++ b/gate-web/src/main/groovy/com/netflix/spinnaker/gate/services/internal/OpsmxPlatformService.groovy @@ -26,7 +26,9 @@ interface OpsmxPlatformService { Object getPlatformResponse1(@Path('version') String version, @Path('type') String type, @Query("datasourceType") String datasourceType, - @Query("accountName") String accountName) + @Query("accountName") String accountName, + @Query("source") String source, + @Query("permission") String permission) @GET("/platformservice/{version}/{type}/{source}") Object getPlatformResponse(@Path('version') String version,